aios-core 3.4.0 → 3.5.0

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.
@@ -166,11 +166,47 @@ docker mcp catalog info {mcp-name}
166
166
  ### 3. Add MCP Server
167
167
 
168
168
  ```bash
169
- # Add the server
170
- docker mcp server add {mcp-name}
169
+ # Enable the server
170
+ docker mcp server enable {mcp-name}
171
+ ```
172
+
173
+ ### 3.1 Configure Credentials (CRITICAL - Known Bug Workaround)
174
+
175
+ ⚠️ **BUG:** Docker MCP Toolkit's secrets store and template interpolation (`{{...}}`) do NOT work properly. Credentials set via `docker mcp secret set` are not passed to containers.
176
+
177
+ **WORKAROUND:** Edit the catalog file directly to hardcode env values.
178
+
179
+ ```yaml
180
+ # Edit: ~/.docker/mcp/catalogs/docker-mcp.yaml
181
+ # Find your MCP entry and add/modify the env section:
182
+
183
+ {mcp-name}:
184
+ # ... other config ...
185
+ env:
186
+ - name: {ENV_VAR_NAME}
187
+ value: '{actual-api-key-value}'
188
+ - name: TOOLS
189
+ value: 'tool1,tool2,tool3'
190
+ ```
191
+
192
+ **Example for Apify:**
193
+ ```yaml
194
+ apify-mcp-server:
195
+ env:
196
+ - name: TOOLS
197
+ value: 'actors,docs,apify/rag-web-browser'
198
+ - name: APIFY_TOKEN
199
+ value: 'apify_api_xxxxxxxxxxxxx'
200
+ ```
171
201
 
172
- # With environment variable
173
- docker mcp server add {mcp-name} --env NOTION_API_KEY=${NOTION_API_KEY}
202
+ **Security Note:** This exposes credentials in a local file. Ensure:
203
+ 1. `~/.docker/mcp/catalogs/` is not committed to any repo
204
+ 2. File permissions restrict access to current user only
205
+
206
+ **Alternative (if secrets work in future):**
207
+ ```bash
208
+ # Set secret (currently NOT working)
209
+ docker mcp secret set {mcp-name}.{credential_name}={value}
174
210
  ```
175
211
 
176
212
  ### 4. Update Gordon Config (Optional)
@@ -208,6 +244,50 @@ docker mcp preset update {preset-name} --add-server {mcp-name}
208
244
  docker mcp preset create {new-preset} --servers fs,github,{mcp-name}
209
245
  ```
210
246
 
247
+ ### 7. Update AIOS Documentation (REQUIRED)
248
+
249
+ Add the new MCP to `.claude/rules/mcp-usage.md`:
250
+
251
+ ```markdown
252
+ ## {MCP-Name} MCP Usage (via Docker)
253
+
254
+ ### Use {MCP-Name} for:
255
+ 1. [Primary use case 1]
256
+ 2. [Primary use case 2]
257
+
258
+ ### Access pattern:
259
+ \`\`\`
260
+ mcp__docker-gateway__{tool-name-1}
261
+ mcp__docker-gateway__{tool-name-2}
262
+ \`\`\`
263
+ ```
264
+
265
+ Also update the table in "Inside Docker Desktop (via docker-gateway)" section.
266
+
267
+ ### 8. Notify User About Session Restart (CRITICAL)
268
+
269
+ ⚠️ **The user MUST restart their Claude Code session** for new MCP tools to be available.
270
+
271
+ ```text
272
+ IMPORTANT: New MCP tools will NOT be available until you:
273
+ 1. Close this Claude Code session
274
+ 2. Open a new Claude Code session: `claude`
275
+
276
+ The docker-gateway caches tools at startup. New tools only appear after restart.
277
+ ```
278
+
279
+ ### 9. Verify Tools Available in New Session
280
+
281
+ After user restarts Claude Code, verify tools are accessible:
282
+
283
+ ```bash
284
+ # In new Claude Code session, ask an agent to use the new MCP
285
+ @analyst Use the {mcp-name} tool to [perform some action]
286
+
287
+ # Expected: Agent should see and use mcp__docker-gateway__{tool-name}
288
+ # If not visible: Check docker mcp server list and docker mcp tools ls
289
+ ```
290
+
211
291
  ---
