k0ntext 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +623 -0
- package/bin/k0ntext.js +12 -0
- package/dist/agents/cleanup-agent.d.ts +39 -0
- package/dist/agents/cleanup-agent.d.ts.map +1 -0
- package/dist/agents/cleanup-agent.js +56 -0
- package/dist/agents/cleanup-agent.js.map +1 -0
- package/dist/agents/performance-agent.d.ts +37 -0
- package/dist/agents/performance-agent.d.ts.map +1 -0
- package/dist/agents/performance-agent.js +91 -0
- package/dist/agents/performance-agent.js.map +1 -0
- package/dist/analyzer/index.d.ts +5 -0
- package/dist/analyzer/index.d.ts.map +1 -0
- package/dist/analyzer/index.js +5 -0
- package/dist/analyzer/index.js.map +1 -0
- package/dist/analyzer/intelligent-analyzer.d.ts +111 -0
- package/dist/analyzer/intelligent-analyzer.d.ts.map +1 -0
- package/dist/analyzer/intelligent-analyzer.js +537 -0
- package/dist/analyzer/intelligent-analyzer.js.map +1 -0
- package/dist/cli/commands/cleanup.d.ts +3 -0
- package/dist/cli/commands/cleanup.d.ts.map +1 -0
- package/dist/cli/commands/cleanup.js +24 -0
- package/dist/cli/commands/cleanup.js.map +1 -0
- package/dist/cli/commands/export.d.ts +9 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +72 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/import.d.ts +9 -0
- package/dist/cli/commands/import.d.ts.map +1 -0
- package/dist/cli/commands/import.js +62 -0
- package/dist/cli/commands/import.js.map +1 -0
- package/dist/cli/commands/performance.d.ts +9 -0
- package/dist/cli/commands/performance.d.ts.map +1 -0
- package/dist/cli/commands/performance.js +36 -0
- package/dist/cli/commands/performance.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +9 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +82 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +9 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +72 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/generate.d.ts +3 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +194 -0
- package/dist/cli/generate.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +448 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/sync.d.ts +26 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +163 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/config/cleanup-config.d.ts +26 -0
- package/dist/config/cleanup-config.d.ts.map +1 -0
- package/dist/config/cleanup-config.js +21 -0
- package/dist/config/cleanup-config.js.map +1 -0
- package/dist/db/client.d.ts +284 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +688 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/index.d.ts +6 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +6 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +41 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +226 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/embeddings/index.d.ts +5 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +5 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/embeddings/openrouter.d.ts +133 -0
- package/dist/embeddings/openrouter.d.ts.map +1 -0
- package/dist/embeddings/openrouter.js +455 -0
- package/dist/embeddings/openrouter.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +29 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +257 -0
- package/dist/mcp.js.map +1 -0
- package/docs/ARCHIVE/MIGRATE_TO_NEW_REPO.md +222 -0
- package/docs/ARCHIVE/MIGRATE_TO_UNIFIED.md +220 -0
- package/docs/CLEANUP.md +76 -0
- package/docs/MCP_QUICKSTART.md +219 -0
- package/docs/QUICKSTART.md +119 -0
- package/docs/TROUBLESHOOTING.md +611 -0
- package/package.json +100 -0
- package/skills/context-optimize/SKILL.md +86 -0
- package/skills/implement/SKILL.md +150 -0
- package/skills/plan/SKILL.md +143 -0
- package/skills/research/SKILL.md +103 -0
- package/skills/validate/SKILL.md +62 -0
- package/skills/verify-docs/SKILL.md +77 -0
- package/src/agents/cleanup-agent.ts +96 -0
- package/src/agents/performance-agent.ts +117 -0
- package/src/analyzer/index.ts +10 -0
- package/src/analyzer/intelligent-analyzer.ts +640 -0
- package/src/cli/commands/cleanup.ts +26 -0
- package/src/cli/commands/export.ts +82 -0
- package/src/cli/commands/import.ts +73 -0
- package/src/cli/commands/performance.ts +40 -0
- package/src/cli/commands/validate.ts +98 -0
- package/src/cli/commands/watch.ts +83 -0
- package/src/cli/generate.ts +219 -0
- package/src/cli/index.ts +510 -0
- package/src/cli/sync.ts +194 -0
- package/src/config/cleanup-config.ts +42 -0
- package/src/db/client.ts +949 -0
- package/src/db/index.ts +19 -0
- package/src/db/schema.ts +241 -0
- package/src/embeddings/index.ts +11 -0
- package/src/embeddings/openrouter.ts +592 -0
- package/src/index.ts +57 -0
- package/src/mcp.ts +354 -0
- package/templates/AI_CONTEXT.md.template +245 -0
- package/templates/base/README.md +260 -0
- package/templates/base/RPI_WORKFLOW_PLAN.md +325 -0
- package/templates/base/agents/api-developer.md +76 -0
- package/templates/base/agents/context-engineer.md +525 -0
- package/templates/base/agents/core-architect.md +76 -0
- package/templates/base/agents/database-ops.md +76 -0
- package/templates/base/agents/deployment-ops.md +76 -0
- package/templates/base/agents/integration-hub.md +76 -0
- package/templates/base/analytics/README.md +114 -0
- package/templates/base/automation/config.json +58 -0
- package/templates/base/automation/generators/code-mapper.js +308 -0
- package/templates/base/automation/generators/index-builder.js +321 -0
- package/templates/base/automation/hooks/post-commit.sh +83 -0
- package/templates/base/automation/hooks/pre-commit.sh +103 -0
- package/templates/base/ci-templates/README.md +108 -0
- package/templates/base/ci-templates/github-actions/context-check.yml +144 -0
- package/templates/base/ci-templates/github-actions/validate-docs.yml +105 -0
- package/templates/base/commands/analytics.md +238 -0
- package/templates/base/commands/auto-sync.md +172 -0
- package/templates/base/commands/collab.md +194 -0
- package/templates/base/commands/context-optimize.md +226 -0
- package/templates/base/commands/help.md +485 -0
- package/templates/base/commands/rpi-implement.md +164 -0
- package/templates/base/commands/rpi-plan.md +147 -0
- package/templates/base/commands/rpi-research.md +145 -0
- package/templates/base/commands/session-resume.md +144 -0
- package/templates/base/commands/session-save.md +112 -0
- package/templates/base/commands/validate-all.md +77 -0
- package/templates/base/commands/verify-docs-current.md +86 -0
- package/templates/base/config/base.json +57 -0
- package/templates/base/config/environments/development.json +13 -0
- package/templates/base/config/environments/production.json +17 -0
- package/templates/base/config/environments/staging.json +13 -0
- package/templates/base/config/local.json.example +21 -0
- package/templates/base/context/.meta/generated-at.json +18 -0
- package/templates/base/context/ARCHITECTURE_SNAPSHOT.md +156 -0
- package/templates/base/context/CODE_TO_WORKFLOW_MAP.md +94 -0
- package/templates/base/context/FILE_OWNERSHIP.md +57 -0
- package/templates/base/context/INTEGRATION_POINTS.md +92 -0
- package/templates/base/context/KNOWN_GOTCHAS.md +195 -0
- package/templates/base/context/TESTING_MAP.md +95 -0
- package/templates/base/context/WORKFLOW_INDEX.md +129 -0
- package/templates/base/context/workflows/WORKFLOW_TEMPLATE.md +294 -0
- package/templates/base/indexes/agents/CAPABILITY_MATRIX.md +255 -0
- package/templates/base/indexes/agents/CATEGORY_INDEX.md +44 -0
- package/templates/base/indexes/code/CATEGORY_INDEX.md +38 -0
- package/templates/base/indexes/routing/CATEGORY_INDEX.md +39 -0
- package/templates/base/indexes/search/CATEGORY_INDEX.md +39 -0
- package/templates/base/indexes/workflows/CATEGORY_INDEX.md +38 -0
- package/templates/base/knowledge/README.md +98 -0
- package/templates/base/knowledge/sessions/README.md +88 -0
- package/templates/base/knowledge/sessions/TEMPLATE.md +150 -0
- package/templates/base/knowledge/shared/decisions/0001-adopt-context-engineering.md +144 -0
- package/templates/base/knowledge/shared/decisions/README.md +49 -0
- package/templates/base/knowledge/shared/decisions/TEMPLATE.md +123 -0
- package/templates/base/knowledge/shared/patterns/README.md +62 -0
- package/templates/base/knowledge/shared/patterns/TEMPLATE.md +120 -0
- package/templates/base/plans/PLAN_TEMPLATE.md +316 -0
- package/templates/base/plans/active/.gitkeep +0 -0
- package/templates/base/plans/completed/.gitkeep +0 -0
- package/templates/base/research/RESEARCH_TEMPLATE.md +245 -0
- package/templates/base/research/active/.gitkeep +0 -0
- package/templates/base/research/completed/.gitkeep +0 -0
- package/templates/base/schemas/agent.schema.json +141 -0
- package/templates/base/schemas/anchors.schema.json +54 -0
- package/templates/base/schemas/automation.schema.json +93 -0
- package/templates/base/schemas/command.schema.json +134 -0
- package/templates/base/schemas/hashes.schema.json +40 -0
- package/templates/base/schemas/manifest.schema.json +117 -0
- package/templates/base/schemas/plan.schema.json +136 -0
- package/templates/base/schemas/research.schema.json +115 -0
- package/templates/base/schemas/roles.schema.json +34 -0
- package/templates/base/schemas/session.schema.json +77 -0
- package/templates/base/schemas/settings.schema.json +244 -0
- package/templates/base/schemas/staleness.schema.json +53 -0
- package/templates/base/schemas/team-config.schema.json +42 -0
- package/templates/base/schemas/workflow.schema.json +126 -0
- package/templates/base/session/checkpoints/.gitkeep +2 -0
- package/templates/base/session/current/state.json +20 -0
- package/templates/base/session/history/.gitkeep +2 -0
- package/templates/base/settings.json +3 -0
- package/templates/base/standards/COMPATIBILITY.md +219 -0
- package/templates/base/standards/EXTENSION_GUIDELINES.md +280 -0
- package/templates/base/standards/QUALITY_CHECKLIST.md +211 -0
- package/templates/base/standards/README.md +66 -0
- package/templates/base/sync/anchors.json +6 -0
- package/templates/base/sync/hashes.json +6 -0
- package/templates/base/sync/staleness.json +10 -0
- package/templates/base/team/README.md +168 -0
- package/templates/base/team/config.json +79 -0
- package/templates/base/team/roles.json +145 -0
- package/templates/base/tools/bin/claude-context.js +151 -0
- package/templates/base/tools/lib/anchor-resolver.js +276 -0
- package/templates/base/tools/lib/config-loader.js +363 -0
- package/templates/base/tools/lib/detector.js +350 -0
- package/templates/base/tools/lib/diagnose.js +206 -0
- package/templates/base/tools/lib/drift-detector.js +373 -0
- package/templates/base/tools/lib/errors.js +199 -0
- package/templates/base/tools/lib/index.js +36 -0
- package/templates/base/tools/lib/init.js +192 -0
- package/templates/base/tools/lib/logger.js +230 -0
- package/templates/base/tools/lib/placeholder.js +201 -0
- package/templates/base/tools/lib/session-manager.js +354 -0
- package/templates/base/tools/lib/validate.js +521 -0
- package/templates/base/tools/package.json +49 -0
- package/templates/handlebars/aider-config.hbs +146 -0
- package/templates/handlebars/antigravity.hbs +377 -0
- package/templates/handlebars/claude.hbs +183 -0
- package/templates/handlebars/cline.hbs +62 -0
- package/templates/handlebars/continue-config.hbs +116 -0
- package/templates/handlebars/copilot.hbs +130 -0
- package/templates/handlebars/partials/gotcha-list.hbs +11 -0
- package/templates/handlebars/partials/header.hbs +3 -0
- package/templates/handlebars/partials/workflow-summary.hbs +16 -0
- package/templates/handlebars/windsurf-rules.hbs +69 -0
- package/templates/hooks/post-commit.hbs +28 -0
- package/templates/hooks/pre-commit.hbs +46 -0
package/src/cli/sync.ts
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { DatabaseClient } from '../db/client.js';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import crypto from 'crypto';
|
|
6
|
+
import fs from 'fs/promises';
|
|
7
|
+
|
|
8
|
+
export interface SyncStatus {
|
|
9
|
+
synced: boolean;
|
|
10
|
+
differences: string[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SyncResult {
|
|
14
|
+
count: number;
|
|
15
|
+
files: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const syncCommand = new Command('sync')
|
|
19
|
+
.description('Synchronize context across all AI tools')
|
|
20
|
+
.option('--check', 'Only check synchronization status')
|
|
21
|
+
.option('--from <tool>', 'Sync from specific tool')
|
|
22
|
+
.option('--to <tool>', 'Sync to specific tool')
|
|
23
|
+
.option('--force', 'Force sync even if up-to-date')
|
|
24
|
+
.action(async (options) => {
|
|
25
|
+
const spinner = ora('Checking sync status...').start();
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const db = new DatabaseClient(process.cwd());
|
|
29
|
+
const syncManager = new SyncManager(db);
|
|
30
|
+
|
|
31
|
+
if (options.check) {
|
|
32
|
+
const status = await syncManager.checkStatus();
|
|
33
|
+
if (status.synced) {
|
|
34
|
+
spinner.succeed(chalk.green('All tools are synchronized'));
|
|
35
|
+
} else {
|
|
36
|
+
spinner.warn(chalk.yellow('Tools are out of sync'));
|
|
37
|
+
console.log(chalk.dim('Differences:'), status.differences.join(', '));
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (options.from) {
|
|
43
|
+
spinner.text = `Syncing from ${options.from}...`;
|
|
44
|
+
await syncManager.syncFrom(options.from);
|
|
45
|
+
spinner.succeed(chalk.green(`Synced from ${options.from}`));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Default: sync all tools
|
|
50
|
+
spinner.text = 'Syncing all tools...';
|
|
51
|
+
const result = await syncManager.syncAll({ force: options.force });
|
|
52
|
+
spinner.succeed(chalk.green(`Synced ${result.count} tools`));
|
|
53
|
+
|
|
54
|
+
if (result.files.length > 0) {
|
|
55
|
+
console.log(chalk.dim('Synced:'), result.files.join(', '));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
} catch (error) {
|
|
59
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
60
|
+
spinner.fail(chalk.red('Sync failed'));
|
|
61
|
+
console.error(chalk.dim(errorMessage));
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export class SyncManager {
|
|
67
|
+
constructor(private db: DatabaseClient) {}
|
|
68
|
+
|
|
69
|
+
async checkStatus(): Promise<SyncStatus> {
|
|
70
|
+
const tools = await this.getToolFiles();
|
|
71
|
+
const hashes = await this.getFileHashes(tools);
|
|
72
|
+
const differences: string[] = [];
|
|
73
|
+
|
|
74
|
+
for (const [tool, hash] of Object.entries(hashes)) {
|
|
75
|
+
const stored = this.db.getSyncState(tool);
|
|
76
|
+
const storedHash = Array.isArray(stored) && stored.length > 0 ? stored[0]?.contentHash : undefined;
|
|
77
|
+
if (storedHash !== undefined && storedHash !== hash) {
|
|
78
|
+
differences.push(tool);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
synced: differences.length === 0,
|
|
84
|
+
differences
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async syncFrom(tool: string): Promise<void> {
|
|
89
|
+
const configs = this.db.getToolConfigs(tool as any);
|
|
90
|
+
if (!configs || configs.length === 0) {
|
|
91
|
+
throw new Error(`Tool ${tool} not found in database`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Sync logic - propagate changes from this tool to others
|
|
95
|
+
const content = await this.readToolFile(tool);
|
|
96
|
+
await this.propagateToTools(tool, content);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async syncAll(options: { force?: boolean }): Promise<SyncResult> {
|
|
100
|
+
const tools = ['claude', 'copilot', 'cline', 'antigravity', 'windsurf', 'aider', 'continue', 'cursor', 'gemini'];
|
|
101
|
+
const synced = [];
|
|
102
|
+
|
|
103
|
+
for (const tool of tools) {
|
|
104
|
+
try {
|
|
105
|
+
await this.syncTool(tool, options);
|
|
106
|
+
synced.push(tool);
|
|
107
|
+
} catch (error) {
|
|
108
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
109
|
+
// Continue with other tools even if one fails
|
|
110
|
+
console.error(chalk.dim(`Failed to sync ${tool}: ${errorMessage}`));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return { count: synced.length, files: synced };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private async getToolFiles(): Promise<string[]> {
|
|
118
|
+
return ['claude', 'copilot', 'cline', 'antigravity', 'windsurf', 'aider', 'continue', 'cursor', 'gemini'];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
private async getFileHashes(tools: string[]): Promise<Record<string, string>> {
|
|
122
|
+
const hashes: Record<string, string> = {};
|
|
123
|
+
const toolPaths: Record<string, string> = {
|
|
124
|
+
claude: 'AI_CONTEXT.md',
|
|
125
|
+
copilot: '.github/copilot-instructions.md',
|
|
126
|
+
cline: '.clinerules',
|
|
127
|
+
antigravity: '.agent/README.md',
|
|
128
|
+
windsurf: '.windsurf/rules.md',
|
|
129
|
+
aider: '.aider.conf.yml',
|
|
130
|
+
continue: '.continue/config.json',
|
|
131
|
+
cursor: '.cursorrules',
|
|
132
|
+
gemini: '.gemini/config.md'
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
for (const tool of tools) {
|
|
136
|
+
try {
|
|
137
|
+
const content = await fs.readFile(toolPaths[tool], 'utf-8');
|
|
138
|
+
hashes[tool] = crypto.createHash('sha256').update(content).digest('hex');
|
|
139
|
+
} catch (error) {
|
|
140
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
141
|
+
console.error(
|
|
142
|
+
chalk.yellow(
|
|
143
|
+
`Warning: Failed to read tool file for "${tool}" at "${toolPaths[tool]}": ${message}`
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
hashes[tool] = '';
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return hashes;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private async readToolFile(tool: string): Promise<string> {
|
|
154
|
+
const toolPaths: Record<string, string> = {
|
|
155
|
+
claude: 'AI_CONTEXT.md',
|
|
156
|
+
copilot: '.github/copilot-instructions.md',
|
|
157
|
+
cline: '.clinerules',
|
|
158
|
+
antigravity: '.agent/README.md',
|
|
159
|
+
windsurf: '.windsurf/rules.md',
|
|
160
|
+
aider: '.aider.conf.yml',
|
|
161
|
+
continue: '.continue/config.json',
|
|
162
|
+
cursor: '.cursorrules',
|
|
163
|
+
gemini: '.gemini/config.md'
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
return await fs.readFile(toolPaths[tool], 'utf-8');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private async propagateToTools(_fromTool: string, _content: string): Promise<void> {
|
|
170
|
+
// In a full implementation, this would parse the content
|
|
171
|
+
// and propagate it to all other tools
|
|
172
|
+
// For now, this is a placeholder
|
|
173
|
+
console.log(chalk.dim(`Propagating from ${_fromTool} to other tools...`));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
private async syncTool(tool: string, options: { force?: boolean }): Promise<void> {
|
|
177
|
+
// Check if sync is needed
|
|
178
|
+
if (!options.force) {
|
|
179
|
+
const content = this.db.getAllItems();
|
|
180
|
+
if (content.length === 0) {
|
|
181
|
+
throw new Error(`No content in database for ${tool}`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Update sync state
|
|
186
|
+
this.db.updateSyncState({
|
|
187
|
+
id: `sync:${tool}`,
|
|
188
|
+
tool: tool,
|
|
189
|
+
contentHash: Date.now().toString(),
|
|
190
|
+
lastSync: new Date().toISOString(),
|
|
191
|
+
status: 'synced'
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cleanup configuration options
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface CleanupConfig {
|
|
6
|
+
/** Default dry run mode (safe mode) */
|
|
7
|
+
dryRun: boolean;
|
|
8
|
+
|
|
9
|
+
/** Default folders to keep */
|
|
10
|
+
defaultKeep: string[];
|
|
11
|
+
|
|
12
|
+
/** Verbose output by default */
|
|
13
|
+
verbose: boolean;
|
|
14
|
+
|
|
15
|
+
/** Maximum folder depth to scan */
|
|
16
|
+
maxDepth: number;
|
|
17
|
+
|
|
18
|
+
/** Timeout for folder operations in milliseconds */
|
|
19
|
+
timeout: number;
|
|
20
|
+
|
|
21
|
+
/** Default working directory */
|
|
22
|
+
cwd: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Default cleanup configuration
|
|
27
|
+
*/
|
|
28
|
+
export const DEFAULT_CLEANUP_CONFIG: CleanupConfig = {
|
|
29
|
+
dryRun: true,
|
|
30
|
+
defaultKeep: ['.github', '.vscode', '.idea', '.devcontainer'],
|
|
31
|
+
verbose: false,
|
|
32
|
+
maxDepth: 3,
|
|
33
|
+
timeout: 30000,
|
|
34
|
+
cwd: process.cwd()
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get cleanup configuration (can be extended to load from file)
|
|
39
|
+
*/
|
|
40
|
+
export function getCleanupConfig(): CleanupConfig {
|
|
41
|
+
return { ...DEFAULT_CLEANUP_CONFIG };
|
|
42
|
+
}
|