diff --git a/.gitignore b/.gitignore index 94895972..eb63517a 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ yarn-error.log* *.swp *.swo *~ +.vercel diff --git a/docs-site/.gitignore b/docs-site/.gitignore new file mode 100644 index 00000000..e985853e --- /dev/null +++ b/docs-site/.gitignore @@ -0,0 +1 @@ +.vercel diff --git a/docs/app/(home)/layout.tsx b/docs-site/app/(home)/layout.tsx similarity index 100% rename from docs/app/(home)/layout.tsx rename to docs-site/app/(home)/layout.tsx diff --git a/docs/app/(home)/page.tsx b/docs-site/app/(home)/page.tsx similarity index 100% rename from docs/app/(home)/page.tsx rename to docs-site/app/(home)/page.tsx diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs-site/app/docs/[[...slug]]/page.tsx similarity index 100% rename from docs/app/docs/[[...slug]]/page.tsx rename to docs-site/app/docs/[[...slug]]/page.tsx diff --git a/docs/app/docs/layout.tsx b/docs-site/app/docs/layout.tsx similarity index 100% rename from docs/app/docs/layout.tsx rename to docs-site/app/docs/layout.tsx diff --git a/docs/app/global.css b/docs-site/app/global.css similarity index 100% rename from docs/app/global.css rename to docs-site/app/global.css diff --git a/docs/app/layout.config.tsx b/docs-site/app/layout.config.tsx similarity index 100% rename from docs/app/layout.config.tsx rename to docs-site/app/layout.config.tsx diff --git a/docs/app/layout.tsx b/docs-site/app/layout.tsx similarity index 100% rename from docs/app/layout.tsx rename to docs-site/app/layout.tsx diff --git a/docs/components/code-block.tsx b/docs-site/components/code-block.tsx similarity index 100% rename from docs/components/code-block.tsx rename to docs-site/components/code-block.tsx diff --git a/docs/components/copy-button.tsx b/docs-site/components/copy-button.tsx similarity index 100% rename from docs/components/copy-button.tsx rename to docs-site/components/copy-button.tsx diff --git a/docs/components/logo.tsx b/docs-site/components/logo.tsx similarity index 100% rename from docs/components/logo.tsx rename to docs-site/components/logo.tsx diff --git a/docs/components/scroll-reveal.tsx b/docs-site/components/scroll-reveal.tsx similarity index 100% rename from docs/components/scroll-reveal.tsx rename to docs-site/components/scroll-reveal.tsx diff --git a/docs/components/terminal-preview.tsx b/docs-site/components/terminal-preview.tsx similarity index 100% rename from docs/components/terminal-preview.tsx rename to docs-site/components/terminal-preview.tsx diff --git a/docs/content/docs/benchmarks/link-detection.mdx b/docs-site/content/docs/benchmarks/link-detection.mdx similarity index 100% rename from docs/content/docs/benchmarks/link-detection.mdx rename to docs-site/content/docs/benchmarks/link-detection.mdx diff --git a/docs/content/docs/benchmarks/meta.json b/docs-site/content/docs/benchmarks/meta.json similarity index 100% rename from docs/content/docs/benchmarks/meta.json rename to docs-site/content/docs/benchmarks/meta.json diff --git a/docs/content/docs/cli-reference/ktx-agent.mdx b/docs-site/content/docs/cli-reference/ktx-agent.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-agent.mdx rename to docs-site/content/docs/cli-reference/ktx-agent.mdx diff --git a/docs/content/docs/cli-reference/ktx-connection.mdx b/docs-site/content/docs/cli-reference/ktx-connection.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-connection.mdx rename to docs-site/content/docs/cli-reference/ktx-connection.mdx diff --git a/docs/content/docs/cli-reference/ktx-dev.mdx b/docs-site/content/docs/cli-reference/ktx-dev.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-dev.mdx rename to docs-site/content/docs/cli-reference/ktx-dev.mdx diff --git a/docs/content/docs/cli-reference/ktx-ingest.mdx b/docs-site/content/docs/cli-reference/ktx-ingest.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-ingest.mdx rename to docs-site/content/docs/cli-reference/ktx-ingest.mdx diff --git a/docs/content/docs/cli-reference/ktx-scan.mdx b/docs-site/content/docs/cli-reference/ktx-scan.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-scan.mdx rename to docs-site/content/docs/cli-reference/ktx-scan.mdx diff --git a/docs/content/docs/cli-reference/ktx-serve.mdx b/docs-site/content/docs/cli-reference/ktx-serve.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-serve.mdx rename to docs-site/content/docs/cli-reference/ktx-serve.mdx diff --git a/docs/content/docs/cli-reference/ktx-setup.mdx b/docs-site/content/docs/cli-reference/ktx-setup.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-setup.mdx rename to docs-site/content/docs/cli-reference/ktx-setup.mdx diff --git a/docs/content/docs/cli-reference/ktx-sl.mdx b/docs-site/content/docs/cli-reference/ktx-sl.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-sl.mdx rename to docs-site/content/docs/cli-reference/ktx-sl.mdx diff --git a/docs/content/docs/cli-reference/ktx-status.mdx b/docs-site/content/docs/cli-reference/ktx-status.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-status.mdx rename to docs-site/content/docs/cli-reference/ktx-status.mdx diff --git a/docs/content/docs/cli-reference/ktx-wiki.mdx b/docs-site/content/docs/cli-reference/ktx-wiki.mdx similarity index 100% rename from docs/content/docs/cli-reference/ktx-wiki.mdx rename to docs-site/content/docs/cli-reference/ktx-wiki.mdx diff --git a/docs/content/docs/cli-reference/meta.json b/docs-site/content/docs/cli-reference/meta.json similarity index 100% rename from docs/content/docs/cli-reference/meta.json rename to docs-site/content/docs/cli-reference/meta.json diff --git a/docs/content/docs/community/contributing.mdx b/docs-site/content/docs/community/contributing.mdx similarity index 100% rename from docs/content/docs/community/contributing.mdx rename to docs-site/content/docs/community/contributing.mdx diff --git a/docs/content/docs/community/meta.json b/docs-site/content/docs/community/meta.json similarity index 100% rename from docs/content/docs/community/meta.json rename to docs-site/content/docs/community/meta.json diff --git a/docs/content/docs/concepts/context-as-code.mdx b/docs-site/content/docs/concepts/context-as-code.mdx similarity index 100% rename from docs/content/docs/concepts/context-as-code.mdx rename to docs-site/content/docs/concepts/context-as-code.mdx diff --git a/docs/content/docs/concepts/meta.json b/docs-site/content/docs/concepts/meta.json similarity index 100% rename from docs/content/docs/concepts/meta.json rename to docs-site/content/docs/concepts/meta.json diff --git a/docs/content/docs/concepts/the-context-layer.mdx b/docs-site/content/docs/concepts/the-context-layer.mdx similarity index 100% rename from docs/content/docs/concepts/the-context-layer.mdx rename to docs-site/content/docs/concepts/the-context-layer.mdx diff --git a/docs/content/docs/getting-started/introduction.mdx b/docs-site/content/docs/getting-started/introduction.mdx similarity index 100% rename from docs/content/docs/getting-started/introduction.mdx rename to docs-site/content/docs/getting-started/introduction.mdx diff --git a/docs/content/docs/getting-started/meta.json b/docs-site/content/docs/getting-started/meta.json similarity index 100% rename from docs/content/docs/getting-started/meta.json rename to docs-site/content/docs/getting-started/meta.json diff --git a/docs/content/docs/getting-started/quickstart.mdx b/docs-site/content/docs/getting-started/quickstart.mdx similarity index 100% rename from docs/content/docs/getting-started/quickstart.mdx rename to docs-site/content/docs/getting-started/quickstart.mdx diff --git a/docs/content/docs/guides/building-context.mdx b/docs-site/content/docs/guides/building-context.mdx similarity index 100% rename from docs/content/docs/guides/building-context.mdx rename to docs-site/content/docs/guides/building-context.mdx diff --git a/docs/content/docs/guides/meta.json b/docs-site/content/docs/guides/meta.json similarity index 100% rename from docs/content/docs/guides/meta.json rename to docs-site/content/docs/guides/meta.json diff --git a/docs/content/docs/guides/serving-agents.mdx b/docs-site/content/docs/guides/serving-agents.mdx similarity index 100% rename from docs/content/docs/guides/serving-agents.mdx rename to docs-site/content/docs/guides/serving-agents.mdx diff --git a/docs/content/docs/guides/writing-context.mdx b/docs-site/content/docs/guides/writing-context.mdx similarity index 100% rename from docs/content/docs/guides/writing-context.mdx rename to docs-site/content/docs/guides/writing-context.mdx diff --git a/docs/content/docs/integrations/agent-clients.mdx b/docs-site/content/docs/integrations/agent-clients.mdx similarity index 100% rename from docs/content/docs/integrations/agent-clients.mdx rename to docs-site/content/docs/integrations/agent-clients.mdx diff --git a/docs/content/docs/integrations/context-sources.mdx b/docs-site/content/docs/integrations/context-sources.mdx similarity index 100% rename from docs/content/docs/integrations/context-sources.mdx rename to docs-site/content/docs/integrations/context-sources.mdx diff --git a/docs/content/docs/integrations/meta.json b/docs-site/content/docs/integrations/meta.json similarity index 100% rename from docs/content/docs/integrations/meta.json rename to docs-site/content/docs/integrations/meta.json diff --git a/docs/content/docs/integrations/primary-sources.mdx b/docs-site/content/docs/integrations/primary-sources.mdx similarity index 100% rename from docs/content/docs/integrations/primary-sources.mdx rename to docs-site/content/docs/integrations/primary-sources.mdx diff --git a/docs/content/docs/meta.json b/docs-site/content/docs/meta.json similarity index 100% rename from docs/content/docs/meta.json rename to docs-site/content/docs/meta.json diff --git a/docs/lib/source.ts b/docs-site/lib/source.ts similarity index 100% rename from docs/lib/source.ts rename to docs-site/lib/source.ts diff --git a/docs/next-env.d.ts b/docs-site/next-env.d.ts similarity index 100% rename from docs/next-env.d.ts rename to docs-site/next-env.d.ts diff --git a/docs/next.config.mjs b/docs-site/next.config.mjs similarity index 100% rename from docs/next.config.mjs rename to docs-site/next.config.mjs diff --git a/docs/package.json b/docs-site/package.json similarity index 94% rename from docs/package.json rename to docs-site/package.json index 3396e3f7..8ab53b93 100644 --- a/docs/package.json +++ b/docs-site/package.json @@ -17,6 +17,7 @@ "react-dom": "19.2.6" }, "devDependencies": { + "@types/node": "^24.3.0", "@types/react": "^19", "@types/react-dom": "^19", "typescript": "^5.9", diff --git a/docs/postcss.config.mjs b/docs-site/postcss.config.mjs similarity index 100% rename from docs/postcss.config.mjs rename to docs-site/postcss.config.mjs diff --git a/docs/source.config.ts b/docs-site/source.config.ts similarity index 100% rename from docs/source.config.ts rename to docs-site/source.config.ts diff --git a/docs/tsconfig.json b/docs-site/tsconfig.json similarity index 100% rename from docs/tsconfig.json rename to docs-site/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da054be9..e74389f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: specifier: ^4.0.18 version: 4.1.5(@opentelemetry/api@1.9.0)(@types/node@24.12.2)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.8.3)) - docs: + docs-site: dependencies: fumadocs-core: specifier: 15.7.13 @@ -46,6 +46,9 @@ importers: '@tailwindcss/postcss': specifier: ^4 version: 4.3.0 + '@types/node': + specifier: ^24.3.0 + version: 24.12.2 '@types/react': specifier: ^19 version: 19.2.14 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cf00f397..66744f37 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,6 @@ packages: - "packages/*" - - "docs" + - "docs-site" overrides: "@types/node": ^24.3.0 diff --git a/scripts/check-boundaries.mjs b/scripts/check-boundaries.mjs index f0ec86f0..86b98712 100644 --- a/scripts/check-boundaries.mjs +++ b/scripts/check-boundaries.mjs @@ -6,7 +6,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url'; const codeExtensions = new Set(['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs', '.py']); const runtimeAssetPatterns = [/^packages\/[^/]+\/prompts\/.+\.md$/, /^packages\/[^/]+\/skills\/.+\.md$/]; -const identifierSkipPrefixes = ['docs/', 'examples/', 'python/ktx-sl/plans/', 'python/ktx-sl/openspec/']; +const identifierSkipPrefixes = ['docs/', 'docs-site/', 'examples/', 'python/ktx-sl/plans/', 'python/ktx-sl/openspec/']; const identifierAllowPatterns = [ /^packages\/cli\/src\/(?:index|managed-local-embeddings|managed-python-command|managed-python-daemon|managed-python-runtime|runtime)(?:\.test)?\.ts$/, /^scripts\/(?:build-public-npm-package|build-python-runtime-wheel|local-embeddings-runtime-smoke|package-artifacts|publish-public-npm-package|published-package-smoke|release-readiness)(?:\.test)?\.mjs$/, diff --git a/scripts/conductor-scripts.test.mjs b/scripts/conductor-scripts.test.mjs index d33fa73a..9dc17f0f 100644 --- a/scripts/conductor-scripts.test.mjs +++ b/scripts/conductor-scripts.test.mjs @@ -32,11 +32,13 @@ describe('Conductor workspace scripts', () => { assert.doesNotMatch(setupScript, /scripts\/conductor\//); }); - it('links private agent overlays when KTX_AGENT_OVERLAYS_ROOT is set', async () => { + it('links private agent overlays from the Conductor root checkout', async () => { const workspaceScript = await readText('scripts/conductor-setup.sh'); - assert.match(workspaceScript, /KTX_AGENT_OVERLAYS_ROOT/); - assert.match(workspaceScript, /ln -s "\$\{KTX_AGENT_OVERLAYS_ROOT\}\/\.agents" \.agents/); + assert.match(workspaceScript, /link_shared_path "\$CONDUCTOR_ROOT_PATH\/\.agents" \.agents/); + assert.match(workspaceScript, /link_shared_path "\$CONDUCTOR_ROOT_PATH\/\.claude" \.claude/); + assert.doesNotMatch(workspaceScript, /KTX_AGENT_OVERLAYS_ROOT/); + assert.doesNotMatch(workspaceScript, /link_agent_skills_for_claude/); }); it('runs the KTX daemon on the documented fixed local port', async () => { diff --git a/scripts/conductor-setup.sh b/scripts/conductor-setup.sh index 15dbf776..34d16216 100755 --- a/scripts/conductor-setup.sh +++ b/scripts/conductor-setup.sh @@ -82,63 +82,39 @@ resolve_uv_for_project() { printf '%s\n' "$workspace_uv" } -link_agent_overlays() { - if [ -z "${KTX_AGENT_OVERLAYS_ROOT:-}" ] || [ ! -d "${KTX_AGENT_OVERLAYS_ROOT}/.agents" ]; then +link_shared_path() { + local source_path="$1" + local link_path="$2" + + if [ ! -e "$source_path" ] && [ ! -L "$source_path" ]; then + return 1 + fi + + if [ -L "$link_path" ]; then + ln -sfn "$source_path" "$link_path" + echo "Linked $link_path" return 0 fi - if [ -L .agents ]; then - return 0 + if [ -e "$link_path" ]; then + echo "Skipping $link_path symlink because $link_path already exists and is not a symlink." >&2 + return 1 fi - if [ -e .agents ]; then - echo "Skipping .agents symlink because .agents already exists and is not a symlink." >&2 - return 0 - fi - - ln -s "${KTX_AGENT_OVERLAYS_ROOT}/.agents" .agents + ln -s "$source_path" "$link_path" + echo "Linked $link_path" } -# Expose .agents/skills/* to Claude Code by symlinking each entry under -# .claude/skills/. Codex CLI reads .agents/skills/ directly; Claude Code only -# scans .claude/skills/, so the overlay needs both sides to be visible to both -# tools. -link_agent_skills_for_claude() { - if [ ! -d .agents/skills ]; then - return 0 +link_agent_overlays() { + if [ -n "${CONDUCTOR_ROOT_PATH:-}" ]; then + link_shared_path "$CONDUCTOR_ROOT_PATH/.agents" .agents || true + link_shared_path "$CONDUCTOR_ROOT_PATH/.claude" .claude || true fi - - mkdir -p .claude/skills - - for skill_path in .agents/skills/*; do - [ -e "$skill_path" ] || continue - - local skill_name - skill_name="$(basename "$skill_path")" - local link_path=".claude/skills/$skill_name" - local target="../../.agents/skills/$skill_name" - - if [ -L "$link_path" ]; then - if [ "$(readlink "$link_path")" = "$target" ]; then - continue - fi - echo "Skipping $link_path: existing symlink points elsewhere." >&2 - continue - fi - - if [ -e "$link_path" ]; then - echo "Skipping $link_path: already exists and is not a symlink." >&2 - continue - fi - - ln -s "$target" "$link_path" - done } echo "=== Conductor KTX workspace setup ===" link_agent_overlays -link_agent_skills_for_claude if [ -n "${CONDUCTOR_ROOT_PATH:-}" ] && [ -f "$CONDUCTOR_ROOT_PATH/.env" ]; then ln -sf "$CONDUCTOR_ROOT_PATH/.env" .env