212
292
 
213
293
  ## Post-Conditions
@@ -220,13 +300,27 @@ post-conditions:
220
300
  validacao: docker mcp server list includes new MCP
221
301
  error_message: "MCP addition failed"
222
302
 
223
- - [ ] Tools available
303
+ - [ ] Tools available in Docker MCP
224
304
  tipo: post-condition
225
305
  blocker: true
226
306
  validacao: docker mcp tools ls shows MCP tools
227
307
  error_message: "MCP tools not available - check credentials"
308
+
309
+ - [ ] AIOS documentation updated
310
+ tipo: post-condition
311
+ blocker: true
312
+ validacao: .claude/rules/mcp-usage.md includes new MCP
313
+ error_message: "Update mcp-usage.md with new MCP documentation"
314
+
315
+ - [ ] User notified about session restart
316
+ tipo: post-condition
317
+ blocker: true
318
+ validacao: User informed to restart Claude Code session
319
+ error_message: "Notify user: tools only available after session restart"
228
320
  ```
229
321
 
322
+ **CRITICAL NOTE:** Tools added to Docker MCP Toolkit are NOT immediately available to AIOS agents. The docker-gateway caches tools at Claude Code startup. User MUST restart their Claude Code session for new tools to appear.
323
+
230
324
  ---
231
325
 
232
326
  ## Error Handling
@@ -240,13 +334,19 @@ Resolution:
240
334
  3. Check if MCP is in the registry: https://github.com/modelcontextprotocol/registry
241
335
  ```
242
336
 
243
- ### Error: Credentials Missing
337
+ ### Error: Credentials Missing / Tools Not Loading
244
338
 
245
- ```
246
- Resolution:
247
- 1. Set environment variable: export NOTION_API_KEY=your_key
248
- 2. Add to .env file: NOTION_API_KEY=your_key
249
- 3. Pass directly: docker mcp server add notion --env NOTION_API_KEY=key
339
+ ```text
340
+ Resolution (Due to Known Bug):
341
+ 1. Edit catalog directly: ~/.docker/mcp/catalogs/docker-mcp.yaml
342
+ 2. Add hardcoded env values in the MCP's env section
343
+ 3. Verify with: docker mcp tools ls --verbose
344
+ 4. Check output shows "(N tools)" not "(N prompts)"
345
+
346
+ If still showing only prompts:
347
+ - Token may be invalid
348
+ - TOOLS env var may be wrong
349
+ - MCP may need specific configuration
250
350
  ```
251
351
 
252
352
  ### Error: MCP Fails to Start
@@ -302,7 +402,7 @@ Next steps:
302
402
 
303
403
  ```yaml
304
404
  task: add-mcp
305
- version: 1.1.0
405
+ version: 1.3.0
306
406
  story: Story 6.14 - MCP Governance Consolidation
307
407
  dependencies:
308
408
  - Docker MCP Toolkit
@@ -313,10 +413,21 @@ tags:
313
413
  - docker
314
414
  - dynamic
315
415
  created_at: 2025-12-08
316
- updated_at: 2025-12-17
416
+ updated_at: 2025-12-23
317
417
  agents:
318
418
  - devops
319
419
  changelog:
