Adopt VoltAgent behind a shared Reflect runtime seam#186
Conversation
- Emphasize the importance of clear, actionable comments for junior contributors. - Prioritize quality of comments and JSDoc over numeric coverage targets. - Encourage the use of plain language to improve understanding of non-obvious code. - Codify guidelines for when to use JSDoc, focusing on exported surfaces and architectural seams.
- Correct project documentation references in AGENTS.md. - Revise README.md to clarify the reliance on OpenAI-backed runtime. - Enhance Discord bot context in defaults.yaml to specify the AI runtime layer.
- Adjust command execution logic to ensure Windows batch files are launched reliably using cmd.exe. - Update argument handling for commands ending with .cmd to accommodate Windows-specific requirements.
- Introduced structured retrieval facts in response metadata, including requested and used flags, intent, and context size. - Added functions to derive evidence and freshness scores based on citation counts for retrieved responses. - Implemented fallback mechanisms for markdown link citations when structured annotations are absent. - Updated tests to validate the new retrieval context and scoring logic for various scenarios.
…ime package - Clarified the ownership of the public Reflect contract and traces by the backend, while detailing the role of `@footnote/agent-runtime` in managing the execution layer. - Added explicit documentation for the Agent Runtime package, highlighting its significance and the current state of runtime implementations, including VoltAgent and legacy fallback. - Updated various sections to emphasize the separation of responsibilities between backend and agent runtime, ensuring contributors understand the architecture and execution flow.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdded a new package Changes
Sequence DiagramsequenceDiagram
participant Client
participant Handler as Reflect Handler
participant Orchestrator as Reflect Orchestrator
participant Runtime as GenerationRuntime
participant Legacy as Legacy OpenAI Runtime
participant Volt as VoltAgent Runtime
Client->>Handler: Reflect request
Handler->>Orchestrator: create/invoke orchestration
Orchestrator->>Runtime: generate(GenerationRequest)
alt fallback to legacy or search routing
alt kind = "voltagent" and no search
Runtime->>Legacy: delegate (fallback)
Legacy-->>Runtime: GenerationResult
else executor path (VoltAgent)
Runtime->>Volt: execute generation
Volt-->>Runtime: GenerationResult
end
end
Runtime-->>Orchestrator: GenerationResult
Orchestrator->>Handler: build metadata (retrieval context, chips) and response
Handler-->>Client: Reflect response with metadata
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
…kage files - Added package.json and tsconfig.json for the agent-runtime package to the Docker build context. - Included source files for the agent-runtime package in the Docker image to ensure proper functionality.
…r type safety - Changed the type of plannerMessages to RuntimeMessage[] to ensure consistency with the expected message structure. - Added import for RuntimeMessage from the agent-runtime package to support the new type definition.
…gacy OpenAI runtime error handling - Updated tsconfig.json to use NodeNext module and resolution for better compatibility. - Added error handling in legacyOpenAiRuntime to throw an error when the requested model is missing. - Introduced a new test to ensure the legacy runtime fails fast when the model is not provided. - Updated reflect service to preserve the caller-requested model when the runtime omits one, ensuring consistent model usage.
Refactors
reflectto run through a new internal@footnote/agent-runtimepackage, with VoltAgent as the active plain-text runtime and the legacy OpenAI path retained as a search fallback. Backend remains the sole public boundary and still owns planner behavior, provenance metadata, traces, auth, and API contracts.Also fixes provenance regressions uncovered during the cutover by:
Summary by CodeRabbit
New Features
Documentation
Tests
Chores