Skip to content

v0.11.0 - #15

Merged
alain-sv merged 8 commits into
mainfrom
develop
Mar 17, 2026
Merged

v0.11.0#15
alain-sv merged 8 commits into
mainfrom
develop

Conversation

@alain-sv

Copy link
Copy Markdown
Contributor
  • Job Poll mechanism — New optional job_poll method in AgentMethods for manual external service polling. When defined, the workbench shows a "Check for updates" button on active jobs. Clicking it calls the agent's poll handler, which checks external services (email inboxes, call status APIs, etc.) and updates cases accordingly. Enables local development without webhooks — production uses real-time webhooks, local mode uses the poll button.

    • AgentMethods: new job_poll: AgentMethod | None field
    • Route: POST /workbench/jobs/{job_id}/poll triggers the agent's poll handler
    • UI: "Check for updates" button with loading state, conditionally rendered via has_poll template variable
    • JS: pollJob() in workbench-form.js with disable-during-request pattern
  • HITL double-click guard — All HITL buttons are disabled during submission via _postAnswer(). Buttons get opacity-50 cursor-not-allowed while in flight and re-enable on error. Dialog HITL submitMessage/confirmDialog are now async, properly awaiting the form submission before resetting state.

  • Monitor reply display — Step payloads with a reply key render as a blue blockquote below the step row. Step payloads with approved_content render as a green confirmed card.

  • Monitor duration displaystep_duration format now handles both numeric and string values, preventing Jinja2 TypeError when duration comes from HITL form input.

  • WebSocket terminal signal — Terminal job state sends a terminal WS signal that keeps the connection idle, preventing reconnect loops.

  • is_local_mode() helper — Centralized in supervaizer.common, replacing inline os.environ.get("SUPERVAIZER_LOCAL_MODE") checks across account_service.py, server.py.

  • deque for log buffer_workbench_log_buffer changed from list to collections.deque(maxlen=500), removing manual trim logic.

  • Dialog HITL — New HITL type for interactive content review via chat interface. When a CaseNodeUpdate payload contains supervaizer_dialog, the workbench renders a conversation UI instead of a fixed form. Supports iterative refinement through LLM-powered feedback loops. Fields: content (JSON string or plain text), content_type (email/text/code), objective, instructions, messages (conversation history), confirm_label.

    • Template: dialog_renderer.html with render_hitl_dialog and render_dialog_confirmed macros
    • JS: submitDialogMessage(caseId, message) and confirmDialog(caseId) in workbench-form.js
    • Route: workbench_routes.py detects supervaizer_dialog in AWAITING case payloads
  • Local mode URL fixessupervaizer start --local --port N now correctly shows localhost URLs everywhere: CLI output, admin interface logs, storage, and uvicorn. Fixed by resolving Server.__init__ defaults from env vars at call time (not class definition time) and ensuring CLI-provided values take precedence over .env file values.

  • Local mode event skippingaccount_service.send_event() returns a no-op ApiSuccess when SUPERVAIZER_LOCAL_MODE=true, preventing HTTP errors against the SaaS API during local development.

  • Agent parameter env pre-fill — In local mode, the workbench auto-loads .env values into agent parameter fields with green .env badge indicators. Secret fields show a masked placeholder; non-secret fields display the value. Backend falls back to env values for empty fields on job submission.

  • HTMX polling guard — Monitor template suppresses hx-trigger polling when a HITL dialog or form is active, preventing DOM overwrites while users interact with forms.

* 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.
…k 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)
… 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.
* ✨ 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.
# Conflicts:
#	docs/CHANGELOG.md
#	src/supervaizer/cli.py
#	src/supervaizer/server.py
#	tests/test_cli.py
…luding 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.
@alain-sv
alain-sv merged commit e5c8659 into main Mar 17, 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