@qulib/core 0.3.1 → 0.4.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/dist/analyze.d.ts +2 -0
- package/dist/analyze.d.ts.map +1 -1
- package/dist/analyze.js +29 -1
- package/dist/harness/decision-logger.d.ts +1 -0
- package/dist/harness/decision-logger.d.ts.map +1 -1
- package/dist/harness/decision-logger.js +15 -22
- package/dist/harness/run-options.d.ts +3 -0
- package/dist/harness/run-options.d.ts.map +1 -1
- package/dist/harness/state-manager.d.ts +3 -0
- package/dist/harness/state-manager.d.ts.map +1 -1
- package/dist/harness/state-manager.js +15 -18
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/llm/cost-intelligence.d.ts +13 -0
- package/dist/llm/cost-intelligence.d.ts.map +1 -1
- package/dist/llm/cost-intelligence.js +13 -0
- package/dist/llm/provider-registry.d.ts +9 -0
- package/dist/llm/provider-registry.d.ts.map +1 -0
- package/dist/llm/provider-registry.js +15 -0
- package/dist/llm/provider.d.ts +9 -11
- package/dist/llm/provider.d.ts.map +1 -1
- package/dist/llm/provider.interface.d.ts +16 -0
- package/dist/llm/provider.interface.d.ts.map +1 -0
- package/dist/llm/provider.interface.js +1 -0
- package/dist/llm/provider.js +8 -51
- package/dist/llm/providers/anthropic.d.ts +16 -0
- package/dist/llm/providers/anthropic.d.ts.map +1 -0
- package/dist/llm/providers/anthropic.js +104 -0
- package/dist/phases/act.d.ts.map +1 -1
- package/dist/phases/act.js +20 -6
- package/dist/phases/observe.d.ts.map +1 -1
- package/dist/phases/observe.js +20 -2
- package/dist/phases/think-finalize.d.ts.map +1 -1
- package/dist/phases/think-finalize.js +12 -3
- package/dist/phases/think.d.ts.map +1 -1
- package/dist/phases/think.js +14 -2
- package/dist/schemas/automation-maturity.schema.d.ts +78 -0
- package/dist/schemas/automation-maturity.schema.d.ts.map +1 -0
- package/dist/schemas/automation-maturity.schema.js +24 -0
- package/dist/schemas/config.schema.d.ts +37 -0
- package/dist/schemas/config.schema.d.ts.map +1 -1
- package/dist/schemas/config.schema.js +11 -0
- package/dist/schemas/gap-analysis.schema.d.ts +6 -6
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -1
- package/dist/schemas/public-surface.schema.d.ts +4 -4
- package/dist/schemas/repo-analysis.schema.d.ts +134 -0
- package/dist/schemas/repo-analysis.schema.d.ts.map +1 -1
- package/dist/schemas/repo-analysis.schema.js +29 -0
- package/dist/telemetry/emit.d.ts +3 -0
- package/dist/telemetry/emit.d.ts.map +1 -0
- package/dist/telemetry/emit.js +11 -0
- package/dist/telemetry/telemetry.interface.d.ts +13 -0
- package/dist/telemetry/telemetry.interface.d.ts.map +1 -0
- package/dist/telemetry/telemetry.interface.js +3 -0
- package/dist/tools/automation-maturity.d.ts +4 -0
- package/dist/tools/automation-maturity.d.ts.map +1 -0
- package/dist/tools/automation-maturity.js +163 -0
- package/dist/tools/framework-detector.d.ts +15 -0
- package/dist/tools/framework-detector.d.ts.map +1 -0
- package/dist/tools/framework-detector.js +153 -0
- package/dist/tools/gap-engine.d.ts +1 -1
- package/dist/tools/gap-engine.d.ts.map +1 -1
- package/dist/tools/gap-engine.js +13 -3
- package/dist/tools/repo-scanner.d.ts +16 -0
- package/dist/tools/repo-scanner.d.ts.map +1 -1
- package/dist/tools/repo-scanner.js +31 -2
- package/package.json +1 -1
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module repo-scanner
|
|
3
|
+
* @packageBoundary @qulib/core (candidate: @qulib/analyzer)
|
|
4
|
+
*
|
|
5
|
+
* This module performs static analysis of a repository's file structure.
|
|
6
|
+
* It is currently embedded in @qulib/core because repo scanning is part of
|
|
7
|
+
* the observe phase and @qulib/core is the only consumer.
|
|
8
|
+
*
|
|
9
|
+
* Extraction to @qulib/analyzer is appropriate when:
|
|
10
|
+
* 1. A consumer needs repo analysis without URL crawling
|
|
11
|
+
* 2. The module grows to include PRD/Jira/Confluence ingestion
|
|
12
|
+
* 3. A standalone CLI command `qulib analyze-repo` is needed
|
|
13
|
+
*
|
|
14
|
+
* Before extraction: ensure RepoAnalysis schema is re-exported from @qulib/analyzer
|
|
15
|
+
* and @qulib/core depends on @qulib/analyzer (not the reverse).
|
|
16
|
+
*/
|
|
1
17
|
import { type RepoAnalysis } from '../schemas/repo-analysis.schema.js';
|
|
2
18
|
export declare function scanRepo(repoPath: string): Promise<RepoAnalysis>;
|
|
3
19
|
//# sourceMappingURL=repo-scanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-scanner.d.ts","sourceRoot":"","sources":["../../src/tools/repo-scanner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repo-scanner.d.ts","sourceRoot":"","sources":["../../src/tools/repo-scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAmC3F,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAyItE"}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module repo-scanner
|
|
3
|
+
* @packageBoundary @qulib/core (candidate: @qulib/analyzer)
|
|
4
|
+
*
|
|
5
|
+
* This module performs static analysis of a repository's file structure.
|
|
6
|
+
* It is currently embedded in @qulib/core because repo scanning is part of
|
|
7
|
+
* the observe phase and @qulib/core is the only consumer.
|
|
8
|
+
*
|
|
9
|
+
* Extraction to @qulib/analyzer is appropriate when:
|
|
10
|
+
* 1. A consumer needs repo analysis without URL crawling
|
|
11
|
+
* 2. The module grows to include PRD/Jira/Confluence ingestion
|
|
12
|
+
* 3. A standalone CLI command `qulib analyze-repo` is needed
|
|
13
|
+
*
|
|
14
|
+
* Before extraction: ensure RepoAnalysis schema is re-exported from @qulib/analyzer
|
|
15
|
+
* and @qulib/core depends on @qulib/analyzer (not the reverse).
|
|
16
|
+
*/
|
|
1
17
|
import { readFile } from 'node:fs/promises';
|
|
2
18
|
import { relative, basename } from 'node:path';
|
|
3
19
|
import glob from 'fast-glob';
|
|
4
20
|
import { RepoAnalysisSchema } from '../schemas/repo-analysis.schema.js';
|
|
21
|
+
import { detectFramework } from './framework-detector.js';
|
|
22
|
+
import { computeAutomationMaturity } from './automation-maturity.js';
|
|
5
23
|
const IGNORE_PATTERNS = ['**/node_modules/**', '**/.next/**', '**/dist/**', '**/build/**'];
|
|
6
24
|
function toPosix(path) {
|
|
7
25
|
return path.split('\\').join('/');
|
|
@@ -127,7 +145,7 @@ export async function scanRepo(repoPath) {
|
|
|
127
145
|
missingTestIds.push(rel);
|
|
128
146
|
}
|
|
129
147
|
}
|
|
130
|
-
|
|
148
|
+
const base = {
|
|
131
149
|
scannedAt: new Date().toISOString(),
|
|
132
150
|
repoPath,
|
|
133
151
|
routes,
|
|
@@ -143,5 +161,16 @@ export async function scanRepo(repoPath) {
|
|
|
143
161
|
existingE2eFiles,
|
|
144
162
|
existingComponentFiles,
|
|
145
163
|
},
|
|
146
|
-
}
|
|
164
|
+
};
|
|
165
|
+
let parsed = RepoAnalysisSchema.parse(base);
|
|
166
|
+
try {
|
|
167
|
+
const framework = await detectFramework(repoPath);
|
|
168
|
+
parsed = RepoAnalysisSchema.parse({ ...parsed, framework });
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
172
|
+
console.warn(`[qulib] framework detection failed for ${repoPath}: ${msg}`);
|
|
173
|
+
}
|
|
174
|
+
const automationMaturity = computeAutomationMaturity(parsed);
|
|
175
|
+
return RepoAnalysisSchema.parse({ ...parsed, automationMaturity });
|
|
147
176
|
}
|