Skip to content

feat: unify --local mode to run user agents alongside Hello World (#10) - #11

Merged
alain-sv merged 2 commits into
mainfrom
develop
Mar 16, 2026
Merged

feat: unify --local mode to run user agents alongside Hello World (#10)#11
alain-sv merged 2 commits into
mainfrom
develop

Conversation

@alain-sv

Copy link
Copy Markdown
Contributor
  • feat(server): add local-mode handling and hello-world injectionAdd for unified "--local" behavior in Server and tooling.
  • import Path in src/supervaizer/server.py support filesystem checks- detect SUPERVA_LOCAL_MODE in Server.init and:
  • force supervisor_account=None in local mode (log if overridden)
  • api_key to "local-dev" when not explicitly set or via env - enable admin_interface and a2a_end automatically - prepend Hello World agent (via get_default_local_agent) unless SUPERVAIZER_DISABLE_HELLO_WORLD=true or an agent with the slug exists - ensure injection happens before route setup UI and endpoints include the injected agentAdd gh-release target to justfile for creating GitHub releases- new gh-release recipe reads, creates a v release, notes commits since previous tag, publishes to the supervaize/supervaizer repoAdd design doc describing local mode unification- docs/superpowers/specs/2026-03-16-manage-hello-world-design:
  • explains goals, design decisions, CLI/server/local_server changes, and cases for combining user agents with the World agentMotivation:
  • Unify local and normal runtime paths so users see their agents in --local mode preserving an easy Hello World fallback and avoiding Studio registration/credentials in local dev. The-release target automates creating GitHub releases from the repo version.
  • feat: unify --local mode to run user agents alongside Hello World
  • Server.init detects SUPERVAIZER_LOCAL_MODE env var:
    • Forces supervisor_account=None (skips Studio registration)
    • Injects Hello World agent unless SUPERVAIZER_DISABLE_HELLO_WORLD=true
    • Defaults api_key to 'local-dev'
    • Deploys agent routes in local mode
  • CLI --local sets env var and falls through to normal subprocess path
  • Falls back to local_server.py when no supervaizer_control.py exists
  • Simplified local_server.py: removed create_local_server(), added main
  • Added 8 server tests + 2 CLI tests for local mode behavior
  • ✨feat(server): default api_key to local-dev in local modeUpdate tests and docs to reflect that when SUPERVAIZER_LOCAL_MODE truethe server defaults its api_key to "local" even if SUPERVAIZER_API_KEYis. Adjust test wording and expectations to reference theSUPERVAIZER_API_KEY env var rather than a "explicit api_key".

Expand and reformat design docs and implementation for managing theHello World agent local mode: CLI paths, set SUPAIZER_LOCAL_MODE --local, force supervisor_account=None in local mode, inject HelloWorld unless disabled, and enable admin/a2a endpoints Clar edge-casematrix and add a full implementation plan document.

Why- Make local mode behavior explicit and consistent across, tests and docs.

  • Provide a clear plan and spec for injecting and managing the Hello agent and related changes.
  • fix: add missing field declarations to CaseNode model

CaseNode was missing Pydantic field definitions for name, type, factory, description, and can_be_confirmed. This caused AttributeError on all 9 test_case.py tests.

  • ✨ feat(readme): add "local mode" docs and env varsIntroduce a Local Mode section and related CLI/help updates to letdevelopers run the server entirely offline local testing anddevelopment.
  • "6. Local mode" ( shift Optional parameters to7) to README, documenting supervaizer start --local, behavior supervaizer_control.py is absent, and how the built-in World agent is managed.
  • Document automatic environment changes for local mode: SUPERVAIZER_LOCAL_MODE=true - default API key set to local-dev (overridable via SUPERVAIZER_API_KEY)
  • option to disable Hello World viaERVAIZER_DISABLE_HELO_WORLD- Update CLI examples docs/CLI to --local usage and corresponding env var notes.
  • AddERVAIZER_MODE and SUPERVA_DISABLELLO_WORLD the env var in to make configurationable.

This makes local development simpler and reduces friction for testingagents without relying on Studio/ registration.

  • ✨ feat: improve human_answer handling and server info storage- Refactor work human_answer invocation to more robustly check for agent.methods and the presence of human_answer definition before attempting to execute it. avoids AttributeError and clar conditional logic while the existing behavior of running human_answer method in an executor and handling exceptions logged and error.
  • Update server info creation to use a fixed singleton id ("server_instance") when saving to storage subsequent retrievals can reliably the stored ServerInfo entry.

  • Add Unit Tests Results section to CHANGELOG with test counts and time.

* feat(server): add local-mode handling and hello-world injectionAdd for unified "--local" behavior in Server and tooling.

- import Path in src/supervaizer/server.py support filesystem checks- detect SUPERVA_LOCAL_MODE in Server.__init__ and:
 - force supervisor_account=None in local mode (log if overridden)
 - api_key to "local-dev" when not explicitly set or via env - enable admin_interface and a2a_end automatically - prepend Hello World agent (via get_default_local_agent) unless SUPERVAIZER_DISABLE_HELLO_WORLD=true or an agent with the slug exists - ensure injection happens before route setup UI and endpoints include the injected agentAdd gh-release target to justfile for creating GitHub releases- new gh-release recipe reads, creates a v<version> release,
 notes commits since previous tag, publishes to the supervaize/supervaizer repoAdd design doc describing local mode unification- docs/superpowers/specs/2026-03-16-manage-hello-world-design:
 - explains goals, design decisions, CLI/server/local_server changes,
 and cases for combining user agents with the World agentMotivation:
- Unify local and normal runtime paths so users see their agents in --local mode preserving an easy Hello World fallback and avoiding Studio registration/credentials in local dev. The-release target automates creating GitHub releases from the repo version.

* feat: unify --local mode to run user agents alongside Hello World

- Server.__init__ detects SUPERVAIZER_LOCAL_MODE env var:
  - Forces supervisor_account=None (skips Studio registration)
  - Injects Hello World agent unless SUPERVAIZER_DISABLE_HELLO_WORLD=true
  - Defaults api_key to 'local-dev'
  - Deploys agent routes in local mode
- CLI --local sets env var and falls through to normal subprocess path
- Falls back to local_server.py when no supervaizer_control.py exists
- Simplified local_server.py: removed create_local_server(), added __main__
- Added 8 server tests + 2 CLI tests for local mode behavior

* ✨feat(server): default api_key to local-dev in local modeUpdate tests and docs to reflect that when SUPERVAIZER_LOCAL_MODE truethe server defaults its api_key to "local" even if SUPERVAIZER_API_KEYis. Adjust test wording and expectations to reference theSUPERVAIZER_API_KEY env var rather than a "explicit api_key".

Expand and reformat design docs and implementation for managing theHello World agent local mode: CLI paths, set SUPAIZER_LOCAL_MODE --local, force supervisor_account=None in local mode, inject HelloWorld unless disabled, and enable admin/a2a endpoints Clar edge-casematrix and add a full implementation plan document.

Why- Make local mode behavior explicit and consistent across, tests and docs.
- Provide a clear plan and spec for injecting and managing the Hello agent and related changes.

* fix: add missing field declarations to CaseNode model

CaseNode was missing Pydantic field definitions for name, type, factory,
description, and can_be_confirmed. This caused AttributeError on all
9 test_case.py tests.

* ✨ feat(readme): add "local mode" docs and env varsIntroduce a Local Mode section and related CLI/help updates to letdevelopers run the server entirely offline local testing anddevelopment.

- "6. Local mode" ( shift Optional parameters to7) to README,
 documenting `supervaizer start --local`, behavior supervaizer_control.py is absent, and how the built-in World agent is managed.
- Document automatic environment changes for local mode:
 SUPERVAIZER_LOCAL_MODE=true - default API key set to `local-dev` (overridable via SUPERVAIZER_API_KEY)
 - option to disable Hello World viaERVAIZER_DISABLE_HELO_WORLD- Update CLI examples docs/CLI to `--local` usage and corresponding env var notes.
- AddERVAIZER_MODE and SUPERVA_DISABLELLO_WORLD the env var in to make configurationable.

This makes local development simpler and reduces friction for testingagents without relying on Studio/ registration.

* ✨ feat: improve human_answer handling and server info storage- Refactor work human_answer invocation to more robustly check for agent.methods and the presence of human_answer definition before attempting to execute it. avoids AttributeError and clar conditional logic while the existing behavior of running human_answer method in an executor and handling exceptions logged and error.

- Update server info creation to use a fixed singleton id ("server_instance")
 when saving to storage subsequent retrievals can reliably the stored ServerInfo entry.

- Add Unit Tests Results section to CHANGELOG with test counts and time.
@alain-sv
alain-sv merged commit 2ecd935 into main Mar 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant