feat(commentary): refine rafters-critic persona and improve commentary prompt for humor
agharsallah
26bc5b9
feat(commentary): introduce universal rafters-critic for scenario commentary and cadence control
agharsallah
f637227
feat(commentator): update cadence logic to use a fixed count instead of per-speaker quorum
agharsallah
11f4e9a
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: Enhance Secret Keeper's response logic to confirm correct guesses and improve consistency in answers
agharsallah
3966dc5
feat: Implement early termination for the judge in Twenty Sprouts game and enhance event handling
agharsallah
0460922
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.
Merge remote-tracking branch 'origin/main' into 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: update agent personas and scheduling in YAML configurations; enhance event handling and memory deduplication in core logic
Adds the agent-layer instrumentation that was accidentally omitted from the
Units 2-6 commit: a DEBUG agent.prompt log carrying the FULL assembled prompt
each agent sends to its model, an agent.resolve child span recording the
structured/prose/offline path taken, and agent.acted / agent.repeat_skip /
agent.prose_fallback logs. This completes the "see the prompts each agent
sends" requirement.
Co-Authored-By: Codex <codex@openai.com>
feat: implement streaming agent responses and enhance conversation flow with repeat guards
agharsallah
0b0d9be
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.
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…
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>
feat: Instructor-validated structured output on the live path
agharsallah+1: Codex
99293d7
Replace prompt-and-regex JSON with Instructor (Pydantic-validated, retried) on
the live path, wrapping the LiteLLM client; the kind is constrained to may_emit
by construction, so malformed prose can no longer enter the ledger. Degrade
chain: structured -> tolerant parser -> _raw_fallback (offline stub keeps the
parser). Token/cost metering preserved. 226 passed, 1 skipped. ADR-0016.
Co-Authored-By: Codex <codex@openai.com>
Refactor code structure for improved readability and maintainability
Five new engine modules (zero breaking changes to existing tests):
Manifest system (src/core/manifest.py):
- AgentManifest: full declarative spec — identity, communication contract,
scheduling, model profile, memory config, capability grants
- ModelProfile: tiny|fast|balanced|strong → resolved to concrete model name
via env vars (MODEL_TINY / MODEL_FAST / MODEL_BALANCED / MODEL_STRONG)
- MemoryConfig: window, use_salience, salience_top_k, reflection_threshold
- ScheduleConfig: tick_every, max_consecutive
Structured output (src/core/structured.py):
- json_instruction(): appends JSON constraint block to every agent prompt
- parse_agent_output(): three-tier parser (clean JSON → embedded JSON → fallback wrap)
- _raw_fallback flag for compliance rate tracking
- Works with any model on any endpoint — constraint is in the prompt, not tool-use
Salience-scored memory (src/core/memory.py):
- SalienceMemory: ranks visible events by relevance×recency×importance score
…
Engine additions (zero scenario edits required):
- EpisodicMemory: per-agent filtered view over the ledger; agents see only their
own actions and globally-visible event kinds, capped at 8 events for small-model
context windows
- ContextBuilder: single point of prompt assembly (persona → scene → memory →
visitor disturbances); changing prompt strategy is now a one-file edit
- Governor: enforces max_turns / max_calls_per_turn / max_total_calls; raises
BudgetExceeded before a runaway cascade can burn quota
Model provider:
- OpenAICompatProvider: works with any OpenAI-compatible endpoint; config via
OPENAI_API_KEY / OPENAI_BASE_URL / MODEL_NAME; falls back to deterministic stub
when no key is present
Agents + scenarios:
- All four Tiny Wood agents use ContextBuilder with rich personas and episodic memory
- New EchoAgent transforms visitor injections through the wood's logic
- Mystery Roots (src/scenarios/mystery_roots.py): convergent blackboard swarm with
ClueGatherer / Hyp…