docs(server-hono): add README with usage and configuration reference#1351
docs(server-hono): add README with usage and configuration reference#1351nuthalapativarun wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughA new Changesserver-hono Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 markdownlint-cli2 (0.22.1)packages/server-hono/README.mdmarkdownlint-cli2 wrapper config was not available before execution 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/server-hono/README.md (1)
118-122: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExpand
createVoltAgentAppexample with parameter documentation.The example on lines 118–122 shows only the function call signature without explaining what
depsandconfigparameters are or how to construct them. This may confuse users trying to integrate the app into existing Node.js servers. Consider either adding inline documentation or a more detailed code example.Example of an improved explanation:
import { createVoltAgentApp } from "`@voltagent/server-hono`"; // deps: VoltAgentDependencies with your agents, tools, etc. // config: HonoServerConfig for port, cors, auth, etc. const app = createVoltAgentApp(deps, config); // Now embed app into your existing server: // server.use(app.fetch); // for standard Node.js fetch handler🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/server-hono/README.md` around lines 118 - 122, The `createVoltAgentApp` example in the README lacks clarity about its parameters and usage. Expand the documentation by adding inline comments that explain what the `deps` parameter (VoltAgentDependencies with agents and tools) and `config` parameter (HonoServerConfig with port, cors, auth settings) represent, and include a practical example demonstrating how to integrate the returned app into an existing Node.js server using the fetch handler method.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/server-hono/README.md`:
- Line 13: The GitHub URLs in the README file use inconsistent capitalization
for the organization name. Replace all instances of lowercase `voltagent` in the
GitHub URLs on lines 13, 21, and 22 with the correct mixed-case capitalization
`VoltAgent`. Update the href in the Examples link and the organization
references in the other URLs to consistently use
`https://github.com/VoltAgent/voltagent` instead of
`https://github.com/voltagent/voltagent`.
---
Nitpick comments:
In `@packages/server-hono/README.md`:
- Around line 118-122: The `createVoltAgentApp` example in the README lacks
clarity about its parameters and usage. Expand the documentation by adding
inline comments that explain what the `deps` parameter (VoltAgentDependencies
with agents and tools) and `config` parameter (HonoServerConfig with port, cors,
auth settings) represent, and include a practical example demonstrating how to
integrate the returned app into an existing Node.js server using the fetch
handler method.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 23af273a-174b-44e3-bccb-e4801f01a1a9
📒 Files selected for processing (2)
.changeset/server-hono-readme.mdpackages/server-hono/README.md
| <div align="center"> | ||
| <a href="https://voltagent.dev">Home Page</a> | | ||
| <a href="https://voltagent.dev/docs/">Documentation</a> | | ||
| <a href="https://github.com/voltagent/voltagent/tree/main/examples">Examples</a> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major
🧩 Analysis chain
🌐 Web query:
What is the correct GitHub organization URL for VoltAgent?
💡 Result:
The correct GitHub organization URL for VoltAgent is https://github.com/VoltAgent [1]. This organization serves as the central hub for the VoltAgent AI Agent Engineering Platform, hosting its open-source TypeScript framework [2][1] and various related repositories [3][1].
Citations:
- 1: https://github.com/VoltAgent
- 2: https://github.com/VoltAgent/voltagent/
- 3: https://github.com/voltagent
🏁 Script executed:
cat -n packages/server-hono/README.md | sed -n '1,140p'Repository: VoltAgent/voltagent
Length of output: 6580
Correct GitHub organization capitalization in all URLs.
The GitHub URLs use inconsistent capitalization for the organization name. Lines 13, 21, and 22 use lowercase voltagent, while lines 32 and 127 use VoltAgent. The correct capitalization is VoltAgent (mixed case). Update all instances to:
- Line 13:
https://github.com/VoltAgent/voltagent/tree/main/examples - Lines 21–22:
https://github.com/VoltAgent/voltagent - Lines 32 & 127: Already correct
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/server-hono/README.md` at line 13, The GitHub URLs in the README
file use inconsistent capitalization for the organization name. Replace all
instances of lowercase `voltagent` in the GitHub URLs on lines 13, 21, and 22
with the correct mixed-case capitalization `VoltAgent`. Update the href in the
Examples link and the organization references in the other URLs to consistently
use `https://github.com/VoltAgent/voltagent` instead of
`https://github.com/voltagent/voltagent`.
There was a problem hiding this comment.
1 issue found across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…ltAgentApp example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 3a8efd9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Fixed — added |
|
Fixed — expanded the |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/server-hono/README.md">
<violation number="1" location="packages/server-hono/README.md:79">
P2: README contains conflicting auth guidance: the configuration table marks `auth` as deprecated, but the Authentication example still uses the deprecated `auth` option. Update the example to use `authNext` with `provider: jwtAuth(...)` or clearly label it as legacy.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| | `enableSwaggerUI` | `boolean` | `true` in development | Enable the `/ui` Swagger UI route | | ||
| | `resumableStream` | `{ adapter, defaultEnabled? }` | — | Configure a [`@voltagent/resumable-streams`](https://github.com/VoltAgent/voltagent/tree/main/packages/resumable-streams) adapter | | ||
| | `configureApp` | `(app: Hono) => void` | — | Register custom routes/middleware directly on the Hono app | | ||
| | `auth` | `AuthProvider` | — | Authentication provider for protecting execution endpoints. **Deprecated** — use `authNext` instead | |
There was a problem hiding this comment.
P2: README contains conflicting auth guidance: the configuration table marks auth as deprecated, but the Authentication example still uses the deprecated auth option. Update the example to use authNext with provider: jwtAuth(...) or clearly label it as legacy.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/server-hono/README.md, line 79:
<comment>README contains conflicting auth guidance: the configuration table marks `auth` as deprecated, but the Authentication example still uses the deprecated `auth` option. Update the example to use `authNext` with `provider: jwtAuth(...)` or clearly label it as legacy.</comment>
<file context>
@@ -76,6 +76,8 @@ This starts an HTTP server exposing the agent/workflow/tool/memory/observability
| `enableSwaggerUI` | `boolean` | `true` in development | Enable the `/ui` Swagger UI route |
| `resumableStream` | `{ adapter, defaultEnabled? }` | — | Configure a [`@voltagent/resumable-streams`](https://github.com/VoltAgent/voltagent/tree/main/packages/resumable-streams) adapter |
| `configureApp` | `(app: Hono) => void` | — | Register custom routes/middleware directly on the Hono app |
+| `auth` | `AuthProvider` | — | Authentication provider for protecting execution endpoints. **Deprecated** — use `authNext` instead |
+| `authNext` | `AuthNextConfig` | — | Next-gen authentication policy. All routes are protected by default; configure `publicRoutes` and console access via the config |
</file context>
PR Checklist
<type>(<scope>): <description>)Bugs / Features
pnpm changeset)What is the current behavior?
@voltagent/server-honohas no README, so users have no documentation for installing or configuring the default Hono server adapter.What is the new behavior?
Adds a README covering installation, basic usage, the
HonoServerConfigoptions, JWT authentication setup, and the custom-endpoint/app-factory helpers.Notes for reviewers
Mirrors the style/structure of the recently added
@voltagent/server-coreREADME (#1331) and links to it for the framework-agnostic internals this package builds on.Summary by cubic
Add a README for
@voltagent/server-honocovering install, usage,HonoServerConfig(CORS, Swagger UI, resumable streams,auth/authNext),jwtAuth, and helpers includingcreateVoltAgentAppwith an expanded embed example. Improves setup clarity and links to@voltagent/server-core.Written for commit 3a8efd9. Summary will update on new commits.
Summary by CodeRabbit