Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@truenine/memory-sync-cli",
"type": "module",
"version": "2026.10214.1083059",
"version": "2026.10217.12221",
"description": "TrueNine Memory Synchronization CLI",
"author": "TrueNine",
"license": "AGPL-3.0-only",
Expand Down
6 changes: 6 additions & 0 deletions cli/src/PluginPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ export class PluginPipeline {
? [...base.skills ?? [], ...addition.skills]
: base.skills

const rules: CollectedInputContext['rules'] | undefined
= addition.rules != null
? [...base.rules ?? [], ...addition.rules]
: base.rules

const aiAgentIgnoreConfigFiles: CollectedInputContext['aiAgentIgnoreConfigFiles'] | undefined
= addition.aiAgentIgnoreConfigFiles != null
? [...base.aiAgentIgnoreConfigFiles ?? [], ...addition.aiAgentIgnoreConfigFiles]
Expand Down Expand Up @@ -675,6 +680,7 @@ export class PluginPipeline {
...fastCommands != null ? {fastCommands} : {},
...subAgents != null ? {subAgents} : {},
...skills != null ? {skills} : {},
...rules != null ? {rules} : {},
...aiAgentIgnoreConfigFiles != null ? {aiAgentIgnoreConfigFiles} : {},
...globalMemory != null ? {globalMemory} : {},
...shadowSourceProjectDir != null ? {shadowSourceProjectDir} : {},
Expand Down
2 changes: 2 additions & 0 deletions cli/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function userConfigToPluginOptions(userConfig: UserConfigFile): Partial<PluginOp
...userConfig.shadowSkillSourceDir != null ? {shadowSkillSourceDir: userConfig.shadowSkillSourceDir} : {},
...userConfig.shadowFastCommandDir != null ? {shadowFastCommandDir: userConfig.shadowFastCommandDir} : {},
...userConfig.shadowSubAgentDir != null ? {shadowSubAgentDir: userConfig.shadowSubAgentDir} : {},
...userConfig.shadowRulesDir != null ? {shadowRulesDir: userConfig.shadowRulesDir} : {},
...userConfig.globalMemoryFile != null ? {globalMemoryFile: userConfig.globalMemoryFile} : {},
...userConfig.shadowProjectsDir != null ? {shadowProjectsDir: userConfig.shadowProjectsDir} : {},
...userConfig.externalProjects != null ? {externalProjects: userConfig.externalProjects} : {},
Expand Down Expand Up @@ -232,6 +233,7 @@ export async function defineConfig(options: PluginOptions | DefineConfigOptions
...merged.fastCommands != null && {fastCommands: merged.fastCommands},
...merged.subAgents != null && {subAgents: merged.subAgents},
...merged.skills != null && {skills: merged.skills},
...merged.rules != null && {rules: merged.rules},
...merged.globalMemory != null && {globalMemory: merged.globalMemory},
...merged.aiAgentIgnoreConfigFiles != null && {aiAgentIgnoreConfigFiles: merged.aiAgentIgnoreConfigFiles},
...merged.shadowSourceProjectDir != null && {shadowSourceProjectDir: merged.shadowSourceProjectDir},
Expand Down
6 changes: 4 additions & 2 deletions cli/src/plugin.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {defineConfig} from '@/config'
import {AgentsOutputPlugin} from '@/plugins/AgentsOutputPlugin'
import {AIAgentIgnoreConfigFileInputPlugin} from '@/plugins/AIAgentIgnoreConfigFileInputPlugin'
import {AIAgentIgnoreConfigFileOutputPlugin} from '@/plugins/AIAgentIgnoreConfigFileOutputPlugin'
import {AntigravityOutputPlugin} from '@/plugins/AntigravityOutputPlugin'
import {ClaudeCodeCLIOutputPlugin} from '@/plugins/ClaudeCodeCLIOutputPlugin'
import {CodexCLIOutputPlugin} from '@/plugins/CodexCLIOutputPlugin'
Expand All @@ -25,10 +24,12 @@ import {ProjectPromptInputPlugin} from '@/plugins/ProjectPromptInputPlugin'
import {QoderIDEPluginOutputPlugin} from '@/plugins/QoderIDEPluginOutputPlugin'
import {ReadmeMdConfigFileOutputPlugin} from '@/plugins/ReadmeMdConfigFileOutputPlugin'
import {ReadmeMdInputPlugin} from '@/plugins/ReadmeMdInputPlugin'
import {RuleInputPlugin} from '@/plugins/RuleInputPlugin'
import {ShadowProjectInputPlugin} from '@/plugins/ShadowProjectInputPlugin'
import {SkillInputPlugin} from '@/plugins/SkillInputPlugin'
import {SkillNonSrcFileSyncEffectInputPlugin} from '@/plugins/SkillNonSrcFileSyncEffectInputPlugin'
import {SubAgentInputPlugin} from '@/plugins/SubAgentInputPlugin'
import {TraeIDEOutputPlugin} from '@/plugins/TraeIDEOutputPlugin'
import {VisualStudioCodeIDEConfigOutputPlugin} from '@/plugins/VisualStudioCodeIDEConfigOutputPlugin'
import {WarpIDEOutputPlugin} from '@/plugins/WarpIDEOutputPlugin'
import {WindsurfOutputPlugin} from '@/plugins/WindsurfOutputPlugin'
Expand All @@ -37,7 +38,6 @@ import {WorkspaceInputPlugin} from '@/plugins/WorkspaceInputPlugin'
export default defineConfig({
plugins: [
new AgentsOutputPlugin(),
new AIAgentIgnoreConfigFileOutputPlugin(),
new AntigravityOutputPlugin(),
new ClaudeCodeCLIOutputPlugin(),
new CodexCLIOutputPlugin(),
Expand All @@ -48,6 +48,7 @@ export default defineConfig({
new KiroCLIOutputPlugin(),
new OpencodeCLIOutputPlugin(),
new QoderIDEPluginOutputPlugin(),
new TraeIDEOutputPlugin(),
new WarpIDEOutputPlugin(),
new WindsurfOutputPlugin(),
new CursorOutputPlugin(),
Expand All @@ -68,6 +69,7 @@ export default defineConfig({
new SkillInputPlugin(),
new FastCommandInputPlugin(),
new SubAgentInputPlugin(),
new RuleInputPlugin(),
new GlobalMemoryInputPlugin(),
new ProjectPromptInputPlugin(),
new ReadmeMdInputPlugin(),
Expand Down
21 changes: 14 additions & 7 deletions cli/src/plugins/AIAgentIgnoreConfigFileInputPlugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('aIAgentIgnoreConfigFileInputPlugin', () => {

vi.mocked(fs.existsSync).mockImplementation((filePath: any) => {
const fileName = path.basename(String(filePath))
return ['.qoderignore', '.cursorignore', '.warpindexignore', '.aiignore', '.codeignore'].includes(fileName)
return ['.qoderignore', '.cursorignore', '.warpindexignore', '.aiignore', '.codeignore', '.traeignore'].includes(fileName)
})

vi.mocked(fs.statSync).mockReturnValue({
Expand All @@ -71,13 +71,14 @@ describe('aIAgentIgnoreConfigFileInputPlugin', () => {
if (fileName === '.warpindexignore') return 'warp ignore content'
if (fileName === '.aiignore') return 'ai ignore content'
if (fileName === '.codeignore') return 'windsurf code ignore content'
if (fileName === '.traeignore') return 'trae ignore content'
return ''
})

const result = plugin.collect(ctx)

expect(result.aiAgentIgnoreConfigFiles).toBeDefined()
expect(result.aiAgentIgnoreConfigFiles).toHaveLength(5)
expect(result.aiAgentIgnoreConfigFiles).toHaveLength(6)
expect(result.aiAgentIgnoreConfigFiles).toContainEqual({
fileName: '.qoderignore',
content: 'qoder ignore content'
Expand All @@ -98,6 +99,10 @@ describe('aIAgentIgnoreConfigFileInputPlugin', () => {
fileName: '.codeignore',
content: 'windsurf code ignore content'
})
expect(result.aiAgentIgnoreConfigFiles).toContainEqual({
fileName: '.traeignore',
content: 'trae ignore content'
})
})

it('should read only existing ignore files', () => {
Expand Down Expand Up @@ -151,13 +156,14 @@ describe('aIAgentIgnoreConfigFileInputPlugin', () => {

const result = plugin.collect(ctx)

expect(result.aiAgentIgnoreConfigFiles).toHaveLength(5)
expect(result.aiAgentIgnoreConfigFiles).toHaveLength(6)
expect(result.aiAgentIgnoreConfigFiles?.map(f => f.fileName)).toEqual([
'.cursorignore',
'.kiroignore',
'.warpindexignore',
'.aiignore',
'.codeignore'
'.codeignore',
'.traeignore'
])
})

Expand All @@ -179,13 +185,14 @@ describe('aIAgentIgnoreConfigFileInputPlugin', () => {

const result = plugin.collect(ctx)

expect(result.aiAgentIgnoreConfigFiles).toHaveLength(5)
expect(result.aiAgentIgnoreConfigFiles).toHaveLength(6)
expect(result.aiAgentIgnoreConfigFiles?.map(f => f.fileName)).toEqual([
'.qoderignore',
'.kiroignore',
'.warpindexignore',
'.aiignore',
'.codeignore'
'.codeignore',
'.traeignore'
])
expect(ctx.logger.warn).toHaveBeenCalled()
})
Expand All @@ -204,7 +211,7 @@ describe('aIAgentIgnoreConfigFileInputPlugin', () => {

plugin.collect(ctx)

expect(ctx.logger.debug).toHaveBeenCalledTimes(6)
expect(ctx.logger.debug).toHaveBeenCalledTimes(7)
})

it('should support custom shadowSourceProjectDir', () => {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/plugins/AIAgentIgnoreConfigFileInputPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {AbstractInputPlugin} from './AbstractInputPlugin'
/**
* Ignore file names to read from shadow project dist directory
*/
const IGNORE_FILE_NAMES = ['.qoderignore', '.cursorignore', '.kiroignore', '.warpindexignore', '.aiignore', '.codeignore'] as const
const IGNORE_FILE_NAMES = ['.qoderignore', '.cursorignore', '.kiroignore', '.warpindexignore', '.aiignore', '.codeignore', '.traeignore'] as const

export class AIAgentIgnoreConfigFileInputPlugin extends AbstractInputPlugin {
constructor() {
Expand Down
Loading