Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
eecc6c8
refactor(mcp): update mcp client and utilities
matthewhand Mar 27, 2025
25e1a86
refactor(core): update core functionality, chat completion, settings,…
matthewhand Mar 27, 2025
00c3373
test: update additional tests for core and view changes
matthewhand Mar 27, 2025
cc6e81c
refactor(config): update config loader and pyproject.toml settings
matthewhand Mar 27, 2025
3458f36
test: update configuration loader tests
matthewhand Mar 27, 2025
8eab58b
refactor(blueprint): update interactive mode and output utilities in …
matthewhand Mar 27, 2025
f593b62
refactor(core/config): further update core functionality and config l…
matthewhand Mar 27, 2025
a3498bf
refactor(mcp): refine MCP cache, client, and tool provider
matthewhand Mar 27, 2025
2e9d7e0
pls git status and diff
matthewhand Mar 27, 2025
196d94b
refactor(blueprint-university): apply nest_asyncio patch; update logg…
matthewhand Mar 27, 2025
77eeb8a
refactor(blueprint-base): improve asynchronous agent handling, messag…
matthewhand Mar 27, 2025
369077d
refactor(django): enhance local settings loading and dynamic URL regi…
matthewhand Mar 27, 2025
587123a
refactor(mcp-demo): replace dummy MCP classes with openai-agents MCP …
matthewhand Mar 28, 2025
4cc9610
fix(config-loader): update test_config_loader.py to resolve dummy key…
matthewhand Mar 28, 2025
fb3e57c
chore: remove backup .bak files
matthewhand Mar 28, 2025
f6d4f98
docs: update README with repurposing details for openai-agents framework
matthewhand Mar 28, 2025
86f2673
docs: update README with blueprint and config walkthrough
matthewhand Mar 28, 2025
ec0ac22
chore: update pytest.ini configuration for test collection
matthewhand Mar 28, 2025
73c763b
chore: update swarm settings
matthewhand Mar 28, 2025
f24d52a
chore: remove obsolete tests/conftest.py
matthewhand Mar 28, 2025
d5008e1
chore: add run_tests.py helper script
matthewhand Mar 28, 2025
7164445
tests: add integration test for mcp_demo blueprint execution
matthewhand Mar 28, 2025
bed4a04
tests: add/update unit tests for BlueprintBase functionality
matthewhand Mar 28, 2025
91e655f
refactor: streamline tests and blueprint modules, remove obsolete tes…
matthewhand Mar 28, 2025
722db18
refactor(blueprint-echocraft): simplify echo tool and update imports
matthewhand Mar 29, 2025
458cb42
refactor(blueprint-gaggle): improve agent definitions and safety checks
matthewhand Mar 29, 2025
30b3dbf
refactor(blueprint-nebula-shellz): align agent delegation and update …
matthewhand Mar 29, 2025
af73a90
refactor(blueprint-rue-code): modernize agent delegation and file ops
matthewhand Mar 29, 2025
e99c9fd
refactor(blueprint-base): enhance config merging and MCP server handling
matthewhand Mar 29, 2025
ea6ac59
chore(tests): remove obsolete blueprint base tests
matthewhand Mar 29, 2025
ea8453c
refactor(blueprint-mcp_demo): update imports and add ClassVar for met…
matthewhand Mar 29, 2025
6ce2bfb
chore(tests): update CLI test configurations and add skip markers
matthewhand Mar 29, 2025
bc1f56e
chore: finalize pending modifications across blueprints and blueprint…
matthewhand Mar 29, 2025
0b5f3e3
test(unit): add missing unit test files for blueprint base configuration
matthewhand Mar 29, 2025
36622a4
refactor(blueprint-nebula-shellz): remove deprecated legacy files and…
matthewhand Mar 29, 2025
1cfe2f7
refactor(blueprint-base): review and finalize updates to blueprint_ba…
matthewhand Mar 29, 2025
4040a86
refactor(blueprint-rue-code): finalize updates to blueprint_rue_code.py
matthewhand Mar 29, 2025
0b68f78
feat: expand git functionalities with enhanced error handling and age…
matthewhand Mar 29, 2025
2336fba
Refactor: Update BurntNoodles BP, BaseClass logging, add tests
matthewhand Mar 29, 2025
b3b6cfd
Refactor: Remove Django dependency from DilbotUniverse BP, use SQLite
matthewhand Mar 29, 2025
d66bda7
Refactor: Uplift story-writing Gaggle blueprint to BlueprintBase
matthewhand Mar 29, 2025
d88be1f
Refactor: Uplift DivineOps blueprint to BlueprintBase
matthewhand Mar 29, 2025
1c32b80
Refactor: Uplift FamilyTies blueprint to BlueprintBase
matthewhand Mar 29, 2025
aaa9eb3
Feat: Add MCP server descriptions & startup timeout
matthewhand Mar 29, 2025
32b3006
refactor(blueprint-echocraft): integrate advanced LLM model configura…
matthewhand Mar 29, 2025
f2e8fec
refactor(blueprint-mcp_demo): enhance MCP integration and expand agen…
matthewhand Mar 29, 2025
5216903
feat(blueprint-unapologetic-press): overhaul poetic agent swarm with …
matthewhand Mar 29, 2025
acf4a2c
test(blueprints): add/update unit tests for EchoCraft, MCPDemo, and U…
matthewhand Mar 29, 2025
57125d4
Refactor: Uplift WhiskeyTangoFoxtrot BP to use BlueprintBase, SQLite,…
matthewhand Mar 29, 2025
7114a98
Refactor: Uplift Suggestion blueprint to BlueprintBase
matthewhand Mar 29, 2025
7e0427c
Refactor: Uplift MonkaiMagic blueprint to BlueprintBase
matthewhand Mar 29, 2025
db701d6
Refactor: Uplift Gotchaman blueprint to BlueprintBase
matthewhand Mar 29, 2025
e9eb34f
Feat: Add MCP descriptions to config, add env var check
matthewhand Mar 29, 2025
e3dde51
feat(blueprint-extension): add CLI handler, config loader, and MCP ma…
matthewhand Mar 30, 2025
7fd5304
refactor(echocraft): update blueprint implementation and tests
matthewhand Mar 30, 2025
50d188b
chore(config): update swarm configuration and test coverage
matthewhand Mar 30, 2025
6bd1f9f
refactor(echocraft): update blueprint implementation and tests
matthewhand Mar 30, 2025
262595e
chore(config): update project configuration and launcher tests
matthewhand Mar 30, 2025
7a08ed4
refactor(blueprint-extension): update blueprint core files and tests
matthewhand Mar 30, 2025
88e9d69
chore(blueprint): remove deprecated modules
matthewhand Mar 30, 2025
73db2da
test: add conftest file
matthewhand Mar 30, 2025
f5e3639
chore: update blueprint base implementation and test configuration
matthewhand Mar 30, 2025
ca33130
refactor(blueprint): update Echocraft blueprint and related components
matthewhand Mar 30, 2025
8c84074
chore(config): update project configuration and core modules
matthewhand Mar 30, 2025
853e868
feat(views): enhance chat and core views functionality
matthewhand Mar 30, 2025
5e89e3b
chore(cleanup): remove obsolete agent module
matthewhand Mar 30, 2025
50b2290
feat(new): add Django Chatbot application and supplementary modules
matthewhand Mar 30, 2025
f8fcc07
chore(docker): update Dockerfile and docker-compose configurations
matthewhand Mar 30, 2025
3a74600
chore(pytest): update pytest configuration
matthewhand Mar 30, 2025
00aa629
refactor(auth): update async authentication handling
matthewhand Mar 30, 2025
6a44a06
refactor(permissions): update permission validations
matthewhand Mar 30, 2025
b7f9c8f
refactor(serializers): update chat completion serializers validation
matthewhand Mar 30, 2025
00ec617
chore(settings): update Django settings and configuration
matthewhand Mar 30, 2025
b3160a6
refactor(views): enhance chat view async handling and streaming respo…
matthewhand Mar 30, 2025
f4793ef
test(api): update chat completions API tests
matthewhand Mar 30, 2025
d7abb04
test(api): add failing chat completions test for error scenarios
matthewhand Mar 30, 2025
d956f52
chore(blueprints): remove obsolete blueprint files
matthewhand Mar 30, 2025
6ef9f77
chore(config): update pyproject.toml settings
matthewhand Mar 30, 2025
1b7f6b0
refactor(launchers): update swarm CLI launcher integration and relate…
matthewhand Mar 30, 2025
99b1c6f
feat(blueprints): add new swarm blueprint definitions
matthewhand Mar 30, 2025
26f9924
chore(config): update configuration files (pyproject.toml, pytest.ini…
matthewhand Mar 30, 2025
5eccdc6
refactor(auth): update asynchronous authentication handling
matthewhand Mar 30, 2025
fc47417
refactor(serializers): update chat completion serializers validation
matthewhand Mar 30, 2025
7a7fdbe
refactor(views): enhance chat view async handling and streaming respo…
matthewhand Mar 30, 2025
c564c86
chore(tests): cleanup obsolete API tests and update test fixtures
matthewhand Mar 30, 2025
143b965
chore(tests): remove obsolete API tests
matthewhand Mar 30, 2025
8f39cad
test(api): add new async chat completions tests
matthewhand Mar 30, 2025
5edf244
chore(gitignore): add db.sqlite3-wal to ignore list
matthewhand Mar 30, 2025
e954b5a
chore(config): update project configuration (pyproject.toml)
matthewhand Mar 30, 2025
de2bd88
refactor(auth): finalize authentication and permissions updates
matthewhand Mar 30, 2025
600c260
chore: update remaining configuration, URL, views, and tests
matthewhand Mar 30, 2025
561c9b6
chore: commit remaining changes
matthewhand Mar 30, 2025
51391ac
refactor(serializers): update message and chat request validations
matthewhand Mar 30, 2025
be839b7
chore(urls): update API and schema URL patterns
matthewhand Mar 30, 2025
ace2e8f
refactor(views): enhance async handling and SSE output in chat_views.py
matthewhand Mar 30, 2025
9c61acd
test(api): update async chat completions tests
matthewhand Mar 30, 2025
80bb294
refactor(tests): update blueprint base configuration tests
matthewhand Mar 30, 2025
5d391ec
chore(urls): update API URL patterns and import ModelsListView
matthewhand Mar 30, 2025
7850036
refactor(api_views): update API view for models listing and schema in…
matthewhand Mar 30, 2025
08426ad
docs: update documentation in DEVELOPMENT.md, README.md, and USERGUID…
matthewhand Mar 30, 2025
e12f987
docs: add docker-compose.override.yaml.example
matthewhand Mar 30, 2025
533e67f
chore(gitignore): add docker-compose.override.yml to ignore list
matthewhand Mar 30, 2025
738a40c
docs: refine documentation updates in DEVELOPMENT.md, README.md, and …
matthewhand Mar 30, 2025
fffb35b
docs: finalize documentation updates
matthewhand Mar 30, 2025
dca540f
refactor(api): update authentication and chat views; update tests and…
matthewhand Mar 30, 2025
8721eba
ci: update python-pytest.yml
matthewhand Mar 30, 2025
e4e5e60
refactor(api): update authentication and chat views; update API valid…
matthewhand Mar 30, 2025
24e5e99
fix(docs): MCP def
matthewhand Mar 30, 2025
b345ae0
chore: update pytest.ini configuration
matthewhand Mar 30, 2025
f684077
chore: update pyproject.toml
matthewhand Mar 30, 2025
1894838
chore: update fly.toml with DJANGO_ALLOWED_HOSTS and DJANGO_DEBUG env…
matthewhand Mar 30, 2025
84b95ed
chore: update fly.toml
matthewhand Mar 30, 2025
aa9e270
feat(pyproject): add swarm-api script
matthewhand Mar 31, 2025
12300a5
refactor(blueprint): update BurntNoodles blueprint
matthewhand Mar 31, 2025
8d2f4c0
refactor(settings): enforce API key and add async middleware
matthewhand Mar 31, 2025
ae1d344
refactor(api): improve error handling in chat completions tests
matthewhand Mar 31, 2025
2b21b60
refactor(test): update BurntNoodles test imports and dummy fixture
matthewhand Mar 31, 2025
97e5bda
chore(tests/system): update system test script paths
matthewhand Mar 31, 2025
d29ae39
feat(middleware): add async auth middleware implementation
matthewhand Mar 31, 2025
b48b354
Refactor BurntNoodlesBlueprint in blueprint_burnt_noodles.py: remove …
matthewhand Mar 31, 2025
713f7a6
Refactor test files: consolidate fixtures, improve mock handling, and…
matthewhand Mar 31, 2025
58b8eeb
Refactor test_burnt_noodles.py: use concrete subclass, patch config d…
matthewhand Mar 31, 2025
19adf4f
Refactor test_blueprint_base_config.py: remove skipped tests and ensu…
matthewhand Mar 31, 2025
db4bcb3
Add tests/extensions: include swarm API launcher tests
matthewhand Mar 31, 2025
0304a40
feat(blueprint): update burnt noodles blueprint implementation
matthewhand Mar 31, 2025
f17abbb
test(blueprint): update tests for burnt noodles blueprint
matthewhand Mar 31, 2025
9e8879e
test(api): refine swarm API launcher tests
matthewhand Mar 31, 2025
05b4b48
feat(blueprint): add runnable blueprint implementation
matthewhand Mar 31, 2025
e72a556
fix(chatbot): clean CLI output, suppress errors, print only assistant…
matthewhand Apr 18, 2025
9a79fae
fix(chatbot): clean CLI output, suppress errors, print only assistant…
matthewhand Apr 18, 2025
594ba44
chore(blueprints): remove deprecated blueprints and legacy tests
matthewhand Apr 18, 2025
e3859b8
chore(blueprints): remove deprecated blueprints and legacy tests (#2)
matthewhand Apr 18, 2025
89f005e
refactor(blueprints): update and refactor blueprints for consistency
matthewhand Apr 18, 2025
225c201
refactor(blueprints): update and refactor blueprints for consistency …
matthewhand Apr 18, 2025
9db1800
feat(core): improve blueprint infra, CLI, and config handling
matthewhand Apr 18, 2025
a1f914a
feat(core): improve blueprint infra, CLI, and config handling (#4)
matthewhand Apr 18, 2025
7c8e206
test: update and clean up blueprint and system tests (#5)
matthewhand Apr 18, 2025
84b1a68
docs: update README and misc project documentation (#6)
matthewhand Apr 18, 2025
5746820
fix: restore missing slash_commands.py for blueprint compatibility
matthewhand Apr 18, 2025
2bd21b3
fix(blueprints): ensure .env is loaded at top of all major blueprint …
matthewhand Apr 18, 2025
d5c1d2e
chore: remove deprecated blueprint, config, and launcher extension fi…
matthewhand Apr 18, 2025
497fb30
test(config): update tests and config for new blueprint/core structur…
matthewhand Apr 18, 2025
bfc6817
refactor(core): update blueprint and CLI command imports to use new c…
matthewhand Apr 18, 2025
2d535d2
feat(core,cli,build): add core module, swarm_cli.py, and build_all_bl…
matthewhand Apr 18, 2025
db9325b
test: skip LLM-dependent blueprint tests if no API credentials are av…
matthewhand Apr 18, 2025
dd16058
Add bin/* to .gitignore to prevent accidental commits of binaries and…
matthewhand Apr 18, 2025
4fe3cd8
Skip blueprint tests in CI/CD if no LLM API key is set (prevents spur…
matthewhand Apr 18, 2025
402685d
Re-enable and fix blueprint agent-creation tests: robust dynamic agen…
matthewhand Apr 18, 2025
38b38b5
Patch blueprints for guaranteed demo output; enable PyInstaller launc…
matthewhand Apr 18, 2025
733d208
Patch: Expose agent fileops tools (.func) for direct testing and proo…
matthewhand Apr 18, 2025
8ec6bfb
Nuclear Swarm: Atomic file locking, blueprint self-healing, integrati…
matthewhand Apr 18, 2025
5c3a4fe
feat(core): enhance framework UX, logging, and documentation
matthewhand Apr 18, 2025
d3eb7a8
Merge pull request #12 from matthewhand/feature/agent-fileops-patch
matthewhand Apr 18, 2025
215f005
fix(merge): resolve blueprint and test merge conflicts, unify UX and …
matthewhand Apr 18, 2025
553f058
docs(readme): update CLI reference and swarm-cli/api usage docs
matthewhand Apr 18, 2025
f42ad90
feat(cli,blueprints,tests): batch add new blueprints, CLI utils, test…
matthewhand Apr 18, 2025
186a0bf
fix(core): restore blueprint_ux.py for legacy/test compatibility (stu…
matthewhand Apr 18, 2025
f8dfd18
fix(utils): re-export log_and_exit and prompt_user for config_manager…
matthewhand Apr 18, 2025
6949464
fix(import): use absolute import for prompt_user and log_and_exit in …
matthewhand Apr 18, 2025
757be7e
fix(chatbot): clean CLI output, suppress errors, print only assistant…
matthewhand Apr 18, 2025
220c7d4
test: update and clean up blueprint and system tests
matthewhand Apr 18, 2025
57155e6
fix(merge): resolve all conflicts for feature/blueprint-agent-cli-ux …
matthewhand Apr 18, 2025
ceacf90
fix(merge): resolve all conflicts for feat/core-blueprint-infra branch
matthewhand Apr 18, 2025
71bf287
fix(merge): resolve all conflicts for refactor/blueprints-consistency…
matthewhand Apr 18, 2025
785be76
Merge remote-tracking branch 'origin/main' into chore/remove-deprecat…
matthewhand Apr 18, 2025
2adc188
fix(merge): resolve all conflicts for test-skip-llm-when-no-creds branch
matthewhand Apr 18, 2025
8ce3c8a
Merge remote-tracking branch 'origin/main' into chore/remove-deprecat…
matthewhand Apr 18, 2025
1524a5c
docs: mark XDG config discovery as complete in TODO.md (already imple…
matthewhand Apr 20, 2025
66a34bc
docs: improve blueprint README discoverability, add blueprint list, b…
matthewhand Apr 20, 2025
99b00b7
feat(cli): implement async CLI input handler utility and integrate in…
matthewhand Apr 20, 2025
5d159db
refactor(blueprint): migrate DigitalButlers to Jeeves blueprint, upda…
matthewhand Apr 20, 2025
64b961a
docs(ux): add unified UX/output/spinner standards, remove obsolete sp…
matthewhand Apr 20, 2025
4b83fcc
fix(blueprints): unify spinner and operation box UX, guarantee result…
matthewhand Apr 20, 2025
1763e15
fix(mission-improbable): standardize spinner and operation box UX, ad…
matthewhand Apr 20, 2025
f0c10d7
fix(jeeves): standardize spinner and operation box UX, add emoji, and…
matthewhand Apr 20, 2025
e5fcbc0
fix(django-chat): standardize spinner and operation box UX, add emoji…
matthewhand Apr 20, 2025
6a75504
fix(suggestion): standardize spinner and operation box UX, add emoji,…
matthewhand Apr 20, 2025
ff7a184
fix(omniplex): standardize spinner and operation box UX, add emoji, a…
matthewhand Apr 20, 2025
a17e3e9
fix(blueprints): ensure all blueprints render test-compliant operatio…
matthewhand Apr 20, 2025
33af05c
feat(mission-improbable): unify UX for search/analysis ops\n\n- All s…
matthewhand Apr 20, 2025
ec48223
docs: establish blueprint standards for output, spinner, and UX consi…
matthewhand Apr 20, 2025
265b511
feat(blueprints/test-utils): unify test-mode UX, spinner/box, and sub…
matthewhand Apr 21, 2025
f7cf33b
feat(whinge_surf): UX-compliant fallback for agent/LLM errors and mis…
matthewhand Apr 21, 2025
457b047
fix(family_ties): UX-compliant error box for agent/LLM failures
matthewhand Apr 21, 2025
15132a6
feat(blueprints): Enforce unified spinner/result UX for all blueprints
matthewhand Apr 21, 2025
b591db0
refactor(blueprints): enforce unified spinner/box/emoji UX, update me…
matthewhand Apr 21, 2025
bfefde1
feat(cli/output): robust ANSI detection, plain fallback, and dynamic …
matthewhand Apr 21, 2025
476cb13
feat(ux/compliance): update blueprint test mode UX docs, compliance s…
matthewhand Apr 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/python-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ jobs:
run: pytest
env:
PYTHONPATH: ${{ github.workspace }}/src
DJANGO_ALLOW_ASYNC_UNSAFE: "true"
32 changes: 32 additions & 0 deletions .github/workflows/ux_compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Blueprint UX Compliance

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
ux-compliance:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv pip install -r requirements.txt
- name: Install ruff
run: pip install ruff
- name: Lint with ruff
run: ruff check .
- name: Run blueprint tests
run: uv run pytest -v tests/blueprints
- name: Run coverage
run: uv run pytest --cov=src --cov-report=term-missing tests/blueprints
- name: Run UX compliance utility
run: python scripts/check_ux_compliance.py
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sdist/
var/
wheels/
share/python-wheels/
db.sqlite3-*
*.egg-info/
.installed.cfg
*.egg
Expand Down Expand Up @@ -191,3 +192,8 @@ openapi.yaml
*.db
*.db-shm
logs/*

openai-agents-python/*
docker-compose.override.yml

bin/*
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: local
hooks:
- id: lint-blueprints
name: Lint Blueprints for Spinner/Result UX
entry: python scripts/lint_blueprints.py
language: system
files: ^src/swarm/blueprints/blueprint_.*\.py$
5 changes: 5 additions & 0 deletions .windsurfrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
`uv run pytest` to test.
`uv add` and `uv sync --all-extras` to add software.
git commit messages are to be conventional.
functional swarm-cli and swarm-api cmds are the end game.
blueprints demonstrate the framework capabilities.
696 changes: 184 additions & 512 deletions DEVELOPMENT.md

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,24 @@ RUN apt-get update && apt-get install -y \

WORKDIR /app

# Copy all project files into the container
# Copy all project files first (consider .dockerignore for efficiency)
COPY . .

# Upgrade pip to the latest version for compatibility
# Upgrade pip
RUN pip install --upgrade pip setuptools wheel

# Install BLIS with generic architecture support
ENV BLIS_ARCH="generic"
#RUN pip install --no-cache-dir --no-binary=blis blis==1.2.0
# RUN pip install --no-cache-dir --no-dependencies nemoguardrails
# Install BLIS (if still needed, uncomment)
# ENV BLIS_ARCH="generic"
# RUN pip install --no-cache-dir --no-binary=blis blis==1.2.0

# Install the project along with its dependencies using Hatchling (as set in pyproject.toml)
# Install the project
RUN pip install .

# Expose the specified port
EXPOSE ${PORT}

# Runtime logic:
# - If SWAPFILE_PATH is defined, configure swap
# - Set default SQLite DB path if not provided
# - If FACTORY_RESET_DATABASE is True, delete the database file
# - Check if database exists and has tables; apply migrations accordingly
# - Start the Django server
# --- Default Command ---
# This runs if no entrypoint overrides it. Includes DB setup.
CMD if [ -n "$SWAPFILE_PATH" ]; then \
mkdir -p "$(dirname "$SWAPFILE_PATH")" && \
fallocate -l 768M "$SWAPFILE_PATH" && \
Expand All @@ -65,4 +60,6 @@ CMD if [ -n "$SWAPFILE_PATH" ]; then \
echo "No database found; creating and applying migrations" && \
python manage.py migrate; \
fi && \
python manage.py runserver 0.0.0.0:$PORT
echo "--- Starting Django Server (Default CMD) ---" && \
python manage.py runserver 0.0.0.0:$PORT

70 changes: 70 additions & 0 deletions HANDOFF_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Session Handoff Report: Post-Refactor Cleanup & Next Steps

**Date:** 2025-03-29

**Current Status:**

* **Core Refactoring Complete:** All major blueprints (`burnt_noodles`, `rue_code`, `nebula_shellz`, `digitalbutlers`, `dilbot_universe`, `gaggle`, `family_ties`, `mission_improbable`, `whiskeytango_foxtrot`, `divine_ops`, `omniplex`, `unapologetic_poets`, `chatbot`, `echocraft`, `suggestion`, `monkai_magic`) have been refactored to inherit from `BlueprintBase`.
* **Design Patterns:**
* Agent-as-tool delegation is the primary pattern for coordination.
* Direct `@function_tool` usage is employed for local CLI wrappers (`burnt_noodles`, `monkai_magic`).
* MCP servers provide capabilities to specialist agents (`digitalbutlers`, `divine_ops`, `wtf`, `mission_improbable`, `omniplex`, `unapologetic_poets`).
* Dynamic configuration via SQLite demonstrated (`dilbot_universe`, `mission_improbable`, `unapologetic_poets`).
* Structured output via `output_type` demonstrated (`suggestion`).
* **BlueprintBase Enhancements:**
* Added MCP server `description` field support in config (`get_mcp_server_description` helper).
* Added check for missing `env_vars` specified in blueprint metadata.
* Corrected default markdown logic for CLI mode (`use_markdown` defaults to True).
* Added (then reverted due to errors) MCP startup timeout logic. **The timeout logic caused `TypeError: '_GeneratorContextManager' object does not support the asynchronous context manager protocol` and was removed.** This needs further investigation, possibly using `asyncio.wait_for` instead of `anyio.fail_after` around the `stack.enter_async_context` call.
* **Configuration:** `swarm_config.json` updated with new `git` and `google-cse` servers and example `description` / `startup_timeout` fields. Syntax error fixed.
* **Testing:** Placeholder test files created for all refactored blueprints. Most tests are currently skipped (`reason="...not yet implemented"`). Existing config tests pass.
* - Renamed unapologetic_press blueprint to unapologetic_poets (directory, class, and all references).
- File is now blueprint_unapologetic_poets.py.
- All code, test, and documentation references updated accordingly.
* - All DivineOpsBlueprint and divine_code functionality has been merged into ZeusBlueprint. All references, tests, and documentation should now use ZeusBlueprint exclusively. Any mention of DivineOps or divine_code is for historical context only.

**Immediate Issues:**

* **MCP Startup Timeout:** The `anyio.fail_after` implementation caused TypeErrors. The timeout logic in `_start_mcp_server_instance` has been **reverted**. MCP server startup failures might still hang indefinitely. **Investigate alternative timeout implementations (e.g., `asyncio.wait_for`)**.
* **MCP Failures:** Some MCP servers failed to start in the last run (`slack`, `mondayDotCom`, `basic-memory`, `mcp-npx-fetch`), triggering the blueprint failure logic correctly. Root cause unknown (could be network, dependencies, config, etc.).

**Next Tactical Steps:**

1. **Fix MCP Startup Timeout:** Re-implement a working timeout mechanism for `_start_mcp_server_instance`. `asyncio.wait_for(stack.enter_async_context(server_instance), timeout=startup_timeout)` might be a better approach. Test thoroughly.
2. **Refactor Remaining Blueprints:**
* `chucks_angels` (Needs UVX/NeMo investigation or simplification).
* `django_chat` (Decide whether to keep Django dependency or refactor).
* `flock` (Implement based on original intent).
* `messenger` (Implement based on original intent).
3. **Implement Guardrails:**
* Research `openai-agents`'s intended guardrail mechanism (likely via config).
* **Target Blueprints:** `MonkaiMagic`, `WhiskeyTangoFoxtrot` (due to shell/fs/web access).
* Define basic guardrail configs (e.g., prevent dangerous shell commands, filter topics).
* Modify `create_starting_agent` in target blueprints to potentially load and pass guardrail configs to relevant `Agent` instances.
4. **Enhance Agent Synergy / Dynamic Prompts:**
* **Omniplex:** Modify `OmniplexCoordinator` instructions to use MCP descriptions (fetched via `self.get_mcp_server_description`) to explain available tools. Implement logic to choose *one* search provider if multiple (brave, google, ddg) are available and started.
* **Other Coordinators (e.g., Zeus, Valory):** Update instructions to dynamically include descriptions of the agent tools and the MCP tools *their* delegate agents have access to, using `self.get_mcp_server_description`.
5. **Parallel Tool Calls Demo:**
* Design and implement a simple blueprint where the coordinator needs independent info from two different tools/agents simultaneously (e.g., read local file + web search).
* Verify that the `Runner` executes these concurrently if the LLM returns multiple `tool_calls`.
6. **Update Blueprints README:** Regenerate or manually edit `blueprints/README.md` table to accurately reflect the status, features, and MCP usage of all blueprints post-refactoring. Ensure descriptions match the updated code.
7. **Implement Skipped Tests:** Gradually unskip and implement tests in `tests/blueprints/`, focusing on:
* Agent creation and tool assignment.
* Basic delegation flows (mocking `Runner.run` or agent `process` methods).
* Direct testing of `@function_tool` functions.

**Strategic Considerations:**

* **Guardrails Integration:** How deeply should guardrails be integrated? Per-agent? Global? Config-driven?
* **Error Handling:** Standardize error reporting from tools and MCP interactions back to the coordinator.
* **Testing Strategy:** Develop robust strategies for mocking MCP interactions and complex multi-agent flows.
* **UI Elements:** Revisit custom spinners/prompts if essential, potentially via external wrappers or modifications to `BlueprintBase.main`.

**Tips & Hints:**

* **Timeout:** Focus on `asyncio.wait_for` around `stack.enter_async_context(server_instance)` in `_start_mcp_server_instance`.
* **Dynamic Prompts:** Use f-strings and loops within `create_starting_agent` to build instructions dynamically using `self.get_mcp_server_description(server_name)` for available servers/tools.
* **Parallel Calls:** Requires an LLM that supports generating multiple `tool_calls` and an agent logic that makes independent requests suitable for parallel execution.
* **Testing:** Start with unit tests for tools and basic agent creation tests (mocking dependencies). Integration tests require more effort.

Good luck!
28 changes: 28 additions & 0 deletions ISSUES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Open Swarm: Known Issues and TODOs

_Last updated: 2025-04-21_

## Skipped/Flaky/Soft Tests
- `tests/test_blueprint_loading.py`: All tests skipped due to dynamic INSTALLED_APPS complexity. **Action:** Refactor to enable test coverage or document why this is not possible.
- `tests/blueprints/test_chatbot.py`: Skips if dependencies are missing. **Action:** Ensure dependencies are installed or mock them for testing.
- `tests/blueprints/test_codey.py`: Skips if CLI utility not found. **Action:** Ensure codey blueprint is enabled or provide a mock.

## Error Handling and Logging
- Many tools and modules (audit_viz.py, blueprint_qa.py, message serialization, etc.) log errors/warnings but do not raise or fail. **Action:** Patch to raise exceptions or exit nonzero on critical errors; ensure user-facing errors are actionable.

## TODO/FIXME/DEPRECATED/Warning Comments
- Numerous TODO, FIXME, and DEPRECATED comments found in core modules (e.g., ChatMessage, tool calls, etc.). **Action:** Systematically address or triage; if not immediately fixable, keep tracked here.

## Deprecated Fields
- `ChatMessage.function_call` is marked as deprecated but still present in code. **Action:** Remove or fully document deprecation timeline.

## Logging and Error Surfacing
- Some flows only log errors and do not fail tests or CLI. **Action:** Harden error handling across all CLI, API, and blueprint flows.

## General Recommendations
- Sync this file with GitHub Issues for better user visibility and tracking.
- Update documentation to reflect known issues and troubleshooting steps.

---

_This file is auto-generated and should be updated as issues are fixed or discovered._
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Makefile for Open Swarm: developer/CI helpers

.PHONY: pretest-clean test

pretest-clean:
bash scripts/pretest_cleanup.sh

test: pretest-clean
uv run pytest
Loading