feat: Add Hall of Fame leaderboard backed by a dedicated results table
feat: Add Hall of Fame leaderboard backed by a dedicated results table
agharsallah+1: Codex
c952d77
Add a competitive-results leaderboard as a dedicated, durable table
(leaderboard_entries) detached from the event ledger: the events log stays
the run trace, while one denormalised scoreboard row per decided run records
who won on which model. A row is written only when a run is finished, has a
winner, names a concrete winning model, and ran a competitive scenario; the
run_id links each row back to its full trace for replay.
- src/core/leaderboard_store.py: LeaderboardEntry + LeaderboardStore
(SQLAlchemy, separate table in the same database as the event store),
build_entry write gate, memoised make_leaderboard_store factory.
- src/core/leaderboard.py: model / agent / fairness / sessions / headline
aggregations over stored entries, with a per-seat fairness rollup.
- src/ui/fishbowl/session.py: record a scoreboard row on finalize.
- src/ui/fishbowl/hall_of_fame.py + app.py: the "Hall of Fame" tab —
champion headline, model podium with win-rate bars, sessions with replay,
and t…
feat(media): introduce MediaRouter and stubs for image and speech generation
agharsallah
8400d8c
- Implement MediaRouter to resolve media capabilities to providers, supporting both live and offline modes.
- Add StubImageProvider and StubSpeechProvider for deterministic offline media generation.
- Create tools for image rendering and text-to-speech synthesis, integrating with the ToolRegistry.
- Enhance the commentator (rafters-critic) to generate and render media alongside commentary.
- Update UI components to display generated images and audio clips in the feed.
- Ensure tests cover the new media capabilities, including deterministic outputs and capability enforcement.
feat: Update model references to MiniCPM5 and adjust related documentation and tests for transformers 5.x compatibility
agharsallah
cc8e9f2
Refactor local provider to support on-device loading with accelerate
agharsallah
3bcd1af
- Updated the local provider to implement a two-phase loading mechanism for models, separating the download of weights in the parent process from the loading onto the GPU in the worker process.
- Introduced a new function `_ensure_downloaded` to fetch model weights to the on-disk cache without initializing CUDA.
- Replaced the previous loading mechanism with `_ensure_loaded_on_device`, which directly loads models onto the GPU using the `device_map` parameter, ensuring all weights are materialized on the device.
- Updated tests to reflect changes in loading behavior and ensure compliance with ZeroGPU constraints.
- Added `accelerate` as a new dependency in `pyproject.toml` to facilitate the new loading approach.
Refactor local model configurations and update tests
agharsallah
572f5aa
- Updated local model configurations to use Nemotron-Mini-4B-Instruct instead of NVIDIA-Nemotron-3-Nano-4B-BF16.
- Adjusted tests to reflect changes in model keys and trust_remote_code settings.
- Removed auto_class attribute from LocalModel as it is no longer necessary.
- Implemented compatibility shims for removed predicates in transformers 5.x to ensure backward compatibility with remote code imports.
- Enhanced test coverage for the new compatibility shims and ensured all tests pass.
feat: Update model routing and local provider to support multi-sponsor tiers and auto-class resolution
agharsallah
7a13e4e
feat: Add images and enhance documentation for Field Notes series, improving visual context and clarity
agharsallah
95cc1f6
feat: Enhance Secret Keeper's response logic to confirm correct guesses and improve consistency in answers
agharsallah
3966dc5
Add Field Notes series: Parts 2-5 covering scenarios, architecture, and ledger design
agharsallah
28cf0fa
- Introduced Part 2: "Six Playable Woods and a Fishbowl" detailing eight interactive scenarios and the Fishbowl interface.
- Added Part 3: "One Engine, Three Costumes" explaining the four abstractions (event ledger, conductor, agents, projections) that enable scenario flexibility.
- Created Part 4: "How a Small Agent Decides What to Say" focusing on context assembly and memory management for agents.
- Implemented Part 5: "The Ledger Is the Database" discussing the append-only ledger's role as the core data structure, ensuring consistency, recovery, and traceability.
feat: Implement early termination for the judge in Twenty Sprouts game and enhance event handling
agharsallah
0460922
feat: Add comprehensive state of the engine documentation
agharsallah
f5ed461
feat: Implement audience-only secret badge for Twenty Sprouts game
agharsallah
f6566bb
- Added `_secret_badge` function to render a hidden-word run's secret for the audience.
- Updated `_core` function to include the secret badge in the HTML output.
- Introduced `peek_next_actor_name` method in `FishbowlSession` to provide the next actor's name without advancing the run.
- Modified `ReplaySession` to handle `peek_next_actor_name` appropriately.
- Refactored `build_show` to simplify the show controls, removing unnecessary buttons and adding play/restart functionality.
- Enhanced `view_model_at` to include the secret and its holder for the audience's view.
- Added tests for the new functionality, ensuring the secret is handled correctly and does not leak into agent prompts.
- Created a new test suite for Twenty Sprouts gameplay to validate the secret handling and game mechanics.
feat: implement winner celebration overlay and judging mechanics
agharsallah
6432854
- Added `render_winner` function to create a celebratory overlay for the winning agent or team.
- Integrated winner rendering into the main application flow, allowing for a modular display of victory.
- Introduced `has_judge` and `force_verdict` methods in `FishbowlSession` to manage judging logic.
- Updated session handling to allow for forced verdicts, even when the budget is spent.
- Enhanced CSS styles for the winner celebration, including confetti and trophy animations.
- Created tests for judging mechanics and winner rendering to ensure correct functionality across scenarios.
Refactor modal service and logging setup
agharsallah
5d4ef87
- Updated the service module to streamline model registration and improve clarity in the handling of model configurations.
- Removed the vllm_logging module, integrating its functionality into the main logging setup for better maintainability and consistency.
- Simplified the build_command function by removing unnecessary precision handling and logging configurations.
- Enhanced test coverage for the build_command function, ensuring proper flag emissions and configurations.
- Cleaned up deprecated snapshot model handling and adjusted related tests for clarity and accuracy.
- Improved documentation throughout the service module to better reflect current functionality and design goals.
feat: Replace llama.cpp backend with in-process transformers backend for local GPU inference
agharsallah
7d636f8
feat: Implement llama.cpp backend for local inference with GGUF models
agharsallah
0f11b49
feat: Handle FP8 KV cache incompatibility with snapshot models in build command
agharsallah
e334e95
Merge pull request #21 from abducodez/worktree-scenarios
feat: make every scenario arena-grade with a competition contract
agharsallah+1: Codex
0d0c561
Add a validated `competition` block (versus|judged|none) to scenarios,
stamped onto run.started so runs are self-describing and winners attribute
to models. Winners become data, not prose: judges emit a `winner` field
that the reusable JudgedCompetition handler validates against the live cast
(repairing deterministically so the offline stub always names a real
player); ground-truth judges (SpyHost, SproutJudge) decide in code.
Audit the five existing scenarios (The Steeped versus+teams with code-scored
winner; Mystery Roots judged; Open Table gains a table-judge; Thousand Token
Wood and Oracle Grove marked none) and add three competitive scenarios:
Debate Duel and Beat Battle (symmetric seats, different models) and Twenty
Sprouts (code-dealt secret word, deterministic win).
Surface a winner ribbon in the verdict banner only when a winner exists, so
none-kind and legacy runs render byte-identically. Enforce the authoring
checklist in tests/test_scenario_contract.py and document the co…
feat: Implement well-known typed fields for verdicts in output models
agharsallah
ce159dc
- Introduced `_well_known_specs` function to define typed fields for `winner` and `scores` in agent output.
- Updated `build_output_model` to handle new field types, allowing `winner` to be optional and `scores` to default to an empty map.
- Enhanced `json_instruction` to provide specific hints for well-known fields in the output format.
- Modified `FishbowlSession` to derive `winner_kind` and `winning_models` based on verdicts, supporting team-based outcomes.
- Added validation tests for new competition configurations and verdict handling, ensuring proper behavior for both agent and team winners.
- Created comprehensive tests for the new verdict validation logic, including re-ask scenarios and score normalization.
feat: implement per-event model attribution for enhanced event tracking
agharsallah
a71301e
feat: implement Archive feature for past session management
agharsallah
a2ca0e0
- Added `archive.py` to handle listing and loading past runs for a specific user and scenario.
- Introduced `list_runs` function to retrieve past runs scoped by user session ID and scenario.
- Implemented `load_replay` function to create a read-only `ReplaySession` for a given run ID.
- Created helper functions for formatting run cards and timestamps.
- Enhanced CSS styles for the Archive drawer and run cards to improve UI presentation.
- Updated `FishbowlSession` and `ReplaySession` classes to support new functionality and ensure session isolation.
- Added comprehensive tests for the Archive feature, ensuring correct session attribution and replay functionality.
- Modified memory index tests to include run ID scoping for event searches.
- Created new tests for run history and lifecycle management, ensuring proper event emission and session handling.
feat(roadmap): add comprehensive arena roadmap outlining sessions, winners, and leaderboard features
agharsallah
7066a96
feat: add ADR-0025 for scenario-adaptive lab and per-run config editing; enhance form validity and agent configurability
agharsallah
a377b63
feat: update agent personas and scheduling in YAML configurations; enhance event handling and memory deduplication in core logic
agharsallah
27b304e
feat: require live infrastructure for event store and inference, removing offline mode
agharsallah
eed2172
feat: update dependencies for durable Postgres event store and ensure core requirements are met
agharsallah
7973a8e
feat: refine structured output handling with guided decoding and mode adjustments
Introduce src/observability/ — a thin facade over OpenTelemetry plus an
in-memory telemetry store that every layer imports as `from src import
observability as obs`. Provides structured logging (text/JSON), real OTEL
tracing with automatic span nesting, in-process metrics, and contextvar-based
run/turn/agent correlation. Self-contained backend (in-memory ring buffers +
optional console exporter) feeds the upcoming Gradio Telemetry panel — nothing
external to deploy. Adds opentelemetry-{api,sdk,semantic-conventions} as core
deps, wires configure() into the app entrypoint, ADR-0024 + architecture doc,
and a zero-mock smoke test. See ADR-0024.
Co-Authored-By: Codex <codex@openai.com>
feat: add Hugging Face inference backend next to Modal
agharsallah
45917c7
Introduce a second, serverless inference backend (Hugging Face Inference
Providers) alongside the self-hosted Modal vLLM endpoints, and surface the
choice in the Fishbowl Lab.
- src/models/hf_catalogue.py: stdlib-only, offline-safe catalogue of small
instruct models (tiny<=4B .. strong<=32B); binding_for yields the same
LiteLLM custom-endpoint form, so the existing transport calls it unchanged.
- src/models/inference.py: one facade unifying Modal + HF behind
entries/binding_for/default_key_for_profile/backend_available. Models are
named by backend-qualified keys ("hf:<repo>"); a bare key means Modal, so
all existing keys/config/tests are untouched.
- router, registry endpoint: expansion, and has_live_credentials now read the
facade (live = any backend configured).
- Fishbowl Lab gains a headline "00 - Inference backend" radio (Modal vs HF)
driving the cast/judge pickers; the topbar chip names the live backend(s).
A composed run forces live on the chosen backend when it…
feat: implement streaming agent responses and enhance conversation flow with repeat guards
agharsallah
0b0d9be
feat: enhance agent personas and improve model performance tuning
agharsallah
40a30b6
feat(core): add resilient loop and shared blackboard
agharsallah+1: Codex
ba6dd5f
Improve conversation stability and privacy across live scenarios by sharing spoken context, isolating per-agent failures, and hardening structured output parsing.
- Inject a shared WHAT'S BEEN SAID blackboard into agent context
- Continue turns when one agent fails while preserving budget-stop semantics
- Prevent secret leakage in scenario seed/memory rendering
- Harden JSON parsing and salvage logic for reasoning model outputs
- Tune model token budgets and diversify spy cast model tiers
- Add ADR-0023 plus regression tests for context, memory, parsing, and spy flow
Co-authored-by: Codex <codex@openai.com>
feat: Enhance model routing and deployment flexibility
agharsallah
c1656a8
- Introduced `vllm_version` to allow per-model inference stack pinning, enabling models to opt for nightly builds when necessary.
- Updated image building logic to handle model-specific vLLM versions, ensuring compatibility with various architectures.
- Added `model_endpoint` to `AgentManifest` for explicit model binding, allowing agents to route to specific models instead of relying solely on profiles.
- Enhanced `ModelRouter` to resolve specific catalogue models, improving routing accuracy and flexibility.
- Updated UI components in the Fishbowl Lab to support new model selection features, ensuring only deployable models are presented.
- Improved tests to validate new model selection and routing behaviors, ensuring robustness and adherence to expected functionality.
Merge branch 'feat/live-runbook' into feat/live-integration
agharsallah
1f5c245
docs: add live-mode runbook + README "Run it live" subsection
agharsallah+1: Codex
503ecc6
Document how to take the Fishbowl theater off the deterministic stub and onto
real small-model inference via environment variables: Modal models
(workspace+key, single base URL, per-profile overrides), the Neon/Postgres
ledger with SQLite fallback, and the mem0 memory index (local off-the-grid vs
hosted cloud with its data-egress caveat). Explain the budget-safety story
(Governor caps + UI auto-stop at budget/verdict) so live runs stay bounded, and
how to verify a run is live. References .env.example rather than duplicating it.
Co-Authored-By: Codex <codex@openai.com>
Wire the prototype's flagship social-deduction scenario into the live engine,
config-only (no engine edits). Four minds get a secret word — the herd shares
COFFEE, a lone spy holds TEA — and bluff with clues while the mind-reader watches
the spy hide; a host unmasks the seam.
- config/agents/spy-{cara,bex,nil,ovo}.yaml: players emit agent.spoke with the
say-vs-think split; the secret word rides each persona so it never leaks.
- config/agents/spy-host.yaml + SpyHost handler: runs the generic judge turn for
the verdict text, then attaches a structured reveal:[{agent,secret,role}] to the
judge.verdict (same "decorate the emitted event" move as FortuneTeller's omen).
- config/scenarios/the-steeped.yaml: auto-discovered by the registry, surfaced in
the Lab; defaults to the DOCUMENTARIAN narrator.
- provider.py: curated offline lines + per-role mood bias so the bluff lands with
no API key (the spy leans bluffing/panicking).
Also make the Show usable as intended:
- Fix transport h…
docs: add as-built Fishbowl UI architecture page
agharsallah+1: Codex
0ce95fa
Document the shipped Fishbowl Gradio UI to match the code, per the
"document as we build" rule: a new architecture/fishbowl-ui.md companion
covering the two-tab theater (Lab/Show), the gr.HTML + gr.Timer render
loop over view_model_at, the hybrid scrub-vs-play transport, the
say-vs-think MindCard and "Read their minds" toggle, mood->avatar
mapping, the three layouts, FishbowlSession, the view_model_at snapshot
contract, and the engine-never-imports-UI modularity invariant.
Flip the plan-of-record status banner to reflect Phases 0-3 shipped
(Phase 4 still pending), mark Phase 2 (The Show) and Phase 3 (The Lab)
as shipped, add the promised "Realized" banner, and link the new page
from the README architecture map.
Co-Authored-By: Codex <codex@openai.com>
feat: add Fishbowl UI presenter layer and say-vs-think engine support
agharsallah+1: Codex
ade9df5
Implements the data foundation (Phases 0-1 of the Fishbowl UI plan) the
Gradio frontend will bind to — all additive, engine left untouched, modularity
preserved (the engine never imports the UI).
- src/ui/fishbowl/: derive_cast_state (per-agent {said,thought,mood} ledger
view), adapter (engine -> say/narrate/poke/verdict + hue/tier/voice/mood with
graceful fallbacks), view_model_at (pure prefix-replay snapshot at any scrubbed
step, with real tokens/rounds from the governor)
- DeterministicTinyModel is now schema-aware, gated on output_extra_fields: it
synthesizes thought/mood offline so the mind-reader works with no API key, while
plain agents stay byte-identical
- AgentManifest gains optional hue/archetype; Conductor.inject_user_event gains an
optional label; cast manifests declare output_extra_fields + presentation metadata
- tests/test_fishbowl.py (15 tests, incl. an offline proof the ledger carries
thought+mood); full suite 277 passed, ruff clean
- docs: manifest-spe…
feat: add Fishbowl UI ADR and implementation plan for Gradio presenter layer
agharsallah
a13e4e8
feat: add optional mem0 cloud backend for memory index and update documentation
agharsallah
c3f5c19
feat: unify model catalogue and self-hosted routing
agharsallah+1: Codex
9dd6dab
- move model metadata to a shared modal/catalogue.py source of truth and keep modal/registry.py as a compatibility re-export
- add src/models/modal_catalogue.py bridge and resolve config/models.yaml endpoint keys into concrete model/base_url/api_key bindings
- make live-path detection depend on Modal bindings (MODAL_WORKSPACE or MODAL_LLM_BASE_URL) and remove generic cloud-model fallback defaults
- switch memory index default embeddings to local sentence-transformers and document the off-grid behavior
- add ADR-0019 and update architecture/deployment docs, env examples, tests, and lockfile
Co-authored-by: Codex <codex@openai.com>
chore: add codex project configuration
agharsallah+1: Codex
e0d6b85
Co-authored-by: Codex <codex@openai.com>
feat: update model endpoint URLs and enhance documentation with mermaid diagrams
agharsallah
2a8eab2
feat: add architecture review and scenario authoring documentation
agharsallah
49aa5c4
Merge pull request #2 from abducodez/worktree-modal-init
Abderrahmen Gharsallah
Unverified signature
7e71cdc
OpenAPI documentation
feat: mem0 as a layered, derived semantic memory index
agharsallah+1: Codex
f487b74
Add a MemoryIndex abstraction and a mem0-backed implementation that upgrades the
salience relevance term with semantic search. Layered + derived: the index is
populated from ledger events (keyed by event.id, idempotent and rebuildable), so
the append-only ledger remains the single source of truth (ADR-0005 preserved).
Env-gated by MEMORY_INDEX; offline keeps the keyword path. 258 passed, 2 skipped.
ADR-0018.
Co-Authored-By: Codex <codex@openai.com>