From 0b90ab907d8ac7d93e14156bd93bedd769972875 Mon Sep 17 00:00:00 2001 From: Morgan Dean Date: Wed, 30 Jul 2025 18:58:52 +0100 Subject: [PATCH] Update and use /docs endpoint without /home --- .../docs/{home => }/agent-sdk/agent-loops.mdx | 0 .../agent-sdk/callbacks/agent-lifecycle.mdx | 0 .../agent-sdk/callbacks/cost-saving.mdx | 0 .../agent-sdk/callbacks/logging.mdx | 0 .../{home => }/agent-sdk/callbacks/meta.json | 0 .../agent-sdk/callbacks/pii-anonymization.mdx | 0 .../agent-sdk/callbacks/trajectories.mdx | 0 .../{home => }/agent-sdk/chat-history.mdx | 0 .../{home => }/agent-sdk/local-models.mdx | 0 .../docs/{home => }/agent-sdk/meta.json | 0 .../{home => }/agent-sdk/migration-guide.mdx | 0 .../{home => }/agent-sdk/prompt-caching.mdx | 0 .../{home => }/agent-sdk/sandboxed-tools.mdx | 0 .../{home => }/agent-sdk/supported-agents.mdx | 0 .../{home => }/agent-sdk/usage-tracking.mdx | 0 .../docs/{home => }/computer-sdk/commands.mdx | 78 +++++++++++++------ .../{home => }/computer-sdk/computers.mdx | 15 ++-- .../docs/{home => }/computer-sdk/meta.json | 0 .../computer-sdk/sandboxed-python.mdx | 0 docs/content/docs/{home => }/index.mdx | 6 +- .../docs/{home => }/libraries/agent/index.mdx | 0 .../libraries/computer-server/Commands.mdx | 0 .../libraries/computer-server/REST-API.mdx | 0 .../computer-server/WebSocket-API.mdx | 0 .../libraries/computer-server/index.mdx | 0 .../{home => }/libraries/computer/index.mdx | 0 .../docs/{home => }/libraries/core/index.mdx | 0 .../libraries/lume/cli-reference.mdx | 0 .../{home => }/libraries/lume/http-api.mdx | 0 .../docs/{home => }/libraries/lume/index.mdx | 0 .../{home => }/libraries/lumier/index.mdx | 0 .../{home => }/libraries/mcp-server/index.mdx | 0 .../docs/{home => }/libraries/som/index.mdx | 0 docs/content/docs/{home => }/meta.json | 0 .../docs/{home => }/quickstart-cli.mdx | 0 .../docs/{home => }/quickstart-devs.mdx | 0 .../content/docs/{home => }/quickstart-ui.mdx | 0 docs/content/docs/{home => }/telemetry.mdx | 0 docs/next.config.mjs | 2 +- .../(home)/{ => docs}/[[...slug]]/page.tsx | 2 +- docs/src/app/llms.mdx/[[...slug]]/route.ts | 2 +- docs/src/lib/source.ts | 2 +- 42 files changed, 73 insertions(+), 34 deletions(-) rename docs/content/docs/{home => }/agent-sdk/agent-loops.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/callbacks/agent-lifecycle.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/callbacks/cost-saving.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/callbacks/logging.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/callbacks/meta.json (100%) rename docs/content/docs/{home => }/agent-sdk/callbacks/pii-anonymization.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/callbacks/trajectories.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/chat-history.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/local-models.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/meta.json (100%) rename docs/content/docs/{home => }/agent-sdk/migration-guide.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/prompt-caching.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/sandboxed-tools.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/supported-agents.mdx (100%) rename docs/content/docs/{home => }/agent-sdk/usage-tracking.mdx (100%) rename docs/content/docs/{home => }/computer-sdk/commands.mdx (82%) rename docs/content/docs/{home => }/computer-sdk/computers.mdx (92%) rename docs/content/docs/{home => }/computer-sdk/meta.json (100%) rename docs/content/docs/{home => }/computer-sdk/sandboxed-python.mdx (100%) rename docs/content/docs/{home => }/index.mdx (86%) rename docs/content/docs/{home => }/libraries/agent/index.mdx (100%) rename docs/content/docs/{home => }/libraries/computer-server/Commands.mdx (100%) rename docs/content/docs/{home => }/libraries/computer-server/REST-API.mdx (100%) rename docs/content/docs/{home => }/libraries/computer-server/WebSocket-API.mdx (100%) rename docs/content/docs/{home => }/libraries/computer-server/index.mdx (100%) rename docs/content/docs/{home => }/libraries/computer/index.mdx (100%) rename docs/content/docs/{home => }/libraries/core/index.mdx (100%) rename docs/content/docs/{home => }/libraries/lume/cli-reference.mdx (100%) rename docs/content/docs/{home => }/libraries/lume/http-api.mdx (100%) rename docs/content/docs/{home => }/libraries/lume/index.mdx (100%) rename docs/content/docs/{home => }/libraries/lumier/index.mdx (100%) rename docs/content/docs/{home => }/libraries/mcp-server/index.mdx (100%) rename docs/content/docs/{home => }/libraries/som/index.mdx (100%) rename docs/content/docs/{home => }/meta.json (100%) rename docs/content/docs/{home => }/quickstart-cli.mdx (100%) rename docs/content/docs/{home => }/quickstart-devs.mdx (100%) rename docs/content/docs/{home => }/quickstart-ui.mdx (100%) rename docs/content/docs/{home => }/telemetry.mdx (100%) rename docs/src/app/(home)/{ => docs}/[[...slug]]/page.tsx (99%) diff --git a/docs/content/docs/home/agent-sdk/agent-loops.mdx b/docs/content/docs/agent-sdk/agent-loops.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/agent-loops.mdx rename to docs/content/docs/agent-sdk/agent-loops.mdx diff --git a/docs/content/docs/home/agent-sdk/callbacks/agent-lifecycle.mdx b/docs/content/docs/agent-sdk/callbacks/agent-lifecycle.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/callbacks/agent-lifecycle.mdx rename to docs/content/docs/agent-sdk/callbacks/agent-lifecycle.mdx diff --git a/docs/content/docs/home/agent-sdk/callbacks/cost-saving.mdx b/docs/content/docs/agent-sdk/callbacks/cost-saving.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/callbacks/cost-saving.mdx rename to docs/content/docs/agent-sdk/callbacks/cost-saving.mdx diff --git a/docs/content/docs/home/agent-sdk/callbacks/logging.mdx b/docs/content/docs/agent-sdk/callbacks/logging.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/callbacks/logging.mdx rename to docs/content/docs/agent-sdk/callbacks/logging.mdx diff --git a/docs/content/docs/home/agent-sdk/callbacks/meta.json b/docs/content/docs/agent-sdk/callbacks/meta.json similarity index 100% rename from docs/content/docs/home/agent-sdk/callbacks/meta.json rename to docs/content/docs/agent-sdk/callbacks/meta.json diff --git a/docs/content/docs/home/agent-sdk/callbacks/pii-anonymization.mdx b/docs/content/docs/agent-sdk/callbacks/pii-anonymization.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/callbacks/pii-anonymization.mdx rename to docs/content/docs/agent-sdk/callbacks/pii-anonymization.mdx diff --git a/docs/content/docs/home/agent-sdk/callbacks/trajectories.mdx b/docs/content/docs/agent-sdk/callbacks/trajectories.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/callbacks/trajectories.mdx rename to docs/content/docs/agent-sdk/callbacks/trajectories.mdx diff --git a/docs/content/docs/home/agent-sdk/chat-history.mdx b/docs/content/docs/agent-sdk/chat-history.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/chat-history.mdx rename to docs/content/docs/agent-sdk/chat-history.mdx diff --git a/docs/content/docs/home/agent-sdk/local-models.mdx b/docs/content/docs/agent-sdk/local-models.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/local-models.mdx rename to docs/content/docs/agent-sdk/local-models.mdx diff --git a/docs/content/docs/home/agent-sdk/meta.json b/docs/content/docs/agent-sdk/meta.json similarity index 100% rename from docs/content/docs/home/agent-sdk/meta.json rename to docs/content/docs/agent-sdk/meta.json diff --git a/docs/content/docs/home/agent-sdk/migration-guide.mdx b/docs/content/docs/agent-sdk/migration-guide.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/migration-guide.mdx rename to docs/content/docs/agent-sdk/migration-guide.mdx diff --git a/docs/content/docs/home/agent-sdk/prompt-caching.mdx b/docs/content/docs/agent-sdk/prompt-caching.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/prompt-caching.mdx rename to docs/content/docs/agent-sdk/prompt-caching.mdx diff --git a/docs/content/docs/home/agent-sdk/sandboxed-tools.mdx b/docs/content/docs/agent-sdk/sandboxed-tools.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/sandboxed-tools.mdx rename to docs/content/docs/agent-sdk/sandboxed-tools.mdx diff --git a/docs/content/docs/home/agent-sdk/supported-agents.mdx b/docs/content/docs/agent-sdk/supported-agents.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/supported-agents.mdx rename to docs/content/docs/agent-sdk/supported-agents.mdx diff --git a/docs/content/docs/home/agent-sdk/usage-tracking.mdx b/docs/content/docs/agent-sdk/usage-tracking.mdx similarity index 100% rename from docs/content/docs/home/agent-sdk/usage-tracking.mdx rename to docs/content/docs/agent-sdk/usage-tracking.mdx diff --git a/docs/content/docs/home/computer-sdk/commands.mdx b/docs/content/docs/computer-sdk/commands.mdx similarity index 82% rename from docs/content/docs/home/computer-sdk/commands.mdx rename to docs/content/docs/computer-sdk/commands.mdx index 622a0ac4..dbac237f 100644 --- a/docs/content/docs/home/computer-sdk/commands.mdx +++ b/docs/content/docs/computer-sdk/commands.mdx @@ -106,14 +106,24 @@ Mouse wheel and scrolling control: - ```python # Scrolling await computer.interface.scroll(x, y) # Scroll the - mouse wheel await computer.interface.scroll_down(clicks) # Scroll down await - computer.interface.scroll_up(clicks) # Scroll up ``` + + ```python + # Scrolling + await computer.interface.scroll(x, y) # Scroll the mouse wheel + await computer.interface.scroll_down(clicks) # Scroll down await + computer.interface.scroll_up(clicks) # Scroll up + + ``` + - ```typescript // Scrolling await computer.interface.scroll(x, y); // Scroll - the mouse wheel await computer.interface.scrollDown(clicks); // Scroll down - await computer.interface.scrollUp(clicks); // Scroll up ``` + ```typescript + // Scrolling + await computer.interface.scroll(x, y); // Scroll the mouse wheel + await computer.interface.scrollDown(clicks); // Scroll down + await computer.interface.scrollUp(clicks); // Scroll up + + ``` @@ -123,14 +133,21 @@ Screen capture and display information: - ```python # Screen operations await computer.interface.screenshot() # Take a - screenshot await computer.interface.get_screen_size() # Get screen - dimensions ``` + ```python + # Screen operations + await computer.interface.screenshot() # Take a screenshot + await computer.interface.get_screen_size() # Get screen dimensions + + ``` + - ```typescript // Screen operations await computer.interface.screenshot(); // - Take a screenshot await computer.interface.getScreenSize(); // Get screen - dimensions ``` + ```typescript + // Screen operations + await computer.interface.screenshot(); // Take a screenshot + await computer.interface.getScreenSize(); // Get screen dimensions + + ``` @@ -140,14 +157,22 @@ System clipboard management: - ```python # Clipboard operations await + ```python + # Clipboard operations await computer.interface.set_clipboard(text) # Set clipboard content await - computer.interface.copy_to_clipboard() # Get clipboard content ``` + computer.interface.copy_to_clipboard() # Get clipboard content + + ``` + - ```typescript // Clipboard operations await - computer.interface.setClipboard(text); // Set clipboard content await - computer.interface.copyToClipboard(); // Get clipboard content ``` + ```typescript + // Clipboard operations + await computer.interface.setClipboard(text); // Set clipboard content + await computer.interface.copyToClipboard(); // Get clipboard content + + ``` + @@ -157,6 +182,7 @@ Direct file and directory manipulation: + ```python # File existence checks await computer.interface.file_exists(path) # Check if file exists @@ -204,11 +230,19 @@ Access system accessibility information: - ```python # Accessibility await computer.interface.get_accessibility_tree() - # Get accessibility tree ``` + ```python + # Get accessibility tree + await computer.interface.get_accessibility_tree() + + ``` + - ```typescript // Accessibility await - computer.interface.getAccessibilityTree(); // Get accessibility tree ``` - + ```typescript + // Get accessibility tree + await computer.interface.getAccessibilityTree(); + +``` + +``` diff --git a/docs/content/docs/home/computer-sdk/computers.mdx b/docs/content/docs/computer-sdk/computers.mdx similarity index 92% rename from docs/content/docs/home/computer-sdk/computers.mdx rename to docs/content/docs/computer-sdk/computers.mdx index cf5d6115..470e8a65 100644 --- a/docs/content/docs/home/computer-sdk/computers.mdx +++ b/docs/content/docs/computer-sdk/computers.mdx @@ -63,7 +63,7 @@ lume run macos-sequoia-cua:latest 3. Connect with Computer - + ```python computer = Computer( @@ -73,9 +73,9 @@ lume run macos-sequoia-cua:latest ) await computer.run() # Connect to the container - ``` + ``` - + ## Your host desktop @@ -91,7 +91,12 @@ Connect with: - ```python computer = Computer(use_host_computer_server=True) await - computer.run() # Connect to the host desktop ``` + ```python + + computer = Computer(use_host_computer_server=True) await + computer.run() # Connect to the host desktop + + ``` + diff --git a/docs/content/docs/home/computer-sdk/meta.json b/docs/content/docs/computer-sdk/meta.json similarity index 100% rename from docs/content/docs/home/computer-sdk/meta.json rename to docs/content/docs/computer-sdk/meta.json diff --git a/docs/content/docs/home/computer-sdk/sandboxed-python.mdx b/docs/content/docs/computer-sdk/sandboxed-python.mdx similarity index 100% rename from docs/content/docs/home/computer-sdk/sandboxed-python.mdx rename to docs/content/docs/computer-sdk/sandboxed-python.mdx diff --git a/docs/content/docs/home/index.mdx b/docs/content/docs/index.mdx similarity index 86% rename from docs/content/docs/home/index.mdx rename to docs/content/docs/index.mdx index bc1aa616..6f873565 100644 --- a/docs/content/docs/home/index.mdx +++ b/docs/content/docs/index.mdx @@ -16,18 +16,18 @@ cua makes every stage of computer-using agent development simple: - **Deployment**: cua cloud gives you a production-ready cloud environment for your assistants
- } href="/home/quickstart-ui" title="Quickstart (UI)"> + } href="/docs/quickstart-ui" title="Quickstart (UI)"> Try the cua Agent UI in your browser—no coding required. } - href="/home/quickstart-devs" + href="/docs/quickstart-devs" title="Quickstart (Developers)"> Build with Python—full SDK and agent code examples.
- } href="/home/libraries/agent" title="API Reference"> + } href="/docs/libraries/agent" title="API Reference"> Explore the agent SDK and APIs
diff --git a/docs/content/docs/home/libraries/agent/index.mdx b/docs/content/docs/libraries/agent/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/agent/index.mdx rename to docs/content/docs/libraries/agent/index.mdx diff --git a/docs/content/docs/home/libraries/computer-server/Commands.mdx b/docs/content/docs/libraries/computer-server/Commands.mdx similarity index 100% rename from docs/content/docs/home/libraries/computer-server/Commands.mdx rename to docs/content/docs/libraries/computer-server/Commands.mdx diff --git a/docs/content/docs/home/libraries/computer-server/REST-API.mdx b/docs/content/docs/libraries/computer-server/REST-API.mdx similarity index 100% rename from docs/content/docs/home/libraries/computer-server/REST-API.mdx rename to docs/content/docs/libraries/computer-server/REST-API.mdx diff --git a/docs/content/docs/home/libraries/computer-server/WebSocket-API.mdx b/docs/content/docs/libraries/computer-server/WebSocket-API.mdx similarity index 100% rename from docs/content/docs/home/libraries/computer-server/WebSocket-API.mdx rename to docs/content/docs/libraries/computer-server/WebSocket-API.mdx diff --git a/docs/content/docs/home/libraries/computer-server/index.mdx b/docs/content/docs/libraries/computer-server/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/computer-server/index.mdx rename to docs/content/docs/libraries/computer-server/index.mdx diff --git a/docs/content/docs/home/libraries/computer/index.mdx b/docs/content/docs/libraries/computer/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/computer/index.mdx rename to docs/content/docs/libraries/computer/index.mdx diff --git a/docs/content/docs/home/libraries/core/index.mdx b/docs/content/docs/libraries/core/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/core/index.mdx rename to docs/content/docs/libraries/core/index.mdx diff --git a/docs/content/docs/home/libraries/lume/cli-reference.mdx b/docs/content/docs/libraries/lume/cli-reference.mdx similarity index 100% rename from docs/content/docs/home/libraries/lume/cli-reference.mdx rename to docs/content/docs/libraries/lume/cli-reference.mdx diff --git a/docs/content/docs/home/libraries/lume/http-api.mdx b/docs/content/docs/libraries/lume/http-api.mdx similarity index 100% rename from docs/content/docs/home/libraries/lume/http-api.mdx rename to docs/content/docs/libraries/lume/http-api.mdx diff --git a/docs/content/docs/home/libraries/lume/index.mdx b/docs/content/docs/libraries/lume/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/lume/index.mdx rename to docs/content/docs/libraries/lume/index.mdx diff --git a/docs/content/docs/home/libraries/lumier/index.mdx b/docs/content/docs/libraries/lumier/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/lumier/index.mdx rename to docs/content/docs/libraries/lumier/index.mdx diff --git a/docs/content/docs/home/libraries/mcp-server/index.mdx b/docs/content/docs/libraries/mcp-server/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/mcp-server/index.mdx rename to docs/content/docs/libraries/mcp-server/index.mdx diff --git a/docs/content/docs/home/libraries/som/index.mdx b/docs/content/docs/libraries/som/index.mdx similarity index 100% rename from docs/content/docs/home/libraries/som/index.mdx rename to docs/content/docs/libraries/som/index.mdx diff --git a/docs/content/docs/home/meta.json b/docs/content/docs/meta.json similarity index 100% rename from docs/content/docs/home/meta.json rename to docs/content/docs/meta.json diff --git a/docs/content/docs/home/quickstart-cli.mdx b/docs/content/docs/quickstart-cli.mdx similarity index 100% rename from docs/content/docs/home/quickstart-cli.mdx rename to docs/content/docs/quickstart-cli.mdx diff --git a/docs/content/docs/home/quickstart-devs.mdx b/docs/content/docs/quickstart-devs.mdx similarity index 100% rename from docs/content/docs/home/quickstart-devs.mdx rename to docs/content/docs/quickstart-devs.mdx diff --git a/docs/content/docs/home/quickstart-ui.mdx b/docs/content/docs/quickstart-ui.mdx similarity index 100% rename from docs/content/docs/home/quickstart-ui.mdx rename to docs/content/docs/quickstart-ui.mdx diff --git a/docs/content/docs/home/telemetry.mdx b/docs/content/docs/telemetry.mdx similarity index 100% rename from docs/content/docs/home/telemetry.mdx rename to docs/content/docs/telemetry.mdx diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 8f8a29ac..4d724027 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -8,7 +8,7 @@ const config = { async rewrites() { return [ { - source: '/home/:path*.mdx', + source: '/docs/:path*.mdx', destination: '/llms.mdx/:path*', }, ]; diff --git a/docs/src/app/(home)/[[...slug]]/page.tsx b/docs/src/app/(home)/docs/[[...slug]]/page.tsx similarity index 99% rename from docs/src/app/(home)/[[...slug]]/page.tsx rename to docs/src/app/(home)/docs/[[...slug]]/page.tsx index 695a8bf2..a9a36b4f 100644 --- a/docs/src/app/(home)/[[...slug]]/page.tsx +++ b/docs/src/app/(home)/docs/[[...slug]]/page.tsx @@ -25,7 +25,7 @@ export default async function Page(props: { const params = await props.params; const slug = params.slug || []; const page = source.getPage(slug); - if (!page) redirect('/home'); + if (!page) notFound(); //redirect('/docs'); // Detect if this is an API reference page: /api/[section] or /api/[section]/[version] let apiSection: string | null = null; diff --git a/docs/src/app/llms.mdx/[[...slug]]/route.ts b/docs/src/app/llms.mdx/[[...slug]]/route.ts index 45079884..653246a1 100644 --- a/docs/src/app/llms.mdx/[[...slug]]/route.ts +++ b/docs/src/app/llms.mdx/[[...slug]]/route.ts @@ -10,7 +10,7 @@ export async function GET( { params }: { params: Promise<{ slug?: string[] }> } ) { const { slug } = await params; - const page = source.getPage(['home', ...slug!]); + const page = source.getPage(['docs', ...slug!]); if (!page) notFound(); return new NextResponse(await getLLMText(page)); diff --git a/docs/src/lib/source.ts b/docs/src/lib/source.ts index a202cf80..b8355630 100644 --- a/docs/src/lib/source.ts +++ b/docs/src/lib/source.ts @@ -43,7 +43,7 @@ export async function getApiVersions( // See https://fumadocs.vercel.app/docs/headless/source-api for more info export const source = loader({ // it assigns a URL to your pages - baseUrl: '/', + baseUrl: '/docs', source: docs.toFumadocsSource(), icon(icon) { if (!icon) return;