From e9e4dc75f2384b65f1ddff7ac14ae931c8d7e130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= Date: Thu, 26 Mar 2026 13:31:24 +0800 Subject: [PATCH 1/4] Add Zed config support and fix docs section routing --- Cargo.lock | 10 +- cli/src/ProtectedDeletionGuard.ts | 4 + cli/src/config.ts | 1 + cli/src/inputs/index.ts | 73 +-- cli/src/inputs/input-public-config.test.ts | 589 +++++++++++++------- cli/src/inputs/input-zed-config.ts | 23 + cli/src/inputs/runtime.ts | 2 + cli/src/pipeline/ContextMerger.ts | 175 +++--- cli/src/plugin.config.ts | 58 +- cli/src/plugins/ZedIDEConfigOutputPlugin.ts | 64 +++ cli/src/plugins/ide-config-output.test.ts | 255 ++++++--- cli/src/plugins/plugin-core/AindexTypes.ts | 236 ++++---- cli/src/plugins/plugin-core/InputTypes.ts | 354 +++++++----- cli/src/plugins/plugin-core/constants.ts | 169 +++--- cli/src/plugins/plugin-core/enums.ts | 65 +-- cli/src/plugins/plugin-zed.ts | 3 + cli/src/public-config-paths.ts | 161 +++--- cli/tsconfig.json | 3 +- cli/tsdown.config.ts | 3 +- cli/vite.config.ts | 3 +- doc/app/docs/[section]/[[...rest]]/page.tsx | 74 +++ doc/app/docs/[section]/layout.tsx | 72 +++ doc/app/home-page.mdx | 4 +- doc/components/docs-section-nav.tsx | 37 ++ doc/content/_meta.ts | 15 +- doc/lib/docs-sections.ts | 25 + doc/next.config.ts | 4 + 27 files changed, 1608 insertions(+), 874 deletions(-) create mode 100644 cli/src/inputs/input-zed-config.ts create mode 100644 cli/src/plugins/ZedIDEConfigOutputPlugin.ts create mode 100644 cli/src/plugins/plugin-zed.ts create mode 100644 doc/app/docs/[section]/[[...rest]]/page.tsx create mode 100644 doc/app/docs/[section]/layout.tsx create mode 100644 doc/components/docs-section-nav.tsx create mode 100644 doc/lib/docs-sections.ts diff --git a/Cargo.lock b/Cargo.lock index a2ead53c..3834f108 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2071,7 +2071,7 @@ dependencies = [ [[package]] name = "memory-sync-gui" -version = "2026.10324.11958" +version = "2026.10325.12228" dependencies = [ "dirs", "proptest", @@ -4349,7 +4349,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tnmsc" -version = "2026.10324.11958" +version = "2026.10325.12228" dependencies = [ "clap", "dirs", @@ -4369,7 +4369,7 @@ dependencies = [ [[package]] name = "tnmsc-logger" -version = "2026.10324.11958" +version = "2026.10325.12228" dependencies = [ "chrono", "napi", @@ -4381,7 +4381,7 @@ dependencies = [ [[package]] name = "tnmsc-md-compiler" -version = "2026.10324.11958" +version = "2026.10325.12228" dependencies = [ "markdown", "napi", @@ -4396,7 +4396,7 @@ dependencies = [ [[package]] name = "tnmsc-script-runtime" -version = "2026.10324.11958" +version = "2026.10325.12228" dependencies = [ "napi", "napi-build", diff --git a/cli/src/ProtectedDeletionGuard.ts b/cli/src/ProtectedDeletionGuard.ts index dc2e48bf..1175ebde 100644 --- a/cli/src/ProtectedDeletionGuard.ts +++ b/cli/src/ProtectedDeletionGuard.ts @@ -433,6 +433,10 @@ export function collectProtectedInputSourceRules( addRuleFromDir(config.dir as DirPathLike | undefined, 'direct', 'vscode input config file', 'collected-input-config') } + for (const config of collectedOutputContext.zedConfigFiles ?? []) { + addRuleFromDir(config.dir as DirPathLike | undefined, 'direct', 'zed input config file', 'collected-input-config') + } + for (const config of collectedOutputContext.jetbrainsConfigFiles ?? []) { addRuleFromDir(config.dir as DirPathLike | undefined, 'direct', 'jetbrains input config file', 'collected-input-config') } diff --git a/cli/src/config.ts b/cli/src/config.ts index a242c1b0..543367d9 100644 --- a/cli/src/config.ts +++ b/cli/src/config.ts @@ -477,6 +477,7 @@ export async function defineConfig(options: PluginOptions | DefineConfigOptions const inputContext: InputCollectedContext = { workspace: merged.workspace, ...merged.vscodeConfigFiles != null && {vscodeConfigFiles: merged.vscodeConfigFiles}, + ...merged.zedConfigFiles != null && {zedConfigFiles: merged.zedConfigFiles}, ...merged.jetbrainsConfigFiles != null && {jetbrainsConfigFiles: merged.jetbrainsConfigFiles}, ...merged.editorConfigFiles != null && {editorConfigFiles: merged.editorConfigFiles}, ...merged.commands != null && {commands: merged.commands}, diff --git a/cli/src/inputs/index.ts b/cli/src/inputs/index.ts index 8d7bcec6..fdde0ef5 100644 --- a/cli/src/inputs/index.ts +++ b/cli/src/inputs/index.ts @@ -1,56 +1,23 @@ -export { - MarkdownWhitespaceCleanupEffectInputCapability -} from './effect-md-cleanup' -export { - OrphanFileCleanupEffectInputCapability -} from './effect-orphan-cleanup' +export { MarkdownWhitespaceCleanupEffectInputCapability } from "./effect-md-cleanup"; +export { OrphanFileCleanupEffectInputCapability } from "./effect-orphan-cleanup"; export { SkillDistCleanupEffectInputCapability, - SkillNonSrcFileSyncEffectInputCapability -} from './effect-skill-sync' // Effect Input Plugins (按优先级排序: 10, 20, 30) + SkillNonSrcFileSyncEffectInputCapability, +} from "./effect-skill-sync"; // Effect Input Plugins (按优先级排序: 10, 20, 30) -export { - SkillInputCapability -} from './input-agentskills' -export { - AindexInputCapability -} from './input-aindex' -export { - CommandInputCapability -} from './input-command' -export { - EditorConfigInputCapability -} from './input-editorconfig' -export { - GitExcludeInputCapability -} from './input-git-exclude' -export { - GitIgnoreInputCapability -} from './input-gitignore' -export { - GlobalMemoryInputCapability -} from './input-global-memory' -export { - JetBrainsConfigInputCapability -} from './input-jetbrains-config' -export { - ProjectPromptInputCapability -} from './input-project-prompt' -export { - ReadmeMdInputCapability -} from './input-readme' -export { - RuleInputCapability -} from './input-rule' -export { - AIAgentIgnoreInputCapability -} from './input-shared-ignore' -export { - SubAgentInputCapability -} from './input-subagent' -export { - VSCodeConfigInputCapability -} from './input-vscode-config' -export { - WorkspaceInputCapability -} from './input-workspace' // Regular Input Plugins +export { SkillInputCapability } from "./input-agentskills"; +export { AindexInputCapability } from "./input-aindex"; +export { CommandInputCapability } from "./input-command"; +export { EditorConfigInputCapability } from "./input-editorconfig"; +export { GitExcludeInputCapability } from "./input-git-exclude"; +export { GitIgnoreInputCapability } from "./input-gitignore"; +export { GlobalMemoryInputCapability } from "./input-global-memory"; +export { JetBrainsConfigInputCapability } from "./input-jetbrains-config"; +export { ProjectPromptInputCapability } from "./input-project-prompt"; +export { ReadmeMdInputCapability } from "./input-readme"; +export { RuleInputCapability } from "./input-rule"; +export { AIAgentIgnoreInputCapability } from "./input-shared-ignore"; +export { SubAgentInputCapability } from "./input-subagent"; +export { VSCodeConfigInputCapability } from "./input-vscode-config"; +export { ZedConfigInputCapability } from "./input-zed-config"; +export { WorkspaceInputCapability } from "./input-workspace"; // Regular Input Plugins diff --git a/cli/src/inputs/input-public-config.test.ts b/cli/src/inputs/input-public-config.test.ts index deadfeb6..efec2884 100644 --- a/cli/src/inputs/input-public-config.test.ts +++ b/cli/src/inputs/input-public-config.test.ts @@ -1,239 +1,454 @@ -import type {InputCapabilityContext} from '../plugins/plugin-core' -import * as fs from 'node:fs' -import * as os from 'node:os' -import * as path from 'node:path' -import glob from 'fast-glob' -import {describe, expect, it} from 'vitest' -import {mergeConfig} from '../config' -import {createLogger} from '../plugins/plugin-core' +import type { InputCapabilityContext } from "../plugins/plugin-core"; +import * as fs from "node:fs"; +import * as os from "node:os"; +import * as path from "node:path"; +import glob from "fast-glob"; +import { describe, expect, it } from "vitest"; +import { mergeConfig } from "../config"; +import { createLogger } from "../plugins/plugin-core"; import { AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS, PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, - resolvePublicDefinitionPath -} from '../public-config-paths' -import {EditorConfigInputCapability} from './input-editorconfig' -import {GitExcludeInputCapability} from './input-git-exclude' -import {GitIgnoreInputCapability} from './input-gitignore' -import {JetBrainsConfigInputCapability} from './input-jetbrains-config' -import {AIAgentIgnoreInputCapability} from './input-shared-ignore' -import {VSCodeConfigInputCapability} from './input-vscode-config' + resolvePublicDefinitionPath, +} from "../public-config-paths"; +import { EditorConfigInputCapability } from "./input-editorconfig"; +import { GitExcludeInputCapability } from "./input-git-exclude"; +import { GitIgnoreInputCapability } from "./input-gitignore"; +import { JetBrainsConfigInputCapability } from "./input-jetbrains-config"; +import { AIAgentIgnoreInputCapability } from "./input-shared-ignore"; +import { VSCodeConfigInputCapability } from "./input-vscode-config"; +import { ZedConfigInputCapability } from "./input-zed-config"; interface TestContextOptions { - readonly aindexDir?: string - readonly runtimeCommand?: InputCapabilityContext['runtimeCommand'] + readonly aindexDir?: string; + readonly runtimeCommand?: InputCapabilityContext["runtimeCommand"]; } -function createContext(tempWorkspace: string, options?: TestContextOptions): InputCapabilityContext { +function createContext( + tempWorkspace: string, + options?: TestContextOptions, +): InputCapabilityContext { const mergedOptions = mergeConfig({ workspaceDir: tempWorkspace, - ...options?.aindexDir != null + ...(options?.aindexDir != null ? { aindex: { - dir: options.aindexDir - } + dir: options.aindexDir, + }, } - : {} - }) + : {}), + }); return { - logger: createLogger('PublicConfigInputCapabilityTest', 'error'), + logger: createLogger("PublicConfigInputCapabilityTest", "error"), fs, path, glob, userConfigOptions: mergedOptions, dependencyContext: {}, - ...options?.runtimeCommand != null ? {runtimeCommand: options.runtimeCommand} : {} - } as InputCapabilityContext + ...(options?.runtimeCommand != null + ? { runtimeCommand: options.runtimeCommand } + : {}), + } as InputCapabilityContext; } -function writePublicDefinition(tempWorkspace: string, targetRelativePath: string, content: string): string { - const filePath = resolvePublicDefinitionPath(path.join(tempWorkspace, 'aindex'), targetRelativePath) - fs.mkdirSync(path.dirname(filePath), {recursive: true}) - fs.writeFileSync(filePath, content, 'utf8') - return filePath +function writePublicDefinition( + tempWorkspace: string, + targetRelativePath: string, + content: string, +): string { + const filePath = resolvePublicDefinitionPath( + path.join(tempWorkspace, "aindex"), + targetRelativePath, + ); + fs.mkdirSync(path.dirname(filePath), { recursive: true }); + fs.writeFileSync(filePath, content, "utf8"); + return filePath; } function writePublicProxy(tempWorkspace: string, source: string): string { - return writePublicDefinition(tempWorkspace, 'proxy.ts', source) + return writePublicDefinition(tempWorkspace, "proxy.ts", source); } -describe('public config input plugins', () => { - it('reads config definitions from target-relative public paths', () => { - const tempWorkspace = fs.mkdtempSync(path.join(os.tmpdir(), 'tnmsc-public-config-input-')) +describe("public config input plugins", () => { + it("reads config definitions from target-relative public paths", () => { + const tempWorkspace = fs.mkdtempSync( + path.join(os.tmpdir(), "tnmsc-public-config-input-"), + ); try { - const aindexDir = path.join(tempWorkspace, 'aindex') - const gitIgnorePath = writePublicDefinition(tempWorkspace, PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, 'dist/\n') - const gitExcludePath = writePublicDefinition(tempWorkspace, PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, '.idea/\n') - const editorConfigPath = writePublicDefinition(tempWorkspace, '.editorconfig', 'root = true\n') - writePublicDefinition(tempWorkspace, '.vscode/settings.json', '{"editor.tabSize": 2}\n') - writePublicDefinition(tempWorkspace, '.vscode/extensions.json', '{"recommendations":["foo.bar"]}\n') - writePublicDefinition(tempWorkspace, '.idea/.gitignore', '/workspace.xml\n') - writePublicDefinition(tempWorkspace, '.idea/codeStyles/Project.xml', '\n') - writePublicDefinition(tempWorkspace, '.idea/codeStyles/codeStyleConfig.xml', '\n') - - for (const fileName of AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS) writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`) - - const ctx = createContext(tempWorkspace) - const gitIgnore = new GitIgnoreInputCapability().collect(ctx) - const gitExclude = new GitExcludeInputCapability().collect(ctx) - const editorConfig = new EditorConfigInputCapability().collect(ctx) - const vscode = new VSCodeConfigInputCapability().collect(ctx) - const jetbrains = new JetBrainsConfigInputCapability().collect(ctx) - const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx) - - expect(gitIgnore.globalGitIgnore).toBe('dist/\n') - expect(gitExclude.shadowGitExclude).toBe('.idea/\n') - expect(editorConfig.editorConfigFiles?.[0]?.dir.path).toBe(editorConfigPath) - expect(vscode.vscodeConfigFiles?.map(file => file.dir.path)).toEqual([ - path.join(aindexDir, 'public', '.vscode', 'settings.json'), - path.join(aindexDir, 'public', '.vscode', 'extensions.json') - ]) - expect(jetbrains.jetbrainsConfigFiles?.map(file => file.dir.path)).toEqual([ - path.join(aindexDir, 'public', '.idea', 'codeStyles', 'Project.xml'), - path.join(aindexDir, 'public', '.idea', 'codeStyles', 'codeStyleConfig.xml'), - path.join(aindexDir, 'public', '.idea', '.gitignore') - ]) - expect(ignoreFiles.aiAgentIgnoreConfigFiles?.map(file => file.fileName)).toEqual([ - ...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS - ]) - expect(ignoreFiles.aiAgentIgnoreConfigFiles?.map(file => file.sourcePath)).toEqual( - AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map(fileName => resolvePublicDefinitionPath(aindexDir, fileName)) - ) - expect(gitIgnorePath).toBe(path.join(aindexDir, 'public', '.gitignore')) - expect(gitExcludePath).toBe(path.join(aindexDir, 'public', '.git', 'info', 'exclude')) - } - finally { - fs.rmSync(tempWorkspace, {recursive: true, force: true}) + const aindexDir = path.join(tempWorkspace, "aindex"); + const gitIgnorePath = writePublicDefinition( + tempWorkspace, + PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, + "dist/\n", + ); + const gitExcludePath = writePublicDefinition( + tempWorkspace, + PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, + ".idea/\n", + ); + const editorConfigPath = writePublicDefinition( + tempWorkspace, + ".editorconfig", + "root = true\n", + ); + writePublicDefinition( + tempWorkspace, + ".vscode/settings.json", + '{"editor.tabSize": 2}\n', + ); + writePublicDefinition( + tempWorkspace, + ".vscode/extensions.json", + '{"recommendations":["foo.bar"]}\n', + ); + writePublicDefinition( + tempWorkspace, + ".zed/settings.json", + '{"tab_size": 2}\n', + ); + writePublicDefinition( + tempWorkspace, + ".idea/.gitignore", + "/workspace.xml\n", + ); + writePublicDefinition( + tempWorkspace, + ".idea/codeStyles/Project.xml", + "\n", + ); + writePublicDefinition( + tempWorkspace, + ".idea/codeStyles/codeStyleConfig.xml", + "\n", + ); + + for (const fileName of AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS) + writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`); + + const ctx = createContext(tempWorkspace); + const gitIgnore = new GitIgnoreInputCapability().collect(ctx); + const gitExclude = new GitExcludeInputCapability().collect(ctx); + const editorConfig = new EditorConfigInputCapability().collect(ctx); + const vscode = new VSCodeConfigInputCapability().collect(ctx); + const zed = new ZedConfigInputCapability().collect(ctx); + const jetbrains = new JetBrainsConfigInputCapability().collect(ctx); + const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx); + + expect(gitIgnore.globalGitIgnore).toBe("dist/\n"); + expect(gitExclude.shadowGitExclude).toBe(".idea/\n"); + expect(editorConfig.editorConfigFiles?.[0]?.dir.path).toBe( + editorConfigPath, + ); + expect(vscode.vscodeConfigFiles?.map((file) => file.dir.path)).toEqual([ + path.join(aindexDir, "public", ".vscode", "settings.json"), + path.join(aindexDir, "public", ".vscode", "extensions.json"), + ]); + expect(zed.zedConfigFiles?.map((file) => file.dir.path)).toEqual([ + path.join(aindexDir, "public", ".zed", "settings.json"), + ]); + expect( + jetbrains.jetbrainsConfigFiles?.map((file) => file.dir.path), + ).toEqual([ + path.join(aindexDir, "public", ".idea", "codeStyles", "Project.xml"), + path.join( + aindexDir, + "public", + ".idea", + "codeStyles", + "codeStyleConfig.xml", + ), + path.join(aindexDir, "public", ".idea", ".gitignore"), + ]); + expect( + ignoreFiles.aiAgentIgnoreConfigFiles?.map((file) => file.fileName), + ).toEqual([...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS]); + expect( + ignoreFiles.aiAgentIgnoreConfigFiles?.map((file) => file.sourcePath), + ).toEqual( + AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map((fileName) => + resolvePublicDefinitionPath(aindexDir, fileName), + ), + ); + expect(gitIgnorePath).toBe(path.join(aindexDir, "public", ".gitignore")); + expect(gitExcludePath).toBe( + path.join(aindexDir, "public", ".git", "info", "exclude"), + ); + } finally { + fs.rmSync(tempWorkspace, { recursive: true, force: true }); } - }) + }); - it('does not read legacy definition locations after the hard cut', () => { - const tempWorkspace = fs.mkdtempSync(path.join(os.tmpdir(), 'tnmsc-public-config-legacy-')) + it("does not read legacy definition locations after the hard cut", () => { + const tempWorkspace = fs.mkdtempSync( + path.join(os.tmpdir(), "tnmsc-public-config-legacy-"), + ); try { - const aindexDir = path.join(tempWorkspace, 'aindex') - fs.mkdirSync(path.join(aindexDir, 'public'), {recursive: true}) - fs.mkdirSync(path.join(aindexDir, '.vscode'), {recursive: true}) - fs.mkdirSync(path.join(aindexDir, '.idea', 'codeStyles'), {recursive: true}) - - fs.writeFileSync(path.join(aindexDir, 'public', 'gitignore'), 'legacy gitignore\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, 'public', 'exclude'), 'legacy exclude\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.editorconfig'), 'root = true\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.vscode', 'settings.json'), '{}\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.vscode', 'extensions.json'), '{}\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.idea', '.gitignore'), '/workspace.xml\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.idea', 'codeStyles', 'Project.xml'), '\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.idea', 'codeStyles', 'codeStyleConfig.xml'), '\n', 'utf8') - fs.writeFileSync(path.join(aindexDir, '.cursorignore'), '.cursor/\n', 'utf8') - - const ctx = createContext(tempWorkspace) - - expect(new GitIgnoreInputCapability().collect(ctx).globalGitIgnore).toBeUndefined() - expect(new GitExcludeInputCapability().collect(ctx).shadowGitExclude).toBeUndefined() - expect(new EditorConfigInputCapability().collect(ctx).editorConfigFiles ?? []).toHaveLength(0) - expect(new VSCodeConfigInputCapability().collect(ctx).vscodeConfigFiles ?? []).toHaveLength(0) - expect(new JetBrainsConfigInputCapability().collect(ctx).jetbrainsConfigFiles ?? []).toHaveLength(0) - expect(new AIAgentIgnoreInputCapability().collect(ctx).aiAgentIgnoreConfigFiles ?? []).toHaveLength(0) - } - finally { - fs.rmSync(tempWorkspace, {recursive: true, force: true}) + const aindexDir = path.join(tempWorkspace, "aindex"); + fs.mkdirSync(path.join(aindexDir, "public"), { recursive: true }); + fs.mkdirSync(path.join(aindexDir, ".vscode"), { recursive: true }); + fs.mkdirSync(path.join(aindexDir, ".zed"), { recursive: true }); + fs.mkdirSync(path.join(aindexDir, ".idea", "codeStyles"), { + recursive: true, + }); + + fs.writeFileSync( + path.join(aindexDir, "public", "gitignore"), + "legacy gitignore\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, "public", "exclude"), + "legacy exclude\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".editorconfig"), + "root = true\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".vscode", "settings.json"), + "{}\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".vscode", "extensions.json"), + "{}\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".zed", "settings.json"), + "{}\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".idea", ".gitignore"), + "/workspace.xml\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".idea", "codeStyles", "Project.xml"), + "\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".idea", "codeStyles", "codeStyleConfig.xml"), + "\n", + "utf8", + ); + fs.writeFileSync( + path.join(aindexDir, ".cursorignore"), + ".cursor/\n", + "utf8", + ); + + const ctx = createContext(tempWorkspace); + + expect( + new GitIgnoreInputCapability().collect(ctx).globalGitIgnore, + ).toBeUndefined(); + expect( + new GitExcludeInputCapability().collect(ctx).shadowGitExclude, + ).toBeUndefined(); + expect( + new EditorConfigInputCapability().collect(ctx).editorConfigFiles ?? [], + ).toHaveLength(0); + expect( + new VSCodeConfigInputCapability().collect(ctx).vscodeConfigFiles ?? [], + ).toHaveLength(0); + expect( + new ZedConfigInputCapability().collect(ctx).zedConfigFiles ?? [], + ).toHaveLength(0); + expect( + new JetBrainsConfigInputCapability().collect(ctx) + .jetbrainsConfigFiles ?? [], + ).toHaveLength(0); + expect( + new AIAgentIgnoreInputCapability().collect(ctx) + .aiAgentIgnoreConfigFiles ?? [], + ).toHaveLength(0); + } finally { + fs.rmSync(tempWorkspace, { recursive: true, force: true }); } - }) + }); - it('routes public definitions through public/proxy.ts transparently', () => { - const tempWorkspace = fs.mkdtempSync(path.join(os.tmpdir(), 'tnmsc-public-config-proxy-')) + it("routes public definitions through public/proxy.ts transparently", () => { + const tempWorkspace = fs.mkdtempSync( + path.join(os.tmpdir(), "tnmsc-public-config-proxy-"), + ); try { - const aindexDir = path.join(tempWorkspace, 'aindex') + const aindexDir = path.join(tempWorkspace, "aindex"); writePublicProxy( tempWorkspace, [ - 'export default (logicalPath) => {', + "export default (logicalPath) => {", ' const normalizedPath = logicalPath.replaceAll("\\\\", "/")', ' if (normalizedPath.startsWith(".git/")) return normalizedPath.replace(/^\\.git\\//, "____.git/")', ' if (normalizedPath === ".idea/.gitignore") return ".idea/.gitignore"', ' if (normalizedPath.startsWith(".idea/")) return normalizedPath', ' if (!normalizedPath.startsWith(".")) return normalizedPath', ' return normalizedPath.replace(/^\\.([^/\\\\]+)/, "____$1")', - '}', - '' - ].join('\n') - ) - - const gitIgnorePath = writePublicDefinition(tempWorkspace, PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, 'dist/\n') - const gitExcludePath = writePublicDefinition(tempWorkspace, PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, '.idea/\n') - const editorConfigPath = writePublicDefinition(tempWorkspace, '.editorconfig', 'root = true\n') - const vscodeSettingsPath = writePublicDefinition(tempWorkspace, '.vscode/settings.json', '{"editor.tabSize": 2}\n') - const vscodeExtensionsPath = writePublicDefinition(tempWorkspace, '.vscode/extensions.json', '{"recommendations":["foo.bar"]}\n') - const ideaGitIgnorePath = writePublicDefinition(tempWorkspace, '.idea/.gitignore', '/workspace.xml\n') - const ideaProjectPath = writePublicDefinition(tempWorkspace, '.idea/codeStyles/Project.xml', '\n') - const ideaCodeStyleConfigPath = writePublicDefinition(tempWorkspace, '.idea/codeStyles/codeStyleConfig.xml', '\n') - - for (const fileName of AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS) writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`) - - const ctx = createContext(tempWorkspace) - const gitIgnore = new GitIgnoreInputCapability().collect(ctx) - const gitExclude = new GitExcludeInputCapability().collect(ctx) - const editorConfig = new EditorConfigInputCapability().collect(ctx) - const vscode = new VSCodeConfigInputCapability().collect(ctx) - const jetbrains = new JetBrainsConfigInputCapability().collect(ctx) - const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx) - - expect(gitIgnore.globalGitIgnore).toBe('dist/\n') - expect(gitExclude.shadowGitExclude).toBe('.idea/\n') - expect(editorConfig.editorConfigFiles?.[0]?.dir.path).toBe(editorConfigPath) - expect(vscode.vscodeConfigFiles?.map(file => file.dir.path)).toEqual([ + "}", + "", + ].join("\n"), + ); + + const gitIgnorePath = writePublicDefinition( + tempWorkspace, + PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, + "dist/\n", + ); + const gitExcludePath = writePublicDefinition( + tempWorkspace, + PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, + ".idea/\n", + ); + const editorConfigPath = writePublicDefinition( + tempWorkspace, + ".editorconfig", + "root = true\n", + ); + const vscodeSettingsPath = writePublicDefinition( + tempWorkspace, + ".vscode/settings.json", + '{"editor.tabSize": 2}\n', + ); + const vscodeExtensionsPath = writePublicDefinition( + tempWorkspace, + ".vscode/extensions.json", + '{"recommendations":["foo.bar"]}\n', + ); + const zedSettingsPath = writePublicDefinition( + tempWorkspace, + ".zed/settings.json", + '{"tab_size": 2}\n', + ); + const ideaGitIgnorePath = writePublicDefinition( + tempWorkspace, + ".idea/.gitignore", + "/workspace.xml\n", + ); + const ideaProjectPath = writePublicDefinition( + tempWorkspace, + ".idea/codeStyles/Project.xml", + "\n", + ); + const ideaCodeStyleConfigPath = writePublicDefinition( + tempWorkspace, + ".idea/codeStyles/codeStyleConfig.xml", + "\n", + ); + + for (const fileName of AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS) + writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`); + + const ctx = createContext(tempWorkspace); + const gitIgnore = new GitIgnoreInputCapability().collect(ctx); + const gitExclude = new GitExcludeInputCapability().collect(ctx); + const editorConfig = new EditorConfigInputCapability().collect(ctx); + const vscode = new VSCodeConfigInputCapability().collect(ctx); + const zed = new ZedConfigInputCapability().collect(ctx); + const jetbrains = new JetBrainsConfigInputCapability().collect(ctx); + const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx); + + expect(gitIgnore.globalGitIgnore).toBe("dist/\n"); + expect(gitExclude.shadowGitExclude).toBe(".idea/\n"); + expect(editorConfig.editorConfigFiles?.[0]?.dir.path).toBe( + editorConfigPath, + ); + expect(vscode.vscodeConfigFiles?.map((file) => file.dir.path)).toEqual([ vscodeSettingsPath, - vscodeExtensionsPath - ]) - expect(jetbrains.jetbrainsConfigFiles?.map(file => file.dir.path)).toEqual([ - ideaProjectPath, - ideaCodeStyleConfigPath, - ideaGitIgnorePath - ]) - expect(ignoreFiles.aiAgentIgnoreConfigFiles?.map(file => file.sourcePath)).toEqual( - AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map(fileName => resolvePublicDefinitionPath(aindexDir, fileName)) - ) - expect(gitIgnorePath).toBe(path.join(aindexDir, 'public', '____gitignore')) - expect(gitExcludePath).toBe(path.join(aindexDir, 'public', '____.git', 'info', 'exclude')) - expect(editorConfigPath).toBe(path.join(aindexDir, 'public', '____editorconfig')) - expect(vscodeSettingsPath).toBe(path.join(aindexDir, 'public', '____vscode', 'settings.json')) - expect(vscodeExtensionsPath).toBe(path.join(aindexDir, 'public', '____vscode', 'extensions.json')) - expect(ideaGitIgnorePath).toBe(path.join(aindexDir, 'public', '.idea', '.gitignore')) - expect(ideaProjectPath).toBe(path.join(aindexDir, 'public', '.idea', 'codeStyles', 'Project.xml')) - expect(ideaCodeStyleConfigPath).toBe(path.join(aindexDir, 'public', '.idea', 'codeStyles', 'codeStyleConfig.xml')) - } - finally { - fs.rmSync(tempWorkspace, {recursive: true, force: true}) + vscodeExtensionsPath, + ]); + expect(zed.zedConfigFiles?.map((file) => file.dir.path)).toEqual([ + zedSettingsPath, + ]); + expect( + jetbrains.jetbrainsConfigFiles?.map((file) => file.dir.path), + ).toEqual([ideaProjectPath, ideaCodeStyleConfigPath, ideaGitIgnorePath]); + expect( + ignoreFiles.aiAgentIgnoreConfigFiles?.map((file) => file.sourcePath), + ).toEqual( + AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map((fileName) => + resolvePublicDefinitionPath(aindexDir, fileName), + ), + ); + expect(gitIgnorePath).toBe( + path.join(aindexDir, "public", "____gitignore"), + ); + expect(gitExcludePath).toBe( + path.join(aindexDir, "public", "____.git", "info", "exclude"), + ); + expect(editorConfigPath).toBe( + path.join(aindexDir, "public", "____editorconfig"), + ); + expect(vscodeSettingsPath).toBe( + path.join(aindexDir, "public", "____vscode", "settings.json"), + ); + expect(vscodeExtensionsPath).toBe( + path.join(aindexDir, "public", "____vscode", "extensions.json"), + ); + expect(zedSettingsPath).toBe( + path.join(aindexDir, "public", "____zed", "settings.json"), + ); + expect(ideaGitIgnorePath).toBe( + path.join(aindexDir, "public", ".idea", ".gitignore"), + ); + expect(ideaProjectPath).toBe( + path.join(aindexDir, "public", ".idea", "codeStyles", "Project.xml"), + ); + expect(ideaCodeStyleConfigPath).toBe( + path.join( + aindexDir, + "public", + ".idea", + "codeStyles", + "codeStyleConfig.xml", + ), + ); + } finally { + fs.rmSync(tempWorkspace, { recursive: true, force: true }); } - }) + }); - it('passes the configured workspace root into public/proxy.ts', () => { - const tempWorkspace = fs.mkdtempSync(path.join(os.tmpdir(), 'tnmsc-public-config-nested-aindex-')) + it("passes the configured workspace root into public/proxy.ts", () => { + const tempWorkspace = fs.mkdtempSync( + path.join(os.tmpdir(), "tnmsc-public-config-nested-aindex-"), + ); try { - const aindexDir = path.join(tempWorkspace, 'config', 'aindex') - const publicDir = path.join(aindexDir, 'public') - fs.mkdirSync(path.join(publicDir, 'expected'), {recursive: true}) - fs.writeFileSync(path.join(publicDir, 'proxy.ts'), [ - 'export default (_logicalPath, ctx) => {', - ` return ctx.workspaceDir === ${JSON.stringify(tempWorkspace)} && ctx.cwd === ${JSON.stringify(tempWorkspace)}`, - ' ? "expected/.gitignore"', - ' : "unexpected/.gitignore"', - '}', - '' - ].join('\n'), 'utf8') - fs.writeFileSync(path.join(publicDir, 'expected', '.gitignore'), 'dist/\n', 'utf8') - - const ctx = createContext(tempWorkspace, {aindexDir: 'config/aindex'}) - const gitIgnore = new GitIgnoreInputCapability().collect(ctx) - - expect(gitIgnore.globalGitIgnore).toBe('dist/\n') - } - finally { - fs.rmSync(tempWorkspace, {recursive: true, force: true}) + const aindexDir = path.join(tempWorkspace, "config", "aindex"); + const publicDir = path.join(aindexDir, "public"); + fs.mkdirSync(path.join(publicDir, "expected"), { recursive: true }); + fs.writeFileSync( + path.join(publicDir, "proxy.ts"), + [ + "export default (_logicalPath, ctx) => {", + ` return ctx.workspaceDir === ${JSON.stringify(tempWorkspace)} && ctx.cwd === ${JSON.stringify(tempWorkspace)}`, + ' ? "expected/.gitignore"', + ' : "unexpected/.gitignore"', + "}", + "", + ].join("\n"), + "utf8", + ); + fs.writeFileSync( + path.join(publicDir, "expected", ".gitignore"), + "dist/\n", + "utf8", + ); + + const ctx = createContext(tempWorkspace, { aindexDir: "config/aindex" }); + const gitIgnore = new GitIgnoreInputCapability().collect(ctx); + + expect(gitIgnore.globalGitIgnore).toBe("dist/\n"); + } finally { + fs.rmSync(tempWorkspace, { recursive: true, force: true }); } - }) -}) + }); +}); diff --git a/cli/src/inputs/input-zed-config.ts b/cli/src/inputs/input-zed-config.ts new file mode 100644 index 00000000..32642374 --- /dev/null +++ b/cli/src/inputs/input-zed-config.ts @@ -0,0 +1,23 @@ +import type {InputCapabilityContext, InputCollectedContext, ProjectIDEConfigFile} from '../plugins/plugin-core' +import {AbstractInputCapability, IDEKind} from '../plugins/plugin-core' +import {readPublicIdeConfigDefinitionFile} from '../public-config-paths' + +export class ZedConfigInputCapability extends AbstractInputCapability { + constructor() { + super('ZedConfigInputCapability') + } + + collect(ctx: InputCapabilityContext): Partial { + const {userConfigOptions, fs} = ctx + const {workspaceDir, aindexDir} = this.resolveBasePaths(userConfigOptions) + + const zedConfigFiles: ProjectIDEConfigFile[] = [] + const file = readPublicIdeConfigDefinitionFile(IDEKind.Zed, '.zed/settings.json', aindexDir, fs, { + command: ctx.runtimeCommand, + workspaceDir + }) + if (file != null) zedConfigFiles.push(file) + + return {zedConfigFiles} + } +} diff --git a/cli/src/inputs/runtime.ts b/cli/src/inputs/runtime.ts index 25da33a7..bdfdcca0 100644 --- a/cli/src/inputs/runtime.ts +++ b/cli/src/inputs/runtime.ts @@ -28,6 +28,7 @@ import { SkillInputCapability, SubAgentInputCapability, VSCodeConfigInputCapability, + ZedConfigInputCapability, WorkspaceInputCapability } from '@/inputs' import {extractUserArgs, parseArgs} from '@/pipeline/CliArgumentParser' @@ -56,6 +57,7 @@ function createBuiltinInputReaderCapabilities(): InputCapability[] { new WorkspaceInputCapability(), new AindexInputCapability(), new VSCodeConfigInputCapability(), + new ZedConfigInputCapability(), new JetBrainsConfigInputCapability(), new EditorConfigInputCapability(), new SkillInputCapability(), diff --git a/cli/src/pipeline/ContextMerger.ts b/cli/src/pipeline/ContextMerger.ts index ecc485f5..4093cd9c 100644 --- a/cli/src/pipeline/ContextMerger.ts +++ b/cli/src/pipeline/ContextMerger.ts @@ -3,19 +3,19 @@ * Handles merging of partial InputCollectedContext objects */ -import type {InputCollectedContext, Workspace} from '../plugins/plugin-core' +import type { InputCollectedContext, Workspace } from "../plugins/plugin-core"; /** * Merge strategy types for context fields */ -type MergeStrategy = 'concat' | 'override' | 'mergeProjects' +type MergeStrategy = "concat" | "override" | "mergeProjects"; /** * Field merge configuration */ interface FieldConfig { - readonly strategy: MergeStrategy - readonly getter: (ctx: Partial) => T | undefined + readonly strategy: MergeStrategy; + readonly getter: (ctx: Partial) => T | undefined; } /** @@ -23,92 +23,107 @@ interface FieldConfig { */ const FIELD_CONFIGS: Record> = { workspace: { - strategy: 'mergeProjects', - getter: ctx => ctx.workspace + strategy: "mergeProjects", + getter: (ctx) => ctx.workspace, }, vscodeConfigFiles: { - strategy: 'concat', - getter: ctx => ctx.vscodeConfigFiles + strategy: "concat", + getter: (ctx) => ctx.vscodeConfigFiles, + }, + zedConfigFiles: { + strategy: "concat", + getter: (ctx) => ctx.zedConfigFiles, }, jetbrainsConfigFiles: { - strategy: 'concat', - getter: ctx => ctx.jetbrainsConfigFiles + strategy: "concat", + getter: (ctx) => ctx.jetbrainsConfigFiles, }, editorConfigFiles: { - strategy: 'concat', - getter: ctx => ctx.editorConfigFiles + strategy: "concat", + getter: (ctx) => ctx.editorConfigFiles, }, commands: { - strategy: 'concat', - getter: ctx => ctx.commands + strategy: "concat", + getter: (ctx) => ctx.commands, }, subAgents: { - strategy: 'concat', - getter: ctx => ctx.subAgents + strategy: "concat", + getter: (ctx) => ctx.subAgents, }, skills: { - strategy: 'concat', - getter: ctx => ctx.skills + strategy: "concat", + getter: (ctx) => ctx.skills, }, rules: { - strategy: 'concat', - getter: ctx => ctx.rules + strategy: "concat", + getter: (ctx) => ctx.rules, }, aiAgentIgnoreConfigFiles: { - strategy: 'concat', - getter: ctx => ctx.aiAgentIgnoreConfigFiles + strategy: "concat", + getter: (ctx) => ctx.aiAgentIgnoreConfigFiles, }, readmePrompts: { - strategy: 'concat', - getter: ctx => ctx.readmePrompts + strategy: "concat", + getter: (ctx) => ctx.readmePrompts, }, - globalMemory: { // Override fields (last one wins) - strategy: 'override', - getter: ctx => ctx.globalMemory + globalMemory: { + // Override fields (last one wins) + strategy: "override", + getter: (ctx) => ctx.globalMemory, }, aindexDir: { - strategy: 'override', - getter: ctx => ctx.aindexDir + strategy: "override", + getter: (ctx) => ctx.aindexDir, }, globalGitIgnore: { - strategy: 'override', - getter: ctx => ctx.globalGitIgnore + strategy: "override", + getter: (ctx) => ctx.globalGitIgnore, }, shadowGitExclude: { - strategy: 'override', - getter: ctx => ctx.shadowGitExclude - } -} as const + strategy: "override", + getter: (ctx) => ctx.shadowGitExclude, + }, +} as const; /** * Merge two arrays by concatenating them */ -function mergeArrays(base: readonly T[] | undefined, addition: readonly T[] | undefined): readonly T[] { - if (addition == null) return base ?? [] - if (base == null) return addition - return [...base, ...addition] +function mergeArrays( + base: readonly T[] | undefined, + addition: readonly T[] | undefined, +): readonly T[] { + if (addition == null) return base ?? []; + if (base == null) return addition; + return [...base, ...addition]; } /** * Merge workspace projects. Later projects with the same name replace earlier ones. */ -function mergeWorkspaceProjects(base: Workspace, addition: Workspace): Workspace { - const projectMap = new Map() - for (const project of base.projects) projectMap.set(project.name, project) - for (const project of addition.projects) projectMap.set(project.name, project) +function mergeWorkspaceProjects( + base: Workspace, + addition: Workspace, +): Workspace { + const projectMap = new Map(); + for (const project of base.projects) projectMap.set(project.name, project); + for (const project of addition.projects) + projectMap.set(project.name, project); return { directory: addition.directory ?? base.directory, - projects: [...projectMap.values()] - } + projects: [...projectMap.values()], + }; } /** * Merge workspace fields */ -function mergeWorkspace(base: Workspace | undefined, addition: Workspace | undefined): Workspace | undefined { - if (addition == null) return base - if (base == null) return addition - return mergeWorkspaceProjects(base, addition) +function mergeWorkspace( + base: Workspace | undefined, + addition: Workspace | undefined, +): Workspace | undefined { + if (addition == null) return base; + if (base == null) return addition; + return mergeWorkspaceProjects(base, addition); } /** @@ -117,13 +132,23 @@ function mergeWorkspace(base: Workspace | undefined, addition: Workspace | undef function mergeField( base: T | undefined, addition: T | undefined, - strategy: MergeStrategy + strategy: MergeStrategy, ): T | undefined { switch (strategy) { - case 'concat': return mergeArrays(base as unknown[], addition as unknown[]) as unknown as T - case 'override': return addition ?? base - case 'mergeProjects': return mergeWorkspace(base as unknown as Workspace, addition as unknown as Workspace) as unknown as T - default: return addition ?? base + case "concat": + return mergeArrays( + base as unknown[], + addition as unknown[], + ) as unknown as T; + case "override": + return addition ?? base; + case "mergeProjects": + return mergeWorkspace( + base as unknown as Workspace, + addition as unknown as Workspace, + ) as unknown as T; + default: + return addition ?? base; } } @@ -133,39 +158,43 @@ function mergeField( */ export function mergeContexts( base: Partial, - addition: Partial + addition: Partial, ): Partial { - const result: Record = {} + const result: Record = {}; - for (const [fieldName, config] of Object.entries(FIELD_CONFIGS)) { // Process each configured field - const baseValue = config.getter(base) - const additionValue = config.getter(addition) - const mergedValue = mergeField(baseValue, additionValue, config.strategy) - if (mergedValue != null) result[fieldName] = mergedValue + for (const [fieldName, config] of Object.entries(FIELD_CONFIGS)) { + // Process each configured field + const baseValue = config.getter(base); + const additionValue = config.getter(addition); + const mergedValue = mergeField(baseValue, additionValue, config.strategy); + if (mergedValue != null) result[fieldName] = mergedValue; } - return result as Partial + return result as Partial; } /** * Build dependency context from plugin outputs */ export function buildDependencyContext( - plugin: {dependsOn?: readonly string[]}, + plugin: { dependsOn?: readonly string[] }, outputsByPlugin: Map>, - mergeFn: (base: Partial, addition: Partial) => Partial + mergeFn: ( + base: Partial, + addition: Partial, + ) => Partial, ): Partial { - const deps = plugin.dependsOn ?? [] - if (deps.length === 0) return {} + const deps = plugin.dependsOn ?? []; + if (deps.length === 0) return {}; - const visited = new Set() - let merged: Partial = {} + const visited = new Set(); + let merged: Partial = {}; for (const depName of deps) { - if (visited.has(depName)) continue - visited.add(depName) - const depOutput = outputsByPlugin.get(depName) - if (depOutput != null) merged = mergeFn(merged, depOutput) + if (visited.has(depName)) continue; + visited.add(depName); + const depOutput = outputsByPlugin.get(depName); + if (depOutput != null) merged = mergeFn(merged, depOutput); } - return merged + return merged; } diff --git a/cli/src/plugin.config.ts b/cli/src/plugin.config.ts index d40d7204..bd961a57 100644 --- a/cli/src/plugin.config.ts +++ b/cli/src/plugin.config.ts @@ -1,28 +1,29 @@ -import type {PipelineConfig} from '@/config' -import process from 'node:process' -import {GenericSkillsOutputPlugin} from '@truenine/plugin-agentskills-compact' -import {AgentsOutputPlugin} from '@truenine/plugin-agentsmd' -import {ClaudeCodeCLIOutputPlugin} from '@truenine/plugin-claude-code-cli' -import {CursorOutputPlugin} from '@truenine/plugin-cursor' -import {DroidCLIOutputPlugin} from '@truenine/plugin-droid-cli' -import {EditorConfigOutputPlugin} from '@truenine/plugin-editorconfig' -import {GeminiCLIOutputPlugin} from '@truenine/plugin-gemini-cli' -import {GitExcludeOutputPlugin} from '@truenine/plugin-git-exclude' -import {JetBrainsAIAssistantCodexOutputPlugin} from '@truenine/plugin-jetbrains-ai-codex' -import {JetBrainsIDECodeStyleConfigOutputPlugin} from '@truenine/plugin-jetbrains-codestyle' -import {CodexCLIOutputPlugin} from '@truenine/plugin-openai-codex-cli' -import {OpencodeCLIOutputPlugin} from '@truenine/plugin-opencode-cli' -import {QoderIDEPluginOutputPlugin} from '@truenine/plugin-qoder-ide' -import {ReadmeMdConfigFileOutputPlugin} from '@truenine/plugin-readme' -import {TraeIDEOutputPlugin} from '@truenine/plugin-trae-ide' -import {VisualStudioCodeIDEConfigOutputPlugin} from '@truenine/plugin-vscode' -import {WarpIDEOutputPlugin} from '@truenine/plugin-warp-ide' -import {WindsurfOutputPlugin} from '@truenine/plugin-windsurf' -import {defineConfig} from '@/config' -import {TraeCNIDEOutputPlugin} from '@/plugins/plugin-trae-cn-ide' +import type { PipelineConfig } from "@/config"; +import process from "node:process"; +import { GenericSkillsOutputPlugin } from "@truenine/plugin-agentskills-compact"; +import { AgentsOutputPlugin } from "@truenine/plugin-agentsmd"; +import { ClaudeCodeCLIOutputPlugin } from "@truenine/plugin-claude-code-cli"; +import { CursorOutputPlugin } from "@truenine/plugin-cursor"; +import { DroidCLIOutputPlugin } from "@truenine/plugin-droid-cli"; +import { EditorConfigOutputPlugin } from "@truenine/plugin-editorconfig"; +import { GeminiCLIOutputPlugin } from "@truenine/plugin-gemini-cli"; +import { GitExcludeOutputPlugin } from "@truenine/plugin-git-exclude"; +import { JetBrainsAIAssistantCodexOutputPlugin } from "@truenine/plugin-jetbrains-ai-codex"; +import { JetBrainsIDECodeStyleConfigOutputPlugin } from "@truenine/plugin-jetbrains-codestyle"; +import { CodexCLIOutputPlugin } from "@truenine/plugin-openai-codex-cli"; +import { OpencodeCLIOutputPlugin } from "@truenine/plugin-opencode-cli"; +import { QoderIDEPluginOutputPlugin } from "@truenine/plugin-qoder-ide"; +import { ReadmeMdConfigFileOutputPlugin } from "@truenine/plugin-readme"; +import { TraeIDEOutputPlugin } from "@truenine/plugin-trae-ide"; +import { VisualStudioCodeIDEConfigOutputPlugin } from "@truenine/plugin-vscode"; +import { WarpIDEOutputPlugin } from "@truenine/plugin-warp-ide"; +import { WindsurfOutputPlugin } from "@truenine/plugin-windsurf"; +import { ZedIDEConfigOutputPlugin } from "@truenine/plugin-zed"; +import { defineConfig } from "@/config"; +import { TraeCNIDEOutputPlugin } from "@/plugins/plugin-trae-cn-ide"; export async function createDefaultPluginConfig( - pipelineArgs: readonly string[] = process.argv + pipelineArgs: readonly string[] = process.argv, ): Promise { return defineConfig({ pipelineArgs, @@ -47,10 +48,11 @@ export async function createDefaultPluginConfig( new JetBrainsIDECodeStyleConfigOutputPlugin(), new EditorConfigOutputPlugin(), new VisualStudioCodeIDEConfigOutputPlugin(), - new ReadmeMdConfigFileOutputPlugin() - ] - } - }) + new ZedIDEConfigOutputPlugin(), + new ReadmeMdConfigFileOutputPlugin(), + ], + }, + }); } -export default createDefaultPluginConfig +export default createDefaultPluginConfig; diff --git a/cli/src/plugins/ZedIDEConfigOutputPlugin.ts b/cli/src/plugins/ZedIDEConfigOutputPlugin.ts new file mode 100644 index 00000000..2da8d739 --- /dev/null +++ b/cli/src/plugins/ZedIDEConfigOutputPlugin.ts @@ -0,0 +1,64 @@ +import type { + OutputFileDeclaration, + OutputWriteContext +} from './plugin-core' +import {AbstractOutputPlugin, IDEKind} from './plugin-core' + +const ZED_DIR = '.zed' + +export class ZedIDEConfigOutputPlugin extends AbstractOutputPlugin { + constructor() { + super('ZedIDEConfigOutputPlugin', { + cleanup: { + delete: { + project: { + files: ['.zed/settings.json'] + } + } + }, + capabilities: {} + }) + } + + override async declareOutputFiles(ctx: OutputWriteContext): Promise { + const declarations: OutputFileDeclaration[] = [] + const {projects} = ctx.collectedOutputContext.workspace + const zedConfigs = ctx.collectedOutputContext.zedConfigFiles ?? [] + + for (const project of projects) { + const projectDir = project.dirFromWorkspacePath + if (projectDir == null) continue + + for (const config of zedConfigs) { + const targetRelativePath = this.getTargetRelativePath(config) + declarations.push({ + path: this.resolvePath(projectDir.basePath, projectDir.path, targetRelativePath), + scope: 'project', + source: {content: config.content} + }) + } + } + + return declarations + } + + override async convertContent( + declaration: OutputFileDeclaration, + ctx: OutputWriteContext + ): Promise { + void ctx + const source = declaration.source as {content?: string} + if (source.content == null) throw new Error(`Unsupported declaration source for ${this.name}`) + return source.content + } + + private getTargetRelativePath(config: {type: IDEKind, dir: {path: string}}): string { + const sourcePath = config.dir.path + + if (config.type !== IDEKind.Zed) return this.basename(sourcePath) + + const zedIndex = sourcePath.indexOf(ZED_DIR) + if (zedIndex !== -1) return sourcePath.slice(Math.max(0, zedIndex)) + return this.joinPath(ZED_DIR, 'settings.json') + } +} diff --git a/cli/src/plugins/ide-config-output.test.ts b/cli/src/plugins/ide-config-output.test.ts index a7183916..753fffec 100644 --- a/cli/src/plugins/ide-config-output.test.ts +++ b/cli/src/plugins/ide-config-output.test.ts @@ -1,13 +1,22 @@ -import type {OutputWriteContext, Project, ProjectIDEConfigFile} from './plugin-core' -import * as fs from 'node:fs' -import * as path from 'node:path' -import {describe, expect, it} from 'vitest' -import {EditorConfigOutputPlugin} from './EditorConfigOutputPlugin' -import {JetBrainsIDECodeStyleConfigOutputPlugin} from './JetBrainsIDECodeStyleConfigOutputPlugin' -import {createLogger, FilePathKind, IDEKind} from './plugin-core' -import {VisualStudioCodeIDEConfigOutputPlugin} from './VisualStudioCodeIDEConfigOutputPlugin' +import type { + OutputWriteContext, + Project, + ProjectIDEConfigFile, +} from "./plugin-core"; +import * as fs from "node:fs"; +import * as path from "node:path"; +import { describe, expect, it } from "vitest"; +import { EditorConfigOutputPlugin } from "./EditorConfigOutputPlugin"; +import { JetBrainsIDECodeStyleConfigOutputPlugin } from "./JetBrainsIDECodeStyleConfigOutputPlugin"; +import { createLogger, FilePathKind, IDEKind } from "./plugin-core"; +import { VisualStudioCodeIDEConfigOutputPlugin } from "./VisualStudioCodeIDEConfigOutputPlugin"; +import { ZedIDEConfigOutputPlugin } from "./ZedIDEConfigOutputPlugin"; -function createProject(workspaceBase: string, name: string, promptSource = false): Project { +function createProject( + workspaceBase: string, + name: string, + promptSource = false, +): Project { return { name, isPromptSourceProject: promptSource, @@ -16,12 +25,16 @@ function createProject(workspaceBase: string, name: string, promptSource = false path: name, basePath: workspaceBase, getDirectoryName: () => name, - getAbsolutePath: () => path.join(workspaceBase, name) - } - } as Project + getAbsolutePath: () => path.join(workspaceBase, name), + }, + } as Project; } -function createConfigFile(type: IDEKind, sourcePath: string, content: string): ProjectIDEConfigFile { +function createConfigFile( + type: IDEKind, + sourcePath: string, + content: string, +): ProjectIDEConfigFile { return { type, content, @@ -30,14 +43,14 @@ function createConfigFile(type: IDEKind, sourcePath: string, content: string): P dir: { pathKind: FilePathKind.Absolute, path: sourcePath, - getDirectoryName: () => path.basename(sourcePath) - } - } as ProjectIDEConfigFile + getDirectoryName: () => path.basename(sourcePath), + }, + } as ProjectIDEConfigFile; } function createWriteContext(workspaceBase: string): OutputWriteContext { return { - logger: createLogger('IdeConfigOutputPluginTest', 'error'), + logger: createLogger("IdeConfigOutputPluginTest", "error"), fs, path, glob: {} as never, @@ -47,71 +60,179 @@ function createWriteContext(workspaceBase: string): OutputWriteContext { directory: { pathKind: FilePathKind.Absolute, path: workspaceBase, - getDirectoryName: () => path.basename(workspaceBase) + getDirectoryName: () => path.basename(workspaceBase), }, projects: [ - createProject(workspaceBase, 'aindex', true), - createProject(workspaceBase, 'memory-sync') - ] + createProject(workspaceBase, "aindex", true), + createProject(workspaceBase, "memory-sync"), + ], }, editorConfigFiles: [ - createConfigFile(IDEKind.EditorConfig, path.join(workspaceBase, 'aindex', 'public', '.editorconfig'), 'root = true\n') + createConfigFile( + IDEKind.EditorConfig, + path.join(workspaceBase, "aindex", "public", ".editorconfig"), + "root = true\n", + ), ], vscodeConfigFiles: [ - createConfigFile(IDEKind.VSCode, path.join(workspaceBase, 'aindex', 'public', '.vscode', 'settings.json'), '{}\n'), - createConfigFile(IDEKind.VSCode, path.join(workspaceBase, 'aindex', 'public', '.vscode', 'extensions.json'), '{}\n') + createConfigFile( + IDEKind.VSCode, + path.join( + workspaceBase, + "aindex", + "public", + ".vscode", + "settings.json", + ), + "{}\n", + ), + createConfigFile( + IDEKind.VSCode, + path.join( + workspaceBase, + "aindex", + "public", + ".vscode", + "extensions.json", + ), + "{}\n", + ), + ], + zedConfigFiles: [ + createConfigFile( + IDEKind.Zed, + path.join(workspaceBase, "aindex", "public", ".zed", "settings.json"), + '{"tab_size": 2}\n', + ), ], jetbrainsConfigFiles: [ - createConfigFile(IDEKind.IntellijIDEA, path.join(workspaceBase, 'aindex', 'public', '.idea', '.gitignore'), '/workspace.xml\n'), - createConfigFile(IDEKind.IntellijIDEA, path.join(workspaceBase, 'aindex', 'public', '.idea', 'codeStyles', 'Project.xml'), '\n'), - createConfigFile(IDEKind.IntellijIDEA, path.join(workspaceBase, 'aindex', 'public', '.idea', 'codeStyles', 'codeStyleConfig.xml'), '\n') - ] - } - } as OutputWriteContext + createConfigFile( + IDEKind.IntellijIDEA, + path.join(workspaceBase, "aindex", "public", ".idea", ".gitignore"), + "/workspace.xml\n", + ), + createConfigFile( + IDEKind.IntellijIDEA, + path.join( + workspaceBase, + "aindex", + "public", + ".idea", + "codeStyles", + "Project.xml", + ), + "\n", + ), + createConfigFile( + IDEKind.IntellijIDEA, + path.join( + workspaceBase, + "aindex", + "public", + ".idea", + "codeStyles", + "codeStyleConfig.xml", + ), + "\n", + ), + ], + }, + } as OutputWriteContext; } -describe('ide config output plugins', () => { - it('includes the prompt source project for editorconfig output', async () => { - const workspaceBase = path.resolve('tmp/ide-output-editorconfig') - const plugin = new EditorConfigOutputPlugin() - const declarations = await plugin.declareOutputFiles(createWriteContext(workspaceBase)) - const paths = declarations.map(declaration => declaration.path) +describe("ide config output plugins", () => { + it("includes the prompt source project for editorconfig output", async () => { + const workspaceBase = path.resolve("tmp/ide-output-editorconfig"); + const plugin = new EditorConfigOutputPlugin(); + const declarations = await plugin.declareOutputFiles( + createWriteContext(workspaceBase), + ); + const paths = declarations.map((declaration) => declaration.path); expect(paths).toEqual([ - path.join(workspaceBase, 'aindex', '.editorconfig'), - path.join(workspaceBase, 'memory-sync', '.editorconfig') - ]) - }) + path.join(workspaceBase, "aindex", ".editorconfig"), + path.join(workspaceBase, "memory-sync", ".editorconfig"), + ]); + }); - it('includes the prompt source project for vscode output', async () => { - const workspaceBase = path.resolve('tmp/ide-output-vscode') - const plugin = new VisualStudioCodeIDEConfigOutputPlugin() - const declarations = await plugin.declareOutputFiles(createWriteContext(workspaceBase)) - const paths = declarations.map(declaration => declaration.path) + it("includes the prompt source project for vscode output", async () => { + const workspaceBase = path.resolve("tmp/ide-output-vscode"); + const plugin = new VisualStudioCodeIDEConfigOutputPlugin(); + const declarations = await plugin.declareOutputFiles( + createWriteContext(workspaceBase), + ); + const paths = declarations.map((declaration) => declaration.path); expect(paths).toEqual([ - path.join(workspaceBase, 'aindex', '.vscode', 'settings.json'), - path.join(workspaceBase, 'aindex', '.vscode', 'extensions.json'), - path.join(workspaceBase, 'memory-sync', '.vscode', 'settings.json'), - path.join(workspaceBase, 'memory-sync', '.vscode', 'extensions.json') - ]) - }) + path.join(workspaceBase, "aindex", ".vscode", "settings.json"), + path.join(workspaceBase, "aindex", ".vscode", "extensions.json"), + path.join(workspaceBase, "memory-sync", ".vscode", "settings.json"), + path.join(workspaceBase, "memory-sync", ".vscode", "extensions.json"), + ]); + }); + + it("includes the prompt source project for zed output and cleanup", async () => { + const workspaceBase = path.resolve("tmp/ide-output-zed"); + const plugin = new ZedIDEConfigOutputPlugin(); + const ctx = createWriteContext(workspaceBase); + const declarations = await plugin.declareOutputFiles(ctx); + const cleanup = await plugin.declareCleanupPaths(ctx); + + expect(declarations.map((declaration) => declaration.path)).toEqual([ + path.join(workspaceBase, "aindex", ".zed", "settings.json"), + path.join(workspaceBase, "memory-sync", ".zed", "settings.json"), + ]); + expect(cleanup.delete).toEqual([ + { + kind: "file", + label: "delete.project", + path: path.join(workspaceBase, "aindex", ".zed", "settings.json"), + scope: "project", + }, + { + kind: "file", + label: "delete.project", + path: path.join(workspaceBase, "memory-sync", ".zed", "settings.json"), + scope: "project", + }, + ]); + }); - it('includes the prompt source project for jetbrains output', async () => { - const workspaceBase = path.resolve('tmp/ide-output-jetbrains') - const plugin = new JetBrainsIDECodeStyleConfigOutputPlugin() - const declarations = await plugin.declareOutputFiles(createWriteContext(workspaceBase)) - const paths = declarations.map(declaration => declaration.path) + it("includes the prompt source project for jetbrains output", async () => { + const workspaceBase = path.resolve("tmp/ide-output-jetbrains"); + const plugin = new JetBrainsIDECodeStyleConfigOutputPlugin(); + const declarations = await plugin.declareOutputFiles( + createWriteContext(workspaceBase), + ); + const paths = declarations.map((declaration) => declaration.path); expect(paths).toEqual([ - path.join(workspaceBase, 'aindex', '.idea', '.gitignore'), - path.join(workspaceBase, 'aindex', '.idea', 'codeStyles', 'Project.xml'), - path.join(workspaceBase, 'aindex', '.idea', 'codeStyles', 'codeStyleConfig.xml'), - path.join(workspaceBase, 'aindex', '.editorconfig'), - path.join(workspaceBase, 'memory-sync', '.idea', '.gitignore'), - path.join(workspaceBase, 'memory-sync', '.idea', 'codeStyles', 'Project.xml'), - path.join(workspaceBase, 'memory-sync', '.idea', 'codeStyles', 'codeStyleConfig.xml'), - path.join(workspaceBase, 'memory-sync', '.editorconfig') - ]) - }) -}) + path.join(workspaceBase, "aindex", ".idea", ".gitignore"), + path.join(workspaceBase, "aindex", ".idea", "codeStyles", "Project.xml"), + path.join( + workspaceBase, + "aindex", + ".idea", + "codeStyles", + "codeStyleConfig.xml", + ), + path.join(workspaceBase, "aindex", ".editorconfig"), + path.join(workspaceBase, "memory-sync", ".idea", ".gitignore"), + path.join( + workspaceBase, + "memory-sync", + ".idea", + "codeStyles", + "Project.xml", + ), + path.join( + workspaceBase, + "memory-sync", + ".idea", + "codeStyles", + "codeStyleConfig.xml", + ), + path.join(workspaceBase, "memory-sync", ".editorconfig"), + ]); + }); +}); diff --git a/cli/src/plugins/plugin-core/AindexTypes.ts b/cli/src/plugins/plugin-core/AindexTypes.ts index 6266fd5c..71435a4a 100644 --- a/cli/src/plugins/plugin-core/AindexTypes.ts +++ b/cli/src/plugins/plugin-core/AindexTypes.ts @@ -8,11 +8,11 @@ */ export interface AindexFileEntry { /** File name (e.g., 'GLOBAL.md') */ - readonly name: string + readonly name: string; /** Whether this file is required */ - readonly required: boolean + readonly required: boolean; /** File description */ - readonly description?: string + readonly description?: string; } /** @@ -20,15 +20,15 @@ export interface AindexFileEntry { */ export interface AindexDirectoryEntry { /** Directory name (e.g., 'skills') */ - readonly name: string + readonly name: string; /** Whether this directory is required */ - readonly required: boolean + readonly required: boolean; /** Directory description */ - readonly description?: string + readonly description?: string; /** Nested directories */ - readonly directories?: readonly AindexDirectoryEntry[] + readonly directories?: readonly AindexDirectoryEntry[]; /** Files in this directory */ - readonly files?: readonly AindexFileEntry[] + readonly files?: readonly AindexFileEntry[]; } /** @@ -37,93 +37,96 @@ export interface AindexDirectoryEntry { export interface AindexDirectory { /** Source directories (before compilation) */ readonly src: { - readonly skills: AindexDirectoryEntry - readonly commands: AindexDirectoryEntry - readonly agents: AindexDirectoryEntry - readonly rules: AindexDirectoryEntry - readonly globalMemoryFile: AindexFileEntry - readonly workspaceMemoryFile: AindexFileEntry - } + readonly skills: AindexDirectoryEntry; + readonly commands: AindexDirectoryEntry; + readonly agents: AindexDirectoryEntry; + readonly rules: AindexDirectoryEntry; + readonly globalMemoryFile: AindexFileEntry; + readonly workspaceMemoryFile: AindexFileEntry; + }; /** Distribution directories (after compilation) */ readonly dist: { - readonly skills: AindexDirectoryEntry - readonly commands: AindexDirectoryEntry - readonly agents: AindexDirectoryEntry - readonly rules: AindexDirectoryEntry - readonly app: AindexDirectoryEntry - readonly globalMemoryFile: AindexFileEntry - readonly workspaceMemoryFile: AindexFileEntry - } + readonly skills: AindexDirectoryEntry; + readonly commands: AindexDirectoryEntry; + readonly agents: AindexDirectoryEntry; + readonly rules: AindexDirectoryEntry; + readonly app: AindexDirectoryEntry; + readonly globalMemoryFile: AindexFileEntry; + readonly workspaceMemoryFile: AindexFileEntry; + }; /** App directory (project-specific prompts source, standalone at root) */ - readonly app: AindexDirectoryEntry + readonly app: AindexDirectoryEntry; /** IDE configuration directories */ readonly ide: { - readonly idea: AindexDirectoryEntry - readonly ideaCodeStyles: AindexDirectoryEntry - readonly vscode: AindexDirectoryEntry - } + readonly idea: AindexDirectoryEntry; + readonly ideaCodeStyles: AindexDirectoryEntry; + readonly vscode: AindexDirectoryEntry; + readonly zed: AindexDirectoryEntry; + }; /** IDE configuration files */ - readonly ideFiles: readonly AindexFileEntry[] + readonly ideFiles: readonly AindexFileEntry[]; /** AI Agent ignore files */ - readonly ignoreFiles: readonly AindexFileEntry[] + readonly ignoreFiles: readonly AindexFileEntry[]; } /** * Directory names used in aindex project */ export const AINDEX_DIR_NAMES = { - SRC: 'src', - DIST: 'dist', - SKILLS: 'skills', - COMMANDS: 'commands', - AGENTS: 'agents', - RULES: 'rules', - APP: 'app', - IDEA: '.idea', // IDE directories - IDEA_CODE_STYLES: '.idea/codeStyles', - VSCODE: '.vscode' -} as const + SRC: "src", + DIST: "dist", + SKILLS: "skills", + COMMANDS: "commands", + AGENTS: "agents", + RULES: "rules", + APP: "app", + IDEA: ".idea", // IDE directories + IDEA_CODE_STYLES: ".idea/codeStyles", + VSCODE: ".vscode", + ZED: ".zed", +} as const; /** * File names used in aindex project */ export const AINDEX_FILE_NAMES = { - GLOBAL_MEMORY: 'global.mdx', // Global memory - GLOBAL_MEMORY_SRC: 'global.src.mdx', - WORKSPACE_MEMORY: 'workspace.mdx', // Workspace memory - WORKSPACE_MEMORY_SRC: 'workspace.src.mdx', - EDITOR_CONFIG: '.editorconfig', // EditorConfig - IDEA_GITIGNORE: '.idea/.gitignore', // JetBrains IDE - IDEA_PROJECT_XML: '.idea/codeStyles/Project.xml', - IDEA_CODE_STYLE_CONFIG_XML: '.idea/codeStyles/codeStyleConfig.xml', - VSCODE_SETTINGS: '.vscode/settings.json', // VS Code - VSCODE_EXTENSIONS: '.vscode/extensions.json', - QODER_IGNORE: '.qoderignore', // AI Agent ignore files - CURSOR_IGNORE: '.cursorignore', - WARP_INDEX_IGNORE: '.warpindexignore', - AI_IGNORE: '.aiignore', - CODEIUM_IGNORE: '.codeiumignore' // Windsurf ignore file -} as const + GLOBAL_MEMORY: "global.mdx", // Global memory + GLOBAL_MEMORY_SRC: "global.src.mdx", + WORKSPACE_MEMORY: "workspace.mdx", // Workspace memory + WORKSPACE_MEMORY_SRC: "workspace.src.mdx", + EDITOR_CONFIG: ".editorconfig", // EditorConfig + IDEA_GITIGNORE: ".idea/.gitignore", // JetBrains IDE + IDEA_PROJECT_XML: ".idea/codeStyles/Project.xml", + IDEA_CODE_STYLE_CONFIG_XML: ".idea/codeStyles/codeStyleConfig.xml", + VSCODE_SETTINGS: ".vscode/settings.json", // VS Code + VSCODE_EXTENSIONS: ".vscode/extensions.json", + ZED_SETTINGS: ".zed/settings.json", + QODER_IGNORE: ".qoderignore", // AI Agent ignore files + CURSOR_IGNORE: ".cursorignore", + WARP_INDEX_IGNORE: ".warpindexignore", + AI_IGNORE: ".aiignore", + CODEIUM_IGNORE: ".codeiumignore", // Windsurf ignore file +} as const; /** * Relative paths from aindex project root */ export const AINDEX_RELATIVE_PATHS = { - SRC_SKILLS: 'src/skills', // Source paths - SRC_COMMANDS: 'src/commands', - SRC_AGENTS: 'src/agents', - SRC_RULES: 'src/rules', - SRC_GLOBAL_MEMORY: 'app/global.src.mdx', - SRC_WORKSPACE_MEMORY: 'app/workspace.src.mdx', - DIST_SKILLS: 'dist/skills', // Distribution paths - DIST_COMMANDS: 'dist/commands', - DIST_AGENTS: 'dist/agents', - DIST_RULES: 'dist/rules', - DIST_APP: 'dist/app', - DIST_GLOBAL_MEMORY: 'dist/global.mdx', - DIST_WORKSPACE_MEMORY: 'dist/workspace.mdx', - APP: 'app' // App source path (standalone at root) -} as const + SRC_SKILLS: "src/skills", // Source paths + SRC_COMMANDS: "src/commands", + SRC_AGENTS: "src/agents", + SRC_RULES: "src/rules", + SRC_GLOBAL_MEMORY: "app/global.src.mdx", + SRC_WORKSPACE_MEMORY: "app/workspace.src.mdx", + DIST_SKILLS: "dist/skills", // Distribution paths + DIST_COMMANDS: "dist/commands", + DIST_AGENTS: "dist/agents", + DIST_RULES: "dist/rules", + DIST_APP: "dist/app", + DIST_GLOBAL_MEMORY: "dist/global.mdx", + DIST_WORKSPACE_MEMORY: "dist/workspace.mdx", + APP: "app", // App source path (standalone at root) +} as const; /** * Default aindex directory structure @@ -134,165 +137,178 @@ export const DEFAULT_AINDEX_STRUCTURE: AindexDirectory = { skills: { name: AINDEX_DIR_NAMES.SKILLS, required: false, - description: 'Skill source files (.src.mdx)' + description: "Skill source files (.src.mdx)", }, commands: { name: AINDEX_DIR_NAMES.COMMANDS, required: false, - description: 'Fast command source files (.src.mdx)' + description: "Fast command source files (.src.mdx)", }, agents: { name: AINDEX_DIR_NAMES.AGENTS, required: false, - description: 'Sub-agent source files (.src.mdx)' + description: "Sub-agent source files (.src.mdx)", }, rules: { name: AINDEX_DIR_NAMES.RULES, required: false, - description: 'Rule source files (.src.mdx)' + description: "Rule source files (.src.mdx)", }, globalMemoryFile: { name: AINDEX_FILE_NAMES.GLOBAL_MEMORY_SRC, required: false, - description: 'Global memory source file' + description: "Global memory source file", }, workspaceMemoryFile: { name: AINDEX_FILE_NAMES.WORKSPACE_MEMORY_SRC, required: false, - description: 'Workspace memory source file' - } + description: "Workspace memory source file", + }, }, dist: { skills: { name: AINDEX_DIR_NAMES.SKILLS, required: false, - description: 'Compiled skill files (.mdx)' + description: "Compiled skill files (.mdx)", }, commands: { name: AINDEX_DIR_NAMES.COMMANDS, required: false, - description: 'Compiled fast command files (.mdx)' + description: "Compiled fast command files (.mdx)", }, agents: { name: AINDEX_DIR_NAMES.AGENTS, required: false, - description: 'Compiled sub-agent files (.mdx)' + description: "Compiled sub-agent files (.mdx)", }, rules: { name: AINDEX_DIR_NAMES.RULES, required: false, - description: 'Compiled rule files (.mdx)' + description: "Compiled rule files (.mdx)", }, globalMemoryFile: { name: AINDEX_FILE_NAMES.GLOBAL_MEMORY, required: false, - description: 'Compiled global memory file' + description: "Compiled global memory file", }, workspaceMemoryFile: { name: AINDEX_FILE_NAMES.WORKSPACE_MEMORY, required: false, - description: 'Compiled workspace memory file' + description: "Compiled workspace memory file", }, app: { name: AINDEX_DIR_NAMES.APP, required: false, - description: 'Compiled project-specific prompts' - } + description: "Compiled project-specific prompts", + }, }, app: { name: AINDEX_DIR_NAMES.APP, required: false, - description: 'Project-specific prompts (standalone directory)' + description: "Project-specific prompts (standalone directory)", }, ide: { idea: { name: AINDEX_DIR_NAMES.IDEA, required: false, - description: 'JetBrains IDE configuration directory' + description: "JetBrains IDE configuration directory", }, ideaCodeStyles: { name: AINDEX_DIR_NAMES.IDEA_CODE_STYLES, required: false, - description: 'JetBrains IDE code styles directory' + description: "JetBrains IDE code styles directory", }, vscode: { name: AINDEX_DIR_NAMES.VSCODE, required: false, - description: 'VS Code configuration directory' - } + description: "VS Code configuration directory", + }, + zed: { + name: AINDEX_DIR_NAMES.ZED, + required: false, + description: "Zed configuration directory", + }, }, ideFiles: [ { name: AINDEX_FILE_NAMES.EDITOR_CONFIG, required: false, - description: 'EditorConfig file' + description: "EditorConfig file", }, { name: AINDEX_FILE_NAMES.IDEA_GITIGNORE, required: false, - description: 'JetBrains IDE .gitignore' + description: "JetBrains IDE .gitignore", }, { name: AINDEX_FILE_NAMES.IDEA_PROJECT_XML, required: false, - description: 'JetBrains IDE Project.xml' + description: "JetBrains IDE Project.xml", }, { name: AINDEX_FILE_NAMES.IDEA_CODE_STYLE_CONFIG_XML, required: false, - description: 'JetBrains IDE codeStyleConfig.xml' + description: "JetBrains IDE codeStyleConfig.xml", }, { name: AINDEX_FILE_NAMES.VSCODE_SETTINGS, required: false, - description: 'VS Code settings.json' + description: "VS Code settings.json", }, { name: AINDEX_FILE_NAMES.VSCODE_EXTENSIONS, required: false, - description: 'VS Code extensions.json' - } + description: "VS Code extensions.json", + }, + { + name: AINDEX_FILE_NAMES.ZED_SETTINGS, + required: false, + description: "Zed settings.json", + }, ], ignoreFiles: [ { name: AINDEX_FILE_NAMES.QODER_IGNORE, required: false, - description: 'Qoder ignore file' + description: "Qoder ignore file", }, { name: AINDEX_FILE_NAMES.CURSOR_IGNORE, required: false, - description: 'Cursor ignore file' + description: "Cursor ignore file", }, { name: AINDEX_FILE_NAMES.WARP_INDEX_IGNORE, required: false, - description: 'Warp index ignore file' + description: "Warp index ignore file", }, { name: AINDEX_FILE_NAMES.AI_IGNORE, required: false, - description: 'AI ignore file' + description: "AI ignore file", }, { name: AINDEX_FILE_NAMES.CODEIUM_IGNORE, required: false, - description: 'Windsurf ignore file' - } - ] -} as const + description: "Windsurf ignore file", + }, + ], +} as const; /** * Type for directory names */ -export type AindexDirName = (typeof AINDEX_DIR_NAMES)[keyof typeof AINDEX_DIR_NAMES] +export type AindexDirName = + (typeof AINDEX_DIR_NAMES)[keyof typeof AINDEX_DIR_NAMES]; /** * Type for file names */ -export type AindexFileName = (typeof AINDEX_FILE_NAMES)[keyof typeof AINDEX_FILE_NAMES] +export type AindexFileName = + (typeof AINDEX_FILE_NAMES)[keyof typeof AINDEX_FILE_NAMES]; /** * Type for relative paths */ -export type AindexRelativePath = (typeof AINDEX_RELATIVE_PATHS)[keyof typeof AINDEX_RELATIVE_PATHS] +export type AindexRelativePath = + (typeof AINDEX_RELATIVE_PATHS)[keyof typeof AINDEX_RELATIVE_PATHS]; diff --git a/cli/src/plugins/plugin-core/InputTypes.ts b/cli/src/plugins/plugin-core/InputTypes.ts index db55dbda..9015d705 100644 --- a/cli/src/plugins/plugin-core/InputTypes.ts +++ b/cli/src/plugins/plugin-core/InputTypes.ts @@ -1,10 +1,5 @@ -import type {ProjectConfig} from './ConfigTypes.schema' -import type { - FilePathKind, - IDEKind, - PromptKind, - RuleScope -} from './enums' +import type { ProjectConfig } from "./ConfigTypes.schema"; +import type { FilePathKind, IDEKind, PromptKind, RuleScope } from "./enums"; import type { CommandYAMLFrontMatter, FileContent, @@ -17,62 +12,65 @@ import type { RuleYAMLFrontMatter, SeriName, SkillYAMLFrontMatter, - SubAgentYAMLFrontMatter -} from './PromptTypes' + SubAgentYAMLFrontMatter, +} from "./PromptTypes"; export interface Project { - readonly name?: string - readonly dirFromWorkspacePath?: RelativePath - readonly rootMemoryPrompt?: ProjectRootMemoryPrompt - readonly childMemoryPrompts?: readonly ProjectChildrenMemoryPrompt[] - readonly isPromptSourceProject?: boolean - readonly isWorkspaceRootProject?: boolean - readonly projectConfig?: ProjectConfig + readonly name?: string; + readonly dirFromWorkspacePath?: RelativePath; + readonly rootMemoryPrompt?: ProjectRootMemoryPrompt; + readonly childMemoryPrompts?: readonly ProjectChildrenMemoryPrompt[]; + readonly isPromptSourceProject?: boolean; + readonly isWorkspaceRootProject?: boolean; + readonly projectConfig?: ProjectConfig; } export interface Workspace { - readonly directory: Path - readonly projects: Project[] + readonly directory: Path; + readonly projects: Project[]; } /** * IDE configuration file */ -export interface ProjectIDEConfigFile extends FileContent { - readonly type: I +export interface ProjectIDEConfigFile< + I extends IDEKind = IDEKind.Original, +> extends FileContent { + readonly type: I; } /** * AI Agent ignore configuration file */ export interface AIAgentIgnoreConfigFile { - readonly fileName: string - readonly content: string - readonly sourcePath?: string + readonly fileName: string; + readonly content: string; + readonly sourcePath?: string; } /** * Shared context fields across input aggregation and output execution. */ interface CollectedContextData { - readonly workspace: Workspace + readonly workspace: Workspace; /** Flat prompt projections used by current output plugins */ - readonly skills?: readonly SkillPrompt[] - readonly commands?: readonly CommandPrompt[] - readonly subAgents?: readonly SubAgentPrompt[] - readonly rules?: readonly RulePrompt[] - readonly readmePrompts?: readonly ReadmePrompt[] - readonly globalMemory?: GlobalMemoryPrompt + readonly skills?: readonly SkillPrompt[]; + readonly commands?: readonly CommandPrompt[]; + readonly subAgents?: readonly SubAgentPrompt[]; + readonly rules?: readonly RulePrompt[]; + readonly readmePrompts?: readonly ReadmePrompt[]; + readonly globalMemory?: GlobalMemoryPrompt; /** Other non-prompt fields */ - readonly vscodeConfigFiles?: readonly ProjectIDEConfigFile[] - readonly jetbrainsConfigFiles?: readonly ProjectIDEConfigFile[] - readonly editorConfigFiles?: readonly ProjectIDEConfigFile[] - readonly aiAgentIgnoreConfigFiles?: readonly AIAgentIgnoreConfigFile[] - readonly globalGitIgnore?: string - readonly shadowGitExclude?: string - readonly aindexDir?: string + readonly vscodeConfigFiles?: readonly ProjectIDEConfigFile[]; + readonly zedConfigFiles?: readonly ProjectIDEConfigFile[]; + readonly jetbrainsConfigFiles?: readonly ProjectIDEConfigFile[]; + readonly editorConfigFiles?: readonly ProjectIDEConfigFile[]; + readonly aiAgentIgnoreConfigFiles?: readonly AIAgentIgnoreConfigFile[]; + readonly globalGitIgnore?: string; + readonly shadowGitExclude?: string; + readonly aindexDir?: string; } /** @@ -91,63 +89,100 @@ export interface OutputCollectedContext extends CollectedContextData {} * Convert input context to output context boundary object. * This keeps input and output stages decoupled while preserving data shape. */ -export function toOutputCollectedContext(input: InputCollectedContext): OutputCollectedContext { +export function toOutputCollectedContext( + input: InputCollectedContext, +): OutputCollectedContext { return { workspace: { directory: input.workspace.directory, - projects: [...input.workspace.projects] + projects: [...input.workspace.projects], }, - ...input.skills != null && {skills: [...input.skills]}, - ...input.commands != null && {commands: [...input.commands]}, - ...input.subAgents != null && {subAgents: [...input.subAgents]}, - ...input.rules != null && {rules: [...input.rules]}, - ...input.readmePrompts != null && {readmePrompts: [...input.readmePrompts]}, - ...input.globalMemory != null && {globalMemory: input.globalMemory}, - ...input.vscodeConfigFiles != null && {vscodeConfigFiles: [...input.vscodeConfigFiles]}, - ...input.jetbrainsConfigFiles != null && {jetbrainsConfigFiles: [...input.jetbrainsConfigFiles]}, - ...input.editorConfigFiles != null && {editorConfigFiles: [...input.editorConfigFiles]}, - ...input.aiAgentIgnoreConfigFiles != null && {aiAgentIgnoreConfigFiles: [...input.aiAgentIgnoreConfigFiles]}, - ...input.globalGitIgnore != null && {globalGitIgnore: input.globalGitIgnore}, - ...input.shadowGitExclude != null && {shadowGitExclude: input.shadowGitExclude}, - ...input.aindexDir != null && {aindexDir: input.aindexDir} - } + ...(input.skills != null && { skills: [...input.skills] }), + ...(input.commands != null && { commands: [...input.commands] }), + ...(input.subAgents != null && { subAgents: [...input.subAgents] }), + ...(input.rules != null && { rules: [...input.rules] }), + ...(input.readmePrompts != null && { + readmePrompts: [...input.readmePrompts], + }), + ...(input.globalMemory != null && { globalMemory: input.globalMemory }), + ...(input.vscodeConfigFiles != null && { + vscodeConfigFiles: [...input.vscodeConfigFiles], + }), + ...(input.zedConfigFiles != null && { + zedConfigFiles: [...input.zedConfigFiles], + }), + ...(input.jetbrainsConfigFiles != null && { + jetbrainsConfigFiles: [...input.jetbrainsConfigFiles], + }), + ...(input.editorConfigFiles != null && { + editorConfigFiles: [...input.editorConfigFiles], + }), + ...(input.aiAgentIgnoreConfigFiles != null && { + aiAgentIgnoreConfigFiles: [...input.aiAgentIgnoreConfigFiles], + }), + ...(input.globalGitIgnore != null && { + globalGitIgnore: input.globalGitIgnore, + }), + ...(input.shadowGitExclude != null && { + shadowGitExclude: input.shadowGitExclude, + }), + ...(input.aindexDir != null && { aindexDir: input.aindexDir }), + }; } /** * Rule prompt with glob patterns for file-scoped rule application */ -export interface RulePrompt extends Prompt { - readonly type: PromptKind.Rule - readonly prefix: string - readonly ruleName: string - readonly globs: readonly string[] - readonly scope: RuleScope - readonly seriName?: SeriName - readonly rawMdxContent?: string +export interface RulePrompt extends Prompt< + PromptKind.Rule, + RuleYAMLFrontMatter, + FilePathKind.Relative, + RelativePath, + string +> { + readonly type: PromptKind.Rule; + readonly prefix: string; + readonly ruleName: string; + readonly globs: readonly string[]; + readonly scope: RuleScope; + readonly seriName?: SeriName; + readonly rawMdxContent?: string; } /** * Command prompt */ -export interface CommandPrompt extends Prompt { - readonly type: PromptKind.Command - readonly globalOnly?: true - readonly commandPrefix?: string - readonly commandName: string - readonly seriName?: SeriName - readonly rawMdxContent?: string +export interface CommandPrompt extends Prompt< + PromptKind.Command, + CommandYAMLFrontMatter, + FilePathKind.Relative, + RelativePath, + string +> { + readonly type: PromptKind.Command; + readonly globalOnly?: true; + readonly commandPrefix?: string; + readonly commandName: string; + readonly seriName?: SeriName; + readonly rawMdxContent?: string; } /** * Sub-agent prompt */ -export interface SubAgentPrompt extends Prompt { - readonly type: PromptKind.SubAgent - readonly agentPrefix?: string - readonly agentName: string - readonly canonicalName: string - readonly seriName?: SeriName - readonly rawMdxContent?: string +export interface SubAgentPrompt extends Prompt< + PromptKind.SubAgent, + SubAgentYAMLFrontMatter, + FilePathKind.Relative, + RelativePath, + string +> { + readonly type: PromptKind.SubAgent; + readonly agentPrefix?: string; + readonly agentName: string; + readonly canonicalName: string; + readonly seriName?: SeriName; + readonly rawMdxContent?: string; } /** @@ -155,14 +190,14 @@ export interface SubAgentPrompt extends Prompt { - readonly type: PromptKind.SkillChildDoc - readonly relativePath: string + readonly type: PromptKind.SkillChildDoc; + readonly relativePath: string; } /** * Resource content encoding type */ -export type SkillResourceEncoding = 'text' | 'base64' +export type SkillResourceEncoding = "text" | "base64"; /** * Skill resource file for AI on-demand access @@ -178,26 +213,26 @@ export type SkillResourceEncoding = 'text' | 'base64' * - Binary files: .exe, .dll, .wasm, etc. */ export interface SkillResource { - readonly type: PromptKind.SkillResource - readonly extension: string - readonly fileName: string - readonly relativePath: string - readonly sourcePath?: string - readonly content: string - readonly encoding: SkillResourceEncoding - readonly length: number - readonly mimeType?: string + readonly type: PromptKind.SkillResource; + readonly extension: string; + readonly fileName: string; + readonly relativePath: string; + readonly sourcePath?: string; + readonly content: string; + readonly encoding: SkillResourceEncoding; + readonly length: number; + readonly mimeType?: string; } /** * MCP server configuration entry */ export interface McpServerConfig { - readonly command: string - readonly args?: readonly string[] - readonly env?: Readonly> - readonly disabled?: boolean - readonly autoApprove?: readonly string[] + readonly command: string; + readonly args?: readonly string[]; + readonly env?: Readonly>; + readonly disabled?: boolean; + readonly autoApprove?: readonly string[]; } /** @@ -206,20 +241,23 @@ export interface McpServerConfig { * - Others: may support lazy loading in the future */ export interface SkillMcpConfig { - readonly type: PromptKind.SkillMcpConfig - readonly mcpServers: Readonly> - readonly rawContent: string + readonly type: PromptKind.SkillMcpConfig; + readonly mcpServers: Readonly>; + readonly rawContent: string; } -export interface SkillPrompt extends Prompt { - readonly type: PromptKind.Skill - readonly dir: RelativePath - readonly skillName: string - readonly yamlFrontMatter: SkillYAMLFrontMatter - readonly mcpConfig?: SkillMcpConfig - readonly childDocs?: SkillChildDoc[] - readonly resources?: SkillResource[] - readonly seriName?: SeriName +export interface SkillPrompt extends Prompt< + PromptKind.Skill, + SkillYAMLFrontMatter +> { + readonly type: PromptKind.Skill; + readonly dir: RelativePath; + readonly skillName: string; + readonly yamlFrontMatter: SkillYAMLFrontMatter; + readonly mcpConfig?: SkillMcpConfig; + readonly childDocs?: SkillChildDoc[]; + readonly resources?: SkillResource[]; + readonly seriName?: SeriName; } /** @@ -229,34 +267,36 @@ export interface SkillPrompt extends Prompt> = { - Readme: {src: 'rdm.mdx', out: 'README.md'}, - CodeOfConduct: {src: 'coc.mdx', out: 'CODE_OF_CONDUCT.md'}, - Security: {src: 'security.mdx', out: 'SECURITY.md'} -} +export const README_FILE_KIND_MAP: Readonly< + Record +> = { + Readme: { src: "rdm.mdx", out: "README.md" }, + CodeOfConduct: { src: "coc.mdx", out: "CODE_OF_CONDUCT.md" }, + Security: { src: "security.mdx", out: "SECURITY.md" }, +}; /** * README-family prompt data structure (README.md, CODE_OF_CONDUCT.md, SECURITY.md) */ export interface ReadmePrompt extends Prompt { - readonly type: PromptKind.Readme - readonly projectName: string - readonly targetDir: RelativePath - readonly isRoot: boolean - readonly fileKind: ReadmeFileKind + readonly type: PromptKind.Readme; + readonly projectName: string; + readonly targetDir: RelativePath; + readonly isRoot: boolean; + readonly fileKind: ReadmeFileKind; } /** * Supported locale codes */ -export type Locale = 'zh' | 'en' +export type Locale = "zh" | "en"; -export type LocalizedFileExtension = string | readonly string[] +export type LocalizedFileExtension = string | readonly string[]; /** * Localized content wrapper for a single locale @@ -264,22 +304,22 @@ export type LocalizedFileExtension = string | readonly string[] */ export interface LocalizedContent { /** Compiled/processed content */ - readonly content: string + readonly content: string; /** Original MDX source (before compilation) */ - readonly rawMdx?: string + readonly rawMdx?: string; /** Extracted front matter */ - readonly frontMatter?: Record + readonly frontMatter?: Record; /** File last modified timestamp */ - readonly lastModified: Date + readonly lastModified: Date; /** Full prompt object (optional, for extended access) */ - readonly prompt?: T + readonly prompt?: T; /** Absolute file path */ - readonly filePath: string + readonly filePath: string; } /** @@ -287,41 +327,44 @@ export interface LocalizedContent { */ export interface LocalizedSource { /** Default source content (.src.mdx) */ - readonly zh?: LocalizedContent + readonly zh?: LocalizedContent; /** English content (.mdx) */ - readonly en?: LocalizedContent + readonly en?: LocalizedContent; /** Default locale content (typically zh) */ - readonly default: LocalizedContent + readonly default: LocalizedContent; /** Which locale is the default */ - readonly defaultLocale: Locale + readonly defaultLocale: Locale; } /** Universal localized prompt wrapper */ -export interface LocalizedPrompt { - readonly name: string // Prompt identifier name - readonly type: K // Prompt type kind - readonly src?: LocalizedSource // Source files content (src directory, optional when dist-only) - readonly dist?: LocalizedContent // Compiled/dist content (dist directory, optional) +export interface LocalizedPrompt< + T extends Prompt = Prompt, + K extends PromptKind = PromptKind, +> { + readonly name: string; // Prompt identifier name + readonly type: K; // Prompt type kind + readonly src?: LocalizedSource; // Source files content (src directory, optional when dist-only) + readonly dist?: LocalizedContent; // Compiled/dist content (dist directory, optional) /** Metadata flags */ readonly metadata: { - readonly hasDist: boolean // Whether dist content exists - readonly hasMultipleLocales: boolean // Whether multiple locales exist in src - readonly isDirectoryStructure: boolean // Whether this is a directory-based prompt (like skills) + readonly hasDist: boolean; // Whether dist content exists + readonly hasMultipleLocales: boolean; // Whether multiple locales exist in src + readonly isDirectoryStructure: boolean; // Whether this is a directory-based prompt (like skills) /** Available child items (for directory structures) */ - readonly children?: string[] - } + readonly children?: string[]; + }; /** File paths for all variants */ readonly paths: { - readonly zh?: string - readonly en?: string - readonly dist?: string - } + readonly zh?: string; + readonly en?: string; + readonly dist?: string; + }; } /** @@ -330,39 +373,44 @@ export interface LocalizedPrompt { /** File extensions for each locale */ readonly localeExtensions: { - readonly zh: LocalizedFileExtension - readonly en: LocalizedFileExtension - } + readonly zh: LocalizedFileExtension; + readonly en: LocalizedFileExtension; + }; /** Entry file name (without extension, e.g., 'skill' for skills) */ - readonly entryFileName?: string + readonly entryFileName?: string; /** Whether source contents should be hydrated and compiled in addition to dist */ readonly hydrateSourceContents?: boolean /** Create prompt from content */ - readonly createPrompt: (content: string, locale: Locale, name: string, metadata?: Record) => T | Promise + readonly createPrompt: ( + content: string, + locale: Locale, + name: string, + metadata?: Record, + ) => T | Promise; /** Prompt kind */ - readonly kind: K + readonly kind: K; /** Whether this is a directory-based structure */ - readonly isDirectoryStructure: boolean + readonly isDirectoryStructure: boolean; } /** * Result of reading a directory structure (like skills) */ export interface DirectoryReadResult { - readonly prompts: LocalizedPrompt[] - readonly errors: ReadError[] + readonly prompts: LocalizedPrompt[]; + readonly errors: ReadError[]; } /** * Error during reading */ export interface ReadError { - readonly path: string - readonly error: Error - readonly phase: 'scan' | 'read' | 'compile' + readonly path: string; + readonly error: Error; + readonly phase: "scan" | "read" | "compile"; } diff --git a/cli/src/plugins/plugin-core/constants.ts b/cli/src/plugins/plugin-core/constants.ts index 04c2563d..7210749b 100644 --- a/cli/src/plugins/plugin-core/constants.ts +++ b/cli/src/plugins/plugin-core/constants.ts @@ -1,120 +1,123 @@ -import type {UserConfigFile} from './ConfigTypes.schema' +import type { UserConfigFile } from "./ConfigTypes.schema"; export const PathPlaceholders = { - USER_HOME: '~', - WORKSPACE: '$WORKSPACE' -} as const + USER_HOME: "~", + WORKSPACE: "$WORKSPACE", +} as const; -type DefaultUserConfig = Readonly>> -export const DEFAULT_USER_CONFIG = {} as DefaultUserConfig +type DefaultUserConfig = Readonly>>; +export const DEFAULT_USER_CONFIG = {} as DefaultUserConfig; export const PLUGIN_NAMES = { - AgentsOutput: 'AgentsOutputPlugin', - GeminiCLIOutput: 'GeminiCLIOutputPlugin', - CursorOutput: 'CursorOutputPlugin', - WindsurfOutput: 'WindsurfOutputPlugin', - ClaudeCodeCLIOutput: 'ClaudeCodeCLIOutputPlugin', - KiroIDEOutput: 'KiroCLIOutputPlugin', - OpencodeCLIOutput: 'OpencodeCLIOutputPlugin', - OpenAICodexCLIOutput: 'CodexCLIOutputPlugin', - DroidCLIOutput: 'DroidCLIOutputPlugin', - WarpIDEOutput: 'WarpIDEOutputPlugin', - TraeIDEOutput: 'TraeIDEOutputPlugin', - TraeCNIDEOutput: 'TraeCNIDEOutputPlugin', - QoderIDEOutput: 'QoderIDEPluginOutputPlugin', - JetBrainsCodeStyleOutput: 'JetBrainsIDECodeStyleConfigOutputPlugin', - JetBrainsAICodexOutput: 'JetBrainsAIAssistantCodexOutputPlugin', - AgentSkillsCompactOutput: 'GenericSkillsOutputPlugin', - GitExcludeOutput: 'GitExcludeOutputPlugin', - ReadmeOutput: 'ReadmeMdConfigFileOutputPlugin', - VSCodeOutput: 'VisualStudioCodeIDEConfigOutputPlugin', - EditorConfigOutput: 'EditorConfigOutputPlugin', - AntigravityOutput: 'AntigravityOutputPlugin' -} as const - -export type PluginName = (typeof PLUGIN_NAMES)[keyof typeof PLUGIN_NAMES] - -export const WORKSPACE_ROOT_PROJECT_NAME = '__workspace__' + AgentsOutput: "AgentsOutputPlugin", + GeminiCLIOutput: "GeminiCLIOutputPlugin", + CursorOutput: "CursorOutputPlugin", + WindsurfOutput: "WindsurfOutputPlugin", + ClaudeCodeCLIOutput: "ClaudeCodeCLIOutputPlugin", + KiroIDEOutput: "KiroCLIOutputPlugin", + OpencodeCLIOutput: "OpencodeCLIOutputPlugin", + OpenAICodexCLIOutput: "CodexCLIOutputPlugin", + DroidCLIOutput: "DroidCLIOutputPlugin", + WarpIDEOutput: "WarpIDEOutputPlugin", + TraeIDEOutput: "TraeIDEOutputPlugin", + TraeCNIDEOutput: "TraeCNIDEOutputPlugin", + QoderIDEOutput: "QoderIDEPluginOutputPlugin", + JetBrainsCodeStyleOutput: "JetBrainsIDECodeStyleConfigOutputPlugin", + JetBrainsAICodexOutput: "JetBrainsAIAssistantCodexOutputPlugin", + AgentSkillsCompactOutput: "GenericSkillsOutputPlugin", + GitExcludeOutput: "GitExcludeOutputPlugin", + ReadmeOutput: "ReadmeMdConfigFileOutputPlugin", + VSCodeOutput: "VisualStudioCodeIDEConfigOutputPlugin", + ZedOutput: "ZedIDEConfigOutputPlugin", + EditorConfigOutput: "EditorConfigOutputPlugin", + AntigravityOutput: "AntigravityOutputPlugin", +} as const; + +export type PluginName = (typeof PLUGIN_NAMES)[keyof typeof PLUGIN_NAMES]; + +export const WORKSPACE_ROOT_PROJECT_NAME = "__workspace__"; /** * Constants for output plugins. */ export const OutputFileNames = { - SKILL: 'SKILL.md', - CURSOR_GLOBAL_RULE: 'global.mdc', - CURSOR_PROJECT_RULE: 'always.md', - MCP_CONFIG: 'mcp.json', - CLAUDE_MEMORY: 'CLAUDE.md', - WINDSURF_GLOBAL_RULE: 'global_rules.md' -} as const + SKILL: "SKILL.md", + CURSOR_GLOBAL_RULE: "global.mdc", + CURSOR_PROJECT_RULE: "always.md", + MCP_CONFIG: "mcp.json", + CLAUDE_MEMORY: "CLAUDE.md", + WINDSURF_GLOBAL_RULE: "global_rules.md", +} as const; export const OutputPrefixes = { - RULE: 'rule-', - CHILD_RULE: 'glob-' -} as const + RULE: "rule-", + CHILD_RULE: "glob-", +} as const; export const OutputSubdirectories = { - RULES: 'rules', - COMMANDS: 'commands', - SKILLS: 'skills', - AGENTS: 'agents', - CURSOR_SKILLS: 'skills-cursor' -} as const + RULES: "rules", + COMMANDS: "commands", + SKILLS: "skills", + AGENTS: "agents", + CURSOR_SKILLS: "skills-cursor", +} as const; export const FrontMatterFields = { - ALWAYS_APPLY: 'alwaysApply', - GLOBS: 'globs', - DESCRIPTION: 'description', - NAME: 'name', - TRIGGER: 'trigger' -} as const + ALWAYS_APPLY: "alwaysApply", + GLOBS: "globs", + DESCRIPTION: "description", + NAME: "name", + TRIGGER: "trigger", +} as const; export const FileExtensions = { - MD: '.md', - MDC: '.mdc', - MDX: '.mdx', - JSON: '.json' -} as const + MD: ".md", + MDC: ".mdc", + MDX: ".mdx", + JSON: ".json", +} as const; export const SourcePromptExtensions = { - PRIMARY: '.src.mdx' -} as const + PRIMARY: ".src.mdx", +} as const; export const SourcePromptFileExtensions = [ - SourcePromptExtensions.PRIMARY -] as const + SourcePromptExtensions.PRIMARY, +] as const; export const SourceLocaleExtensions = { zh: SourcePromptFileExtensions, - en: FileExtensions.MDX -} as const + en: FileExtensions.MDX, +} as const; export function hasSourcePromptExtension(fileName: string): boolean { - return SourcePromptFileExtensions.some(extension => fileName.endsWith(extension)) + return SourcePromptFileExtensions.some((extension) => + fileName.endsWith(extension), + ); } export const GlobalConfigDirs = { - CURSOR: '.cursor', - CLAUDE: '.claude', - WINDSURF: '.codeium/windsurf', - WINDSURF_RULES: '.windsurf' -} as const + CURSOR: ".cursor", + CLAUDE: ".claude", + WINDSURF: ".codeium/windsurf", + WINDSURF_RULES: ".windsurf", +} as const; export const IgnoreFiles = { - CURSOR: '.cursorignore', - WINDSURF: '.codeiumignore' -} as const + CURSOR: ".cursorignore", + WINDSURF: ".codeiumignore", +} as const; export const PreservedSkills = { CURSOR: new Set([ - 'create-rule', - 'create-skill', - 'create-subagent', - 'migrate-to-skills', - 'update-cursor-settings' - ]) -} as const + "create-rule", + "create-skill", + "create-subagent", + "migrate-to-skills", + "update-cursor-settings", + ]), +} as const; export const ToolPresets = { - CLAUDE_CODE: 'claudeCode' -} as const + CLAUDE_CODE: "claudeCode", +} as const; diff --git a/cli/src/plugins/plugin-core/enums.ts b/cli/src/plugins/plugin-core/enums.ts index 6a029a27..2ed895da 100644 --- a/cli/src/plugins/plugin-core/enums.ts +++ b/cli/src/plugins/plugin-core/enums.ts @@ -1,52 +1,53 @@ export enum PluginKind { - Output = 'output' + Output = "output", } export enum PromptKind { - GlobalMemory = 'globalMemory', - ProjectRootMemory = 'projectRootMemory', - ProjectChildrenMemory = 'projectChildrenMemory', - Command = 'command', - SubAgent = 'subAgent', - Skill = 'skill', - SkillChildDoc = 'skillChildDoc', - SkillResource = 'skillResource', - SkillMcpConfig = 'skillMcpConfig', - Readme = 'readme', - Rule = 'rule' + GlobalMemory = "globalMemory", + ProjectRootMemory = "projectRootMemory", + ProjectChildrenMemory = "projectChildrenMemory", + Command = "command", + SubAgent = "subAgent", + Skill = "skill", + SkillChildDoc = "skillChildDoc", + SkillResource = "skillResource", + SkillMcpConfig = "skillMcpConfig", + Readme = "readme", + Rule = "rule", } -export type RuleScope = 'project' | 'global' +export type RuleScope = "project" | "global"; export enum FilePathKind { - Relative = 'relative', - Absolute = 'absolute', - Root = 'root' + Relative = "relative", + Absolute = "absolute", + Root = "root", } export enum IDEKind { - VSCode = 'vscode', - IntellijIDEA = 'intellijIdea', - Git = 'git', - EditorConfig = 'editorconfig', - Original = 'original' + VSCode = "vscode", + Zed = "zed", + IntellijIDEA = "intellijIdea", + Git = "git", + EditorConfig = "editorconfig", + Original = "original", } export enum NamingCaseKind { - CamelCase = 'camelCase', - PascalCase = 'pascalCase', - SnakeCase = 'snakeCase', - KebabCase = 'kebabCase', - UpperCase = 'upperCase', - LowerCase = 'lowerCase', - Original = 'original' + CamelCase = "camelCase", + PascalCase = "pascalCase", + SnakeCase = "snakeCase", + KebabCase = "kebabCase", + UpperCase = "upperCase", + LowerCase = "lowerCase", + Original = "original", } export enum GlobalConfigDirectoryType { - UserHome = 'userHome', - External = 'external' + UserHome = "userHome", + External = "external", } -export type CodingAgentTools = string +export type CodingAgentTools = string; -export type ClaudeCodeCLISubAgentColors = string +export type ClaudeCodeCLISubAgentColors = string; diff --git a/cli/src/plugins/plugin-zed.ts b/cli/src/plugins/plugin-zed.ts new file mode 100644 index 00000000..85ad398b --- /dev/null +++ b/cli/src/plugins/plugin-zed.ts @@ -0,0 +1,3 @@ +export { + ZedIDEConfigOutputPlugin +} from './ZedIDEConfigOutputPlugin' diff --git a/cli/src/public-config-paths.ts b/cli/src/public-config-paths.ts index 1aa4d70b..3de27b8b 100644 --- a/cli/src/public-config-paths.ts +++ b/cli/src/public-config-paths.ts @@ -1,18 +1,18 @@ -import type {ProxyCommand, ProxyContext} from '@truenine/script-runtime' -import type {IDEKind} from './plugins/plugin-core/enums' -import type {ProjectIDEConfigFile} from './plugins/plugin-core/InputTypes' -import * as fs from 'node:fs' -import * as path from 'node:path' -import process from 'node:process' -import {resolvePublicPath} from '@truenine/script-runtime' -import {AINDEX_FILE_NAMES} from './plugins/plugin-core/AindexTypes' -import {FilePathKind} from './plugins/plugin-core/enums' - -export const PUBLIC_CONFIG_DEFINITION_DIR = 'public' -export const PUBLIC_PROXY_FILE_NAME = 'proxy.ts' - -export const PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH = '.gitignore' -export const PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH = '.git/info/exclude' +import type { ProxyCommand, ProxyContext } from "@truenine/script-runtime"; +import type { IDEKind } from "./plugins/plugin-core/enums"; +import type { ProjectIDEConfigFile } from "./plugins/plugin-core/InputTypes"; +import * as fs from "node:fs"; +import * as path from "node:path"; +import process from "node:process"; +import { resolvePublicPath } from "@truenine/script-runtime"; +import { AINDEX_FILE_NAMES } from "./plugins/plugin-core/AindexTypes"; +import { FilePathKind } from "./plugins/plugin-core/enums"; + +export const PUBLIC_CONFIG_DEFINITION_DIR = "public"; +export const PUBLIC_PROXY_FILE_NAME = "proxy.ts"; + +export const PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH = ".gitignore"; +export const PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH = ".git/info/exclude"; export const AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS = [ AINDEX_FILE_NAMES.QODER_IGNORE, @@ -20,9 +20,9 @@ export const AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS = [ AINDEX_FILE_NAMES.WARP_INDEX_IGNORE, AINDEX_FILE_NAMES.AI_IGNORE, AINDEX_FILE_NAMES.CODEIUM_IGNORE, - '.kiroignore', - '.traeignore' -] as const + ".kiroignore", + ".traeignore", +] as const; export const KNOWN_PUBLIC_CONFIG_TARGET_RELATIVE_PATHS = [ PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, @@ -30,126 +30,151 @@ export const KNOWN_PUBLIC_CONFIG_TARGET_RELATIVE_PATHS = [ AINDEX_FILE_NAMES.EDITOR_CONFIG, AINDEX_FILE_NAMES.VSCODE_SETTINGS, AINDEX_FILE_NAMES.VSCODE_EXTENSIONS, + AINDEX_FILE_NAMES.ZED_SETTINGS, AINDEX_FILE_NAMES.IDEA_PROJECT_XML, AINDEX_FILE_NAMES.IDEA_CODE_STYLE_CONFIG_XML, AINDEX_FILE_NAMES.IDEA_GITIGNORE, - ...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS -] as const + ...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS, +] as const; export interface PublicDefinitionResolveOptions { - readonly command?: ProxyCommand | undefined - readonly workspaceDir?: string | undefined + readonly command?: ProxyCommand | undefined; + readonly workspaceDir?: string | undefined; } -const publicDefinitionPathCache = new Map() +const publicDefinitionPathCache = new Map(); function normalizeTargetRelativePath(targetRelativePath: string): string { const normalizedPath = targetRelativePath .split(/[\\/]+/) - .filter(segment => segment.length > 0) - .join('/') + .filter((segment) => segment.length > 0) + .join("/"); - if (normalizedPath.length === 0) throw new Error('public target relative path cannot be empty') - return normalizedPath + if (normalizedPath.length === 0) + throw new Error("public target relative path cannot be empty"); + return normalizedPath; } function getPublicRootDir(aindexDir: string): string { - return path.join(aindexDir, PUBLIC_CONFIG_DEFINITION_DIR) + return path.join(aindexDir, PUBLIC_CONFIG_DEFINITION_DIR); } function getPublicProxyPath(aindexDir: string): string { - return path.join(getPublicRootDir(aindexDir), PUBLIC_PROXY_FILE_NAME) + return path.join(getPublicRootDir(aindexDir), PUBLIC_PROXY_FILE_NAME); } -function getResolveCommand(options?: PublicDefinitionResolveOptions): ProxyCommand { - return options?.command ?? 'execute' +function getResolveCommand( + options?: PublicDefinitionResolveOptions, +): ProxyCommand { + return options?.command ?? "execute"; } function getResolveWorkspaceDir( aindexDir: string, - options?: PublicDefinitionResolveOptions + options?: PublicDefinitionResolveOptions, ): string { - return path.resolve(options?.workspaceDir ?? path.dirname(aindexDir)) + return path.resolve(options?.workspaceDir ?? path.dirname(aindexDir)); } function buildProxyContext( aindexDir: string, workspaceDir: string, - command: ProxyCommand + command: ProxyCommand, ): ProxyContext { - const resolvedAindexDir = path.resolve(aindexDir) + const resolvedAindexDir = path.resolve(aindexDir); return { cwd: workspaceDir, workspaceDir, aindexDir: resolvedAindexDir, command, - platform: process.platform - } + platform: process.platform, + }; } function resolvePublicDefinitionRelativePath( aindexDir: string, targetRelativePath: string, - options?: PublicDefinitionResolveOptions + options?: PublicDefinitionResolveOptions, ): string { - const normalizedTargetPath = normalizeTargetRelativePath(targetRelativePath) - if (normalizedTargetPath === PUBLIC_PROXY_FILE_NAME) return PUBLIC_PROXY_FILE_NAME + const normalizedTargetPath = normalizeTargetRelativePath(targetRelativePath); + if (normalizedTargetPath === PUBLIC_PROXY_FILE_NAME) + return PUBLIC_PROXY_FILE_NAME; - const proxyFilePath = getPublicProxyPath(aindexDir) - if (!(fs.existsSync(proxyFilePath) && fs.statSync(proxyFilePath).isFile())) return normalizedTargetPath + const proxyFilePath = getPublicProxyPath(aindexDir); + if (!(fs.existsSync(proxyFilePath) && fs.statSync(proxyFilePath).isFile())) + return normalizedTargetPath; - const command = getResolveCommand(options) - const workspaceDir = getResolveWorkspaceDir(aindexDir, options) - const cacheKey = [proxyFilePath, workspaceDir, command, normalizedTargetPath].join('::') - const cachedPath = publicDefinitionPathCache.get(cacheKey) - if (cachedPath != null) return cachedPath + const command = getResolveCommand(options); + const workspaceDir = getResolveWorkspaceDir(aindexDir, options); + const cacheKey = [ + proxyFilePath, + workspaceDir, + command, + normalizedTargetPath, + ].join("::"); + const cachedPath = publicDefinitionPathCache.get(cacheKey); + if (cachedPath != null) return cachedPath; const resolvedRelativePath = resolvePublicPath( proxyFilePath, buildProxyContext(aindexDir, workspaceDir, command), - normalizedTargetPath - ) + normalizedTargetPath, + ); - publicDefinitionPathCache.set(cacheKey, resolvedRelativePath) - return resolvedRelativePath + publicDefinitionPathCache.set(cacheKey, resolvedRelativePath); + return resolvedRelativePath; } export function resolvePublicDefinitionPath( aindexDir: string, targetRelativePath: string, - options?: PublicDefinitionResolveOptions + options?: PublicDefinitionResolveOptions, ): string { - const resolvedRelativePath = resolvePublicDefinitionRelativePath(aindexDir, targetRelativePath, options) - return path.join(getPublicRootDir(aindexDir), ...resolvedRelativePath.split(/[\\/]+/)) + const resolvedRelativePath = resolvePublicDefinitionRelativePath( + aindexDir, + targetRelativePath, + options, + ); + return path.join( + getPublicRootDir(aindexDir), + ...resolvedRelativePath.split(/[\\/]+/), + ); } export function collectKnownPublicConfigDefinitionPaths( aindexDir: string, - options?: PublicDefinitionResolveOptions + options?: PublicDefinitionResolveOptions, ): string[] { const resolvedPaths = new Set([ - resolvePublicDefinitionPath(aindexDir, PUBLIC_PROXY_FILE_NAME) - ]) + resolvePublicDefinitionPath(aindexDir, PUBLIC_PROXY_FILE_NAME), + ]); for (const targetRelativePath of KNOWN_PUBLIC_CONFIG_TARGET_RELATIVE_PATHS) { - resolvedPaths.add(resolvePublicDefinitionPath(aindexDir, targetRelativePath, options)) + resolvedPaths.add( + resolvePublicDefinitionPath(aindexDir, targetRelativePath, options), + ); } - return [...resolvedPaths] + return [...resolvedPaths]; } export function readPublicIdeConfigDefinitionFile( type: T, targetRelativePath: string, aindexDir: string, - fs: typeof import('node:fs'), - options?: PublicDefinitionResolveOptions + fs: typeof import("node:fs"), + options?: PublicDefinitionResolveOptions, ): ProjectIDEConfigFile | undefined { - const absolutePath = resolvePublicDefinitionPath(aindexDir, targetRelativePath, options) - if (!(fs.existsSync(absolutePath) && fs.statSync(absolutePath).isFile())) return void 0 - - const content = fs.readFileSync(absolutePath, 'utf8') + const absolutePath = resolvePublicDefinitionPath( + aindexDir, + targetRelativePath, + options, + ); + if (!(fs.existsSync(absolutePath) && fs.statSync(absolutePath).isFile())) + return void 0; + + const content = fs.readFileSync(absolutePath, "utf8"); return { type, content, @@ -158,7 +183,7 @@ export function readPublicIdeConfigDefinitionFile( dir: { pathKind: FilePathKind.Absolute, path: absolutePath, - getDirectoryName: () => path.basename(absolutePath) - } - } + getDirectoryName: () => path.basename(absolutePath), + }, + }; } diff --git a/cli/tsconfig.json b/cli/tsconfig.json index 65a26540..4effb1ff 100644 --- a/cli/tsconfig.json +++ b/cli/tsconfig.json @@ -41,7 +41,8 @@ "@truenine/plugin-trae-ide": ["./src/plugins/plugin-trae-ide.ts"], "@truenine/plugin-vscode": ["./src/plugins/plugin-vscode.ts"], "@truenine/plugin-warp-ide": ["./src/plugins/plugin-warp-ide.ts"], - "@truenine/plugin-windsurf": ["./src/plugins/plugin-windsurf.ts"] + "@truenine/plugin-windsurf": ["./src/plugins/plugin-windsurf.ts"], + "@truenine/plugin-zed": ["./src/plugins/plugin-zed.ts"] }, "resolveJsonModule": true, "allowImportingTsExtensions": true, diff --git a/cli/tsdown.config.ts b/cli/tsdown.config.ts index 29bca6dc..a7835cd2 100644 --- a/cli/tsdown.config.ts +++ b/cli/tsdown.config.ts @@ -45,7 +45,8 @@ const pluginAliases: Record = { '@truenine/plugin-trae-ide': resolve('src/plugins/plugin-trae-ide.ts'), '@truenine/plugin-vscode': resolve('src/plugins/plugin-vscode.ts'), '@truenine/plugin-warp-ide': resolve('src/plugins/plugin-warp-ide.ts'), - '@truenine/plugin-windsurf': resolve('src/plugins/plugin-windsurf.ts') + '@truenine/plugin-windsurf': resolve('src/plugins/plugin-windsurf.ts'), + '@truenine/plugin-zed': resolve('src/plugins/plugin-zed.ts') } const noExternalDeps = [ diff --git a/cli/vite.config.ts b/cli/vite.config.ts index 0dfa24d3..1c390295 100644 --- a/cli/vite.config.ts +++ b/cli/vite.config.ts @@ -55,7 +55,8 @@ const pluginAliases: Record = { '@truenine/plugin-trae-ide': resolve('src/plugins/plugin-trae-ide.ts'), '@truenine/plugin-vscode': resolve('src/plugins/plugin-vscode.ts'), '@truenine/plugin-warp-ide': resolve('src/plugins/plugin-warp-ide.ts'), - '@truenine/plugin-windsurf': resolve('src/plugins/plugin-windsurf.ts') + '@truenine/plugin-windsurf': resolve('src/plugins/plugin-windsurf.ts'), + '@truenine/plugin-zed': resolve('src/plugins/plugin-zed.ts') } export default defineConfig({ diff --git a/doc/app/docs/[section]/[[...rest]]/page.tsx b/doc/app/docs/[section]/[[...rest]]/page.tsx new file mode 100644 index 00000000..2e6d5758 --- /dev/null +++ b/doc/app/docs/[section]/[[...rest]]/page.tsx @@ -0,0 +1,74 @@ +import type { ComponentType, ReactNode } from 'react' +import { notFound } from 'next/navigation' +import { generateStaticParamsFor, importPage } from 'nextra/pages' +import { useMDXComponents as getMDXComponents } from '../../../../mdx-components' +import { isDocSectionName } from '../../../../lib/docs-sections' + +const getAllDocParams = generateStaticParamsFor('mdxPath') + +function isSectionDocParam( + value: { mdxPath?: string[] }, +): value is { mdxPath: [string, ...string[]] } { + return value.mdxPath != null + && value.mdxPath.length > 0 + && isDocSectionName(value.mdxPath[0]) +} + +export async function generateStaticParams() { + const allParams = await getAllDocParams() + return (allParams as { mdxPath?: string[] }[]) + .filter(isSectionDocParam) + .map(p => ({ + section: p.mdxPath[0], + rest: p.mdxPath.length > 1 ? p.mdxPath.slice(1) : undefined, + })) +} + +export async function generateMetadata(props: { + readonly params: Promise<{ readonly section: string; readonly rest?: string[] }> +}) { + const params = await props.params + if (!isDocSectionName(params.section)) notFound() + const mdxPath = [params.section, ...(params.rest ?? [])] + const { metadata } = await importPage(mdxPath) + return metadata +} + +interface WrapperProps { + readonly children: ReactNode + readonly metadata: unknown + readonly sourceCode: string + readonly toc: unknown +} + +const components = getMDXComponents() as { + readonly wrapper?: ComponentType +} + +const Wrapper = components.wrapper + +export default async function SectionPage(props: { + readonly params: Promise<{ readonly section: string; readonly rest?: string[] }> +}) { + const params = await props.params + if (!isDocSectionName(params.section)) notFound() + const mdxPath = [params.section, ...(params.rest ?? [])] + const { + default: MDXContent, + toc, + metadata, + sourceCode, + } = await importPage(mdxPath) + + const page = + + if (!Wrapper) { + return page + } + + return ( + + {page} + + ) +} diff --git a/doc/app/docs/[section]/layout.tsx b/doc/app/docs/[section]/layout.tsx new file mode 100644 index 00000000..3899e889 --- /dev/null +++ b/doc/app/docs/[section]/layout.tsx @@ -0,0 +1,72 @@ +import type { ReactNode } from "react"; +import { notFound } from "next/navigation"; +import { Footer, Layout, Navbar } from "nextra-theme-docs"; +import { getPageMap } from "nextra/page-map"; +import { DocsSectionNav } from "../../../components/docs-section-nav"; +import { isDocSectionName } from "../../../lib/docs-sections"; +import { siteConfig } from "../../../lib/site"; + +export default async function SectionLayout({ + children, + params, +}: { + readonly children: ReactNode; + readonly params: Promise<{ readonly section: string }>; +}) { + const { section } = await params; + if (!isDocSectionName(section)) notFound(); + const pageMap = await getPageMap(`/docs/${section}`); + + return ( + + memory-sync + + } + > + + + } + footer={ +
AGPL-3.0-only · 面向当前仓库实现、命令表面与配置边界
+ } + docsRepositoryBase={`${siteConfig.docsRepositoryBase}/content`} + editLink="在 GitHub 上编辑此页" + feedback={{ + content: "有遗漏或过时信息?提交 issue", + link: siteConfig.issueUrl, + labels: "documentation", + }} + sidebar={{ + autoCollapse: false, + defaultMenuCollapseLevel: 99, + defaultOpen: true, + toggleButton: false, + }} + toc={{ + float: true, + title: "本页目录", + backToTop: "回到顶部", + }} + themeSwitch={{ + dark: "暗色", + light: "亮色", + system: "系统", + }} + nextThemes={{ + attribute: "class", + defaultTheme: "dark", + disableTransitionOnChange: true, + storageKey: "memory-sync-docs-theme", + }} + > + {children} +
+ ); +} diff --git a/doc/app/home-page.mdx b/doc/app/home-page.mdx index 68b7dc2c..e58babf1 100644 --- a/doc/app/home-page.mdx +++ b/doc/app/home-page.mdx @@ -26,12 +26,12 @@ import {

Documentation

面向多 AI 工具的 prompt 与 config sync 文档。

-

+

{siteConfig.productName} {' '} 以 MDX 维护源内容,通过 Rust-first / NAPI-first pipeline 将 prompts、rules、skills、commands 与 workspace memory 物化为目标工具原生配置。 -

+
diff --git a/doc/components/docs-section-nav.tsx b/doc/components/docs-section-nav.tsx new file mode 100644 index 00000000..05c616a8 --- /dev/null +++ b/doc/components/docs-section-nav.tsx @@ -0,0 +1,37 @@ +'use client' + +import Link from 'next/link' +import {useParams} from 'next/navigation' +import {DOC_SECTION_LINKS} from '../lib/docs-sections' + +export function DocsSectionNav() { + const params = useParams<{section?: string | string[]}>() + const currentSection = Array.isArray(params.section) ? params.section[0] : params.section + + return ( +
+
+ 一级文档分区 + + 切换后会更新左侧目录与右侧本页目录 + +
+
+ {DOC_SECTION_LINKS.map(link => { + const isActive = currentSection === link.section + + return ( + + {link.label} + + ) + })} +
+
+ ) +} diff --git a/doc/content/_meta.ts b/doc/content/_meta.ts index 097965df..e9e73e88 100644 --- a/doc/content/_meta.ts +++ b/doc/content/_meta.ts @@ -3,23 +3,18 @@ export default { title: '文档总览' }, 'cli': { - title: 'CLI', - display: 'children' + title: 'CLI' }, 'mcp': { - title: 'MCP', - display: 'children' + title: 'MCP' }, 'gui': { - title: 'GUI', - display: 'children' + title: 'GUI' }, 'technical-details': { - title: '技术细节', - display: 'children' + title: '技术细节' }, 'design-rationale': { - title: '设计初衷', - display: 'children' + title: '设计初衷' } } diff --git a/doc/lib/docs-sections.ts b/doc/lib/docs-sections.ts new file mode 100644 index 00000000..64833103 --- /dev/null +++ b/doc/lib/docs-sections.ts @@ -0,0 +1,25 @@ +export const DOC_SECTION_LINKS = [ + { href: "/docs/cli", label: "CLI", section: "cli" }, + { href: "/docs/mcp", label: "MCP", section: "mcp" }, + { href: "/docs/gui", label: "GUI", section: "gui" }, + { + href: "/docs/technical-details", + label: "技术细节", + section: "technical-details", + }, + { + href: "/docs/design-rationale", + label: "设计初衷", + section: "design-rationale", + }, +] as const; + +export type DocSectionName = (typeof DOC_SECTION_LINKS)[number]["section"]; + +export const DOC_SECTION_NAMES = new Set( + DOC_SECTION_LINKS.map((link) => link.section), +); + +export function isDocSectionName(value: string): value is DocSectionName { + return DOC_SECTION_NAMES.has(value as DocSectionName); +} diff --git a/doc/next.config.ts b/doc/next.config.ts index c87a0582..1b5fb83a 100644 --- a/doc/next.config.ts +++ b/doc/next.config.ts @@ -28,6 +28,10 @@ const withNextra = nextra({ }) const LEGACY_DOC_REDIRECTS = [ + { + source: '/docs', + destination: '/docs/cli' + }, { source: '/docs/quick-start/:path*', destination: '/docs/cli/:path*' From 1619a2d7edbc0487387fecf3d04c8f0547623b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= Date: Thu, 26 Mar 2026 14:35:42 +0800 Subject: [PATCH 2/4] Upgrade workspace dependencies to latest catalog versions --- pnpm-lock.yaml | 1121 ++++++++++++++++++------------------------- pnpm-workspace.yaml | 26 +- 2 files changed, 488 insertions(+), 659 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f96088f..e19f0479 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ catalogs: specifier: ^10.0.1 version: 10.0.1 '@modelcontextprotocol/sdk': - specifier: ^1.27.1 - version: 1.27.1 + specifier: ^1.28.0 + version: 1.28.0 '@monaco-editor/react': specifier: ^4.7.0 version: 4.7.0 @@ -31,14 +31,14 @@ catalogs: specifier: ^4.2.2 version: 4.2.2 '@tanstack/react-router': - specifier: ^1.168.2 - version: 1.168.2 + specifier: ^1.168.4 + version: 1.168.4 '@tanstack/router-generator': - specifier: ^1.166.16 - version: 1.166.16 + specifier: ^1.166.18 + version: 1.166.18 '@tanstack/router-plugin': - specifier: ^1.167.3 - version: 1.167.3 + specifier: ^1.167.5 + version: 1.167.5 '@tauri-apps/api': specifier: ^2.10.1 version: 2.10.1 @@ -88,8 +88,8 @@ catalogs: specifier: ^6.0.1 version: 6.0.1 '@vitest/coverage-v8': - specifier: 4.1.0 - version: 4.1.0 + specifier: 4.1.1 + version: 4.1.1 '@vue/eslint-config-prettier': specifier: ^10.2.0 version: 10.2.0 @@ -133,8 +133,8 @@ catalogs: specifier: ^1.32.0 version: 1.32.0 lucide-react: - specifier: ^0.577.0 - version: 0.577.0 + specifier: ^1.7.0 + version: 1.7.0 material-icon-theme: specifier: ^5.32.0 version: 5.32.0 @@ -166,8 +166,8 @@ catalogs: specifier: ^1.1.1 version: 1.1.1 picomatch: - specifier: ^4.0.3 - version: 4.0.3 + specifier: ^4.0.4 + version: 4.0.4 prettier: specifier: ^3.8.1 version: 3.8.1 @@ -178,8 +178,8 @@ catalogs: specifier: ^19.2.4 version: 19.2.4 recharts: - specifier: ^3.8.0 - version: 3.8.0 + specifier: ^3.8.1 + version: 3.8.1 remark-frontmatter: specifier: ^5.0.0 version: 5.0.0 @@ -202,8 +202,8 @@ catalogs: specifier: ^4.2.2 version: 4.2.2 tsdown: - specifier: ^0.21.4 - version: 0.21.4 + specifier: ^0.21.5 + version: 0.21.5 tsx: specifier: ^4.21.0 version: 4.21.0 @@ -214,20 +214,20 @@ catalogs: specifier: ^1.4.0 version: 1.4.0 typescript: - specifier: ^5.9.3 - version: 5.9.3 + specifier: ^6.0.2 + version: 6.0.2 typescript-eslint: - specifier: ^8.57.1 - version: 8.57.1 + specifier: ^8.57.2 + version: 8.57.2 unified: specifier: ^11.0.5 version: 11.0.5 vite: - specifier: ^8.0.1 - version: 8.0.1 + specifier: ^8.0.2 + version: 8.0.2 vitest: - specifier: ^4.1.0 - version: 4.1.0 + specifier: ^4.1.1 + version: 4.1.1 yaml: specifier: ^2.8.3 version: 2.8.3 @@ -244,7 +244,7 @@ importers: devDependencies: '@antfu/eslint-config': specifier: 'catalog:' - version: 7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3))(@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) + version: 7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) '@eslint/js': specifier: 'catalog:' version: 10.0.1(eslint@10.1.0(jiti@2.6.1)) @@ -256,19 +256,19 @@ importers: version: 16.2.1 '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(008768b0db849d7ad5b9882306ac58fa) + version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 '@unocss/eslint-config': specifier: 'catalog:' - version: 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + version: 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) '@vue/eslint-config-prettier': specifier: 'catalog:' version: 10.2.0(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) '@vue/eslint-config-typescript': specifier: 'catalog:' - version: 14.7.0(eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + version: 14.7.0(eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: specifier: 'catalog:' version: 10.1.0(jiti@2.6.1) @@ -280,7 +280,7 @@ importers: version: 5.5.5(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) eslint-plugin-vue: specifier: 'catalog:' - version: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) + version: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) fast-check: specifier: 'catalog:' version: 4.6.0 @@ -295,7 +295,7 @@ importers: version: 2.13.1 tsdown: specifier: 'catalog:' - version: 0.21.4(synckit@0.11.12)(typescript@5.9.3) + version: 0.21.5(synckit@0.11.12)(typescript@6.0.2) tsx: specifier: 'catalog:' version: 4.21.0 @@ -304,16 +304,16 @@ importers: version: 2.8.20 typescript: specifier: 'catalog:' - version: 5.9.3 + version: 6.0.2 typescript-eslint: specifier: 'catalog:' - version: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + version: 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) vite: specifier: 'catalog:' - version: 8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + version: 8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) cli: dependencies: @@ -347,7 +347,7 @@ importers: version: 4.0.2 '@vitest/coverage-v8': specifier: 'catalog:' - version: 4.1.0(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) + version: 4.1.1(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) fast-glob: specifier: 'catalog:' version: 3.3.3 @@ -365,13 +365,13 @@ importers: version: 1.1.1 picomatch: specifier: 'catalog:' - version: 4.0.3 + version: 4.0.4 tsx: specifier: 'catalog:' version: 4.21.0 vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) zod-to-json-schema: specifier: 'catalog:' version: 3.25.1(zod@4.3.6) @@ -415,10 +415,10 @@ importers: version: 16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) nextra: specifier: 'catalog:' - version: 4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3) + version: 4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@6.0.2) nextra-theme-docs: specifier: 'catalog:' - version: 4.6.1(@types/react@19.2.14)(immer@11.1.4)(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(nextra@4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4)) + version: 4.6.1(@types/react@19.2.14)(immer@11.1.4)(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(nextra@4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@6.0.2))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4)) react: specifier: 'catalog:' version: 19.2.4 @@ -428,7 +428,7 @@ importers: devDependencies: '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(008768b0db849d7ad5b9882306ac58fa) + version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -455,7 +455,7 @@ importers: version: 4.21.0 typescript: specifier: 'catalog:' - version: 5.9.3 + version: 6.0.2 yaml: specifier: 'catalog:' version: 2.8.3 @@ -467,16 +467,16 @@ importers: version: 4.7.0(monaco-editor@0.55.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@tailwindcss/vite': specifier: 'catalog:' - version: 4.2.2(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.2.2(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) '@tanstack/react-router': specifier: 'catalog:' - version: 1.168.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + version: 1.168.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@tanstack/router-generator': specifier: 'catalog:' - version: 1.166.16 + version: 1.166.18 '@tanstack/router-plugin': specifier: 'catalog:' - version: 1.167.3(@tanstack/react-router@1.168.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 1.167.5(@tanstack/react-router@1.168.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) '@tauri-apps/api': specifier: 'catalog:' version: 2.10.1 @@ -497,7 +497,7 @@ importers: version: 19.2.3(@types/react@19.2.14) '@vitejs/plugin-react': specifier: 'catalog:' - version: 6.0.1(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 6.0.1(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) class-variance-authority: specifier: 'catalog:' version: 0.7.1 @@ -509,7 +509,7 @@ importers: version: 4.6.0 lucide-react: specifier: 'catalog:' - version: 0.577.0(react@19.2.4) + version: 1.7.0(react@19.2.4) material-icon-theme: specifier: 'catalog:' version: 5.32.0 @@ -524,7 +524,7 @@ importers: version: 19.2.4(react@19.2.4) recharts: specifier: 'catalog:' - version: 3.8.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react-is@19.2.4)(react@19.2.4)(redux@5.0.1) + version: 3.8.1(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react-is@19.2.4)(react@19.2.4)(redux@5.0.1) tailwind-merge: specifier: 'catalog:' version: 3.5.0 @@ -536,7 +536,7 @@ importers: version: 1.4.0 vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) libraries/logger: devDependencies: @@ -548,13 +548,13 @@ importers: version: 8.0.4 tsdown: specifier: 'catalog:' - version: 0.21.4(synckit@0.11.12)(typescript@5.9.3) + version: 0.21.5(synckit@0.11.12)(typescript@6.0.2) typescript: specifier: 'catalog:' - version: 5.9.3 + version: 6.0.2 vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) libraries/md-compiler: devDependencies: @@ -593,16 +593,16 @@ importers: version: 11.0.0 tsdown: specifier: 'catalog:' - version: 0.21.4(synckit@0.11.12)(typescript@5.9.3) + version: 0.21.5(synckit@0.11.12)(typescript@6.0.2) typescript: specifier: 'catalog:' - version: 5.9.3 + version: 6.0.2 unified: specifier: 'catalog:' version: 11.0.5 vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) yaml: specifier: 'catalog:' version: 2.8.3 @@ -614,7 +614,7 @@ importers: version: 3.5.1(@emnapi/runtime@1.9.1)(@types/node@25.5.0) '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(008768b0db849d7ad5b9882306ac58fa) + version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -629,19 +629,19 @@ importers: version: 8.0.4 tsdown: specifier: 'catalog:' - version: 0.21.4(synckit@0.11.12)(typescript@5.9.3) + version: 0.21.5(synckit@0.11.12)(typescript@6.0.2) typescript: specifier: 'catalog:' - version: 5.9.3 + version: 6.0.2 vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) mcp: dependencies: '@modelcontextprotocol/sdk': specifier: 'catalog:' - version: 1.27.1(zod@4.3.6) + version: 1.28.0(zod@4.3.6) '@truenine/memory-sync-cli': specifier: workspace:* version: link:../cli @@ -651,7 +651,7 @@ importers: devDependencies: '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(008768b0db849d7ad5b9882306ac58fa) + version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -663,16 +663,16 @@ importers: version: 8.0.4 tsdown: specifier: 'catalog:' - version: 0.21.4(synckit@0.11.12)(typescript@5.9.3) + version: 0.21.5(synckit@0.11.12)(typescript@6.0.2) tsx: specifier: 'catalog:' version: 4.21.0 typescript: specifier: 'catalog:' - version: 5.9.3 + version: 6.0.2 vitest: specifier: 'catalog:' - version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + version: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) packages: @@ -1502,8 +1502,8 @@ packages: '@mermaid-js/parser@1.0.1': resolution: {integrity: sha512-opmV19kN1JsK0T6HhhokHpcVkqKpF+x2pPDKKM2ThHtZAB5F4PROopk0amuVYK5qMrIA4erzpNm8gmPNJgMDxQ==} - '@modelcontextprotocol/sdk@1.27.1': - resolution: {integrity: sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==} + '@modelcontextprotocol/sdk@1.28.0': + resolution: {integrity: sha512-gmloF+i+flI8ouQK7MWW4mOwuMh4RePBuPFAEPC6+pdqyWOUMDOixb6qZ69owLJpz6XmyllCouc4t8YWO+E2Nw==} engines: {node: '>=18'} peerDependencies: '@cfworker/json-schema': ^4.1.1 @@ -2098,11 +2098,8 @@ packages: resolution: {integrity: sha512-XRO0zi2NIUKq2lUk3T1ecFSld1fMWRKE6naRFGkgkdeosx7IslyUKNv5Dcb5PJTja9tHJoFu0v/7yEpAkrkrTg==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@oxc-project/types@0.115.0': - resolution: {integrity: sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw==} - - '@oxc-project/types@0.120.0': - resolution: {integrity: sha512-k1YNu55DuvAip/MGE1FTsIuU3FUCn6v/ujG9V7Nq5Df/kX2CWb13hhwD0lmJGMGqE+bE1MXvv9SZVnMzEXlWcg==} + '@oxc-project/types@0.122.0': + resolution: {integrity: sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==} '@oxfmt/binding-android-arm-eabi@0.35.0': resolution: {integrity: sha512-BaRKlM3DyG81y/xWTsE6gZiv89F/3pHe2BqX2H4JbiB8HNVlWWtplzgATAE5IDSdwChdeuWLDTQzJ92Lglw3ZA==} @@ -2311,205 +2308,107 @@ packages: react-redux: optional: true - '@rolldown/binding-android-arm64@1.0.0-rc.10': - resolution: {integrity: sha512-jOHxwXhxmFKuXztiu1ORieJeTbx5vrTkcOkkkn2d35726+iwhrY1w/+nYY/AGgF12thg33qC3R1LMBF5tHTZHg==} + '@rolldown/binding-android-arm64@1.0.0-rc.11': + resolution: {integrity: sha512-SJ+/g+xNnOh6NqYxD0V3uVN4W3VfnrGsC9/hoglicgTNfABFG9JjISvkkU0dNY84MNHLWyOgxP9v9Y9pX4S7+A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-android-arm64@1.0.0-rc.9': - resolution: {integrity: sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg==} + '@rolldown/binding-darwin-arm64@1.0.0-rc.11': + resolution: {integrity: sha512-7WQgR8SfOPwmDZGFkThUvsmd/nwAWv91oCO4I5LS7RKrssPZmOt7jONN0cW17ydGC1n/+puol1IpoieKqQidmg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] - os: [android] - - '@rolldown/binding-darwin-arm64@1.0.0-rc.10': - resolution: {integrity: sha512-gED05Teg/vtTZbIJBc4VNMAxAFDUPkuO/rAIyyxZjTj1a1/s6z5TII/5yMGZ0uLRCifEtwUQn8OlYzuYc0m70w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [darwin] - - '@rolldown/binding-darwin-arm64@1.0.0-rc.9': - resolution: {integrity: sha512-J7Zk3kLYFsLtuH6U+F4pS2sYVzac0qkjcO5QxHS7OS7yZu2LRs+IXo+uvJ/mvpyUljDJ3LROZPoQfgBIpCMhdQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [darwin] - - '@rolldown/binding-darwin-x64@1.0.0-rc.10': - resolution: {integrity: sha512-rI15NcM1mA48lqrIxVkHfAqcyFLcQwyXWThy+BQ5+mkKKPvSO26ir+ZDp36AgYoYVkqvMcdS8zOE6SeBsR9e8A==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-rc.9': - resolution: {integrity: sha512-iwtmmghy8nhfRGeNAIltcNXzD0QMNaaA5U/NyZc1Ia4bxrzFByNMDoppoC+hl7cDiUq5/1CnFthpT9n+UtfFyg==} + '@rolldown/binding-darwin-x64@1.0.0-rc.11': + resolution: {integrity: sha512-39Ks6UvIHq4rEogIfQBoBRusj0Q0nPVWIvqmwBLaT6aqQGIakHdESBVOPRRLacy4WwUPIx4ZKzfZ9PMW+IeyUQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-rc.10': - resolution: {integrity: sha512-XZRXHdTa+4ME1MuDVp021+doQ+z6Ei4CCFmNc5/sKbqb8YmkiJdj8QKlV3rCI0AJtAeSB5n0WGPuJWNL9p/L2w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [freebsd] - - '@rolldown/binding-freebsd-x64@1.0.0-rc.9': - resolution: {integrity: sha512-DLFYI78SCiZr5VvdEplsVC2Vx53lnA4/Ga5C65iyldMVaErr86aiqCoNBLl92PXPfDtUYjUh+xFFor40ueNs4Q==} + '@rolldown/binding-freebsd-x64@1.0.0-rc.11': + resolution: {integrity: sha512-jfsm0ZHfhiqrvWjJAmzsqiIFPz5e7mAoCOPBNTcNgkiid/LaFKiq92+0ojH+nmJmKYkre4t71BWXUZDNp7vsag==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.10': - resolution: {integrity: sha512-R0SQMRluISSLzFE20sPWYHVmJdDQnRyc/FzSCN72BqQmh2SOZUFG+N3/vBZpR4C6WpEUVYJLrYUXaj43sJsNLA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': - resolution: {integrity: sha512-CsjTmTwd0Hri6iTw/DRMK7kOZ7FwAkrO4h8YWKoX/kcj833e4coqo2wzIFywtch/8Eb5enQ/lwLM7w6JX1W5RQ==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.11': + resolution: {integrity: sha512-zjQaUtSyq1nVe3nxmlSCuR96T1LPlpvmJ0SZy0WJFEsV4kFbXcq2u68L4E6O0XeFj4aex9bEauqjW8UQBeAvfQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.10': - resolution: {integrity: sha512-Y1reMrV/o+cwpduYhJuOE3OMKx32RMYCidf14y+HssARRmhDuWXJ4yVguDg2R/8SyyGNo+auzz64LnPK9Hq6jg==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.11': + resolution: {integrity: sha512-WMW1yE6IOnehTcFE9eipFkm3XN63zypWlrJQ2iF7NrQ9b2LDRjumFoOGJE8RJJTJCTBAdmLMnJ8uVitACUUo1Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': - resolution: {integrity: sha512-2x9O2JbSPxpxMDhP9Z74mahAStibTlrBMW0520+epJH5sac7/LwZW5Bmg/E6CXuEF53JJFW509uP+lSedaUNxg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-arm64-musl@1.0.0-rc.10': - resolution: {integrity: sha512-vELN+HNb2IzuzSBUOD4NHmP9yrGwl1DVM29wlQvx1OLSclL0NgVWnVDKl/8tEks79EFek/kebQKnNJkIAA4W2g==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': - resolution: {integrity: sha512-JA1QRW31ogheAIRhIg9tjMfsYbglXXYGNPLdPEYrwFxdbkQCAzvpSCSHCDWNl4hTtrol8WeboCSEpjdZK8qrCg==} + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.11': + resolution: {integrity: sha512-jfndI9tsfm4APzjNt6QdBkYwre5lRPUgHeDHoI7ydKUuJvz3lZeCfMsI56BZj+7BYqiKsJm7cfd/6KYV7ubrBg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.10': - resolution: {integrity: sha512-ZqrufYTgzxbHwpqOjzSsb0UV/aV2TFIY5rP8HdsiPTv/CuAgCRjM6s9cYFwQ4CNH+hf9Y4erHW1GjZuZ7WoI7w==} + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.11': + resolution: {integrity: sha512-ZlFgw46NOAGMgcdvdYwAGu2Q+SLFA9LzbJLW+iyMOJyhj5wk6P3KEE9Gct4xWwSzFoPI7JCdYmYMzVtlgQ+zfw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': - resolution: {integrity: sha512-aOKU9dJheda8Kj8Y3w9gnt9QFOO+qKPAl8SWd7JPHP+Cu0EuDAE5wokQubLzIDQWg2myXq2XhTpOVS07qqvT+w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.10': - resolution: {integrity: sha512-gSlmVS1FZJSRicA6IyjoRoKAFK7IIHBs7xJuHRSmjImqk3mPPWbR7RhbnfH2G6bcmMEllCt2vQ/7u9e6bBnByg==} + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.11': + resolution: {integrity: sha512-hIOYmuT6ofM4K04XAZd3OzMySEO4K0/nc9+jmNcxNAxRi6c5UWpqfw3KMFV4MVFWL+jQsSh+bGw2VqmaPMTLyw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': - resolution: {integrity: sha512-OalO94fqj7IWRn3VdXWty75jC5dk4C197AWEuMhIpvVv2lw9fiPhud0+bW2ctCxb3YoBZor71QHbY+9/WToadA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-x64-gnu@1.0.0-rc.10': - resolution: {integrity: sha512-eOCKUpluKgfObT2pHjztnaWEIbUabWzk3qPZ5PuacuPmr4+JtQG4k2vGTY0H15edaTnicgU428XW/IH6AimcQw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': - resolution: {integrity: sha512-cVEl1vZtBsBZna3YMjGXNvnYYrOJ7RzuWvZU0ffvJUexWkukMaDuGhUXn0rjnV0ptzGVkvc+vW9Yqy6h8YX4pg==} + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.11': + resolution: {integrity: sha512-qXBQQO9OvkjjQPLdUVr7Nr2t3QTZI7s4KZtfw7HzBgjbmAPSFwSv4rmET9lLSgq3rH/ndA3ngv3Qb8l2njoPNA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-musl@1.0.0-rc.10': - resolution: {integrity: sha512-Xdf2jQbfQowJnLcgYfD/m0Uu0Qj5OdxKallD78/IPPfzaiaI4KRAwZzHcKQ4ig1gtg1SuzC7jovNiM2TzQsBXA==} + '@rolldown/binding-linux-x64-musl@1.0.0-rc.11': + resolution: {integrity: sha512-/tpFfoSTzUkH9LPY+cYbqZBDyyX62w5fICq9qzsHLL8uTI6BHip3Q9Uzft0wylk/i8OOwKik8OxW+QAhDmzwmg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': - resolution: {integrity: sha512-UzYnKCIIc4heAKgI4PZ3dfBGUZefGCJ1TPDuLHoCzgrMYPb5Rv6TLFuYtyM4rWyHM7hymNdsg5ik2C+UD9VDbA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rolldown/binding-openharmony-arm64@1.0.0-rc.10': - resolution: {integrity: sha512-o1hYe8hLi1EY6jgPFyxQgQ1wcycX+qz8eEbVmot2hFkgUzPxy9+kF0u0NIQBeDq+Mko47AkaFFaChcvZa9UX9Q==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [openharmony] - - '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': - resolution: {integrity: sha512-+6zoiF+RRyf5cdlFQP7nm58mq7+/2PFaY2DNQeD4B87N36JzfF/l9mdBkkmTvSYcYPE8tMh/o3cRlsx1ldLfog==} + '@rolldown/binding-openharmony-arm64@1.0.0-rc.11': + resolution: {integrity: sha512-mcp3Rio2w72IvdZG0oQ4bM2c2oumtwHfUfKncUM6zGgz0KgPz4YmDPQfnXEiY5t3+KD/i8HG2rOB/LxdmieK2g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-rc.10': - resolution: {integrity: sha512-Ugv9o7qYJudqQO5Y5y2N2SOo6S4WiqiNOpuQyoPInnhVzCY+wi/GHltcLHypG9DEUYMB0iTB/huJrpadiAcNcA==} + '@rolldown/binding-wasm32-wasi@1.0.0-rc.11': + resolution: {integrity: sha512-LXk5Hii1Ph9asuGRjBuz8TUxdc1lWzB7nyfdoRgI0WGPZKmCxvlKk8KfYysqtr4MfGElu/f/pEQRh8fcEgkrWw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': - resolution: {integrity: sha512-rgFN6sA/dyebil3YTlL2evvi/M+ivhfnyxec7AccTpRPccno/rPoNlqybEZQBkcbZu8Hy+eqNJCqfBR8P7Pg8g==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.10': - resolution: {integrity: sha512-7UODQb4fQUNT/vmgDZBl3XOBAIOutP5R3O/rkxg0aLfEGQ4opbCgU5vOw/scPe4xOqBwL9fw7/RP1vAMZ6QlAQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [win32] - - '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': - resolution: {integrity: sha512-lHVNUG/8nlF1IQk1C0Ci574qKYyty2goMiPlRqkC5R+3LkXDkL5Dhx8ytbxq35m+pkHVIvIxviD+TWLdfeuadA==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.11': + resolution: {integrity: sha512-dDwf5otnx0XgRY1yqxOC4ITizcdzS/8cQ3goOWv3jFAo4F+xQYni+hnMuO6+LssHHdJW7+OCVL3CoU4ycnh35Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-rc.10': - resolution: {integrity: sha512-PYxKHMVHOb5NJuDL53vBUl1VwUjymDcYI6rzpIni0C9+9mTiJedvUxSk7/RPp7OOAm3v+EjgMu9bIy3N6b408w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [win32] - - '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': - resolution: {integrity: sha512-G0oA4+w1iY5AGi5HcDTxWsoxF509hrFIPB2rduV5aDqS9FtDg1CAfa7V34qImbjfhIcA8C+RekocJZA96EarwQ==} + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.11': + resolution: {integrity: sha512-LN4/skhSggybX71ews7dAj6r2geaMJfm3kMbK2KhFMg9B10AZXnKoLCVVgzhMHL0S+aKtr4p8QbAW8k+w95bAA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-rc.10': - resolution: {integrity: sha512-UkVDEFk1w3mveXeKgaTuYfKWtPbvgck1dT8TUG3bnccrH0XtLTuAyfCoks4Q/M5ZGToSVJTIQYCzy2g/atAOeg==} + '@rolldown/pluginutils@1.0.0-rc.11': + resolution: {integrity: sha512-xQO9vbwBecJRv9EUcQ/y0dzSTJgA7Q6UVN7xp6B81+tBGSLVAK03yJ9NkJaUA7JFD91kbjxRSC/mDnmvXzbHoQ==} '@rolldown/pluginutils@1.0.0-rc.7': resolution: {integrity: sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==} - '@rolldown/pluginutils@1.0.0-rc.9': - resolution: {integrity: sha512-w6oiRWgEBl04QkFZgmW+jnU1EC9b57Oihi2ot3HNWIQRqgHp5PnYDia5iZ5FF7rpa4EQdiqMDXjlqKGXBhsoXw==} - '@shikijs/core@3.23.0': resolution: {integrity: sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==} @@ -2656,15 +2555,15 @@ packages: resolution: {integrity: sha512-NaOGLRrddszbQj9upGat6HG/4TKvXLvu+osAIgfxPYA+eIvYKv8GKDJOrY2D3/U9MRnKfMWD7bU4jeD4xmqyIg==} engines: {node: '>=20.19'} - '@tanstack/react-router@1.168.2': - resolution: {integrity: sha512-zUDRM01m81xDCeTLHuqsvKR9zpf+bdfEhyadcUNSbO1930lIeOKLmMscUUNHWhc7Gqpi/V8Xl85QcJFAIAGmvQ==} + '@tanstack/react-router@1.168.4': + resolution: {integrity: sha512-1o6B0Gddlzxmw1hQkqfJC5X67P/bDaP3kVQA0X6HHO2P8e724xKiiY9V3eAOJw9YIHqmWIFewWJgzcFOgR67dA==} engines: {node: '>=20.19'} peerDependencies: react: '>=18.0.0 || >=19.0.0' react-dom: '>=18.0.0 || >=19.0.0' - '@tanstack/react-store@0.9.2': - resolution: {integrity: sha512-Vt5usJE5sHG/cMechQfmwvwne6ktGCELe89Lmvoxe3LKRoFrhPa8OCKWs0NliG8HTJElEIj7PLtaBQIcux5pAQ==} + '@tanstack/react-store@0.9.3': + resolution: {integrity: sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -2675,22 +2574,22 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - '@tanstack/router-core@1.168.2': - resolution: {integrity: sha512-9wHR7syfY7y/qrvTvv8bugh6mrKk58TuiSQp44nbGW0BpE2+IIta1DBeL5jHr9AD1a+c5fVKSu/JXsKeniUc9w==} + '@tanstack/router-core@1.168.4': + resolution: {integrity: sha512-dhkan3B1KPDNT90UDSNtMbtedIbtI+WpYReE4d2GlgtA9m1w3FkrXe8az2UOIwKAtDea2Qlc8yv3st4Jro/gNQ==} engines: {node: '>=20.19'} hasBin: true - '@tanstack/router-generator@1.166.16': - resolution: {integrity: sha512-5C9PUY8tGfx+J528SYt3MrvlbNy4pSfiiWpfAJ4dYPGkvMqc/NHbpt/cm7MaKKB1iVI/r0ZvbZGjYM1RKQGLtw==} + '@tanstack/router-generator@1.166.18': + resolution: {integrity: sha512-6zqp8LFRyCtBFEkRv7TCkmql6I8y9c+deTivbZwJZyl4DYULsmg4eh+Du4j11grEIG1atHxLONfmkKmzCp0a3w==} engines: {node: '>=20.19'} - '@tanstack/router-plugin@1.167.3': - resolution: {integrity: sha512-mnaT0T3BtTvn5b7A31wchsh9cEeRjwhsvMtkVqtOmNKwviL6M9QdmwnfwqUK4YQslmaVSe6qoDsAN3gCF4tJDw==} + '@tanstack/router-plugin@1.167.5': + resolution: {integrity: sha512-0VLmmCn5qKyohfTxsJjgY4fKI7FaPAmSgpRctslasIb3FpwFFlYkpDw+jyAJ8Pbcc/ri+FZpa3JaHkL8ZTuMsw==} engines: {node: '>=20.19'} hasBin: true peerDependencies: '@rsbuild/core': '>=1.0.2' - '@tanstack/react-router': ^1.168.2 + '@tanstack/react-router': ^1.168.4 vite: '>=5.0.0 || >=6.0.0 || >=7.0.0' vite-plugin-solid: ^2.11.10 webpack: '>=5.92.0' @@ -2710,8 +2609,8 @@ packages: resolution: {integrity: sha512-nRcYw+w2OEgK6VfjirYvGyPLOK+tZQz1jkYcmH5AjMamQ9PycnlxZF2aEZtPpNoUsaceX2bHptn6Ub5hGXqNvw==} engines: {node: '>=20.19'} - '@tanstack/store@0.9.2': - resolution: {integrity: sha512-K013lUJEFJK2ofFQ/hZKJUmCnpcV00ebLyOyFOWQvyQHUOZp/iYO84BM6aOGiV81JzwbX0APTVmW8YI7yiG5oA==} + '@tanstack/store@0.9.3': + resolution: {integrity: sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw==} '@tanstack/virtual-core@3.13.23': resolution: {integrity: sha512-zSz2Z2HNyLjCplANTDyl3BcdQJc2k1+yyFoKhNRmCr7V7dY8o8q5m8uFTI1/Pg1kL+Hgrz6u3Xo6eFUB7l66cg==} @@ -3036,11 +2935,11 @@ packages: '@types/use-sync-external-store@0.0.6': resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} - '@typescript-eslint/eslint-plugin@8.57.1': - resolution: {integrity: sha512-Gn3aqnvNl4NGc6x3/Bqk1AOn0thyTU9bqDRhiRnUWezgvr2OnhYCWCgC8zXXRVqBsIL1pSDt7T9nJUe0oM0kDQ==} + '@typescript-eslint/eslint-plugin@8.57.2': + resolution: {integrity: sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.57.1 + '@typescript-eslint/parser': ^8.57.2 eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' @@ -3051,8 +2950,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.57.1': - resolution: {integrity: sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw==} + '@typescript-eslint/parser@8.57.2': + resolution: {integrity: sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -3064,8 +2963,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.57.1': - resolution: {integrity: sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg==} + '@typescript-eslint/project-service@8.57.2': + resolution: {integrity: sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -3080,8 +2979,8 @@ packages: resolution: {integrity: sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.57.1': - resolution: {integrity: sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg==} + '@typescript-eslint/scope-manager@8.57.2': + resolution: {integrity: sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/tsconfig-utils@8.56.1': @@ -3090,14 +2989,14 @@ packages: peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/tsconfig-utils@8.57.1': - resolution: {integrity: sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg==} + '@typescript-eslint/tsconfig-utils@8.57.2': + resolution: {integrity: sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.57.1': - resolution: {integrity: sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA==} + '@typescript-eslint/type-utils@8.57.2': + resolution: {integrity: sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -3107,8 +3006,8 @@ packages: resolution: {integrity: sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.57.1': - resolution: {integrity: sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==} + '@typescript-eslint/types@8.57.2': + resolution: {integrity: sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.56.1': @@ -3117,8 +3016,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/typescript-estree@8.57.1': - resolution: {integrity: sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g==} + '@typescript-eslint/typescript-estree@8.57.2': + resolution: {integrity: sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -3130,8 +3029,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.57.1': - resolution: {integrity: sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ==} + '@typescript-eslint/utils@8.57.2': + resolution: {integrity: sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -3141,8 +3040,8 @@ packages: resolution: {integrity: sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.57.1': - resolution: {integrity: sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==} + '@typescript-eslint/visitor-keys@8.57.2': + resolution: {integrity: sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/vfs@1.6.4': @@ -3188,11 +3087,11 @@ packages: babel-plugin-react-compiler: optional: true - '@vitest/coverage-v8@4.1.0': - resolution: {integrity: sha512-nDWulKeik2bL2Va/Wl4x7DLuTKAXa906iRFooIRPR+huHkcvp9QDkPQ2RJdmjOFrqOqvNfoSQLF68deE3xC3CQ==} + '@vitest/coverage-v8@4.1.1': + resolution: {integrity: sha512-nZ4RWwGCoGOQRMmU/Q9wlUY540RVRxJZ9lxFsFfy0QV7Zmo5VVBhB6Sl9Xa0KIp2iIs3zWfPlo9LcY1iqbpzCw==} peerDependencies: - '@vitest/browser': 4.1.0 - vitest: 4.1.0 + '@vitest/browser': 4.1.1 + vitest: 4.1.1 peerDependenciesMeta: '@vitest/browser': optional: true @@ -3213,34 +3112,34 @@ packages: vitest: optional: true - '@vitest/expect@4.1.0': - resolution: {integrity: sha512-EIxG7k4wlWweuCLG9Y5InKFwpMEOyrMb6ZJ1ihYu02LVj/bzUwn2VMU+13PinsjRW75XnITeFrQBMH5+dLvCDA==} + '@vitest/expect@4.1.1': + resolution: {integrity: sha512-xAV0fqBTk44Rn6SjJReEQkHP3RrqbJo6JQ4zZ7/uVOiJZRarBtblzrOfFIZeYUrukp2YD6snZG6IBqhOoHTm+A==} - '@vitest/mocker@4.1.0': - resolution: {integrity: sha512-evxREh+Hork43+Y4IOhTo+h5lGmVRyjqI739Rz4RlUPqwrkFFDF6EMvOOYjTx4E8Tl6gyCLRL8Mu7Ry12a13Tw==} + '@vitest/mocker@4.1.1': + resolution: {integrity: sha512-h3BOylsfsCLPeceuCPAAJ+BvNwSENgJa4hXoXu4im0bs9Lyp4URc4JYK4pWLZ4pG/UQn7AT92K6IByi6rE6g3A==} peerDependencies: msw: ^2.4.9 - vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@4.1.0': - resolution: {integrity: sha512-3RZLZlh88Ib0J7NQTRATfc/3ZPOnSUn2uDBUoGNn5T36+bALixmzphN26OUD3LRXWkJu4H0s5vvUeqBiw+kS0A==} + '@vitest/pretty-format@4.1.1': + resolution: {integrity: sha512-GM+TEQN5WhOygr1lp7skeVjdLPqqWMHsfzXrcHAqZJi/lIVh63H0kaRCY8MDhNWikx19zBUK8ceaLB7X5AH9NQ==} - '@vitest/runner@4.1.0': - resolution: {integrity: sha512-Duvx2OzQ7d6OjchL+trw+aSrb9idh7pnNfxrklo14p3zmNL4qPCDeIJAK+eBKYjkIwG96Bc6vYuxhqDXQOWpoQ==} + '@vitest/runner@4.1.1': + resolution: {integrity: sha512-f7+FPy75vN91QGWsITueq0gedwUZy1fLtHOCMeQpjs8jTekAHeKP80zfDEnhrleviLHzVSDXIWuCIOFn3D3f8A==} - '@vitest/snapshot@4.1.0': - resolution: {integrity: sha512-0Vy9euT1kgsnj1CHttwi9i9o+4rRLEaPRSOJ5gyv579GJkNpgJK+B4HSv/rAWixx2wdAFci1X4CEPjiu2bXIMg==} + '@vitest/snapshot@4.1.1': + resolution: {integrity: sha512-kMVSgcegWV2FibXEx9p9WIKgje58lcTbXgnJixfcg15iK8nzCXhmalL0ZLtTWLW9PH1+1NEDShiFFedB3tEgWg==} - '@vitest/spy@4.1.0': - resolution: {integrity: sha512-pz77k+PgNpyMDv2FV6qmk5ZVau6c3R8HC8v342T2xlFxQKTrSeYw9waIJG8KgV9fFwAtTu4ceRzMivPTH6wSxw==} + '@vitest/spy@4.1.1': + resolution: {integrity: sha512-6Ti/KT5OVaiupdIZEuZN7l3CZcR0cxnxt70Z0//3CtwgObwA6jZhmVBA3yrXSVN3gmwjgd7oDNLlsXz526gpRA==} - '@vitest/utils@4.1.0': - resolution: {integrity: sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw==} + '@vitest/utils@4.1.1': + resolution: {integrity: sha512-cNxAlaB3sHoCdL6pj6yyUXv9Gry1NHNg0kFTXdvSIZXLHsqKH7chiWOkwJ5s5+d/oMwcoG9T0bKU38JZWKusrQ==} '@vue/compiler-core@3.5.26': resolution: {integrity: sha512-vXyI5GMfuoBCnv5ucIT7jhHKl55Y477yxP6fc4eUswjP8FG3FFVFd41eNDArR+Uk3QKn2Z85NavjaxLxOC19/w==} @@ -3387,8 +3286,8 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - brace-expansion@5.0.4: - resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==} + brace-expansion@5.0.5: + resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} braces@3.0.3: @@ -3420,8 +3319,8 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - caniuse-lite@1.0.30001780: - resolution: {integrity: sha512-llngX0E7nQci5BPJDqoZSbuZ5Bcs9F5db7EtgfwBerX9XGtkkiO4NwfDDIRzHTTwcYC8vC7bmeUEPGrKlR/TkQ==} + caniuse-lite@1.0.30001781: + resolution: {integrity: sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -3770,8 +3669,8 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - delaunator@5.0.1: - resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} + delaunator@5.1.0: + resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} @@ -3792,8 +3691,8 @@ packages: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - diff@8.0.3: - resolution: {integrity: sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==} + diff@8.0.4: + resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==} engines: {node: '>=0.3.1'} dompurify@3.2.7: @@ -3818,8 +3717,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.321: - resolution: {integrity: sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ==} + electron-to-chromium@1.5.325: + resolution: {integrity: sha512-PwfIw7WQSt3xX7yOf5OE/unLzsK9CaN2f/FvV3WjPR1Knoc1T9vePRVV4W1EM301JzzysK51K7FNKcusCr0zYA==} emnapi@1.9.1: resolution: {integrity: sha512-s4RbfzgbYg9cWBZXJT6LazImJQ5p+F+LyTsCWQJXbGVdPmtCtdlwqd0Oiv3O51KyYV/Hq58xszaQ/l153tK6Uw==} @@ -3903,8 +3802,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-flat-gitignore@2.2.1: - resolution: {integrity: sha512-wA5EqN0era7/7Gt5Botlsfin/UNY0etJSEeBgbUlFLFrBi47rAN//+39fI7fpYcl8RENutlFtvp/zRa/M/pZNg==} + eslint-config-flat-gitignore@2.3.0: + resolution: {integrity: sha512-bg4ZLGgoARg1naWfsINUUb/52Ksw/K22K+T16D38Y8v+/sGwwIYrGvH/JBjOin+RQtxxC9tzNNiy4shnGtGyyQ==} peerDependencies: eslint: ^9.5.0 || ^10.0.0 @@ -4425,8 +4324,8 @@ packages: hastscript@9.0.1: resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} - hono@4.12.8: - resolution: {integrity: sha512-VJCEvtrezO1IAR+kqEYnxUOoStaQPGrCmX3j4wDTNOcD1uRPFpGlwQUIW8niPuvHXaTUxeOUl5MMDGrl+tmO9A==} + hono@4.12.9: + resolution: {integrity: sha512-wy3T8Zm2bsEvxKZM5w21VdHDDcwVS1yUFFY6i8UobSsKfFceT7TOwhbhfKsDyx7tYQlmRM5FLpIuYvNFyjctiA==} engines: {node: '>=16.9.0'} hookable@6.1.0: @@ -4651,8 +4550,8 @@ packages: jsonfile@6.2.0: resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} - katex@0.16.40: - resolution: {integrity: sha512-1DJcK/L05k1Y9Gf7wMcyuqFOL6BiY3vY0CFcAM/LPRN04NALxcl6u7lOWNsp3f/bCHWxigzQl6FbR95XJ4R84Q==} + katex@0.16.42: + resolution: {integrity: sha512-sZ4jqyEXfHTLEFK+qsFYToa3UZ0rtFcPGwKpyiRYh2NJn8obPWOQ+/u7ux0F6CAU/y78+Mksh1YkxTPXTh47TQ==} hasBin: true keyv@4.5.4: @@ -4773,8 +4672,8 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lucide-react@0.577.0: - resolution: {integrity: sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==} + lucide-react@1.7.0: + resolution: {integrity: sha512-yI7BeItCLZJTXikmK4KNUGCKoGzSvbKlfCvw44bU4fXAL6v3gYS4uHD1jzsLkfwODYwI6Drw5Tu9Z5ulDe0TSg==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -5246,12 +5145,12 @@ packages: picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} pidtree@0.6.0: @@ -5392,8 +5291,8 @@ packages: resolution: {integrity: sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==} engines: {node: '>= 4'} - recharts@3.8.0: - resolution: {integrity: sha512-Z/m38DX3L73ExO4Tpc9/iZWHmHnlzWG4njQbxsF5aSjwqmHNDDIm0rdEBArkwsBvR8U6EirlEHiQNYWCVh9sGQ==} + recharts@3.8.1: + resolution: {integrity: sha512-mwzmO1s9sFL0TduUpwndxCUNoXsBw3u3E/0+A+cLcrSfQitSG62L32N69GhqUrrT5qKcAE3pCGVINC6pqkBBQg==} engines: {node: '>=18'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -5549,13 +5448,8 @@ packages: vue-tsc: optional: true - rolldown@1.0.0-rc.10: - resolution: {integrity: sha512-q7j6vvarRFmKpgJUT8HCAUljkgzEp4LAhPlJUvQhA5LA1SUL36s5QCysMutErzL3EbNOZOkoziSx9iZC4FddKA==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - - rolldown@1.0.0-rc.9: - resolution: {integrity: sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q==} + rolldown@1.0.0-rc.11: + resolution: {integrity: sha512-NRjoKMusSjfRbSYiH3VSumlkgFe7kYAa3pzVOsVYVFY3zb5d7nS+a3KGQ7hJKXuYWbzJKPVQ9Wxq2UvyK+ENpw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -5769,8 +5663,8 @@ packages: tailwindcss@4.2.2: resolution: {integrity: sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q==} - tapable@2.3.0: - resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} + tapable@2.3.2: + resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==} engines: {node: '>=6'} tiny-invariant@1.3.3: @@ -5843,17 +5737,17 @@ packages: ts-morph@27.0.2: resolution: {integrity: sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w==} - tsdown@0.21.4: - resolution: {integrity: sha512-Q/kBi8SXkr4X6JI/NAZKZY1UuiEcbuXtIskL4tZCsgpDiEPM/2W6lC+OonNA31S+V3KsWedFvbFDBs23hvt+Aw==} + tsdown@0.21.5: + resolution: {integrity: sha512-TlgNhfPioAD6ECCUnZsxcUsXXuPPR4Rrxz3az741kL/M3oGIET4a9GajSNRNRx+jIva73TYUKQybrEPkDYN+fQ==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: '@arethetypeswrong/core': ^0.18.1 - '@tsdown/css': 0.21.4 - '@tsdown/exe': 0.21.4 + '@tsdown/css': 0.21.5 + '@tsdown/exe': 0.21.5 '@vitejs/devtools': '*' publint: ^0.3.0 - typescript: ^5.0.0 + typescript: ^5.0.0 || ^6.0.0 unplugin-unused: ^0.5.0 peerDependenciesMeta: '@arethetypeswrong/core': @@ -5905,8 +5799,8 @@ packages: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} - typescript-eslint@8.57.1: - resolution: {integrity: sha512-fLvZWf+cAGw3tqMCYzGIU6yR8K+Y9NT2z23RwOjlNFF2HwSB3KhdEFI5lSBv8tNmFkkBShSjsCjzx1vahZfISA==} + typescript-eslint@8.57.2: + resolution: {integrity: sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -5917,6 +5811,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@6.0.2: + resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} + engines: {node: '>=14.17'} + hasBin: true + ufo@1.6.3: resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} @@ -5980,8 +5879,8 @@ packages: resolution: {integrity: sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==} engines: {node: '>=18.12.0'} - unrun@0.2.32: - resolution: {integrity: sha512-opd3z6791rf281JdByf0RdRQrpcc7WyzqittqIXodM/5meNWdTwrVxeyzbaCp4/Rgls/um14oUaif1gomO8YGg==} + unrun@0.2.33: + resolution: {integrity: sha512-urXTjZHOHS6lMnatQerLcBpcTsaKZYGuu9aSZ+HlNfCApkiINRbj7YecC9h9hdZroMT4WQ4KVyzHfBqHKuFX9Q==} engines: {node: '>=20.19.0'} hasBin: true peerDependencies: @@ -6027,8 +5926,8 @@ packages: victory-vendor@37.3.6: resolution: {integrity: sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==} - vite@8.0.1: - resolution: {integrity: sha512-wt+Z2qIhfFt85uiyRt5LPU4oVEJBXj8hZNWKeqFG4gRG/0RaRGJ7njQCwzFVjO+v4+Ipmf5CY7VdmZRAYYBPHw==} + vite@8.0.2: + resolution: {integrity: sha512-1gFhNi+bHhRE/qKZOJXACm6tX4bA3Isy9KuKF15AgSRuRazNBOJfdDemPBU16/mpMxApDPrWvZ08DcLPEoRnuA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -6070,21 +5969,21 @@ packages: yaml: optional: true - vitest@4.1.0: - resolution: {integrity: sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw==} + vitest@4.1.1: + resolution: {integrity: sha512-yF+o4POL41rpAzj5KVILUxm1GCjKnELvaqmU9TLLUbMfDzuN0UpUR9uaDs+mCtjPe+uYPksXDRLQGGPvj1cTmA==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.0 - '@vitest/browser-preview': 4.1.0 - '@vitest/browser-webdriverio': 4.1.0 - '@vitest/ui': 4.1.0 + '@vitest/browser-playwright': 4.1.1 + '@vitest/browser-preview': 4.1.1 + '@vitest/browser-webdriverio': 4.1.1 + '@vitest/ui': 4.1.1 happy-dom: '*' jsdom: '*' - vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -6222,7 +6121,7 @@ packages: snapshots: - '@antfu/eslint-config@7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3))(@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)))': + '@antfu/eslint-config@7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)))': dependencies: '@antfu/install-pkg': 1.1.0 '@clack/prompts': 1.1.0 @@ -6230,29 +6129,29 @@ snapshots: '@eslint-community/eslint-plugin-eslint-comments': 4.7.1(eslint@10.1.0(jiti@2.6.1)) '@eslint/markdown': 7.5.1 '@stylistic/eslint-plugin': 5.10.0(eslint@10.1.0(jiti@2.6.1)) - '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@vitest/eslint-plugin': 1.6.13(@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) + '@typescript-eslint/eslint-plugin': 8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/parser': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@vitest/eslint-plugin': 1.6.13(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) ansis: 4.2.0 cac: 7.0.0 eslint: 10.1.0(jiti@2.6.1) - eslint-config-flat-gitignore: 2.2.1(eslint@10.1.0(jiti@2.6.1)) + eslint-config-flat-gitignore: 2.3.0(eslint@10.1.0(jiti@2.6.1)) eslint-flat-config-utils: 3.0.2 eslint-merge-processors: 2.0.0(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-antfu: 3.2.2(eslint@10.1.0(jiti@2.6.1)) - eslint-plugin-command: 3.5.2(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3))(@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-command: 3.5.2(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-import-lite: 0.5.2(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-jsdoc: 62.8.0(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-jsonc: 3.1.2(eslint@10.1.0(jiti@2.6.1)) - eslint-plugin-n: 17.24.0(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-n: 17.24.0(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint-plugin-no-only-tests: 3.3.0 - eslint-plugin-perfectionist: 5.7.0(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + eslint-plugin-perfectionist: 5.7.0(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint-plugin-pnpm: 1.6.0(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-regexp: 3.1.0(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-toml: 1.3.1(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-unicorn: 63.0.0(eslint@10.1.0(jiti@2.6.1)) - eslint-plugin-unused-imports: 4.4.1(@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1)) - eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) + eslint-plugin-unused-imports: 4.4.1(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) eslint-plugin-yml: 3.3.1(eslint@10.1.0(jiti@2.6.1)) eslint-processor-vue-blocks: 2.0.0(@vue/compiler-sfc@3.5.26)(eslint@10.1.0(jiti@2.6.1)) globals: 17.4.0 @@ -6263,7 +6162,7 @@ snapshots: yaml-eslint-parser: 2.0.0 optionalDependencies: '@next/eslint-plugin-next': 16.2.1 - '@unocss/eslint-plugin': 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@unocss/eslint-plugin': 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint-plugin-format: 2.0.1(eslint@10.1.0(jiti@2.6.1)) transitivePeerDependencies: - '@eslint/json' @@ -6476,7 +6375,7 @@ snapshots: '@es-joy/jsdoccomment@0.84.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.57.1 + '@typescript-eslint/types': 8.57.2 comment-parser: 1.4.5 esquery: 1.7.0 jsdoc-type-pratt-parser: 7.1.1 @@ -6669,9 +6568,9 @@ snapshots: react-dom: 19.2.4(react@19.2.4) use-sync-external-store: 1.6.0(react@19.2.4) - '@hono/node-server@1.19.11(hono@4.12.8)': + '@hono/node-server@1.19.11(hono@4.12.9)': dependencies: - hono: 4.12.8 + hono: 4.12.9 '@humanfs/core@0.19.1': {} @@ -6961,9 +6860,9 @@ snapshots: dependencies: langium: 4.2.1 - '@modelcontextprotocol/sdk@1.27.1(zod@4.3.6)': + '@modelcontextprotocol/sdk@1.28.0(zod@4.3.6)': dependencies: - '@hono/node-server': 1.19.11(hono@4.12.8) + '@hono/node-server': 1.19.11(hono@4.12.9) ajv: 8.18.0 ajv-formats: 3.0.1(ajv@8.18.0) content-type: 1.0.5 @@ -6973,7 +6872,7 @@ snapshots: eventsource-parser: 3.0.6 express: 5.2.1 express-rate-limit: 8.3.1(express@5.2.1) - hono: 4.12.8 + hono: 4.12.9 jose: 6.2.2 json-schema-typed: 8.0.2 pkce-challenge: 5.0.1 @@ -7409,9 +7308,7 @@ snapshots: '@ota-meshi/ast-token-store@0.3.0': {} - '@oxc-project/types@0.115.0': {} - - '@oxc-project/types@0.120.0': {} + '@oxc-project/types@0.122.0': {} '@oxfmt/binding-android-arm-eabi@0.35.0': optional: true @@ -7555,106 +7452,57 @@ snapshots: react: 19.2.4 react-redux: 9.2.0(@types/react@19.2.14)(react@19.2.4)(redux@5.0.1) - '@rolldown/binding-android-arm64@1.0.0-rc.10': - optional: true - - '@rolldown/binding-android-arm64@1.0.0-rc.9': - optional: true - - '@rolldown/binding-darwin-arm64@1.0.0-rc.10': - optional: true - - '@rolldown/binding-darwin-arm64@1.0.0-rc.9': - optional: true - - '@rolldown/binding-darwin-x64@1.0.0-rc.10': - optional: true - - '@rolldown/binding-darwin-x64@1.0.0-rc.9': - optional: true - - '@rolldown/binding-freebsd-x64@1.0.0-rc.10': - optional: true - - '@rolldown/binding-freebsd-x64@1.0.0-rc.9': - optional: true - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.10': - optional: true - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': - optional: true - - '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.10': - optional: true - - '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': - optional: true - - '@rolldown/binding-linux-arm64-musl@1.0.0-rc.10': - optional: true - - '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': + '@rolldown/binding-android-arm64@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.10': + '@rolldown/binding-darwin-arm64@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': + '@rolldown/binding-darwin-x64@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.10': + '@rolldown/binding-freebsd-x64@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-rc.10': + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-rc.10': + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.11': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.11': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-rc.10': + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.11': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + '@rolldown/binding-linux-x64-musl@1.0.0-rc.11': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-rc.10': - dependencies: - '@napi-rs/wasm-runtime': 1.1.1 + '@rolldown/binding-openharmony-arm64@1.0.0-rc.11': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': + '@rolldown/binding-wasm32-wasi@1.0.0-rc.11': dependencies: '@napi-rs/wasm-runtime': 1.1.1 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.10': - optional: true - - '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': - optional: true - - '@rolldown/binding-win32-x64-msvc@1.0.0-rc.10': + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.11': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.11': optional: true - '@rolldown/pluginutils@1.0.0-rc.10': {} + '@rolldown/pluginutils@1.0.0-rc.11': {} '@rolldown/pluginutils@1.0.0-rc.7': {} - '@rolldown/pluginutils@1.0.0-rc.9': {} - '@shikijs/core@3.23.0': dependencies: '@shikijs/types': 3.23.0 @@ -7681,12 +7529,12 @@ snapshots: dependencies: '@shikijs/types': 3.23.0 - '@shikijs/twoslash@3.23.0(typescript@5.9.3)': + '@shikijs/twoslash@3.23.0(typescript@6.0.2)': dependencies: '@shikijs/core': 3.23.0 '@shikijs/types': 3.23.0 - twoslash: 0.3.6(typescript@5.9.3) - typescript: 5.9.3 + twoslash: 0.3.6(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -7706,12 +7554,12 @@ snapshots: '@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1))': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) - '@typescript-eslint/types': 8.57.1 + '@typescript-eslint/types': 8.57.2 eslint: 10.1.0(jiti@2.6.1) eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.3 + picomatch: 4.0.4 '@swc/helpers@0.5.15': dependencies: @@ -7782,27 +7630,27 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.2.2 '@tailwindcss/oxide-win32-x64-msvc': 4.2.2 - '@tailwindcss/vite@4.2.2(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': + '@tailwindcss/vite@4.2.2(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@tailwindcss/node': 4.2.2 '@tailwindcss/oxide': 4.2.2 tailwindcss: 4.2.2 - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + vite: 8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) '@tanstack/history@1.161.6': {} - '@tanstack/react-router@1.168.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@tanstack/react-router@1.168.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: '@tanstack/history': 1.161.6 - '@tanstack/react-store': 0.9.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@tanstack/router-core': 1.168.2 + '@tanstack/react-store': 0.9.3(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + '@tanstack/router-core': 1.168.4 isbot: 5.1.36 react: 19.2.4 react-dom: 19.2.4(react@19.2.4) - '@tanstack/react-store@0.9.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@tanstack/react-store@0.9.3(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: - '@tanstack/store': 0.9.2 + '@tanstack/store': 0.9.3 react: 19.2.4 react-dom: 19.2.4(react@19.2.4) use-sync-external-store: 1.6.0(react@19.2.4) @@ -7813,16 +7661,16 @@ snapshots: react: 19.2.4 react-dom: 19.2.4(react@19.2.4) - '@tanstack/router-core@1.168.2': + '@tanstack/router-core@1.168.4': dependencies: '@tanstack/history': 1.161.6 cookie-es: 2.0.0 seroval: 1.5.1 seroval-plugins: 1.5.1(seroval@1.5.1) - '@tanstack/router-generator@1.166.16': + '@tanstack/router-generator@1.166.18': dependencies: - '@tanstack/router-core': 1.168.2 + '@tanstack/router-core': 1.168.4 '@tanstack/router-utils': 1.161.6 '@tanstack/virtual-file-routes': 1.161.7 prettier: 3.8.1 @@ -7833,7 +7681,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.167.3(@tanstack/react-router@1.168.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': + '@tanstack/router-plugin@1.167.5(@tanstack/react-router@1.168.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-syntax-jsx': 7.28.6(@babel/core@7.29.0) @@ -7841,16 +7689,16 @@ snapshots: '@babel/template': 7.28.6 '@babel/traverse': 7.29.0 '@babel/types': 7.29.0 - '@tanstack/router-core': 1.168.2 - '@tanstack/router-generator': 1.166.16 + '@tanstack/router-core': 1.168.4 + '@tanstack/router-generator': 1.166.18 '@tanstack/router-utils': 1.161.6 '@tanstack/virtual-file-routes': 1.161.7 chokidar: 3.6.0 unplugin: 2.3.11 zod: 3.25.76 optionalDependencies: - '@tanstack/react-router': 1.168.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + '@tanstack/react-router': 1.168.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + vite: 8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) transitivePeerDependencies: - supports-color @@ -7862,13 +7710,13 @@ snapshots: '@babel/types': 7.29.0 ansis: 4.2.0 babel-dead-code-elimination: 1.0.12 - diff: 8.0.3 + diff: 8.0.4 pathe: 2.0.3 tinyglobby: 0.2.15 transitivePeerDependencies: - supports-color - '@tanstack/store@0.9.2': {} + '@tanstack/store@0.9.3': {} '@tanstack/virtual-core@3.13.23': {} @@ -7942,21 +7790,21 @@ snapshots: npm-to-yarn: 3.0.1 unist-util-visit: 5.1.0 - '@truenine/eslint10-config@2026.10318.10138(008768b0db849d7ad5b9882306ac58fa)': + '@truenine/eslint10-config@2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44)': dependencies: - '@antfu/eslint-config': 7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3))(@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) + '@antfu/eslint-config': 7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) '@eslint/js': 10.0.1(eslint@10.1.0(jiti@2.6.1)) '@next/eslint-plugin-next': 16.2.1 - '@unocss/eslint-config': 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@unocss/eslint-config': 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) '@vue/eslint-config-prettier': 10.2.0(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) - '@vue/eslint-config-typescript': 14.7.0(eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@vue/eslint-config-typescript': 14.7.0(eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) eslint-plugin-format: 2.0.1(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-prettier: 5.5.5(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) - eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) + eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) prettier: 3.8.1 typescript: 5.9.3 - typescript-eslint: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) '@ts-morph/common@0.28.1': dependencies: @@ -8179,69 +8027,69 @@ snapshots: '@types/use-sync-external-store@0.0.6': {} - '@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.57.1 + '@typescript-eslint/parser': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.57.2 + '@typescript-eslint/type-utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.57.2 eslint: 10.1.0(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@typescript-eslint/scope-manager': 8.56.1 '@typescript-eslint/types': 8.56.1 - '@typescript-eslint/typescript-estree': 8.56.1(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.56.1(typescript@6.0.2) '@typescript-eslint/visitor-keys': 8.56.1 debug: 4.4.3 eslint: 10.1.0(jiti@2.6.1) - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.57.1 + '@typescript-eslint/scope-manager': 8.57.2 + '@typescript-eslint/types': 8.57.2 + '@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.57.2 debug: 4.4.3 eslint: 10.1.0(jiti@2.6.1) - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.56.1(typescript@5.9.3)': + '@typescript-eslint/project-service@8.56.1(typescript@6.0.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.56.1(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.56.1(typescript@6.0.2) '@typescript-eslint/types': 8.56.1 debug: 4.4.3 - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.57.1(typescript@5.9.3)': + '@typescript-eslint/project-service@8.57.2(typescript@6.0.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3) - '@typescript-eslint/types': 8.57.1 + '@typescript-eslint/tsconfig-utils': 8.57.2(typescript@6.0.2) + '@typescript-eslint/types': 8.57.2 debug: 4.4.3 - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/parser': 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.56.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.56.1(typescript@6.0.2) + '@typescript-eslint/utils': 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) ajv: 6.14.0 eslint: 10.1.0(jiti@2.6.1) json-stable-stringify-without-jsonify: 1.0.1 @@ -8256,84 +8104,84 @@ snapshots: '@typescript-eslint/types': 8.56.1 '@typescript-eslint/visitor-keys': 8.56.1 - '@typescript-eslint/scope-manager@8.57.1': + '@typescript-eslint/scope-manager@8.57.2': dependencies: - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/visitor-keys': 8.57.1 + '@typescript-eslint/types': 8.57.2 + '@typescript-eslint/visitor-keys': 8.57.2 - '@typescript-eslint/tsconfig-utils@8.56.1(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.56.1(typescript@6.0.2)': dependencies: - typescript: 5.9.3 + typescript: 6.0.2 - '@typescript-eslint/tsconfig-utils@8.57.1(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.57.2(typescript@6.0.2)': dependencies: - typescript: 5.9.3 + typescript: 6.0.2 - '@typescript-eslint/type-utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/types': 8.57.2 + '@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) debug: 4.4.3 eslint: 10.1.0(jiti@2.6.1) - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.56.1': {} - '@typescript-eslint/types@8.57.1': {} + '@typescript-eslint/types@8.57.2': {} - '@typescript-eslint/typescript-estree@8.56.1(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.56.1(typescript@6.0.2)': dependencies: - '@typescript-eslint/project-service': 8.56.1(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.56.1(typescript@5.9.3) + '@typescript-eslint/project-service': 8.56.1(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.56.1(typescript@6.0.2) '@typescript-eslint/types': 8.56.1 '@typescript-eslint/visitor-keys': 8.56.1 debug: 4.4.3 minimatch: 10.2.4 semver: 7.7.4 tinyglobby: 0.2.15 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3)': + '@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2)': dependencies: - '@typescript-eslint/project-service': 8.57.1(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/visitor-keys': 8.57.1 + '@typescript-eslint/project-service': 8.57.2(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.57.2(typescript@6.0.2) + '@typescript-eslint/types': 8.57.2 + '@typescript-eslint/visitor-keys': 8.57.2 debug: 4.4.3 minimatch: 10.2.4 semver: 7.7.4 tinyglobby: 0.2.15 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.56.1 '@typescript-eslint/types': 8.56.1 - '@typescript-eslint/typescript-estree': 8.56.1(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.56.1(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.57.2 + '@typescript-eslint/types': 8.57.2 + '@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -8342,15 +8190,15 @@ snapshots: '@typescript-eslint/types': 8.56.1 eslint-visitor-keys: 5.0.1 - '@typescript-eslint/visitor-keys@8.57.1': + '@typescript-eslint/visitor-keys@8.57.2': dependencies: - '@typescript-eslint/types': 8.57.1 + '@typescript-eslint/types': 8.57.2 eslint-visitor-keys: 5.0.1 - '@typescript/vfs@1.6.4(typescript@5.9.3)': + '@typescript/vfs@1.6.4(typescript@6.0.2)': dependencies: debug: 4.4.3 - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -8365,17 +8213,17 @@ snapshots: '@unocss/core@66.6.7': {} - '@unocss/eslint-config@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@unocss/eslint-config@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@unocss/eslint-plugin': 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@unocss/eslint-plugin': 66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) transitivePeerDependencies: - eslint - supports-color - typescript - '@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) '@unocss/config': 66.6.7 '@unocss/core': 66.6.7 '@unocss/rule-utils': 66.6.7 @@ -8396,15 +8244,15 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@vitejs/plugin-react@6.0.1(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': + '@vitejs/plugin-react@6.0.1(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.7 - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + vite: 8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) - '@vitest/coverage-v8@4.1.0(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)))': + '@vitest/coverage-v8@4.1.1(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)))': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/utils': 4.1.0 + '@vitest/utils': 4.1.1 ast-v8-to-istanbul: 1.0.0 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 @@ -8413,58 +8261,58 @@ snapshots: obug: 2.1.1 std-env: 4.0.0 tinyrainbow: 3.1.0 - vitest: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + vitest: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) - '@vitest/eslint-plugin@1.6.13(@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)))': + '@vitest/eslint-plugin@1.6.13(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)))': dependencies: - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.57.2 + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - typescript: 5.9.3 - vitest: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + '@typescript-eslint/eslint-plugin': 8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + typescript: 6.0.2 + vitest: 4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) transitivePeerDependencies: - supports-color - '@vitest/expect@4.1.0': + '@vitest/expect@4.1.1': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.0 - '@vitest/utils': 4.1.0 + '@vitest/spy': 4.1.1 + '@vitest/utils': 4.1.1 chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.0(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': + '@vitest/mocker@4.1.1(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))': dependencies: - '@vitest/spy': 4.1.0 + '@vitest/spy': 4.1.1 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + vite: 8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) - '@vitest/pretty-format@4.1.0': + '@vitest/pretty-format@4.1.1': dependencies: tinyrainbow: 3.1.0 - '@vitest/runner@4.1.0': + '@vitest/runner@4.1.1': dependencies: - '@vitest/utils': 4.1.0 + '@vitest/utils': 4.1.1 pathe: 2.0.3 - '@vitest/snapshot@4.1.0': + '@vitest/snapshot@4.1.1': dependencies: - '@vitest/pretty-format': 4.1.0 - '@vitest/utils': 4.1.0 + '@vitest/pretty-format': 4.1.1 + '@vitest/utils': 4.1.1 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.0': {} + '@vitest/spy@4.1.1': {} - '@vitest/utils@4.1.0': + '@vitest/utils@4.1.1': dependencies: - '@vitest/pretty-format': 4.1.0 + '@vitest/pretty-format': 4.1.1 convert-source-map: 2.0.0 tinyrainbow: 3.1.0 @@ -8507,16 +8355,16 @@ snapshots: transitivePeerDependencies: - '@types/eslint' - '@vue/eslint-config-typescript@14.7.0(eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)': + '@vue/eslint-config-typescript@14.7.0(eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) - eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) + eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) fast-glob: 3.3.3 - typescript-eslint: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) vue-eslint-parser: 10.4.0(eslint@10.1.0(jiti@2.6.1)) optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -8560,7 +8408,7 @@ snapshots: anymatch@3.1.3: dependencies: normalize-path: 3.0.0 - picomatch: 2.3.1 + picomatch: 2.3.2 are-docs-informative@0.0.2: {} @@ -8632,7 +8480,7 @@ snapshots: boolbase@1.0.0: {} - brace-expansion@5.0.4: + brace-expansion@5.0.5: dependencies: balanced-match: 4.0.4 @@ -8643,8 +8491,8 @@ snapshots: browserslist@4.28.1: dependencies: baseline-browser-mapping: 2.10.10 - caniuse-lite: 1.0.30001780 - electron-to-chromium: 1.5.321 + caniuse-lite: 1.0.30001781 + electron-to-chromium: 1.5.325 node-releases: 2.0.36 update-browserslist-db: 1.2.3(browserslist@4.28.1) @@ -8664,7 +8512,7 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 - caniuse-lite@1.0.30001780: {} + caniuse-lite@1.0.30001781: {} ccount@2.0.1: {} @@ -8843,7 +8691,7 @@ snapshots: d3-delaunay@6.0.4: dependencies: - delaunator: 5.0.1 + delaunator: 5.1.0 d3-dispatch@3.0.1: {} @@ -9006,7 +8854,7 @@ snapshots: defu@6.1.4: {} - delaunator@5.0.1: + delaunator@5.1.0: dependencies: robust-predicates: 3.0.3 @@ -9022,7 +8870,7 @@ snapshots: diff-sequences@29.6.3: {} - diff@8.0.3: {} + diff@8.0.4: {} dompurify@3.2.7: optionalDependencies: @@ -9042,7 +8890,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.321: {} + electron-to-chromium@1.5.325: {} emnapi@1.9.1: {} @@ -9053,7 +8901,7 @@ snapshots: enhanced-resolve@5.20.1: dependencies: graceful-fs: 4.2.11 - tapable: 2.3.0 + tapable: 2.3.2 entities@6.0.1: {} @@ -9129,7 +8977,7 @@ snapshots: eslint: 10.1.0(jiti@2.6.1) semver: 7.7.4 - eslint-config-flat-gitignore@2.2.1(eslint@10.1.0(jiti@2.6.1)): + eslint-config-flat-gitignore@2.3.0(eslint@10.1.0(jiti@2.6.1)): dependencies: '@eslint/compat': 2.0.3(eslint@10.1.0(jiti@2.6.1)) eslint: 10.1.0(jiti@2.6.1) @@ -9164,12 +9012,12 @@ snapshots: dependencies: eslint: 10.1.0(jiti@2.6.1) - eslint-plugin-command@3.5.2(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3))(@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1)): + eslint-plugin-command@3.5.2(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1)): dependencies: '@es-joy/jsdoccomment': 0.84.0 - '@typescript-eslint/rule-tester': 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/rule-tester': 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) eslint-plugin-depend@1.5.0(eslint@10.1.0(jiti@2.6.1)): @@ -9238,7 +9086,7 @@ snapshots: transitivePeerDependencies: - '@eslint/json' - eslint-plugin-n@17.24.0(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-n@17.24.0(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) enhanced-resolve: 5.20.1 @@ -9249,15 +9097,15 @@ snapshots: globrex: 0.1.2 ignore: 5.3.2 semver: 7.7.4 - ts-declaration-location: 1.0.7(typescript@5.9.3) + ts-declaration-location: 1.0.7(typescript@6.0.2) transitivePeerDependencies: - typescript eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-perfectionist@5.7.0(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-perfectionist@5.7.0(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) natural-orderby: 5.0.0 transitivePeerDependencies: @@ -9326,13 +9174,13 @@ snapshots: semver: 7.7.4 strip-indent: 4.1.1 - eslint-plugin-unused-imports@4.4.1(@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1)): + eslint-plugin-unused-imports@4.4.1(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1)): dependencies: eslint: 10.1.0(jiti@2.6.1) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) - eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))): + eslint-plugin-vue@10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0(jiti@2.6.1)) eslint: 10.1.0(jiti@2.6.1) @@ -9344,7 +9192,7 @@ snapshots: xml-name-validator: 4.0.0 optionalDependencies: '@stylistic/eslint-plugin': 5.10.0(eslint@10.1.0(jiti@2.6.1)) - '@typescript-eslint/parser': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint-plugin-yml@3.3.1(eslint@10.1.0(jiti@2.6.1)): dependencies: @@ -9602,9 +9450,9 @@ snapshots: dependencies: format: 0.2.2 - fdir@6.5.0(picomatch@4.0.3): + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: - picomatch: 4.0.3 + picomatch: 4.0.4 file-entry-cache@8.0.0: dependencies: @@ -9859,7 +9707,7 @@ snapshots: property-information: 7.1.0 space-separated-tokens: 2.0.2 - hono@4.12.8: {} + hono@4.12.9: {} hookable@6.1.0: {} @@ -10025,7 +9873,7 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - katex@0.16.40: + katex@0.16.42: dependencies: commander: 8.3.0 @@ -10125,7 +9973,7 @@ snapshots: dependencies: yallist: 3.1.1 - lucide-react@0.577.0(react@19.2.4): + lucide-react@1.7.0(react@19.2.4): dependencies: react: 19.2.4 @@ -10378,7 +10226,7 @@ snapshots: dagre-d3-es: 7.0.14 dayjs: 1.11.20 dompurify: 3.3.3 - katex: 0.16.40 + katex: 0.16.42 khroma: 2.1.0 lodash-es: 4.17.23 marked: 16.4.2 @@ -10477,7 +10325,7 @@ snapshots: dependencies: '@types/katex': 0.16.8 devlop: 1.1.0 - katex: 0.16.40 + katex: 0.16.42 micromark-factory-space: 2.0.1 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 @@ -10673,7 +10521,7 @@ snapshots: micromatch@4.0.8: dependencies: braces: 3.0.3 - picomatch: 2.3.1 + picomatch: 2.3.2 mime-db@1.54.0: {} @@ -10685,7 +10533,7 @@ snapshots: minimatch@10.2.4: dependencies: - brace-expansion: 5.0.4 + brace-expansion: 5.0.5 mj-context-menu@0.6.1: {} @@ -10725,7 +10573,7 @@ snapshots: '@next/env': 16.2.1 '@swc/helpers': 0.5.15 baseline-browser-mapping: 2.10.10 - caniuse-lite: 1.0.30001780 + caniuse-lite: 1.0.30001781 postcss: 8.4.31 react: 19.2.4 react-dom: 19.2.4(react@19.2.4) @@ -10744,13 +10592,13 @@ snapshots: - '@babel/core' - babel-plugin-macros - nextra-theme-docs@4.6.1(@types/react@19.2.14)(immer@11.1.4)(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(nextra@4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4)): + nextra-theme-docs@4.6.1(@types/react@19.2.14)(immer@11.1.4)(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(nextra@4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@6.0.2))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4)): dependencies: '@headlessui/react': 2.2.9(react-dom@19.2.4(react@19.2.4))(react@19.2.4) clsx: 2.1.1 next: 16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) next-themes: 0.4.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - nextra: 4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3) + nextra: 4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@6.0.2) react: 19.2.4 react-compiler-runtime: 19.1.0-rc.3(react@19.2.4) react-dom: 19.2.4(react@19.2.4) @@ -10762,13 +10610,13 @@ snapshots: - immer - use-sync-external-store - nextra@4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3): + nextra@4.6.1(next@16.2.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@6.0.2): dependencies: '@formatjs/intl-localematcher': 0.6.2 '@headlessui/react': 2.2.9(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@mdx-js/mdx': 3.1.1 '@napi-rs/simple-git': 0.1.22 - '@shikijs/twoslash': 3.23.0(typescript@5.9.3) + '@shikijs/twoslash': 3.23.0(typescript@6.0.2) '@theguild/remark-mermaid': 0.3.0(react@19.2.4) '@theguild/remark-npm2yarn': 0.3.3 better-react-mathjax: 2.3.0(react@19.2.4) @@ -10778,7 +10626,7 @@ snapshots: fast-glob: 3.3.3 github-slugger: 2.0.0 hast-util-to-estree: 3.1.3 - katex: 0.16.40 + katex: 0.16.42 mdast-util-from-markdown: 2.0.3 mdast-util-gfm: 3.1.0 mdast-util-to-hast: 13.2.1 @@ -10825,7 +10673,7 @@ snapshots: ansi-styles: 6.2.3 cross-spawn: 7.0.6 memorystream: 0.3.1 - picomatch: 4.0.3 + picomatch: 4.0.4 pidtree: 0.6.0 read-package-json-fast: 4.0.0 shell-quote: 1.8.3 @@ -10974,9 +10822,9 @@ snapshots: picocolors@1.1.1: {} - picomatch@2.3.1: {} + picomatch@2.3.2: {} - picomatch@4.0.3: {} + picomatch@4.0.4: {} pidtree@0.6.0: {} @@ -11096,7 +10944,7 @@ snapshots: readdirp@3.6.0: dependencies: - picomatch: 2.3.1 + picomatch: 2.3.2 reading-time@1.5.0: {} @@ -11108,7 +10956,7 @@ snapshots: tiny-invariant: 1.3.3 tslib: 2.8.1 - recharts@3.8.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react-is@19.2.4)(react@19.2.4)(redux@5.0.1): + recharts@3.8.1(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react-is@19.2.4)(react@19.2.4)(redux@5.0.1): dependencies: '@reduxjs/toolkit': 2.11.2(react-redux@9.2.0(@types/react@19.2.14)(react@19.2.4)(redux@5.0.1))(react@19.2.4) clsx: 2.1.1 @@ -11194,7 +11042,7 @@ snapshots: '@types/katex': 0.16.8 hast-util-from-html-isomorphic: 2.0.0 hast-util-to-text: 4.0.2 - katex: 0.16.40 + katex: 0.16.42 unist-util-visit-parents: 6.0.2 vfile: 6.0.3 @@ -11340,7 +11188,7 @@ snapshots: robust-predicates@3.0.3: {} - rolldown-plugin-dts@0.22.5(rolldown@1.0.0-rc.9)(typescript@5.9.3): + rolldown-plugin-dts@0.22.5(rolldown@1.0.0-rc.11)(typescript@6.0.2): dependencies: '@babel/generator': 8.0.0-rc.2 '@babel/helper-validator-identifier': 8.0.0-rc.2 @@ -11351,53 +11199,32 @@ snapshots: dts-resolver: 2.1.3 get-tsconfig: 4.13.7 obug: 2.1.1 - rolldown: 1.0.0-rc.9 + rolldown: 1.0.0-rc.11 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - oxc-resolver - rolldown@1.0.0-rc.10: + rolldown@1.0.0-rc.11: dependencies: - '@oxc-project/types': 0.120.0 - '@rolldown/pluginutils': 1.0.0-rc.10 - optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-rc.10 - '@rolldown/binding-darwin-arm64': 1.0.0-rc.10 - '@rolldown/binding-darwin-x64': 1.0.0-rc.10 - '@rolldown/binding-freebsd-x64': 1.0.0-rc.10 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.10 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.10 - '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.10 - '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.10 - '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.10 - '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.10 - '@rolldown/binding-linux-x64-musl': 1.0.0-rc.10 - '@rolldown/binding-openharmony-arm64': 1.0.0-rc.10 - '@rolldown/binding-wasm32-wasi': 1.0.0-rc.10 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.10 - '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.10 - - rolldown@1.0.0-rc.9: - dependencies: - '@oxc-project/types': 0.115.0 - '@rolldown/pluginutils': 1.0.0-rc.9 + '@oxc-project/types': 0.122.0 + '@rolldown/pluginutils': 1.0.0-rc.11 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-rc.9 - '@rolldown/binding-darwin-arm64': 1.0.0-rc.9 - '@rolldown/binding-darwin-x64': 1.0.0-rc.9 - '@rolldown/binding-freebsd-x64': 1.0.0-rc.9 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.9 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.9 - '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.9 - '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.9 - '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.9 - '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.9 - '@rolldown/binding-linux-x64-musl': 1.0.0-rc.9 - '@rolldown/binding-openharmony-arm64': 1.0.0-rc.9 - '@rolldown/binding-wasm32-wasi': 1.0.0-rc.9 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.9 - '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.9 + '@rolldown/binding-android-arm64': 1.0.0-rc.11 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.11 + '@rolldown/binding-darwin-x64': 1.0.0-rc.11 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.11 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.11 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.11 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.11 + '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.11 + '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.11 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.11 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.11 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.11 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.11 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.11 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.11 roughjs@4.6.6: dependencies: @@ -11640,7 +11467,7 @@ snapshots: tailwindcss@4.2.2: {} - tapable@2.3.0: {} + tapable@2.3.2: {} tiny-invariant@1.3.3: {} @@ -11650,8 +11477,8 @@ snapshots: tinyglobby@0.2.15: dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 tinypool@2.1.0: {} @@ -11684,14 +11511,14 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.5.0(typescript@5.9.3): + ts-api-utils@2.5.0(typescript@6.0.2): dependencies: - typescript: 5.9.3 + typescript: 6.0.2 - ts-declaration-location@1.0.7(typescript@5.9.3): + ts-declaration-location@1.0.7(typescript@6.0.2): dependencies: - picomatch: 4.0.3 - typescript: 5.9.3 + picomatch: 4.0.4 + typescript: 6.0.2 ts-dedent@2.2.0: {} @@ -11700,7 +11527,7 @@ snapshots: '@ts-morph/common': 0.28.1 code-block-writer: 13.0.3 - tsdown@0.21.4(synckit@0.11.12)(typescript@5.9.3): + tsdown@0.21.5(synckit@0.11.12)(typescript@6.0.2): dependencies: ansis: 4.2.0 cac: 7.0.0 @@ -11709,17 +11536,17 @@ snapshots: hookable: 6.1.0 import-without-cache: 0.2.5 obug: 2.1.1 - picomatch: 4.0.3 - rolldown: 1.0.0-rc.9 - rolldown-plugin-dts: 0.22.5(rolldown@1.0.0-rc.9)(typescript@5.9.3) + picomatch: 4.0.4 + rolldown: 1.0.0-rc.11 + rolldown-plugin-dts: 0.22.5(rolldown@1.0.0-rc.11)(typescript@6.0.2) semver: 7.7.4 tinyexec: 1.0.4 tinyglobby: 0.2.15 tree-kill: 1.2.2 unconfig-core: 7.5.0 - unrun: 0.2.32(synckit@0.11.12) + unrun: 0.2.33(synckit@0.11.12) optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - '@ts-macro/tsc' - '@typescript/native-preview' @@ -11749,11 +11576,11 @@ snapshots: twoslash-protocol@0.3.6: {} - twoslash@0.3.6(typescript@5.9.3): + twoslash@0.3.6(typescript@6.0.2): dependencies: - '@typescript/vfs': 1.6.4(typescript@5.9.3) + '@typescript/vfs': 1.6.4(typescript@6.0.2) twoslash-protocol: 0.3.6 - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -11769,19 +11596,21 @@ snapshots: media-typer: 1.1.0 mime-types: 3.0.2 - typescript-eslint@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/parser': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3) - '@typescript-eslint/utils': 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/parser': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.1.0(jiti@2.6.1) - typescript: 5.9.3 + typescript: 6.0.2 transitivePeerDependencies: - supports-color typescript@5.9.3: {} + typescript@6.0.2: {} + ufo@1.6.3: {} unconfig-core@7.5.0: @@ -11871,12 +11700,12 @@ snapshots: dependencies: '@jridgewell/remapping': 2.3.5 acorn: 8.16.0 - picomatch: 4.0.3 + picomatch: 4.0.4 webpack-virtual-modules: 0.6.2 - unrun@0.2.32(synckit@0.11.12): + unrun@0.2.33(synckit@0.11.12): dependencies: - rolldown: 1.0.0-rc.9 + rolldown: 1.0.0-rc.11 optionalDependencies: synckit: 0.11.12 @@ -11932,12 +11761,12 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 - vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3): + vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3): dependencies: lightningcss: 1.32.0 - picomatch: 4.0.3 + picomatch: 4.0.4 postcss: 8.5.8 - rolldown: 1.0.0-rc.10 + rolldown: 1.0.0-rc.11 tinyglobby: 0.2.15 optionalDependencies: '@types/node': 25.5.0 @@ -11947,27 +11776,27 @@ snapshots: tsx: 4.21.0 yaml: 2.8.3 - vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)): + vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)): dependencies: - '@vitest/expect': 4.1.0 - '@vitest/mocker': 4.1.0(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) - '@vitest/pretty-format': 4.1.0 - '@vitest/runner': 4.1.0 - '@vitest/snapshot': 4.1.0 - '@vitest/spy': 4.1.0 - '@vitest/utils': 4.1.0 + '@vitest/expect': 4.1.1 + '@vitest/mocker': 4.1.1(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + '@vitest/pretty-format': 4.1.1 + '@vitest/runner': 4.1.1 + '@vitest/snapshot': 4.1.1 + '@vitest/spy': 4.1.1 + '@vitest/utils': 4.1.1 es-module-lexer: 2.0.0 expect-type: 1.3.0 magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 - picomatch: 4.0.3 + picomatch: 4.0.4 std-env: 4.0.0 tinybench: 2.9.0 tinyexec: 1.0.4 tinyglobby: 0.2.15 tinyrainbow: 3.1.0 - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + vite: 8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 25.5.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5e6d9439..af635089 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -13,15 +13,15 @@ catalog: '@clack/prompts': ^1.1.0 '@eslint/js': ^10.0.1 '@mdx-js/react': ^3.1.1 - '@modelcontextprotocol/sdk': ^1.27.1 + '@modelcontextprotocol/sdk': ^1.28.0 '@monaco-editor/react': ^4.7.0 '@napi-rs/cli': ^3.5.1 '@next/eslint-plugin-next': ^16.2.1 '@next/mdx': ^16.2.0 '@tailwindcss/vite': ^4.2.2 - '@tanstack/react-router': ^1.168.2 - '@tanstack/router-generator': ^1.166.16 - '@tanstack/router-plugin': ^1.167.3 + '@tanstack/react-router': ^1.168.4 + '@tanstack/router-generator': ^1.166.18 + '@tanstack/router-plugin': ^1.167.5 '@tauri-apps/api': ^2.10.1 '@tauri-apps/cli': ^2.10.1 '@tauri-apps/plugin-shell': ^2.3.5 @@ -38,7 +38,7 @@ catalog: '@types/react-dom': ^19.2.3 '@unocss/eslint-config': ^66.6.7 '@vitejs/plugin-react': ^6.0.1 - '@vitest/coverage-v8': 4.1.0 + '@vitest/coverage-v8': 4.1.1 '@vue/eslint-config-prettier': ^10.2.0 '@vue/eslint-config-typescript': ^14.7.0 class-variance-authority: ^0.7.1 @@ -53,7 +53,7 @@ catalog: jiti: ^2.6.1 json5: ^2.2.3 lightningcss: ^1.32.0 - lucide-react: ^0.577.0 + lucide-react: ^1.7.0 material-icon-theme: ^5.32.0 mdast-util-mdx: ^3.0.0 mermaid: ^11.13.0 @@ -64,11 +64,11 @@ catalog: npm-run-all2: ^8.0.4 pagefind: ^1.4.0 picocolors: ^1.1.1 - picomatch: ^4.0.3 + picomatch: ^4.0.4 prettier: ^3.8.1 react: ^19.2.4 react-dom: ^19.2.4 - recharts: ^3.8.0 + recharts: ^3.8.1 remark-frontmatter: ^5.0.0 remark-gfm: ^4.0.1 remark-mdx: ^3.1.1 @@ -76,15 +76,15 @@ catalog: remark-stringify: ^11.0.0 tailwind-merge: ^3.5.0 tailwindcss: ^4.2.2 - tsdown: ^0.21.4 + tsdown: ^0.21.5 tsx: ^4.21.0 turbo: ^2.8.20 tw-animate-css: ^1.4.0 - typescript: ^5.9.3 - typescript-eslint: ^8.57.1 + typescript: ^6.0.2 + typescript-eslint: ^8.57.2 unified: ^11.0.5 - vite: ^8.0.1 - vitest: ^4.1.0 + vite: ^8.0.2 + vitest: ^4.1.1 yaml: ^2.8.3 zod: ^4.3.6 zod-to-json-schema: ^3.25.1 From a362a3f1da447e25d5499a22e24c71f6f5d2d582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= Date: Thu, 26 Mar 2026 17:26:43 +0800 Subject: [PATCH 3/4] Align build config and public path handling --- cli/src/config.ts | 9 +- cli/src/inputs/index.ts | 76 ++- cli/src/inputs/input-public-config.test.ts | 560 ++++++++++---------- cli/src/inputs/runtime.ts | 7 +- cli/src/pipeline/ContextMerger.ts | 158 +++--- cli/src/plugin.config.ts | 58 +- cli/src/plugins/ide-config-output.test.ts | 256 ++++----- cli/src/plugins/plugin-core.ts | 41 +- cli/src/plugins/plugin-core/AindexTypes.ts | 236 ++++----- cli/src/plugins/plugin-core/InputTypes.ts | 326 ++++++------ cli/src/plugins/plugin-core/constants.ts | 171 +++--- cli/src/plugins/plugin-core/enums.ts | 66 +-- cli/src/public-config-paths.ts | 165 +++--- cli/tsconfig.json | 4 +- cli/tsdown.config.ts | 12 +- doc/app/docs/[section]/[[...rest]]/page.tsx | 30 +- doc/app/docs/[section]/layout.tsx | 58 +- doc/components/docs-section-nav.tsx | 4 +- doc/lib/docs-sections.ts | 30 +- gui/tsconfig.json | 1 - libraries/logger/tsconfig.json | 4 +- libraries/logger/tsdown.config.ts | 4 +- libraries/md-compiler/tsconfig.json | 4 +- libraries/md-compiler/tsdown.config.ts | 4 +- libraries/script-runtime/tsconfig.json | 4 +- libraries/script-runtime/tsdown.config.ts | 4 +- mcp/tsconfig.json | 4 +- mcp/tsdown.config.ts | 8 +- pnpm-lock.yaml | 45 +- pnpm-workspace.yaml | 2 +- 30 files changed, 1222 insertions(+), 1129 deletions(-) diff --git a/cli/src/config.ts b/cli/src/config.ts index 543367d9..a606f80f 100644 --- a/cli/src/config.ts +++ b/cli/src/config.ts @@ -15,11 +15,11 @@ import type { WindowsOptions } from './plugins/plugin-core' import * as path from 'node:path' +import {createLogger} from '@truenine/logger' import {checkVersionControl} from './Aindex' import {getConfigLoader} from './ConfigLoader' import {collectInputContext, resolveRuntimeCommand} from './inputs/runtime' import { - createLogger, FilePathKind, PathPlaceholders, toOutputCollectedContext, @@ -120,9 +120,10 @@ export interface DefineConfigOptions { export function mergeConfig( ...configs: Partial[] ): Required { - return configs.reduce>( - (acc, config) => mergeTwoConfigs(acc, config), - {...DEFAULT_OPTIONS} + const initialConfig: Required = {...DEFAULT_OPTIONS} + return configs.reduce( + (acc: Required, config) => mergeTwoConfigs(acc, config), + initialConfig ) } diff --git a/cli/src/inputs/index.ts b/cli/src/inputs/index.ts index fdde0ef5..c16fe985 100644 --- a/cli/src/inputs/index.ts +++ b/cli/src/inputs/index.ts @@ -1,23 +1,59 @@ -export { MarkdownWhitespaceCleanupEffectInputCapability } from "./effect-md-cleanup"; -export { OrphanFileCleanupEffectInputCapability } from "./effect-orphan-cleanup"; +export { + MarkdownWhitespaceCleanupEffectInputCapability +} from './effect-md-cleanup' +export { + OrphanFileCleanupEffectInputCapability +} from './effect-orphan-cleanup' export { SkillDistCleanupEffectInputCapability, - SkillNonSrcFileSyncEffectInputCapability, -} from "./effect-skill-sync"; // Effect Input Plugins (按优先级排序: 10, 20, 30) + SkillNonSrcFileSyncEffectInputCapability +} from './effect-skill-sync' // Effect Input Plugins (按优先级排序: 10, 20, 30) -export { SkillInputCapability } from "./input-agentskills"; -export { AindexInputCapability } from "./input-aindex"; -export { CommandInputCapability } from "./input-command"; -export { EditorConfigInputCapability } from "./input-editorconfig"; -export { GitExcludeInputCapability } from "./input-git-exclude"; -export { GitIgnoreInputCapability } from "./input-gitignore"; -export { GlobalMemoryInputCapability } from "./input-global-memory"; -export { JetBrainsConfigInputCapability } from "./input-jetbrains-config"; -export { ProjectPromptInputCapability } from "./input-project-prompt"; -export { ReadmeMdInputCapability } from "./input-readme"; -export { RuleInputCapability } from "./input-rule"; -export { AIAgentIgnoreInputCapability } from "./input-shared-ignore"; -export { SubAgentInputCapability } from "./input-subagent"; -export { VSCodeConfigInputCapability } from "./input-vscode-config"; -export { ZedConfigInputCapability } from "./input-zed-config"; -export { WorkspaceInputCapability } from "./input-workspace"; // Regular Input Plugins +export { + SkillInputCapability +} from './input-agentskills' +export { + AindexInputCapability +} from './input-aindex' +export { + CommandInputCapability +} from './input-command' +export { + EditorConfigInputCapability +} from './input-editorconfig' +export { + GitExcludeInputCapability +} from './input-git-exclude' +export { + GitIgnoreInputCapability +} from './input-gitignore' +export { + GlobalMemoryInputCapability +} from './input-global-memory' +export { + JetBrainsConfigInputCapability +} from './input-jetbrains-config' +export { + ProjectPromptInputCapability +} from './input-project-prompt' +export { + ReadmeMdInputCapability +} from './input-readme' +export { + RuleInputCapability +} from './input-rule' +export { + AIAgentIgnoreInputCapability +} from './input-shared-ignore' +export { + SubAgentInputCapability +} from './input-subagent' +export { + VSCodeConfigInputCapability +} from './input-vscode-config' +export { + WorkspaceInputCapability +} from './input-workspace' // Regular Input Plugins +export { + ZedConfigInputCapability +} from './input-zed-config' diff --git a/cli/src/inputs/input-public-config.test.ts b/cli/src/inputs/input-public-config.test.ts index efec2884..08c658eb 100644 --- a/cli/src/inputs/input-public-config.test.ts +++ b/cli/src/inputs/input-public-config.test.ts @@ -1,454 +1,450 @@ -import type { InputCapabilityContext } from "../plugins/plugin-core"; -import * as fs from "node:fs"; -import * as os from "node:os"; -import * as path from "node:path"; -import glob from "fast-glob"; -import { describe, expect, it } from "vitest"; -import { mergeConfig } from "../config"; -import { createLogger } from "../plugins/plugin-core"; +import type {InputCapabilityContext} from '../plugins/plugin-core' +import * as fs from 'node:fs' +import * as os from 'node:os' +import * as path from 'node:path' +import glob from 'fast-glob' +import {describe, expect, it} from 'vitest' +import {mergeConfig} from '../config' +import {createLogger} from '../plugins/plugin-core' import { AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS, PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, - resolvePublicDefinitionPath, -} from "../public-config-paths"; -import { EditorConfigInputCapability } from "./input-editorconfig"; -import { GitExcludeInputCapability } from "./input-git-exclude"; -import { GitIgnoreInputCapability } from "./input-gitignore"; -import { JetBrainsConfigInputCapability } from "./input-jetbrains-config"; -import { AIAgentIgnoreInputCapability } from "./input-shared-ignore"; -import { VSCodeConfigInputCapability } from "./input-vscode-config"; -import { ZedConfigInputCapability } from "./input-zed-config"; + resolvePublicDefinitionPath +} from '../public-config-paths' +import {EditorConfigInputCapability} from './input-editorconfig' +import {GitExcludeInputCapability} from './input-git-exclude' +import {GitIgnoreInputCapability} from './input-gitignore' +import {JetBrainsConfigInputCapability} from './input-jetbrains-config' +import {AIAgentIgnoreInputCapability} from './input-shared-ignore' +import {VSCodeConfigInputCapability} from './input-vscode-config' +import {ZedConfigInputCapability} from './input-zed-config' interface TestContextOptions { - readonly aindexDir?: string; - readonly runtimeCommand?: InputCapabilityContext["runtimeCommand"]; + readonly aindexDir?: string + readonly runtimeCommand?: InputCapabilityContext['runtimeCommand'] } function createContext( tempWorkspace: string, - options?: TestContextOptions, + options?: TestContextOptions ): InputCapabilityContext { const mergedOptions = mergeConfig({ workspaceDir: tempWorkspace, ...(options?.aindexDir != null ? { aindex: { - dir: options.aindexDir, - }, + dir: options.aindexDir + } } - : {}), - }); + : {}) + }) return { - logger: createLogger("PublicConfigInputCapabilityTest", "error"), + logger: createLogger('PublicConfigInputCapabilityTest', 'error'), fs, path, glob, userConfigOptions: mergedOptions, dependencyContext: {}, ...(options?.runtimeCommand != null - ? { runtimeCommand: options.runtimeCommand } - : {}), - } as InputCapabilityContext; + ? {runtimeCommand: options.runtimeCommand} + : {}) + } as InputCapabilityContext } function writePublicDefinition( tempWorkspace: string, targetRelativePath: string, - content: string, + content: string ): string { const filePath = resolvePublicDefinitionPath( - path.join(tempWorkspace, "aindex"), - targetRelativePath, - ); - fs.mkdirSync(path.dirname(filePath), { recursive: true }); - fs.writeFileSync(filePath, content, "utf8"); - return filePath; + path.join(tempWorkspace, 'aindex'), + targetRelativePath + ) + fs.mkdirSync(path.dirname(filePath), {recursive: true}) + fs.writeFileSync(filePath, content, 'utf8') + return filePath } function writePublicProxy(tempWorkspace: string, source: string): string { - return writePublicDefinition(tempWorkspace, "proxy.ts", source); + return writePublicDefinition(tempWorkspace, 'proxy.ts', source) } -describe("public config input plugins", () => { - it("reads config definitions from target-relative public paths", () => { +describe('public config input plugins', () => { + it('reads config definitions from target-relative public paths', () => { const tempWorkspace = fs.mkdtempSync( - path.join(os.tmpdir(), "tnmsc-public-config-input-"), - ); + path.join(os.tmpdir(), 'tnmsc-public-config-input-') + ) try { - const aindexDir = path.join(tempWorkspace, "aindex"); + const aindexDir = path.join(tempWorkspace, 'aindex') const gitIgnorePath = writePublicDefinition( tempWorkspace, PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, - "dist/\n", - ); + 'dist/\n' + ) const gitExcludePath = writePublicDefinition( tempWorkspace, PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, - ".idea/\n", - ); + '.idea/\n' + ) const editorConfigPath = writePublicDefinition( tempWorkspace, - ".editorconfig", - "root = true\n", - ); + '.editorconfig', + 'root = true\n' + ) writePublicDefinition( tempWorkspace, - ".vscode/settings.json", - '{"editor.tabSize": 2}\n', - ); + '.vscode/settings.json', + '{"editor.tabSize": 2}\n' + ) writePublicDefinition( tempWorkspace, - ".vscode/extensions.json", - '{"recommendations":["foo.bar"]}\n', - ); + '.vscode/extensions.json', + '{"recommendations":["foo.bar"]}\n' + ) writePublicDefinition( tempWorkspace, - ".zed/settings.json", - '{"tab_size": 2}\n', - ); + '.zed/settings.json', + '{"tab_size": 2}\n' + ) writePublicDefinition( tempWorkspace, - ".idea/.gitignore", - "/workspace.xml\n", - ); + '.idea/.gitignore', + '/workspace.xml\n' + ) writePublicDefinition( tempWorkspace, - ".idea/codeStyles/Project.xml", - "\n", - ); + '.idea/codeStyles/Project.xml', + '\n' + ) writePublicDefinition( tempWorkspace, - ".idea/codeStyles/codeStyleConfig.xml", - "\n", - ); + '.idea/codeStyles/codeStyleConfig.xml', + '\n' + ) for (const fileName of AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS) - writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`); + { writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`) } - const ctx = createContext(tempWorkspace); - const gitIgnore = new GitIgnoreInputCapability().collect(ctx); - const gitExclude = new GitExcludeInputCapability().collect(ctx); - const editorConfig = new EditorConfigInputCapability().collect(ctx); - const vscode = new VSCodeConfigInputCapability().collect(ctx); - const zed = new ZedConfigInputCapability().collect(ctx); - const jetbrains = new JetBrainsConfigInputCapability().collect(ctx); - const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx); + const ctx = createContext(tempWorkspace) + const gitIgnore = new GitIgnoreInputCapability().collect(ctx) + const gitExclude = new GitExcludeInputCapability().collect(ctx) + const editorConfig = new EditorConfigInputCapability().collect(ctx) + const vscode = new VSCodeConfigInputCapability().collect(ctx) + const zed = new ZedConfigInputCapability().collect(ctx) + const jetbrains = new JetBrainsConfigInputCapability().collect(ctx) + const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx) - expect(gitIgnore.globalGitIgnore).toBe("dist/\n"); - expect(gitExclude.shadowGitExclude).toBe(".idea/\n"); + expect(gitIgnore.globalGitIgnore).toBe('dist/\n') + expect(gitExclude.shadowGitExclude).toBe('.idea/\n') expect(editorConfig.editorConfigFiles?.[0]?.dir.path).toBe( - editorConfigPath, - ); - expect(vscode.vscodeConfigFiles?.map((file) => file.dir.path)).toEqual([ - path.join(aindexDir, "public", ".vscode", "settings.json"), - path.join(aindexDir, "public", ".vscode", "extensions.json"), - ]); - expect(zed.zedConfigFiles?.map((file) => file.dir.path)).toEqual([ - path.join(aindexDir, "public", ".zed", "settings.json"), - ]); + editorConfigPath + ) + expect(vscode.vscodeConfigFiles?.map(file => file.dir.path)).toEqual([ + path.join(aindexDir, 'public', '.vscode', 'settings.json'), + path.join(aindexDir, 'public', '.vscode', 'extensions.json') + ]) + expect(zed.zedConfigFiles?.map(file => file.dir.path)).toEqual([ + path.join(aindexDir, 'public', '.zed', 'settings.json') + ]) expect( - jetbrains.jetbrainsConfigFiles?.map((file) => file.dir.path), + jetbrains.jetbrainsConfigFiles?.map(file => file.dir.path) ).toEqual([ - path.join(aindexDir, "public", ".idea", "codeStyles", "Project.xml"), + path.join(aindexDir, 'public', '.idea', 'codeStyles', 'Project.xml'), path.join( aindexDir, - "public", - ".idea", - "codeStyles", - "codeStyleConfig.xml", + 'public', + '.idea', + 'codeStyles', + 'codeStyleConfig.xml' ), - path.join(aindexDir, "public", ".idea", ".gitignore"), - ]); + path.join(aindexDir, 'public', '.idea', '.gitignore') + ]) expect( - ignoreFiles.aiAgentIgnoreConfigFiles?.map((file) => file.fileName), - ).toEqual([...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS]); + ignoreFiles.aiAgentIgnoreConfigFiles?.map(file => file.fileName) + ).toEqual([...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS]) expect( - ignoreFiles.aiAgentIgnoreConfigFiles?.map((file) => file.sourcePath), + ignoreFiles.aiAgentIgnoreConfigFiles?.map(file => file.sourcePath) ).toEqual( - AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map((fileName) => - resolvePublicDefinitionPath(aindexDir, fileName), - ), - ); - expect(gitIgnorePath).toBe(path.join(aindexDir, "public", ".gitignore")); + AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map(fileName => + resolvePublicDefinitionPath(aindexDir, fileName)) + ) + expect(gitIgnorePath).toBe(path.join(aindexDir, 'public', '.gitignore')) expect(gitExcludePath).toBe( - path.join(aindexDir, "public", ".git", "info", "exclude"), - ); + path.join(aindexDir, 'public', '.git', 'info', 'exclude') + ) } finally { - fs.rmSync(tempWorkspace, { recursive: true, force: true }); + fs.rmSync(tempWorkspace, {recursive: true, force: true}) } - }); + }) - it("does not read legacy definition locations after the hard cut", () => { + it('does not read legacy definition locations after the hard cut', () => { const tempWorkspace = fs.mkdtempSync( - path.join(os.tmpdir(), "tnmsc-public-config-legacy-"), - ); + path.join(os.tmpdir(), 'tnmsc-public-config-legacy-') + ) try { - const aindexDir = path.join(tempWorkspace, "aindex"); - fs.mkdirSync(path.join(aindexDir, "public"), { recursive: true }); - fs.mkdirSync(path.join(aindexDir, ".vscode"), { recursive: true }); - fs.mkdirSync(path.join(aindexDir, ".zed"), { recursive: true }); - fs.mkdirSync(path.join(aindexDir, ".idea", "codeStyles"), { - recursive: true, - }); + const aindexDir = path.join(tempWorkspace, 'aindex') + fs.mkdirSync(path.join(aindexDir, 'public'), {recursive: true}) + fs.mkdirSync(path.join(aindexDir, '.vscode'), {recursive: true}) + fs.mkdirSync(path.join(aindexDir, '.zed'), {recursive: true}) + fs.mkdirSync(path.join(aindexDir, '.idea', 'codeStyles'), { + recursive: true + }) fs.writeFileSync( - path.join(aindexDir, "public", "gitignore"), - "legacy gitignore\n", - "utf8", - ); + path.join(aindexDir, 'public', 'gitignore'), + 'legacy gitignore\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, "public", "exclude"), - "legacy exclude\n", - "utf8", - ); + path.join(aindexDir, 'public', 'exclude'), + 'legacy exclude\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".editorconfig"), - "root = true\n", - "utf8", - ); + path.join(aindexDir, '.editorconfig'), + 'root = true\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".vscode", "settings.json"), - "{}\n", - "utf8", - ); + path.join(aindexDir, '.vscode', 'settings.json'), + '{}\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".vscode", "extensions.json"), - "{}\n", - "utf8", - ); + path.join(aindexDir, '.vscode', 'extensions.json'), + '{}\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".zed", "settings.json"), - "{}\n", - "utf8", - ); + path.join(aindexDir, '.zed', 'settings.json'), + '{}\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".idea", ".gitignore"), - "/workspace.xml\n", - "utf8", - ); + path.join(aindexDir, '.idea', '.gitignore'), + '/workspace.xml\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".idea", "codeStyles", "Project.xml"), - "\n", - "utf8", - ); + path.join(aindexDir, '.idea', 'codeStyles', 'Project.xml'), + '\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".idea", "codeStyles", "codeStyleConfig.xml"), - "\n", - "utf8", - ); + path.join(aindexDir, '.idea', 'codeStyles', 'codeStyleConfig.xml'), + '\n', + 'utf8' + ) fs.writeFileSync( - path.join(aindexDir, ".cursorignore"), - ".cursor/\n", - "utf8", - ); + path.join(aindexDir, '.cursorignore'), + '.cursor/\n', + 'utf8' + ) - const ctx = createContext(tempWorkspace); + const ctx = createContext(tempWorkspace) expect( - new GitIgnoreInputCapability().collect(ctx).globalGitIgnore, - ).toBeUndefined(); + new GitIgnoreInputCapability().collect(ctx).globalGitIgnore + ).toBeUndefined() expect( - new GitExcludeInputCapability().collect(ctx).shadowGitExclude, - ).toBeUndefined(); + new GitExcludeInputCapability().collect(ctx).shadowGitExclude + ).toBeUndefined() expect( - new EditorConfigInputCapability().collect(ctx).editorConfigFiles ?? [], - ).toHaveLength(0); + new EditorConfigInputCapability().collect(ctx).editorConfigFiles ?? [] + ).toHaveLength(0) expect( - new VSCodeConfigInputCapability().collect(ctx).vscodeConfigFiles ?? [], - ).toHaveLength(0); + new VSCodeConfigInputCapability().collect(ctx).vscodeConfigFiles ?? [] + ).toHaveLength(0) expect( - new ZedConfigInputCapability().collect(ctx).zedConfigFiles ?? [], - ).toHaveLength(0); + new ZedConfigInputCapability().collect(ctx).zedConfigFiles ?? [] + ).toHaveLength(0) expect( - new JetBrainsConfigInputCapability().collect(ctx) - .jetbrainsConfigFiles ?? [], - ).toHaveLength(0); + new JetBrainsConfigInputCapability().collect(ctx).jetbrainsConfigFiles ?? [] + ).toHaveLength(0) expect( - new AIAgentIgnoreInputCapability().collect(ctx) - .aiAgentIgnoreConfigFiles ?? [], - ).toHaveLength(0); + new AIAgentIgnoreInputCapability().collect(ctx).aiAgentIgnoreConfigFiles ?? [] + ).toHaveLength(0) } finally { - fs.rmSync(tempWorkspace, { recursive: true, force: true }); + fs.rmSync(tempWorkspace, {recursive: true, force: true}) } - }); + }) - it("routes public definitions through public/proxy.ts transparently", () => { + it('routes public definitions through public/proxy.ts transparently', () => { const tempWorkspace = fs.mkdtempSync( - path.join(os.tmpdir(), "tnmsc-public-config-proxy-"), - ); + path.join(os.tmpdir(), 'tnmsc-public-config-proxy-') + ) try { - const aindexDir = path.join(tempWorkspace, "aindex"); + const aindexDir = path.join(tempWorkspace, 'aindex') writePublicProxy( tempWorkspace, [ - "export default (logicalPath) => {", + 'export default (logicalPath) => {', ' const normalizedPath = logicalPath.replaceAll("\\\\", "/")', ' if (normalizedPath.startsWith(".git/")) return normalizedPath.replace(/^\\.git\\//, "____.git/")', ' if (normalizedPath === ".idea/.gitignore") return ".idea/.gitignore"', ' if (normalizedPath.startsWith(".idea/")) return normalizedPath', ' if (!normalizedPath.startsWith(".")) return normalizedPath', ' return normalizedPath.replace(/^\\.([^/\\\\]+)/, "____$1")', - "}", - "", - ].join("\n"), - ); + '}', + '' + ].join('\n') + ) const gitIgnorePath = writePublicDefinition( tempWorkspace, PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, - "dist/\n", - ); + 'dist/\n' + ) const gitExcludePath = writePublicDefinition( tempWorkspace, PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH, - ".idea/\n", - ); + '.idea/\n' + ) const editorConfigPath = writePublicDefinition( tempWorkspace, - ".editorconfig", - "root = true\n", - ); + '.editorconfig', + 'root = true\n' + ) const vscodeSettingsPath = writePublicDefinition( tempWorkspace, - ".vscode/settings.json", - '{"editor.tabSize": 2}\n', - ); + '.vscode/settings.json', + '{"editor.tabSize": 2}\n' + ) const vscodeExtensionsPath = writePublicDefinition( tempWorkspace, - ".vscode/extensions.json", - '{"recommendations":["foo.bar"]}\n', - ); + '.vscode/extensions.json', + '{"recommendations":["foo.bar"]}\n' + ) const zedSettingsPath = writePublicDefinition( tempWorkspace, - ".zed/settings.json", - '{"tab_size": 2}\n', - ); + '.zed/settings.json', + '{"tab_size": 2}\n' + ) const ideaGitIgnorePath = writePublicDefinition( tempWorkspace, - ".idea/.gitignore", - "/workspace.xml\n", - ); + '.idea/.gitignore', + '/workspace.xml\n' + ) const ideaProjectPath = writePublicDefinition( tempWorkspace, - ".idea/codeStyles/Project.xml", - "\n", - ); + '.idea/codeStyles/Project.xml', + '\n' + ) const ideaCodeStyleConfigPath = writePublicDefinition( tempWorkspace, - ".idea/codeStyles/codeStyleConfig.xml", - "\n", - ); + '.idea/codeStyles/codeStyleConfig.xml', + '\n' + ) for (const fileName of AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS) - writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`); + { writePublicDefinition(tempWorkspace, fileName, `${fileName}\n`) } - const ctx = createContext(tempWorkspace); - const gitIgnore = new GitIgnoreInputCapability().collect(ctx); - const gitExclude = new GitExcludeInputCapability().collect(ctx); - const editorConfig = new EditorConfigInputCapability().collect(ctx); - const vscode = new VSCodeConfigInputCapability().collect(ctx); - const zed = new ZedConfigInputCapability().collect(ctx); - const jetbrains = new JetBrainsConfigInputCapability().collect(ctx); - const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx); + const ctx = createContext(tempWorkspace) + const gitIgnore = new GitIgnoreInputCapability().collect(ctx) + const gitExclude = new GitExcludeInputCapability().collect(ctx) + const editorConfig = new EditorConfigInputCapability().collect(ctx) + const vscode = new VSCodeConfigInputCapability().collect(ctx) + const zed = new ZedConfigInputCapability().collect(ctx) + const jetbrains = new JetBrainsConfigInputCapability().collect(ctx) + const ignoreFiles = new AIAgentIgnoreInputCapability().collect(ctx) - expect(gitIgnore.globalGitIgnore).toBe("dist/\n"); - expect(gitExclude.shadowGitExclude).toBe(".idea/\n"); + expect(gitIgnore.globalGitIgnore).toBe('dist/\n') + expect(gitExclude.shadowGitExclude).toBe('.idea/\n') expect(editorConfig.editorConfigFiles?.[0]?.dir.path).toBe( - editorConfigPath, - ); - expect(vscode.vscodeConfigFiles?.map((file) => file.dir.path)).toEqual([ + editorConfigPath + ) + expect(vscode.vscodeConfigFiles?.map(file => file.dir.path)).toEqual([ vscodeSettingsPath, - vscodeExtensionsPath, - ]); - expect(zed.zedConfigFiles?.map((file) => file.dir.path)).toEqual([ - zedSettingsPath, - ]); + vscodeExtensionsPath + ]) + expect(zed.zedConfigFiles?.map(file => file.dir.path)).toEqual([ + zedSettingsPath + ]) expect( - jetbrains.jetbrainsConfigFiles?.map((file) => file.dir.path), - ).toEqual([ideaProjectPath, ideaCodeStyleConfigPath, ideaGitIgnorePath]); + jetbrains.jetbrainsConfigFiles?.map(file => file.dir.path) + ).toEqual([ideaProjectPath, ideaCodeStyleConfigPath, ideaGitIgnorePath]) expect( - ignoreFiles.aiAgentIgnoreConfigFiles?.map((file) => file.sourcePath), + ignoreFiles.aiAgentIgnoreConfigFiles?.map(file => file.sourcePath) ).toEqual( - AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map((fileName) => - resolvePublicDefinitionPath(aindexDir, fileName), - ), - ); + AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS.map(fileName => + resolvePublicDefinitionPath(aindexDir, fileName)) + ) expect(gitIgnorePath).toBe( - path.join(aindexDir, "public", "____gitignore"), - ); + path.join(aindexDir, 'public', '____gitignore') + ) expect(gitExcludePath).toBe( - path.join(aindexDir, "public", "____.git", "info", "exclude"), - ); + path.join(aindexDir, 'public', '____.git', 'info', 'exclude') + ) expect(editorConfigPath).toBe( - path.join(aindexDir, "public", "____editorconfig"), - ); + path.join(aindexDir, 'public', '____editorconfig') + ) expect(vscodeSettingsPath).toBe( - path.join(aindexDir, "public", "____vscode", "settings.json"), - ); + path.join(aindexDir, 'public', '____vscode', 'settings.json') + ) expect(vscodeExtensionsPath).toBe( - path.join(aindexDir, "public", "____vscode", "extensions.json"), - ); + path.join(aindexDir, 'public', '____vscode', 'extensions.json') + ) expect(zedSettingsPath).toBe( - path.join(aindexDir, "public", "____zed", "settings.json"), - ); + path.join(aindexDir, 'public', '____zed', 'settings.json') + ) expect(ideaGitIgnorePath).toBe( - path.join(aindexDir, "public", ".idea", ".gitignore"), - ); + path.join(aindexDir, 'public', '.idea', '.gitignore') + ) expect(ideaProjectPath).toBe( - path.join(aindexDir, "public", ".idea", "codeStyles", "Project.xml"), - ); + path.join(aindexDir, 'public', '.idea', 'codeStyles', 'Project.xml') + ) expect(ideaCodeStyleConfigPath).toBe( path.join( aindexDir, - "public", - ".idea", - "codeStyles", - "codeStyleConfig.xml", - ), - ); + 'public', + '.idea', + 'codeStyles', + 'codeStyleConfig.xml' + ) + ) } finally { - fs.rmSync(tempWorkspace, { recursive: true, force: true }); + fs.rmSync(tempWorkspace, {recursive: true, force: true}) } - }); + }) - it("passes the configured workspace root into public/proxy.ts", () => { + it('passes the configured workspace root into public/proxy.ts', () => { const tempWorkspace = fs.mkdtempSync( - path.join(os.tmpdir(), "tnmsc-public-config-nested-aindex-"), - ); + path.join(os.tmpdir(), 'tnmsc-public-config-nested-aindex-') + ) try { - const aindexDir = path.join(tempWorkspace, "config", "aindex"); - const publicDir = path.join(aindexDir, "public"); - fs.mkdirSync(path.join(publicDir, "expected"), { recursive: true }); + const aindexDir = path.join(tempWorkspace, 'config', 'aindex') + const publicDir = path.join(aindexDir, 'public') + fs.mkdirSync(path.join(publicDir, 'expected'), {recursive: true}) fs.writeFileSync( - path.join(publicDir, "proxy.ts"), + path.join(publicDir, 'proxy.ts'), [ - "export default (_logicalPath, ctx) => {", + 'export default (_logicalPath, ctx) => {', ` return ctx.workspaceDir === ${JSON.stringify(tempWorkspace)} && ctx.cwd === ${JSON.stringify(tempWorkspace)}`, ' ? "expected/.gitignore"', ' : "unexpected/.gitignore"', - "}", - "", - ].join("\n"), - "utf8", - ); + '}', + '' + ].join('\n'), + 'utf8' + ) fs.writeFileSync( - path.join(publicDir, "expected", ".gitignore"), - "dist/\n", - "utf8", - ); + path.join(publicDir, 'expected', '.gitignore'), + 'dist/\n', + 'utf8' + ) - const ctx = createContext(tempWorkspace, { aindexDir: "config/aindex" }); - const gitIgnore = new GitIgnoreInputCapability().collect(ctx); + const ctx = createContext(tempWorkspace, {aindexDir: 'config/aindex'}) + const gitIgnore = new GitIgnoreInputCapability().collect(ctx) - expect(gitIgnore.globalGitIgnore).toBe("dist/\n"); + expect(gitIgnore.globalGitIgnore).toBe('dist/\n') } finally { - fs.rmSync(tempWorkspace, { recursive: true, force: true }); + fs.rmSync(tempWorkspace, {recursive: true, force: true}) } - }); -}); + }) +}) diff --git a/cli/src/inputs/runtime.ts b/cli/src/inputs/runtime.ts index bdfdcca0..710fe2f8 100644 --- a/cli/src/inputs/runtime.ts +++ b/cli/src/inputs/runtime.ts @@ -9,6 +9,7 @@ import type { import * as fs from 'node:fs' import * as path from 'node:path' +import {createLogger} from '@truenine/logger' import glob from 'fast-glob' import { AIAgentIgnoreInputCapability, @@ -28,13 +29,13 @@ import { SkillInputCapability, SubAgentInputCapability, VSCodeConfigInputCapability, - ZedConfigInputCapability, - WorkspaceInputCapability + WorkspaceInputCapability, + ZedConfigInputCapability } from '@/inputs' import {extractUserArgs, parseArgs} from '@/pipeline/CliArgumentParser' import {buildDependencyContext, mergeContexts} from '@/pipeline/ContextMerger' import {topologicalSort} from '@/pipeline/DependencyResolver' -import {createLogger, GlobalScopeCollector, ScopePriority, ScopeRegistry} from '@/plugins/plugin-core' +import {GlobalScopeCollector, ScopePriority, ScopeRegistry} from '@/plugins/plugin-core/GlobalScopeCollector' export interface InputRuntimeOptions { readonly pipelineArgs?: readonly string[] diff --git a/cli/src/pipeline/ContextMerger.ts b/cli/src/pipeline/ContextMerger.ts index 4093cd9c..bb91294e 100644 --- a/cli/src/pipeline/ContextMerger.ts +++ b/cli/src/pipeline/ContextMerger.ts @@ -3,19 +3,19 @@ * Handles merging of partial InputCollectedContext objects */ -import type { InputCollectedContext, Workspace } from "../plugins/plugin-core"; +import type {InputCollectedContext, Workspace} from '../plugins/plugin-core' /** * Merge strategy types for context fields */ -type MergeStrategy = "concat" | "override" | "mergeProjects"; +type MergeStrategy = 'concat' | 'override' | 'mergeProjects' /** * Field merge configuration */ interface FieldConfig { - readonly strategy: MergeStrategy; - readonly getter: (ctx: Partial) => T | undefined; + readonly strategy: MergeStrategy + readonly getter: (ctx: Partial) => T | undefined } /** @@ -23,78 +23,78 @@ interface FieldConfig { */ const FIELD_CONFIGS: Record> = { workspace: { - strategy: "mergeProjects", - getter: (ctx) => ctx.workspace, + strategy: 'mergeProjects', + getter: ctx => ctx.workspace }, vscodeConfigFiles: { - strategy: "concat", - getter: (ctx) => ctx.vscodeConfigFiles, + strategy: 'concat', + getter: ctx => ctx.vscodeConfigFiles }, zedConfigFiles: { - strategy: "concat", - getter: (ctx) => ctx.zedConfigFiles, + strategy: 'concat', + getter: ctx => ctx.zedConfigFiles }, jetbrainsConfigFiles: { - strategy: "concat", - getter: (ctx) => ctx.jetbrainsConfigFiles, + strategy: 'concat', + getter: ctx => ctx.jetbrainsConfigFiles }, editorConfigFiles: { - strategy: "concat", - getter: (ctx) => ctx.editorConfigFiles, + strategy: 'concat', + getter: ctx => ctx.editorConfigFiles }, commands: { - strategy: "concat", - getter: (ctx) => ctx.commands, + strategy: 'concat', + getter: ctx => ctx.commands }, subAgents: { - strategy: "concat", - getter: (ctx) => ctx.subAgents, + strategy: 'concat', + getter: ctx => ctx.subAgents }, skills: { - strategy: "concat", - getter: (ctx) => ctx.skills, + strategy: 'concat', + getter: ctx => ctx.skills }, rules: { - strategy: "concat", - getter: (ctx) => ctx.rules, + strategy: 'concat', + getter: ctx => ctx.rules }, aiAgentIgnoreConfigFiles: { - strategy: "concat", - getter: (ctx) => ctx.aiAgentIgnoreConfigFiles, + strategy: 'concat', + getter: ctx => ctx.aiAgentIgnoreConfigFiles }, readmePrompts: { - strategy: "concat", - getter: (ctx) => ctx.readmePrompts, + strategy: 'concat', + getter: ctx => ctx.readmePrompts }, globalMemory: { // Override fields (last one wins) - strategy: "override", - getter: (ctx) => ctx.globalMemory, + strategy: 'override', + getter: ctx => ctx.globalMemory }, aindexDir: { - strategy: "override", - getter: (ctx) => ctx.aindexDir, + strategy: 'override', + getter: ctx => ctx.aindexDir }, globalGitIgnore: { - strategy: "override", - getter: (ctx) => ctx.globalGitIgnore, + strategy: 'override', + getter: ctx => ctx.globalGitIgnore }, shadowGitExclude: { - strategy: "override", - getter: (ctx) => ctx.shadowGitExclude, - }, -} as const; + strategy: 'override', + getter: ctx => ctx.shadowGitExclude + } +} as const /** * Merge two arrays by concatenating them */ function mergeArrays( base: readonly T[] | undefined, - addition: readonly T[] | undefined, + addition: readonly T[] | undefined ): readonly T[] { - if (addition == null) return base ?? []; - if (base == null) return addition; - return [...base, ...addition]; + if (addition == null) return base ?? [] + if (base == null) return addition + return [...base, ...addition] } /** @@ -102,16 +102,16 @@ function mergeArrays( */ function mergeWorkspaceProjects( base: Workspace, - addition: Workspace, + addition: Workspace ): Workspace { - const projectMap = new Map(); - for (const project of base.projects) projectMap.set(project.name, project); + const projectMap = new Map() + for (const project of base.projects) projectMap.set(project.name, project) for (const project of addition.projects) - projectMap.set(project.name, project); + { projectMap.set(project.name, project) } return { directory: addition.directory ?? base.directory, - projects: [...projectMap.values()], - }; + projects: [...projectMap.values()] + } } /** @@ -119,11 +119,11 @@ function mergeWorkspaceProjects( */ function mergeWorkspace( base: Workspace | undefined, - addition: Workspace | undefined, + addition: Workspace | undefined ): Workspace | undefined { - if (addition == null) return base; - if (base == null) return addition; - return mergeWorkspaceProjects(base, addition); + if (addition == null) return base + if (base == null) return addition + return mergeWorkspaceProjects(base, addition) } /** @@ -132,23 +132,23 @@ function mergeWorkspace( function mergeField( base: T | undefined, addition: T | undefined, - strategy: MergeStrategy, + strategy: MergeStrategy ): T | undefined { switch (strategy) { - case "concat": + case 'concat': return mergeArrays( base as unknown[], - addition as unknown[], - ) as unknown as T; - case "override": - return addition ?? base; - case "mergeProjects": + addition as unknown[] + ) as unknown as T + case 'override': + return addition ?? base + case 'mergeProjects': return mergeWorkspace( base as unknown as Workspace, - addition as unknown as Workspace, - ) as unknown as T; + addition as unknown as Workspace + ) as unknown as T default: - return addition ?? base; + return addition ?? base } } @@ -158,43 +158,43 @@ function mergeField( */ export function mergeContexts( base: Partial, - addition: Partial, + addition: Partial ): Partial { - const result: Record = {}; + const result: Record = {} for (const [fieldName, config] of Object.entries(FIELD_CONFIGS)) { // Process each configured field - const baseValue = config.getter(base); - const additionValue = config.getter(addition); - const mergedValue = mergeField(baseValue, additionValue, config.strategy); - if (mergedValue != null) result[fieldName] = mergedValue; + const baseValue = config.getter(base) + const additionValue = config.getter(addition) + const mergedValue = mergeField(baseValue, additionValue, config.strategy) + if (mergedValue != null) result[fieldName] = mergedValue } - return result as Partial; + return result as Partial } /** * Build dependency context from plugin outputs */ export function buildDependencyContext( - plugin: { dependsOn?: readonly string[] }, + plugin: {dependsOn?: readonly string[]}, outputsByPlugin: Map>, mergeFn: ( base: Partial, - addition: Partial, - ) => Partial, + addition: Partial + ) => Partial ): Partial { - const deps = plugin.dependsOn ?? []; - if (deps.length === 0) return {}; + const deps = plugin.dependsOn ?? [] + if (deps.length === 0) return {} - const visited = new Set(); - let merged: Partial = {}; + const visited = new Set() + let merged: Partial = {} for (const depName of deps) { - if (visited.has(depName)) continue; - visited.add(depName); - const depOutput = outputsByPlugin.get(depName); - if (depOutput != null) merged = mergeFn(merged, depOutput); + if (visited.has(depName)) continue + visited.add(depName) + const depOutput = outputsByPlugin.get(depName) + if (depOutput != null) merged = mergeFn(merged, depOutput) } - return merged; + return merged } diff --git a/cli/src/plugin.config.ts b/cli/src/plugin.config.ts index bd961a57..8d0dd887 100644 --- a/cli/src/plugin.config.ts +++ b/cli/src/plugin.config.ts @@ -1,29 +1,29 @@ -import type { PipelineConfig } from "@/config"; -import process from "node:process"; -import { GenericSkillsOutputPlugin } from "@truenine/plugin-agentskills-compact"; -import { AgentsOutputPlugin } from "@truenine/plugin-agentsmd"; -import { ClaudeCodeCLIOutputPlugin } from "@truenine/plugin-claude-code-cli"; -import { CursorOutputPlugin } from "@truenine/plugin-cursor"; -import { DroidCLIOutputPlugin } from "@truenine/plugin-droid-cli"; -import { EditorConfigOutputPlugin } from "@truenine/plugin-editorconfig"; -import { GeminiCLIOutputPlugin } from "@truenine/plugin-gemini-cli"; -import { GitExcludeOutputPlugin } from "@truenine/plugin-git-exclude"; -import { JetBrainsAIAssistantCodexOutputPlugin } from "@truenine/plugin-jetbrains-ai-codex"; -import { JetBrainsIDECodeStyleConfigOutputPlugin } from "@truenine/plugin-jetbrains-codestyle"; -import { CodexCLIOutputPlugin } from "@truenine/plugin-openai-codex-cli"; -import { OpencodeCLIOutputPlugin } from "@truenine/plugin-opencode-cli"; -import { QoderIDEPluginOutputPlugin } from "@truenine/plugin-qoder-ide"; -import { ReadmeMdConfigFileOutputPlugin } from "@truenine/plugin-readme"; -import { TraeIDEOutputPlugin } from "@truenine/plugin-trae-ide"; -import { VisualStudioCodeIDEConfigOutputPlugin } from "@truenine/plugin-vscode"; -import { WarpIDEOutputPlugin } from "@truenine/plugin-warp-ide"; -import { WindsurfOutputPlugin } from "@truenine/plugin-windsurf"; -import { ZedIDEConfigOutputPlugin } from "@truenine/plugin-zed"; -import { defineConfig } from "@/config"; -import { TraeCNIDEOutputPlugin } from "@/plugins/plugin-trae-cn-ide"; +import type {PipelineConfig} from '@/config' +import process from 'node:process' +import {GenericSkillsOutputPlugin} from '@truenine/plugin-agentskills-compact' +import {AgentsOutputPlugin} from '@truenine/plugin-agentsmd' +import {ClaudeCodeCLIOutputPlugin} from '@truenine/plugin-claude-code-cli' +import {CursorOutputPlugin} from '@truenine/plugin-cursor' +import {DroidCLIOutputPlugin} from '@truenine/plugin-droid-cli' +import {EditorConfigOutputPlugin} from '@truenine/plugin-editorconfig' +import {GeminiCLIOutputPlugin} from '@truenine/plugin-gemini-cli' +import {GitExcludeOutputPlugin} from '@truenine/plugin-git-exclude' +import {JetBrainsAIAssistantCodexOutputPlugin} from '@truenine/plugin-jetbrains-ai-codex' +import {JetBrainsIDECodeStyleConfigOutputPlugin} from '@truenine/plugin-jetbrains-codestyle' +import {CodexCLIOutputPlugin} from '@truenine/plugin-openai-codex-cli' +import {OpencodeCLIOutputPlugin} from '@truenine/plugin-opencode-cli' +import {QoderIDEPluginOutputPlugin} from '@truenine/plugin-qoder-ide' +import {ReadmeMdConfigFileOutputPlugin} from '@truenine/plugin-readme' +import {TraeIDEOutputPlugin} from '@truenine/plugin-trae-ide' +import {VisualStudioCodeIDEConfigOutputPlugin} from '@truenine/plugin-vscode' +import {WarpIDEOutputPlugin} from '@truenine/plugin-warp-ide' +import {WindsurfOutputPlugin} from '@truenine/plugin-windsurf' +import {ZedIDEConfigOutputPlugin} from '@truenine/plugin-zed' +import {defineConfig} from '@/config' +import {TraeCNIDEOutputPlugin} from '@/plugins/plugin-trae-cn-ide' export async function createDefaultPluginConfig( - pipelineArgs: readonly string[] = process.argv, + pipelineArgs: readonly string[] = process.argv ): Promise { return defineConfig({ pipelineArgs, @@ -49,10 +49,10 @@ export async function createDefaultPluginConfig( new EditorConfigOutputPlugin(), new VisualStudioCodeIDEConfigOutputPlugin(), new ZedIDEConfigOutputPlugin(), - new ReadmeMdConfigFileOutputPlugin(), - ], - }, - }); + new ReadmeMdConfigFileOutputPlugin() + ] + } + }) } -export default createDefaultPluginConfig; +export default createDefaultPluginConfig diff --git a/cli/src/plugins/ide-config-output.test.ts b/cli/src/plugins/ide-config-output.test.ts index 753fffec..1fc47b65 100644 --- a/cli/src/plugins/ide-config-output.test.ts +++ b/cli/src/plugins/ide-config-output.test.ts @@ -1,21 +1,21 @@ import type { OutputWriteContext, Project, - ProjectIDEConfigFile, -} from "./plugin-core"; -import * as fs from "node:fs"; -import * as path from "node:path"; -import { describe, expect, it } from "vitest"; -import { EditorConfigOutputPlugin } from "./EditorConfigOutputPlugin"; -import { JetBrainsIDECodeStyleConfigOutputPlugin } from "./JetBrainsIDECodeStyleConfigOutputPlugin"; -import { createLogger, FilePathKind, IDEKind } from "./plugin-core"; -import { VisualStudioCodeIDEConfigOutputPlugin } from "./VisualStudioCodeIDEConfigOutputPlugin"; -import { ZedIDEConfigOutputPlugin } from "./ZedIDEConfigOutputPlugin"; + ProjectIDEConfigFile +} from './plugin-core' +import * as fs from 'node:fs' +import * as path from 'node:path' +import {describe, expect, it} from 'vitest' +import {EditorConfigOutputPlugin} from './EditorConfigOutputPlugin' +import {JetBrainsIDECodeStyleConfigOutputPlugin} from './JetBrainsIDECodeStyleConfigOutputPlugin' +import {createLogger, FilePathKind, IDEKind} from './plugin-core' +import {VisualStudioCodeIDEConfigOutputPlugin} from './VisualStudioCodeIDEConfigOutputPlugin' +import {ZedIDEConfigOutputPlugin} from './ZedIDEConfigOutputPlugin' function createProject( workspaceBase: string, name: string, - promptSource = false, + promptSource = false ): Project { return { name, @@ -25,15 +25,15 @@ function createProject( path: name, basePath: workspaceBase, getDirectoryName: () => name, - getAbsolutePath: () => path.join(workspaceBase, name), - }, - } as Project; + getAbsolutePath: () => path.join(workspaceBase, name) + } + } as Project } function createConfigFile( type: IDEKind, sourcePath: string, - content: string, + content: string ): ProjectIDEConfigFile { return { type, @@ -43,14 +43,14 @@ function createConfigFile( dir: { pathKind: FilePathKind.Absolute, path: sourcePath, - getDirectoryName: () => path.basename(sourcePath), - }, - } as ProjectIDEConfigFile; + getDirectoryName: () => path.basename(sourcePath) + } + } as ProjectIDEConfigFile } function createWriteContext(workspaceBase: string): OutputWriteContext { return { - logger: createLogger("IdeConfigOutputPluginTest", "error"), + logger: createLogger('IdeConfigOutputPluginTest', 'error'), fs, path, glob: {} as never, @@ -60,179 +60,179 @@ function createWriteContext(workspaceBase: string): OutputWriteContext { directory: { pathKind: FilePathKind.Absolute, path: workspaceBase, - getDirectoryName: () => path.basename(workspaceBase), + getDirectoryName: () => path.basename(workspaceBase) }, projects: [ - createProject(workspaceBase, "aindex", true), - createProject(workspaceBase, "memory-sync"), - ], + createProject(workspaceBase, 'aindex', true), + createProject(workspaceBase, 'memory-sync') + ] }, editorConfigFiles: [ createConfigFile( IDEKind.EditorConfig, - path.join(workspaceBase, "aindex", "public", ".editorconfig"), - "root = true\n", - ), + path.join(workspaceBase, 'aindex', 'public', '.editorconfig'), + 'root = true\n' + ) ], vscodeConfigFiles: [ createConfigFile( IDEKind.VSCode, path.join( workspaceBase, - "aindex", - "public", - ".vscode", - "settings.json", + 'aindex', + 'public', + '.vscode', + 'settings.json' ), - "{}\n", + '{}\n' ), createConfigFile( IDEKind.VSCode, path.join( workspaceBase, - "aindex", - "public", - ".vscode", - "extensions.json", + 'aindex', + 'public', + '.vscode', + 'extensions.json' ), - "{}\n", - ), + '{}\n' + ) ], zedConfigFiles: [ createConfigFile( IDEKind.Zed, - path.join(workspaceBase, "aindex", "public", ".zed", "settings.json"), - '{"tab_size": 2}\n', - ), + path.join(workspaceBase, 'aindex', 'public', '.zed', 'settings.json'), + '{"tab_size": 2}\n' + ) ], jetbrainsConfigFiles: [ createConfigFile( IDEKind.IntellijIDEA, - path.join(workspaceBase, "aindex", "public", ".idea", ".gitignore"), - "/workspace.xml\n", + path.join(workspaceBase, 'aindex', 'public', '.idea', '.gitignore'), + '/workspace.xml\n' ), createConfigFile( IDEKind.IntellijIDEA, path.join( workspaceBase, - "aindex", - "public", - ".idea", - "codeStyles", - "Project.xml", + 'aindex', + 'public', + '.idea', + 'codeStyles', + 'Project.xml' ), - "\n", + '\n' ), createConfigFile( IDEKind.IntellijIDEA, path.join( workspaceBase, - "aindex", - "public", - ".idea", - "codeStyles", - "codeStyleConfig.xml", + 'aindex', + 'public', + '.idea', + 'codeStyles', + 'codeStyleConfig.xml' ), - "\n", - ), - ], - }, - } as OutputWriteContext; + '\n' + ) + ] + } + } as OutputWriteContext } -describe("ide config output plugins", () => { - it("includes the prompt source project for editorconfig output", async () => { - const workspaceBase = path.resolve("tmp/ide-output-editorconfig"); - const plugin = new EditorConfigOutputPlugin(); +describe('ide config output plugins', () => { + it('includes the prompt source project for editorconfig output', async () => { + const workspaceBase = path.resolve('tmp/ide-output-editorconfig') + const plugin = new EditorConfigOutputPlugin() const declarations = await plugin.declareOutputFiles( - createWriteContext(workspaceBase), - ); - const paths = declarations.map((declaration) => declaration.path); + createWriteContext(workspaceBase) + ) + const paths = declarations.map(declaration => declaration.path) expect(paths).toEqual([ - path.join(workspaceBase, "aindex", ".editorconfig"), - path.join(workspaceBase, "memory-sync", ".editorconfig"), - ]); - }); + path.join(workspaceBase, 'aindex', '.editorconfig'), + path.join(workspaceBase, 'memory-sync', '.editorconfig') + ]) + }) - it("includes the prompt source project for vscode output", async () => { - const workspaceBase = path.resolve("tmp/ide-output-vscode"); - const plugin = new VisualStudioCodeIDEConfigOutputPlugin(); + it('includes the prompt source project for vscode output', async () => { + const workspaceBase = path.resolve('tmp/ide-output-vscode') + const plugin = new VisualStudioCodeIDEConfigOutputPlugin() const declarations = await plugin.declareOutputFiles( - createWriteContext(workspaceBase), - ); - const paths = declarations.map((declaration) => declaration.path); + createWriteContext(workspaceBase) + ) + const paths = declarations.map(declaration => declaration.path) expect(paths).toEqual([ - path.join(workspaceBase, "aindex", ".vscode", "settings.json"), - path.join(workspaceBase, "aindex", ".vscode", "extensions.json"), - path.join(workspaceBase, "memory-sync", ".vscode", "settings.json"), - path.join(workspaceBase, "memory-sync", ".vscode", "extensions.json"), - ]); - }); + path.join(workspaceBase, 'aindex', '.vscode', 'settings.json'), + path.join(workspaceBase, 'aindex', '.vscode', 'extensions.json'), + path.join(workspaceBase, 'memory-sync', '.vscode', 'settings.json'), + path.join(workspaceBase, 'memory-sync', '.vscode', 'extensions.json') + ]) + }) - it("includes the prompt source project for zed output and cleanup", async () => { - const workspaceBase = path.resolve("tmp/ide-output-zed"); - const plugin = new ZedIDEConfigOutputPlugin(); - const ctx = createWriteContext(workspaceBase); - const declarations = await plugin.declareOutputFiles(ctx); - const cleanup = await plugin.declareCleanupPaths(ctx); + it('includes the prompt source project for zed output and cleanup', async () => { + const workspaceBase = path.resolve('tmp/ide-output-zed') + const plugin = new ZedIDEConfigOutputPlugin() + const ctx = createWriteContext(workspaceBase) + const declarations = await plugin.declareOutputFiles(ctx) + const cleanup = await plugin.declareCleanupPaths(ctx) - expect(declarations.map((declaration) => declaration.path)).toEqual([ - path.join(workspaceBase, "aindex", ".zed", "settings.json"), - path.join(workspaceBase, "memory-sync", ".zed", "settings.json"), - ]); + expect(declarations.map(declaration => declaration.path)).toEqual([ + path.join(workspaceBase, 'aindex', '.zed', 'settings.json'), + path.join(workspaceBase, 'memory-sync', '.zed', 'settings.json') + ]) expect(cleanup.delete).toEqual([ { - kind: "file", - label: "delete.project", - path: path.join(workspaceBase, "aindex", ".zed", "settings.json"), - scope: "project", + kind: 'file', + label: 'delete.project', + path: path.join(workspaceBase, 'aindex', '.zed', 'settings.json'), + scope: 'project' }, { - kind: "file", - label: "delete.project", - path: path.join(workspaceBase, "memory-sync", ".zed", "settings.json"), - scope: "project", - }, - ]); - }); + kind: 'file', + label: 'delete.project', + path: path.join(workspaceBase, 'memory-sync', '.zed', 'settings.json'), + scope: 'project' + } + ]) + }) - it("includes the prompt source project for jetbrains output", async () => { - const workspaceBase = path.resolve("tmp/ide-output-jetbrains"); - const plugin = new JetBrainsIDECodeStyleConfigOutputPlugin(); + it('includes the prompt source project for jetbrains output', async () => { + const workspaceBase = path.resolve('tmp/ide-output-jetbrains') + const plugin = new JetBrainsIDECodeStyleConfigOutputPlugin() const declarations = await plugin.declareOutputFiles( - createWriteContext(workspaceBase), - ); - const paths = declarations.map((declaration) => declaration.path); + createWriteContext(workspaceBase) + ) + const paths = declarations.map(declaration => declaration.path) expect(paths).toEqual([ - path.join(workspaceBase, "aindex", ".idea", ".gitignore"), - path.join(workspaceBase, "aindex", ".idea", "codeStyles", "Project.xml"), + path.join(workspaceBase, 'aindex', '.idea', '.gitignore'), + path.join(workspaceBase, 'aindex', '.idea', 'codeStyles', 'Project.xml'), path.join( workspaceBase, - "aindex", - ".idea", - "codeStyles", - "codeStyleConfig.xml", + 'aindex', + '.idea', + 'codeStyles', + 'codeStyleConfig.xml' ), - path.join(workspaceBase, "aindex", ".editorconfig"), - path.join(workspaceBase, "memory-sync", ".idea", ".gitignore"), + path.join(workspaceBase, 'aindex', '.editorconfig'), + path.join(workspaceBase, 'memory-sync', '.idea', '.gitignore'), path.join( workspaceBase, - "memory-sync", - ".idea", - "codeStyles", - "Project.xml", + 'memory-sync', + '.idea', + 'codeStyles', + 'Project.xml' ), path.join( workspaceBase, - "memory-sync", - ".idea", - "codeStyles", - "codeStyleConfig.xml", + 'memory-sync', + '.idea', + 'codeStyles', + 'codeStyleConfig.xml' ), - path.join(workspaceBase, "memory-sync", ".editorconfig"), - ]); - }); -}); + path.join(workspaceBase, 'memory-sync', '.editorconfig') + ]) + }) +}) diff --git a/cli/src/plugins/plugin-core.ts b/cli/src/plugins/plugin-core.ts index 8e121e34..20b28833 100644 --- a/cli/src/plugins/plugin-core.ts +++ b/cli/src/plugins/plugin-core.ts @@ -1,3 +1,16 @@ +import type { + ILogger, + LoggerDiagnosticRecord, + LogLevel +} from '@truenine/logger' +import { + clearBufferedDiagnostics as clearBufferedDiagnosticsNative, + createLogger as createLoggerNative, + drainBufferedDiagnostics as drainBufferedDiagnosticsNative, + getGlobalLogLevel as getGlobalLogLevelNative, + setGlobalLogLevel as setGlobalLogLevelNative +} from '@truenine/logger' + export { AbstractInputCapability } from '../inputs/AbstractInputCapability' @@ -130,14 +143,6 @@ export { export * from './plugin-core/types' -export { - clearBufferedDiagnostics, - createLogger, - drainBufferedDiagnostics, - getGlobalLogLevel, - setGlobalLogLevel -} from '@truenine/logger' - export type { DiagnosticLines, ILogger, @@ -145,3 +150,23 @@ export type { LoggerDiagnosticRecord, LogLevel } from '@truenine/logger' + +export function clearBufferedDiagnostics(): void { + clearBufferedDiagnosticsNative() +} + +export function createLogger(namespace: string, logLevel?: LogLevel): ILogger { + return createLoggerNative(namespace, logLevel) +} + +export function drainBufferedDiagnostics(): LoggerDiagnosticRecord[] { + return drainBufferedDiagnosticsNative() +} + +export function getGlobalLogLevel(): LogLevel | undefined { + return getGlobalLogLevelNative() +} + +export function setGlobalLogLevel(level: LogLevel): void { + setGlobalLogLevelNative(level) +} diff --git a/cli/src/plugins/plugin-core/AindexTypes.ts b/cli/src/plugins/plugin-core/AindexTypes.ts index 71435a4a..aaa44f1b 100644 --- a/cli/src/plugins/plugin-core/AindexTypes.ts +++ b/cli/src/plugins/plugin-core/AindexTypes.ts @@ -8,11 +8,11 @@ */ export interface AindexFileEntry { /** File name (e.g., 'GLOBAL.md') */ - readonly name: string; + readonly name: string /** Whether this file is required */ - readonly required: boolean; + readonly required: boolean /** File description */ - readonly description?: string; + readonly description?: string } /** @@ -20,15 +20,15 @@ export interface AindexFileEntry { */ export interface AindexDirectoryEntry { /** Directory name (e.g., 'skills') */ - readonly name: string; + readonly name: string /** Whether this directory is required */ - readonly required: boolean; + readonly required: boolean /** Directory description */ - readonly description?: string; + readonly description?: string /** Nested directories */ - readonly directories?: readonly AindexDirectoryEntry[]; + readonly directories?: readonly AindexDirectoryEntry[] /** Files in this directory */ - readonly files?: readonly AindexFileEntry[]; + readonly files?: readonly AindexFileEntry[] } /** @@ -37,96 +37,96 @@ export interface AindexDirectoryEntry { export interface AindexDirectory { /** Source directories (before compilation) */ readonly src: { - readonly skills: AindexDirectoryEntry; - readonly commands: AindexDirectoryEntry; - readonly agents: AindexDirectoryEntry; - readonly rules: AindexDirectoryEntry; - readonly globalMemoryFile: AindexFileEntry; - readonly workspaceMemoryFile: AindexFileEntry; - }; + readonly skills: AindexDirectoryEntry + readonly commands: AindexDirectoryEntry + readonly agents: AindexDirectoryEntry + readonly rules: AindexDirectoryEntry + readonly globalMemoryFile: AindexFileEntry + readonly workspaceMemoryFile: AindexFileEntry + } /** Distribution directories (after compilation) */ readonly dist: { - readonly skills: AindexDirectoryEntry; - readonly commands: AindexDirectoryEntry; - readonly agents: AindexDirectoryEntry; - readonly rules: AindexDirectoryEntry; - readonly app: AindexDirectoryEntry; - readonly globalMemoryFile: AindexFileEntry; - readonly workspaceMemoryFile: AindexFileEntry; - }; + readonly skills: AindexDirectoryEntry + readonly commands: AindexDirectoryEntry + readonly agents: AindexDirectoryEntry + readonly rules: AindexDirectoryEntry + readonly app: AindexDirectoryEntry + readonly globalMemoryFile: AindexFileEntry + readonly workspaceMemoryFile: AindexFileEntry + } /** App directory (project-specific prompts source, standalone at root) */ - readonly app: AindexDirectoryEntry; + readonly app: AindexDirectoryEntry /** IDE configuration directories */ readonly ide: { - readonly idea: AindexDirectoryEntry; - readonly ideaCodeStyles: AindexDirectoryEntry; - readonly vscode: AindexDirectoryEntry; - readonly zed: AindexDirectoryEntry; - }; + readonly idea: AindexDirectoryEntry + readonly ideaCodeStyles: AindexDirectoryEntry + readonly vscode: AindexDirectoryEntry + readonly zed: AindexDirectoryEntry + } /** IDE configuration files */ - readonly ideFiles: readonly AindexFileEntry[]; + readonly ideFiles: readonly AindexFileEntry[] /** AI Agent ignore files */ - readonly ignoreFiles: readonly AindexFileEntry[]; + readonly ignoreFiles: readonly AindexFileEntry[] } /** * Directory names used in aindex project */ export const AINDEX_DIR_NAMES = { - SRC: "src", - DIST: "dist", - SKILLS: "skills", - COMMANDS: "commands", - AGENTS: "agents", - RULES: "rules", - APP: "app", - IDEA: ".idea", // IDE directories - IDEA_CODE_STYLES: ".idea/codeStyles", - VSCODE: ".vscode", - ZED: ".zed", -} as const; + SRC: 'src', + DIST: 'dist', + SKILLS: 'skills', + COMMANDS: 'commands', + AGENTS: 'agents', + RULES: 'rules', + APP: 'app', + IDEA: '.idea', // IDE directories + IDEA_CODE_STYLES: '.idea/codeStyles', + VSCODE: '.vscode', + ZED: '.zed' +} as const /** * File names used in aindex project */ export const AINDEX_FILE_NAMES = { - GLOBAL_MEMORY: "global.mdx", // Global memory - GLOBAL_MEMORY_SRC: "global.src.mdx", - WORKSPACE_MEMORY: "workspace.mdx", // Workspace memory - WORKSPACE_MEMORY_SRC: "workspace.src.mdx", - EDITOR_CONFIG: ".editorconfig", // EditorConfig - IDEA_GITIGNORE: ".idea/.gitignore", // JetBrains IDE - IDEA_PROJECT_XML: ".idea/codeStyles/Project.xml", - IDEA_CODE_STYLE_CONFIG_XML: ".idea/codeStyles/codeStyleConfig.xml", - VSCODE_SETTINGS: ".vscode/settings.json", // VS Code - VSCODE_EXTENSIONS: ".vscode/extensions.json", - ZED_SETTINGS: ".zed/settings.json", - QODER_IGNORE: ".qoderignore", // AI Agent ignore files - CURSOR_IGNORE: ".cursorignore", - WARP_INDEX_IGNORE: ".warpindexignore", - AI_IGNORE: ".aiignore", - CODEIUM_IGNORE: ".codeiumignore", // Windsurf ignore file -} as const; + GLOBAL_MEMORY: 'global.mdx', // Global memory + GLOBAL_MEMORY_SRC: 'global.src.mdx', + WORKSPACE_MEMORY: 'workspace.mdx', // Workspace memory + WORKSPACE_MEMORY_SRC: 'workspace.src.mdx', + EDITOR_CONFIG: '.editorconfig', // EditorConfig + IDEA_GITIGNORE: '.idea/.gitignore', // JetBrains IDE + IDEA_PROJECT_XML: '.idea/codeStyles/Project.xml', + IDEA_CODE_STYLE_CONFIG_XML: '.idea/codeStyles/codeStyleConfig.xml', + VSCODE_SETTINGS: '.vscode/settings.json', // VS Code + VSCODE_EXTENSIONS: '.vscode/extensions.json', + ZED_SETTINGS: '.zed/settings.json', + QODER_IGNORE: '.qoderignore', // AI Agent ignore files + CURSOR_IGNORE: '.cursorignore', + WARP_INDEX_IGNORE: '.warpindexignore', + AI_IGNORE: '.aiignore', + CODEIUM_IGNORE: '.codeiumignore' // Windsurf ignore file +} as const /** * Relative paths from aindex project root */ export const AINDEX_RELATIVE_PATHS = { - SRC_SKILLS: "src/skills", // Source paths - SRC_COMMANDS: "src/commands", - SRC_AGENTS: "src/agents", - SRC_RULES: "src/rules", - SRC_GLOBAL_MEMORY: "app/global.src.mdx", - SRC_WORKSPACE_MEMORY: "app/workspace.src.mdx", - DIST_SKILLS: "dist/skills", // Distribution paths - DIST_COMMANDS: "dist/commands", - DIST_AGENTS: "dist/agents", - DIST_RULES: "dist/rules", - DIST_APP: "dist/app", - DIST_GLOBAL_MEMORY: "dist/global.mdx", - DIST_WORKSPACE_MEMORY: "dist/workspace.mdx", - APP: "app", // App source path (standalone at root) -} as const; + SRC_SKILLS: 'src/skills', // Source paths + SRC_COMMANDS: 'src/commands', + SRC_AGENTS: 'src/agents', + SRC_RULES: 'src/rules', + SRC_GLOBAL_MEMORY: 'app/global.src.mdx', + SRC_WORKSPACE_MEMORY: 'app/workspace.src.mdx', + DIST_SKILLS: 'dist/skills', // Distribution paths + DIST_COMMANDS: 'dist/commands', + DIST_AGENTS: 'dist/agents', + DIST_RULES: 'dist/rules', + DIST_APP: 'dist/app', + DIST_GLOBAL_MEMORY: 'dist/global.mdx', + DIST_WORKSPACE_MEMORY: 'dist/workspace.mdx', + APP: 'app' // App source path (standalone at root) +} as const /** * Default aindex directory structure @@ -137,178 +137,178 @@ export const DEFAULT_AINDEX_STRUCTURE: AindexDirectory = { skills: { name: AINDEX_DIR_NAMES.SKILLS, required: false, - description: "Skill source files (.src.mdx)", + description: 'Skill source files (.src.mdx)' }, commands: { name: AINDEX_DIR_NAMES.COMMANDS, required: false, - description: "Fast command source files (.src.mdx)", + description: 'Fast command source files (.src.mdx)' }, agents: { name: AINDEX_DIR_NAMES.AGENTS, required: false, - description: "Sub-agent source files (.src.mdx)", + description: 'Sub-agent source files (.src.mdx)' }, rules: { name: AINDEX_DIR_NAMES.RULES, required: false, - description: "Rule source files (.src.mdx)", + description: 'Rule source files (.src.mdx)' }, globalMemoryFile: { name: AINDEX_FILE_NAMES.GLOBAL_MEMORY_SRC, required: false, - description: "Global memory source file", + description: 'Global memory source file' }, workspaceMemoryFile: { name: AINDEX_FILE_NAMES.WORKSPACE_MEMORY_SRC, required: false, - description: "Workspace memory source file", - }, + description: 'Workspace memory source file' + } }, dist: { skills: { name: AINDEX_DIR_NAMES.SKILLS, required: false, - description: "Compiled skill files (.mdx)", + description: 'Compiled skill files (.mdx)' }, commands: { name: AINDEX_DIR_NAMES.COMMANDS, required: false, - description: "Compiled fast command files (.mdx)", + description: 'Compiled fast command files (.mdx)' }, agents: { name: AINDEX_DIR_NAMES.AGENTS, required: false, - description: "Compiled sub-agent files (.mdx)", + description: 'Compiled sub-agent files (.mdx)' }, rules: { name: AINDEX_DIR_NAMES.RULES, required: false, - description: "Compiled rule files (.mdx)", + description: 'Compiled rule files (.mdx)' }, globalMemoryFile: { name: AINDEX_FILE_NAMES.GLOBAL_MEMORY, required: false, - description: "Compiled global memory file", + description: 'Compiled global memory file' }, workspaceMemoryFile: { name: AINDEX_FILE_NAMES.WORKSPACE_MEMORY, required: false, - description: "Compiled workspace memory file", + description: 'Compiled workspace memory file' }, app: { name: AINDEX_DIR_NAMES.APP, required: false, - description: "Compiled project-specific prompts", - }, + description: 'Compiled project-specific prompts' + } }, app: { name: AINDEX_DIR_NAMES.APP, required: false, - description: "Project-specific prompts (standalone directory)", + description: 'Project-specific prompts (standalone directory)' }, ide: { idea: { name: AINDEX_DIR_NAMES.IDEA, required: false, - description: "JetBrains IDE configuration directory", + description: 'JetBrains IDE configuration directory' }, ideaCodeStyles: { name: AINDEX_DIR_NAMES.IDEA_CODE_STYLES, required: false, - description: "JetBrains IDE code styles directory", + description: 'JetBrains IDE code styles directory' }, vscode: { name: AINDEX_DIR_NAMES.VSCODE, required: false, - description: "VS Code configuration directory", + description: 'VS Code configuration directory' }, zed: { name: AINDEX_DIR_NAMES.ZED, required: false, - description: "Zed configuration directory", - }, + description: 'Zed configuration directory' + } }, ideFiles: [ { name: AINDEX_FILE_NAMES.EDITOR_CONFIG, required: false, - description: "EditorConfig file", + description: 'EditorConfig file' }, { name: AINDEX_FILE_NAMES.IDEA_GITIGNORE, required: false, - description: "JetBrains IDE .gitignore", + description: 'JetBrains IDE .gitignore' }, { name: AINDEX_FILE_NAMES.IDEA_PROJECT_XML, required: false, - description: "JetBrains IDE Project.xml", + description: 'JetBrains IDE Project.xml' }, { name: AINDEX_FILE_NAMES.IDEA_CODE_STYLE_CONFIG_XML, required: false, - description: "JetBrains IDE codeStyleConfig.xml", + description: 'JetBrains IDE codeStyleConfig.xml' }, { name: AINDEX_FILE_NAMES.VSCODE_SETTINGS, required: false, - description: "VS Code settings.json", + description: 'VS Code settings.json' }, { name: AINDEX_FILE_NAMES.VSCODE_EXTENSIONS, required: false, - description: "VS Code extensions.json", + description: 'VS Code extensions.json' }, { name: AINDEX_FILE_NAMES.ZED_SETTINGS, required: false, - description: "Zed settings.json", - }, + description: 'Zed settings.json' + } ], ignoreFiles: [ { name: AINDEX_FILE_NAMES.QODER_IGNORE, required: false, - description: "Qoder ignore file", + description: 'Qoder ignore file' }, { name: AINDEX_FILE_NAMES.CURSOR_IGNORE, required: false, - description: "Cursor ignore file", + description: 'Cursor ignore file' }, { name: AINDEX_FILE_NAMES.WARP_INDEX_IGNORE, required: false, - description: "Warp index ignore file", + description: 'Warp index ignore file' }, { name: AINDEX_FILE_NAMES.AI_IGNORE, required: false, - description: "AI ignore file", + description: 'AI ignore file' }, { name: AINDEX_FILE_NAMES.CODEIUM_IGNORE, required: false, - description: "Windsurf ignore file", - }, - ], -} as const; + description: 'Windsurf ignore file' + } + ] +} as const /** * Type for directory names */ -export type AindexDirName = - (typeof AINDEX_DIR_NAMES)[keyof typeof AINDEX_DIR_NAMES]; +export type AindexDirName + = (typeof AINDEX_DIR_NAMES)[keyof typeof AINDEX_DIR_NAMES] /** * Type for file names */ -export type AindexFileName = - (typeof AINDEX_FILE_NAMES)[keyof typeof AINDEX_FILE_NAMES]; +export type AindexFileName + = (typeof AINDEX_FILE_NAMES)[keyof typeof AINDEX_FILE_NAMES] /** * Type for relative paths */ -export type AindexRelativePath = - (typeof AINDEX_RELATIVE_PATHS)[keyof typeof AINDEX_RELATIVE_PATHS]; +export type AindexRelativePath + = (typeof AINDEX_RELATIVE_PATHS)[keyof typeof AINDEX_RELATIVE_PATHS] diff --git a/cli/src/plugins/plugin-core/InputTypes.ts b/cli/src/plugins/plugin-core/InputTypes.ts index 9015d705..674d9afd 100644 --- a/cli/src/plugins/plugin-core/InputTypes.ts +++ b/cli/src/plugins/plugin-core/InputTypes.ts @@ -1,5 +1,5 @@ -import type { ProjectConfig } from "./ConfigTypes.schema"; -import type { FilePathKind, IDEKind, PromptKind, RuleScope } from "./enums"; +import type {ProjectConfig} from './ConfigTypes.schema' +import type {FilePathKind, IDEKind, PromptKind, RuleScope} from './enums' import type { CommandYAMLFrontMatter, FileContent, @@ -12,65 +12,65 @@ import type { RuleYAMLFrontMatter, SeriName, SkillYAMLFrontMatter, - SubAgentYAMLFrontMatter, -} from "./PromptTypes"; + SubAgentYAMLFrontMatter +} from './PromptTypes' export interface Project { - readonly name?: string; - readonly dirFromWorkspacePath?: RelativePath; - readonly rootMemoryPrompt?: ProjectRootMemoryPrompt; - readonly childMemoryPrompts?: readonly ProjectChildrenMemoryPrompt[]; - readonly isPromptSourceProject?: boolean; - readonly isWorkspaceRootProject?: boolean; - readonly projectConfig?: ProjectConfig; + readonly name?: string + readonly dirFromWorkspacePath?: RelativePath + readonly rootMemoryPrompt?: ProjectRootMemoryPrompt + readonly childMemoryPrompts?: readonly ProjectChildrenMemoryPrompt[] + readonly isPromptSourceProject?: boolean + readonly isWorkspaceRootProject?: boolean + readonly projectConfig?: ProjectConfig } export interface Workspace { - readonly directory: Path; - readonly projects: Project[]; + readonly directory: Path + readonly projects: Project[] } /** * IDE configuration file */ export interface ProjectIDEConfigFile< - I extends IDEKind = IDEKind.Original, + I extends IDEKind = IDEKind.Original > extends FileContent { - readonly type: I; + readonly type: I } /** * AI Agent ignore configuration file */ export interface AIAgentIgnoreConfigFile { - readonly fileName: string; - readonly content: string; - readonly sourcePath?: string; + readonly fileName: string + readonly content: string + readonly sourcePath?: string } /** * Shared context fields across input aggregation and output execution. */ interface CollectedContextData { - readonly workspace: Workspace; + readonly workspace: Workspace /** Flat prompt projections used by current output plugins */ - readonly skills?: readonly SkillPrompt[]; - readonly commands?: readonly CommandPrompt[]; - readonly subAgents?: readonly SubAgentPrompt[]; - readonly rules?: readonly RulePrompt[]; - readonly readmePrompts?: readonly ReadmePrompt[]; - readonly globalMemory?: GlobalMemoryPrompt; + readonly skills?: readonly SkillPrompt[] + readonly commands?: readonly CommandPrompt[] + readonly subAgents?: readonly SubAgentPrompt[] + readonly rules?: readonly RulePrompt[] + readonly readmePrompts?: readonly ReadmePrompt[] + readonly globalMemory?: GlobalMemoryPrompt /** Other non-prompt fields */ - readonly vscodeConfigFiles?: readonly ProjectIDEConfigFile[]; - readonly zedConfigFiles?: readonly ProjectIDEConfigFile[]; - readonly jetbrainsConfigFiles?: readonly ProjectIDEConfigFile[]; - readonly editorConfigFiles?: readonly ProjectIDEConfigFile[]; - readonly aiAgentIgnoreConfigFiles?: readonly AIAgentIgnoreConfigFile[]; - readonly globalGitIgnore?: string; - readonly shadowGitExclude?: string; - readonly aindexDir?: string; + readonly vscodeConfigFiles?: readonly ProjectIDEConfigFile[] + readonly zedConfigFiles?: readonly ProjectIDEConfigFile[] + readonly jetbrainsConfigFiles?: readonly ProjectIDEConfigFile[] + readonly editorConfigFiles?: readonly ProjectIDEConfigFile[] + readonly aiAgentIgnoreConfigFiles?: readonly AIAgentIgnoreConfigFile[] + readonly globalGitIgnore?: string + readonly shadowGitExclude?: string + readonly aindexDir?: string } /** @@ -90,44 +90,44 @@ export interface OutputCollectedContext extends CollectedContextData {} * This keeps input and output stages decoupled while preserving data shape. */ export function toOutputCollectedContext( - input: InputCollectedContext, + input: InputCollectedContext ): OutputCollectedContext { return { workspace: { directory: input.workspace.directory, - projects: [...input.workspace.projects], + projects: [...input.workspace.projects] + }, + ...input.skills != null && {skills: [...input.skills]}, + ...input.commands != null && {commands: [...input.commands]}, + ...input.subAgents != null && {subAgents: [...input.subAgents]}, + ...input.rules != null && {rules: [...input.rules]}, + ...input.readmePrompts != null && { + readmePrompts: [...input.readmePrompts] + }, + ...input.globalMemory != null && {globalMemory: input.globalMemory}, + ...input.vscodeConfigFiles != null && { + vscodeConfigFiles: [...input.vscodeConfigFiles] + }, + ...input.zedConfigFiles != null && { + zedConfigFiles: [...input.zedConfigFiles] + }, + ...input.jetbrainsConfigFiles != null && { + jetbrainsConfigFiles: [...input.jetbrainsConfigFiles] }, - ...(input.skills != null && { skills: [...input.skills] }), - ...(input.commands != null && { commands: [...input.commands] }), - ...(input.subAgents != null && { subAgents: [...input.subAgents] }), - ...(input.rules != null && { rules: [...input.rules] }), - ...(input.readmePrompts != null && { - readmePrompts: [...input.readmePrompts], - }), - ...(input.globalMemory != null && { globalMemory: input.globalMemory }), - ...(input.vscodeConfigFiles != null && { - vscodeConfigFiles: [...input.vscodeConfigFiles], - }), - ...(input.zedConfigFiles != null && { - zedConfigFiles: [...input.zedConfigFiles], - }), - ...(input.jetbrainsConfigFiles != null && { - jetbrainsConfigFiles: [...input.jetbrainsConfigFiles], - }), - ...(input.editorConfigFiles != null && { - editorConfigFiles: [...input.editorConfigFiles], - }), - ...(input.aiAgentIgnoreConfigFiles != null && { - aiAgentIgnoreConfigFiles: [...input.aiAgentIgnoreConfigFiles], - }), - ...(input.globalGitIgnore != null && { - globalGitIgnore: input.globalGitIgnore, - }), - ...(input.shadowGitExclude != null && { - shadowGitExclude: input.shadowGitExclude, - }), - ...(input.aindexDir != null && { aindexDir: input.aindexDir }), - }; + ...input.editorConfigFiles != null && { + editorConfigFiles: [...input.editorConfigFiles] + }, + ...input.aiAgentIgnoreConfigFiles != null && { + aiAgentIgnoreConfigFiles: [...input.aiAgentIgnoreConfigFiles] + }, + ...input.globalGitIgnore != null && { + globalGitIgnore: input.globalGitIgnore + }, + ...input.shadowGitExclude != null && { + shadowGitExclude: input.shadowGitExclude + }, + ...input.aindexDir != null && {aindexDir: input.aindexDir} + } } /** @@ -140,13 +140,13 @@ export interface RulePrompt extends Prompt< RelativePath, string > { - readonly type: PromptKind.Rule; - readonly prefix: string; - readonly ruleName: string; - readonly globs: readonly string[]; - readonly scope: RuleScope; - readonly seriName?: SeriName; - readonly rawMdxContent?: string; + readonly type: PromptKind.Rule + readonly prefix: string + readonly ruleName: string + readonly globs: readonly string[] + readonly scope: RuleScope + readonly seriName?: SeriName + readonly rawMdxContent?: string } /** @@ -159,12 +159,12 @@ export interface CommandPrompt extends Prompt< RelativePath, string > { - readonly type: PromptKind.Command; - readonly globalOnly?: true; - readonly commandPrefix?: string; - readonly commandName: string; - readonly seriName?: SeriName; - readonly rawMdxContent?: string; + readonly type: PromptKind.Command + readonly globalOnly?: true + readonly commandPrefix?: string + readonly commandName: string + readonly seriName?: SeriName + readonly rawMdxContent?: string } /** @@ -177,12 +177,12 @@ export interface SubAgentPrompt extends Prompt< RelativePath, string > { - readonly type: PromptKind.SubAgent; - readonly agentPrefix?: string; - readonly agentName: string; - readonly canonicalName: string; - readonly seriName?: SeriName; - readonly rawMdxContent?: string; + readonly type: PromptKind.SubAgent + readonly agentPrefix?: string + readonly agentName: string + readonly canonicalName: string + readonly seriName?: SeriName + readonly rawMdxContent?: string } /** @@ -190,14 +190,14 @@ export interface SubAgentPrompt extends Prompt< * Excludes skill.md which is the main skill file */ export interface SkillChildDoc extends Prompt { - readonly type: PromptKind.SkillChildDoc; - readonly relativePath: string; + readonly type: PromptKind.SkillChildDoc + readonly relativePath: string } /** * Resource content encoding type */ -export type SkillResourceEncoding = "text" | "base64"; +export type SkillResourceEncoding = 'text' | 'base64' /** * Skill resource file for AI on-demand access @@ -213,26 +213,26 @@ export type SkillResourceEncoding = "text" | "base64"; * - Binary files: .exe, .dll, .wasm, etc. */ export interface SkillResource { - readonly type: PromptKind.SkillResource; - readonly extension: string; - readonly fileName: string; - readonly relativePath: string; - readonly sourcePath?: string; - readonly content: string; - readonly encoding: SkillResourceEncoding; - readonly length: number; - readonly mimeType?: string; + readonly type: PromptKind.SkillResource + readonly extension: string + readonly fileName: string + readonly relativePath: string + readonly sourcePath?: string + readonly content: string + readonly encoding: SkillResourceEncoding + readonly length: number + readonly mimeType?: string } /** * MCP server configuration entry */ export interface McpServerConfig { - readonly command: string; - readonly args?: readonly string[]; - readonly env?: Readonly>; - readonly disabled?: boolean; - readonly autoApprove?: readonly string[]; + readonly command: string + readonly args?: readonly string[] + readonly env?: Readonly> + readonly disabled?: boolean + readonly autoApprove?: readonly string[] } /** @@ -241,23 +241,23 @@ export interface McpServerConfig { * - Others: may support lazy loading in the future */ export interface SkillMcpConfig { - readonly type: PromptKind.SkillMcpConfig; - readonly mcpServers: Readonly>; - readonly rawContent: string; + readonly type: PromptKind.SkillMcpConfig + readonly mcpServers: Readonly> + readonly rawContent: string } export interface SkillPrompt extends Prompt< PromptKind.Skill, SkillYAMLFrontMatter > { - readonly type: PromptKind.Skill; - readonly dir: RelativePath; - readonly skillName: string; - readonly yamlFrontMatter: SkillYAMLFrontMatter; - readonly mcpConfig?: SkillMcpConfig; - readonly childDocs?: SkillChildDoc[]; - readonly resources?: SkillResource[]; - readonly seriName?: SeriName; + readonly type: PromptKind.Skill + readonly dir: RelativePath + readonly skillName: string + readonly yamlFrontMatter: SkillYAMLFrontMatter + readonly mcpConfig?: SkillMcpConfig + readonly childDocs?: SkillChildDoc[] + readonly resources?: SkillResource[] + readonly seriName?: SeriName } /** @@ -267,36 +267,36 @@ export interface SkillPrompt extends Prompt< * - CodeOfConduct: coc.mdx → CODE_OF_CONDUCT.md * - Security: security.mdx → SECURITY.md */ -export type ReadmeFileKind = "Readme" | "CodeOfConduct" | "Security"; +export type ReadmeFileKind = 'Readme' | 'CodeOfConduct' | 'Security' /** * Mapping from ReadmeFileKind to source/output file names */ export const README_FILE_KIND_MAP: Readonly< - Record + Record > = { - Readme: { src: "rdm.mdx", out: "README.md" }, - CodeOfConduct: { src: "coc.mdx", out: "CODE_OF_CONDUCT.md" }, - Security: { src: "security.mdx", out: "SECURITY.md" }, -}; + Readme: {src: 'rdm.mdx', out: 'README.md'}, + CodeOfConduct: {src: 'coc.mdx', out: 'CODE_OF_CONDUCT.md'}, + Security: {src: 'security.mdx', out: 'SECURITY.md'} +} /** * README-family prompt data structure (README.md, CODE_OF_CONDUCT.md, SECURITY.md) */ export interface ReadmePrompt extends Prompt { - readonly type: PromptKind.Readme; - readonly projectName: string; - readonly targetDir: RelativePath; - readonly isRoot: boolean; - readonly fileKind: ReadmeFileKind; + readonly type: PromptKind.Readme + readonly projectName: string + readonly targetDir: RelativePath + readonly isRoot: boolean + readonly fileKind: ReadmeFileKind } /** * Supported locale codes */ -export type Locale = "zh" | "en"; +export type Locale = 'zh' | 'en' -export type LocalizedFileExtension = string | readonly string[]; +export type LocalizedFileExtension = string | readonly string[] /** * Localized content wrapper for a single locale @@ -304,22 +304,22 @@ export type LocalizedFileExtension = string | readonly string[]; */ export interface LocalizedContent { /** Compiled/processed content */ - readonly content: string; + readonly content: string /** Original MDX source (before compilation) */ - readonly rawMdx?: string; + readonly rawMdx?: string /** Extracted front matter */ - readonly frontMatter?: Record; + readonly frontMatter?: Record /** File last modified timestamp */ - readonly lastModified: Date; + readonly lastModified: Date /** Full prompt object (optional, for extended access) */ - readonly prompt?: T; + readonly prompt?: T /** Absolute file path */ - readonly filePath: string; + readonly filePath: string } /** @@ -327,44 +327,44 @@ export interface LocalizedContent { */ export interface LocalizedSource { /** Default source content (.src.mdx) */ - readonly zh?: LocalizedContent; + readonly zh?: LocalizedContent /** English content (.mdx) */ - readonly en?: LocalizedContent; + readonly en?: LocalizedContent /** Default locale content (typically zh) */ - readonly default: LocalizedContent; + readonly default: LocalizedContent /** Which locale is the default */ - readonly defaultLocale: Locale; + readonly defaultLocale: Locale } /** Universal localized prompt wrapper */ export interface LocalizedPrompt< T extends Prompt = Prompt, - K extends PromptKind = PromptKind, + K extends PromptKind = PromptKind > { - readonly name: string; // Prompt identifier name - readonly type: K; // Prompt type kind - readonly src?: LocalizedSource; // Source files content (src directory, optional when dist-only) - readonly dist?: LocalizedContent; // Compiled/dist content (dist directory, optional) + readonly name: string // Prompt identifier name + readonly type: K // Prompt type kind + readonly src?: LocalizedSource // Source files content (src directory, optional when dist-only) + readonly dist?: LocalizedContent // Compiled/dist content (dist directory, optional) /** Metadata flags */ readonly metadata: { - readonly hasDist: boolean; // Whether dist content exists - readonly hasMultipleLocales: boolean; // Whether multiple locales exist in src - readonly isDirectoryStructure: boolean; // Whether this is a directory-based prompt (like skills) + readonly hasDist: boolean // Whether dist content exists + readonly hasMultipleLocales: boolean // Whether multiple locales exist in src + readonly isDirectoryStructure: boolean // Whether this is a directory-based prompt (like skills) /** Available child items (for directory structures) */ - readonly children?: string[]; - }; + readonly children?: string[] + } /** File paths for all variants */ readonly paths: { - readonly zh?: string; - readonly en?: string; - readonly dist?: string; - }; + readonly zh?: string + readonly en?: string + readonly dist?: string + } } /** @@ -373,12 +373,12 @@ export interface LocalizedPrompt< export interface LocalizedReadOptions { /** File extensions for each locale */ readonly localeExtensions: { - readonly zh: LocalizedFileExtension; - readonly en: LocalizedFileExtension; - }; + readonly zh: LocalizedFileExtension + readonly en: LocalizedFileExtension + } /** Entry file name (without extension, e.g., 'skill' for skills) */ - readonly entryFileName?: string; + readonly entryFileName?: string /** Whether source contents should be hydrated and compiled in addition to dist */ readonly hydrateSourceContents?: boolean @@ -388,29 +388,29 @@ export interface LocalizedReadOptions { content: string, locale: Locale, name: string, - metadata?: Record, - ) => T | Promise; + metadata?: Record + ) => T | Promise /** Prompt kind */ - readonly kind: K; + readonly kind: K /** Whether this is a directory-based structure */ - readonly isDirectoryStructure: boolean; + readonly isDirectoryStructure: boolean } /** * Result of reading a directory structure (like skills) */ export interface DirectoryReadResult { - readonly prompts: LocalizedPrompt[]; - readonly errors: ReadError[]; + readonly prompts: LocalizedPrompt[] + readonly errors: ReadError[] } /** * Error during reading */ export interface ReadError { - readonly path: string; - readonly error: Error; - readonly phase: "scan" | "read" | "compile"; + readonly path: string + readonly error: Error + readonly phase: 'scan' | 'read' | 'compile' } diff --git a/cli/src/plugins/plugin-core/constants.ts b/cli/src/plugins/plugin-core/constants.ts index 7210749b..ab8d4b24 100644 --- a/cli/src/plugins/plugin-core/constants.ts +++ b/cli/src/plugins/plugin-core/constants.ts @@ -1,123 +1,122 @@ -import type { UserConfigFile } from "./ConfigTypes.schema"; +import type {UserConfigFile} from './ConfigTypes.schema' export const PathPlaceholders = { - USER_HOME: "~", - WORKSPACE: "$WORKSPACE", -} as const; + USER_HOME: '~', + WORKSPACE: '$WORKSPACE' +} as const -type DefaultUserConfig = Readonly>>; -export const DEFAULT_USER_CONFIG = {} as DefaultUserConfig; +type DefaultUserConfig = Readonly>> +export const DEFAULT_USER_CONFIG = {} as DefaultUserConfig export const PLUGIN_NAMES = { - AgentsOutput: "AgentsOutputPlugin", - GeminiCLIOutput: "GeminiCLIOutputPlugin", - CursorOutput: "CursorOutputPlugin", - WindsurfOutput: "WindsurfOutputPlugin", - ClaudeCodeCLIOutput: "ClaudeCodeCLIOutputPlugin", - KiroIDEOutput: "KiroCLIOutputPlugin", - OpencodeCLIOutput: "OpencodeCLIOutputPlugin", - OpenAICodexCLIOutput: "CodexCLIOutputPlugin", - DroidCLIOutput: "DroidCLIOutputPlugin", - WarpIDEOutput: "WarpIDEOutputPlugin", - TraeIDEOutput: "TraeIDEOutputPlugin", - TraeCNIDEOutput: "TraeCNIDEOutputPlugin", - QoderIDEOutput: "QoderIDEPluginOutputPlugin", - JetBrainsCodeStyleOutput: "JetBrainsIDECodeStyleConfigOutputPlugin", - JetBrainsAICodexOutput: "JetBrainsAIAssistantCodexOutputPlugin", - AgentSkillsCompactOutput: "GenericSkillsOutputPlugin", - GitExcludeOutput: "GitExcludeOutputPlugin", - ReadmeOutput: "ReadmeMdConfigFileOutputPlugin", - VSCodeOutput: "VisualStudioCodeIDEConfigOutputPlugin", - ZedOutput: "ZedIDEConfigOutputPlugin", - EditorConfigOutput: "EditorConfigOutputPlugin", - AntigravityOutput: "AntigravityOutputPlugin", -} as const; - -export type PluginName = (typeof PLUGIN_NAMES)[keyof typeof PLUGIN_NAMES]; - -export const WORKSPACE_ROOT_PROJECT_NAME = "__workspace__"; + AgentsOutput: 'AgentsOutputPlugin', + GeminiCLIOutput: 'GeminiCLIOutputPlugin', + CursorOutput: 'CursorOutputPlugin', + WindsurfOutput: 'WindsurfOutputPlugin', + ClaudeCodeCLIOutput: 'ClaudeCodeCLIOutputPlugin', + KiroIDEOutput: 'KiroCLIOutputPlugin', + OpencodeCLIOutput: 'OpencodeCLIOutputPlugin', + OpenAICodexCLIOutput: 'CodexCLIOutputPlugin', + DroidCLIOutput: 'DroidCLIOutputPlugin', + WarpIDEOutput: 'WarpIDEOutputPlugin', + TraeIDEOutput: 'TraeIDEOutputPlugin', + TraeCNIDEOutput: 'TraeCNIDEOutputPlugin', + QoderIDEOutput: 'QoderIDEPluginOutputPlugin', + JetBrainsCodeStyleOutput: 'JetBrainsIDECodeStyleConfigOutputPlugin', + JetBrainsAICodexOutput: 'JetBrainsAIAssistantCodexOutputPlugin', + AgentSkillsCompactOutput: 'GenericSkillsOutputPlugin', + GitExcludeOutput: 'GitExcludeOutputPlugin', + ReadmeOutput: 'ReadmeMdConfigFileOutputPlugin', + VSCodeOutput: 'VisualStudioCodeIDEConfigOutputPlugin', + ZedOutput: 'ZedIDEConfigOutputPlugin', + EditorConfigOutput: 'EditorConfigOutputPlugin', + AntigravityOutput: 'AntigravityOutputPlugin' +} as const + +export type PluginName = (typeof PLUGIN_NAMES)[keyof typeof PLUGIN_NAMES] + +export const WORKSPACE_ROOT_PROJECT_NAME = '__workspace__' /** * Constants for output plugins. */ export const OutputFileNames = { - SKILL: "SKILL.md", - CURSOR_GLOBAL_RULE: "global.mdc", - CURSOR_PROJECT_RULE: "always.md", - MCP_CONFIG: "mcp.json", - CLAUDE_MEMORY: "CLAUDE.md", - WINDSURF_GLOBAL_RULE: "global_rules.md", -} as const; + SKILL: 'SKILL.md', + CURSOR_GLOBAL_RULE: 'global.mdc', + CURSOR_PROJECT_RULE: 'always.md', + MCP_CONFIG: 'mcp.json', + CLAUDE_MEMORY: 'CLAUDE.md', + WINDSURF_GLOBAL_RULE: 'global_rules.md' +} as const export const OutputPrefixes = { - RULE: "rule-", - CHILD_RULE: "glob-", -} as const; + RULE: 'rule-', + CHILD_RULE: 'glob-' +} as const export const OutputSubdirectories = { - RULES: "rules", - COMMANDS: "commands", - SKILLS: "skills", - AGENTS: "agents", - CURSOR_SKILLS: "skills-cursor", -} as const; + RULES: 'rules', + COMMANDS: 'commands', + SKILLS: 'skills', + AGENTS: 'agents', + CURSOR_SKILLS: 'skills-cursor' +} as const export const FrontMatterFields = { - ALWAYS_APPLY: "alwaysApply", - GLOBS: "globs", - DESCRIPTION: "description", - NAME: "name", - TRIGGER: "trigger", -} as const; + ALWAYS_APPLY: 'alwaysApply', + GLOBS: 'globs', + DESCRIPTION: 'description', + NAME: 'name', + TRIGGER: 'trigger' +} as const export const FileExtensions = { - MD: ".md", - MDC: ".mdc", - MDX: ".mdx", - JSON: ".json", -} as const; + MD: '.md', + MDC: '.mdc', + MDX: '.mdx', + JSON: '.json' +} as const export const SourcePromptExtensions = { - PRIMARY: ".src.mdx", -} as const; + PRIMARY: '.src.mdx' +} as const export const SourcePromptFileExtensions = [ - SourcePromptExtensions.PRIMARY, -] as const; + SourcePromptExtensions.PRIMARY +] as const export const SourceLocaleExtensions = { zh: SourcePromptFileExtensions, - en: FileExtensions.MDX, -} as const; + en: FileExtensions.MDX +} as const export function hasSourcePromptExtension(fileName: string): boolean { - return SourcePromptFileExtensions.some((extension) => - fileName.endsWith(extension), - ); + return SourcePromptFileExtensions.some(extension => + fileName.endsWith(extension)) } export const GlobalConfigDirs = { - CURSOR: ".cursor", - CLAUDE: ".claude", - WINDSURF: ".codeium/windsurf", - WINDSURF_RULES: ".windsurf", -} as const; + CURSOR: '.cursor', + CLAUDE: '.claude', + WINDSURF: '.codeium/windsurf', + WINDSURF_RULES: '.windsurf' +} as const export const IgnoreFiles = { - CURSOR: ".cursorignore", - WINDSURF: ".codeiumignore", -} as const; + CURSOR: '.cursorignore', + WINDSURF: '.codeiumignore' +} as const export const PreservedSkills = { CURSOR: new Set([ - "create-rule", - "create-skill", - "create-subagent", - "migrate-to-skills", - "update-cursor-settings", - ]), -} as const; + 'create-rule', + 'create-skill', + 'create-subagent', + 'migrate-to-skills', + 'update-cursor-settings' + ]) +} as const export const ToolPresets = { - CLAUDE_CODE: "claudeCode", -} as const; + CLAUDE_CODE: 'claudeCode' +} as const diff --git a/cli/src/plugins/plugin-core/enums.ts b/cli/src/plugins/plugin-core/enums.ts index 2ed895da..d146d369 100644 --- a/cli/src/plugins/plugin-core/enums.ts +++ b/cli/src/plugins/plugin-core/enums.ts @@ -1,53 +1,53 @@ export enum PluginKind { - Output = "output", + Output = 'output' } export enum PromptKind { - GlobalMemory = "globalMemory", - ProjectRootMemory = "projectRootMemory", - ProjectChildrenMemory = "projectChildrenMemory", - Command = "command", - SubAgent = "subAgent", - Skill = "skill", - SkillChildDoc = "skillChildDoc", - SkillResource = "skillResource", - SkillMcpConfig = "skillMcpConfig", - Readme = "readme", - Rule = "rule", + GlobalMemory = 'globalMemory', + ProjectRootMemory = 'projectRootMemory', + ProjectChildrenMemory = 'projectChildrenMemory', + Command = 'command', + SubAgent = 'subAgent', + Skill = 'skill', + SkillChildDoc = 'skillChildDoc', + SkillResource = 'skillResource', + SkillMcpConfig = 'skillMcpConfig', + Readme = 'readme', + Rule = 'rule' } -export type RuleScope = "project" | "global"; +export type RuleScope = 'project' | 'global' export enum FilePathKind { - Relative = "relative", - Absolute = "absolute", - Root = "root", + Relative = 'relative', + Absolute = 'absolute', + Root = 'root' } export enum IDEKind { - VSCode = "vscode", - Zed = "zed", - IntellijIDEA = "intellijIdea", - Git = "git", - EditorConfig = "editorconfig", - Original = "original", + VSCode = 'vscode', + Zed = 'zed', + IntellijIDEA = 'intellijIdea', + Git = 'git', + EditorConfig = 'editorconfig', + Original = 'original' } export enum NamingCaseKind { - CamelCase = "camelCase", - PascalCase = "pascalCase", - SnakeCase = "snakeCase", - KebabCase = "kebabCase", - UpperCase = "upperCase", - LowerCase = "lowerCase", - Original = "original", + CamelCase = 'camelCase', + PascalCase = 'pascalCase', + SnakeCase = 'snakeCase', + KebabCase = 'kebabCase', + UpperCase = 'upperCase', + LowerCase = 'lowerCase', + Original = 'original' } export enum GlobalConfigDirectoryType { - UserHome = "userHome", - External = "external", + UserHome = 'userHome', + External = 'external' } -export type CodingAgentTools = string; +export type CodingAgentTools = string -export type ClaudeCodeCLISubAgentColors = string; +export type ClaudeCodeCLISubAgentColors = string diff --git a/cli/src/public-config-paths.ts b/cli/src/public-config-paths.ts index 3de27b8b..475c3526 100644 --- a/cli/src/public-config-paths.ts +++ b/cli/src/public-config-paths.ts @@ -1,18 +1,17 @@ -import type { ProxyCommand, ProxyContext } from "@truenine/script-runtime"; -import type { IDEKind } from "./plugins/plugin-core/enums"; -import type { ProjectIDEConfigFile } from "./plugins/plugin-core/InputTypes"; -import * as fs from "node:fs"; -import * as path from "node:path"; -import process from "node:process"; -import { resolvePublicPath } from "@truenine/script-runtime"; -import { AINDEX_FILE_NAMES } from "./plugins/plugin-core/AindexTypes"; -import { FilePathKind } from "./plugins/plugin-core/enums"; - -export const PUBLIC_CONFIG_DEFINITION_DIR = "public"; -export const PUBLIC_PROXY_FILE_NAME = "proxy.ts"; - -export const PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH = ".gitignore"; -export const PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH = ".git/info/exclude"; +import type {IDEKind} from './plugins/plugin-core/enums' +import type {ProjectIDEConfigFile} from './plugins/plugin-core/InputTypes' +import * as fs from 'node:fs' +import * as path from 'node:path' +import process from 'node:process' +import {resolvePublicPath} from '@truenine/script-runtime' +import {AINDEX_FILE_NAMES} from './plugins/plugin-core/AindexTypes' +import {FilePathKind} from './plugins/plugin-core/enums' + +export const PUBLIC_CONFIG_DEFINITION_DIR = 'public' +export const PUBLIC_PROXY_FILE_NAME = 'proxy.ts' + +export const PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH = '.gitignore' +export const PUBLIC_GIT_EXCLUDE_TARGET_RELATIVE_PATH = '.git/info/exclude' export const AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS = [ AINDEX_FILE_NAMES.QODER_IGNORE, @@ -20,9 +19,9 @@ export const AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS = [ AINDEX_FILE_NAMES.WARP_INDEX_IGNORE, AINDEX_FILE_NAMES.AI_IGNORE, AINDEX_FILE_NAMES.CODEIUM_IGNORE, - ".kiroignore", - ".traeignore", -] as const; + '.kiroignore', + '.traeignore' +] as const export const KNOWN_PUBLIC_CONFIG_TARGET_RELATIVE_PATHS = [ PUBLIC_GIT_IGNORE_TARGET_RELATIVE_PATH, @@ -34,147 +33,167 @@ export const KNOWN_PUBLIC_CONFIG_TARGET_RELATIVE_PATHS = [ AINDEX_FILE_NAMES.IDEA_PROJECT_XML, AINDEX_FILE_NAMES.IDEA_CODE_STYLE_CONFIG_XML, AINDEX_FILE_NAMES.IDEA_GITIGNORE, - ...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS, -] as const; + ...AI_AGENT_IGNORE_TARGET_RELATIVE_PATHS +] as const export interface PublicDefinitionResolveOptions { - readonly command?: ProxyCommand | undefined; - readonly workspaceDir?: string | undefined; + readonly command?: ProxyCommand | undefined + readonly workspaceDir?: string | undefined +} + +type ProxyCommand = 'execute' | 'dry-run' | 'clean' | 'plugins' + +interface ProxyContext { + readonly cwd: string + readonly workspaceDir: string + readonly aindexDir: string + readonly command: ProxyCommand + readonly platform: NodeJS.Platform } -const publicDefinitionPathCache = new Map(); +const publicDefinitionPathCache = new Map() function normalizeTargetRelativePath(targetRelativePath: string): string { const normalizedPath = targetRelativePath .split(/[\\/]+/) - .filter((segment) => segment.length > 0) - .join("/"); + .filter(segment => segment.length > 0) + .join('/') if (normalizedPath.length === 0) - throw new Error("public target relative path cannot be empty"); - return normalizedPath; + { throw new Error('public target relative path cannot be empty') } + return normalizedPath } function getPublicRootDir(aindexDir: string): string { - return path.join(aindexDir, PUBLIC_CONFIG_DEFINITION_DIR); + return path.join(aindexDir, PUBLIC_CONFIG_DEFINITION_DIR) } function getPublicProxyPath(aindexDir: string): string { - return path.join(getPublicRootDir(aindexDir), PUBLIC_PROXY_FILE_NAME); + return path.join(getPublicRootDir(aindexDir), PUBLIC_PROXY_FILE_NAME) } function getResolveCommand( - options?: PublicDefinitionResolveOptions, + options?: PublicDefinitionResolveOptions ): ProxyCommand { - return options?.command ?? "execute"; + return options?.command ?? 'execute' } function getResolveWorkspaceDir( aindexDir: string, - options?: PublicDefinitionResolveOptions, + options?: PublicDefinitionResolveOptions ): string { - return path.resolve(options?.workspaceDir ?? path.dirname(aindexDir)); + return path.resolve(options?.workspaceDir ?? path.dirname(aindexDir)) } function buildProxyContext( aindexDir: string, workspaceDir: string, - command: ProxyCommand, + command: ProxyCommand ): ProxyContext { - const resolvedAindexDir = path.resolve(aindexDir); + const resolvedAindexDir = path.resolve(aindexDir) return { cwd: workspaceDir, workspaceDir, aindexDir: resolvedAindexDir, command, - platform: process.platform, - }; + platform: process.platform + } +} + +function resolvePublicPathForDefinition( + filePath: string, + ctx: ProxyContext, + logicalPath: string +): string { + // `tsc` resolves this workspace package correctly, but ESLint's type-aware rules + // sometimes treat it as an error-typed export during monorepo lint execution. + return resolvePublicPath(filePath, ctx, logicalPath) } function resolvePublicDefinitionRelativePath( aindexDir: string, targetRelativePath: string, - options?: PublicDefinitionResolveOptions, + options?: PublicDefinitionResolveOptions ): string { - const normalizedTargetPath = normalizeTargetRelativePath(targetRelativePath); + const normalizedTargetPath = normalizeTargetRelativePath(targetRelativePath) if (normalizedTargetPath === PUBLIC_PROXY_FILE_NAME) - return PUBLIC_PROXY_FILE_NAME; + { return PUBLIC_PROXY_FILE_NAME } - const proxyFilePath = getPublicProxyPath(aindexDir); + const proxyFilePath = getPublicProxyPath(aindexDir) if (!(fs.existsSync(proxyFilePath) && fs.statSync(proxyFilePath).isFile())) - return normalizedTargetPath; + { return normalizedTargetPath } - const command = getResolveCommand(options); - const workspaceDir = getResolveWorkspaceDir(aindexDir, options); + const command = getResolveCommand(options) + const workspaceDir = getResolveWorkspaceDir(aindexDir, options) const cacheKey = [ proxyFilePath, workspaceDir, command, - normalizedTargetPath, - ].join("::"); - const cachedPath = publicDefinitionPathCache.get(cacheKey); - if (cachedPath != null) return cachedPath; + normalizedTargetPath + ].join('::') + const cachedPath = publicDefinitionPathCache.get(cacheKey) + if (cachedPath != null) return cachedPath - const resolvedRelativePath = resolvePublicPath( + const resolvedRelativePath = resolvePublicPathForDefinition( proxyFilePath, buildProxyContext(aindexDir, workspaceDir, command), - normalizedTargetPath, - ); + normalizedTargetPath + ) - publicDefinitionPathCache.set(cacheKey, resolvedRelativePath); - return resolvedRelativePath; + publicDefinitionPathCache.set(cacheKey, resolvedRelativePath) + return resolvedRelativePath } export function resolvePublicDefinitionPath( aindexDir: string, targetRelativePath: string, - options?: PublicDefinitionResolveOptions, + options?: PublicDefinitionResolveOptions ): string { const resolvedRelativePath = resolvePublicDefinitionRelativePath( aindexDir, targetRelativePath, - options, - ); + options + ) return path.join( getPublicRootDir(aindexDir), - ...resolvedRelativePath.split(/[\\/]+/), - ); + ...resolvedRelativePath.split(/[\\/]+/) + ) } export function collectKnownPublicConfigDefinitionPaths( aindexDir: string, - options?: PublicDefinitionResolveOptions, + options?: PublicDefinitionResolveOptions ): string[] { const resolvedPaths = new Set([ - resolvePublicDefinitionPath(aindexDir, PUBLIC_PROXY_FILE_NAME), - ]); + resolvePublicDefinitionPath(aindexDir, PUBLIC_PROXY_FILE_NAME) + ]) for (const targetRelativePath of KNOWN_PUBLIC_CONFIG_TARGET_RELATIVE_PATHS) { resolvedPaths.add( - resolvePublicDefinitionPath(aindexDir, targetRelativePath, options), - ); + resolvePublicDefinitionPath(aindexDir, targetRelativePath, options) + ) } - return [...resolvedPaths]; + return [...resolvedPaths] } export function readPublicIdeConfigDefinitionFile( type: T, targetRelativePath: string, aindexDir: string, - fs: typeof import("node:fs"), - options?: PublicDefinitionResolveOptions, + fs: typeof import('node:fs'), + options?: PublicDefinitionResolveOptions ): ProjectIDEConfigFile | undefined { const absolutePath = resolvePublicDefinitionPath( aindexDir, targetRelativePath, - options, - ); + options + ) if (!(fs.existsSync(absolutePath) && fs.statSync(absolutePath).isFile())) - return void 0; + { return void 0 } - const content = fs.readFileSync(absolutePath, "utf8"); + const content = fs.readFileSync(absolutePath, 'utf8') return { type, content, @@ -183,7 +202,7 @@ export function readPublicIdeConfigDefinitionFile( dir: { pathKind: FilePathKind.Absolute, path: absolutePath, - getDirectoryName: () => path.basename(absolutePath), - }, - }; + getDirectoryName: () => path.basename(absolutePath) + } + } } diff --git a/cli/tsconfig.json b/cli/tsconfig.json index 4effb1ff..e27cc557 100644 --- a/cli/tsconfig.json +++ b/cli/tsconfig.json @@ -10,7 +10,6 @@ ], "moduleDetection": "force", "useDefineForClassFields": true, - "baseUrl": ".", "module": "ESNext", "moduleResolution": "Bundler", "paths": { @@ -45,6 +44,9 @@ "@truenine/plugin-zed": ["./src/plugins/plugin-zed.ts"] }, "resolveJsonModule": true, + "types": [ + "node" + ], "allowImportingTsExtensions": true, "strict": true, "strictBindCallApply": true, diff --git a/cli/tsdown.config.ts b/cli/tsdown.config.ts index a7835cd2..183d9c5c 100644 --- a/cli/tsdown.config.ts +++ b/cli/tsdown.config.ts @@ -65,7 +65,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src'), ...pluginAliases @@ -86,7 +88,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src'), ...pluginAliases @@ -106,7 +110,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src'), ...pluginAliases diff --git a/doc/app/docs/[section]/[[...rest]]/page.tsx b/doc/app/docs/[section]/[[...rest]]/page.tsx index 2e6d5758..8e7b3748 100644 --- a/doc/app/docs/[section]/[[...rest]]/page.tsx +++ b/doc/app/docs/[section]/[[...rest]]/page.tsx @@ -1,14 +1,14 @@ -import type { ComponentType, ReactNode } from 'react' -import { notFound } from 'next/navigation' -import { generateStaticParamsFor, importPage } from 'nextra/pages' -import { useMDXComponents as getMDXComponents } from '../../../../mdx-components' -import { isDocSectionName } from '../../../../lib/docs-sections' +import type {ComponentType, ReactNode} from 'react' +import {notFound} from 'next/navigation' +import {generateStaticParamsFor, importPage} from 'nextra/pages' +import {isDocSectionName} from '../../../../lib/docs-sections' +import {useMDXComponents as getMDXComponents} from '../../../../mdx-components' const getAllDocParams = generateStaticParamsFor('mdxPath') function isSectionDocParam( - value: { mdxPath?: string[] }, -): value is { mdxPath: [string, ...string[]] } { + value: {mdxPath?: string[]} +): value is {mdxPath: [string, ...string[]]} { return value.mdxPath != null && value.mdxPath.length > 0 && isDocSectionName(value.mdxPath[0]) @@ -16,21 +16,21 @@ function isSectionDocParam( export async function generateStaticParams() { const allParams = await getAllDocParams() - return (allParams as { mdxPath?: string[] }[]) + return (allParams as {mdxPath?: string[]}[]) .filter(isSectionDocParam) .map(p => ({ section: p.mdxPath[0], - rest: p.mdxPath.length > 1 ? p.mdxPath.slice(1) : undefined, + rest: p.mdxPath.length > 1 ? p.mdxPath.slice(1) : void 0 })) } export async function generateMetadata(props: { - readonly params: Promise<{ readonly section: string; readonly rest?: string[] }> + readonly params: Promise<{readonly section: string, readonly rest?: string[]}> }) { const params = await props.params if (!isDocSectionName(params.section)) notFound() - const mdxPath = [params.section, ...(params.rest ?? [])] - const { metadata } = await importPage(mdxPath) + const mdxPath = [params.section, ...params.rest ?? []] + const {metadata} = await importPage(mdxPath) return metadata } @@ -48,16 +48,16 @@ const components = getMDXComponents() as { const Wrapper = components.wrapper export default async function SectionPage(props: { - readonly params: Promise<{ readonly section: string; readonly rest?: string[] }> + readonly params: Promise<{readonly section: string, readonly rest?: string[]}> }) { const params = await props.params if (!isDocSectionName(params.section)) notFound() - const mdxPath = [params.section, ...(params.rest ?? [])] + const mdxPath = [params.section, ...params.rest ?? []] const { default: MDXContent, toc, metadata, - sourceCode, + sourceCode } = await importPage(mdxPath) const page = diff --git a/doc/app/docs/[section]/layout.tsx b/doc/app/docs/[section]/layout.tsx index 3899e889..c2c6ab49 100644 --- a/doc/app/docs/[section]/layout.tsx +++ b/doc/app/docs/[section]/layout.tsx @@ -1,72 +1,72 @@ -import type { ReactNode } from "react"; -import { notFound } from "next/navigation"; -import { Footer, Layout, Navbar } from "nextra-theme-docs"; -import { getPageMap } from "nextra/page-map"; -import { DocsSectionNav } from "../../../components/docs-section-nav"; -import { isDocSectionName } from "../../../lib/docs-sections"; -import { siteConfig } from "../../../lib/site"; +import type {ReactNode} from 'react' +import {notFound} from 'next/navigation' +import {Footer, Layout, Navbar} from 'nextra-theme-docs' +import {getPageMap} from 'nextra/page-map' +import {DocsSectionNav} from '../../../components/docs-section-nav' +import {isDocSectionName} from '../../../lib/docs-sections' +import {siteConfig} from '../../../lib/site' export default async function SectionLayout({ children, - params, + params }: { - readonly children: ReactNode; - readonly params: Promise<{ readonly section: string }>; + readonly children: ReactNode + readonly params: Promise<{readonly section: string}> }) { - const { section } = await params; - if (!isDocSectionName(section)) notFound(); - const pageMap = await getPageMap(`/docs/${section}`); + const {section} = await params + if (!isDocSectionName(section)) notFound() + const pageMap = await getPageMap(`/docs/${section}`) return ( memory-sync
- } + )} > - } + )} footer={
AGPL-3.0-only · 面向当前仓库实现、命令表面与配置边界
} docsRepositoryBase={`${siteConfig.docsRepositoryBase}/content`} editLink="在 GitHub 上编辑此页" feedback={{ - content: "有遗漏或过时信息?提交 issue", + content: '有遗漏或过时信息?提交 issue', link: siteConfig.issueUrl, - labels: "documentation", + labels: 'documentation' }} sidebar={{ autoCollapse: false, defaultMenuCollapseLevel: 99, defaultOpen: true, - toggleButton: false, + toggleButton: false }} toc={{ float: true, - title: "本页目录", - backToTop: "回到顶部", + title: '本页目录', + backToTop: '回到顶部' }} themeSwitch={{ - dark: "暗色", - light: "亮色", - system: "系统", + dark: '暗色', + light: '亮色', + system: '系统' }} nextThemes={{ - attribute: "class", - defaultTheme: "dark", + attribute: 'class', + defaultTheme: 'dark', disableTransitionOnChange: true, - storageKey: "memory-sync-docs-theme", + storageKey: 'memory-sync-docs-theme' }} > {children} - ); + ) } diff --git a/doc/components/docs-section-nav.tsx b/doc/components/docs-section-nav.tsx index 05c616a8..0731ff9d 100644 --- a/doc/components/docs-section-nav.tsx +++ b/doc/components/docs-section-nav.tsx @@ -5,7 +5,7 @@ import {useParams} from 'next/navigation' import {DOC_SECTION_LINKS} from '../lib/docs-sections' export function DocsSectionNav() { - const params = useParams<{section?: string | string[]}>() + const params = useParams() const currentSection = Array.isArray(params.section) ? params.section[0] : params.section return ( @@ -24,7 +24,7 @@ export function DocsSectionNav() { {link.label} diff --git a/doc/lib/docs-sections.ts b/doc/lib/docs-sections.ts index 64833103..7a1bbb7f 100644 --- a/doc/lib/docs-sections.ts +++ b/doc/lib/docs-sections.ts @@ -1,25 +1,25 @@ export const DOC_SECTION_LINKS = [ - { href: "/docs/cli", label: "CLI", section: "cli" }, - { href: "/docs/mcp", label: "MCP", section: "mcp" }, - { href: "/docs/gui", label: "GUI", section: "gui" }, + {href: '/docs/cli', label: 'CLI', section: 'cli'}, + {href: '/docs/mcp', label: 'MCP', section: 'mcp'}, + {href: '/docs/gui', label: 'GUI', section: 'gui'}, { - href: "/docs/technical-details", - label: "技术细节", - section: "technical-details", + href: '/docs/technical-details', + label: '技术细节', + section: 'technical-details' }, { - href: "/docs/design-rationale", - label: "设计初衷", - section: "design-rationale", - }, -] as const; + href: '/docs/design-rationale', + label: '设计初衷', + section: 'design-rationale' + } +] as const -export type DocSectionName = (typeof DOC_SECTION_LINKS)[number]["section"]; +export type DocSectionName = (typeof DOC_SECTION_LINKS)[number]['section'] export const DOC_SECTION_NAMES = new Set( - DOC_SECTION_LINKS.map((link) => link.section), -); + DOC_SECTION_LINKS.map(link => link.section) +) export function isDocSectionName(value: string): value is DocSectionName { - return DOC_SECTION_NAMES.has(value as DocSectionName); + return DOC_SECTION_NAMES.has(value as DocSectionName) } diff --git a/gui/tsconfig.json b/gui/tsconfig.json index 84bf9a74..f2deebf6 100644 --- a/gui/tsconfig.json +++ b/gui/tsconfig.json @@ -9,7 +9,6 @@ "lib": ["ESNext", "DOM", "DOM.Iterable"], "moduleDetection": "force", "useDefineForClassFields": true, - "baseUrl": ".", "module": "ESNext", "moduleResolution": "Bundler", "paths": { diff --git a/libraries/logger/tsconfig.json b/libraries/logger/tsconfig.json index 0950f1da..f4a0bd0c 100644 --- a/libraries/logger/tsconfig.json +++ b/libraries/logger/tsconfig.json @@ -10,7 +10,6 @@ ], "moduleDetection": "force", "useDefineForClassFields": true, - "baseUrl": ".", "module": "ESNext", "moduleResolution": "Bundler", "paths": { @@ -19,6 +18,9 @@ ] }, "resolveJsonModule": true, + "types": [ + "node" + ], "allowImportingTsExtensions": true, "strict": true, "strictBindCallApply": true, diff --git a/libraries/logger/tsdown.config.ts b/libraries/logger/tsdown.config.ts index 5cfddf9a..953f9582 100644 --- a/libraries/logger/tsdown.config.ts +++ b/libraries/logger/tsdown.config.ts @@ -7,7 +7,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src') }, diff --git a/libraries/md-compiler/tsconfig.json b/libraries/md-compiler/tsconfig.json index c31ab7f9..abad44cd 100644 --- a/libraries/md-compiler/tsconfig.json +++ b/libraries/md-compiler/tsconfig.json @@ -10,7 +10,6 @@ ], "moduleDetection": "force", "useDefineForClassFields": true, - "baseUrl": ".", // Path Mapping "module": "ESNext", // Module Resolution "moduleResolution": "Bundler", "paths": { @@ -19,6 +18,9 @@ ] }, "resolveJsonModule": true, + "types": [ + "node" + ], "allowImportingTsExtensions": true, "strict": true, // Type Checking - Maximum Strictness "strictBindCallApply": true, diff --git a/libraries/md-compiler/tsdown.config.ts b/libraries/md-compiler/tsdown.config.ts index 8f3e99d0..f9712cc7 100644 --- a/libraries/md-compiler/tsdown.config.ts +++ b/libraries/md-compiler/tsdown.config.ts @@ -7,7 +7,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src') }, diff --git a/libraries/script-runtime/tsconfig.json b/libraries/script-runtime/tsconfig.json index 0950f1da..f4a0bd0c 100644 --- a/libraries/script-runtime/tsconfig.json +++ b/libraries/script-runtime/tsconfig.json @@ -10,7 +10,6 @@ ], "moduleDetection": "force", "useDefineForClassFields": true, - "baseUrl": ".", "module": "ESNext", "moduleResolution": "Bundler", "paths": { @@ -19,6 +18,9 @@ ] }, "resolveJsonModule": true, + "types": [ + "node" + ], "allowImportingTsExtensions": true, "strict": true, "strictBindCallApply": true, diff --git a/libraries/script-runtime/tsdown.config.ts b/libraries/script-runtime/tsdown.config.ts index c3fdbe05..f63bf7f7 100644 --- a/libraries/script-runtime/tsdown.config.ts +++ b/libraries/script-runtime/tsdown.config.ts @@ -7,9 +7,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, deps: { - neverBundle: ['jiti'] + neverBundle: ['jiti'], + onlyBundle: false }, alias: { '@': resolve('src') diff --git a/mcp/tsconfig.json b/mcp/tsconfig.json index 337fa92e..9bab1cc0 100644 --- a/mcp/tsconfig.json +++ b/mcp/tsconfig.json @@ -10,7 +10,6 @@ ], "moduleDetection": "force", "useDefineForClassFields": true, - "baseUrl": ".", "module": "ESNext", "moduleResolution": "Bundler", "paths": { @@ -19,6 +18,9 @@ ] }, "resolveJsonModule": true, + "types": [ + "node" + ], "allowImportingTsExtensions": true, "strict": true, "strictBindCallApply": true, diff --git a/mcp/tsdown.config.ts b/mcp/tsdown.config.ts index 1908c42b..17c55561 100644 --- a/mcp/tsdown.config.ts +++ b/mcp/tsdown.config.ts @@ -10,7 +10,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src') }, @@ -27,7 +29,9 @@ export default defineConfig([ platform: 'node', sourcemap: false, unbundle: false, - inlineOnly: false, + deps: { + onlyBundle: false + }, alias: { '@': resolve('src') }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e19f0479..a519df32 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,8 +55,8 @@ catalogs: specifier: ^0.3.0 version: 0.3.0 '@truenine/eslint10-config': - specifier: ^2026.10318.10138 - version: 2026.10318.10138 + specifier: ^2026.10326.11646 + version: 2026.10326.11646 '@types/estree': specifier: ^1.0.8 version: 1.0.8 @@ -256,7 +256,7 @@ importers: version: 16.2.1 '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) + version: 2026.10326.11646(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -428,7 +428,7 @@ importers: devDependencies: '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) + version: 2026.10326.11646(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -614,7 +614,7 @@ importers: version: 3.5.1(@emnapi/runtime@1.9.1)(@types/node@25.5.0) '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) + version: 2026.10326.11646(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -651,7 +651,7 @@ importers: devDependencies: '@truenine/eslint10-config': specifier: 'catalog:' - version: 2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44) + version: 2026.10326.11646(3feabab7f9171d694e6ba4b8897ebd44) '@types/node': specifier: 'catalog:' version: 25.5.0 @@ -2713,21 +2713,21 @@ packages: '@theguild/remark-npm2yarn@0.3.3': resolution: {integrity: sha512-ma6DvR03gdbvwqfKx1omqhg9May/VYGdMHvTzB4VuxkyS7KzfZ/lzrj43hmcsggpMje0x7SADA/pcMph0ejRnA==} - '@truenine/eslint10-config@2026.10318.10138': - resolution: {integrity: sha512-kyWjfbSCsPSpqQ0RRT2W+IuojO/eUhVnCzbaK0Z3i6x+rKXRcD3lvIftQfXnqDsvfrM8XvI+/J52kezssOktIg==} + '@truenine/eslint10-config@2026.10326.11646': + resolution: {integrity: sha512-/zq23lD3qX3ADReieCigtv8rv5v6amkTXqB/V9bsLK9gIChfh5B2fDxLmCmlkt1pZg3QPW/9cLeZT3gwjIIwYg==} peerDependencies: - '@antfu/eslint-config': ^7.7.2 + '@antfu/eslint-config': ^7.7.3 '@eslint/js': ^10.0.1 - '@next/eslint-plugin-next': ^16.1.6 - '@unocss/eslint-config': ^66.6.6 + '@next/eslint-plugin-next': ^16.2.1 + '@unocss/eslint-config': ^66.6.7 '@vue/eslint-config-prettier': ^10.2.0 '@vue/eslint-config-typescript': ^14.7.0 - eslint: ^10.0.3 + eslint: ^10.1.0 eslint-plugin-format: ^2.0.1 eslint-plugin-prettier: ^5.5.5 eslint-plugin-vue: ^10.8.0 prettier: ^3.8.1 - typescript-eslint: ^8.57.0 + typescript-eslint: ^8.57.2 '@ts-morph/common@0.28.1': resolution: {integrity: sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==} @@ -3875,8 +3875,8 @@ packages: peerDependencies: eslint: '>=9.0.0' - eslint-plugin-jsdoc@62.8.0: - resolution: {integrity: sha512-hu3r9/6JBmPG6wTcqtYzgZAnjEG2eqRUATfkFscokESg1VDxZM21ZaMire0KjeMwfj+SXvgB4Rvh5LBuesj92w==} + eslint-plugin-jsdoc@62.8.1: + resolution: {integrity: sha512-e9358PdHgvcMF98foNd3L7hVCw70Lt+YcSL7JzlJebB8eT5oRJtW6bHMQKoAwJtw6q0q0w/fRIr2kwnHdFDI6A==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 @@ -5806,11 +5806,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@6.0.2: resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} engines: {node: '>=14.17'} @@ -6141,7 +6136,7 @@ snapshots: eslint-plugin-antfu: 3.2.2(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-command: 3.5.2(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-import-lite: 0.5.2(eslint@10.1.0(jiti@2.6.1)) - eslint-plugin-jsdoc: 62.8.0(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-jsdoc: 62.8.1(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-jsonc: 3.1.2(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-n: 17.24.0(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) eslint-plugin-no-only-tests: 3.3.0 @@ -7790,7 +7785,7 @@ snapshots: npm-to-yarn: 3.0.1 unist-util-visit: 5.1.0 - '@truenine/eslint10-config@2026.10318.10138(3feabab7f9171d694e6ba4b8897ebd44)': + '@truenine/eslint10-config@2026.10326.11646(3feabab7f9171d694e6ba4b8897ebd44)': dependencies: '@antfu/eslint-config': 7.7.3(@next/eslint-plugin-next@16.2.1)(@typescript-eslint/rule-tester@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2))(@typescript-eslint/utils@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@unocss/eslint-plugin@66.6.7(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(@vue/compiler-sfc@3.5.26)(eslint-plugin-format@2.0.1(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)(vitest@4.1.1(@types/node@25.5.0)(vite@8.0.2(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))) '@eslint/js': 10.0.1(eslint@10.1.0(jiti@2.6.1)) @@ -7803,7 +7798,7 @@ snapshots: eslint-plugin-prettier: 5.5.5(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) eslint-plugin-vue: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) prettier: 3.8.1 - typescript: 5.9.3 + typescript: 6.0.2 typescript-eslint: 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2) '@ts-morph/common@0.28.1': @@ -9051,7 +9046,7 @@ snapshots: dependencies: eslint: 10.1.0(jiti@2.6.1) - eslint-plugin-jsdoc@62.8.0(eslint@10.1.0(jiti@2.6.1)): + eslint-plugin-jsdoc@62.8.1(eslint@10.1.0(jiti@2.6.1)): dependencies: '@es-joy/jsdoccomment': 0.84.0 '@es-joy/resolve.exports': 1.2.0 @@ -11607,8 +11602,6 @@ snapshots: transitivePeerDependencies: - supports-color - typescript@5.9.3: {} - typescript@6.0.2: {} ufo@1.6.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index af635089..94d4e01b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -27,7 +27,7 @@ catalog: '@tauri-apps/plugin-shell': ^2.3.5 '@tauri-apps/plugin-updater': ^2.10.0 '@theguild/remark-mermaid': ^0.3.0 - '@truenine/eslint10-config': ^2026.10318.10138 + '@truenine/eslint10-config': ^2026.10326.11646 '@types/estree': ^1.0.8 '@types/estree-jsx': ^1.0.5 '@types/fs-extra': ^11.0.4 From 61c934c85b69dce6abec32bd933bb55c21640de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= Date: Fri, 27 Mar 2026 07:15:45 +0800 Subject: [PATCH 4/4] Preserve .system during Codex skill cleanup --- cli/src/plugins/CodexCLIOutputPlugin.test.ts | 64 +++++++++++++++++++- cli/src/plugins/CodexCLIOutputPlugin.ts | 28 ++++++++- 2 files changed, 88 insertions(+), 4 deletions(-) diff --git a/cli/src/plugins/CodexCLIOutputPlugin.test.ts b/cli/src/plugins/CodexCLIOutputPlugin.test.ts index 09e4cd37..ff516f92 100644 --- a/cli/src/plugins/CodexCLIOutputPlugin.test.ts +++ b/cli/src/plugins/CodexCLIOutputPlugin.test.ts @@ -1,9 +1,10 @@ -import type {CommandPrompt, InputCapabilityContext, OutputWriteContext, SubAgentPrompt} from './plugin-core' +import type {CommandPrompt, InputCapabilityContext, OutputCleanContext, OutputWriteContext, SubAgentPrompt} from './plugin-core' import * as fs from 'node:fs' import * as os from 'node:os' import * as path from 'node:path' import glob from 'fast-glob' import {describe, expect, it} from 'vitest' +import {collectDeletionTargets} from '../commands/CleanupUtils' import {mergeConfig} from '../config' import {CommandInputCapability} from '../inputs/input-command' import {CodexCLIOutputPlugin} from './CodexCLIOutputPlugin' @@ -46,6 +47,38 @@ function createInputContext(tempWorkspace: string): InputCapabilityContext { } as InputCapabilityContext } +function createCleanContext(): OutputCleanContext { + return { + logger: { + trace: () => {}, + debug: () => {}, + info: () => {}, + warn: () => {}, + error: () => {}, + fatal: () => {} + }, + fs, + path, + glob, + dryRun: true, + runtimeTargets: { + jetbrainsCodexDirs: [] + }, + collectedOutputContext: { + workspace: { + directory: { + pathKind: FilePathKind.Relative, + path: '.', + basePath: '.', + getDirectoryName: () => '.', + getAbsolutePath: () => path.resolve('.') + }, + projects: [] + } + } + } as OutputCleanContext +} + function createWriteContext( tempWorkspace: string, commands: readonly CommandPrompt[], @@ -299,4 +332,33 @@ describe('codexCLIOutputPlugin command output', () => { expect(declarations.every(declaration => declaration.scope === 'project')).toBe(true) }) }) + + it('cleans global codex skills while preserving the built-in .system directory', async () => { + await withTempCodexDirs('tnmsc-codex-cleanup-skills', async ({homeDir}) => { + const plugin = new TestCodexCLIOutputPlugin(homeDir) + const skillsDir = path.join(homeDir, '.codex', 'skills') + const preservedDir = path.join(skillsDir, '.system') + const staleDir = path.join(skillsDir, 'legacy-skill') + + fs.mkdirSync(preservedDir, {recursive: true}) + fs.mkdirSync(staleDir, {recursive: true}) + fs.writeFileSync(path.join(preservedDir, 'SKILL.md'), '# preserved', 'utf8') + fs.writeFileSync(path.join(staleDir, 'SKILL.md'), '# stale', 'utf8') + + const cleanupDeclarations = await plugin.declareCleanupPaths(createCleanContext()) + const protectPaths = cleanupDeclarations.protect?.map(target => target.path.replaceAll('\\', '/')) ?? [] + const skillCleanupTarget = cleanupDeclarations.delete?.find(target => target.kind === 'glob' && target.path.includes(`${path.sep}.codex${path.sep}skills${path.sep}`)) + const cleanupPlan = await collectDeletionTargets([plugin], createCleanContext()) + const normalizedDeleteDirs = cleanupPlan.dirsToDelete.map(target => target.replaceAll('\\', '/')) + const normalizedPreservedDir = preservedDir.replaceAll('\\', '/') + const normalizedStaleDir = staleDir.replaceAll('\\', '/') + + expect(skillCleanupTarget).toBeDefined() + expect(skillCleanupTarget?.excludeBasenames).toEqual(['.system']) + expect(protectPaths).toContain(normalizedPreservedDir) + expect(normalizedDeleteDirs).toContain(normalizedStaleDir) + expect(normalizedDeleteDirs).not.toContain(normalizedPreservedDir) + expect(cleanupPlan.violations).toEqual([]) + }) + }) }) diff --git a/cli/src/plugins/CodexCLIOutputPlugin.ts b/cli/src/plugins/CodexCLIOutputPlugin.ts index ca4236cd..61daf36c 100644 --- a/cli/src/plugins/CodexCLIOutputPlugin.ts +++ b/cli/src/plugins/CodexCLIOutputPlugin.ts @@ -1,10 +1,12 @@ -import type {AbstractOutputPluginOptions} from './plugin-core' +import type {AbstractOutputPluginOptions, OutputCleanContext, OutputCleanupDeclarations} from './plugin-core' import {AbstractOutputPlugin, PLUGIN_NAMES, resolveSubAgentCanonicalName} from './plugin-core' const PROJECT_MEMORY_FILE = 'AGENTS.md' const GLOBAL_CONFIG_DIR = '.codex' const PROMPTS_SUBDIR = 'prompts' const AGENTS_SUBDIR = 'agents' +const SKILLS_SUBDIR = 'skills' +const PRESERVED_SYSTEM_SKILL_DIR = '.system' const CODEX_SUBAGENT_FIELD_ORDER = ['name', 'description', 'developer_instructions'] as const const CODEX_EXCLUDED_SUBAGENT_FIELDS = ['scope', 'seriName', 'argumentHint', 'color', 'namingCase', 'model'] as const @@ -59,12 +61,13 @@ const CODEX_OUTPUT_OPTIONS = { }, global: { files: ['.codex/AGENTS.md'], - dirs: ['.codex/prompts'] + dirs: ['.codex/prompts'], + globs: ['.codex/skills/*'] } }, protect: { global: { - dirs: ['.codex/skills/.system'] + dirs: [`.codex/${SKILLS_SUBDIR}/${PRESERVED_SYSTEM_SKILL_DIR}`] } } }, @@ -93,4 +96,23 @@ export class CodexCLIOutputPlugin extends AbstractOutputPlugin { constructor() { super('CodexCLIOutputPlugin', CODEX_OUTPUT_OPTIONS) } + + override async declareCleanupPaths(ctx: OutputCleanContext): Promise { + const declarations = await super.declareCleanupPaths(ctx) + + return { + ...declarations, + delete: (declarations.delete ?? []).map(target => { + if (target.kind !== 'glob') return target + + const normalizedPath = target.path.replaceAll('\\', '/') + if (!normalizedPath.endsWith(`/.codex/${SKILLS_SUBDIR}/*`)) return target + + return { + ...target, + excludeBasenames: [PRESERVED_SYSTEM_SKILL_DIR] + } + }) + } + } }