420
+ 1.3.0:
421
+ - Added: Step 3.1 documenting Docker MCP secrets/template bug
422
+ - Added: Workaround using catalog file direct edit
423
+ - Updated: Error handling for credentials issues
424
+ - Fixed: Apify MCP now working with 7 tools
425
+ - Note: Bug affects all MCPs requiring authentication
426
+ 1.2.0:
427
+ - Added: Steps 7-9 for AIOS documentation and session restart
428
+ - Added: Post-conditions for documentation update and user notification
429
+ - Added: Critical note about docker-gateway tool caching
430
+ - Fixed: Tools not appearing in AIOS agents after MCP addition
320
431
  1.1.0:
321
432
  - Changed: DevOps Agent now exclusive responsible (Story 6.14)
322
433
  - Removed: Dev Agent from agents list
@@ -1,9 +1,9 @@
1
1
  # Setup Docker MCP Toolkit
2
2
 
3
3
  **Task ID:** setup-mcp-docker
4
- **Version:** 2.1.0
4
+ **Version:** 2.2.0
5
5
  **Created:** 2025-12-08
6
- **Updated:** 2025-12-17
6
+ **Updated:** 2025-12-23
7
7
  **Agent:** @devops (Gage)
8
8
 
9
9
  ---
@@ -369,12 +369,47 @@ docker mcp server enable exa
369
369
  # Set user home directory for desktop-commander
370
370
  docker mcp config write "desktop-commander:
371
371
  paths:
372
- - ${HOME}
372
+ - ${HOME}"
373
+ ```
374
+
375
+ ### 4.1 Configure API Keys (CRITICAL - Known Bug Workaround)
376
+
377
+ ⚠️ **BUG:** Docker MCP Toolkit's secrets store and template interpolation do NOT work properly. Credentials set via `docker mcp secret set` or `config.yaml apiKeys` are not passed to containers for MCPs with strict config schemas.
378
+
379
+ **WORKAROUND:** Edit the catalog file directly to hardcode env values.
380
+
381
+ ```yaml
382
+ # Edit: ~/.docker/mcp/catalogs/docker-mcp.yaml
383
+ # Find the MCP entry and add/modify the env section:
384
+
385
+ # Example for EXA (already working via apiKeys - no change needed):
373
386
  exa:
374
387
  apiKeys:
375
- EXA_API_KEY: \${EXA_API_KEY}"
388
+ EXA_API_KEY: your-actual-api-key
389
+
390
+ # Example for Apify (requires catalog edit):
391
+ apify-mcp-server:
392
+ env:
393
+ - name: TOOLS
394
+ value: 'actors,docs,apify/rag-web-browser'
395
+ - name: APIFY_TOKEN
396
+ value: 'your-actual-apify-token'
376
397
  ```
377
398
 
399
+ **Security Note:** This exposes credentials in a local file. Ensure:
400
+ 1. `~/.docker/mcp/catalogs/` is not committed to any repo
401
+ 2. File permissions restrict access to current user only
402
+
403
+ **Alternative config.yaml (works for some MCPs like EXA):**
404
+ ```yaml
405
+ # ~/.docker/mcp/config.yaml
406
+ exa:
407
+ apiKeys:
408
+ EXA_API_KEY: your-api-key
409
+ ```
410
+
411
+ See `*add-mcp` task (Step 3.1) for detailed instructions.
412
+
378
413
  ### 5. Configure Claude Code (HTTP Transport)
379
414
 
380
415
  **IMPORTANT:** Use HTTP type, NOT stdio!
@@ -557,7 +592,7 @@ token_usage: ~500-1,000 tokens (this task only)
557
592
 
558
593
  ```yaml
559
594
  story: Story 6.14 - MCP Governance Consolidation
560
- version: 2.1.0
595
+ version: 2.2.0
561
596
  dependencies:
562
597
  - Docker Desktop 4.50+
563
598
  - Docker MCP Toolkit
@@ -569,10 +604,15 @@ tags:
569
604
  - setup
570
605
  - http-transport
571
606
  created_at: 2025-12-08
572
- updated_at: 2025-12-17
607
+ updated_at: 2025-12-23
573
608
  agents:
574
609
  - devops
575
610
  changelog:
