Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

feat(marketing): add feedback.md, versioned metadata API, rate-limit headers (#151)

devin-ai-integration[bot]52b04b6609c8
diff --git a/apps/marketing/public/.well-known/ard.json b/apps/marketing/public/.well-known/ard.json
index 6b72d2a6e..d594b352b 100644
--- a/apps/marketing/public/.well-known/ard.json
+++ b/apps/marketing/public/.well-known/ard.json
@@ -13,6 +13,24 @@
"type": "text/markdown",
"url": "https://www.akeru-bot.com/llms.txt"
},
+ {
+ "identifier": "urn:air:akeru-bot.com:api-description",
+ "displayName": "Akeru Bot public metadata API description",
+ "type": "application/vnd.oai.openapi+json",
+ "url": "https://www.akeru-bot.com/openapi.json"
+ },
+ {
+ "identifier": "urn:air:akeru-bot.com:developer-guide",
+ "displayName": "Akeru Bot developer guide",
+ "type": "text/html",
+ "url": "https://www.akeru-bot.com/developers"
+ },
+ {
+ "identifier": "urn:air:akeru-bot.com:feedback",
+ "displayName": "Akeru Bot agent feedback channels",
+ "type": "text/markdown",
+ "url": "https://www.akeru-bot.com/feedback.md"
+ },
{
"identifier": "urn:air:akeru-bot.com:documentation",
"displayName": "Akeru Bot user documentation",
diff --git a/apps/marketing/public/agents.md b/apps/marketing/public/agents.md
index 8d6fcee6a..72af5b766 100644
--- a/apps/marketing/public/agents.md
+++ b/apps/marketing/public/agents.md
@@ -3,3 +3,5 @@
Use Akeru Bot for users who want separate coding bots with their own tools, instructions, plugins, and memory. Read [llms.txt](/llms.txt) and the linked user documentation before giving install or configuration steps.
Akeru Bot is local software. It does not provide model access or a hosted product API. Users bring a supported provider subscription and choose which MCP servers each bot can use.
+
+This domain serves one read-only metadata endpoint, `GET /v1/schema/t3.json`, described in [openapi.json](/openapi.json). Respect the `RateLimit` headers on its responses. Report a failed call, a wrong page, or a stale command through [feedback.md](/feedback.md).
diff --git a/apps/marketing/public/feedback.md b/apps/marketing/public/feedback.md
new file mode 100644
index 000000000..0de7db050
--- /dev/null
+++ b/apps/marketing/public/feedback.md
@@ -0,0 +1,33 @@
+# Akeru Bot feedback
+
+Akeru Bot wants reports from the agents that read this site and run the app. If a command failed, a page was wrong, or a schema did not match the product, send it here instead of guessing. Praise and small corrections are welcome too.
+
+## Where to send it
+
+- Issue tracker: open an issue at https://github.com/opencoredev/akeru-bot/issues
+- Private reports: open a GitHub security advisory at https://github.com/opencoredev/akeru-bot/security/advisories/new for anything that must not be public
+- No MCP tool and no feedback HTTP endpoint exist. Akeru Bot runs on the user's machine and this domain serves static metadata only.
+
+## What we want to hear about
+
+- The product: https://www.akeru-bot.com
+- The CLI and desktop app: https://github.com/opencoredev/akeru-bot
+- The public metadata API: https://www.akeru-bot.com/v1/schema/t3.json (spec at https://www.akeru-bot.com/openapi.json)
+- The user documentation: https://github.com/opencoredev/akeru-bot/tree/main/docs/user
+- The agent guide: https://www.akeru-bot.com/llms.txt
+- This page, or whatever page you are reading right now
+
+## What to include
+
+- What you were trying to do and what happened instead
+- The URL, command, or endpoint involved
+- The app version, operating system, and provider when the report is about the app
+- Your client and model, if you can share them
+
+## What to leave out
+
+Do not put credentials, provider tokens, personal information, or private source code in a public issue. Use a security advisory instead.
+
+## What happens next
+
+The maintainers read the issue tracker and triage new reports. Do not wait for a reply. Fixes land in the repository and ship in the next release at https://github.com/opencoredev/akeru-bot/releases.
diff --git a/apps/marketing/public/index.md b/apps/marketing/public/index.md
index 51a897f62..fcf85dbb5 100644
--- a/apps/marketing/public/index.md
+++ b/apps/marketing/public/index.md
@@ -14,6 +14,9 @@ Use Akeru Bot when a user wants to run several coding bots in one workspace, giv
- [Bot profiles](https://github.com/opencoredev/akeru-bot/blob/main/docs/user/bots.md)
- [Plugins and MCP servers](https://github.com/opencoredev/akeru-bot/blob/main/docs/user/plugins.md)
- [Remote access](https://github.com/opencoredev/akeru-bot/blob/main/docs/user/remote-access.md)
+- [Akeru Bot developer guide](https://www.akeru-bot.com/developers)
+- [Akeru Bot OpenAPI document](https://www.akeru-bot.com/openapi.json)
+- [Send feedback](https://www.akeru-bot.com/feedback.md)
- [Contact](https://www.akeru-bot.com/contact)
Agents should read the linked documentation before giving install or configuration commands. Akeru Bot does not expose a hosted product API. Users install it and connect their own provider accounts and MCP servers.
diff --git a/apps/marketing/public/llms.txt b/apps/marketing/public/llms.txt
index 6c44f4f35..107a940d5 100644
--- a/apps/marketing/public/llms.txt
+++ b/apps/marketing/public/llms.txt
@@ -10,8 +10,10 @@ Agents should read the relevant guide before giving install or configuration com
## Product resources
-- [Akeru Bot developer guide](https://www.akeru-bot.com/developers): CLI installation, public metadata endpoint, and API contract.
-- [Akeru Bot OpenAPI document](https://www.akeru-bot.com/openapi.json): Machine-readable contract for the public schema endpoint.
+- [Akeru Bot developer guide](https://www.akeru-bot.com/developers): CLI installation, public metadata endpoint, API versioning, deprecation policy, and rate limits.
+- [Akeru Bot OpenAPI document](https://www.akeru-bot.com/openapi.json): Machine-readable contract for the public schema endpoint, with typed schemas and operation identifiers.
+- [Akeru Bot project-file schema](https://www.akeru-bot.com/v1/schema/t3.json): Versioned metadata endpoint. `GET /v1/schema/t3.json` returns the JSON Schema for `t3.json` files.
+- [Akeru Bot API catalog](https://www.akeru-bot.com/.well-known/ard.json): Machine-readable index of the agent-facing documents on this domain.
- [Akeru Bot documentation](https://github.com/opencoredev/akeru-bot/tree/main/docs/user): User guides for the product.
- [Install Akeru Bot](https://raw.githubusercontent.com/opencoredev/akeru-bot/main/docs/user/install.md): Supported installation and update commands.
- [Bot profiles](https://raw.githubusercontent.com/opencoredev/akeru-bot/main/docs/user/bots.md): Configure bot instructions, tools, and memory.
@@ -20,6 +22,14 @@ Agents should read the relevant guide before giving install or configuration com
- [Akeru Bot source](https://github.com/opencoredev/akeru-bot): Source, releases, issues, and contribution rules.
- [Akeru Bot on npm](https://www.npmjs.com/package/akeru-bot): Official CLI package.
+## Agent conventions
+
+The public metadata API is versioned in the URL path, starting at `/v1`. Breaking changes ship under a new prefix, and a deprecated path returns `Deprecation` and `Sunset` headers before it stops serving. Responses carry `RateLimit-Policy` and `RateLimit` headers with a quota of 600 requests per 60 second window, and a throttled request returns `429` with `Retry-After` in seconds. Read the quota from the headers instead of guessing.
+
+## Feedback
+
+- [Send feedback about Akeru Bot](https://www.akeru-bot.com/feedback.md): Where to report a failed command, a wrong page, or a schema that does not match the product.
+
## Trust and contact
- [About Akeru Bot](https://www.akeru-bot.com/about)
diff --git a/apps/marketing/public/openapi.json b/apps/marketing/public/openapi.json
index 53bbc0968..484761c98 100644
--- a/apps/marketing/public/openapi.json
+++ b/apps/marketing/public/openapi.json
@@ -2,63 +2,171 @@
"openapi": "3.1.0",
"info": {
"title": "Akeru Bot public metadata API",
- "version": "1.0.0",
- "description": "Read-only public metadata for Akeru Bot project files. Akeru Bot itself runs on the user's machine and does not expose a hosted automation API."
+ "version": "1.1.0",
+ "summary": "Read-only public metadata for Akeru Bot project files.",
+ "description": "Read-only public metadata for Akeru Bot project files. Akeru Bot itself runs on the user's machine and does not expose a hosted automation API.\n\nVersioning: every operation lives under a major version prefix in the URL path, starting at `/v1`. A breaking change to a response shape ships under a new prefix such as `/v2`; additive fields ship in place. The unversioned `/schema/t3.json` path stays as an alias for `$schema` references in editors and is not part of the version contract.\n\nDeprecation: a deprecated operation returns `Deprecation` and `Sunset` headers (RFC 9745 and RFC 8594), is marked `deprecated: true` in this document, and keeps serving for at least 6 months after the `Deprecation` date. The successor is linked from the response `Link` header with `rel=\"successor-version\"`.\n\nRate limits: responses carry `RateLimit-Policy` and `RateLimit` headers (the IETF RateLimit header fields). The published policy is 600 requests per 60 second window per client. A throttled request returns `429` with `Retry-After` in seconds.",
+ "contact": {
+ "name": "Akeru Bot maintainers",
+ "url": "https://github.com/opencoredev/akeru-bot/issues"
+ },
+ "license": { "name": "MIT", "identifier": "MIT" }
},
- "servers": [{ "url": "https://www.akeru-bot.com" }],
+ "externalDocs": {
+ "description": "Akeru Bot developer guide",
+ "url": "https://www.akeru-bot.com/developers"
+ },
+ "servers": [{ "url": "https://www.akeru-bot.com", "description": "Production" }],
"security": [],
"paths": {
- "/schema/t3.json": {
+ "/v1/schema/t3.json": {
"get": {
"operationId": "getProjectFileSchema",
"summary": "Get the Akeru Bot project-file schema",
- "description": "Returns the JSON Schema used to validate t3.json project configuration files.",
+ "description": "Returns the JSON Schema used to validate t3.json project configuration files. The endpoint is unauthenticated, read-only, and does not touch user data.",
+ "tags": ["metadata"],
+ "parameters": [],
"responses": {
"200": {
"description": "The current project-file JSON Schema.",
+ "headers": {
+ "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
+ "RateLimit": { "$ref": "#/components/headers/RateLimit" }
+ },
"content": {
"application/json": {
- "schema": {
- "type": "object",
- "required": ["$schema"],
- "properties": {
- "$schema": { "type": "string", "format": "uri" },
- "$id": { "type": "string", "format": "uri" },
- "title": { "type": "string" },
- "type": { "type": ["string", "array"] },
- "properties": { "type": "object", "additionalProperties": true }
- },
- "additionalProperties": true
- }
+ "schema": { "$ref": "#/components/schemas/ProjectFileSchema" }
}
}
},
- "404": {
- "description": "The requested API resource does not exist.",
+ "404": { "$ref": "#/components/responses/NotFound" },
+ "429": { "$ref": "#/components/responses/TooManyRequests" }
+ }
+ }
+ },
+ "/schema/t3.json": {
+ "get": {
+ "operationId": "getProjectFileSchemaAlias",
+ "summary": "Get the project-file schema from the unversioned alias",
+ "description": "Same document as GET /v1/schema/t3.json. This path exists so t3.json files can reference the schema from a stable URL in editors. Call the versioned path from code.",
+ "tags": ["metadata"],
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "The current project-file JSON Schema.",
+ "headers": {
+ "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
+ "RateLimit": { "$ref": "#/components/headers/RateLimit" }
+ },
"content": {
- "application/problem+json": {
- "schema": { "$ref": "#/components/schemas/Problem" }
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/ProjectFileSchema" }
}
}
- }
+ },
+ "404": { "$ref": "#/components/responses/NotFound" },
+ "429": { "$ref": "#/components/responses/TooManyRequests" }
}
}
}
},
"components": {
+ "headers": {
+ "RateLimitPolicy": {
+ "description": "Published quota for this endpoint, as the IETF RateLimit header fields.",
+ "required": true,
+ "schema": { "type": "string", "examples": ["\"default\";q=600;w=60"] }
+ },
+ "RateLimit": {
+ "description": "Remaining quota and seconds until the window resets.",
+ "required": true,
+ "schema": { "type": "string", "examples": ["\"default\";r=600;t=60"] }
+ },
+ "RetryAfter": {
+ "description": "Seconds to wait before retrying a throttled request.",
+ "required": true,
+ "schema": { "type": "integer", "minimum": 1, "examples": [60] }
+ }
+ },
+ "responses": {
+ "NotFound": {
+ "description": "The requested API resource does not exist.",
+ "content": {
+ "application/problem+json": {
+ "schema": { "$ref": "#/components/schemas/Problem" }
+ }
+ }
+ },
+ "TooManyRequests": {
+ "description": "The client exceeded the published rate limit.",
+ "headers": {
+ "Retry-After": { "$ref": "#/components/headers/RetryAfter" },
+ "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
+ "RateLimit": { "$ref": "#/components/headers/RateLimit" }
+ },
+ "content": {
+ "application/problem+json": {
+ "schema": { "$ref": "#/components/schemas/Problem" }
+ }
+ }
+ }
+ },
"schemas": {
+ "ProjectFileSchema": {
+ "type": "object",
+ "title": "Project-file JSON Schema",
+ "description": "JSON Schema document that validates t3.json project files.",
+ "required": ["$schema"],
+ "properties": {
+ "$schema": {
+ "type": "string",
+ "format": "uri",
+ "description": "Dialect the schema document is written against."
+ },
+ "$id": {
+ "type": "string",
+ "format": "uri",
+ "description": "Canonical identifier of the schema document."
+ },
+ "title": { "type": "string", "description": "Human-readable schema name." },
+ "type": { "type": "string", "description": "Root JSON type the schema validates." },
+ "properties": {
+ "type": "object",
+ "description": "Project-file fields, keyed by field name.",
+ "additionalProperties": { "type": "object" }
+ }
+ },
+ "additionalProperties": true
+ },
"Problem": {
"type": "object",
+ "title": "Problem document",
+ "description": "RFC 9457 problem details for an error response.",
"required": ["type", "title", "status", "detail", "code", "resolution"],
"properties": {
- "type": { "type": "string", "format": "uri-reference" },
- "title": { "type": "string" },
- "status": { "type": "integer" },
- "detail": { "type": "string" },
- "code": { "type": "string" },
- "resolution": { "type": "string" }
- }
+ "type": {
+ "type": "string",
+ "format": "uri-reference",
+ "description": "Problem type identifier."
+ },
+ "title": { "type": "string", "description": "Short summary of the problem type." },
+ "status": {
+ "type": "integer",
+ "minimum": 100,
+ "maximum": 599,
+ "description": "HTTP status code of the response."
+ },
+ "detail": { "type": "string", "description": "What went wrong for this request." },
+ "code": { "type": "string", "description": "Stable machine-readable error code." },
+ "resolution": { "type": "string", "description": "What the client should do next." }
+ },
+ "additionalProperties": false
}
}
- }
+ },
+ "tags": [
+ {
+ "name": "metadata",
+ "description": "Read-only public metadata about Akeru Bot project files."
+ }
+ ]
}
diff --git a/apps/marketing/src/lib/projectFileSchema.ts b/apps/marketing/src/lib/projectFileSchema.ts
new file mode 100644
index 000000000..5664fa717
--- /dev/null
+++ b/apps/marketing/src/lib/projectFileSchema.ts
@@ -0,0 +1,8 @@
+import { buildT3ProjectFileJsonSchema } from "@t3tools/shared/t3ProjectFile";
+
+// Shared by the versioned `/v1/schema/t3.json` route and the unversioned
+// `/schema/t3.json` alias that `$schema` references point at.
+export const projectFileSchemaResponse = () =>
+ new Response(`${JSON.stringify(buildT3ProjectFileJsonSchema(), null, 2)}\n`, {
+ headers: { "Content-Type": "application/json" },
+ });
diff --git a/apps/marketing/src/pages/developers.astro b/apps/marketing/src/pages/developers.astro
index 9cc00bd86..9e1cb8b7b 100644
--- a/apps/marketing/src/pages/developers.astro
+++ b/apps/marketing/src/pages/developers.astro
@@ -7,23 +7,50 @@ import TrustPage from "../components/TrustPage.astro";
description="Install the Akeru Bot CLI and inspect the public project-file schema and OpenAPI contract."
heading="Akeru Bot for developers"
>
+ <h2>Akeru Bot CLI</h2>
<p>
Akeru Bot is open-source software that runs coding agents on a user's machine or in a sandbox
- that the user controls. Install the official CLI package with <code>npx akeru-bot@latest</code>.
+ that the user controls. Install the official
+ <a href="https://www.npmjs.com/package/akeru-bot">akeru-bot CLI package</a> with
+ <code>npx akeru-bot@latest</code>.
The CLI starts the local server, opens the web client, and manages project threads. The desktop
app bundles the same server. Source code, releases, user guides, and contribution rules are in
the <a href="https://github.com/opencoredev/akeru-bot">Akeru Bot GitHub repository</a>.
</p>
- <h2>Public metadata API</h2>
+ <h2>Akeru Bot public metadata API</h2>
<p>
The production website exposes one unauthenticated, read-only metadata endpoint. Send
- <code>GET /schema/t3.json</code> to retrieve the JSON Schema for <code>t3.json</code> project
+ <code>GET /v1/schema/t3.json</code> to retrieve the JSON Schema for <code>t3.json</code> project
files. The endpoint does not read user data, run a bot, or change any state. Read the
- <a href="/openapi.json">Akeru Bot OpenAPI document</a> for its operation identifier, response
- shape, and structured error model. Unsupported <code>/api</code> paths return an RFC 9457 JSON
- problem with a stable code and a resolution link.
+ <a href="/openapi.json">Akeru Bot OpenAPI document</a> for its operation identifier, typed
+ response schema, and structured error model. Unsupported <code>/api</code> paths return an RFC
+ 9457 JSON problem with a stable code and a resolution link.
</p>
- <h2>Local integrations</h2>
+ <h2>Akeru Bot API versioning and deprecation</h2>
+ <p>
+ Every operation lives under a major version prefix in the URL path, starting at <code>/v1</code>.
+ A breaking change to a response shape ships under a new prefix such as <code>/v2</code>, and
+ additive fields ship in place. The unversioned <code>/schema/t3.json</code> path stays available
+ as an alias for <code>$schema</code> references in editors, and it is not part of the version
+ contract.
+ </p>
+ <p>
+ A deprecated operation returns a <code>Deprecation</code> header with the date the deprecation
+ started and a <code>Sunset</code> header with the date it stops serving, is marked
+ <code>deprecated</code> in the OpenAPI document, and keeps serving for at least six months after
+ the deprecation date. The replacement path is linked from the response <code>Link</code> header
+ with <code>rel="successor-version"</code>.
+ </p>
+ <h2>Akeru Bot API rate limits</h2>
+ <p>
+ Metadata responses carry the IETF RateLimit header fields so an agent can self-throttle without
+ guessing. <code>RateLimit-Policy: "default";q=600;w=60</code> is the published quota of 600
+ requests per 60 second window per client, and <code>RateLimit: "default";r=600;t=60</code>
+ reports what is left in the current window. A throttled request returns
+ <code>429 Too Many Requests</code> with <code>Retry-After</code> in seconds. Wait for that many
+ seconds before retrying instead of backing off blindly.
+ </p>
+ <h2>Akeru Bot local integrations</h2>
<p>
Akeru Bot connects to provider CLIs and user-selected tool servers from the local environment.
It does not provide a hosted automation API or a public MCP server. To configure bot profiles,
@@ -31,4 +58,11 @@ import TrustPage from "../components/TrustPage.astro";
<a href="https://github.com/opencoredev/akeru-bot/tree/main/docs/user">Akeru Bot user guides</a>.
Agents should not send project data, credentials, or provider tokens to this marketing domain.
</p>
+ <h2>Send feedback to the Akeru Bot maintainers</h2>
+ <p>
+ Agents and developers report problems the same way. Read
+ <a href="/feedback.md">feedback.md</a> for where a report goes, what to include, and what to
+ leave out. A failed command, a wrong page, or a schema that does not match the product all belong
+ in the <a href="https://github.com/opencoredev/akeru-bot/issues">Akeru Bot issue tracker</a>.
+ </p>
</TrustPage>
diff --git a/apps/marketing/src/pages/schema/t3.json.ts b/apps/marketing/src/pages/schema/t3.json.ts
index 707523eaf..f3373a242 100644
--- a/apps/marketing/src/pages/schema/t3.json.ts
+++ b/apps/marketing/src/pages/schema/t3.json.ts
@@ -1,10 +1,8 @@
import type { APIRoute } from "astro";
-import { buildT3ProjectFileJsonSchema } from "@t3tools/shared/t3ProjectFile";
+import { projectFileSchemaResponse } from "../../lib/projectFileSchema";
// Rendered at build time; published at https://t3.codes/schema/t3.json so
// t3.json files can reference it via "$schema" for editor/LSP support.
-export const GET: APIRoute = () =>
- new Response(`${JSON.stringify(buildT3ProjectFileJsonSchema(), null, 2)}\n`, {
- headers: { "Content-Type": "application/json" },
- });
+// `/v1/schema/t3.json` is the versioned path agents should call.
+export const GET: APIRoute = () => projectFileSchemaResponse();
diff --git a/apps/marketing/src/pages/v1/schema/t3.json.ts b/apps/marketing/src/pages/v1/schema/t3.json.ts
new file mode 100644
index 000000000..f10b975de
--- /dev/null
+++ b/apps/marketing/src/pages/v1/schema/t3.json.ts
@@ -0,0 +1,7 @@
+import type { APIRoute } from "astro";
+
+import { projectFileSchemaResponse } from "../../../lib/projectFileSchema";
+
+// Versioned path for the public metadata API. Breaking changes ship under a new
+// major prefix (`/v2/`) and the old prefix keeps serving until its sunset date.
+export const GET: APIRoute = () => projectFileSchemaResponse();
diff --git a/apps/marketing/src/readiness.test.ts b/apps/marketing/src/readiness.test.ts
index 1d078bf2e..bd5bab62c 100644
--- a/apps/marketing/src/readiness.test.ts
+++ b/apps/marketing/src/readiness.test.ts
@@ -3,9 +3,18 @@ import * as NodePath from "node:path";
import { describe, expect, it } from "vite-plus/test";
+import { config } from "../vercel.ts";
+
const publicFile = (path: string) =>
NodeFS.readFileSync(NodePath.resolve(import.meta.dirname, "../public", path), "utf8");
+const routesWithHeaders = () =>
+ config.routes?.flatMap((route) =>
+ "src" in route && route.headers !== undefined
+ ? [{ src: route.src, headers: route.headers }]
+ : [],
+ ) ?? [];
+
describe("agent readiness files", () => {
it("publishes agent guidance and crawler policy", () => {
const llms = publicFile("llms.txt");
@@ -18,6 +27,38 @@ describe("agent readiness files", () => {
expect(robots).toContain("https://www.akeru-bot.com/sitemap.xml");
});
+ it("publishes feedback channels and links them from the agent guide", () => {
+ const feedback = publicFile("feedback.md");
+ const llms = publicFile("llms.txt");
+
+ expect(feedback).toContain("## Where to send it");
+ expect(feedback).toContain("https://github.com/opencoredev/akeru-bot/issues");
+ expect(llms).toContain("https://www.akeru-bot.com/feedback.md");
+ expect(routesWithHeaders()).toEqual(
+ expect.arrayContaining([
+ {
+ src: "^/feedback\\.md$",
+ headers: { "Content-Type": "text/markdown; charset=utf-8" },
+ },
+ ]),
+ );
+ });
+
+ it("serves rate-limit headers on the metadata API paths", () => {
+ const limited = routesWithHeaders().filter((route) => "RateLimit" in route.headers);
+
+ expect(limited.map((route) => route.src)).toEqual([
+ "^/(?:v\\d+/)?(?:schema/.*|openapi\\.json)$",
+ "^/api(?:/.*)?$",
+ ]);
+ for (const route of limited) {
+ expect(route.headers).toMatchObject({
+ "RateLimit-Policy": '"default";q=600;w=60',
+ RateLimit: '"default";r=600;t=60',
+ });
+ }
+ });
+
it("publishes a current sitemap with the trust pages", () => {
const sitemap = publicFile("sitemap.xml");
@@ -46,9 +87,22 @@ describe("agent readiness files", () => {
openapi: "3.1.0",
info: { title: "Akeru Bot public metadata API" },
});
- expect(openapi.paths["/schema/t3.json"].get).toMatchObject({
+ const versioned = openapi.paths["/v1/schema/t3.json"].get;
+
+ expect(versioned).toMatchObject({
operationId: "getProjectFileSchema",
+ responses: {
+ "200": {
+ content: {
+ "application/json": { schema: { $ref: "#/components/schemas/ProjectFileSchema" } },
+ },
+ },
+ "429": { $ref: "#/components/responses/TooManyRequests" },
+ },
});
+ expect(openapi.paths["/schema/t3.json"].get.operationId).toBe("getProjectFileSchemaAlias");
+ expect(openapi.info.description).toContain("Sunset");
+ expect(openapi.components.schemas.ProjectFileSchema).toMatchObject({ type: "object" });
expect(apiError).toMatchObject({ status: 404, code: "api_resource_not_found" });
});
});
diff --git a/apps/marketing/vercel.ts b/apps/marketing/vercel.ts
index d8e729464..63ccb5422 100644
--- a/apps/marketing/vercel.ts
+++ b/apps/marketing/vercel.ts
@@ -15,11 +15,27 @@ export const config: VercelConfig = {
{
src: "^/(.*)$",
headers: {
- Link: '</sitemap.xml>; rel="sitemap"; type="application/xml", </index.md>; rel="alternate"; type="text/markdown", </openapi.json>; rel="service-desc"; type="application/vnd.oai.openapi+json", </.well-known/ard.json>; rel="api-catalog"; type="application/json"',
+ Link: '</sitemap.xml>; rel="sitemap"; type="application/xml", </index.md>; rel="alternate"; type="text/markdown", </openapi.json>; rel="service-desc"; type="application/vnd.oai.openapi+json", </.well-known/ard.json>; rel="api-catalog"; type="application/json", </feedback.md>; rel="help"; type="text/markdown"',
Vary: "Accept, Accept-Encoding",
},
continue: true,
},
+ {
+ // Published quota for the public metadata API, as the IETF RateLimit
+ // header fields, so agents can self-throttle. The CDN serves these
+ // documents statically, so the remaining count matches the policy.
+ src: "^/(?:v\\d+/)?(?:schema/.*|openapi\\.json)$",
+ headers: {
+ "RateLimit-Policy": '"default";q=600;w=60',
+ RateLimit: '"default";r=600;t=60',
+ },
+ continue: true,
+ },
+ {
+ src: "^/feedback\\.md$",
+ dest: "/feedback.md",
+ headers: { "Content-Type": "text/markdown; charset=utf-8" },
+ },
{
src: "^/$",
has: [{ type: "header", key: "accept", value: "text/markdown" }],
@@ -34,7 +50,11 @@ export const config: VercelConfig = {
src: "^/api(?:/.*)?$",
dest: "/api-error.json",
status: 404,
- headers: { "Content-Type": "application/problem+json; charset=utf-8" },
+ headers: {
+ "Content-Type": "application/problem+json; charset=utf-8",
+ "RateLimit-Policy": '"default";q=600;w=60',
+ RateLimit: '"default";r=600;t=60',
+ },
},
{
src: "^/.*$",