Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: enhance DocsIndex with dynamic content loading and improved navigation; update ResourcePage for docSlug handling
nirholas42e1aa2394eb
diff --git a/chat/src/manus/pages/ResourcePage.svelte b/chat/src/manus/pages/ResourcePage.svelteindex 5288c7ae2..cfd0a1dc9 100644--- a/chat/src/manus/pages/ResourcePage.svelte+++ b/chat/src/manus/pages/ResourcePage.svelte@@ -10,8 +10,8 @@{#if slug === 'blog'}<BlogIndex />-{:else if slug === 'docs'}- <DocsIndex />+{:else if slug === 'docs' || slug.startsWith('docs/')}+ <DocsIndex docSlug={slug.startsWith('docs/') ? slug.slice(5) : ''} />{:else if slug === 'updates'}<UpdatesTimeline />{:else if slug === 'use-cases'}diff --git a/chat/src/manus/pages/resources/DocsIndex.svelte b/chat/src/manus/pages/resources/DocsIndex.svelteindex 9519a4268..c91fcc541 100644--- a/chat/src/manus/pages/resources/DocsIndex.svelte+++ b/chat/src/manus/pages/resources/DocsIndex.svelte@@ -1,16 +1,96 @@<script>+ import { onMount } from 'svelte';+ import { marked } from 'marked';++ export let docSlug = '';++ // Load all markdown files at build time+ const rawDocs = import.meta.glob('../../../../../docs/*.md', { query: '?raw', import: 'default', eager: true });++ // Build a slug → raw content map+ const docs = {};+ for (const [path, content] of Object.entries(rawDocs)) {+ const slug = path.replace('../../../../../docs/', '').replace('.md', '');+ docs[slug] = content;+ }++ // Extract the first H1 heading from a doc, falling back to slug+ function getTitle(slug) {+ const src = docs[slug] || '';+ const m = src.match(/^#\s+(.+)/m);+ return m ? m[1] : slug;+ }+const sections = [- { label: 'Getting started', items: ['Quickstart', 'Installation', 'Your first agent'] },- { label: 'Concepts', items: ['Agents', 'Tasks', 'Context', 'Memory'] },- { label: 'API', items: ['Authentication', 'Endpoints', 'Rate limits', 'Errors'] },- { label: 'SDKs', items: ['JavaScript', 'Python', 'Go'] },- { label: 'Tools', items: ['Web search', 'Code execution', 'File system', 'Browser'] },- { label: 'Skills', items: ['Built-in skills', 'Custom skills', 'Skill chaining'] },- { label: 'Deployments', items: ['Overview', 'Cloud', 'Self-hosted'] },- { label: 'FAQs', items: ['General', 'Billing', 'Security'] },- ];+ {+ label: 'Getting Started',+ items: ['introduction', 'quick-start', 'how-it-works'],+ },+ {+ label: 'Concepts',+ items: ['architecture', 'layers', 'agent-system', 'agent-manifest', 'memory', 'skills'],+ },+ {+ label: 'Embedding & SDK',+ items: ['embedding', 'web-component', 'widgets', 'widget-studio', 'js-api', 'sdk'],+ },+ {+ label: 'API',+ items: ['api-reference', 'authentication', 'permissions', 'configuration'],+ },+ {+ label: 'Avatars & 3D',+ items: ['viewer', 'avatar-creation', 'avaturn', 'character-studio', 'validation', 'editor', 'ar'],+ },+ {+ label: 'Blockchain',+ items: ['erc8004', 'smart-contracts', 'solana', 'solana-pumpfun', 'x402', 'reputation'],+ },+ {+ label: 'Platform',+ items: ['deployment', 'security', 'mcp', 'multi-agent'],+ },+ {+ label: 'Help',+ items: ['examples', 'troubleshooting', 'changelog', 'contributing'],+ },+ ].map(s => ({+ ...s,+ items: s.items.filter(slug => docs[slug]),+ })).filter(s => s.items.length > 0);++ let active = docSlug && docs[docSlug] ? docSlug : 'introduction';+ let search = '';+ let htmlContent = '';++ function navigate(slug) {+ active = slug;+ search = '';+ window.location.hash = `resources/docs/${slug}`;+ }- let active = 'Quickstart';+ $: {+ const src = docs[active] || '';+ htmlContent = marked.parse(src);+ }++ $: filtered = search.trim()+ ? sections+ .flatMap(s => s.items)+ .filter(slug =>+ getTitle(slug).toLowerCase().includes(search.toLowerCase()) ||+ slug.toLowerCase().includes(search.toLowerCase())+ )+ : null;++ onMount(() => {+ // Sync from hash if navigating directly to a sub-page+ const fromHash = window.location.hash.slice(1);+ if (fromHash.startsWith('resources/docs/')) {+ const slug = fromHash.slice('resources/docs/'.length);+ if (docs[slug]) active = slug;+ }+ });</script><div class="max-w-[1100px] mx-auto px-6 pt-16 pb-24 flex gap-8">@@ -20,58 +100,48 @@<inputtype="search"placeholder="Search docs"+ bind:value={search}class="bg-white border border-[#E5E3DC] rounded-full h-9 px-3 text-sm w-full mb-6 focus:outline-none focus:border-[#1A1A1A]"/>- {#each sections as s}+ {#if filtered}<div class="mb-4">- <div class="text-xs font-semibold uppercase tracking-wide text-[#9C9A93] mb-1">{s.label}</div>+ <div class="text-xs font-semibold uppercase tracking-wide text-[#9C9A93] mb-1">Results</div><ul class="space-y-0.5">- {#each s.items as item}+ {#each filtered as slug}<li><button- class="w-full text-left text-sm px-2 py-1 rounded-lg transition-colors {active === item ? 'bg-[#F5F4EF] text-[#1A1A1A] font-medium' : 'text-[#6B6B6B] hover:text-[#1A1A1A] hover:bg-[#F5F4EF]'}"- on:click={() => active = item}- >{item}</button>+ class="w-full text-left text-sm px-2 py-1 rounded-lg transition-colors {active === slug ? 'bg-[#F5F4EF] text-[#1A1A1A] font-medium' : 'text-[#6B6B6B] hover:text-[#1A1A1A] hover:bg-[#F5F4EF]'}"+ on:click={() => navigate(slug)}+ >{getTitle(slug)}</button></li>{/each}+ {#if filtered.length === 0}+ <li class="text-sm text-[#9C9A93] px-2 py-1">No results</li>+ {/if}</ul></div>- {/each}+ {:else}+ {#each sections as s}+ <div class="mb-4">+ <div class="text-xs font-semibold uppercase tracking-wide text-[#9C9A93] mb-1">{s.label}</div>+ <ul class="space-y-0.5">+ {#each s.items as slug}+ <li>+ <button+ class="w-full text-left text-sm px-2 py-1 rounded-lg transition-colors {active === slug ? 'bg-[#F5F4EF] text-[#1A1A1A] font-medium' : 'text-[#6B6B6B] hover:text-[#1A1A1A] hover:bg-[#F5F4EF]'}"+ on:click={() => navigate(slug)}+ >{getTitle(slug)}</button>+ </li>+ {/each}+ </ul>+ </div>+ {/each}+ {/if}</div></aside><!-- Content --><main class="flex-1 min-w-0 prose prose-neutral max-w-none">- <h1>Welcome to three.ws Docs</h1>- <p>- three.ws is an agent-first platform for building, running, and deploying AI agents. This documentation covers everything from your first agent run to production deployments.- </p>-- <h2>What is three.ws?</h2>- <p>- three.ws gives you a powerful runtime for multi-step AI tasks. Agents can browse the web, write and run code, manage files, and call external APIs — all orchestrated through a simple chat interface or programmatic API.- </p>-- <h2>Getting started</h2>- <p>The fastest way to get started is with the quickstart guide:</p>- <ol>- <li>Create a free account at <code>three.ws.ai</code></li>- <li>Pick a model from the model selector</li>- <li>Type your first task in the composer</li>- </ol>-- <h2>Core concepts</h2>- <p>- <strong>Agents</strong> are stateful processes that carry out multi-step tasks on your behalf.- Each agent has access to a configurable set of <strong>tools</strong> — web search, code execution, the file system, and more.- </p>- <p>- <strong>Skills</strong> are reusable agent capabilities you can share across projects. You can author custom skills or use the built-in library.- </p>-- <h2>Need help?</h2>- <p>- Open an issue on GitHub, reach the team via the in-app chat, or join the community Discord.- </p>+ {@html htmlContent}</main></div>diff --git a/solana-agent-sdk/jest.config.ts b/solana-agent-sdk/jest.config.tsindex 03baeb269..ee667f3d2 100644--- a/solana-agent-sdk/jest.config.ts+++ b/solana-agent-sdk/jest.config.ts@@ -12,6 +12,7 @@ const config: Config = {"<rootDir>/tests/wallet/**/*.test.ts","<rootDir>/tests/actions/**/*.test.ts",],+ forceExit: true,};export default config;diff --git a/solana-agent-sdk/tests/actions/transfer-spl.test.ts b/solana-agent-sdk/tests/actions/transfer-spl.test.tsindex 6d7a43376..7a328a042 100644--- a/solana-agent-sdk/tests/actions/transfer-spl.test.ts+++ b/solana-agent-sdk/tests/actions/transfer-spl.test.ts@@ -10,8 +10,8 @@ jest.unstable_mockModule("../../src/tx/build.js", () => ({buildAndSend: mockBuildAndSendFn,}));-jest.unstable_mockModule("@solana/spl-token", async () => {- const actual = await import("@solana/spl-token");+jest.unstable_mockModule("@solana/spl-token", () => {+ const actual = jest.requireActual("@solana/spl-token") as typeof import("@solana/spl-token");return { ...(actual as object), getMint: mockGetMintFn };});