611
+ 2.2.0:
612
+ - Added: Step 4.1 documenting Docker MCP secrets bug
613
+ - Added: Workaround using catalog file direct edit
614
+ - Updated: Clarified which MCPs need catalog edit vs config.yaml
615
+ - Fixed: Apify and similar MCPs now configurable
576
616
  2.1.0:
577
617
  - Changed: DevOps Agent now exclusive responsible (Story 6.14)
578
618
  - Removed: Dev Agent from agents list
@@ -3,63 +3,165 @@ task: Download Squad
3
3
  responsavel: "@squad-creator"
4
4
  responsavel_type: agent
5
5
  atomic_layer: task
6
- status: placeholder
6
+ status: active
7
7
  sprint: 8
8
+ story: SQS-6
8
9
  Entrada: |
9
- - name: Nome do squad para baixar
10
- - source: Fonte (aios-squads | synkra-api)
10
+ - squad_name: Nome do squad para baixar (obrigatório)
11
+ - version: Versão específica (opcional, default: latest)
12
+ - list: Flag para listar squads disponíveis (--list)
13
+ - overwrite: Flag para sobrescrever squad existente (--overwrite)
11
14
  Saida: |
12
15
  - squad_path: Caminho do squad baixado
13
- - status: Sucesso ou erro
16
+ - manifest: Manifest do squad
17
+ - validation_result: Resultado da validação
14
18
  Checklist:
15
- - "[ ] Implementar em Sprint 8 (SQS-5)"
19
+ - "[ ] Verificar se existe localmente"
20
+ - "[ ] Buscar no registry.json"
21
+ - "[ ] Baixar arquivos do GitHub"
22
+ - "[ ] Extrair para ./squads/{name}/"
23
+ - "[ ] Validar squad baixado"
24
+ - "[ ] Exibir próximos passos"
16
25
  ---
17
26
 
18
27
  # *download-squad
19
28
 
20
- > **PLACEHOLDER** - Implementation scheduled for Sprint 8 (Story SQS-5)
29
+ Downloads public squads from the aios-squads GitHub repository to use in your project.
21
30
 
22
- ## Planned Functionality
31
+ ## Usage
23
32
 
24
- Downloads a public squad from the aios-squads repository or Synkra API marketplace.
33
+ ```bash
34
+ @squad-creator
35
+
36
+ # List available squads
37
+ *download-squad --list
38
+
39
+ # Download a squad
40
+ *download-squad etl-squad
25
41
 
26
- ## Planned Usage
42
+ # Download specific version
43
+ *download-squad etl-squad@2.0.0
27
44
 
45
+ # Overwrite existing
46
+ *download-squad etl-squad --overwrite
28
47
  ```
29
- @squad-creator
30
48
 
49
+ ## Examples
50
+
51
+ ### List Available Squads
52
+
53
+ ```
54
+ *download-squad --list
55
+
56
+ Available Squads (from aios-squads):
57
+
58
+ Official:
59
+ ├── etl-squad@1.0.0 - ETL pipeline automation
60
+ ├── api-squad@1.2.0 - REST API development
61
+ └── devops-squad@1.0.0 - CI/CD automation
62
+
63
+ Community:
64
+ ├── data-viz-squad@0.5.0 - Data visualization
65
+ └── ml-squad@0.3.0 - Machine learning pipelines
66
+ ```
67
+
68
+ ### Download Squad
69
+
70
+ ```
31
71
  *download-squad etl-squad
32
- # → Downloads from github.com/SynkraAI/aios-squads
33
72
 
34
- *download-squad premium-pack --source synkra-api
35
- # → Downloads from api.synkra.dev/squads (requires auth)
73
+ Downloading: etl-squad@1.0.0
74
+ Source: github.com/SynkraAI/aios-squads/packages/etl-squad
75
+ Target: ./squads/etl-squad/
76
+
77
+ ✓ Downloaded 12 files
78
+ ✓ Validated successfully
79
+
80
+ Squad installed! Next steps:
81
+ 1. Review: cat squads/etl-squad/squad.yaml
82
+ 2. Activate: @squad-creator *activate etl-squad
36
83
  ```
