@prmichaelsen/acp-visualizer 0.1.0 → 0.1.2

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 (159) hide show
  1. package/package.json +8 -10
  2. package/src/components/ExtraFieldsBadge.tsx +1 -1
  3. package/src/components/FilterBar.tsx +1 -1
  4. package/src/components/Header.tsx +1 -1
  5. package/src/components/MilestoneTable.tsx +1 -1
  6. package/src/components/MilestoneTree.tsx +2 -2
  7. package/src/components/StatusBadge.tsx +1 -1
  8. package/src/components/StatusDot.tsx +1 -1
  9. package/src/components/TaskList.tsx +1 -1
  10. package/src/routes/__root.tsx +5 -5
  11. package/src/routes/api/watch.ts +1 -1
  12. package/src/routes/index.tsx +2 -2
  13. package/src/routes/milestones.tsx +7 -7
  14. package/src/routes/search.tsx +4 -4
  15. package/src/routes/tasks.tsx +3 -3
  16. package/src/services/progress-database.service.ts +3 -3
  17. package/agent/commands/acp.clarification-address.md +0 -417
  18. package/agent/commands/acp.clarification-capture.md +0 -386
  19. package/agent/commands/acp.clarification-create.md +0 -437
  20. package/agent/commands/acp.clarifications-research.md +0 -326
  21. package/agent/commands/acp.command-create.md +0 -432
  22. package/agent/commands/acp.design-create.md +0 -286
  23. package/agent/commands/acp.design-reference.md +0 -355
  24. package/agent/commands/acp.handoff.md +0 -270
  25. package/agent/commands/acp.index.md +0 -423
  26. package/agent/commands/acp.init.md +0 -546
  27. package/agent/commands/acp.package-create.md +0 -895
  28. package/agent/commands/acp.package-info.md +0 -212
  29. package/agent/commands/acp.package-install.md +0 -539
  30. package/agent/commands/acp.package-list.md +0 -280
  31. package/agent/commands/acp.package-publish.md +0 -541
  32. package/agent/commands/acp.package-remove.md +0 -293
  33. package/agent/commands/acp.package-search.md +0 -307
  34. package/agent/commands/acp.package-update.md +0 -361
  35. package/agent/commands/acp.package-validate.md +0 -540
  36. package/agent/commands/acp.pattern-create.md +0 -386
  37. package/agent/commands/acp.plan.md +0 -587
  38. package/agent/commands/acp.proceed.md +0 -882
  39. package/agent/commands/acp.project-create.md +0 -675
  40. package/agent/commands/acp.project-info.md +0 -312
  41. package/agent/commands/acp.project-list.md +0 -226
  42. package/agent/commands/acp.project-remove.md +0 -379
  43. package/agent/commands/acp.project-set.md +0 -227
  44. package/agent/commands/acp.project-update.md +0 -307
  45. package/agent/commands/acp.projects-restore.md +0 -228
  46. package/agent/commands/acp.projects-sync.md +0 -347
  47. package/agent/commands/acp.report.md +0 -407
  48. package/agent/commands/acp.resume.md +0 -239
  49. package/agent/commands/acp.sessions.md +0 -301
  50. package/agent/commands/acp.status.md +0 -293
  51. package/agent/commands/acp.sync.md +0 -364
  52. package/agent/commands/acp.task-create.md +0 -500
  53. package/agent/commands/acp.update.md +0 -302
  54. package/agent/commands/acp.validate.md +0 -466
  55. package/agent/commands/acp.version-check-for-updates.md +0 -276
  56. package/agent/commands/acp.version-check.md +0 -191
  57. package/agent/commands/acp.version-update.md +0 -289
  58. package/agent/commands/command.template.md +0 -339
  59. package/agent/commands/git.commit.md +0 -526
  60. package/agent/commands/git.init.md +0 -514
  61. package/agent/commands/tanstack-cloudflare.deploy.md +0 -272
  62. package/agent/commands/tanstack-cloudflare.tail.md +0 -275
  63. package/agent/design/.gitkeep +0 -0
  64. package/agent/design/design.template.md +0 -154
  65. package/agent/design/local.dashboard-layout-routing.md +0 -288
  66. package/agent/design/local.data-model-yaml-parsing.md +0 -310
  67. package/agent/design/local.search-filtering.md +0 -331
  68. package/agent/design/local.server-api-auto-refresh.md +0 -235
  69. package/agent/design/local.table-tree-views.md +0 -299
  70. package/agent/design/local.visualizer-requirements.md +0 -349
  71. package/agent/design/requirements.template.md +0 -387
  72. package/agent/index/.gitkeep +0 -0
  73. package/agent/index/acp.core.yaml +0 -137
  74. package/agent/index/local.main.template.yaml +0 -37
  75. package/agent/manifest.template.yaml +0 -13
  76. package/agent/manifest.yaml +0 -302
  77. package/agent/milestones/.gitkeep +0 -0
  78. package/agent/milestones/milestone-1-project-scaffold-data-pipeline.md +0 -67
  79. package/agent/milestones/milestone-1-{title}.template.md +0 -206
  80. package/agent/milestones/milestone-2-dashboard-views-interaction.md +0 -79
  81. package/agent/package.template.yaml +0 -86
  82. package/agent/patterns/.gitkeep +0 -0
  83. package/agent/patterns/bootstrap.template.md +0 -1237
  84. package/agent/patterns/pattern.template.md +0 -382
  85. package/agent/patterns/tanstack-cloudflare.acl-permissions.md +0 -332
  86. package/agent/patterns/tanstack-cloudflare.action-bar-item.md +0 -416
  87. package/agent/patterns/tanstack-cloudflare.api-route-handlers.md +0 -401
  88. package/agent/patterns/tanstack-cloudflare.auth-session-management.md +0 -387
  89. package/agent/patterns/tanstack-cloudflare.card-and-list.md +0 -271
  90. package/agent/patterns/tanstack-cloudflare.chat-engine.md +0 -353
  91. package/agent/patterns/tanstack-cloudflare.confirmation-tokens.md +0 -346
  92. package/agent/patterns/tanstack-cloudflare.durable-objects-websocket.md +0 -516
  93. package/agent/patterns/tanstack-cloudflare.email-service.md +0 -431
  94. package/agent/patterns/tanstack-cloudflare.expander.md +0 -98
  95. package/agent/patterns/tanstack-cloudflare.fcm-push.md +0 -115
  96. package/agent/patterns/tanstack-cloudflare.firebase-anonymous-sessions.md +0 -441
  97. package/agent/patterns/tanstack-cloudflare.firebase-auth.md +0 -348
  98. package/agent/patterns/tanstack-cloudflare.firebase-firestore.md +0 -550
  99. package/agent/patterns/tanstack-cloudflare.firebase-storage.md +0 -369
  100. package/agent/patterns/tanstack-cloudflare.form-controls.md +0 -145
  101. package/agent/patterns/tanstack-cloudflare.global-search-context.md +0 -93
  102. package/agent/patterns/tanstack-cloudflare.image-carousel.md +0 -126
  103. package/agent/patterns/tanstack-cloudflare.library-services.md +0 -553
  104. package/agent/patterns/tanstack-cloudflare.lightbox.md +0 -169
  105. package/agent/patterns/tanstack-cloudflare.markdown-content.md +0 -115
  106. package/agent/patterns/tanstack-cloudflare.mention-suggestions.md +0 -98
  107. package/agent/patterns/tanstack-cloudflare.modal.md +0 -156
  108. package/agent/patterns/tanstack-cloudflare.nextjs-to-tanstack-routing.md +0 -461
  109. package/agent/patterns/tanstack-cloudflare.notifications-engine.md +0 -151
  110. package/agent/patterns/tanstack-cloudflare.oauth-token-refresh.md +0 -90
  111. package/agent/patterns/tanstack-cloudflare.og-metadata.md +0 -296
  112. package/agent/patterns/tanstack-cloudflare.pagination.md +0 -442
  113. package/agent/patterns/tanstack-cloudflare.pill-input.md +0 -220
  114. package/agent/patterns/tanstack-cloudflare.provider-adapter.md +0 -401
  115. package/agent/patterns/tanstack-cloudflare.rate-limiting.md +0 -323
  116. package/agent/patterns/tanstack-cloudflare.scheduled-tasks.md +0 -338
  117. package/agent/patterns/tanstack-cloudflare.searchable-settings.md +0 -375
  118. package/agent/patterns/tanstack-cloudflare.slide-over.md +0 -129
  119. package/agent/patterns/tanstack-cloudflare.ssr-preload.md +0 -571
  120. package/agent/patterns/tanstack-cloudflare.third-party-api-integration.md +0 -508
  121. package/agent/patterns/tanstack-cloudflare.toast-system.md +0 -142
  122. package/agent/patterns/tanstack-cloudflare.unified-header.md +0 -280
  123. package/agent/patterns/tanstack-cloudflare.user-scoped-collections.md +0 -628
  124. package/agent/patterns/tanstack-cloudflare.websocket-manager.md +0 -237
  125. package/agent/patterns/tanstack-cloudflare.wrangler-configuration.md +0 -358
  126. package/agent/patterns/tanstack-cloudflare.zod-schema-validation.md +0 -336
  127. package/agent/progress.template.yaml +0 -161
  128. package/agent/progress.yaml +0 -145
  129. package/agent/schemas/package.schema.yaml +0 -276
  130. package/agent/scripts/acp.common.sh +0 -1781
  131. package/agent/scripts/acp.install.sh +0 -333
  132. package/agent/scripts/acp.package-create.sh +0 -924
  133. package/agent/scripts/acp.package-info.sh +0 -288
  134. package/agent/scripts/acp.package-install.sh +0 -893
  135. package/agent/scripts/acp.package-list.sh +0 -311
  136. package/agent/scripts/acp.package-publish.sh +0 -420
  137. package/agent/scripts/acp.package-remove.sh +0 -348
  138. package/agent/scripts/acp.package-search.sh +0 -156
  139. package/agent/scripts/acp.package-update.sh +0 -517
  140. package/agent/scripts/acp.package-validate.sh +0 -1018
  141. package/agent/scripts/acp.uninstall.sh +0 -85
  142. package/agent/scripts/acp.version-check-for-updates.sh +0 -98
  143. package/agent/scripts/acp.version-check.sh +0 -47
  144. package/agent/scripts/acp.version-update.sh +0 -176
  145. package/agent/scripts/acp.yaml-parser.sh +0 -985
  146. package/agent/scripts/acp.yaml-validate.sh +0 -205
  147. package/agent/tasks/.gitkeep +0 -0
  148. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-1-initialize-tanstack-start-project.md +0 -210
  149. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-2-implement-data-model-yaml-parser.md +0 -294
  150. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-3-build-server-api-data-loading.md +0 -193
  151. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-4-add-auto-refresh-sse.md +0 -262
  152. package/agent/tasks/milestone-2-dashboard-views-interaction/task-10-polish-integration-testing.md +0 -156
  153. package/agent/tasks/milestone-2-dashboard-views-interaction/task-5-build-dashboard-layout-routing.md +0 -178
  154. package/agent/tasks/milestone-2-dashboard-views-interaction/task-6-build-overview-page.md +0 -141
  155. package/agent/tasks/milestone-2-dashboard-views-interaction/task-7-implement-milestone-table-view.md +0 -153
  156. package/agent/tasks/milestone-2-dashboard-views-interaction/task-8-implement-milestone-tree-view.md +0 -174
  157. package/agent/tasks/milestone-2-dashboard-views-interaction/task-9-implement-search-filtering.md +0 -233
  158. package/agent/tasks/task-1-{title}.template.md +0 -244
  159. package/vitest.config.ts +0 -27
