devmind 1.0.2 → 1.1.1
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/README.md +138 -162
- package/dist/cli/handlers.d.ts +2 -0
- package/dist/cli/handlers.js +140 -0
- package/dist/cli/handlers.js.map +1 -0
- package/dist/cli/register-all.d.ts +2 -0
- package/dist/cli/register-all.js +11 -0
- package/dist/cli/register-all.js.map +1 -0
- package/dist/cli/register-analysis.d.ts +2 -0
- package/dist/cli/register-analysis.js +137 -0
- package/dist/cli/register-analysis.js.map +1 -0
- package/dist/cli/register-codebase.d.ts +2 -0
- package/dist/cli/register-codebase.js +22 -0
- package/dist/cli/register-codebase.js.map +1 -0
- package/dist/cli/register-database.d.ts +2 -0
- package/dist/cli/register-database.js +48 -0
- package/dist/cli/register-database.js.map +1 -0
- package/dist/cli/register-memory.d.ts +2 -0
- package/dist/cli/register-memory.js +58 -0
- package/dist/cli/register-memory.js.map +1 -0
- package/dist/cli.js +9 -316
- package/dist/cli.js.map +1 -1
- package/dist/codebase/generators/architecture-extractor.d.ts +41 -0
- package/dist/codebase/generators/architecture-extractor.js +388 -0
- package/dist/codebase/generators/architecture-extractor.js.map +1 -0
- package/dist/codebase/generators/architecture.d.ts +2 -4
- package/dist/codebase/generators/architecture.js +123 -30
- package/dist/codebase/generators/architecture.js.map +1 -1
- package/dist/codebase/generators/modules.js +8 -8
- package/dist/codebase/generators/overview.js +24 -24
- package/dist/codebase/index.js +3 -3
- package/dist/codebase/index.js.map +1 -1
- package/dist/codebase/parsers/typescript.d.ts +1 -0
- package/dist/codebase/parsers/typescript.js +12 -0
- package/dist/codebase/parsers/typescript.js.map +1 -1
- package/dist/codebase/scanners/filesystem.d.ts +1 -0
- package/dist/codebase/scanners/filesystem.js +128 -4
- package/dist/codebase/scanners/filesystem.js.map +1 -1
- package/dist/commands/analyze.d.ts +1 -0
- package/dist/commands/analyze.js +172 -24
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/audit-design.d.ts +8 -0
- package/dist/commands/audit-design.js +158 -0
- package/dist/commands/audit-design.js.map +1 -0
- package/dist/commands/audit-report.d.ts +18 -0
- package/dist/commands/audit-report.js +30 -0
- package/dist/commands/audit-report.js.map +1 -0
- package/dist/commands/audit-source.d.ts +21 -0
- package/dist/commands/audit-source.js +59 -0
- package/dist/commands/audit-source.js.map +1 -0
- package/dist/commands/audit.d.ts +1 -0
- package/dist/commands/audit.js +174 -73
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/claude-plugin.d.ts +8 -0
- package/dist/commands/claude-plugin.js +123 -0
- package/dist/commands/claude-plugin.js.map +1 -0
- package/dist/commands/codex-plugin.d.ts +9 -0
- package/dist/commands/codex-plugin.js +145 -0
- package/dist/commands/codex-plugin.js.map +1 -0
- package/dist/commands/context.js +66 -5
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/design-system.d.ts +8 -0
- package/dist/commands/design-system.js +95 -0
- package/dist/commands/design-system.js.map +1 -0
- package/dist/commands/extract.d.ts +13 -0
- package/dist/commands/extract.js +83 -17
- package/dist/commands/extract.js.map +1 -1
- package/dist/commands/openclaw-plugin.d.ts +8 -0
- package/dist/commands/openclaw-plugin.js +103 -0
- package/dist/commands/openclaw-plugin.js.map +1 -0
- package/dist/commands/retrieve.d.ts +12 -0
- package/dist/commands/retrieve.js +234 -0
- package/dist/commands/retrieve.js.map +1 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +54 -18
- package/dist/commands/status.js.map +1 -1
- package/dist/core/cache-json.d.ts +7 -0
- package/dist/core/cache-json.js +60 -0
- package/dist/core/cache-json.js.map +1 -0
- package/dist/core/errors.d.ts +2 -0
- package/dist/core/errors.js +49 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/learning-parser.d.ts +6 -0
- package/dist/core/learning-parser.js +23 -0
- package/dist/core/learning-parser.js.map +1 -0
- package/dist/core/profile.d.ts +18 -0
- package/dist/core/profile.js +37 -0
- package/dist/core/profile.js.map +1 -0
- package/dist/core/source-file-cache.d.ts +13 -0
- package/dist/core/source-file-cache.js +88 -0
- package/dist/core/source-file-cache.js.map +1 -0
- package/dist/database/cli/register-all.d.ts +2 -0
- package/dist/database/cli/register-all.js +9 -0
- package/dist/database/cli/register-all.js.map +1 -0
- package/dist/database/cli/register-database.d.ts +2 -0
- package/dist/database/cli/register-database.js +48 -0
- package/dist/database/cli/register-database.js.map +1 -0
- package/dist/database/cli/register-interactive.d.ts +2 -0
- package/dist/database/cli/register-interactive.js +29 -0
- package/dist/database/cli/register-interactive.js.map +1 -0
- package/dist/database/cli/register-memory.d.ts +2 -0
- package/dist/database/cli/register-memory.js +47 -0
- package/dist/database/cli/register-memory.js.map +1 -0
- package/dist/database/cli.js +5 -112
- package/dist/database/cli.js.map +1 -1
- package/dist/database/commands/checkpoint.js +8 -10
- package/dist/database/commands/checkpoint.js.map +1 -1
- package/dist/database/commands/generate.d.ts +1 -0
- package/dist/database/commands/generate.js +28 -20
- package/dist/database/commands/generate.js.map +1 -1
- package/dist/database/commands/handoff.js +126 -125
- package/dist/database/commands/handoff.js.map +1 -1
- package/dist/database/commands/learn.d.ts +4 -0
- package/dist/database/commands/learn.js +249 -43
- package/dist/database/commands/learn.js.map +1 -1
- package/dist/database/commands/memory.js +114 -114
- package/dist/database/commands/validate.js +6 -4
- package/dist/database/commands/validate.js.map +1 -1
- package/dist/database/commands/watch.js +2 -2
- package/dist/database/commands/watch.js.map +1 -1
- package/dist/database/extractors/mysql.js +45 -45
- package/dist/database/extractors/postgres.js +54 -54
- package/dist/database/extractors/sqlite.js +8 -8
- package/dist/database/generators/templates.js +534 -534
- package/dist/database/generators/templates.js.map +1 -1
- package/dist/database/utils/json-output.d.ts +4 -0
- package/dist/database/utils/json-output.js +7 -0
- package/dist/database/utils/json-output.js.map +1 -1
- package/dist/generators/unified.d.ts +13 -0
- package/dist/generators/unified.js +391 -46
- package/dist/generators/unified.js.map +1 -1
- package/package.json +86 -78
package/dist/core/errors.js
CHANGED
|
@@ -38,7 +38,7 @@ export function handleError(error, verbose = false) {
|
|
|
38
38
|
if (verbose) {
|
|
39
39
|
console.error(error.stack);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
throw error;
|
|
42
42
|
}
|
|
43
43
|
export function wrapAsync(fn) {
|
|
44
44
|
return async (...args) => {
|
|
@@ -50,4 +50,52 @@ export function wrapAsync(fn) {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
+
export function failCommand(message, error, exitCode = 1) {
|
|
54
|
+
logger.error(message);
|
|
55
|
+
if (error) {
|
|
56
|
+
if (error instanceof Error) {
|
|
57
|
+
logger.error(error.message);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
logger.error(String(error));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
process.exitCode = exitCode;
|
|
64
|
+
}
|
|
65
|
+
function extractJsonMode(args) {
|
|
66
|
+
for (let i = args.length - 1; i >= 0; i -= 1) {
|
|
67
|
+
const candidate = args[i];
|
|
68
|
+
if (!candidate || typeof candidate !== 'object')
|
|
69
|
+
continue;
|
|
70
|
+
const maybe = candidate;
|
|
71
|
+
if (typeof maybe.json === 'boolean') {
|
|
72
|
+
return maybe.json === true;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
function emitCliJsonError(command, error) {
|
|
78
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
79
|
+
console.log(JSON.stringify({
|
|
80
|
+
success: false,
|
|
81
|
+
error: message,
|
|
82
|
+
command,
|
|
83
|
+
timestamp: new Date().toISOString(),
|
|
84
|
+
}, null, 2));
|
|
85
|
+
}
|
|
86
|
+
export function withCliErrorHandling(command, handler) {
|
|
87
|
+
return async (...args) => {
|
|
88
|
+
try {
|
|
89
|
+
await handler(...args);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
if (extractJsonMode(args)) {
|
|
93
|
+
emitCliJsonError(command, error);
|
|
94
|
+
process.exitCode = 1;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
failCommand(`Command "${command}" failed`, error);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
53
101
|
//# sourceMappingURL=errors.js.map
|
package/dist/core/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,OAAO,YAAa,SAAQ,KAAK;IAG5B;IAFT,YACE,OAAe,EACR,IAAa;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,SAAI,GAAJ,IAAI,CAAS;QAGpB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,UAAU,WAAW,CAAC,KAAY,EAAE,UAAmB,KAAK;IAChE,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClC,MAAM,C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SAAS;QAC1D,MAAM,KAAK,GAAG,SAA+B,CAAC;QAC9C,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAe,EAAE,KAAc;IACvD,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ;QACE,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,OAAO;QACP,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,OAAe,EACf,OAAiD;IAEjD,OAAO,KAAK,EAAE,GAAG,IAAW,EAAiB,EAAE;QAC7C,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC1B,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;YACD,WAAW,CAAC,YAAY,OAAO,UAAU,EAAE,KAAK,CAAC,CAAC;QACpD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -6,3 +6,7 @@ export * from './logger.js';
|
|
|
6
6
|
export * from './errors.js';
|
|
7
7
|
export * from './fileio.js';
|
|
8
8
|
export * from './config.js';
|
|
9
|
+
export * from './profile.js';
|
|
10
|
+
export * from './cache-json.js';
|
|
11
|
+
export * from './source-file-cache.js';
|
|
12
|
+
export * from './learning-parser.js';
|
package/dist/core/index.js
CHANGED
|
@@ -6,4 +6,8 @@ export * from './logger.js';
|
|
|
6
6
|
export * from './errors.js';
|
|
7
7
|
export * from './fileio.js';
|
|
8
8
|
export * from './config.js';
|
|
9
|
+
export * from './profile.js';
|
|
10
|
+
export * from './cache-json.js';
|
|
11
|
+
export * from './source-file-cache.js';
|
|
12
|
+
export * from './learning-parser.js';
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function parseLearningEntries(content) {
|
|
2
|
+
const sections = content
|
|
3
|
+
.split('\n---')
|
|
4
|
+
.map((section) => section.trim())
|
|
5
|
+
.filter((section) => section.startsWith('## '));
|
|
6
|
+
const parsed = [];
|
|
7
|
+
for (const section of sections) {
|
|
8
|
+
const lines = section.split('\n').filter((line) => line.trim().length > 0);
|
|
9
|
+
if (lines.length === 0)
|
|
10
|
+
continue;
|
|
11
|
+
const header = lines[0].replace(/^##\s+/, '');
|
|
12
|
+
const match = header.match(/^(.+?)\s+-\s+(.+)$/);
|
|
13
|
+
if (!match)
|
|
14
|
+
continue;
|
|
15
|
+
parsed.push({
|
|
16
|
+
timestamp: match[1].trim(),
|
|
17
|
+
category: match[2].trim(),
|
|
18
|
+
content: lines.slice(1).join('\n').trim(),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return parsed;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=learning-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-parser.js","sourceRoot":"","sources":["../../src/core/learning-parser.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,MAAM,QAAQ,GAAG,OAAO;SACrB,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC3E,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACjC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,MAAM,CAAC,IAAI,CAAC;YACV,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;YAC1B,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;YACzB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;SAC1C,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ProfileStep {
|
|
2
|
+
name: string;
|
|
3
|
+
ms: number;
|
|
4
|
+
}
|
|
5
|
+
export interface ProfileReport {
|
|
6
|
+
totalMs: number;
|
|
7
|
+
steps: ProfileStep[];
|
|
8
|
+
}
|
|
9
|
+
export declare class Profiler {
|
|
10
|
+
private readonly enabled;
|
|
11
|
+
private readonly startNs;
|
|
12
|
+
private readonly steps;
|
|
13
|
+
constructor(enabled?: boolean);
|
|
14
|
+
isEnabled(): boolean;
|
|
15
|
+
section<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
16
|
+
report(): ProfileReport | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function createProfiler(enabled?: boolean): Profiler;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class Profiler {
|
|
2
|
+
enabled;
|
|
3
|
+
startNs;
|
|
4
|
+
steps = [];
|
|
5
|
+
constructor(enabled = false) {
|
|
6
|
+
this.enabled = enabled;
|
|
7
|
+
this.startNs = process.hrtime.bigint();
|
|
8
|
+
}
|
|
9
|
+
isEnabled() {
|
|
10
|
+
return this.enabled;
|
|
11
|
+
}
|
|
12
|
+
async section(name, fn) {
|
|
13
|
+
if (!this.enabled)
|
|
14
|
+
return fn();
|
|
15
|
+
const sectionStart = process.hrtime.bigint();
|
|
16
|
+
const value = await fn();
|
|
17
|
+
const sectionEnd = process.hrtime.bigint();
|
|
18
|
+
this.steps.push({
|
|
19
|
+
name,
|
|
20
|
+
ms: Number(sectionEnd - sectionStart) / 1_000_000,
|
|
21
|
+
});
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
report() {
|
|
25
|
+
if (!this.enabled)
|
|
26
|
+
return null;
|
|
27
|
+
const totalMs = Number(process.hrtime.bigint() - this.startNs) / 1_000_000;
|
|
28
|
+
return {
|
|
29
|
+
totalMs,
|
|
30
|
+
steps: this.steps,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export function createProfiler(enabled = false) {
|
|
35
|
+
return new Profiler(enabled);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/core/profile.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,QAAQ;IACF,OAAO,CAAU;IACjB,OAAO,CAAS;IAChB,KAAK,GAAkB,EAAE,CAAC;IAE3C,YAAY,UAAmB,KAAK;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,OAAO,CAAI,IAAY,EAAE,EAAoB;QACjD,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,EAAE,CAAC;QAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,MAAM,EAAE,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;YACd,IAAI;YACJ,EAAE,EAAE,MAAM,CAAC,UAAU,GAAG,YAAY,CAAC,GAAG,SAAS;SAClD,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;QAC3E,OAAO;YACL,OAAO;YACP,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,UAAU,cAAc,CAAC,UAAmB,KAAK;IACrD,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface SourceFileCacheOptions {
|
|
2
|
+
outputDir: string;
|
|
3
|
+
rootPath: string;
|
|
4
|
+
includeGlob: string;
|
|
5
|
+
ignore: string[];
|
|
6
|
+
ttlMs?: number;
|
|
7
|
+
}
|
|
8
|
+
interface SourceFileCacheResult {
|
|
9
|
+
files: string[];
|
|
10
|
+
cacheHit: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function getSourceFilesWithCache(options: SourceFileCacheOptions): Promise<SourceFileCacheResult>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { createHash } from 'crypto';
|
|
2
|
+
import { glob } from 'glob';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import * as fs from 'fs/promises';
|
|
5
|
+
import { readCacheJson, writeCacheJson } from './cache-json.js';
|
|
6
|
+
const CACHE_VERSION = 2;
|
|
7
|
+
function makeKey(rootPath, includeGlob, ignore) {
|
|
8
|
+
const stable = `${rootPath}::${includeGlob}::${[...ignore].sort().join(',')}`;
|
|
9
|
+
return createHash('sha256').update(stable, 'utf8').digest('hex').slice(0, 16);
|
|
10
|
+
}
|
|
11
|
+
function normalizeRelDir(value) {
|
|
12
|
+
const normalized = value.replace(/\\/g, '/');
|
|
13
|
+
return normalized === '' ? '.' : normalized;
|
|
14
|
+
}
|
|
15
|
+
async function collectDirectoryMtimes(rootPath, files) {
|
|
16
|
+
const dirs = new Set(['.']);
|
|
17
|
+
for (const file of files) {
|
|
18
|
+
const relDir = normalizeRelDir(path.posix.dirname(file.replace(/\\/g, '/')));
|
|
19
|
+
dirs.add(relDir);
|
|
20
|
+
}
|
|
21
|
+
const entries = [...dirs];
|
|
22
|
+
const result = {};
|
|
23
|
+
for (const relDir of entries) {
|
|
24
|
+
const absDir = relDir === '.' ? rootPath : path.join(rootPath, relDir);
|
|
25
|
+
try {
|
|
26
|
+
const stat = await fs.stat(absDir);
|
|
27
|
+
result[relDir] = stat.mtimeMs;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Skip transiently missing or inaccessible directories.
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
async function isDirectoryStateFresh(rootPath, dirMtimes) {
|
|
36
|
+
if (!dirMtimes || Object.keys(dirMtimes).length === 0) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const entries = Object.entries(dirMtimes);
|
|
40
|
+
for (const [relDir, recordedMtime] of entries) {
|
|
41
|
+
const absDir = relDir === '.' ? rootPath : path.join(rootPath, relDir);
|
|
42
|
+
let stat;
|
|
43
|
+
try {
|
|
44
|
+
stat = await fs.stat(absDir);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
if (stat.mtimeMs !== recordedMtime) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
export async function getSourceFilesWithCache(options) {
|
|
56
|
+
const ttlMs = options.ttlMs ?? 30000;
|
|
57
|
+
const cachePath = `${options.outputDir}/cache/file-list.json`;
|
|
58
|
+
const key = makeKey(options.rootPath, options.includeGlob, options.ignore);
|
|
59
|
+
const now = Date.now();
|
|
60
|
+
const store = (await readCacheJson(cachePath)) || {
|
|
61
|
+
version: CACHE_VERSION,
|
|
62
|
+
entries: {},
|
|
63
|
+
};
|
|
64
|
+
const entry = store.version === CACHE_VERSION ? store.entries[key] : undefined;
|
|
65
|
+
if (entry && now - entry.createdAtMs <= ttlMs) {
|
|
66
|
+
if (await isDirectoryStateFresh(options.rootPath, entry.dirMtimes || {})) {
|
|
67
|
+
return { files: entry.files, cacheHit: true };
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const files = await glob(options.includeGlob, {
|
|
71
|
+
cwd: options.rootPath,
|
|
72
|
+
ignore: options.ignore,
|
|
73
|
+
nodir: true,
|
|
74
|
+
});
|
|
75
|
+
files.sort((a, b) => a.localeCompare(b));
|
|
76
|
+
const nextStore = store.version === CACHE_VERSION ? { ...store } : { version: CACHE_VERSION, entries: {} };
|
|
77
|
+
nextStore.entries[key] = {
|
|
78
|
+
createdAtMs: now,
|
|
79
|
+
files,
|
|
80
|
+
dirMtimes: await collectDirectoryMtimes(options.rootPath, files),
|
|
81
|
+
};
|
|
82
|
+
const maxEntries = 16;
|
|
83
|
+
const sorted = Object.entries(nextStore.entries).sort((a, b) => b[1].createdAtMs - a[1].createdAtMs);
|
|
84
|
+
nextStore.entries = Object.fromEntries(sorted.slice(0, maxEntries));
|
|
85
|
+
await writeCacheJson(cachePath, nextStore, { compressAboveBytes: 1024 * 1024, pretty: false });
|
|
86
|
+
return { files, cacheHit: false };
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=source-file-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-cache.js","sourceRoot":"","sources":["../../src/core/source-file-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC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AAG,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC3F,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG;QACvB,WAAW,EAAE,GAAG;QAChB,KAAK;QACL,SAAS,EAAE,MAAM,sBAAsB,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC;KACjE,CAAC;IAEF,MAAM,UAAU,GAAG,EAAE,CAAC;IACtB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,CACnD,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAC9C,CAAC;IACF,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;IAEpE,MAAM,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,kBAAkB,EAAE,IAAI,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE/F,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { registerDatabaseCommands } from './register-database.js';
|
|
2
|
+
import { registerMemoryCommands } from './register-memory.js';
|
|
3
|
+
import { registerInteractiveCommand } from './register-interactive.js';
|
|
4
|
+
export function registerAllCommands(program) {
|
|
5
|
+
registerDatabaseCommands(program);
|
|
6
|
+
registerMemoryCommands(program);
|
|
7
|
+
registerInteractiveCommand(program);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=register-all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-all.js","sourceRoot":"","sources":["../../../src/database/cli/register-all.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAClC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { withCliErrorHandling } from '../../core/index.js';
|
|
2
|
+
import { generate } from '../commands/generate.js';
|
|
3
|
+
import { init } from '../commands/init.js';
|
|
4
|
+
import { validate } from '../commands/validate.js';
|
|
5
|
+
import { watch } from '../commands/watch.js';
|
|
6
|
+
export function registerDatabaseCommands(program) {
|
|
7
|
+
program
|
|
8
|
+
.command('init')
|
|
9
|
+
.description('Initialize SchemaWise in your project')
|
|
10
|
+
.option('-u, --url <url>', 'Database connection URL')
|
|
11
|
+
.option('-d, --dir <dir>', 'Output directory', '.devmind')
|
|
12
|
+
.action(withCliErrorHandling('init', init));
|
|
13
|
+
program
|
|
14
|
+
.command('generate')
|
|
15
|
+
.description('Generate context from database or ORM schema')
|
|
16
|
+
.option('-u, --url <url>', 'Database connection URL')
|
|
17
|
+
.option('--orm <orm>', 'ORM type (prisma, drizzle)')
|
|
18
|
+
.option('--mysql', 'Use MySQL extractor')
|
|
19
|
+
.option('--sqlite <path>', 'Use SQLite extractor with file path')
|
|
20
|
+
.option('--prisma [path]', 'Use Prisma extractor (optional path)')
|
|
21
|
+
.option('--drizzle [path]', 'Use Drizzle extractor (optional path)')
|
|
22
|
+
.option('--mongodb <url>', 'Use MongoDB extractor with connection URL')
|
|
23
|
+
.option('--firebase-project <id>', 'Use Firebase extractor with project ID')
|
|
24
|
+
.option('--firebase-key <path>', 'Path to Firebase service account JSON key')
|
|
25
|
+
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
26
|
+
.option('--format <format>', 'Output format (markdown, json)', 'markdown')
|
|
27
|
+
.option('--json', 'Output as JSON')
|
|
28
|
+
.action(withCliErrorHandling('generate', generate));
|
|
29
|
+
program
|
|
30
|
+
.command('validate')
|
|
31
|
+
.description('Validate generated context against database')
|
|
32
|
+
.option('--strict', 'Fail on any mismatches')
|
|
33
|
+
.action(withCliErrorHandling('validate', validate));
|
|
34
|
+
program
|
|
35
|
+
.command('watch')
|
|
36
|
+
.description('Watch for schema changes and regenerate')
|
|
37
|
+
.option('-d, --debounce <ms>', 'Debounce time in ms', '2000')
|
|
38
|
+
.action(withCliErrorHandling('watch', watch));
|
|
39
|
+
program
|
|
40
|
+
.command('show')
|
|
41
|
+
.description('Show current database schema')
|
|
42
|
+
.option('-f, --format <format>', 'Output format', 'markdown')
|
|
43
|
+
.action(withCliErrorHandling('show', async (options) => {
|
|
44
|
+
const { show } = await import('../commands/show.js');
|
|
45
|
+
await show(options);
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=register-database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-database.js","sourceRoot":"","sources":["../../../src/database/cli/register-database.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,iBAAiB,EAAE,y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,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IAEhD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,8BAA8B,CAAC;SAC3C,MAAM,CAAC,uBAAuB,EAAE,eAAe,EAAE,UAAU,CAAC;SAC5D,MAAM,CACL,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC7C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACrD,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,CAAC,CACH,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import { withCliErrorHandling } from '../../core/index.js';
|
|
3
|
+
export function registerInteractiveCommand(program) {
|
|
4
|
+
program
|
|
5
|
+
.command('interactive')
|
|
6
|
+
.alias('i')
|
|
7
|
+
.description('Interactive mode for quick operations')
|
|
8
|
+
.action(withCliErrorHandling('interactive', async () => {
|
|
9
|
+
const { action } = await inquirer.prompt([
|
|
10
|
+
{
|
|
11
|
+
type: 'list',
|
|
12
|
+
name: 'action',
|
|
13
|
+
message: 'What would you like to do?',
|
|
14
|
+
choices: [
|
|
15
|
+
{ name: 'Generate context from database', value: 'generate' },
|
|
16
|
+
{ name: 'Validate existing context', value: 'validate' },
|
|
17
|
+
{ name: 'Watch for changes', value: 'watch' },
|
|
18
|
+
{ name: 'Show schema', value: 'show' },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
]);
|
|
22
|
+
const command = program.commands.find((c) => c.name() === action);
|
|
23
|
+
if (command) {
|
|
24
|
+
const argv = [process.argv[0], program.name(), action];
|
|
25
|
+
await command.parseAsync(argv);
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=register-interactive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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@@
|
|
|
1
|
+
import { withCliErrorHandling } from '../../core/index.js';
|
|
2
|
+
import { handoff } from '../commands/handoff.js';
|
|
3
|
+
import { checkpoint } from '../commands/checkpoint.js';
|
|
4
|
+
import { learn } from '../commands/learn.js';
|
|
5
|
+
import { history } from '../commands/history.js';
|
|
6
|
+
export function registerMemoryCommands(program) {
|
|
7
|
+
program
|
|
8
|
+
.command('handoff')
|
|
9
|
+
.description('Multi-agent handoff management')
|
|
10
|
+
.option('--record', 'Record current session state')
|
|
11
|
+
.option('--resume <id>', 'Resume from previous session')
|
|
12
|
+
.option('--list', 'List available sessions')
|
|
13
|
+
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
14
|
+
.option('--status <status>', 'Session status', 'in_progress')
|
|
15
|
+
.option('--agentId <id>', 'Agent identifier')
|
|
16
|
+
.action(withCliErrorHandling('handoff', handoff));
|
|
17
|
+
program
|
|
18
|
+
.command('checkpoint')
|
|
19
|
+
.description('Save or restore session checkpoint')
|
|
20
|
+
.option('--restore', 'Restore latest checkpoint')
|
|
21
|
+
.option('--list', 'List all checkpoints')
|
|
22
|
+
.option('-m, --message <message>', 'Checkpoint message')
|
|
23
|
+
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
24
|
+
.option('--json', 'Output as JSON')
|
|
25
|
+
.action(withCliErrorHandling('checkpoint', checkpoint));
|
|
26
|
+
program
|
|
27
|
+
.command('learn [learning]')
|
|
28
|
+
.description('Add a learning to accumulated knowledge')
|
|
29
|
+
.option('--list', 'List all learnings')
|
|
30
|
+
.option('--category <category>', 'Learning category (e.g., performance, security)')
|
|
31
|
+
.option('--top <n>', 'Limit listed learnings (with --list)')
|
|
32
|
+
.option('--contains <text>', 'Filter listed learnings by substring match')
|
|
33
|
+
.option('--since <iso-date>', 'Filter listed learnings since ISO timestamp')
|
|
34
|
+
.option('--compact', 'Use compact JSON items in list mode')
|
|
35
|
+
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
36
|
+
.option('--json', 'Output as JSON')
|
|
37
|
+
.action(withCliErrorHandling('learn', learn));
|
|
38
|
+
program
|
|
39
|
+
.command('history')
|
|
40
|
+
.description('View session history and schema evolution')
|
|
41
|
+
.option('--sessions', 'Show session history (default)')
|
|
42
|
+
.option('--evolution', 'Show schema evolution')
|
|
43
|
+
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
44
|
+
.option('--json', 'Output as JSON')
|
|
45
|
+
.action(withCliErrorHandling('history', history));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=register-memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-memory.js","sourceRoot":"","sources":["../../../src/database/cli/register-memory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,UAAU,EAAE,8BAA8B,CAAC;SAClD,MAAM,CAAC,eAAe,EAAE,8BAA8B,CAAC;SACvD,MAAM,CAAC,QAAQ,EAAE,yBAAyB,CAAC;SAC3C,MAAM,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,UAAU,CAAC;SAC5D,MAAM,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,CAAC;SAC5D,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;SAC5C,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpD,OAAO;SACJ,OAAO,CAAC,YAAY,CAAC;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|
package/dist/database/cli.js
CHANGED
|
@@ -6,126 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
8
8
|
import { dirname, join } from 'path';
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
11
9
|
import { Command } from 'commander';
|
|
12
|
-
import inquirer from 'inquirer';
|
|
13
|
-
import { generate } from './commands/generate.js';
|
|
14
|
-
import { init } from './commands/init.js';
|
|
15
|
-
import { validate } from './commands/validate.js';
|
|
16
|
-
import { watch } from './commands/watch.js';
|
|
17
|
-
import { handoff } from './commands/handoff.js';
|
|
18
|
-
import { checkpoint } from './commands/checkpoint.js';
|
|
19
|
-
import { learn } from './commands/learn.js';
|
|
20
|
-
import { history } from './commands/history.js';
|
|
21
10
|
import * as fs from 'fs';
|
|
11
|
+
import { registerAllCommands } from './cli/register-all.js';
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = dirname(__filename);
|
|
22
14
|
const pkg = JSON.parse(fs.readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8'));
|
|
23
|
-
const version = pkg.version;
|
|
24
15
|
const program = new Command();
|
|
25
16
|
program
|
|
26
17
|
.name('devmind-db')
|
|
27
18
|
.description('Database schema documentation and SQL query validation for AI coding assistants')
|
|
28
|
-
.version(version);
|
|
29
|
-
|
|
30
|
-
program
|
|
31
|
-
.command('init')
|
|
32
|
-
.description('Initialize SchemaWise in your project')
|
|
33
|
-
.option('-u, --url <url>', 'Database connection URL')
|
|
34
|
-
.option('-d, --dir <dir>', 'Output directory', '.devmind')
|
|
35
|
-
.action(init);
|
|
36
|
-
program
|
|
37
|
-
.command('generate')
|
|
38
|
-
.description('Generate context from database or ORM schema')
|
|
39
|
-
.option('-u, --url <url>', 'Database connection URL')
|
|
40
|
-
.option('--orm <orm>', 'ORM type (prisma, drizzle)')
|
|
41
|
-
.option('--mysql', 'Use MySQL extractor')
|
|
42
|
-
.option('--sqlite <path>', 'Use SQLite extractor with file path')
|
|
43
|
-
.option('--prisma [path]', 'Use Prisma extractor (optional path)')
|
|
44
|
-
.option('--drizzle [path]', 'Use Drizzle extractor (optional path)')
|
|
45
|
-
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
46
|
-
.option('--format <format>', 'Output format (markdown, json)', 'markdown')
|
|
47
|
-
.action(generate);
|
|
48
|
-
program
|
|
49
|
-
.command('validate')
|
|
50
|
-
.description('Validate generated context against database')
|
|
51
|
-
.option('--strict', 'Fail on any mismatches')
|
|
52
|
-
.action(validate);
|
|
53
|
-
program
|
|
54
|
-
.command('watch')
|
|
55
|
-
.description('Watch for schema changes and regenerate')
|
|
56
|
-
.option('-d, --debounce <ms>', 'Debounce time in ms', '2000')
|
|
57
|
-
.action(watch);
|
|
58
|
-
program
|
|
59
|
-
.command('show')
|
|
60
|
-
.description('Show current database schema')
|
|
61
|
-
.option('-f, --format <format>', 'Output format', 'markdown')
|
|
62
|
-
.action(async (options) => {
|
|
63
|
-
const { show } = await import('./commands/show.js');
|
|
64
|
-
await show(options);
|
|
65
|
-
});
|
|
66
|
-
program
|
|
67
|
-
.command('handoff')
|
|
68
|
-
.description('Multi-agent handoff management')
|
|
69
|
-
.option('--record', 'Record current session state')
|
|
70
|
-
.option('--resume <id>', 'Resume from previous session')
|
|
71
|
-
.option('--list', 'List available sessions')
|
|
72
|
-
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
73
|
-
.option('--status <status>', 'Session status', 'in_progress')
|
|
74
|
-
.option('--agentId <id>', 'Agent identifier')
|
|
75
|
-
.action(handoff);
|
|
76
|
-
program
|
|
77
|
-
.command('checkpoint')
|
|
78
|
-
.description('Save or restore session checkpoint')
|
|
79
|
-
.option('--restore', 'Restore latest checkpoint')
|
|
80
|
-
.option('--list', 'List all checkpoints')
|
|
81
|
-
.option('-m, --message <message>', 'Checkpoint message')
|
|
82
|
-
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
83
|
-
.option('--json', 'Output as JSON')
|
|
84
|
-
.action(checkpoint);
|
|
85
|
-
program
|
|
86
|
-
.command('learn [learning]')
|
|
87
|
-
.description('Add a learning to accumulated knowledge')
|
|
88
|
-
.option('--list', 'List all learnings')
|
|
89
|
-
.option('--category <category>', 'Learning category (e.g., performance, security)')
|
|
90
|
-
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
91
|
-
.option('--json', 'Output as JSON')
|
|
92
|
-
.action(learn);
|
|
93
|
-
program
|
|
94
|
-
.command('history')
|
|
95
|
-
.description('View session history and schema evolution')
|
|
96
|
-
.option('--sessions', 'Show session history (default)')
|
|
97
|
-
.option('--evolution', 'Show schema evolution')
|
|
98
|
-
.option('-o, --output <dir>', 'Output directory', '.devmind')
|
|
99
|
-
.option('--json', 'Output as JSON')
|
|
100
|
-
.action(history);
|
|
101
|
-
// Interactive mode
|
|
102
|
-
program
|
|
103
|
-
.command('interactive')
|
|
104
|
-
.alias('i')
|
|
105
|
-
.description('Interactive mode for quick operations')
|
|
106
|
-
.action(async () => {
|
|
107
|
-
const { action } = await inquirer.prompt([
|
|
108
|
-
{
|
|
109
|
-
type: 'list',
|
|
110
|
-
name: 'action',
|
|
111
|
-
message: 'What would you like to do?',
|
|
112
|
-
choices: [
|
|
113
|
-
{ name: 'Generate context from database', value: 'generate' },
|
|
114
|
-
{ name: 'Validate existing context', value: 'validate' },
|
|
115
|
-
{ name: 'Watch for changes', value: 'watch' },
|
|
116
|
-
{ name: 'Show schema', value: 'show' },
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
]);
|
|
120
|
-
const command = program.commands.find((c) => c.name() === action);
|
|
121
|
-
if (command) {
|
|
122
|
-
const argv = [process.argv[0], program.name(), action];
|
|
123
|
-
await command.parseAsync(argv);
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
// Parse arguments
|
|
19
|
+
.version(pkg.version);
|
|
20
|
+
registerAllCommands(program);
|
|
127
21
|
program.parse();
|
|
128
|
-
// Show help if no command
|
|
129
22
|
if (!process.argv.slice(2).length) {
|
|
130
23
|
program.outputHelp();
|
|
131
24
|
}
|
package/dist/database/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/database/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/database/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAE3F,CAAC;AAEF,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,iFAAiF,CAAC;KAC9F,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAExB,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAE7B,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|