37
84
 
38
- ## Planned Features
85
+ ## Options
39
86
 
40
- 1. **Repository Source (Default)**
41
- - Clone from github.com/SynkraAI/aios-squads
42
- - Support specific versions via tags
43
- - Validate squad before installation
87
+ | Option | Description |
88
+ |--------|-------------|
89
+ | `--list` | List all available squads from registry |
90
+ | `--version` | Download specific version (e.g., @2.0.0) |
91
+ | `--overwrite` | Overwrite if squad already exists locally |
92
+ | `--verbose` | Show detailed download progress |
44
93
 
45
- 2. **Synkra API Source**
46
- - Download from api.synkra.dev/squads
47
- - Support premium/paid squads
48
- - Require authentication
94
+ ## How It Works
49
95
 
50
- 3. **Installation**
51
- - Install to ./squads/{name}/
52
- - Run validation after download
53
- - Show usage instructions
96
+ ```
97
+ 1. Fetch registry.json from aios-squads
98
+ ├── Contains official and community squads
99
+ └── Includes version and metadata
54
100
 
55
- ## Related Story
101
+ 2. Find requested squad
102
+ ├── Search official squads first
103
+ └── Then community squads
56
104
 
57
- - **SQS-5:** SquadSyncService (Sprint 8)
58
- - **SQS-6:** Registry Integration (Sprint 8)
105
+ 3. Download via GitHub API
106
+ ├── Get directory listing
107
+ └── Download each file recursively
59
108
 
60
- ## Current Status
109
+ 4. Validate downloaded squad
110
+ ├── Run SquadValidator
111
+ └── Report warnings/errors
112
+
113
+ 5. Load manifest
114
+ └── Confirm installation
115
+ ```
116
+
117
+ ## Registry Structure
118
+
119
+ The registry.json in aios-squads contains:
120
+
121
+ ```json
122
+ {
123
+ "version": "1.0.0",
124
+ "squads": {
125
+ "official": [
126
+ {
127
+ "name": "etl-squad",
128
+ "version": "1.0.0",
129
+ "description": "ETL pipeline automation",
130
+ "author": "SynkraAI"
131
+ }
132
+ ],
133
+ "community": [
134
+ {
135
+ "name": "data-viz-squad",
136
+ "version": "0.5.0",
137
+ "description": "Data visualization",
138
+ "author": "community-member"
139
+ }
140
+ ]
141
+ }
142
+ }
143
+ ```
61
144
 
62
- This task is a placeholder. The full implementation will be done in Sprint 8.
145
+ ## Error Handling
146
+
147
+ | Error | Cause | Solution |
148
+ |-------|-------|----------|
149
+ | `SQUAD_NOT_FOUND` | Squad not in registry | Check available squads with --list |
150
+ | `SQUAD_EXISTS` | Already downloaded | Use --overwrite flag |
151
+ | `REGISTRY_FETCH_ERROR` | Network issue | Check connection |
152
+ | `RATE_LIMIT` | GitHub API limit | Set GITHUB_TOKEN env var |
153
+
154
+ ## Implementation
155
+
156
+ Uses `SquadDownloader` class from:
157
+ - `.aios-core/development/scripts/squad/squad-downloader.js`
158
+
159
+ ## Related Tasks
160
+
161
+ - `*validate-squad` - Validate downloaded squad
162
+ - `*publish-squad` - Publish your squad to registry
163
+ - `*create-squad` - Create new local squad
164
+
165
+ ## Related Story
63
166
 
64
- For now, manually clone squads from:
65
- - https://github.com/SynkraAI/aios-squads
167
+ - **SQS-6:** Download & Publish Tasks (Sprint 8)