@@ -1,348 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Agent Context Protocol (ACP) Package Remove Script
4
- # Removes installed ACP packages and updates manifest
5
-
6
- set -e
7
-
8
- # Source common utilities
9
- SCRIPT_DIR="$(dirname "$0")"
10
- . "${SCRIPT_DIR}/acp.common.sh"
11
-
12
- # Initialize colors
13
- init_colors
14
-
15
- # Parse arguments
16
- PACKAGE_NAME=""
17
- AUTO_CONFIRM=false
18
- KEEP_MODIFIED=false
19
- GLOBAL_MODE=false
20
-
21
- while [[ $# -gt 0 ]]; do
22
- case $1 in
23
- --global|-g)
24
- GLOBAL_MODE=true
25
- shift
26
- ;;
27
- -y|--yes)
28
- AUTO_CONFIRM=true
29
- shift
30
- ;;
31
- --keep-modified)
32
- KEEP_MODIFIED=true
33
- shift
34
- ;;
35
- *)
36
- PACKAGE_NAME="$1"
37
- shift
38
- ;;
39
- esac
40
- done
41
-
42
- # Check if package name provided
43
- if [ -z "$PACKAGE_NAME" ]; then
44
- echo "${RED}Error: Package name required${NC}"
45
- echo "Usage: $0 [options] <package-name>"
46
- echo ""
47
- echo "Options:"
48
- echo " --global, -g Remove global package"
49
- echo " -y, --yes Skip confirmation prompts"
50
- echo " --keep-modified Keep locally modified files"
51
- echo ""
52
- echo "Example: $0 firebase"
53
- echo "Example: $0 --global firebase"
54
- echo "Example: $0 --keep-modified firebase"
55
- exit 1
56
- fi
57
-
58
- echo "${BLUE}📦 ACP Package Remover${NC}"
59
- echo "========================================"
60
- echo ""
61
-
62
- # Determine manifest file based on mode
63
- if [ "$GLOBAL_MODE" = true ]; then
64
- MANIFEST_FILE="$HOME/.acp/manifest.yaml"
65
- echo "${BLUE}Removing global package: $PACKAGE_NAME${NC}"
66
- echo ""
67
- else
68
- MANIFEST_FILE="./agent/manifest.yaml"
69
- echo "${BLUE}Removing package: $PACKAGE_NAME${NC}"
70
- echo ""
71
- fi
72
-
73
- # Check if manifest exists
74
- if [ ! -f "$MANIFEST_FILE" ]; then
75
- if [ "$GLOBAL_MODE" = true ]; then
76
- die "No global manifest found. No global packages installed."
77
- else
78
- die "No manifest found. No packages installed."
79
- fi
80
- fi
81
-
82
- # Source YAML parser
83
- source_yaml_parser
84
-
85
- # Check if package is installed
86
- if ! package_exists "$PACKAGE_NAME"; then
87
- die "Package not installed: $PACKAGE_NAME"
88
- fi
89
-
90
- # Get package info
91
- version=$(awk -v pkg="$PACKAGE_NAME" '
92
- $0 ~ "^ " pkg ":" { in_pkg=1; next }
93
- in_pkg && /^ [a-z]/ { in_pkg=0 }
94
- in_pkg && /^ package_version:/ { print $2; exit }
95
- ' "$MANIFEST_FILE")
96
-
97
- echo "Package: ${GREEN}$PACKAGE_NAME${NC} ($version)"
98
- echo ""
99
-
100
- # Get installed files
101
- patterns_files=$(awk -v pkg="$PACKAGE_NAME" '
102
- BEGIN { in_pkg=0; in_patterns=0 }
103
- $0 ~ "^ " pkg ":" { in_pkg=1; next }
104
- in_pkg && /^ [a-z]/ { in_pkg=0 }
105
- in_pkg && /^ patterns:/ { in_patterns=1; next }
106
- in_patterns && /^ [a-z]/ { in_patterns=0 }
107
- in_patterns && /^ - name:/ { print $3 }
108
- ' "$MANIFEST_FILE")
109
-
110
- commands_files=$(awk -v pkg="$PACKAGE_NAME" '
111
- BEGIN { in_pkg=0; in_commands=0 }
112
- $0 ~ "^ " pkg ":" { in_pkg=1; next }
113
- in_pkg && /^ [a-z]/ { in_pkg=0 }
114
- in_pkg && /^ commands:/ { in_commands=1; next }
115
- in_commands && /^ [a-z]/ { in_commands=0 }
116
- in_commands && /^ - name:/ { print $3 }
117
- ' "$MANIFEST_FILE")
118
-
119
- designs_files=$(awk -v pkg="$PACKAGE_NAME" '
120
- BEGIN { in_pkg=0; in_designs=0 }
121
- $0 ~ "^ " pkg ":" { in_pkg=1; next }
122
- in_pkg && /^ [a-z]/ { in_pkg=0 }
123
- in_pkg && /^ designs:/ { in_designs=1; next }
124
- in_designs && /^ [a-z]/ { in_designs=0 }
125
- in_designs && /^ - name:/ { print $3 }
126
- ' "$MANIFEST_FILE")
127
-
128
- indices_files=$(awk -v pkg="$PACKAGE_NAME" '
129
- BEGIN { in_pkg=0; in_indices=0 }
130
- $0 ~ "^ " pkg ":" { in_pkg=1; next }
131
- in_pkg && /^ [a-z]/ { in_pkg=0 }
132
- in_pkg && /^ indices:/ { in_indices=1; next }
133
- in_indices && /^ [a-z]/ { in_indices=0 }
134
- in_indices && /^ - name:/ { print $3 }
135
- ' "$MANIFEST_FILE")
136
-
137
- # Get template files with their target paths (name|target)
138
- template_file_entries=$(awk -v pkg="$PACKAGE_NAME" '
139
- BEGIN { in_pkg=0; in_files=0; name="" }
140
- $0 ~ "^ " pkg ":" { in_pkg=1; next }
141
- in_pkg && /^ [a-z]/ { in_pkg=0 }
142
- in_pkg && /^ files:$/ { in_files=1; next }
143
- in_files && /^ [a-z]/ { in_files=0 }
144
- in_files && /^ - name:/ { name=$3 }
145
- in_files && /^ target:/ { $1=""; gsub(/^ +/, ""); print name "|" $0 }
146
- ' "$MANIFEST_FILE")
147
-
148
- # Count files (handle empty strings properly)
149
- if [ -n "$patterns_files" ]; then
150
- patterns_count=$(echo "$patterns_files" | wc -l)
151
- else
152
- patterns_count=0
153
- fi
154
-
155
- if [ -n "$commands_files" ]; then
156
- commands_count=$(echo "$commands_files" | wc -l)
157
- else
158
- commands_count=0
159
- fi
160
-
161
- if [ -n "$designs_files" ]; then
162
- designs_count=$(echo "$designs_files" | wc -l)
163
- else
164
- designs_count=0
165
- fi
166
-
167
- if [ -n "$indices_files" ]; then
168
- indices_count=$(echo "$indices_files" | wc -l)
169
- else
170
- indices_count=0
171
- fi
172
-
173
- if [ -n "$template_file_entries" ]; then
174
- template_files_count=$(echo "$template_file_entries" | wc -l)
175
- else
176
- template_files_count=0
177
- fi
178
-
179
- total_files=$((patterns_count + commands_count + designs_count + indices_count + template_files_count))
180
-
181
- echo "${YELLOW}⚠️ This will remove:${NC}"
182
- [ "$patterns_count" -gt 0 ] && echo " - $patterns_count pattern(s)"
183
- [ "$commands_count" -gt 0 ] && echo " - $commands_count command(s)"
184
- [ "$designs_count" -gt 0 ] && echo " - $designs_count design(s)"
185
- [ "$indices_count" -gt 0 ] && echo " - $indices_count index file(s)"
186
- [ "$template_files_count" -gt 0 ] && echo " - $template_files_count file(s) (installed to project)"
187
- echo ""
188
- echo "Total: $total_files file(s)"
189
- echo ""
190
-
191
- # Check for modified files
192
- modified_files=()
193
- for file in $patterns_files; do
194
- if is_file_modified "$PACKAGE_NAME" "patterns" "$file"; then
195
- modified_files+=("patterns/$file")
196
- fi
197
- done
198
-
199
- for file in $commands_files; do
200
- if is_file_modified "$PACKAGE_NAME" "commands" "$file"; then
201
- modified_files+=("commands/$file")
202
- fi
203
- done
204
-
205
- for file in $designs_files; do
206
- if is_file_modified "$PACKAGE_NAME" "design" "$file"; then
207
- modified_files+=("design/$file")
208
- fi
209
- done
210
-
211
- for file in $indices_files; do
212
- if is_file_modified "$PACKAGE_NAME" "indices" "$file"; then
213
- modified_files+=("index/$file")
214
- fi
215
- done
216
-
217
- # Check template files for modifications
218
- while IFS='|' read -r _fname _ftarget; do
219
- [ -z "$_fname" ] && continue
220
- if [ -n "$_ftarget" ] && is_template_file_modified "$PACKAGE_NAME" "$_fname" "$_ftarget"; then
221
- modified_files+=("files/$_fname → $_ftarget")
222
- fi
223
- done <<< "$template_file_entries"
224
-
225
- if [ ${#modified_files[@]} -gt 0 ]; then
226
- echo "${YELLOW}⚠️ Modified files detected:${NC}"
227
- for file in "${modified_files[@]}"; do
228
- echo " - $file"
229
- done
230
- echo ""
231
-
232
- if [ "$KEEP_MODIFIED" = true ]; then
233
- echo "Modified files will be kept (--keep-modified)"
234
- echo ""
235
- fi
236
- fi
237
-
238
- # Confirm removal
239
- if [ "$AUTO_CONFIRM" = false ]; then
240
- read -p "Remove package '$PACKAGE_NAME'? (y/N) " -n 1 -r
241
- echo
242
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
243
- echo "Removal cancelled"
244
- exit 0
245
- fi
246
- fi
247
-
248
- echo ""
249
- echo "Removing files..."
250
-
251
- # Remove files
252
- removed_count=0
253
- kept_count=0
254
-
255
- for file in $patterns_files; do
256
- if printf '%s\n' "${modified_files[@]}" | grep -q "^patterns/$file$" && [ "$KEEP_MODIFIED" = true ]; then
257
- echo " ${YELLOW}⊙${NC} Kept patterns/$file (modified)"
258
- kept_count=$((kept_count + 1))
259
- else
260
- if [ -f "agent/patterns/$file" ]; then
261
- rm "agent/patterns/$file"
262
- echo " ${GREEN}✓${NC} Removed patterns/$file"
263
- removed_count=$((removed_count + 1))
264
- fi
265
- fi
266
- done
267
-
268
- for file in $commands_files; do
269
- if printf '%s\n' "${modified_files[@]}" | grep -q "^commands/$file$" && [ "$KEEP_MODIFIED" = true ]; then
270
- echo " ${YELLOW}⊙${NC} Kept commands/$file (modified)"
271
- kept_count=$((kept_count + 1))
272
- else
273
- if [ -f "agent/commands/$file" ]; then
274
- rm "agent/commands/$file"
275
- echo " ${GREEN}✓${NC} Removed commands/$file"
276
- removed_count=$((removed_count + 1))
277
- fi
278
- fi
279
- done
280
-
281
- for file in $designs_files; do
282
- if printf '%s\n' "${modified_files[@]}" | grep -q "^design/$file$" && [ "$KEEP_MODIFIED" = true ]; then
283
- echo " ${YELLOW}⊙${NC} Kept design/$file (modified)"
284
- kept_count=$((kept_count + 1))
285
- else
286
- if [ -f "agent/design/$file" ]; then
287
- rm "agent/design/$file"
288
- echo " ${GREEN}✓${NC} Removed design/$file"
289
- removed_count=$((removed_count + 1))
290
- fi
291
- fi
292
- done
293
-
294
- for file in $indices_files; do
295
- if printf '%s\n' "${modified_files[@]}" | grep -q "^index/$file$" && [ "$KEEP_MODIFIED" = true ]; then
296
- echo " ${YELLOW}⊙${NC} Kept index/$file (modified)"
297
- kept_count=$((kept_count + 1))
298
- else
299
- if [ -f "agent/index/$file" ]; then
300
- rm "agent/index/$file"
301
- echo " ${GREEN}✓${NC} Removed index/$file"
302
- removed_count=$((removed_count + 1))
303
- fi
304
- fi
305
- done
306
-
307
- # Remove template files (installed at target paths)
308
- while IFS='|' read -r _fname _ftarget; do
309
- [ -z "$_fname" ] && continue
310
- if printf '%s\n' "${modified_files[@]}" | grep -q "^files/$_fname" && [ "$KEEP_MODIFIED" = true ]; then
311
- echo " ${YELLOW}⊙${NC} Kept $_ftarget (modified)"
312
- kept_count=$((kept_count + 1))
313
- else
314
- if [ -f "$_ftarget" ]; then
315
- rm "$_ftarget"
316
- echo " ${GREEN}✓${NC} Removed $_ftarget (from files/$_fname)"
317
- removed_count=$((removed_count + 1))
318
- fi
319
- fi
320
- done <<< "$template_file_entries"
321
-
322
- # Remove package from manifest
323
- echo ""
324
- echo "Updating manifest..."
325
-
326
- temp_file=$(mktemp)
327
- awk -v pkg="$PACKAGE_NAME" '
328
- BEGIN { in_pkg=0; skip=0 }
329
- $0 ~ "^ " pkg ":" { in_pkg=1; skip=1; next }
330
- in_pkg && /^ [a-z]/ && /:$/ { in_pkg=0; skip=0 }
331
- in_pkg { next }
332
- !skip { print }
333
- ' "$MANIFEST_FILE" > "$temp_file"
334
-
335
- mv "$temp_file" "$MANIFEST_FILE"
336
-
337
- # Update manifest timestamp
338
- update_manifest_timestamp
339
-
340
- echo "${GREEN}✓${NC} Manifest updated"
341
- echo ""
342
- echo "${GREEN}✅ Removal complete!${NC}"
343
- echo ""
344
- echo "Removed: $removed_count file(s)"
345
- if [ $kept_count -gt 0 ]; then
346
- echo "Kept: $kept_count file(s) (modified)"
347
- fi
348
- echo ""
@@ -1,156 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Agent Context Protocol (ACP) Package Search Script
4
- # Search for ACP packages on GitHub using the GitHub API
5
-
6
- # Note: set -e disabled because while loop runs in subshell
7
- # and some commands may return non-zero without being errors
8
- # set -e
9
-
10
- # Source common utilities
11
- SCRIPT_DIR="$(dirname "$0")"
12
- . "${SCRIPT_DIR}/acp.common.sh"
13
-
14
- # Initialize colors
15
- init_colors
16
-
17
- # Parse arguments
18
- QUERY=""
19
- TAG=""
20
- USER=""
21
- ORG=""
22
- SORT="stars"
23
- LIMIT=10
24
-
25
- while [[ $# -gt 0 ]]; do
26
- case $1 in
27
- --tag)
28
- TAG="$2"
29
- shift 2
30
- ;;
31
- --user)
32
- USER="$2"
33
- shift 2
34
- ;;
35
- --org)
36
- ORG="$2"
37
- shift 2
38
- ;;
39
- --sort)
40
- SORT="$2"
41
- shift 2
42
- ;;
43
- --limit)
44
- LIMIT="$2"
45
- shift 2
46
- ;;
47
- *)
48
- QUERY="$1"
49
- shift
50
- ;;
51
- esac
52
- done
53
-
54
- echo "${BLUE}🔍 ACP Package Search${NC}"
55
- echo "========================================"
56
- echo ""
57
-
58
- # Build search query
59
- # Always filter by topic:acp-package to ensure only actual ACP packages are returned
60
- if [ -n "$QUERY" ]; then
61
- SEARCH_QUERY="${QUERY}+topic:acp-package"
62
- else
63
- SEARCH_QUERY="topic:acp-package"
64
- fi
65
-
66
- if [ -n "$TAG" ]; then
67
- SEARCH_QUERY="$SEARCH_QUERY+topic:$TAG"
68
- fi
69
-
70
- if [ -n "$USER" ]; then
71
- SEARCH_QUERY="$SEARCH_QUERY+user:$USER"
72
- fi
73
-
74
- if [ -n "$ORG" ]; then
75
- SEARCH_QUERY="$SEARCH_QUERY+org:$ORG"
76
- fi
77
-
78
- info "Searching GitHub for: $SEARCH_QUERY"
79
- info "Sort by: $SORT"
80
- info "Limit: $LIMIT"
81
- echo ""
82
-
83
- # Search GitHub repositories
84
- GITHUB_API="https://api.github.com/search/repositories"
85
- SEARCH_URL="${GITHUB_API}?q=${SEARCH_QUERY}&sort=${SORT}&per_page=${LIMIT}"
86
-
87
- # Make API request
88
- RESPONSE=$(curl -s -H "Accept: application/vnd.github+json" "$SEARCH_URL")
89
-
90
- # Check for API errors
91
- if echo "$RESPONSE" | grep -q '"message"'; then
92
- ERROR_MSG=$(echo "$RESPONSE" | grep -o '"message":"[^"]*"' | cut -d'"' -f4)
93
- die "GitHub API error: $ERROR_MSG"
94
- fi
95
-
96
- # Parse results (handle spaces in JSON)
97
- TOTAL_COUNT=$(echo "$RESPONSE" | grep -o '"total_count"[: ]*[0-9]*' | grep -o '[0-9]*$')
98
-
99
- if [ -z "$TOTAL_COUNT" ] || [ "$TOTAL_COUNT" -eq 0 ]; then
100
- echo "${YELLOW}No packages found matching your search${NC}"
101
- echo ""
102
- echo "Try:"
103
- echo " - Broader search terms"
104
- echo " - Different tags"
105
- echo " - Removing filters"
106
- exit 0
107
- fi
108
-
109
- echo "${GREEN}📦 Found $TOTAL_COUNT package(s)${NC}"
110
- echo ""
111
-
112
- # Parse and display each result
113
- REPO_COUNT=0
114
-
115
- echo "$RESPONSE" | grep -o '"full_name": "[^"]*"' | cut -d'"' -f4 | while read -r full_name; do
116
- REPO_COUNT=$((REPO_COUNT + 1))
117
-
118
- # Extract repo info from response
119
- REPO_DATA=$(echo "$RESPONSE" | grep -A 20 "\"full_name\":\"$full_name\"")
120
-
121
- DESCRIPTION=$(echo "$REPO_DATA" | grep -o '"description"[: ]*"[^"]*"' | head -1 | sed 's/"description"[: ]*"//' | sed 's/"$//')
122
- STARS=$(echo "$REPO_DATA" | grep -o '"stargazers_count"[: ]*[0-9]*' | head -1 | grep -o '[0-9]*$')
123
- URL="https://github.com/$full_name"
124
-
125
- # Fetch package.yaml to get version and tags
126
- PACKAGE_YAML_URL="https://raw.githubusercontent.com/$full_name/main/package.yaml"
127
- PACKAGE_YAML=$(curl -s "$PACKAGE_YAML_URL" 2>/dev/null)
128
-
129
- if [ -n "$PACKAGE_YAML" ]; then
130
- VERSION=$(echo "$PACKAGE_YAML" | awk '/^version:/ {print $2; exit}')
131
- PACKAGE_NAME=$(echo "$PACKAGE_YAML" | awk '/^name:/ {print $2; exit}')
132
- TAGS=$(echo "$PACKAGE_YAML" | awk '/^tags:/,/^[a-z]/ {if (/^ - /) {gsub(/^ - /, ""); print}}' | tr '\n' ', ' | sed 's/,$//')
133
- else
134
- VERSION="unknown"
135
- PACKAGE_NAME=$(echo "$full_name" | cut -d'/' -f2)
136
- TAGS=""
137
- fi
138
-
139
- # Display result
140
- echo "${GREEN}$REPO_COUNT. $PACKAGE_NAME${NC} (${BLUE}$VERSION${NC}) ⭐ $STARS"
141
- echo " $URL"
142
- if [ -n "$DESCRIPTION" ] && [ "$DESCRIPTION" != "null" ]; then
143
- echo " $DESCRIPTION"
144
- fi
145
- if [ -n "$TAGS" ]; then
146
- echo " Tags: $TAGS"
147
- fi
148
- echo " Install: ./agent/scripts/acp.package-install.sh --repo $URL.git"
149
- echo ""
150
- done
151
-
152
- echo "Showing $REPO_COUNT of $TOTAL_COUNT result(s)"
153
- echo ""
154
- echo "To install a package:"
155
- echo " ./agent/scripts/acp.package-install.sh --repo <repository-url>"
156
- echo ""