From 6e79ac4029c0d23e98665eaeccbac5a28f6d04b2 Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 16:24:43 +0000 Subject: [PATCH 1/6] AR-20261104-1: one URL per docs page (trailing slash) + slash-agnostic legacy redirects - vercel.json: trailingSlash: true so /page 308s to /page/ (files and /.well-known are untouched by Vercel's rule). - Legacy literal redirect sources now match both slash forms ('(/?)'); :param* sources get '/' twins. Removes 22 duplicates and 3 no-slash sources that would shadow live pages, resolves the building-a-slackbot conflict, collapses 2 chains, adds fragment-free twins for 2 fragment-only sources, and canonicalizes /api destinations to /api/. - scripts/redirect-slashes.test.mjs replays vercel.json through @vercel/routing-utils (npm run test:redirect-slashes, wired into CI). --- .github/workflows/ci.yml | 5 + package.json | 1 + scripts/redirect-slashes.test.mjs | 204 ++++++++ vercel.json | 790 +++++++++++++----------------- 4 files changed, 558 insertions(+), 442 deletions(-) create mode 100644 scripts/redirect-slashes.test.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddca77de7..bf268c071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,6 +161,11 @@ jobs: - name: Test redirect invariants run: python3 scripts/test_check_redirects.py + # Replays vercel.json through @vercel/routing-utils: one URL per page + # (trailing slash), slash-agnostic legacy redirects, at most 2 hops. + - name: Test trailing-slash redirects + run: npm run test:redirect-slashes + # Stdlib-only tests for the missing_docs skill scripts. The reviewer-resolver # unit tests run fully here; the audit integration tests skip gracefully # because the warp/warp-server code repos aren't checked out in docs CI. diff --git a/package.json b/package.json index 3938524e0..7a6b8acee 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "test:heading-vars": "node --test src/plugins/heading-vars-core.test.mjs", "test:docs-markdown": "node --test src/integrations/docs-markdown-integration.test.js", "test:tracking-redirect": "node --test scripts/tracking-redirect.test.mjs", + "test:redirect-slashes": "node --test scripts/redirect-slashes.test.mjs", "test:agent-discovery": "node --test scripts/agent-discovery.test.mjs", "test:tracking-routes": "node scripts/validate-tracking-routes.mjs", "test:kapa-webmcp": "node --test src/lib/kapa-webmcp.test.mjs", diff --git a/scripts/redirect-slashes.test.mjs b/scripts/redirect-slashes.test.mjs new file mode 100644 index 000000000..fc1314ca9 --- /dev/null +++ b/scripts/redirect-slashes.test.mjs @@ -0,0 +1,204 @@ +// Every docs page has one URL: the trailing-slash form. vercel.json sets +// `trailingSlash: true`, so Vercel 308s `/page` to `/page/` before any +// redirect runs. These tests compile vercel.json with @vercel/routing-utils +// (the library Vercel uses to build the routing table) and replay requests +// against the result, so a redirect that only matches one slash form, a +// shadowed page, or a long redirect chain fails CI instead of production. +import assert from 'node:assert/strict'; +import { readdir, readFile } from 'node:fs/promises'; +import { test } from 'node:test'; +import routingUtils from '@vercel/routing-utils'; + +const { getTransformedRoutes } = routingUtils; +const repoFile = (path) => new URL(`../${path}`, import.meta.url); +const config = JSON.parse(await readFile(repoFile('vercel.json'), 'utf8')); +const redirects = config.redirects; + +const { routes, error } = getTransformedRoutes({ + trailingSlash: config.trailingSlash, + redirects, +}); +assert.equal(error, null, error?.message); +const table = routes + .filter((route) => !route.handle) + .map((route) => ({ + re: new RegExp(route.src), + status: route.status, + location: route.headers?.Location, + })); + +const EXTENSION = /\.[A-Za-z0-9]+$/; +const lastSegment = (path) => path.replace(/\/$/, '').split('/').pop(); +const isFragmentSource = (source) => source.includes('#'); +const hasParams = (value) => /:[A-Za-z_]|\(\.\*\)|\$/.test(value.replace('(/?)', '')); + +/** One routing pass: the redirect Location for `path`, or null. */ +function step(path) { + for (const route of table) { + const match = route.re.exec(path); + if (!match) continue; + if (!route.status) return null; // e.g. /.well-known passthrough + return route.location.replace(/\$(\d+|[A-Za-z_]\w*)/g, (_, key) => + (/^\d+$/.test(key) ? match[Number(key)] : match.groups?.[key]) ?? '', + ); + } + return null; +} + +/** Follow redirects; returns the final path (or URL) and the hop count. */ +function follow(path) { + let current = path; + let hops = 0; + while (hops < 6) { + const next = step(current.split(/[?#]/)[0]); + if (next === null) break; + hops += 1; + current = next; + if (/^https?:\/\//.test(current)) return { final: current, hops, external: true }; + } + return { final: current, hops, external: false }; +} + +async function contentFiles(dir) { + const entries = await readdir(dir, { withFileTypes: true }); + const files = await Promise.all(entries.map((entry) => { + const url = new URL(entry.name + (entry.isDirectory() ? '/' : ''), dir); + return entry.isDirectory() ? contentFiles(url) : [url]; + })); + return files.flat(); +} + +const docsRoot = repoFile('src/content/docs/'); +const pages = new Set(['/api/']); +for (const file of await contentFiles(docsRoot)) { + const rel = file.href.slice(docsRoot.href.length); + if (!/\.mdx?$/.test(rel)) continue; + const slug = rel.replace(/\.mdx?$/, '').replace(/(^|\/)index$/, '').toLowerCase(); + pages.add(slug ? `/${slug}/` : '/'); +} + +function isServed(target) { + const path = target.split(/[?#]/)[0]; + if (pages.has(path)) return true; + if (path.endsWith('.md')) return pages.has(`${path.slice(0, -3)}/`) || path === '/index.md'; + return EXTENSION.test(lastSegment(path)); // generated asset (feed, sitemap, spec) +} + +/** A concrete request path that `source` matches. */ +function sampleFor(source) { + return source + .replace(/\(\/\?\)$/, '') + .replace(/:[A-Za-z_]\w*(\([^)]*\))?[*+?]?/g, 'sample-segment') + .replace(/\(\.\*\)/g, 'sample-segment') + .replace(/\\/g, ''); +} + +/** Collect every failure in a loop so one CI run lists them all. */ +function expectNone(failures, label) { + assert.deepEqual(failures, [], `${failures.length} ${label}:\n${failures.join('\n')}`); +} + +const slashForms = (path) => { + if (EXTENSION.test(lastSegment(path)) && !path.endsWith('/')) return [path]; + const base = path.replace(/\/$/, ''); + return [base, `${base}/`]; +}; + +test('vercel.json enables trailing slashes', () => { + assert.equal(config.trailingSlash, true); +}); + +test('no-slash page URLs 308 once to the slash form and slash forms are served', () => { + assert.ok(pages.size > 100, `only ${pages.size} pages found`); + const failures = []; + for (const page of pages) { + if (page === '/') continue; + if (step(page) !== null) failures.push(`${page} is shadowed by a redirect to ${step(page)}`); + const { final, hops } = follow(page.slice(0, -1)); + if (final !== page || hops !== 1) failures.push(`${page.slice(0, -1)} -> ${final} in ${hops} hops`); + } + expectNone(failures, 'page URL problems'); +}); + +test('files, well-known paths, and Markdown twins are never slash-redirected', () => { + for (const path of [ + '/llms.txt', '/llms-full.txt', '/sitemap-index.xml', '/robots.txt', '/openapi.json', + '/.well-known/ard.json', '/.well-known/mcp.json', '/.well-known/anything', + '/factories.md', '/agents/capabilities/skills.md', '/index.md', + ]) { + assert.equal(step(path), null, path); + } +}); + +test('every redirect source matches both slash forms and ends on a served page in at most 2 hops', () => { + const failures = []; + for (const { source, destination } of redirects) { + if (isFragmentSource(source)) continue; + const results = slashForms(sampleFor(source)).map((form) => ({ form, ...follow(form) })); + for (const result of results) { + if (result.hops < 1) failures.push(`${source}: ${result.form} is not redirected`); + } + if (new Set(results.map((result) => result.final)).size !== 1) { + failures.push(`${source}: slash forms diverge ${JSON.stringify(results)}`); + } + if (hasParams(source) || hasParams(destination)) continue; + for (const { form, final, hops, external } of results) { + if (hops > 2) failures.push(`${source}: ${form} takes ${hops} hops`); + if (!external && !isServed(final)) failures.push(`${source}: ${form} ends at missing ${final}`); + } + } + expectNone(failures, 'redirect problems'); +}); + +test('fragment-only sources have a fragment-free redirect or page for their path', () => { + // Browsers never send #fragments, so these sources cannot match on their own. + const failures = []; + for (const { source } of redirects.filter((redirect) => isFragmentSource(redirect.source))) { + const path = slashForms(source.split('#')[0]).at(-1); + const { final } = follow(path); + if (!isServed(final)) failures.push(`${source}: ${path} ends at missing ${final}`); + } + expectNone(failures, 'uncovered fragment sources'); +}); + +test('no duplicate or conflicting redirect sources', () => { + const failures = []; + const sources = new Set(); + const byNormalized = new Map(); + for (const { source, destination } of redirects) { + if (sources.has(source)) failures.push(`duplicate source ${source}`); + sources.add(source); + const key = source.replace(/\(\/\?\)$/, '').replace(/\/$/, ''); + const previous = byNormalized.get(key); + if (previous !== undefined && previous !== destination) { + failures.push(`${source} conflicts: ${previous} vs ${destination}`); + } + byNormalized.set(key, destination); + } + expectNone(failures, 'duplicate or conflicting sources'); +}); + +test('internal page destinations use the canonical slash form', () => { + const failures = redirects + .filter(({ destination }) => destination.startsWith('/') && !hasParams(destination)) + .filter(({ destination }) => { + const path = destination.split(/[?#]/)[0]; + return !path.endsWith('/') && !EXTENSION.test(lastSegment(path)); + }) + .map(({ source, destination }) => `${source} -> ${destination}`); + expectNone(failures, 'destinations without a trailing slash'); +}); + +test('Accept: text/markdown rewrites never produce /page/.md', () => { + const rewrites = getTransformedRoutes({ rewrites: config.rewrites ?? [] }).routes + .filter((route) => route.dest?.includes('.md')); + for (const route of rewrites) { + const re = new RegExp(route.src); + for (const page of ['/factories/', '/agents/capabilities/skills/']) { + const match = re.exec(page); + if (!match) continue; + const dest = route.dest.replace(/\$(\d+)/g, (_, n) => match[Number(n)] ?? ''); + assert.ok(!dest.includes('/.md'), `${page} rewrites to ${dest}`); + } + } +}); diff --git a/vercel.json b/vercel.json index cc338d611..23a129abb 100644 --- a/vercel.json +++ b/vercel.json @@ -76,6 +76,7 @@ "destination": "/:path+.md" } ], + "trailingSlash": true, "redirects": [ { "source": "/platform/data-storage(/?)", @@ -98,7 +99,7 @@ "statusCode": 308 }, { - "source": "/cli/", + "source": "/cli(/?)", "destination": "/agents/cli/", "statusCode": 308 }, @@ -108,32 +109,32 @@ "statusCode": 308 }, { - "source": "/agent-platform/", + "source": "/agent-platform(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agent-platform/agent-memory/", + "source": "/agent-platform/agent-memory(/?)", "destination": "/agents/agent-memory/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/", + "source": "/agent-platform/capabilities(/?)", "destination": "/agents/capabilities/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/agent-notifications/", + "source": "/agent-platform/capabilities/agent-notifications(/?)", "destination": "/agents/capabilities/agent-notifications/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/agent-profiles-permissions/", + "source": "/agent-platform/capabilities/agent-profiles-permissions(/?)", "destination": "/agents/capabilities/agent-profiles-permissions/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/codebase-context/", + "source": "/agent-platform/capabilities/codebase-context(/?)", "destination": "/agents/capabilities/codebase-context/", "statusCode": 308 }, @@ -143,102 +144,102 @@ "statusCode": 308 }, { - "source": "/agent-platform/capabilities/computer-use/artifacts-in-prs/", + "source": "/agent-platform/capabilities/computer-use/artifacts-in-prs(/?)", "destination": "/agents/capabilities/computer-use/artifacts-in-prs/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/computer-use/browser-use/", + "source": "/agent-platform/capabilities/computer-use/browser-use(/?)", "destination": "/agents/capabilities/computer-use/browser-use/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/computer-use/testing-and-recordings/", + "source": "/agent-platform/capabilities/computer-use/testing-and-recordings(/?)", "destination": "/agents/capabilities/computer-use/testing-and-recordings/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/full-terminal-use/", + "source": "/agent-platform/capabilities/full-terminal-use(/?)", "destination": "/agents/capabilities/full-terminal-use/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/mcp/", + "source": "/agent-platform/capabilities/mcp(/?)", "destination": "/agents/capabilities/mcp/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/planning/", + "source": "/agent-platform/capabilities/planning(/?)", "destination": "/agents/capabilities/planning/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/rules/", + "source": "/agent-platform/capabilities/rules(/?)", "destination": "/agents/capabilities/rules/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/skills/", + "source": "/agent-platform/capabilities/skills(/?)", "destination": "/agents/capabilities/skills/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/slash-commands/", + "source": "/agent-platform/capabilities/slash-commands(/?)", "destination": "/agents/capabilities/slash-commands/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/task-lists/", + "source": "/agent-platform/capabilities/task-lists(/?)", "destination": "/agents/capabilities/task-lists/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/web-search/", + "source": "/agent-platform/capabilities/web-search(/?)", "destination": "/agents/capabilities/web-search/", "statusCode": 308 }, { - "source": "/agent-platform/cli-agents/claude-code/", + "source": "/agent-platform/cli-agents/claude-code(/?)", "destination": "/agents/cli-agents/claude-code/", "statusCode": 308 }, { - "source": "/agent-platform/cli-agents/codex/", + "source": "/agent-platform/cli-agents/codex(/?)", "destination": "/agents/cli-agents/codex/", "statusCode": 308 }, { - "source": "/agent-platform/cli-agents/opencode/", + "source": "/agent-platform/cli-agents/opencode(/?)", "destination": "/agents/cli-agents/opencode/", "statusCode": 308 }, { - "source": "/agent-platform/cli-agents/overview/", + "source": "/agent-platform/cli-agents/overview(/?)", "destination": "/agents/cli-agents/overview/", "statusCode": 308 }, { - "source": "/agent-platform/cli-agents/remote-control/", + "source": "/agent-platform/cli-agents/remote-control(/?)", "destination": "/agents/cli-agents/remote-control/", "statusCode": 308 }, { - "source": "/agent-platform/cli-agents/rich-input/", + "source": "/agent-platform/cli-agents/rich-input(/?)", "destination": "/agents/cli-agents/rich-input/", "statusCode": 308 }, { - "source": "/agent-platform/getting-started/agents-in-warp/", + "source": "/agent-platform/getting-started/agents-in-warp(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agent-platform/getting-started/faqs/", + "source": "/agent-platform/getting-started/faqs(/?)", "destination": "/agents/getting-started/faqs/", "statusCode": 308 }, { - "source": "/agent-platform/inference/bring-your-own-api-key/", + "source": "/agent-platform/inference/bring-your-own-api-key(/?)", "destination": "/agents/inference/bring-your-own-api-key/", "statusCode": 308 }, @@ -248,117 +249,117 @@ "statusCode": 308 }, { - "source": "/agent-platform/inference/custom-inference-endpoint/", + "source": "/agent-platform/inference/custom-inference-endpoint(/?)", "destination": "/agents/inference/custom-inference-endpoint/", "statusCode": 308 }, { - "source": "/agent-platform/inference/custom-routers/", + "source": "/agent-platform/inference/custom-routers(/?)", "destination": "/agents/inference/custom-routers/", "statusCode": 308 }, { - "source": "/agent-platform/inference/grok-subscription/", + "source": "/agent-platform/inference/grok-subscription(/?)", "destination": "/agents/inference/grok-subscription/", "statusCode": 308 }, { - "source": "/agent-platform/inference/model-choice/", + "source": "/agent-platform/inference/model-choice(/?)", "destination": "/agents/inference/model-choice/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/active-ai/", + "source": "/agent-platform/local-agents/active-ai(/?)", "destination": "/agents/local-agents/active-ai/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/agent-context/", + "source": "/agent-platform/local-agents/agent-context(/?)", "destination": "/agents/local-agents/agent-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/agent-context/blocks-as-context/", + "source": "/agent-platform/local-agents/agent-context/blocks-as-context(/?)", "destination": "/agents/local-agents/agent-context/blocks-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/agent-context/images-as-context/", + "source": "/agent-platform/local-agents/agent-context/images-as-context(/?)", "destination": "/agents/local-agents/agent-context/images-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/agent-context/selection-as-context/", + "source": "/agent-platform/local-agents/agent-context/selection-as-context(/?)", "destination": "/agents/local-agents/agent-context/selection-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/agent-context/urls-as-context/", + "source": "/agent-platform/local-agents/agent-context/urls-as-context(/?)", "destination": "/agents/local-agents/agent-context/urls-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/agent-context/using-to-add-context/", + "source": "/agent-platform/local-agents/agent-context/using-to-add-context(/?)", "destination": "/agents/local-agents/agent-context/using-to-add-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/cloud-conversations/", + "source": "/agent-platform/local-agents/cloud-conversations(/?)", "destination": "/agents/local-agents/cloud-conversations/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/code-diffs/", + "source": "/agent-platform/local-agents/code-diffs(/?)", "destination": "/agents/local-agents/code-diffs/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/generate/", + "source": "/agent-platform/local-agents/generate(/?)", "destination": "/agents/local-agents/generate/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/", + "source": "/agent-platform/local-agents/interacting-with-agents(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/agent-questions/", + "source": "/agent-platform/local-agents/interacting-with-agents/agent-questions(/?)", "destination": "/agents/local-agents/interacting-with-agents/agent-questions/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/conversation-forking/", + "source": "/agent-platform/local-agents/interacting-with-agents/conversation-forking(/?)", "destination": "/agents/local-agents/interacting-with-agents/conversation-forking/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/prompt-queueing/", + "source": "/agent-platform/local-agents/interacting-with-agents/prompt-queueing(/?)", "destination": "/agents/local-agents/interacting-with-agents/prompt-queueing/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/terminal-and-agent-modes/", + "source": "/agent-platform/local-agents/interacting-with-agents/terminal-and-agent-modes(/?)", "destination": "/agents/local-agents/interacting-with-agents/terminal-and-agent-modes/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/voice/", + "source": "/agent-platform/local-agents/interacting-with-agents/voice(/?)", "destination": "/agents/local-agents/interacting-with-agents/voice/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interactive-code-review/", + "source": "/agent-platform/local-agents/interactive-code-review(/?)", "destination": "/agents/local-agents/interactive-code-review/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/overview/", + "source": "/agent-platform/local-agents/overview(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/session-sharing/", + "source": "/agent-platform/local-agents/session-sharing(/?)", "destination": "/agents/local-agents/session-sharing/", "statusCode": 308 }, @@ -368,17 +369,17 @@ "statusCode": 308 }, { - "source": "/~/revisions/pyklxx5pdxve9wvizjl3/features/entry", + "source": "/~/revisions/pyklxx5pdxve9wvizjl3/features/entry(/?)", "destination": "/terminal/entry/", "statusCode": 308 }, { - "source": "/platform/api-sdk", + "source": "/platform/api-sdk(/?)", "destination": "/factories/api-and-sdk/", "statusCode": 308 }, { - "source": "/agents/warp-ai/agent-mode", + "source": "/agents/warp-ai/agent-mode(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, @@ -388,17 +389,17 @@ "statusCode": 308 }, { - "source": "/features/ai/warp-ai/external-ai-providers", + "source": "/features/ai/warp-ai/external-ai-providers(/?)", "destination": "/agents/cli-agents/overview/", "statusCode": 308 }, { - "source": "/guides/devops-and-infrastructure", + "source": "/guides/devops-and-infrastructure(/?)", "destination": "/guides/devops/how-to-analyze-cloud-run-logs-gcloud/", "statusCode": 308 }, { - "source": "/knowledge-and-collaboration/session-sharingentials1", + "source": "/knowledge-and-collaboration/session-sharingentials1(/?)", "destination": "/knowledge-and-collaboration/session-sharing/", "statusCode": 308 }, @@ -1537,11 +1538,6 @@ "destination": "/agents/local-agents/code-diffs/", "statusCode": 308 }, - { - "source": "/agent-platform/local-agents/generate", - "destination": "/agents/local-agents/generate/", - "statusCode": 308 - }, { "source": "/agent-platform/local-agents/interacting-with-agents/agent-modality(/?)", "destination": "/agents/local-agents/interacting-with-agents/terminal-and-agent-modes/", @@ -1709,7 +1705,7 @@ }, { "source": "/agent-platform/warp-agents/computer-use(/?)", - "destination": "/agent-platform/capabilities/computer-use/", + "destination": "/agents/capabilities/computer-use/", "statusCode": 308 }, { @@ -1938,7 +1934,7 @@ "statusCode": 308 }, { - "source": "/errors", + "source": "/errors(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/", "statusCode": 308 }, @@ -2487,6 +2483,11 @@ "destination": "/terminal/windows/global-hotkey/", "statusCode": 308 }, + { + "source": "/features/windows/hotkey-window(/?)", + "destination": "/terminal/windows/global-hotkey/", + "statusCode": 308 + }, { "source": "/features/windows/hotkey-window#dedicated-window", "destination": "/terminal/windows/global-hotkey/", @@ -2528,7 +2529,7 @@ "statusCode": 308 }, { - "source": "/getting-started", + "source": "/getting-started(/?)", "destination": "/quickstart/", "statusCode": 308 }, @@ -2718,7 +2719,7 @@ "statusCode": 308 }, { - "source": "/guides/agent-workflows/running-multiple-agents-at-once-with-warp", + "source": "/guides/agent-workflows/running-multiple-agents-at-once-with-warp(/?)", "destination": "/guides/agent-workflows/how-to-run-multiple-ai-coding-agents/", "statusCode": 308 }, @@ -2784,17 +2785,17 @@ }, { "source": "/reference/api-and-sdk/agent(/?)", - "destination": "/api#tag/agent", + "destination": "/api/#tag/agent", "statusCode": 308 }, { "source": "/reference/api-and-sdk/agent-1(/?)", - "destination": "/api", + "destination": "/api/", "statusCode": 308 }, { "source": "/reference/api-and-sdk/schedules(/?)", - "destination": "/api#tag/schedules", + "destination": "/api/#tag/schedules", "statusCode": 308 }, { @@ -2883,172 +2884,87 @@ "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/authentication_required", - "destination": "/factories/api-and-sdk/troubleshooting/errors/authentication-required/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/authentication_required/", + "source": "/factories/api-and-sdk/troubleshooting/errors/authentication_required(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/authentication-required/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/budget_exceeded", - "destination": "/factories/api-and-sdk/troubleshooting/errors/budget-exceeded/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/budget_exceeded/", + "source": "/factories/api-and-sdk/troubleshooting/errors/budget_exceeded(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/budget-exceeded/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/content_policy_violation", - "destination": "/factories/api-and-sdk/troubleshooting/errors/content-policy-violation/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/content_policy_violation/", + "source": "/factories/api-and-sdk/troubleshooting/errors/content_policy_violation(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/content-policy-violation/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/environment_setup_failed", - "destination": "/factories/api-and-sdk/troubleshooting/errors/environment-setup-failed/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/environment_setup_failed/", + "source": "/factories/api-and-sdk/troubleshooting/errors/environment_setup_failed(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/environment-setup-failed/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/external_authentication_required", - "destination": "/factories/api-and-sdk/troubleshooting/errors/external-authentication-required/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/external_authentication_required/", + "source": "/factories/api-and-sdk/troubleshooting/errors/external_authentication_required(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/external-authentication-required/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/agent_process_failed", - "destination": "/factories/api-and-sdk/troubleshooting/errors/agent-process-failed/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/agent_process_failed/", + "source": "/factories/api-and-sdk/troubleshooting/errors/agent_process_failed(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/agent-process-failed/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/feature_not_available", - "destination": "/factories/api-and-sdk/troubleshooting/errors/feature-not-available/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/feature_not_available/", + "source": "/factories/api-and-sdk/troubleshooting/errors/feature_not_available(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/feature-not-available/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/infrastructure_timeout", - "destination": "/factories/api-and-sdk/troubleshooting/errors/infrastructure-timeout/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/infrastructure_timeout/", + "source": "/factories/api-and-sdk/troubleshooting/errors/infrastructure_timeout(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/infrastructure-timeout/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/insufficient_credits", - "destination": "/factories/api-and-sdk/troubleshooting/errors/insufficient-credits/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/insufficient_credits/", + "source": "/factories/api-and-sdk/troubleshooting/errors/insufficient_credits(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/insufficient-credits/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/integration_disabled", - "destination": "/factories/api-and-sdk/troubleshooting/errors/integration-disabled/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/integration_disabled/", + "source": "/factories/api-and-sdk/troubleshooting/errors/integration_disabled(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/integration-disabled/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/integration_not_configured", - "destination": "/factories/api-and-sdk/troubleshooting/errors/integration-not-configured/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/integration_not_configured/", + "source": "/factories/api-and-sdk/troubleshooting/errors/integration_not_configured(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/integration-not-configured/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/internal_error", - "destination": "/factories/api-and-sdk/troubleshooting/errors/internal-error/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/internal_error/", + "source": "/factories/api-and-sdk/troubleshooting/errors/internal_error(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/internal-error/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/invalid_request", - "destination": "/factories/api-and-sdk/troubleshooting/errors/invalid-request/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/invalid_request/", + "source": "/factories/api-and-sdk/troubleshooting/errors/invalid_request(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/invalid-request/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/not_authorized", - "destination": "/factories/api-and-sdk/troubleshooting/errors/not-authorized/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/not_authorized/", + "source": "/factories/api-and-sdk/troubleshooting/errors/not_authorized(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/not-authorized/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/operation_not_supported", - "destination": "/factories/api-and-sdk/troubleshooting/errors/operation-not-supported/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/operation_not_supported/", + "source": "/factories/api-and-sdk/troubleshooting/errors/operation_not_supported(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/operation-not-supported/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/resource_not_found", - "destination": "/factories/api-and-sdk/troubleshooting/errors/resource-not-found/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/resource_not_found/", + "source": "/factories/api-and-sdk/troubleshooting/errors/resource_not_found(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/resource-not-found/", "statusCode": 308 }, { - "source": "/factories/api-and-sdk/troubleshooting/errors/resource_unavailable", - "destination": "/factories/api-and-sdk/troubleshooting/errors/resource-unavailable/", - "statusCode": 308 - }, - { - "source": "/factories/api-and-sdk/troubleshooting/errors/resource_unavailable/", + "source": "/factories/api-and-sdk/troubleshooting/errors/resource_unavailable(/?)", "destination": "/factories/api-and-sdk/troubleshooting/errors/resource-unavailable/", "statusCode": 308 }, @@ -3062,6 +2978,11 @@ "destination": "/agents/cli/oz-cli/quickstart/", "statusCode": 308 }, + { + "source": "/reference/cli/README.md", + "destination": "/agents/cli/oz-cli/api-keys/", + "statusCode": 308 + }, { "source": "/reference/cli/README.md#api-key-authentication", "destination": "/agents/cli/oz-cli/api-keys/", @@ -3532,6 +3453,11 @@ "destination": "/agents/inference/bring-your-own-api-key/", "statusCode": 308 }, + { + "source": "/support-and-community/plans-and-billing/bring-your-own-api-key/:path*/", + "destination": "/agents/inference/bring-your-own-api-key/", + "statusCode": 308 + }, { "source": "/support-and-community/support-and-billing/plans-and-pricing/bring-your-own-api-key(/?)", "destination": "/agents/inference/bring-your-own-api-key/", @@ -4183,332 +4109,332 @@ "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/welcome-to-warp", + "source": "/university/developer-workflows/beginner/welcome-to-warp(/?)", "destination": "/guides/getting-started/welcome-to-warp/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/10-coding-features-you-should-know", + "source": "/university/developer-workflows/beginner/10-coding-features-you-should-know(/?)", "destination": "/guides/getting-started/10-coding-features-you-should-know/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/how-to-customize-warps-appearance", + "source": "/university/developer-workflows/beginner/how-to-customize-warps-appearance(/?)", "destination": "/guides/getting-started/how-to-customize-warps-appearance/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/how-to-make-warps-ui-more-minimal", + "source": "/university/developer-workflows/beginner/how-to-make-warps-ui-more-minimal(/?)", "destination": "/guides/getting-started/how-to-make-warps-ui-more-minimal/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/how-to-master-warps-code-review-panel", + "source": "/university/developer-workflows/beginner/how-to-master-warps-code-review-panel(/?)", "destination": "/guides/getting-started/how-to-master-warps-code-review-panel/", "statusCode": 308 }, { - "source": "/university/developer-workflows/how-to-review-ai-generated-code", + "source": "/university/developer-workflows/how-to-review-ai-generated-code(/?)", "destination": "/guides/agent-workflows/how-to-review-ai-generated-code/", "statusCode": 308 }, { - "source": "/university/developer-workflows/how-to-run-multiple-ai-coding-agents", + "source": "/university/developer-workflows/how-to-run-multiple-ai-coding-agents(/?)", "destination": "/guides/agent-workflows/how-to-run-multiple-ai-coding-agents/", "statusCode": 308 }, { - "source": "/university/developer-workflows/how-to-use-voice-and-images-to-prompt-coding-agents", + "source": "/university/developer-workflows/how-to-use-voice-and-images-to-prompt-coding-agents(/?)", "destination": "/guides/agent-workflows/how-to-use-voice-and-images-to-prompt-coding-agents/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/how-to-explain-your-codebase-using-warp-rust-codebase", + "source": "/university/developer-workflows/beginner/how-to-explain-your-codebase-using-warp-rust-codebase(/?)", "destination": "/guides/agent-workflows/how-to-explain-your-codebase-using-warp-rust-codebase/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-run-3-agents-in-parallel-summarize-logs-analyze-pr-modify-ui", + "source": "/university/developer-workflows/power-user/how-to-run-3-agents-in-parallel-summarize-logs-analyze-pr-modify-ui(/?)", "destination": "/guides/agent-workflows/how-to-run-3-agents-in-parallel-summarize-logs-analyze-pr-modify-ui/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-edit-agent-code-in-warp", + "source": "/university/developer-workflows/power-user/how-to-edit-agent-code-in-warp(/?)", "destination": "/guides/agent-workflows/how-to-edit-agent-code-in-warp/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-review-prs-like-a-senior-dev", + "source": "/university/developer-workflows/power-user/how-to-review-prs-like-a-senior-dev(/?)", "destination": "/guides/agent-workflows/how-to-review-prs-like-a-senior-dev/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp/using-images-as-context-with-warp", + "source": "/university/how-warp-uses-warp/using-images-as-context-with-warp(/?)", "destination": "/guides/agent-workflows/using-images-as-context-with-warp/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp/understanding-your-codebase", + "source": "/university/how-warp-uses-warp/understanding-your-codebase(/?)", "destination": "/guides/agent-workflows/understanding-your-codebase/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp/running-multiple-agents-at-once-with-warp", + "source": "/university/how-warp-uses-warp/running-multiple-agents-at-once-with-warp(/?)", "destination": "/guides/agent-workflows/how-to-run-multiple-ai-coding-agents/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/warp-vs-claude-code", + "source": "/university/developer-workflows/power-user/warp-vs-claude-code(/?)", "destination": "/guides/agent-workflows/warp-vs-claude-code/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/how-to-create-project-rules-for-an-existing-project-astro-typescript-tailwind", + "source": "/university/developer-workflows/beginner/how-to-create-project-rules-for-an-existing-project-astro-typescript-tailwind(/?)", "destination": "/guides/configuration/how-to-create-project-rules-for-an-existing-project-astro-typescript-tailwind/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-set-coding-best-practices", + "source": "/university/developer-workflows/power-user/how-to-set-coding-best-practices(/?)", "destination": "/guides/configuration/how-to-set-coding-best-practices/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-set-tech-stack-preferences-with-rules", + "source": "/university/developer-workflows/power-user/how-to-set-tech-stack-preferences-with-rules(/?)", "destination": "/guides/configuration/how-to-set-tech-stack-preferences-with-rules/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-set-coding-preferences-with-rules", + "source": "/university/developer-workflows/power-user/how-to-set-coding-preferences-with-rules(/?)", "destination": "/guides/configuration/how-to-set-coding-preferences-with-rules/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-configure-yolo-and-strategic-agent-profiles", + "source": "/university/developer-workflows/power-user/how-to-configure-yolo-and-strategic-agent-profiles(/?)", "destination": "/guides/configuration/how-to-configure-yolo-and-strategic-agent-profiles/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-use-agent-profiles-efficiently", + "source": "/university/developer-workflows/power-user/how-to-use-agent-profiles-efficiently(/?)", "destination": "/guides/configuration/how-to-use-agent-profiles-efficiently/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp/creating-rules-for-agents", + "source": "/university/how-warp-uses-warp/creating-rules-for-agents(/?)", "destination": "/guides/configuration/creating-rules-for-agents/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner/trigger-reusable-actions-with-saved-prompts", + "source": "/university/developer-workflows/beginner/trigger-reusable-actions-with-saved-prompts(/?)", "destination": "/guides/configuration/trigger-reusable-actions-with-saved-prompts/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user/how-to-sync-your-monorepos", + "source": "/university/developer-workflows/power-user/how-to-sync-your-monorepos(/?)", "destination": "/guides/configuration/how-to-sync-your-monorepos/", "statusCode": 308 }, { - "source": "/university/integrations/how-to-set-up-claude-code", + "source": "/university/integrations/how-to-set-up-claude-code(/?)", "destination": "/guides/external-tools/how-to-set-up-claude-code/", "statusCode": 308 }, { - "source": "/university/integrations/how-to-set-up-codex-cli", + "source": "/university/integrations/how-to-set-up-codex-cli(/?)", "destination": "/guides/external-tools/how-to-set-up-codex-cli/", "statusCode": 308 }, { - "source": "/university/integrations/how-to-set-up-opencode", + "source": "/university/integrations/how-to-set-up-opencode(/?)", "destination": "/guides/external-tools/how-to-set-up-opencode/", "statusCode": 308 }, { - "source": "/university/integrations/how-to-set-up-gemini-cli", + "source": "/university/integrations/how-to-set-up-gemini-cli(/?)", "destination": "/guides/external-tools/how-to-set-up-gemini-cli/", "statusCode": 308 }, { - "source": "/university/integrations/how-to-set-up-ollama", + "source": "/university/integrations/how-to-set-up-ollama(/?)", "destination": "/guides/external-tools/how-to-set-up-ollama/", "statusCode": 308 }, { - "source": "/university/mcp-servers/sentry-mcp-fix-sentry-error-in-empower-website", + "source": "/university/mcp-servers/sentry-mcp-fix-sentry-error-in-empower-website(/?)", "destination": "/guides/external-tools/sentry-mcp-fix-sentry-error-in-empower-website/", "statusCode": 308 }, { - "source": "/university/mcp-servers/figma-remote-mcp-create-a-website-from-a-figma-file-from-scratch", + "source": "/university/mcp-servers/figma-remote-mcp-create-a-website-from-a-figma-file-from-scratch(/?)", "destination": "/guides/external-tools/figma-remote-mcp-create-a-website-from-a-figma-file-from-scratch/", "statusCode": 308 }, { - "source": "/university/mcp-servers/linear-mcp-retrieve-issue-data", + "source": "/university/mcp-servers/linear-mcp-retrieve-issue-data(/?)", "destination": "/guides/external-tools/linear-mcp-retrieve-issue-data/", "statusCode": 308 }, { - "source": "/university/mcp-servers/linear-mcp-updating-tickets-with-a-lean-build-approach", + "source": "/university/mcp-servers/linear-mcp-updating-tickets-with-a-lean-build-approach(/?)", "destination": "/guides/external-tools/linear-mcp-updating-tickets-with-a-lean-build-approach/", "statusCode": 308 }, { - "source": "/university/mcp-servers/github-mcp-summarizing-open-prs-and-creating-gh-issues", + "source": "/university/mcp-servers/github-mcp-summarizing-open-prs-and-creating-gh-issues(/?)", "destination": "/guides/external-tools/github-mcp-summarizing-open-prs-and-creating-gh-issues/", "statusCode": 308 }, { - "source": "/university/mcp-servers/puppeteer-mcp-scraping-amazon-web-reviews", + "source": "/university/mcp-servers/puppeteer-mcp-scraping-amazon-web-reviews(/?)", "destination": "/guides/external-tools/puppeteer-mcp-scraping-amazon-web-reviews/", "statusCode": 308 }, { - "source": "/university/mcp-servers/context7-mcp-update-astro-project-with-best-practices", + "source": "/university/mcp-servers/context7-mcp-update-astro-project-with-best-practices(/?)", "destination": "/guides/external-tools/context7-mcp-update-astro-project-with-best-practices/", "statusCode": 308 }, { - "source": "/university/mcp-servers/sqlite-and-stripe-mcp-basic-queries-you-can-make-after-set-up", + "source": "/university/mcp-servers/sqlite-and-stripe-mcp-basic-queries-you-can-make-after-set-up(/?)", "destination": "/guides/external-tools/sqlite-and-stripe-mcp-basic-queries-you-can-make-after-set-up/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp/using-mcp-servers-with-warp", + "source": "/university/how-warp-uses-warp/using-mcp-servers-with-warp(/?)", "destination": "/guides/external-tools/using-mcp-servers-with-warp/", "statusCode": 308 }, { - "source": "/university/end-to-end-builds/building-a-real-time-chat-app-github-mcp-railway", + "source": "/university/end-to-end-builds/building-a-real-time-chat-app-github-mcp-railway(/?)", "destination": "/guides/build-an-app-in-warp/building-a-real-time-chat-app-github-mcp-railway/", "statusCode": 308 }, { - "source": "/university/end-to-end-builds/building-a-chrome-extension-d3js-javascript-html-css", + "source": "/university/end-to-end-builds/building-a-chrome-extension-d3js-javascript-html-css(/?)", "destination": "/guides/build-an-app-in-warp/building-a-chrome-extension-d3js-javascript-html-css/", "statusCode": 308 }, { - "source": "/university/warp-runtime/building-a-slackbot", + "source": "/university/warp-runtime/building-a-slackbot(/?)", "destination": "/platform/integrations/slack/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp/building-warps-input-with-warp", + "source": "/university/how-warp-uses-warp/building-warps-input-with-warp(/?)", "destination": "/guides/build-an-app-in-warp/building-warps-input-with-warp/", "statusCode": 308 }, { - "source": "/university/developer-workflows/devops/how-to-analyze-cloud-run-logs-gcloud", + "source": "/university/developer-workflows/devops/how-to-analyze-cloud-run-logs-gcloud(/?)", "destination": "/guides/devops/how-to-analyze-cloud-run-logs-gcloud/", "statusCode": 308 }, { - "source": "/university/developer-workflows/devops/how-to-create-a-production-ready-docker-setup", + "source": "/university/developer-workflows/devops/how-to-create-a-production-ready-docker-setup(/?)", "destination": "/guides/devops/how-to-create-a-production-ready-docker-setup/", "statusCode": 308 }, { - "source": "/university/terminal-command-line-tips/improve-your-kubernetes-workflow-kubectl-helm", + "source": "/university/terminal-command-line-tips/improve-your-kubernetes-workflow-kubectl-helm(/?)", "destination": "/guides/devops/improve-your-kubernetes-workflow-kubectl-helm/", "statusCode": 308 }, { - "source": "/university/developer-workflows/testing-and-security/how-to-prevent-secrets-from-leaking", + "source": "/university/developer-workflows/testing-and-security/how-to-prevent-secrets-from-leaking(/?)", "destination": "/guides/devops/how-to-prevent-secrets-from-leaking/", "statusCode": 308 }, { - "source": "/university/developer-workflows/testing-and-security/how-to-generate-unit-and-security-tests-to-debug-faster", + "source": "/university/developer-workflows/testing-and-security/how-to-generate-unit-and-security-tests-to-debug-faster(/?)", "destination": "/guides/devops/how-to-generate-unit-and-security-tests-to-debug-faster/", "statusCode": 308 }, { - "source": "/university/developer-workflows/backend/how-to-write-sql-commands-inside-a-postgres-repl", + "source": "/university/developer-workflows/backend/how-to-write-sql-commands-inside-a-postgres-repl(/?)", "destination": "/guides/devops/how-to-write-sql-commands-inside-a-postgres-repl/", "statusCode": 308 }, { - "source": "/university/developer-workflows/backend/how-to-create-priority-matrix-for-database-optimization", + "source": "/university/developer-workflows/backend/how-to-create-priority-matrix-for-database-optimization(/?)", "destination": "/guides/devops/how-to-create-priority-matrix-for-database-optimization/", "statusCode": 308 }, { - "source": "/university/developer-workflows/frontend-ui/how-to-replace-a-ui-element-in-warp-rust-codebase", + "source": "/university/developer-workflows/frontend-ui/how-to-replace-a-ui-element-in-warp-rust-codebase(/?)", "destination": "/guides/frontend/how-to-replace-a-ui-element-in-warp-rust-codebase/", "statusCode": 308 }, { - "source": "/university/developer-workflows/frontend-ui/how-to-actually-code-ui-that-matches-your-mockup-react-tailwind", + "source": "/university/developer-workflows/frontend-ui/how-to-actually-code-ui-that-matches-your-mockup-react-tailwind(/?)", "destination": "/guides/frontend/how-to-actually-code-ui-that-matches-your-mockup-react-tailwind/", "statusCode": 308 }, { - "source": "/university/developer-workflows", + "source": "/university/developer-workflows(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/developer-workflows/beginner", + "source": "/university/developer-workflows/beginner(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/developer-workflows/power-user", + "source": "/university/developer-workflows/power-user(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/developer-workflows/devops", + "source": "/university/developer-workflows/devops(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/developer-workflows/backend", + "source": "/university/developer-workflows/backend(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/developer-workflows/frontend-ui", + "source": "/university/developer-workflows/frontend-ui(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/developer-workflows/testing-and-security", + "source": "/university/developer-workflows/testing-and-security(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/how-warp-uses-warp", + "source": "/university/how-warp-uses-warp(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/integrations", + "source": "/university/integrations(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/mcp-servers", + "source": "/university/mcp-servers(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/end-to-end-builds", + "source": "/university/end-to-end-builds(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/terminal-command-line-tips", + "source": "/university/terminal-command-line-tips(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/warp-runtime", + "source": "/university/warp-runtime(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/university/", + "source": "/university(/?)", "destination": "/guides/", "statusCode": 308 }, @@ -4554,7 +4480,7 @@ }, { "source": "/agent-platform/warp-agents/capabilities-overview/computer-use(/?)", - "destination": "/agent-platform/capabilities/computer-use/", + "destination": "/agents/capabilities/computer-use/", "statusCode": 308 }, { @@ -4628,7 +4554,7 @@ "statusCode": 308 }, { - "source": "/guides/build-an-app-in-warp/building-a-chrome-extension-d3.js-\\+-javascript-\\+-html-\\+-css", + "source": "/guides/build-an-app-in-warp/building-a-chrome-extension-d3.js-\\+-javascript-\\+-html-\\+-css(/?)", "destination": "/guides/build-an-app-in-warp/building-a-chrome-extension-d3js-javascript-html-css/", "statusCode": 308 }, @@ -4967,33 +4893,28 @@ "destination": "/support-and-community/troubleshooting-and-support/updating-warp/", "statusCode": 308 }, - { - "source": "/errors/", - "destination": "/factories/api-and-sdk/troubleshooting/errors/", - "statusCode": 308 - }, { "source": "/errors/:code/", "destination": "/factories/api-and-sdk/troubleshooting/errors/:code/", "statusCode": 308 }, { - "source": "/getting-started/about-warps-ai/", + "source": "/getting-started/about-warps-ai(/?)", "destination": "/", "statusCode": 308 }, { - "source": "/getting-started/introduction/", + "source": "/getting-started/introduction(/?)", "destination": "/", "statusCode": 308 }, { - "source": "/what-is-warp/", + "source": "/what-is-warp(/?)", "destination": "/", "statusCode": 308 }, { - "source": "/warp/getting-started/what-is-warp/", + "source": "/warp/getting-started/what-is-warp(/?)", "destination": "/", "statusCode": 308 }, @@ -5003,477 +4924,457 @@ "statusCode": 308 }, { - "source": "/platform/cli", + "source": "/platform/cli(/?)", "destination": "/agents/cli/oz-cli/", "statusCode": 308 }, { - "source": "/support-and-community/plans-and-billing/plans-and-pricing", + "source": "/support-and-community/plans-and-billing/plans-and-pricing(/?)", "destination": "/support-and-community/plans-and-billing/plans-pricing-refunds/", "statusCode": 308 }, { - "source": "/knowledge-and-collaboration/mcp", + "source": "/knowledge-and-collaboration/mcp(/?)", "destination": "/agents/capabilities/mcp/", "statusCode": 308 }, { - "source": "/getting-started/readme-1", + "source": "/getting-started/readme-1(/?)", "destination": "/quickstart/", "statusCode": 308 }, { - "source": "/support-and-billing/plans-and-pricing/ai-credits", + "source": "/support-and-billing/plans-and-pricing/ai-credits(/?)", "destination": "/support-and-community/plans-and-billing/", "statusCode": 308 }, { - "source": "/getting-started/changelog", + "source": "/getting-started/changelog(/?)", "destination": "/changelog/", "statusCode": 308 }, { - "source": "/university", - "destination": "/guides/", - "statusCode": 308 - }, - { - "source": "/code/codebase-context", + "source": "/code/codebase-context(/?)", "destination": "/agents/capabilities/codebase-context/", "statusCode": 308 }, { - "source": "/platform/environments", - "destination": "/platform/environments/", - "statusCode": 308 - }, - { - "source": "/agents/using-agents/model-choice", + "source": "/agents/using-agents/model-choice(/?)", "destination": "/agents/inference/model-choice/", "statusCode": 308 }, { - "source": "/getting-started/readme/agents-in-warp", + "source": "/getting-started/readme/agents-in-warp(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/privacy/privacy", + "source": "/privacy/privacy(/?)", "destination": "/support-and-community/privacy-and-security/privacy/", "statusCode": 308 }, { - "source": "/agents/using-agents/third-party-cli-agents", + "source": "/agents/using-agents/third-party-cli-agents(/?)", "destination": "/agents/cli-agents/overview/", "statusCode": 308 }, { - "source": "/knowledge-and-collaboration/rules", + "source": "/knowledge-and-collaboration/rules(/?)", "destination": "/agents/capabilities/rules/", "statusCode": 308 }, { - "source": "/agent-platform/agent/skills", + "source": "/agent-platform/agent/skills(/?)", "destination": "/agents/capabilities/skills/", "statusCode": 308 }, { - "source": "/community/refer-a-friend", + "source": "/community/refer-a-friend(/?)", "destination": "/support-and-community/community/refer-a-friend/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/model-choice", + "source": "/agent-platform/agent/using-agents/model-choice(/?)", "destination": "/agents/inference/model-choice/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents", + "source": "/agent-platform/agent/using-agents(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/agents/using-agents/planning", + "source": "/agents/using-agents/planning(/?)", "destination": "/agents/capabilities/planning/", "statusCode": 308 }, { - "source": "/support-and-community/plans-and-billing/ai-credits", + "source": "/support-and-community/plans-and-billing/ai-credits(/?)", "destination": "/support-and-community/plans-and-billing/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/agent-conversations", + "source": "/agent-platform/agent/using-agents/agent-conversations(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/community/warp-preview-and-alpha-program", + "source": "/community/warp-preview-and-alpha-program(/?)", "destination": "/support-and-community/community/warp-preview-and-alpha-program/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/skills", + "source": "/agent-platform/warps-agent/capabilities-overview/skills(/?)", "destination": "/agents/capabilities/skills/", "statusCode": 308 }, { - "source": "/guides/integrations/how-to-set-up-claude-code", + "source": "/guides/integrations/how-to-set-up-claude-code(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/agents/using-agents/agent-conversations", + "source": "/agents/using-agents/agent-conversations(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/agents/using-agents/agent-profiles-permissions", + "source": "/agents/using-agents/agent-profiles-permissions(/?)", "destination": "/agents/capabilities/agent-profiles-permissions/", "statusCode": 308 }, { - "source": "/integrations/integrations-overview", + "source": "/integrations/integrations-overview(/?)", "destination": "/platform/integrations/", "statusCode": 308 }, { - "source": "/agents/using-agents", + "source": "/agents/using-agents(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/model-choice", + "source": "/agent-platform/warps-agent/capabilities-overview/model-choice(/?)", "destination": "/agents/inference/model-choice/", "statusCode": 308 }, { - "source": "/platform/agent-api-and-sdk", + "source": "/platform/agent-api-and-sdk(/?)", "destination": "/factories/api-and-sdk/", "statusCode": 308 }, { - "source": "/support-and-billing/using-warp-offline", + "source": "/support-and-billing/using-warp-offline(/?)", "destination": "/support-and-community/troubleshooting-and-support/using-warp-offline/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/interacting-with-agents/terminal-and-agent-modes", + "source": "/agent-platform/warps-agent/interacting-with-agents/terminal-and-agent-modes(/?)", "destination": "/agents/local-agents/interacting-with-agents/terminal-and-agent-modes/", "statusCode": 308 }, { - "source": "/agent-platform/third-party-agents", + "source": "/agent-platform/third-party-agents(/?)", "destination": "/agents/cli-agents/overview/", "statusCode": 308 }, { - "source": "/agents/full-terminal-use", + "source": "/agents/full-terminal-use(/?)", "destination": "/agents/capabilities/full-terminal-use/", "statusCode": 308 }, { - "source": "/agent-platform/agent/ai-faqs", + "source": "/agent-platform/agent/ai-faqs(/?)", "destination": "/agents/getting-started/faqs/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/managing-agents", + "source": "/agent-platform/agent/using-agents/managing-agents(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/agent-context/mcp", + "source": "/agent-platform/warps-agent/agent-context/mcp(/?)", "destination": "/agents/capabilities/mcp/", "statusCode": 308 }, { - "source": "/agents/slash-commands", + "source": "/agents/slash-commands(/?)", "destination": "/agents/capabilities/slash-commands/", "statusCode": 308 }, { - "source": "/privacy/secret-redaction", + "source": "/privacy/secret-redaction(/?)", "destination": "/support-and-community/privacy-and-security/secret-redaction/", "statusCode": 308 }, { - "source": "/support-and-billing/licenses", + "source": "/support-and-billing/licenses(/?)", "destination": "/support-and-community/privacy-and-security/privacy/", "statusCode": 308 }, { - "source": "/agent-platform/agent/slash-commands", + "source": "/agent-platform/agent/slash-commands(/?)", "destination": "/agents/capabilities/slash-commands/", "statusCode": 308 }, { - "source": "/ambient-agents/agent-secrets", + "source": "/ambient-agents/agent-secrets(/?)", "destination": "/platform/secrets/", "statusCode": 308 }, { - "source": "/integrations/slack", + "source": "/integrations/slack(/?)", "destination": "/platform/integrations/slack/", "statusCode": 308 }, { - "source": "/agents/using-agents/agent-tasklists", + "source": "/agents/using-agents/agent-tasklists(/?)", "destination": "/agents/capabilities/task-lists/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/agent-context/images-as-context", + "source": "/agent-platform/agent/using-agents/agent-context/images-as-context(/?)", "destination": "/agents/local-agents/agent-context/images-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/getting-started", + "source": "/agent-platform/getting-started(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/integrations/github-actions", + "source": "/integrations/github-actions(/?)", "destination": "/platform/integrations/github-actions/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/agent-conversations/conversation-forking", + "source": "/agent-platform/agent/using-agents/agent-conversations/conversation-forking(/?)", "destination": "/agents/local-agents/interacting-with-agents/conversation-forking/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/agent-profiles-permissions", + "source": "/agent-platform/agent/using-agents/agent-profiles-permissions(/?)", "destination": "/agents/capabilities/agent-profiles-permissions/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/rules", + "source": "/agent-platform/warps-agent/capabilities-overview/rules(/?)", "destination": "/agents/capabilities/rules/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/session-sharing", + "source": "/agent-platform/warps-agent/capabilities-overview/session-sharing(/?)", "destination": "/agents/local-agents/session-sharing/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/interacting-with-agents/voice", + "source": "/agent-platform/warps-agent/interacting-with-agents/voice(/?)", "destination": "/agents/local-agents/interacting-with-agents/voice/", "statusCode": 308 }, { - "source": "/agents/active-ai", + "source": "/agents/active-ai(/?)", "destination": "/agents/local-agents/active-ai/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/code-diffs", + "source": "/agent-platform/local-agents/interacting-with-agents/code-diffs(/?)", "destination": "/agents/local-agents/code-diffs/", "statusCode": 308 }, { - "source": "/integrations/linear", + "source": "/integrations/linear(/?)", "destination": "/platform/integrations/linear/", "statusCode": 308 }, { - "source": "/platform/cli/integrations-and-environments", + "source": "/platform/cli/integrations-and-environments(/?)", "destination": "/platform/integrations/", "statusCode": 308 }, { - "source": "/privacy/network-log", + "source": "/privacy/network-log(/?)", "destination": "/support-and-community/privacy-and-security/network-log/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/agent-context", + "source": "/agent-platform/agent/using-agents/agent-context(/?)", "destination": "/agents/local-agents/agent-context/", "statusCode": 308 }, { - "source": "/agent-platform/local-agents/interacting-with-agents/code-diffs-in-agent-conversations", + "source": "/agent-platform/local-agents/interacting-with-agents/code-diffs-in-agent-conversations(/?)", "destination": "/agents/local-agents/code-diffs/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/interacting-with-agents", + "source": "/agent-platform/warps-agent/interacting-with-agents(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/ambient-agents/mcp-servers-for-agents", + "source": "/ambient-agents/mcp-servers-for-agents(/?)", "destination": "/platform/", "statusCode": 308 }, { - "source": "/agent-platform/agent/agents-overview", + "source": "/agent-platform/agent/agents-overview(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agent-platform/agent/voice", + "source": "/agent-platform/agent/voice(/?)", "destination": "/agents/local-agents/interacting-with-agents/voice/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/full-terminal-use", + "source": "/agent-platform/warps-agent/capabilities-overview/full-terminal-use(/?)", "destination": "/agents/capabilities/full-terminal-use/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/interacting-with-agents/code-diffs", + "source": "/agent-platform/warps-agent/interacting-with-agents/code-diffs(/?)", "destination": "/agents/local-agents/code-diffs/", "statusCode": 308 }, { - "source": "/agents/using-agents/agent-context", + "source": "/agents/using-agents/agent-context(/?)", "destination": "/agents/local-agents/agent-context/", "statusCode": 308 }, { - "source": "/knowledge-and-collaboration/session-sharing/agent-session-sharing", + "source": "/knowledge-and-collaboration/session-sharing/agent-session-sharing(/?)", "destination": "/knowledge-and-collaboration/session-sharing/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/warp-agents", + "source": "/agent-platform/warps-agent/warp-agents(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agents/using-agents/web-search", + "source": "/agents/using-agents/web-search(/?)", "destination": "/agents/capabilities/web-search/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/agent-context/images-as-context", + "source": "/agent-platform/warps-agent/agent-context/images-as-context(/?)", "destination": "/agents/local-agents/agent-context/images-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/agent-profiles-permissions", + "source": "/agent-platform/warps-agent/capabilities-overview/agent-profiles-permissions(/?)", "destination": "/agents/capabilities/agent-profiles-permissions/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/slash-commands", + "source": "/agent-platform/warps-agent/capabilities-overview/slash-commands(/?)", "destination": "/agents/capabilities/slash-commands/", "statusCode": 308 }, { - "source": "/agents", - "destination": "/agents/", - "statusCode": 308 - }, - { - "source": "/agents/agent-modality-beta", + "source": "/agents/agent-modality-beta(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/guides/integrations/how-to-set-up-opencode", + "source": "/guides/integrations/how-to-set-up-opencode(/?)", "destination": "/guides/", "statusCode": 308 }, { - "source": "/help/troubleshooting-login-issues", + "source": "/help/troubleshooting-login-issues(/?)", "destination": "/support-and-community/troubleshooting-and-support/troubleshooting-login-issues/", "statusCode": 308 }, { - "source": "/platform/agent-api-and-sdk/agent-1", + "source": "/platform/agent-api-and-sdk/agent-1(/?)", "destination": "/factories/api-and-sdk/", "statusCode": 308 }, { - "source": "/agent-platform/agent/agent-modality-beta", + "source": "/agent-platform/agent/agent-modality-beta(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agent-platform/cloud-agents/self-hosting/managed-worker-reference", + "source": "/agent-platform/cloud-agents/self-hosting/managed-worker-reference(/?)", "destination": "/factories/self-hosting/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/codebase-context", + "source": "/agent-platform/warps-agent/capabilities-overview/codebase-context(/?)", "destination": "/agents/capabilities/codebase-context/", "statusCode": 308 }, { - "source": "/agents/generate", + "source": "/agents/generate(/?)", "destination": "/agents/local-agents/generate/", "statusCode": 308 }, { - "source": "/agents/using-agents/agent-context/selection-as-context", + "source": "/agents/using-agents/agent-context/selection-as-context(/?)", "destination": "/agents/local-agents/interacting-with-agents/", "statusCode": 308 }, { - "source": "/ambient-agents/managing-ambient-agents/scheduled-agents", + "source": "/ambient-agents/managing-ambient-agents/scheduled-agents(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/features/warp-ai", + "source": "/features/warp-ai(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/integrations/github-actions/demo-issue-triage-bot", + "source": "/integrations/github-actions/demo-issue-triage-bot(/?)", "destination": "/platform/integrations/", "statusCode": 308 }, { - "source": "/knowledge-and-collaboration/session-sharing/ambient-agents-session-sharing", + "source": "/knowledge-and-collaboration/session-sharing/ambient-agents-session-sharing(/?)", "destination": "/knowledge-and-collaboration/session-sharing/", "statusCode": 308 }, { - "source": "/platform", - "destination": "/agents/", - "statusCode": 308 - }, - { - "source": "/platform/cli/troubleshooting", + "source": "/platform/cli/troubleshooting(/?)", "destination": "/agents/cli/oz-cli/", "statusCode": 308 }, { - "source": "/agent-platform/agent/generate", + "source": "/agent-platform/agent/generate(/?)", "destination": "/agents/local-agents/generate/", "statusCode": 308 }, { - "source": "/agent-platform/agent/using-agents/planning", + "source": "/agent-platform/agent/using-agents/planning(/?)", "destination": "/agents/capabilities/planning/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/capabilities", + "source": "/agent-platform/capabilities/capabilities(/?)", "destination": "/agents/capabilities/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/active-ai", + "source": "/agent-platform/warps-agent/active-ai(/?)", "destination": "/agents/local-agents/active-ai/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/agent-context/selection-as-context", + "source": "/agent-platform/warps-agent/agent-context/selection-as-context(/?)", "destination": "/agents/local-agents/agent-context/selection-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/computer-use", + "source": "/agent-platform/warps-agent/capabilities-overview/computer-use(/?)", "destination": "/agents/capabilities/computer-use/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/planning", + "source": "/agent-platform/warps-agent/capabilities-overview/planning(/?)", "destination": "/agents/capabilities/planning/", "statusCode": 308 }, @@ -5488,12 +5389,12 @@ "statusCode": 308 }, { - "source": "/guides/agent-workflows", + "source": "/guides/agent-workflows(/?)", "destination": "/guides/agent-workflows/how-to-review-ai-generated-code/", "statusCode": 308 }, { - "source": "/support-and-billing/plans-and-pricing/usage-overages", + "source": "/support-and-billing/plans-and-pricing/usage-overages(/?)", "destination": "/support-and-community/plans-and-billing/", "statusCode": 308 }, @@ -5618,12 +5519,12 @@ "statusCode": 308 }, { - "source": "/agent-platform/cloud-agents-and-orchestration/team-access-billing-and-identity", + "source": "/agent-platform/cloud-agents-and-orchestration/team-access-billing-and-identity(/?)", "destination": "/platform/team-access-billing-and-identity/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/agent-context/blocks-as-context", + "source": "/agent-platform/warps-agent/agent-context/blocks-as-context(/?)", "destination": "/agents/local-agents/agent-context/blocks-as-context/", "statusCode": 308 }, @@ -5668,12 +5569,12 @@ "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/agent-context/urls-as-context", + "source": "/agent-platform/warps-agent/agent-context/urls-as-context(/?)", "destination": "/agents/local-agents/agent-context/urls-as-context/", "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/agent-context/using-to-add-context", + "source": "/agent-platform/warps-agent/agent-context/using-to-add-context(/?)", "destination": "/agents/local-agents/agent-context/using-to-add-context/", "statusCode": 308 }, @@ -5838,7 +5739,7 @@ "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/capabilities-overview/web-search", + "source": "/agent-platform/warps-agent/capabilities-overview/web-search(/?)", "destination": "/agents/capabilities/web-search/", "statusCode": 308 }, @@ -5863,7 +5764,7 @@ "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/interacting-with-agents/conversation-forking", + "source": "/agent-platform/warps-agent/interacting-with-agents/conversation-forking(/?)", "destination": "/agents/local-agents/interacting-with-agents/conversation-forking/", "statusCode": 308 }, @@ -5883,7 +5784,7 @@ "statusCode": 308 }, { - "source": "/agent-platform/warps-agent/interactive-code-review", + "source": "/agent-platform/warps-agent/interactive-code-review(/?)", "destination": "/agents/local-agents/interactive-code-review/", "statusCode": 308 }, @@ -6048,32 +5949,32 @@ "statusCode": 308 }, { - "source": "/developers/cli", + "source": "/developers/cli(/?)", "destination": "/agents/cli/oz-cli/", "statusCode": 308 }, { - "source": "/enterprise/enterprise-features", + "source": "/enterprise/enterprise-features(/?)", "destination": "/enterprise/enterprise-features/architecture-and-deployment/", "statusCode": 308 }, { - "source": "/features/ai", + "source": "/features/ai(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/features/warp-ai/agent-mode", + "source": "/features/warp-ai/agent-mode(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/getting-started/privacy", + "source": "/getting-started/privacy(/?)", "destination": "/support-and-community/privacy-and-security/privacy/", "statusCode": 308 }, { - "source": "/help/known-issues", + "source": "/help/known-issues(/?)", "destination": "/support-and-community/troubleshooting-and-support/known-issues/", "statusCode": 308 }, @@ -6133,7 +6034,7 @@ "statusCode": 308 }, { - "source": "/integrations/integrations-and-plugins", + "source": "/integrations/integrations-and-plugins(/?)", "destination": "/platform/integrations/", "statusCode": 308 }, @@ -6238,12 +6139,12 @@ "statusCode": 308 }, { - "source": "/platform/agent-api-and-sdk/agent", + "source": "/platform/agent-api-and-sdk/agent(/?)", "destination": "/factories/api-and-sdk/", "statusCode": 308 }, { - "source": "/platform/agent-api-and-sdk/demo-sentry-monitoring-with-sdk", + "source": "/platform/agent-api-and-sdk/demo-sentry-monitoring-with-sdk(/?)", "destination": "/factories/api-and-sdk/", "statusCode": 308 }, @@ -6373,7 +6274,7 @@ "statusCode": 308 }, { - "source": "/platform/team-access-billing-and-identity-permissions", + "source": "/platform/team-access-billing-and-identity-permissions(/?)", "destination": "/agents/", "statusCode": 308 }, @@ -6398,92 +6299,92 @@ "statusCode": 308 }, { - "source": "/support-and-community/troubleshooting-and-support", + "source": "/support-and-community/troubleshooting-and-support(/?)", "destination": "/support-and-community/troubleshooting-and-support/sending-us-feedback/", "statusCode": 308 }, { - "source": "/warp/terminal/editor", + "source": "/warp/terminal/editor(/?)", "destination": "/terminal/editor/", "statusCode": 308 }, { - "source": "/features/ai-command-search", + "source": "/features/ai-command-search(/?)", "destination": "/terminal/entry/command-search/", "statusCode": 308 }, { - "source": "/features/entry/ai-command-search", + "source": "/features/entry/ai-command-search(/?)", "destination": "/terminal/entry/command-search/", "statusCode": 308 }, { - "source": "/features/network-log", + "source": "/features/network-log(/?)", "destination": "/support-and-community/privacy-and-security/network-log/", "statusCode": 308 }, { - "source": "/features/warp-ai/ai-command-suggestions", + "source": "/features/warp-ai/ai-command-suggestions(/?)", "destination": "/agents/local-agents/generate/", "statusCode": 308 }, { - "source": "/help/plans-subscriptions-and-pricing", + "source": "/help/plans-subscriptions-and-pricing(/?)", "destination": "/support-and-community/plans-and-billing/plans-pricing-refunds/", "statusCode": 308 }, { - "source": "/integrations/integrations-overview/integrations-and-environments", + "source": "/integrations/integrations-overview/integrations-and-environments(/?)", "destination": "/agents/cli/oz-cli/integration-setup/", "statusCode": 308 }, { - "source": "/features/editor/autosuggestions", + "source": "/features/editor/autosuggestions(/?)", "destination": "/terminal/command-completions/autosuggestions/", "statusCode": 308 }, { - "source": "/code/code-permissions", + "source": "/code/code-permissions(/?)", "destination": "/agents/capabilities/agent-profiles-permissions/", "statusCode": 308 }, { - "source": "/getting-started/refer-a-friend", + "source": "/getting-started/refer-a-friend(/?)", "destination": "/support-and-community/community/refer-a-friend/", "statusCode": 308 }, { - "source": "/help/using-warp-offline", + "source": "/help/using-warp-offline(/?)", "destination": "/support-and-community/troubleshooting-and-support/using-warp-offline/", "statusCode": 308 }, { - "source": "/features/secret-redaction", + "source": "/features/secret-redaction(/?)", "destination": "/support-and-community/privacy-and-security/secret-redaction/", "statusCode": 308 }, { - "source": "/features/warp-ai/active-ai", + "source": "/features/warp-ai/active-ai(/?)", "destination": "/agents/local-agents/active-ai/", "statusCode": 308 }, { - "source": "/oz", + "source": "/oz(/?)", "destination": "/platform/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/agent-memory", + "source": "/agent-platform/capabilities/agent-memory(/?)", "destination": "/agents/agent-memory/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/model-choice", + "source": "/agent-platform/capabilities/model-choice(/?)", "destination": "/agents/inference/model-choice/", "statusCode": 308 }, { - "source": "/agent-platform/capabilities/computer-use-testing-and-recordings", + "source": "/agent-platform/capabilities/computer-use-testing-and-recordings(/?)", "destination": "/agents/capabilities/computer-use/testing-and-recordings/", "statusCode": 308 }, @@ -6493,173 +6394,173 @@ "statusCode": 308 }, { - "source": "/support-and-community/plans-and-billing/custom-inference-endpoint", + "source": "/support-and-community/plans-and-billing/custom-inference-endpoint(/?)", "destination": "/agents/inference/custom-inference-endpoint/", "statusCode": 308 }, { - "source": "/agent-platform/warp-agents", + "source": "/agent-platform/warp-agents(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/backend/how-to-create-priority-matrix-for-database-optimization", + "source": "/guides/developer-workflows/backend/how-to-create-priority-matrix-for-database-optimization(/?)", "destination": "/guides/devops/how-to-create-priority-matrix-for-database-optimization/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/backend/how-to-write-sql-commands-inside-a-postgres-repl", + "source": "/guides/developer-workflows/backend/how-to-write-sql-commands-inside-a-postgres-repl(/?)", "destination": "/guides/devops/how-to-write-sql-commands-inside-a-postgres-repl/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/10-coding-features-you-should-know", + "source": "/guides/developer-workflows/beginner/10-coding-features-you-should-know(/?)", "destination": "/guides/getting-started/10-coding-features-you-should-know/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/how-to-customize-warps-appearance", + "source": "/guides/developer-workflows/beginner/how-to-customize-warps-appearance(/?)", "destination": "/guides/getting-started/how-to-customize-warps-appearance/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/how-to-explain-your-codebase-using-warp-rust-codebase", + "source": "/guides/developer-workflows/beginner/how-to-explain-your-codebase-using-warp-rust-codebase(/?)", "destination": "/guides/agent-workflows/how-to-explain-your-codebase-using-warp-rust-codebase/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/how-to-make-warps-ui-more-minimal", + "source": "/guides/developer-workflows/beginner/how-to-make-warps-ui-more-minimal(/?)", "destination": "/guides/getting-started/how-to-make-warps-ui-more-minimal/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/how-to-master-warps-code-review-panel", + "source": "/guides/developer-workflows/beginner/how-to-master-warps-code-review-panel(/?)", "destination": "/guides/getting-started/how-to-master-warps-code-review-panel/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/trigger-reusable-actions-with-saved-prompts", + "source": "/guides/developer-workflows/beginner/trigger-reusable-actions-with-saved-prompts(/?)", "destination": "/guides/configuration/trigger-reusable-actions-with-saved-prompts/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/beginner/welcome-to-warp", + "source": "/guides/developer-workflows/beginner/welcome-to-warp(/?)", "destination": "/guides/getting-started/welcome-to-warp/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/frontend-ui/how-to-replace-a-ui-element-in-warp-rust-codebase", + "source": "/guides/developer-workflows/frontend-ui/how-to-replace-a-ui-element-in-warp-rust-codebase(/?)", "destination": "/guides/frontend/how-to-replace-a-ui-element-in-warp-rust-codebase/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/how-to-review-ai-generated-code", + "source": "/guides/developer-workflows/how-to-review-ai-generated-code(/?)", "destination": "/guides/agent-workflows/how-to-review-ai-generated-code/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/how-to-run-multiple-ai-coding-agents", + "source": "/guides/developer-workflows/how-to-run-multiple-ai-coding-agents(/?)", "destination": "/guides/agent-workflows/how-to-run-multiple-ai-coding-agents/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/how-to-use-voice-and-images-to-prompt-coding-agents", + "source": "/guides/developer-workflows/how-to-use-voice-and-images-to-prompt-coding-agents(/?)", "destination": "/guides/agent-workflows/how-to-use-voice-and-images-to-prompt-coding-agents/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/warp-for-product-managers", + "source": "/guides/developer-workflows/warp-for-product-managers(/?)", "destination": "/guides/agent-workflows/warp-for-product-managers/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-configure-yolo-and-strategic-agent-profiles", + "source": "/guides/developer-workflows/power-user/how-to-configure-yolo-and-strategic-agent-profiles(/?)", "destination": "/guides/configuration/how-to-configure-yolo-and-strategic-agent-profiles/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-edit-agent-code-in-warp", + "source": "/guides/developer-workflows/power-user/how-to-edit-agent-code-in-warp(/?)", "destination": "/guides/agent-workflows/how-to-edit-agent-code-in-warp/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-review-prs-like-a-senior-dev", + "source": "/guides/developer-workflows/power-user/how-to-review-prs-like-a-senior-dev(/?)", "destination": "/guides/agent-workflows/how-to-review-prs-like-a-senior-dev/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-set-coding-best-practices", + "source": "/guides/developer-workflows/power-user/how-to-set-coding-best-practices(/?)", "destination": "/guides/configuration/how-to-set-coding-best-practices/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-set-coding-preferences-with-rules", + "source": "/guides/developer-workflows/power-user/how-to-set-coding-preferences-with-rules(/?)", "destination": "/guides/configuration/how-to-set-coding-preferences-with-rules/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-set-tech-stack-preferences-with-rules", + "source": "/guides/developer-workflows/power-user/how-to-set-tech-stack-preferences-with-rules(/?)", "destination": "/guides/configuration/how-to-set-tech-stack-preferences-with-rules/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-set-up-self-serve-data-analytics-with-skills", + "source": "/guides/developer-workflows/power-user/how-to-set-up-self-serve-data-analytics-with-skills(/?)", "destination": "/guides/configuration/how-to-set-up-self-serve-data-analytics-with-skills/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-sync-your-monorepos", + "source": "/guides/developer-workflows/power-user/how-to-sync-your-monorepos(/?)", "destination": "/guides/configuration/how-to-sync-your-monorepos/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/power-user/how-to-use-agent-profiles-efficiently", + "source": "/guides/developer-workflows/power-user/how-to-use-agent-profiles-efficiently(/?)", "destination": "/guides/configuration/how-to-use-agent-profiles-efficiently/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/testing-and-security/how-to-generate-unit-and-security-tests-to-debug-faster", + "source": "/guides/developer-workflows/testing-and-security/how-to-generate-unit-and-security-tests-to-debug-faster(/?)", "destination": "/guides/devops/how-to-generate-unit-and-security-tests-to-debug-faster/", "statusCode": 308 }, { - "source": "/guides/developer-workflows/testing-and-security/how-to-prevent-secrets-from-leaking", + "source": "/guides/developer-workflows/testing-and-security/how-to-prevent-secrets-from-leaking(/?)", "destination": "/guides/devops/how-to-prevent-secrets-from-leaking/", "statusCode": 308 }, { - "source": "/guides/how-warp-uses-warp/building-warps-input-with-warp", + "source": "/guides/how-warp-uses-warp/building-warps-input-with-warp(/?)", "destination": "/guides/build-an-app-in-warp/building-warps-input-with-warp/", "statusCode": 308 }, { - "source": "/guides/how-warp-uses-warp/creating-rules-for-agents", + "source": "/guides/how-warp-uses-warp/creating-rules-for-agents(/?)", "destination": "/guides/configuration/creating-rules-for-agents/", "statusCode": 308 }, { - "source": "/guides/how-warp-uses-warp/running-multiple-agents-at-once-with-warp", + "source": "/guides/how-warp-uses-warp/running-multiple-agents-at-once-with-warp(/?)", "destination": "/guides/agent-workflows/how-to-run-multiple-ai-coding-agents/", "statusCode": 308 }, { - "source": "/guides/how-warp-uses-warp/understanding-your-codebase", + "source": "/guides/how-warp-uses-warp/understanding-your-codebase(/?)", "destination": "/guides/agent-workflows/understanding-your-codebase/", "statusCode": 308 }, { - "source": "/guides/how-warp-uses-warp/using-images-as-context-with-warp", + "source": "/guides/how-warp-uses-warp/using-images-as-context-with-warp(/?)", "destination": "/guides/agent-workflows/using-images-as-context-with-warp/", "statusCode": 308 }, { - "source": "/guides/how-warp-uses-warp/using-mcp-servers-with-warp", + "source": "/guides/how-warp-uses-warp/using-mcp-servers-with-warp(/?)", "destination": "/guides/external-tools/using-mcp-servers-with-warp/", "statusCode": 308 }, { - "source": "/guides/warp-runtime/building-a-slackbot", - "destination": "/guides/", + "source": "/guides/warp-runtime/building-a-slackbot(/?)", + "destination": "/platform/integrations/slack/", "statusCode": 308 }, { @@ -6667,16 +6568,31 @@ "destination": "/guides/external-tools/:slug*/", "statusCode": 308 }, + { + "source": "/guides/integrations/:slug*/", + "destination": "/guides/external-tools/:slug*/", + "statusCode": 308 + }, { "source": "/guides/mcp-servers/:slug*", "destination": "/guides/external-tools/:slug*/", "statusCode": 308 }, + { + "source": "/guides/mcp-servers/:slug*/", + "destination": "/guides/external-tools/:slug*/", + "statusCode": 308 + }, { "source": "/guides/developer-workflows/devops/:slug*", "destination": "/guides/devops/:slug*/", "statusCode": 308 }, + { + "source": "/guides/developer-workflows/devops/:slug*/", + "destination": "/guides/devops/:slug*/", + "statusCode": 308 + }, { "source": "/help/updating-warp(/?)", "destination": "/support-and-community/troubleshooting-and-support/updating-warp/", @@ -6793,22 +6709,12 @@ "statusCode": 308 }, { - "source": "/agents/local-agents/overview", - "destination": "/agents/", - "statusCode": 308 - }, - { - "source": "/agents/local-agents/overview/", - "destination": "/agents/", - "statusCode": 308 - }, - { - "source": "/agents/getting-started/agents-in-warp", + "source": "/agents/local-agents/overview(/?)", "destination": "/agents/", "statusCode": 308 }, { - "source": "/agents/getting-started/agents-in-warp/", + "source": "/agents/getting-started/agents-in-warp(/?)", "destination": "/agents/", "statusCode": 308 }, From d99bf83c177275a8ac64894253af9b98300b22e6 Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 16:26:30 +0000 Subject: [PATCH 2/6] Sidebar: link the API reference at its canonical /api/ URL --- src/sidebar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sidebar.ts b/src/sidebar.ts index 82ff67a1c..19e46086b 100644 --- a/src/sidebar.ts +++ b/src/sidebar.ts @@ -528,7 +528,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [ { slug: 'factories/api-and-sdk', label: 'Agent & run endpoints' }, { slug: 'factories/api-and-sdk/quickstart', label: 'Quickstart' }, { slug: 'factories/api-and-sdk/demo-sentry-monitoring-with-sdk', label: 'Sentry monitoring demo' }, - { label: 'API reference', link: '/api' }, + { label: 'API reference', link: '/api/' }, { label: 'Python SDK', link: 'https://github.com/warpdotdev/oz-sdk-python' }, { label: 'TypeScript SDK', link: 'https://github.com/warpdotdev/oz-sdk-typescript' }, { slug: 'factories/api-and-sdk/troubleshooting/errors', label: 'Errors' }, From 8dcc5f65a3b5f356932d2bae1e968f5ccaede72c Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 16:47:19 +0000 Subject: [PATCH 3/6] Link internally to canonical slash URLs; make the /.md test honest - 59 internal links in 13 MDX pages (incl. 12 to /api) now use the slash form, so in-site navigation never costs a 308. Anchors kept; code blocks and external links untouched. - New test: internal links in docs content use the canonical slash URL. - Replace the Accept: text/markdown test, which asserted nothing when the rewrite never matched, with the property this PR guarantees: no redirect or rewrite turns a page URL (slash or no-slash) into a /.md path. --- .github/workflows/ci.yml | 3 +- scripts/redirect-slashes.test.mjs | 68 +++++++++++++++---- .../docs/agents/capabilities/skills.mdx | 2 +- .../docs/factories/api-and-sdk/index.mdx | 8 +-- .../docs/factories/api-and-sdk/quickstart.mdx | 4 +- .../docs/factories/developer-tools.mdx | 2 +- src/content/docs/factories/factory-api.mdx | 2 +- .../self-hosting/external-orchestrators.mdx | 2 +- .../build-a-self-improving-agent.mdx | 16 ++--- .../agent-workflows/build-a-triage-agent.mdx | 12 ++-- .../run-a-software-factory-in-the-cloud.mdx | 30 ++++---- .../set-up-a-software-factory.mdx | 20 +++--- ...ite-product-and-tech-specs-with-agents.mdx | 12 ++-- src/content/docs/platform/agents.mdx | 2 +- .../docs/platform/transitioning-from-oz.mdx | 2 +- 15 files changed, 115 insertions(+), 70 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf268c071..25f4e8d71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,8 @@ jobs: run: python3 scripts/test_check_redirects.py # Replays vercel.json through @vercel/routing-utils: one URL per page - # (trailing slash), slash-agnostic legacy redirects, at most 2 hops. + # (trailing slash), slash-agnostic legacy redirects, at most 2 hops, + # and slash-form internal links in docs content. - name: Test trailing-slash redirects run: npm run test:redirect-slashes diff --git a/scripts/redirect-slashes.test.mjs b/scripts/redirect-slashes.test.mjs index fc1314ca9..1120b5c50 100644 --- a/scripts/redirect-slashes.test.mjs +++ b/scripts/redirect-slashes.test.mjs @@ -38,13 +38,18 @@ function step(path) { const match = route.re.exec(path); if (!match) continue; if (!route.status) return null; // e.g. /.well-known passthrough - return route.location.replace(/\$(\d+|[A-Za-z_]\w*)/g, (_, key) => - (/^\d+$/.test(key) ? match[Number(key)] : match.groups?.[key]) ?? '', - ); + return substitute(route.location, match); } return null; } +/** Fill `$1` / `$name` placeholders from a regex match, as Vercel does. */ +function substitute(template, match) { + return template.replace(/\$(\d+|[A-Za-z_]\w*)/g, (_, key) => + (/^\d+$/.test(key) ? match[Number(key)] : match.groups?.[key]) ?? '', + ); +} + /** Follow redirects; returns the final path (or URL) and the hop count. */ function follow(path) { let current = path; @@ -70,9 +75,11 @@ async function contentFiles(dir) { const docsRoot = repoFile('src/content/docs/'); const pages = new Set(['/api/']); +const contentSources = []; for (const file of await contentFiles(docsRoot)) { const rel = file.href.slice(docsRoot.href.length); if (!/\.mdx?$/.test(rel)) continue; + contentSources.push([rel, await readFile(file, 'utf8')]); const slug = rel.replace(/\.mdx?$/, '').replace(/(^|\/)index$/, '').toLowerCase(); pages.add(slug ? `/${slug}/` : '/'); } @@ -189,16 +196,53 @@ test('internal page destinations use the canonical slash form', () => { expectNone(failures, 'destinations without a trailing slash'); }); -test('Accept: text/markdown rewrites never produce /page/.md', () => { +test('no redirect or rewrite turns a page URL into a /.md path', () => { + // Rewrites are replayed as if their `has` conditions (such as an Accept + // header) match. This guards the path shape only; it does not check what + // any rewrite serves. const rewrites = getTransformedRoutes({ rewrites: config.rewrites ?? [] }).routes - .filter((route) => route.dest?.includes('.md')); - for (const route of rewrites) { - const re = new RegExp(route.src); - for (const page of ['/factories/', '/agents/capabilities/skills/']) { - const match = re.exec(page); - if (!match) continue; - const dest = route.dest.replace(/\$(\d+)/g, (_, n) => match[Number(n)] ?? ''); - assert.ok(!dest.includes('/.md'), `${page} rewrites to ${dest}`); + .filter((route) => route.dest) + .map((route) => ({ re: new RegExp(route.src), dest: route.dest })); + const failures = []; + for (const page of pages) { + for (const form of new Set([page, page.replace(/\/$/, '') || '/'])) { + const seen = [form]; + let current = form; + for (let hop = 0; hop < 6; hop += 1) { + const next = step(current); + if (next === null) break; + seen.push(next); + current = next.split(/[?#]/)[0]; + } + const rewritten = []; + for (const path of seen) { + for (const { re, dest } of rewrites) { + const match = re.exec(path.split(/[?#]/)[0]); + if (match) rewritten.push(substitute(dest, match)); + } + } + const bad = [...seen, ...rewritten].filter((path) => path.split(/[?#]/)[0].endsWith('/.md')); + if (bad.length) failures.push(`${form} -> ${bad.join(', ')}`); + } + } + expectNone(failures, 'page URLs that reach a /.md path'); +}); + +test('internal links in docs content use the canonical slash URL', () => { + // A link to /page instead of /page/ costs every reader and crawler a 308. + // Fenced code blocks and inline code are skipped. + const link = /(\]\(|href=["'])(\/[^)\s"'#?]*[^)\s"'#?/])(?=[)\s"'#?])/g; + const failures = []; + for (const [file, text] of contentSources) { + const prose = text + .replace(/^\s*(```|~~~)[\s\S]*?^\s*\1.*$/gm, '') + .replace(/`[^`\n]*`/g, ''); + for (const match of prose.matchAll(link)) { + const path = match[2]; + if (!EXTENSION.test(lastSegment(path)) && pages.has(`${path}/`)) { + failures.push(`${file}: ${path} -> ${path}/`); + } } } + expectNone(failures, 'no-slash internal links'); }); diff --git a/src/content/docs/agents/capabilities/skills.mdx b/src/content/docs/agents/capabilities/skills.mdx index 8767b37be..d9afe8b27 100644 --- a/src/content/docs/agents/capabilities/skills.mdx +++ b/src/content/docs/agents/capabilities/skills.mdx @@ -64,7 +64,7 @@ The Agent recognizes when your request matches a skill's purpose, loads the skil ### Identify skill sources in conversation data -The [Conversation API](/api) returns skill loads as `read_skill` actions. The action's `input` identifies the skill source: +The [Conversation API](/api/) returns skill loads as `read_skill` actions. The action's `input` identifies the skill source: | Input field | Skill source | | --- | --- | diff --git a/src/content/docs/factories/api-and-sdk/index.mdx b/src/content/docs/factories/api-and-sdk/index.mdx index 990315903..d0e048645 100644 --- a/src/content/docs/factories/api-and-sdk/index.mdx +++ b/src/content/docs/factories/api-and-sdk/index.mdx @@ -26,7 +26,7 @@ Agent & run endpoints let you create and inspect [cloud agent](/platform/) runs * Monitor execution by listing runs and tracking state transitions over time (queued → in progress → succeeded/failed) * Inspect results and provenance by fetching a run's full details, including the original prompt, source/creator metadata, session link, and resolved agent configuration -For endpoint details, use the [**{VARS.WARP_PLATFORM_API} reference**](/api). For SDK schemas, use the [Python SDK](https://github.com/warpdotdev/oz-sdk-python) and [TypeScript SDK](https://github.com/warpdotdev/oz-sdk-typescript) repositories. +For endpoint details, use the [**{VARS.WARP_PLATFORM_API} reference**](/api/). For SDK schemas, use the [Python SDK](https://github.com/warpdotdev/oz-sdk-python) and [TypeScript SDK](https://github.com/warpdotdev/oz-sdk-typescript) repositories. To send work to a [Warp factory](/factories/), use [factory endpoints](/factories/factory-api/) to discover it and dispatch by UID instead of calling `POST /agent/runs` with a foreman's `agent_identity_uid`. The follow-up, cancellation, and status endpoints still apply after a factory run is dispatched. @@ -69,7 +69,7 @@ An agent run represents a single execution of a cloud agent, created with a prom * Optional session information (`session_id`, `session_link`) * Optional resolved configuration (`agent_config`) -See the [**{VARS.WARP_PLATFORM_API} reference**](/api) for details on how runs are created and listed. +See the [**{VARS.WARP_PLATFORM_API} reference**](/api/) for details on how runs are created and listed. ## Agent configuration @@ -149,7 +149,7 @@ Agent & run endpoints include: Cancel a run that is currently queued or in progress. Returns the ID of the cancelled run. -All endpoint semantics, query parameters, and [error codes](/factories/api-and-sdk/troubleshooting/errors/) are documented in the [{VARS.WARP_PLATFORM_API} reference](/api). +All endpoint semantics, query parameters, and [error codes](/factories/api-and-sdk/troubleshooting/errors/) are documented in the [{VARS.WARP_PLATFORM_API} reference](/api/). ## SDKs @@ -190,4 +190,4 @@ Import `WarpClient` from `@warp-dot-dev/warp-platform-sdk`. See the [**TypeScrip * [{VARS.WARP_PLATFORM_API} quickstart](/factories/api-and-sdk/quickstart/) - Create and monitor your first run in about five minutes. * [Factory endpoints](/factories/factory-api/) - Find a factory and dispatch work to it by UID. * [API errors](/factories/api-and-sdk/troubleshooting/errors/) - Error codes, response format, and how to resolve each one. -* [{VARS.WARP_PLATFORM_API} reference](/api) - Every endpoint, parameter, and schema. +* [{VARS.WARP_PLATFORM_API} reference](/api/) - Every endpoint, parameter, and schema. diff --git a/src/content/docs/factories/api-and-sdk/quickstart.mdx b/src/content/docs/factories/api-and-sdk/quickstart.mdx index 08fb27fa4..642dc4e68 100644 --- a/src/content/docs/factories/api-and-sdk/quickstart.mdx +++ b/src/content/docs/factories/api-and-sdk/quickstart.mdx @@ -74,7 +74,7 @@ The `state` has the following possible values: * `SUCCEEDED` - The run completed successfully. * `FAILED` - The run encountered an error. Check the `status_message` field in the response for details, then use the [API error reference](/factories/api-and-sdk/troubleshooting/errors/) to interpret the error code. -These are the most common states. See the [Agent & run endpoints](/factories/api-and-sdk/) and [{VARS.WARP_PLATFORM_API} reference](/api) for all possible values. +These are the most common states. See the [Agent & run endpoints](/factories/api-and-sdk/) and [{VARS.WARP_PLATFORM_API} reference](/api/) for all possible values. To list all recent runs: @@ -93,7 +93,7 @@ You can also view and manage all runs in the get started with Warp) -* A cloud environment with access to your repository ([create one](/platform/environments)) +* A cloud environment with access to your repository ([create one](/platform/environments/)) ## Why principles beat rules @@ -98,7 +98,7 @@ Weekly is a good starting cadence: it processes the previous week's corrections 2. Replace `YOUR_ENVIRONMENT_SLUG` with the slug of your {VARS.WARP_AUTOMATION_PLATFORM} environment. -See [Scheduled agents](/platform/triggers/scheduled-agents) for the full reference. +See [Scheduled agents](/platform/triggers/scheduled-agents/) for the full reference. ## 4. Review the proposed skill changes @@ -121,8 +121,8 @@ Over time, the companion skill accumulates a clear description of how your team ## Next steps * [Self-improvement in Warp Factories](/factories/measure-and-improve/self-improvement/) — The managed version of this outer loop, run inside a factory. -* [Set up your software factory](/guides/agent-workflows/set-up-a-software-factory) — The inner loop the outer loop improves. -* [Run a software factory in the cloud](/guides/agent-workflows/run-a-software-factory-in-the-cloud) — Move the loop to the {VARS.WARP_AUTOMATION_PLATFORM} for team-wide visibility. -* [Scheduled agents](/platform/triggers/scheduled-agents) — Full reference for running cloud agents on a cadence. +* [Set up your software factory](/guides/agent-workflows/set-up-a-software-factory/) — The inner loop the outer loop improves. +* [Run a software factory in the cloud](/guides/agent-workflows/run-a-software-factory-in-the-cloud/) — Move the loop to the {VARS.WARP_AUTOMATION_PLATFORM} for team-wide visibility. +* [Scheduled agents](/platform/triggers/scheduled-agents/) — Full reference for running cloud agents on a cadence. * [`warpdotdev/oz-for-oss`](https://github.com/warpdotdev/oz-for-oss) — The complete reference implementation including all outer-loop skills. -* [Skills](/agents/capabilities/skills) — How skill files work in Warp and the {VARS.WARP_AUTOMATION_PLATFORM}. +* [Skills](/agents/capabilities/skills/) — How skill files work in Warp and the {VARS.WARP_AUTOMATION_PLATFORM}. diff --git a/src/content/docs/guides/agent-workflows/build-a-triage-agent.mdx b/src/content/docs/guides/agent-workflows/build-a-triage-agent.mdx index 9d891744b..97c73f27a 100644 --- a/src/content/docs/guides/agent-workflows/build-a-triage-agent.mdx +++ b/src/content/docs/guides/agent-workflows/build-a-triage-agent.mdx @@ -38,7 +38,7 @@ You will encode these decisions in a skill file in the next step. ## 2. Create the triage skill -A [skill](/agents/capabilities/skills) is a markdown file that defines the agent's behavior. It tells the agent what to analyze, how to classify results, and what to output. +A [skill](/agents/capabilities/skills/) is a markdown file that defines the agent's behavior. It tells the agent what to analyze, how to classify results, and what to output. 1. Create a `.agents/skills/triage-issue/` directory in your repository with a `SKILL.md` file. 2. Copy the [`triage-issue` skill from `warpdotdev/oz-for-oss`](https://github.com/warpdotdev/oz-for-oss/blob/main/.agents/skills/triage-issue/SKILL.md) into your repository. This is the production triage skill Warp uses for its own open source repository. @@ -111,7 +111,7 @@ jobs: 3. Add `WARP_API_KEY` to your repository's GitHub Actions secrets under **Settings** > **Secrets and variables** > **Actions**. -See [GitHub Actions integration](/platform/integrations/github-actions) for the full setup guide for `warpdotdev/oz-agent-action`. +See [GitHub Actions integration](/platform/integrations/github-actions/) for the full setup guide for `warpdotdev/oz-agent-action`. ## 5. Review and improve @@ -124,7 +124,7 @@ Add repo-specific context without forking the core skill by creating a `triage-i * [Warp Factories overview](/factories/) — Warp's product for running this same loop without the manual wiring. * [About factory agents](/factories/factory-agents/#triage) — The Triage agent role, doing the same job as the agent you just built. * [Factory skills](/factories/factory-skills/) — How Warp Factories scopes and shares a skill file like the one you just wrote. -* [Write product and tech specs with agents](/guides/agent-workflows/write-product-and-tech-specs-with-agents) — Add the spec role once your backlog is well-triaged. -* [Build a self-improving agent](/guides/agent-workflows/build-a-self-improving-agent) — Automate skill improvement based on your corrections. -* [GitHub Actions integration](/platform/integrations/github-actions) — Full documentation for `warpdotdev/oz-agent-action`. -* [Run agents unattended](/guides/agent-workflows/how-to-run-unattended-agents) — Broader patterns for cloud agents triggered by external events. +* [Write product and tech specs with agents](/guides/agent-workflows/write-product-and-tech-specs-with-agents/) — Add the spec role once your backlog is well-triaged. +* [Build a self-improving agent](/guides/agent-workflows/build-a-self-improving-agent/) — Automate skill improvement based on your corrections. +* [GitHub Actions integration](/platform/integrations/github-actions/) — Full documentation for `warpdotdev/oz-agent-action`. +* [Run agents unattended](/guides/agent-workflows/how-to-run-unattended-agents/) — Broader patterns for cloud agents triggered by external events. diff --git a/src/content/docs/guides/agent-workflows/run-a-software-factory-in-the-cloud.mdx b/src/content/docs/guides/agent-workflows/run-a-software-factory-in-the-cloud.mdx index f02caf7de..d976b1020 100644 --- a/src/content/docs/guides/agent-workflows/run-a-software-factory-in-the-cloud.mdx +++ b/src/content/docs/guides/agent-workflows/run-a-software-factory-in-the-cloud.mdx @@ -13,11 +13,11 @@ tags: --- import { VARS } from '@data/vars'; -The GitHub Actions approach in [Set up your software factory](/guides/agent-workflows/set-up-a-software-factory) gets the four-agent loop working. Use the {VARS.WARP_AUTOMATION_PLATFORM}-native production setup to add cloud environments, permissions, triggers, and observability. To run the same loop as a managed product instead, see [Warp Factories](/factories/). +The GitHub Actions approach in [Set up your software factory](/guides/agent-workflows/set-up-a-software-factory/) gets the four-agent loop working. Use the {VARS.WARP_AUTOMATION_PLATFORM}-native production setup to add cloud environments, permissions, triggers, and observability. To run the same loop as a managed product instead, see [Warp Factories](/factories/). ## Prerequisites -* A working software factory loop ([set one up](/guides/agent-workflows/set-up-a-software-factory)) +* A working software factory loop ([set one up](/guides/agent-workflows/set-up-a-software-factory/)) * A Warp account (get started with Warp) ## Why cloud agents, not cloud computers @@ -31,7 +31,7 @@ The practical difference: * **Team visibility** — Any teammate can open a run in the {VARS.WEB_APP} to inspect the session transcript, steer a stuck agent, or [hand the work off](/platform/handoff/) to keep going from another session. * **Scale without contention** — Multiple triage runs can execute in parallel without fighting over a shared dev box, local git checkouts, or CPU. -See [Deployment patterns](/factories/deployment-patterns) for Warp-hosted and managed self-hosted factory execution. For CLI-based execution, see [Unmanaged architecture](/platform/unmanaged-execution/). +See [Deployment patterns](/factories/deployment-patterns/) for Warp-hosted and managed self-hosted factory execution. For CLI-based execution, see [Unmanaged architecture](/platform/unmanaged-execution/). ## 1. Set up a cloud environment @@ -39,7 +39,7 @@ A cloud environment is a Docker-based sandbox with your repository, secrets, and For repositories that need specific toolchains or dependencies, [`warpdotdev/oz-dev-environments`](https://github.com/warpdotdev/oz-dev-environments) has prebuilt Docker images for common stacks. -See [Environments](/platform/environments) for the full reference. +See [Environments](/platform/environments/) for the full reference. ## 2. Add secrets and permissions @@ -58,16 +58,16 @@ Grant each agent role only the GitHub permissions it needs: * **Implementation agent** — Push branches and open PRs * **Reviewer agent** — Post review comments on PRs -Use fine-grained personal access tokens or separate GitHub App installations to enforce least privilege per role. See [factory secrets](https://docs.warp.dev/factories/secrets/) for management details and [GitHub Actions integration](/platform/integrations/github-actions) for token setup patterns. +Use fine-grained personal access tokens or separate GitHub App installations to enforce least privilege per role. See [factory secrets](https://docs.warp.dev/factories/secrets/) for management details and [GitHub Actions integration](/platform/integrations/github-actions/) for token setup patterns. ## 3. Configure triggers With GitHub Actions, your factory already has event-based triggers. The {VARS.WARP_AUTOMATION_PLATFORM} also provides first-party integrations that handle triggering without GitHub Actions boilerplate: -* **Slack** — Teammates can kick off a run by mentioning `@warp` in a Slack thread. Useful for one-off requests that don't need the full label workflow. See [Slack integration](/platform/integrations/slack). -* **Linear** — When an issue in Linear reaches a specific status, a cloud agent run starts automatically. Useful for teams that track work in Linear rather than GitHub Issues. See [Linear integration](/platform/integrations/linear). -* **Scheduled agents** — For the outer improvement loop (which runs on a cadence rather than an event), use a scheduled cloud agent. See [Scheduled agents](/platform/triggers/scheduled-agents). -* **{VARS.WARP_PLATFORM_API}** — For custom triggers — webhooks, internal dashboards, other events — use the [{VARS.WARP_PLATFORM_API}](/factories/api-and-sdk) to start runs programmatically. +* **Slack** — Teammates can kick off a run by mentioning `@warp` in a Slack thread. Useful for one-off requests that don't need the full label workflow. See [Slack integration](/platform/integrations/slack/). +* **Linear** — When an issue in Linear reaches a specific status, a cloud agent run starts automatically. Useful for teams that track work in Linear rather than GitHub Issues. See [Linear integration](/platform/integrations/linear/). +* **Scheduled agents** — For the outer improvement loop (which runs on a cadence rather than an event), use a scheduled cloud agent. See [Scheduled agents](/platform/triggers/scheduled-agents/). +* **{VARS.WARP_PLATFORM_API}** — For custom triggers — webhooks, internal dashboards, other events — use the [{VARS.WARP_PLATFORM_API}](/factories/api-and-sdk/) to start runs programmatically. ## 4. Monitor factory runs @@ -86,19 +86,19 @@ See [Viewing cloud agent runs](/platform/viewing-cloud-agent-runs/) for the full When a sprint starts and you want to process many issues in parallel, the {VARS.WARP_AUTOMATION_PLATFORM} can fan out to child agents — one per issue — from a single parent run. The parent coordinates; the children execute in parallel, each with their own environment, prompt, and permissions. -See [Multi-agent orchestration](/platform/orchestration) for fan-out, sharding, and result aggregation patterns. +See [Multi-agent orchestration](/platform/orchestration/) for fan-out, sharding, and result aggregation patterns. ## Productivity tips * **Start with one agent role in the cloud** — Get the triage agent running as a cloud run before moving all four roles. Confirm that the environment, secrets, and permissions work correctly before expanding. -* **Add session links to PR descriptions** — When the implementation agent opens a PR, include the {VARS.PLATFORM_RUN} link so reviewers get the full context. See [Attach agent context to GitHub PRs](/guides/agent-workflows/how-to-attach-agent-session-context-to-github-prs) for a template. +* **Add session links to PR descriptions** — When the implementation agent opens a PR, include the {VARS.PLATFORM_RUN} link so reviewers get the full context. See [Attach agent context to GitHub PRs](/guides/agent-workflows/how-to-attach-agent-session-context-to-github-prs/) for a template. * **Monitor usage** - Check run usage in the {VARS.WEB_APP} and adjust run scope if needed. See [usage and billing](/support-and-community/plans-and-billing/credits/) for charge components and reporting limitations. ## Next steps * [Warp Factories overview](/factories/) - Warp's product for running this same loop end to end * [Infrastructure and security](/factories/infrastructure-and-security/) - The environment, runner, and credential model behind the concerns you configured by hand here -* [Build a self-improving agent](/guides/agent-workflows/build-a-self-improving-agent) - Add the outer improvement loop on a schedule -* [Environments](/platform/environments) - Full reference for cloud agent environments -* [Deployment patterns](/factories/deployment-patterns) - Choose the right architecture for your team -* [Self-hosting](/factories/self-hosting) - Run cloud agent workers on your own infrastructure when code must stay on-premises +* [Build a self-improving agent](/guides/agent-workflows/build-a-self-improving-agent/) - Add the outer improvement loop on a schedule +* [Environments](/platform/environments/) - Full reference for cloud agent environments +* [Deployment patterns](/factories/deployment-patterns/) - Choose the right architecture for your team +* [Self-hosting](/factories/self-hosting/) - Run cloud agent workers on your own infrastructure when code must stay on-premises diff --git a/src/content/docs/guides/agent-workflows/set-up-a-software-factory.mdx b/src/content/docs/guides/agent-workflows/set-up-a-software-factory.mdx index 385108b10..ae12d80bf 100644 --- a/src/content/docs/guides/agent-workflows/set-up-a-software-factory.mdx +++ b/src/content/docs/guides/agent-workflows/set-up-a-software-factory.mdx @@ -11,13 +11,13 @@ tags: --- import { VARS } from '@data/vars'; -This guide adds the implementation and reviewer agents to the [triage](/guides/agent-workflows/build-a-triage-agent) and [spec](/guides/agent-workflows/write-product-and-tech-specs-with-agents) agents you set up previously, then connects all four into a software factory using GitHub labels as the state machine. Issues flow automatically from triage to a reviewable pull request. To run this same loop as a managed product instead of wiring it yourself, see [Warp Factories](/factories/). +This guide adds the implementation and reviewer agents to the [triage](/guides/agent-workflows/build-a-triage-agent/) and [spec](/guides/agent-workflows/write-product-and-tech-specs-with-agents/) agents you set up previously, then connects all four into a software factory using GitHub labels as the state machine. Issues flow automatically from triage to a reviewable pull request. To run this same loop as a managed product instead of wiring it yourself, see [Warp Factories](/factories/). ## Prerequisites -* A working [triage agent](/guides/agent-workflows/build-a-triage-agent) and [spec agent](/guides/agent-workflows/write-product-and-tech-specs-with-agents), each deployed individually -* A cloud environment with access to your repository ([create one](/platform/environments)) -* `warpdotdev/oz-agent-action` installed (see [GitHub Actions integration](/platform/integrations/github-actions)) +* A working [triage agent](/guides/agent-workflows/build-a-triage-agent/) and [spec agent](/guides/agent-workflows/write-product-and-tech-specs-with-agents/), each deployed individually +* A cloud environment with access to your repository ([create one](/platform/environments/)) +* `warpdotdev/oz-agent-action` installed (see [GitHub Actions integration](/platform/integrations/github-actions/)) ## How the loop works @@ -67,7 +67,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` -The `spec-driven-implementation` skill from [`warpdotdev/common-skills`](https://github.com/warpdotdev/common-skills) automates what you did manually in the [previous guide](/guides/agent-workflows/write-product-and-tech-specs-with-agents) — running both spec commands in sequence and opening a draft PR so you can review and approve the specs before implementation begins. +The `spec-driven-implementation` skill from [`warpdotdev/common-skills`](https://github.com/warpdotdev/common-skills) automates what you did manually in the [previous guide](/guides/agent-workflows/write-product-and-tech-specs-with-agents/) — running both spec commands in sequence and opening a draft PR so you can review and approve the specs before implementation begins. ## 2. Human review: approve the specs @@ -147,7 +147,7 @@ The `review-pr` skill from [`warpdotdev/common-skills`](https://github.com/warpd After the reviewer agent posts its comments, a human reviews the PR, including the diff, the agent's inline comments, and the spec files. Address any gaps, run the project's tests, and merge. -The reviewer agent surfaces issues and inconsistencies; the human makes the final call on quality and correctness. See [Review AI-generated code](/guides/agent-workflows/how-to-review-ai-generated-code) for the full human review workflow. +The reviewer agent surfaces issues and inconsistencies; the human makes the final call on quality and correctness. See [Review AI-generated code](/guides/agent-workflows/how-to-review-ai-generated-code/) for the full human review workflow. ## Reference implementation @@ -165,8 +165,8 @@ The reviewer agent surfaces issues and inconsistencies; the human makes the fina * [Warp Factories overview](/factories/) — Warp's product for running this same intake-to-review loop without the workflow wiring. * [Automations](/factories/automations/) — Replaces the label-based state machine you just wired by hand. * [About factory agents](/factories/factory-agents/) — The same four roles — Triage, Spec, Implement, Review — as managed agents. -* [Run a software factory in the cloud](/guides/agent-workflows/run-a-software-factory-in-the-cloud) — Move the loop into a managed {VARS.WARP_AUTOMATION_PLATFORM} deployment. -* [Build a self-improving agent](/guides/agent-workflows/build-a-self-improving-agent) — Add the outer improvement loop. -* [Review AI-generated code](/guides/agent-workflows/how-to-review-ai-generated-code) — The human review workflow for agent-generated PRs. +* [Run a software factory in the cloud](/guides/agent-workflows/run-a-software-factory-in-the-cloud/) — Move the loop into a managed {VARS.WARP_AUTOMATION_PLATFORM} deployment. +* [Build a self-improving agent](/guides/agent-workflows/build-a-self-improving-agent/) — Add the outer improvement loop. +* [Review AI-generated code](/guides/agent-workflows/how-to-review-ai-generated-code/) — The human review workflow for agent-generated PRs. * [`warpdotdev/oz-for-oss`](https://github.com/warpdotdev/oz-for-oss) — The complete reference implementation. -* [GitHub Actions integration](/platform/integrations/github-actions) — Full documentation for triggering cloud agents from CI. +* [GitHub Actions integration](/platform/integrations/github-actions/) — Full documentation for triggering cloud agents from CI. diff --git a/src/content/docs/guides/agent-workflows/write-product-and-tech-specs-with-agents.mdx b/src/content/docs/guides/agent-workflows/write-product-and-tech-specs-with-agents.mdx index 0bbe976f8..f86bef82e 100644 --- a/src/content/docs/guides/agent-workflows/write-product-and-tech-specs-with-agents.mdx +++ b/src/content/docs/guides/agent-workflows/write-product-and-tech-specs-with-agents.mdx @@ -10,7 +10,7 @@ tags: --- import { VARS } from '@data/vars'; -Once your [triage agent](/guides/agent-workflows/build-a-triage-agent) is labeling issues as `ready-to-spec`, use agents to turn those issues into two spec files: a product spec that describes what the feature should do from the user's perspective, and a tech spec that describes how to implement it. +Once your [triage agent](/guides/agent-workflows/build-a-triage-agent/) is labeling issues as `ready-to-spec`, use agents to turn those issues into two spec files: a product spec that describes what the feature should do from the user's perspective, and a tech spec that describes how to implement it. Implementation agents use these specs as blueprints; reviewers use them as acceptance criteria. The agent does the drafting while you do the reviewing. @@ -19,7 +19,7 @@ Specs give implementation agents the context they need to make good decisions, a ## Prerequisites * A Warp account (get started with Warp) -* A triaged issue labeled `ready-to-spec` or equivalent ([set up triaging](/guides/agent-workflows/build-a-triage-agent)) +* A triaged issue labeled `ready-to-spec` or equivalent ([set up triaging](/guides/agent-workflows/build-a-triage-agent/)) * `common-skills` installed globally from [`warpdotdev/common-skills`](https://github.com/warpdotdev/common-skills): ```bash @@ -68,13 +68,13 @@ A tech spec defines how the feature will be implemented, including architecture * **Spec before you code, not after** — The biggest value from specs is catching misaligned assumptions before any code is written. Running `/write-product-spec` first forces that alignment to happen early, when fixing it is cheap. * **Attach Figma mocks** — If your feature has a UI component, attach a Figma screenshot or mockup to your prompt when running `/write-product-spec`. The agent incorporates visual context into the acceptance criteria. -* **Use `/plan` for smaller tasks** — For changes that don't warrant full specs, use Warp's built-in [planning feature](/agents/capabilities/planning). Plans can be saved, versioned, and attached to PRs without a full spec workflow. +* **Use `/plan` for smaller tasks** — For changes that don't warrant full specs, use Warp's built-in [planning feature](/agents/capabilities/planning/). Plans can be saved, versioned, and attached to PRs without a full spec workflow. ## Next steps * [Warp Factories overview](/factories/) — Warp's product for running this same loop without the manual wiring. * [About factory agents](/factories/factory-agents/#spec) — The Spec agent role, gating implementation the same way. -* [Set up your software factory](/guides/agent-workflows/set-up-a-software-factory) — Connect the spec role to implementation and review. +* [Set up your software factory](/guides/agent-workflows/set-up-a-software-factory/) — Connect the spec role to implementation and review. * [`warpdotdev/common-skills`](https://github.com/warpdotdev/common-skills) — The full set of shared skills including `write-product-spec`, `write-tech-spec`, and `validate-changes-match-specs`. -* [Planning](/agents/capabilities/planning) — Warp's built-in planning feature for smaller tasks. -* [Skills](/agents/capabilities/skills) — How skill files work in Warp and the {VARS.WARP_AUTOMATION_PLATFORM}. +* [Planning](/agents/capabilities/planning/) — Warp's built-in planning feature for smaller tasks. +* [Skills](/agents/capabilities/skills/) — How skill files work in Warp and the {VARS.WARP_AUTOMATION_PLATFORM}. diff --git a/src/content/docs/platform/agents.mdx b/src/content/docs/platform/agents.mdx index e145231c7..d032c8388 100644 --- a/src/content/docs/platform/agents.mdx +++ b/src/content/docs/platform/agents.mdx @@ -33,7 +33,7 @@ In the CLI and REST API, a cloud agent is represented as a **service account**. ## Managing cloud agents -Use the [{VARS.WEB_APP}'s Agents page](/platform/oz-web-app/#agents) for day-to-day management. Use the public API when you need to create or update agents from scripts, CI/CD, or internal tooling. Full request and response formats, including error codes, live on the [API Reference](/api) page under the **agent** tag. +Use the [{VARS.WEB_APP}'s Agents page](/platform/oz-web-app/#agents) for day-to-day management. Use the public API when you need to create or update agents from scripts, CI/CD, or internal tooling. Full request and response formats, including error codes, live on the [API Reference](/api/) page under the **agent** tag. | Action | Endpoint | What it does | | --- | --- | --- | diff --git a/src/content/docs/platform/transitioning-from-oz.mdx b/src/content/docs/platform/transitioning-from-oz.mdx index d4013e64f..98ca864dc 100644 --- a/src/content/docs/platform/transitioning-from-oz.mdx +++ b/src/content/docs/platform/transitioning-from-oz.mdx @@ -18,7 +18,7 @@ Warp Factories is the web experience for team development workflows organized ar | **{VARS.WARP_AGENT_CLI} (`oz`)** | Use the [{VARS.WARP_AGENT_CLI} reference](/agents/cli/oz-cli/) for current `oz` commands. The `oz` and `warp` binaries have separate command interfaces. | | **{VARS.WARP_CLI} (`warp`)** | Use the [{VARS.WARP_CLI} reference](/agents/cli/) for its supported commands. | | **SDKs** | Use the current [Python and TypeScript packages](/factories/api-and-sdk/#sdks). Repository names and package names can differ. | -| **{VARS.WARP_PLATFORM_API}** | Consult the [API reference](/api) for endpoint behavior and configuration. Use [factory endpoints](/factories/factory-api/) to send work to a factory. | +| **{VARS.WARP_PLATFORM_API}** | Consult the [API reference](/api/) for endpoint behavior and configuration. Use [factory endpoints](/factories/factory-api/) to send work to a factory. | | **New software factories** | Open the {VARS.FACTORY_WEB_APP} and follow the [Warp Factories quickstart](/factories/quickstart/). | ## Preparing an existing workflow for Warp Factories From 975839dfca6c36001499b7c92c04ef1ec91df511 Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 16:19:16 +0000 Subject: [PATCH 4/6] Accept implicit /platform canonicalization when trailingSlash is true With "trailingSlash": true in vercel.json, Vercel answers /platform with a 308 to /platform/ itself, so the explicit rule this check expected is redundant (and a self-redirect would loop). The check still rejects any /platform rule that points elsewhere, a redirect chain at /platform/, and a missing /platform/ page. Co-Authored-By: Warp --- scripts/validate-platform-reference-migration.mjs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/validate-platform-reference-migration.mjs b/scripts/validate-platform-reference-migration.mjs index 62e86e9db..e9be4044e 100644 --- a/scripts/validate-platform-reference-migration.mjs +++ b/scripts/validate-platform-reference-migration.mjs @@ -8,7 +8,7 @@ import { DOCS_ORIGIN } from '../src/lib/site.js'; const repo = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const output = resolve(repo, process.argv[2] ?? '.vercel/output/static'); const fixture = JSON.parse(readFileSync(join(repo, 'scripts/fixtures/platform-reference-migration.json'), 'utf8')); -const { redirects } = JSON.parse(readFileSync(join(repo, 'vercel.json'), 'utf8')); +const { redirects, trailingSlash } = JSON.parse(readFileSync(join(repo, 'vercel.json'), 'utf8')); const moved = fixture.pages.filter(({ oldPath, newPath }) => oldPath !== newPath); const bridges = fixture.pages.filter(({ oldPath, newPath }) => oldPath === newPath); const failures = []; @@ -159,7 +159,18 @@ check('incoming aliases', () => { ])); assert.ok(!redirects.some(({ destination }) => oldTargets.has(destination)), 'incoming alias still chains through a moved page'); }); -check('bare Platform entry', () => expectRedirect('/platform', '/platform/')); +check('bare Platform entry', () => { + // With `trailingSlash: true`, Vercel itself answers /platform with a 308 to /platform/, + // so an explicit rule is redundant (and a self-redirect would loop). Accept either form. + if (trailingSlash === true) { + const matches = redirects.filter((rule) => staticMatches(rule, '/platform')); + assert.ok(matches.every(({ destination }) => destination === '/platform/'), 'bare /platform must canonicalize to /platform/'); + assert.equal(redirects.filter((rule) => staticMatches(rule, '/platform/')).length, 0, 'redirect chain at /platform/'); + assert.ok(content('/platform/').body, 'missing /platform/ page'); + return; + } + expectRedirect('/platform', '/platform/'); +}); check('restored cloud-overview teaching', () => { const cloudOverview = content('/platform/').body; for (const explanation of ['A trigger supplies the request and its context', 'A harness runs the coding agent', 'An environment groups repositories']) { From 4d2c4464c61f584c302a98dbe8ff61e6b6e03704 Mon Sep 17 00:00:00 2001 From: "warp-agent-staging[bot]" <240773466+warp-agent-staging[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 16:26:16 +0000 Subject: [PATCH 5/6] Re-run CI: CodeQL failed uploading results (GitHub Server Error) From 8b74cc463953fbeddcda379b281b9a7f47f1630d Mon Sep 17 00:00:00 2001 From: Rachael Rose Renk <91027132+rachaelrenk@users.noreply.github.com> Date: Fri, 27 Nov 2026 13:40:34 -0700 Subject: [PATCH 6/6] Fix legacy redirect chains and canonical Markdown negotiation Scope negotiation to built canonical pages, flatten known error aliases, and verify middleware/redirect journeys with repeatable live checks. Co-Authored-By: Warp --- scripts/build-tracking-middleware.mjs | 36 +++++- scripts/markdown-negotiation.test.mjs | 17 ++- scripts/redirect-slashes.test.mjs | 40 ++++++- scripts/routing-journeys.mjs | 19 +++ .../validate-markdown-negotiation-routes.mjs | 67 ++++++++++- scripts/verify-live-routing.mjs | 108 ++++++++++++++++++ src/lib/docs-markdown-retrieve.test.mjs | 2 + src/lib/docs-markdown.js | 2 +- src/lib/markdown-negotiation.js | 11 +- vercel.json | 85 ++++++++++++++ 10 files changed, 375 insertions(+), 12 deletions(-) create mode 100644 scripts/routing-journeys.mjs create mode 100644 scripts/verify-live-routing.mjs diff --git a/scripts/build-tracking-middleware.mjs b/scripts/build-tracking-middleware.mjs index d56fbc8ea..32cce98b6 100644 --- a/scripts/build-tracking-middleware.mjs +++ b/scripts/build-tracking-middleware.mjs @@ -1,5 +1,8 @@ -import { copyFile, mkdir, readFile, writeFile } from 'node:fs/promises'; +import { access, copyFile, mkdir, readdir, readFile, writeFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; import { STRIPPED_PARAMS } from '../src/lib/tracking-redirect.js'; +import { isEligibleDocHtmlPath } from '../src/lib/docs-markdown.js'; // Astro's Vercel adapter serves prerendered pages before its own middleware. // Emit native routing middleware before the filesystem phase instead: @@ -32,7 +35,36 @@ await installEdgeMiddleware( await installEdgeMiddleware( 'markdown-negotiation', new URL('../src/lib/markdown-negotiation.js', import.meta.url), - [new URL('../src/lib/docs-markdown.js', import.meta.url)], + [ + new URL('../src/lib/docs-markdown.js', import.meta.url), + new URL('../src/lib/markdown-negotiation.js', import.meta.url), + ], +); + +// Use deployed files, not URL guesses: aliases, unknown paths, and HTML-only +// pages must reach normal redirects or the filesystem instead of a missing .md. +const staticDir = new URL('static/', output); +const canonicalPages = []; +for (const entry of await readdir(staticDir, { recursive: true, withFileTypes: true })) { + if (!entry.isFile() || !entry.name.endsWith('.md')) continue; + const file = pathToFileURL(join(entry.parentPath, entry.name)); + const relative = file.pathname.slice(staticDir.pathname.length); + const page = relative === 'index.md' ? '/' : `/${relative.slice(0, -3)}/`; + if (!isEligibleDocHtmlPath(page)) continue; + try { + await access(new URL(`${page.slice(1)}index.html`, staticDir)); + } catch (error) { + if (error.code === 'ENOENT') continue; + throw error; + } + canonicalPages.push(page); +} +if (!canonicalPages.includes('/')) throw new Error('No homepage Markdown twin found'); +await writeFile( + new URL('functions/markdown-negotiation.func/index.js', output), + `import negotiate from './markdown-negotiation.js';\n` + + `const pages = new Set(${JSON.stringify(canonicalPages.sort())});\n` + + `export default (request) => negotiate(request, pages);\n`, ); // Entries in `has` are AND-ed, so each stripped parameter gets its own route. diff --git a/scripts/markdown-negotiation.test.mjs b/scripts/markdown-negotiation.test.mjs index 19a3157c4..98b5ac193 100644 --- a/scripts/markdown-negotiation.test.mjs +++ b/scripts/markdown-negotiation.test.mjs @@ -1,6 +1,9 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; -import markdownNegotiation from '../src/lib/markdown-negotiation.js'; +import negotiate from '../src/lib/markdown-negotiation.js'; + +const pages = new Set(['/', '/quickstart/', '/support-and-community/', '/agents/capabilities/skills/']); +const markdownNegotiation = (req) => negotiate(req, pages); function request(path, headers = {}) { return new Request(`https://docs.warp.dev${path}`, { headers }); @@ -9,10 +12,9 @@ function request(path, headers = {}) { test('rewrites eligible paths when Accept prefers markdown', () => { const cases = [ ['/', '/index.md'], - ['/quickstart', '/quickstart.md'], ['/quickstart/', '/quickstart.md'], ['/support-and-community/', '/support-and-community.md'], - ['/agents/capabilities/skills', '/agents/capabilities/skills.md'], + ['/agents/capabilities/skills/', '/agents/capabilities/skills.md'], ]; for (const [path, expected] of cases) { @@ -50,7 +52,7 @@ test('production does not rewrite on text/plain or agent UA alone', () => { test('preserves query strings on rewrite', () => { const response = markdownNegotiation( - request('/quickstart?utm_source=agent', { accept: 'text/markdown' }), + request('/quickstart/?utm_source=agent', { accept: 'text/markdown' }), ); assert.equal( response.headers.get('x-middleware-rewrite'), @@ -65,6 +67,13 @@ test('continues for HTML clients, assets, APIs, retrieve, and direct .md URLs', request('/_astro/page.js', { accept: 'text/markdown' }), request('/retrieve?q=hello', { accept: 'text/markdown' }), request('/api/support-handoff', { accept: 'text/markdown' }), + request('/api/', { accept: 'text/markdown' }), + request('/api', { accept: 'text/markdown' }), + request('/agent-platform/', { accept: 'text/markdown' }), + request('/agent-platform', { accept: 'text/markdown' }), + request('/does-not-exist/', { accept: 'text/markdown' }), + request('/quickstart', { accept: 'text/markdown' }), + request('/agents/capabilities/skills', { accept: 'text/markdown' }), request('/llms.txt', { accept: 'text/markdown' }), ]; diff --git a/scripts/redirect-slashes.test.mjs b/scripts/redirect-slashes.test.mjs index 1120b5c50..86e72b30d 100644 --- a/scripts/redirect-slashes.test.mjs +++ b/scripts/redirect-slashes.test.mjs @@ -1,4 +1,4 @@ -// Every docs page has one URL: the trailing-slash form. vercel.json sets +// Ordinary HTML page URLs canonicalize to the trailing-slash form. vercel.json sets // `trailingSlash: true`, so Vercel 308s `/page` to `/page/` before any // redirect runs. These tests compile vercel.json with @vercel/routing-utils // (the library Vercel uses to build the routing table) and replay requests @@ -54,7 +54,10 @@ function substitute(template, match) { function follow(path) { let current = path; let hops = 0; + const seen = new Set(); while (hops < 6) { + assert.ok(!seen.has(current), `redirect loop from ${path} at ${current}`); + seen.add(current); const next = step(current.split(/[?#]/)[0]); if (next === null) break; hops += 1; @@ -137,7 +140,7 @@ test('files, well-known paths, and Markdown twins are never slash-redirected', ( } }); -test('every redirect source matches both slash forms and ends on a served page in at most 2 hops', () => { +test('redirect sources match both slash forms; literal destinations are served within 2 hops', () => { const failures = []; for (const { source, destination } of redirects) { if (isFragmentSource(source)) continue; @@ -157,6 +160,39 @@ test('every redirect source matches both slash forms and ends on a served page i expectNone(failures, 'redirect problems'); }); +test('known underscore error aliases reach the final page within 2 hops', () => { + const aliases = redirects.filter(({ source }) => + source.startsWith('/factories/api-and-sdk/troubleshooting/errors/') && source.includes('_'), + ); + assert.ok(aliases.length > 10, 'missing underscore error fixtures'); + for (const { source, destination } of aliases) { + const code = source.replace('(/?)', '').split('/').at(-1); + for (const form of slashForms(`/errors/${code}`)) { + const result = follow(form); + assert.equal(result.final, destination, form); + assert.ok(result.hops <= 2, `${form} takes ${result.hops} hops`); + assert.ok(isServed(result.final), result.final); + } + } +}); + +test('concrete wildcard migrations reach real pages within 2 hops', () => { + for (const [source, destination] of [ + ['/cli/oz-cli/api-keys', '/agents/cli/oz-cli/api-keys/'], + ['/errors/authentication-required', '/factories/api-and-sdk/troubleshooting/errors/authentication-required/'], + ['/guides/integrations/how-to-set-up-claude-code', '/guides/'], + ['/reference/api-and-sdk/quickstart', '/factories/api-and-sdk/quickstart/'], + ['/reference/cli/api-keys', '/agents/cli/oz-cli/api-keys/'], + ]) { + for (const form of slashForms(source)) { + const result = follow(form); + assert.equal(result.final, destination, form); + assert.ok(result.hops <= 2, `${form} takes ${result.hops} hops`); + assert.ok(isServed(result.final), result.final); + } + } +}); + test('fragment-only sources have a fragment-free redirect or page for their path', () => { // Browsers never send #fragments, so these sources cannot match on their own. const failures = []; diff --git a/scripts/routing-journeys.mjs b/scripts/routing-journeys.mjs new file mode 100644 index 000000000..614744b63 --- /dev/null +++ b/scripts/routing-journeys.mjs @@ -0,0 +1,19 @@ +// Cases shared by the build-output model and the deployed HTTP verifier. +export const routingJourneys = [ + { path: '/factories', final: '/factories/', hops: 1 }, + { path: '/factories/', final: '/factories/', hops: 0 }, + { path: '/factories?utm_source=routing-check', final: '/factories/?utm_source=routing-check', hops: 1 }, + { path: '/factories/?trk=routing-check', final: '/factories/', hops: 1 }, + { path: '/agent-platform', final: '/agents/', hops: 2 }, + { path: '/agent-platform/', final: '/agents/', hops: 1 }, + { path: '/errors/authentication_required', final: '/factories/api-and-sdk/troubleshooting/errors/authentication-required/', hops: 2 }, + { path: '/errors/authentication_required/', final: '/factories/api-and-sdk/troubleshooting/errors/authentication-required/', hops: 1 }, + { path: '/cli/oz-cli/api-keys', final: '/agents/cli/oz-cli/api-keys/', hops: 2 }, + { path: '/api', final: '/api/', hops: 1 }, + { path: '/api/', final: '/api/', hops: 0 }, + { path: '/factories.md', final: '/factories.md', hops: 0, type: 'text/markdown' }, + { path: '/llms.txt', final: '/llms.txt', hops: 0, type: 'text/plain' }, + { path: '/.well-known/ard.json', final: '/.well-known/ard.json', hops: 0, type: 'application/json' }, + { path: '/factories/index.html', final: '/factories/index.html', hops: 0 }, + { path: '/not-a-real-page-routing-check', final: '/not-a-real-page-routing-check/', hops: 1, status: 404 }, +]; diff --git a/scripts/validate-markdown-negotiation-routes.mjs b/scripts/validate-markdown-negotiation-routes.mjs index ba2763d9a..88fdb86a3 100644 --- a/scripts/validate-markdown-negotiation-routes.mjs +++ b/scripts/validate-markdown-negotiation-routes.mjs @@ -1,6 +1,8 @@ import assert from 'node:assert/strict'; import { access, readFile } from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; +import routingUtils from '@vercel/routing-utils'; +import { routingJourneys } from './routing-journeys.mjs'; // Run after `npm run build`: markdown negotiation must be a routing middleware // entry before the filesystem handler, or Vercel serves static HTML instead. @@ -39,6 +41,69 @@ assert.ok( 'markdown-negotiation should run after tracking-redirect routes', ); +// Exercise the generated entrypoint, including its actual built-page allowlist. +// This models the middleware and redirect stages, not Vercel's full CDN. +const { default: negotiate } = await import(new URL('functions/markdown-negotiation.func/index.js', output)); +const { default: track } = await import(new URL('functions/tracking-redirect.func/index.js', output)); +const vercel = JSON.parse(await readFile(new URL('../vercel.json', import.meta.url), 'utf8')); +const { routes, error } = routingUtils.getTransformedRoutes({ + trailingSlash: vercel.trailingSlash, + redirects: vercel.redirects, +}); +assert.equal(error, null); +const redirectRoutes = routes.filter((route) => route.status && route.headers?.Location) + .map((route) => ({ ...route, re: new RegExp(route.src) })); + +async function journey(path, accept) { + let url = new URL(path, 'https://docs.warp.dev'); + const seen = new Set(); + let hops = 0; + while (hops < 6) { + assert.ok(!seen.has(url.href), `loop at ${url.href}`); + seen.add(url.href); + const request = new Request(url, { headers: { accept } }); + const tracking = track(request); + let location = tracking.headers.get('location'); + if (!location) { + const response = negotiate(request); + const rewritten = response.headers.get('x-middleware-rewrite'); + if (rewritten) { + const target = new URL(rewritten); + assert.ok(!target.pathname.endsWith('/.md'), target.pathname); + await access(new URL(`static${target.pathname}`, output)); + return { final: url.pathname + url.search, hops, markdown: true }; + } + const route = redirectRoutes.find(({ re }) => re.test(url.pathname)); + if (route) { + const match = route.re.exec(url.pathname); + location = route.headers.Location.replace(/\$(\d+)/g, (_, n) => match[Number(n)] ?? ''); + const destination = new URL(location, url); + if (!destination.search) destination.search = url.search; + location = destination.href; + } + } + if (!location) return { final: url.pathname + url.search, hops, markdown: false }; + url = new URL(location, url); + hops += 1; + } + throw new Error(`Too many redirects from ${path}`); +} + +for (const fixture of routingJourneys) { + for (const accept of ['text/html', 'text/markdown']) { + const actual = await journey(fixture.path, accept); + assert.equal(actual.final, fixture.final, `${fixture.path} (${accept}) destination`); + assert.equal(actual.hops, fixture.hops, `${fixture.path} (${accept}) hops`); + const isDoc = !fixture.type && !fixture.status && !fixture.final.startsWith('/api') + && !fixture.final.endsWith('.html'); + assert.equal(actual.markdown, accept === 'text/markdown' && isDoc, `${fixture.path} (${accept}) negotiation`); + if (fixture.status !== 404) { + const pathname = new URL(fixture.final, 'https://docs.warp.dev').pathname; + await access(new URL(`static${pathname}${pathname.endsWith('/') ? 'index.html' : ''}`, output)); + } + } +} + console.log( - `markdown-negotiation route OK at index ${index} (filesystem at ${filesystem}, function at ${funcDir})`, + `markdown-negotiation route OK at index ${index} (filesystem at ${filesystem}, function at ${funcDir}); ${routingJourneys.length * 2} modeled HTML/Markdown journeys passed`, ); diff --git a/scripts/verify-live-routing.mjs b/scripts/verify-live-routing.mjs new file mode 100644 index 000000000..896b2ff26 --- /dev/null +++ b/scripts/verify-live-routing.mjs @@ -0,0 +1,108 @@ +// Usage: node scripts/verify-live-routing.mjs https://PREVIEW_HOST [--sitemap] +// GET-only, sequential, 150 ms between requests; 429 stops verification as incomplete. +import assert from 'node:assert/strict'; +import { setTimeout as delay } from 'node:timers/promises'; +import { routingJourneys } from './routing-journeys.mjs'; + +const base = new URL(process.argv[2]); +assert.ok(['https:', 'http:'].includes(base.protocol), 'Expected an HTTP(S) base URL'); +const started = new Date().toISOString(); +let passed = 0; +let failed = 0; + +async function get(url, accept = 'text/html') { + await delay(150); + const response = await fetch(url, { + redirect: 'manual', + headers: { accept }, + signal: AbortSignal.timeout(30_000), + }); + if (response.status === 429) { + await response.body?.cancel(); + throw new Error(`INCOMPLETE: rate limited at ${url}`); + } + return response; +} + +async function follow(path, accept) { + let url = new URL(path, base); + const chain = []; + const seen = new Set(); + for (let i = 0; i < 7; i += 1) { + assert.equal(url.origin, base.origin, `Unexpected cross-origin redirect: ${url}`); + assert.ok(!seen.has(url.href), `Redirect loop: ${url}`); + seen.add(url.href); + const response = await get(url, accept); + const location = response.headers.get('location'); + chain.push({ path: url.pathname + url.search, status: response.status, location }); + const type = response.headers.get('content-type')?.split(';')[0]; + await response.body?.cancel(); + if (response.status >= 300 && response.status < 400) { + assert.ok(location, 'Redirect missing Location'); + url = new URL(location, url); + continue; + } + return { chain, final: url.pathname + url.search, status: response.status, type, hops: chain.length - 1 }; + } + throw new Error(`Too many redirects: ${path}`); +} + +async function check(fixture, accept) { + const actual = await follow(fixture.path, accept); + try { + assert.equal(actual.final, fixture.final, 'final destination'); + assert.equal(actual.hops, fixture.hops, 'redirect count'); + assert.equal(actual.status, fixture.status ?? 200, 'final status'); + const htmlOnly = fixture.status || fixture.final.startsWith('/api') || fixture.final.endsWith('.html'); + assert.equal(actual.type, fixture.type ?? (htmlOnly ? 'text/html' : accept), 'content type'); + for (const hop of actual.chain.slice(0, -1)) { + assert.equal(hop.status, hop.location && fixture.path.includes('trk=') ? 301 : 308); + } + passed += 1; + console.log(JSON.stringify({ result: 'PASS', request: fixture.path, accept, ...actual })); + } catch (error) { + failed += 1; + console.log(JSON.stringify({ result: 'FAIL', request: fixture.path, accept, ...actual, error: error.message })); + } +} + +try { + for (const fixture of routingJourneys) { + for (const accept of ['text/html', 'text/markdown']) await check(fixture, accept); + } + // Missing q is a deterministic JSON validation response, without querying + // the retrieval backend or depending on its credentials. + const retrieval = await follow('/retrieve', 'application/json'); + assert.equal(retrieval.final, '/retrieve/'); + assert.equal(retrieval.hops, 1); + assert.equal(retrieval.chain[0].status, 308); + assert.equal(retrieval.status, 400); + assert.equal(retrieval.type, 'application/json'); + passed += 1; + console.log(JSON.stringify({ result: 'PASS', request: '/retrieve', ...retrieval })); + + if (process.argv.includes('--sitemap')) { + async function locations(path) { + const response = await get(new URL(path, base), 'application/xml'); + assert.equal(response.status, 200, `Sitemap: ${path}`); + return [...(await response.text()).matchAll(/([^<]+)<\/loc>/g)] + .map((match) => new URL(match[1].replaceAll('&', '&')).pathname); + } + const sitemapPaths = await locations('/sitemap-index.xml'); + assert.ok(sitemapPaths.length > 0, 'No sitemap files found'); + const pages = []; + for (const path of sitemapPaths) pages.push(...await locations(path)); + assert.ok(pages.length > 100, 'Sitemap unexpectedly small'); + for (const page of pages) { + assert.ok(page.endsWith('/'), `Noncanonical sitemap URL: ${page}`); + await check({ path: page, final: page, hops: 0 }, 'text/html'); + if (page !== '/') await check({ path: page.slice(0, -1), final: page, hops: 1 }, 'text/html'); + } + console.log(JSON.stringify({ sitemapPages: pages.length })); + } + console.log(JSON.stringify({ base: base.href, started, finished: new Date().toISOString(), passed, failed })); + process.exitCode = failed ? 1 : 0; +} catch (error) { + console.error(JSON.stringify({ base: base.href, started, passed, failed, incomplete: true, error: error.message })); + process.exitCode = 1; +} diff --git a/src/lib/docs-markdown-retrieve.test.mjs b/src/lib/docs-markdown-retrieve.test.mjs index ec035305c..c2058e9f0 100644 --- a/src/lib/docs-markdown-retrieve.test.mjs +++ b/src/lib/docs-markdown-retrieve.test.mjs @@ -11,6 +11,8 @@ import { test('/retrieve and /api paths are not markdown-negotiated doc HTML', () => { assert.equal(isEligibleDocHtmlPath('/retrieve'), false); assert.equal(isEligibleDocHtmlPath('/retrieve/'), false); + assert.equal(isEligibleDocHtmlPath('/api'), false); + assert.equal(isEligibleDocHtmlPath('/api/'), false); assert.equal(isEligibleDocHtmlPath('/api/support-handoff'), false); assert.equal(isEligibleDocHtmlPath('/agents/capabilities/skills'), true); assert.equal(isEligibleDocHtmlPath('/'), true); diff --git a/src/lib/docs-markdown.js b/src/lib/docs-markdown.js index bb81824ff..70b0622a3 100644 --- a/src/lib/docs-markdown.js +++ b/src/lib/docs-markdown.js @@ -26,7 +26,7 @@ export function isEligibleDocHtmlPath(pathname) { if (normalizedPath === '/') return true; if (normalizedPath.startsWith('/_astro/')) return false; // API and agent endpoints are not doc HTML pages; never rewrite them to .md. - if (normalizedPath === '/retrieve' || normalizedPath.startsWith('/api/')) return false; + if (normalizedPath === '/retrieve' || normalizedPath === '/api' || normalizedPath.startsWith('/api/')) return false; const lastSegment = normalizedPath.split('/').at(-1) ?? ''; return lastSegment.length > 0 && !lastSegment.includes('.'); } diff --git a/src/lib/markdown-negotiation.js b/src/lib/markdown-negotiation.js index 93ac8a876..b317085a2 100644 --- a/src/lib/markdown-negotiation.js +++ b/src/lib/markdown-negotiation.js @@ -16,10 +16,17 @@ import { shouldServeMarkdownProduction, } from './docs-markdown.js'; -export default function markdownNegotiation(request) { +/** + * @param {Request} request + * @param {Set} canonicalPages Pages with built HTML and Markdown twins. + */ +export default function markdownNegotiation(request, canonicalPages) { const url = new URL(request.url); - if (!isEligibleDocHtmlPath(url.pathname) || !shouldServeMarkdownProduction(request)) { + // Only canonical, existing pages can negotiate. Let Vercel normalize + // slashless URLs and migrate legacy aliases before attempting a rewrite. + if (!isEligibleDocHtmlPath(url.pathname) || !canonicalPages.has(url.pathname) + || !shouldServeMarkdownProduction(request)) { return new Response(null, { headers: { 'x-middleware-next': '1' } }); } diff --git a/vercel.json b/vercel.json index 3f08bcd83..4d4b20749 100644 --- a/vercel.json +++ b/vercel.json @@ -2199,6 +2199,91 @@ "destination": "/factories/api-and-sdk/troubleshooting/errors/", "statusCode": 308 }, + { + "source": "/errors/authentication_required(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/authentication-required/", + "statusCode": 308 + }, + { + "source": "/errors/budget_exceeded(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/budget-exceeded/", + "statusCode": 308 + }, + { + "source": "/errors/content_policy_violation(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/content-policy-violation/", + "statusCode": 308 + }, + { + "source": "/errors/environment_setup_failed(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/environment-setup-failed/", + "statusCode": 308 + }, + { + "source": "/errors/external_authentication_required(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/external-authentication-required/", + "statusCode": 308 + }, + { + "source": "/errors/agent_process_failed(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/agent-process-failed/", + "statusCode": 308 + }, + { + "source": "/errors/feature_not_available(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/feature-not-available/", + "statusCode": 308 + }, + { + "source": "/errors/infrastructure_timeout(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/infrastructure-timeout/", + "statusCode": 308 + }, + { + "source": "/errors/insufficient_credits(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/insufficient-credits/", + "statusCode": 308 + }, + { + "source": "/errors/integration_disabled(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/integration-disabled/", + "statusCode": 308 + }, + { + "source": "/errors/integration_not_configured(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/integration-not-configured/", + "statusCode": 308 + }, + { + "source": "/errors/internal_error(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/internal-error/", + "statusCode": 308 + }, + { + "source": "/errors/invalid_request(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/invalid-request/", + "statusCode": 308 + }, + { + "source": "/errors/not_authorized(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/not-authorized/", + "statusCode": 308 + }, + { + "source": "/errors/operation_not_supported(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/operation-not-supported/", + "statusCode": 308 + }, + { + "source": "/errors/resource_not_found(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/resource-not-found/", + "statusCode": 308 + }, + { + "source": "/errors/resource_unavailable(/?)", + "destination": "/factories/api-and-sdk/troubleshooting/errors/resource-unavailable/", + "statusCode": 308 + }, { "source": "/errors/:code", "destination": "/factories/api-and-sdk/troubleshooting/errors/:code/",