Repository navigation
Opt examples - #95
Merged
Merged
Opt examples#95
Conversation
…trols Introduce end-to-end LLM I/O observability and CLI ergonomics for multi-turn sessions. Observability: - Add LLMIOCaptureHook to persist raw request/response/usage records as JSONL for every model call. - Prefer conversation_id as trace file key (<conversation_id>.llm_io.jsonl) and fall back to run_id when absent. - Keep original LLM payload fidelity in records (request.messages/tools/metadata + response.content/tool_calls/metadata). - Add summarize_llm_io_trace utility and a standalone scripts/llm_io_summary.py helper. - Extend summary script to aggregate all trace files, show per-call previews, and optionally print user history with --show-history. Runtime propagation: - Enrich DareAgent hook/event payloads with conversation_id when provided in Task metadata. - Preserve compatibility by leaving existing run_id/task_id/session_id behavior intact. - Ensure AFTER_MODEL hook payload contains model_output used by capture hook. Builder and docs: - Auto-inject llm_io_capture hook from DareAgentBuilder when capture_content or DARE_LLM_IO_CAPTURE is enabled. - Document new local capture behavior and keying rules in observability usage docs. Example 04 CLI improvements: - Add visible approval wait events and interactive approval resolution (once/workspace/deny). - Add /approvals command family (list/poll/grant/deny/revoke). - Add --workspace support (default current cwd) and --conversation-id for stable session tracing. - Thread a single conversation_id through the whole CLI session and inject it into Task metadata. Tests: - Add focused unit coverage for capture hook, summary script, 04 CLI behavior, and hook payload propagation. - Update existing builder/hook governance tests to cover new observability paths. Verification: - .venv/bin/pytest tests/unit/test_builder_hook_ordering.py tests/unit/test_dare_agent_hook_governance.py tests/unit/test_llm_io_capture_hook.py tests/unit/test_llm_io_summary_script.py tests/unit/test_examples_04_cli.py tests/unit/test_examples_cli.py tests/unit/test_examples_cli_mcp.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope (One PR One Thing)
Changed Files (required)
List all touched files and why each file changed.
If this PR is a large diff (>300 changed lines), explain why split PRs are not possible and provide a split follow-up plan.
Acceptance Criteria
Test Evidence (required)
.........If this PR changes high-risk runtime paths (auth/concurrency/execution control), include
risk-matrixevidence.Risk and Rollback
Dependency and Lockfile Changes
requirements.txt/pyproject.toml/package.json): [ ] Yes [ ] No [ ] N/AAgent Rules Checklist (required)
Reference:
docs/agent_rules.mdskip/only/excludeusage is explained and reviewed