docs: add Agent Endpoints page under Tools#98
Conversation
Documents the Hyperscan agent API — machine-readable markdown endpoints for AI agents to interact with the hypercerts network (read, write guides, lexicons, governance, GraphQL). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request introduces Agent Endpoints documentation and navigation entry, refactors the LastUpdated component from imperative DOM manipulation to declarative JSX rendering, repositions it within the page layout, and adds cross-references to the new Agent Endpoints feature throughout existing documentation pages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pages/tools/agent-endpoints.md`:
- Line 8: Update the wording that claims "All endpoints return `text/markdown`"
so it only applies to the agent endpoints (explicitly mention the `/agents/*`
routes) and not to other APIs like the Hyperindex GraphQL API; search for the
same claim later (lines referencing Hyperindex GraphQL/API) and change those
instances to clarify that non-agent endpoints may use other content types (e.g.,
GraphQL JSON), making the Markdown statement scoped to `/agents/*` only.
- Line 40: Update the user-facing sentence "Hyperscan also serves step-by-step
write guides as markdown." so the proper noun is capitalized: change "markdown"
to "Markdown" wherever that exact sentence appears (e.g., the guide intro string
in pages/tools/agent-endpoints.md).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 657f8de9-f17b-492e-ab19-53d1071541b8
📒 Files selected for processing (2)
lib/navigation.jspages/tools/agent-endpoints.md
|
|
||
| # Agent Endpoints | ||
|
|
||
| The agent endpoints provide machine-readable API access for AI agents and scripts. All endpoints return `text/markdown` for easy consumption — no HTML parsing needed. |
There was a problem hiding this comment.
Scope the Markdown claim to the /agents/* routes.
The page later introduces the Hyperindex GraphQL API, which is not a Markdown endpoint. As written, “All endpoints return text/markdown” is too broad and can mislead integrators about how to parse responses.
✏️ Suggested wording
-The agent endpoints provide machine-readable API access for AI agents and scripts. All endpoints return `text/markdown` for easy consumption — no HTML parsing needed.
+The `/agents/*` endpoints provide machine-readable API access for AI agents and scripts. Those routes return `text/markdown` for easy consumption — no HTML parsing needed.Also applies to: 56-61
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pages/tools/agent-endpoints.md` at line 8, Update the wording that claims
"All endpoints return `text/markdown`" so it only applies to the agent endpoints
(explicitly mention the `/agents/*` routes) and not to other APIs like the
Hyperindex GraphQL API; search for the same claim later (lines referencing
Hyperindex GraphQL/API) and change those instances to clarify that non-agent
endpoints may use other content types (e.g., GraphQL JSON), making the Markdown
statement scoped to `/agents/*` only.
|
|
||
| ## Write guides | ||
|
|
||
| Hyperscan also serves step-by-step write guides as markdown. Fetch the index or jump to a specific guide: |
There was a problem hiding this comment.
Capitalize “Markdown” in the guide intro.
This is user-facing copy, so the proper noun should be capitalized here.
✏️ Suggested wording
-Hyperscan also serves step-by-step write guides as markdown. Fetch the index or jump to a specific guide:
+Hyperscan also serves step-by-step write guides as Markdown. Fetch the index or jump to a specific guide:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Hyperscan also serves step-by-step write guides as markdown. Fetch the index or jump to a specific guide: | |
| Hyperscan also serves step-by-step write guides as Markdown. Fetch the index or jump to a specific guide: |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~40-~40: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...lso serves step-by-step write guides as markdown. Fetch the index or jump to a specific ...
(MARKDOWN_NNP)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pages/tools/agent-endpoints.md` at line 40, Update the user-facing sentence
"Hyperscan also serves step-by-step write guides as markdown." so the proper
noun is capitalized: change "markdown" to "Markdown" wherever that exact
sentence appears (e.g., the guide intro string in
pages/tools/agent-endpoints.md).
|
finding a couple of small things, going to fix it and then merge it afterwards |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
pages/tools/agent-endpoints.md (1)
14-14:⚠️ Potential issue | 🟡 MinorCapitalize “Markdown” in the prose.
Keep
text/markdownlowercase as the MIME type, but the noun in this sentence should be capitalized.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pages/tools/agent-endpoints.md` at line 14, Update the prose where it currently reads "The endpoint returns a self-describing markdown document..." to capitalize the noun "Markdown" (i.e., "self-describing Markdown document"); keep any MIME type occurrences as `text/markdown` lowercase. Locate and change the literal phrase "self-describing markdown document" to "self-describing Markdown document" in the pages/tools/agent-endpoints.md content.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/LastUpdated.js`:
- Around line 11-18: The rendered date currently uses new
Date(date).toLocaleDateString(...) which depends on the server/runtime locale
and causes SSR hydration mismatches; update the LastUpdated component to pass an
explicit timeZone option (e.g., timeZone: 'UTC' or your chosen fixed zone) into
toLocaleDateString (or toLocaleString) so the server and client produce the same
calendar date for the ISO timestamp; locate the new
Date(date).toLocaleDateString call in LastUpdated.js and add the timeZone option
alongside year/month/day tofix the inconsistency.
---
Duplicate comments:
In `@pages/tools/agent-endpoints.md`:
- Line 14: Update the prose where it currently reads "The endpoint returns a
self-describing markdown document..." to capitalize the noun "Markdown" (i.e.,
"self-describing Markdown document"); keep any MIME type occurrences as
`text/markdown` lowercase. Locate and change the literal phrase "self-describing
markdown document" to "self-describing Markdown document" in the
pages/tools/agent-endpoints.md content.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 62040e2b-87f5-43f6-ab11-9c7c494e8977
📒 Files selected for processing (9)
.beads/issues.jsonlcomponents/LastUpdated.jscomponents/Layout.jslib/lastUpdated.jsonpages/architecture/indexers-and-discovery.mdpages/getting-started/building-on-hypercerts.mdpages/getting-started/working-with-evaluations.mdpages/reference/faq.mdpages/tools/agent-endpoints.md
✅ Files skipped from review due to trivial changes (2)
- lib/lastUpdated.json
- pages/architecture/indexers-and-discovery.md
| return ( | ||
| <p className="last-updated"> | ||
| Last updated{' '} | ||
| {new Date(date).toLocaleDateString('en-US', { | ||
| year: 'numeric', | ||
| month: 'long', | ||
| day: 'numeric', | ||
| })} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
git ls-files components/ lib/ | head -20Repository: hypercerts-org/documentation
Length of output: 545
🏁 Script executed:
cat -n components/LastUpdated.jsRepository: hypercerts-org/documentation
Length of output: 725
🏁 Script executed:
head -100 lib/lastUpdated.jsonRepository: hypercerts-org/documentation
Length of output: 2989
🏁 Script executed:
#!/bin/bash
set -euo pipefail
node <<'NODE'
const fs = require('fs');
const data = JSON.parse(fs.readFileSync('lib/lastUpdated.json', 'utf8'));
const zones = ['UTC', 'America/Los_Angeles', 'Asia/Singapore'];
const problems = [];
for (const [route, iso] of Object.entries(data)) {
const rendered = Object.fromEntries(
zones.map((tz) => [
tz,
new Intl.DateTimeFormat('en-US', {
timeZone: tz,
year: 'numeric',
month: 'long',
day: 'numeric',
}).format(new Date(iso)),
]),
);
if (new Set(Object.values(rendered)).size > 1) {
problems.push({ route, iso, rendered });
}
}
if (problems.length === 0) {
console.log('✓ No timestamps found that format to different dates across timezones.');
} else {
console.log(`Found ${problems.length} routes with timezone-dependent formatting:\n`);
problems.forEach(p => {
console.log(`Route: ${p.route}`);
console.log(`ISO: ${p.iso}`);
console.log(`Rendered:`, p.rendered);
console.log('');
});
}
NODERepository: hypercerts-org/documentation
Length of output: 1258
Use a fixed time zone for this rendered date.
toLocaleDateString() defaults to the runtime's local zone, causing SSR to render one calendar day while the browser hydrates to another. The timestamps in lib/lastUpdated.json have offset-bearing ISO formats, and at least 6 routes currently format to different dates across time zones (UTC vs America/Los_Angeles vs Asia/Singapore), surfacing as hydration warnings and inconsistent "Last updated" dates.
💡 Proposed fix
+const lastUpdatedFormatter = new Intl.DateTimeFormat('en-US', {
+ timeZone: 'UTC',
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+});
+
export function LastUpdated() {
const router = useRouter();
const currentPath = router.asPath.split('#')[0].split('?')[0];
const date = lastUpdated[currentPath];
if (!date) return null;
return (
<p className="last-updated">
Last updated{' '}
- {new Date(date).toLocaleDateString('en-US', {
- year: 'numeric',
- month: 'long',
- day: 'numeric',
- })}
+ {lastUpdatedFormatter.format(new Date(date))}
</p>
);
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@components/LastUpdated.js` around lines 11 - 18, The rendered date currently
uses new Date(date).toLocaleDateString(...) which depends on the server/runtime
locale and causes SSR hydration mismatches; update the LastUpdated component to
pass an explicit timeZone option (e.g., timeZone: 'UTC' or your chosen fixed
zone) into toLocaleDateString (or toLocaleString) so the server and client
produce the same calendar date for the ISO timestamp; locate the new
Date(date).toLocaleDateString call in LastUpdated.js and add the timeZone option
alongside year/month/day tofix the inconsistency.
Summary
Test plan
/tools/agent-endpoints🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation