Skip to content

✨ feat: custom_routes + scheduled steps + executor + workbench UI - #16

Merged
alain-sv merged 2 commits into
developfrom
feat/scheduled-steps
Mar 21, 2026
Merged

✨ feat: custom_routes + scheduled steps + executor + workbench UI#16
alain-sv merged 2 commits into
developfrom
feat/scheduled-steps

Conversation

@alain-sv

Copy link
Copy Markdown
Contributor

Platform extensions for agent-driven orchestration:

  • custom_routes: agents mount their own FastAPI routers at /agents/{slug}/api/
  • scheduled steps: CaseNodeUpdate gains scheduled_at/method/params/status fields
  • executor: background asyncio loop polls every 60s, executes due steps
  • workbench UI: countdown display, Execute now / Cancel buttons on pending steps
  • routes: POST execute, POST cancel, PATCH reschedule for scheduled steps
  • Case.cancel_scheduled_steps() for job stop cascading
  • Cases.get_due_scheduled_steps() for executor polling
  • dialog_renderer: lightweight markdown rendering for text content
  • 433 tests passing

Platform extensions for agent-driven orchestration:

- custom_routes: agents mount their own FastAPI routers at /agents/{slug}/api/
- scheduled steps: CaseNodeUpdate gains scheduled_at/method/params/status fields
- executor: background asyncio loop polls every 60s, executes due steps
- workbench UI: countdown display, Execute now / Cancel buttons on pending steps
- routes: POST execute, POST cancel, PATCH reschedule for scheduled steps
- Case.cancel_scheduled_steps() for job stop cascading
- Cases.get_due_scheduled_steps() for executor polling
- dialog_renderer: lightweight markdown rendering for text content
- 433 tests passing
…rsion tooling and a few typing and fixes.

- Add tools/dev_version to a PEP440 .devN suffix both src/svaizer/__version__. and pyproject.toml [tool.bumpversion].
 provides `just-dev on|` to enable/disable the .dev0 canonical suffix for local/dev workflows so versions remain in sync without editing changelog or historical docs.
- Addfile recipe version-dev cmd that invokes the new script.
 Document usage and caution about using tag_version while dev mode is on- Bump package VERSION to.11.0.dev0 and keep APItelemetry constants- Export AgentResponse from supervaizer.____ and rebuild model import time so forward refs are resolved all imports.
 Change CaseNode.factory annotation Any (was Optional[Callable...])
 and add a comment explaining this emitting JSON in Pydantic/FastAPI OpenAPI (Pydantic2.12+).

