devduck 0.6.0__tar.gz → 0.7.0__tar.gz

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.

Potentially problematic release.


This version of devduck might be problematic. Click here for more details.

Files changed (50) hide show
  1. {devduck-0.6.0 → devduck-0.7.0}/PKG-INFO +136 -4
  2. {devduck-0.6.0 → devduck-0.7.0}/README.md +135 -3
  3. {devduck-0.6.0 → devduck-0.7.0}/action.yml +1 -1
  4. {devduck-0.6.0 → devduck-0.7.0}/devduck/__init__.py +356 -158
  5. {devduck-0.6.0 → devduck-0.7.0}/devduck/_version.py +3 -3
  6. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/agentcore_invoke.py +1 -0
  7. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/install_tools.py +103 -2
  8. {devduck-0.6.0 → devduck-0.7.0}/devduck.egg-info/PKG-INFO +136 -4
  9. {devduck-0.6.0 → devduck-0.7.0}/.github/workflows/agent.yml +0 -0
  10. {devduck-0.6.0 → devduck-0.7.0}/.gitignore +0 -0
  11. {devduck-0.6.0 → devduck-0.7.0}/LICENSE +0 -0
  12. {devduck-0.6.0 → devduck-0.7.0}/MANIFEST.in +0 -0
  13. {devduck-0.6.0 → devduck-0.7.0}/agent_runner.py +0 -0
  14. {devduck-0.6.0 → devduck-0.7.0}/devduck/__main__.py +0 -0
  15. {devduck-0.6.0 → devduck-0.7.0}/devduck/agentcore_handler.py +0 -0
  16. {devduck-0.6.0 → devduck-0.7.0}/devduck/test_redduck.py +0 -0
  17. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/__init__.py +0 -0
  18. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/_ambient_input.py +0 -0
  19. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/_tray_app.py +0 -0
  20. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/agentcore_agents.py +0 -0
  21. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/agentcore_config.py +0 -0
  22. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/agentcore_logs.py +0 -0
  23. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/ambient.py +0 -0
  24. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/create_subagent.py +0 -0
  25. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/ipc.py +0 -0
  26. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/mcp_server.py +0 -0
  27. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/state_manager.py +0 -0
  28. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/store_in_kb.py +0 -0
  29. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/system_prompt.py +0 -0
  30. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/tcp.py +0 -0
  31. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/tray.py +0 -0
  32. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/use_github.py +0 -0
  33. {devduck-0.6.0 → devduck-0.7.0}/devduck/tools/websocket.py +0 -0
  34. {devduck-0.6.0 → devduck-0.7.0}/devduck.egg-info/SOURCES.txt +0 -0
  35. {devduck-0.6.0 → devduck-0.7.0}/devduck.egg-info/dependency_links.txt +0 -0
  36. {devduck-0.6.0 → devduck-0.7.0}/devduck.egg-info/entry_points.txt +0 -0
  37. {devduck-0.6.0 → devduck-0.7.0}/devduck.egg-info/requires.txt +0 -0
  38. {devduck-0.6.0 → devduck-0.7.0}/devduck.egg-info/top_level.txt +0 -0
  39. {devduck-0.6.0 → devduck-0.7.0}/docs/index.html +0 -0
  40. {devduck-0.6.0 → devduck-0.7.0}/docs/mac-os-tray.jpg +0 -0
  41. {devduck-0.6.0 → devduck-0.7.0}/pyproject.toml +0 -0
  42. {devduck-0.6.0 → devduck-0.7.0}/requirements.txt +0 -0
  43. {devduck-0.6.0 → devduck-0.7.0}/setup-aws-oidc.sh +0 -0
  44. {devduck-0.6.0 → devduck-0.7.0}/setup.cfg +0 -0
  45. {devduck-0.6.0 → devduck-0.7.0}/test.py +0 -0
  46. {devduck-0.6.0 → devduck-0.7.0}/tools/__init__.py +0 -0
  47. {devduck-0.6.0 → devduck-0.7.0}/tools/fetch_github_tool.py +0 -0
  48. {devduck-0.6.0 → devduck-0.7.0}/tools/gist.py +0 -0
  49. {devduck-0.6.0 → devduck-0.7.0}/tools/github_tools.py +0 -0
  50. {devduck-0.6.0 → devduck-0.7.0}/tools/scraper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devduck
3
- Version: 0.6.0
3
+ Version: 0.7.0
4
4
  Summary: 🦆 Extreme minimalist self-adapting AI agent - one file, self-healing, runtime dependencies
5
5
  Author-email: Cagatay Cali <cagataycali@icloud.com>
6
6
  License: Apache-2.0
@@ -53,6 +53,8 @@ Dynamic: license-file
53
53
 
54
54
  One Python file that adapts to your environment, fixes itself, and expands capabilities at runtime.
55
55
 
56
+ Learn more: https://duck.nyc
57
+
56
58
  ## 🎬 See It In Action
57
59
 
58
60
  | Feature | What You'll See | Video |
@@ -176,7 +178,7 @@ devduck("refactor my code to use async/await")
176
178
 
177
179
  | Provider | Setup | When to Use |
178
180
  |----------|-------|-------------|
179
- | **Bedrock** (auto-detected) | [Get API key](https://console.aws.amazon.com/bedrock) → `export AWS_BEARER_TOKEN_BEDROCK=...` | Production (auto-selected if credentials found) |
181
+ | **Bedrock** (auto-detected) | [Get API key](https://console.aws.amazon.com/bedrock) → `export AWS_BEARER_TOKEN_BEDROCK=...` | Auto-selected if credentials found |
180
182
  | **MLX** (macOS auto-detected) | Auto-detected on Apple Silicon | Local, optimized for M-series Macs |
181
183
  | **Ollama** (fallback) | `ollama pull qwen3:1.7b` | Local, free, private (used if Bedrock/MLX unavailable) |
182
184
  | **Anthropic** | `export ANTHROPIC_API_KEY=...` | Claude API direct access |
@@ -304,22 +306,75 @@ No restart. No configuration. Just works.
304
306
  |----------|---------|---------|
305
307
  | `MODEL_PROVIDER` | Auto-detect | `bedrock`, `anthropic`, `github`, `mlx`, `ollama` |
306
308
  | `STRANDS_MODEL_ID` | Auto | Model name (e.g., `qwen3:1.7b`, `claude-sonnet-4`) |
307
- | `DEVDUCK_TOOLS` | All | `pkg:tool1,tool2:pkg2:tool3` |
309
+ | `DEVDUCK_TOOLS` | 37 default tools | `package:tool1,tool2:package2:tool3` format |
310
+ | `DEVDUCK_LOAD_TOOLS_FROM_DIR` | `false` | `true`/`false` - Auto-load tools from `./tools/` directory |
308
311
  | `DEVDUCK_KNOWLEDGE_BASE_ID` | - | Bedrock KB ID for auto-RAG |
309
312
  | `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
310
313
  | `DEVDUCK_ENABLE_TCP` | `true` | Enable/disable TCP |
311
314
 
312
- **Minimal config (shell + editor only):**
315
+ ### Tool Configuration Format
316
+
317
+ **Format:** `package:tool1,tool2:package2:tool3`
318
+
319
+ **Directory Auto-Loading:**
320
+
321
+ By default, DevDuck **does not** automatically load tools from the `./tools/` directory. This gives you explicit control over which tools are loaded. To enable automatic loading of tools from `./tools/`, set:
322
+
313
323
  ```bash
324
+ export DEVDUCK_LOAD_TOOLS_FROM_DIR=true
325
+ devduck
326
+ ```
327
+
328
+ When enabled, any `.py` file in `./tools/` with a `@tool` decorator will be loaded automatically. When disabled (default), you control tool loading via `DEVDUCK_TOOLS` or runtime `manage_tools()` calls.
329
+
330
+ **Examples:**
331
+ ```bash
332
+ # Minimal (shell + editor only)
314
333
  export DEVDUCK_TOOLS="strands_tools:shell,editor"
334
+
335
+ # Dev tools only
336
+ export DEVDUCK_TOOLS="strands_tools:shell,editor,file_read,file_write,calculator"
337
+
338
+ # Full DevDuck + Strands (no fun tools)
339
+ export DEVDUCK_TOOLS="devduck.tools:tcp,websocket,mcp_server,use_github:strands_tools:shell,editor,file_read"
340
+
341
+ # Custom package
342
+ export DEVDUCK_TOOLS="my_tools:custom_tool,another_tool:strands_tools:shell"
343
+
315
344
  devduck
316
345
  ```
317
346
 
347
+ **Runtime tool management:**
348
+ ```python
349
+ # List loaded tools
350
+ manage_tools(action="list")
351
+
352
+ # Add tools at runtime
353
+ manage_tools(action="add", package="strands_fun_tools", tool_names="cursor,clipboard")
354
+
355
+ # Remove tools
356
+ manage_tools(action="remove", tool_names="cursor,clipboard")
357
+
358
+ # Reload specific tools
359
+ manage_tools(action="reload", tool_names="shell,editor")
360
+
361
+ # Reload all (restart agent)
362
+ manage_tools(action="reload")
363
+ ```
364
+
365
+ **Discover tools before loading:**
366
+ ```python
367
+ # List available tools in a package
368
+ install_tools(action="list_available", package="strands-fun-tools", module="strands_fun_tools")
369
+ ```
370
+
318
371
  ---
319
372
 
320
373
 
321
374
  ## MCP Integration
322
375
 
376
+ ### Expose DevDuck as MCP Server
377
+
323
378
  **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
324
379
  ```json
325
380
  {
@@ -334,6 +389,83 @@ devduck
334
389
 
335
390
  Restart Claude → DevDuck tools appear automatically.
336
391
 
392
+ ### Load External MCP Servers
393
+
394
+ DevDuck can act as an MCP client and load tools from external MCP servers automatically.
395
+
396
+ **Setup:**
397
+ ```bash
398
+ export MCP_SERVERS='{
399
+ "mcpServers": {
400
+ "strands": {
401
+ "command": "uvx",
402
+ "args": ["strands-agents-mcp-server"]
403
+ }
404
+ }
405
+ }'
406
+ devduck
407
+ ```
408
+
409
+ **Supported Transport Types:**
410
+
411
+ | Transport | Configuration | Example |
412
+ |-----------|--------------|---------|
413
+ | **stdio** | `command`, `args`, `env` | Executables via stdin/stdout |
414
+ | **HTTP** | `url`, `headers` | Remote servers via HTTP |
415
+ | **SSE** | `url` (with `/sse` path) | Server-Sent Events streaming |
416
+
417
+ **Examples:**
418
+
419
+ ```bash
420
+ # Stdio server
421
+ export MCP_SERVERS='{
422
+ "mcpServers": {
423
+ "myserver": {
424
+ "command": "python",
425
+ "args": ["server.py"],
426
+ "env": {"API_KEY": "secret"}
427
+ }
428
+ }
429
+ }'
430
+
431
+ # HTTP server
432
+ export MCP_SERVERS='{
433
+ "mcpServers": {
434
+ "remote": {
435
+ "url": "https://api.example.com/mcp",
436
+ "headers": {"Authorization": "Bearer token"}
437
+ }
438
+ }
439
+ }'
440
+
441
+ # SSE server
442
+ export MCP_SERVERS='{
443
+ "mcpServers": {
444
+ "events": {
445
+ "url": "https://api.example.com/sse"
446
+ }
447
+ }
448
+ }'
449
+
450
+ # Multiple servers
451
+ export MCP_SERVERS='{
452
+ "mcpServers": {
453
+ "strands": {
454
+ "command": "uvx",
455
+ "args": ["strands-agents-mcp-server"]
456
+ },
457
+ "remote": {
458
+ "url": "https://api.example.com/mcp"
459
+ }
460
+ }
461
+ }'
462
+
463
+ devduck
464
+ # Tools from all MCP servers automatically available
465
+ ```
466
+
467
+ **Tool Prefixing:** Each MCP server's tools are prefixed with the server name (e.g., `strands_tool_name`)
468
+
337
469
  ---
338
470
 
339
471
  ## Troubleshooting
@@ -6,6 +6,8 @@
6
6
 
7
7
  One Python file that adapts to your environment, fixes itself, and expands capabilities at runtime.
8
8
 
9
+ Learn more: https://duck.nyc
10
+
9
11
  ## 🎬 See It In Action
10
12
 
11
13
  | Feature | What You'll See | Video |
@@ -129,7 +131,7 @@ devduck("refactor my code to use async/await")
129
131
 
130
132
  | Provider | Setup | When to Use |
131
133
  |----------|-------|-------------|
132
- | **Bedrock** (auto-detected) | [Get API key](https://console.aws.amazon.com/bedrock) → `export AWS_BEARER_TOKEN_BEDROCK=...` | Production (auto-selected if credentials found) |
134
+ | **Bedrock** (auto-detected) | [Get API key](https://console.aws.amazon.com/bedrock) → `export AWS_BEARER_TOKEN_BEDROCK=...` | Auto-selected if credentials found |
133
135
  | **MLX** (macOS auto-detected) | Auto-detected on Apple Silicon | Local, optimized for M-series Macs |
134
136
  | **Ollama** (fallback) | `ollama pull qwen3:1.7b` | Local, free, private (used if Bedrock/MLX unavailable) |
135
137
  | **Anthropic** | `export ANTHROPIC_API_KEY=...` | Claude API direct access |
@@ -257,22 +259,75 @@ No restart. No configuration. Just works.
257
259
  |----------|---------|---------|
258
260
  | `MODEL_PROVIDER` | Auto-detect | `bedrock`, `anthropic`, `github`, `mlx`, `ollama` |
259
261
  | `STRANDS_MODEL_ID` | Auto | Model name (e.g., `qwen3:1.7b`, `claude-sonnet-4`) |
260
- | `DEVDUCK_TOOLS` | All | `pkg:tool1,tool2:pkg2:tool3` |
262
+ | `DEVDUCK_TOOLS` | 37 default tools | `package:tool1,tool2:package2:tool3` format |
263
+ | `DEVDUCK_LOAD_TOOLS_FROM_DIR` | `false` | `true`/`false` - Auto-load tools from `./tools/` directory |
261
264
  | `DEVDUCK_KNOWLEDGE_BASE_ID` | - | Bedrock KB ID for auto-RAG |
262
265
  | `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
263
266
  | `DEVDUCK_ENABLE_TCP` | `true` | Enable/disable TCP |
264
267
 
265
- **Minimal config (shell + editor only):**
268
+ ### Tool Configuration Format
269
+
270
+ **Format:** `package:tool1,tool2:package2:tool3`
271
+
272
+ **Directory Auto-Loading:**
273
+
274
+ By default, DevDuck **does not** automatically load tools from the `./tools/` directory. This gives you explicit control over which tools are loaded. To enable automatic loading of tools from `./tools/`, set:
275
+
266
276
  ```bash
277
+ export DEVDUCK_LOAD_TOOLS_FROM_DIR=true
278
+ devduck
279
+ ```
280
+
281
+ When enabled, any `.py` file in `./tools/` with a `@tool` decorator will be loaded automatically. When disabled (default), you control tool loading via `DEVDUCK_TOOLS` or runtime `manage_tools()` calls.
282
+
283
+ **Examples:**
284
+ ```bash
285
+ # Minimal (shell + editor only)
267
286
  export DEVDUCK_TOOLS="strands_tools:shell,editor"
287
+
288
+ # Dev tools only
289
+ export DEVDUCK_TOOLS="strands_tools:shell,editor,file_read,file_write,calculator"
290
+
291
+ # Full DevDuck + Strands (no fun tools)
292
+ export DEVDUCK_TOOLS="devduck.tools:tcp,websocket,mcp_server,use_github:strands_tools:shell,editor,file_read"
293
+
294
+ # Custom package
295
+ export DEVDUCK_TOOLS="my_tools:custom_tool,another_tool:strands_tools:shell"
296
+
268
297
  devduck
269
298
  ```
270
299
 
300
+ **Runtime tool management:**
301
+ ```python
302
+ # List loaded tools
303
+ manage_tools(action="list")
304
+
305
+ # Add tools at runtime
306
+ manage_tools(action="add", package="strands_fun_tools", tool_names="cursor,clipboard")
307
+
308
+ # Remove tools
309
+ manage_tools(action="remove", tool_names="cursor,clipboard")
310
+
311
+ # Reload specific tools
312
+ manage_tools(action="reload", tool_names="shell,editor")
313
+
314
+ # Reload all (restart agent)
315
+ manage_tools(action="reload")
316
+ ```
317
+
318
+ **Discover tools before loading:**
319
+ ```python
320
+ # List available tools in a package
321
+ install_tools(action="list_available", package="strands-fun-tools", module="strands_fun_tools")
322
+ ```
323
+
271
324
  ---
272
325
 
273
326
 
274
327
  ## MCP Integration
275
328
 
329
+ ### Expose DevDuck as MCP Server
330
+
276
331
  **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
277
332
  ```json
278
333
  {
@@ -287,6 +342,83 @@ devduck
287
342
 
288
343
  Restart Claude → DevDuck tools appear automatically.
289
344
 
345
+ ### Load External MCP Servers
346
+
347
+ DevDuck can act as an MCP client and load tools from external MCP servers automatically.
348
+
349
+ **Setup:**
350
+ ```bash
351
+ export MCP_SERVERS='{
352
+ "mcpServers": {
353
+ "strands": {
354
+ "command": "uvx",
355
+ "args": ["strands-agents-mcp-server"]
356
+ }
357
+ }
358
+ }'
359
+ devduck
360
+ ```
361
+
362
+ **Supported Transport Types:**
363
+
364
+ | Transport | Configuration | Example |
365
+ |-----------|--------------|---------|
366
+ | **stdio** | `command`, `args`, `env` | Executables via stdin/stdout |
367
+ | **HTTP** | `url`, `headers` | Remote servers via HTTP |
368
+ | **SSE** | `url` (with `/sse` path) | Server-Sent Events streaming |
369
+
370
+ **Examples:**
371
+
372
+ ```bash
373
+ # Stdio server
374
+ export MCP_SERVERS='{
375
+ "mcpServers": {
376
+ "myserver": {
377
+ "command": "python",
378
+ "args": ["server.py"],
379
+ "env": {"API_KEY": "secret"}
380
+ }
381
+ }
382
+ }'
383
+
384
+ # HTTP server
385
+ export MCP_SERVERS='{
386
+ "mcpServers": {
387
+ "remote": {
388
+ "url": "https://api.example.com/mcp",
389
+ "headers": {"Authorization": "Bearer token"}
390
+ }
391
+ }
392
+ }'
393
+
394
+ # SSE server
395
+ export MCP_SERVERS='{
396
+ "mcpServers": {
397
+ "events": {
398
+ "url": "https://api.example.com/sse"
399
+ }
400
+ }
401
+ }'
402
+
403
+ # Multiple servers
404
+ export MCP_SERVERS='{
405
+ "mcpServers": {
406
+ "strands": {
407
+ "command": "uvx",
408
+ "args": ["strands-agents-mcp-server"]
409
+ },
410
+ "remote": {
411
+ "url": "https://api.example.com/mcp"
412
+ }
413
+ }
414
+ }'
415
+
416
+ devduck
417
+ # Tools from all MCP servers automatically available
418
+ ```
419
+
420
+ **Tool Prefixing:** Each MCP server's tools are prefixed with the server name (e.g., `strands_tool_name`)
421
+
290
422
  ---
291
423
 
292
424
  ## Troubleshooting
@@ -130,7 +130,7 @@ runs:
130
130
  - name: Install DevDuck
131
131
  shell: bash
132
132
  run: |
133
- uv pip install --system -r requirements.txt --quiet
133
+ uv pip install devduck --system --quiet
134
134
 
135
135
  - name: Configure Git
136
136
  shell: bash