These changes make local dev versioning deterministic and fix schemageneration while a missing response.
@alain-sv
alain-sv requested a review from al1p March 21, 2026 10:44
@alain-sv
alain-sv merged commit 011aac7 into develop Mar 21, 2026
5 checks passed
alain-sv added a commit that referenced this pull request Mar 23, 2026
* feat: unify --local mode to run user agents alongside Hello World (#10)

* 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.

* ✨ feat(workbench): add poll button and ignore-cli a conditional "Check for updates" poll button to the workbench UI thatis rendered only when the agent exposes job_poll (has_poll). The buttoninvokes workbenchForm.pollJob() and is styled to match controlsThis enables manual polling for job status/updates when the backend supportsitAlso update .gitignore to exclude .wright-cli/ tocommittingwright CLI artifacts. (#13)

* ✨ feat: improve gh-release simplify start justfile gh-release task to create or update GitHub releasesbased on latest tag reachable from origin/main. tags first, (#12)

determine the latest tag on origin/main, find a previous tag for notes,
and either mark an existing release as latest or create new(with generated notes). Add safer bash options and handle the casewhere no tags exist. This makes releases deterministic (based onorigin/main) and robust when rerunning CI or creating the firstrelease.

Also modify tests for the CLI start to avoid spawning asubprocess. Replace subprocess.Popen mocks with Server.launchcalls and a small control in the test or patch fileence to exercise the built-in fallback. The tests now assert thatthe Server.launch is and for the built fallbackoutput, simplifying test isolation removing reliance on process.

* improve-from-agent-debugging (#14)

* ✨ feat: improve gh-release simplify start justfile gh-release task to create or update GitHub releasesbased on latest tag reachable from origin/main. tags first,

determine the latest tag on origin/main, find a previous tag for notes,
and either mark an existing release as latest or create new(with generated notes). Add safer bash options and handle the casewhere no tags exist. This makes releases deterministic (based onorigin/main) and robust when rerunning CI or creating the firstrelease.

Also modify tests for the CLI start to avoid spawning asubprocess. Replace subprocess.Popen mocks with Server.launchcalls and a small control in the test or patch fileence to exercise the built-in fallback. The tests now assert thatthe Server.launch is and for the built fallbackoutput, simplifying test isolation removing reliance on process.

* ✨ feat: Dialog HITL, WebSocket monitor, local mode fixes, env pre-fill, code cleanup

- Dialog HITL: new chat-like interface for iterative content review (supervaizer_dialog payload)
- WebSocket monitor: replaced HTTP polling with WS push (monitor/console/jobs signals)
- Local mode: force localhost URLs, skip SaaS events, load .env automatically
- Env pre-fill: agent parameters auto-populated from .env with visual indicators
- Server.__init__: resolve defaults from env vars at call time (not class definition)
- CLI: .env loaded before env var setup, --public-url detection via sentinel
- Field renderer: ChoiceField unpacks [value, label] tuples, aligned form layout
- HITL Answer display: shows originating step label with 👤 emoji
- Code cleanup: is_local_mode() helper, deque for log buffer, _postAnswer() JS extraction
- Workbench monitor: Case: prefix, approved content card, terminal WS signal

* 🔧 fix: HITL double-click guard, dialog async, reply blockquote, WebSocket terminal signal

- JS: _postAnswer disables all HITL buttons during submission, re-enables on error
- Dialog: submitMessage/confirmDialog are async, properly await before resetting state
- Monitor: reply content shown as blue blockquote, approved content in green card
- WebSocket: terminal signal keeps connection idle (prevents reconnect loop)
- Cache bust v12

* ✨ feat(workbench): add job_poll support and cache bump Add job_poll AgentMethod to Agent interface and include its registration info in the agent metadata payload. This enables agents to expose an polling entrypoint external job updates- Add POSTagents/{slug}/workbench/jobs/{job_id}/ route to workbench API. The endpoint triggers agent's job_poll method via the executor, returns a structured JSON response with status message and payload, and returns404 when the agent has no poll method. This provides a manual trigger for polling external.

- Expose has flag the workbench template context so the can surface poll-related actions when supported by an agent.

- Tighten type hints for agent parameter env values to allow boolean from and fix minor dict formatting and string access style.

 Bump workbench-form static from v12 to v13 to force client refresh after the workbench.

* [MINOR]

* Enhance CHANGELOG with new features and improvements for v0.11.0, including job polling mechanism, HITL double-click guard, monitor reply and duration displays, WebSocket terminal signal, and centralized is_local_mode() helper. Update Dialog HITL for interactive content review and improve log buffer management.

* ✨ feat: custom_routes + scheduled steps + executor + workbench UI (#16)

* ✨ feat: custom_routes + scheduled steps + executor + workbench UI

Platform extensions for agent-driven orchestration:

- custom_routes: agents mount their own FastAPI routers at /agents/{slug}/api/
- scheduled steps: CaseNodeUpdate gains scheduled_at/method/params/status fields
- executor: background asyncio loop polls every 60s, executes due steps
- workbench UI: countdown display, Execute now / Cancel buttons on pending steps
- routes: POST execute, POST cancel, PATCH reschedule for scheduled steps
- Case.cancel_scheduled_steps() for job stop cascading
- Cases.get_due_scheduled_steps() for executor polling
- dialog_renderer: lightweight markdown rendering for text content
- 433 tests passing

* ✨ feat: add dev-version toggle and refine API typesAdd a small dev-version tooling and a few typing and fixes.

- Add tools/dev_version to a PEP440 .devN suffix both src/svaizer/__version__. and pyproject.toml [tool.bumpversion].
 provides `just-dev on|` to enable/disable the .dev0 canonical suffix for local/dev workflows so versions remain in sync without editing changelog or historical docs.
- Addfile recipe version-dev cmd that invokes the new script.
 Document usage and caution about using tag_version while dev mode is on- Bump package VERSION to.11.0.dev0 and keep APItelemetry constants- Export AgentResponse from supervaizer.____ and rebuild model import time so forward refs are resolved all imports.
 Change CaseNode.factory annotation Any (was Optional[Callable...])
 and add a comment explaining this emitting JSON in Pydantic/FastAPI OpenAPI (Pydantic2.12+).

These changes make local dev versioning deterministic and fix schemageneration while a missing response.

* 📝 docs: update changelog and README for upcoming release

Document custom routes, scheduled steps, AgentResponse export, and
OpenAPI fixes. Add HITL and Workbench to README features list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ✨ feat(docs): update model_core docs to0.11.0 and fix formatting- Bump Model Reference Core version from0.10.10.11.0.

- Clean up attribute indentation and align parameter docstrings account.Account to use consistent4 indentation.
- Reformat markdown tables for account and agent models to use compact pipe header style and consistent column alignment for better rendering and source readability.
- Fix code fence inconsistency and stray backticks in examples,
 normalizing fenced code blocks and removing extra blank lines.

* chore: update documentation

* chore: update documentation

* ✨ feat(docs): addAPI JSON to API docsAdd generated OpenAPI JSON file to docs/api to provide amachine-readable specification the API surface. This enablestooling (documentation viewers, code,

tools and keeps the published docs consistent with thecurrent API contract.

Include the file to simplify CI checks and make it easier forconsumers to the directly from the repo.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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