agentic-qe 3.7.11 → 3.7.13
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/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +5 -0
- package/.claude/skills/release/SKILL.md +44 -2
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +5 -0
- package/dist/cli/bundle.js +357 -307
- package/dist/domains/test-generation/services/pattern-matcher.js +1 -1
- package/dist/domains/test-generation/services/pattern-matcher.js.map +1 -1
- package/dist/domains/test-generation/services/test-generator.js +1 -1
- package/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/bundle.js +206 -165
- package/dist/shared/parsers/typescript-parser.d.ts +1 -1
- package/dist/shared/parsers/typescript-parser.d.ts.map +1 -1
- package/dist/shared/parsers/typescript-parser.js +1 -1
- package/dist/shared/parsers/typescript-parser.js.map +1 -1
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +8 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/trigger-optimizer.d.ts +61 -0
- package/dist/validation/trigger-optimizer.d.ts.map +1 -0
- package/dist/validation/trigger-optimizer.js +356 -0
- package/dist/validation/trigger-optimizer.js.map +1 -0
- package/dist/validation/version-comparator.d.ts +115 -0
- package/dist/validation/version-comparator.d.ts.map +1 -0
- package/dist/validation/version-comparator.js +322 -0
- package/dist/validation/version-comparator.js.map +1 -0
- package/package.json +1 -1
- package/scripts/build-cli.mjs +62 -11
- package/scripts/build-mcp.mjs +53 -11
package/dist/cli/bundle.js
CHANGED
|
@@ -976,18 +976,18 @@ var init_logger_factory = __esm({
|
|
|
976
976
|
return this.instances.get(domain);
|
|
977
977
|
}
|
|
978
978
|
const level = this.getDomainLevel(domain);
|
|
979
|
-
let
|
|
979
|
+
let logger25;
|
|
980
980
|
if (this.config.silent) {
|
|
981
|
-
|
|
981
|
+
logger25 = new NullLogger(domain);
|
|
982
982
|
} else if (this.customProvider) {
|
|
983
|
-
|
|
983
|
+
logger25 = this.customProvider(domain, level, context2);
|
|
984
984
|
} else {
|
|
985
|
-
|
|
985
|
+
logger25 = new ConsoleLogger(domain, level, this.config.consoleConfig, context2);
|
|
986
986
|
}
|
|
987
987
|
if (!context2) {
|
|
988
|
-
this.instances.set(domain,
|
|
988
|
+
this.instances.set(domain, logger25);
|
|
989
989
|
}
|
|
990
|
-
return
|
|
990
|
+
return logger25;
|
|
991
991
|
}
|
|
992
992
|
/**
|
|
993
993
|
* Get a logger (alias for create)
|
|
@@ -1372,7 +1372,7 @@ var require_secure_json_parse = __commonJS({
|
|
|
1372
1372
|
}
|
|
1373
1373
|
return obj;
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function parse6(text, reviver, options) {
|
|
1376
1376
|
const { stackTraceLimit } = Error;
|
|
1377
1377
|
Error.stackTraceLimit = 0;
|
|
1378
1378
|
try {
|
|
@@ -1392,9 +1392,9 @@ var require_secure_json_parse = __commonJS({
|
|
|
1392
1392
|
Error.stackTraceLimit = stackTraceLimit;
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
module.exports =
|
|
1396
|
-
module.exports.default =
|
|
1397
|
-
module.exports.parse =
|
|
1395
|
+
module.exports = parse6;
|
|
1396
|
+
module.exports.default = parse6;
|
|
1397
|
+
module.exports.parse = parse6;
|
|
1398
1398
|
module.exports.safeParse = safeParse;
|
|
1399
1399
|
module.exports.scan = filter;
|
|
1400
1400
|
}
|
|
@@ -3136,11 +3136,11 @@ function createLWWRegister(nodeId, initialValue, initialTimestamp) {
|
|
|
3136
3136
|
return state3.value;
|
|
3137
3137
|
},
|
|
3138
3138
|
set(value, timestamp) {
|
|
3139
|
-
const
|
|
3140
|
-
if (state3.timestamp === 0 || compareTimestamps(
|
|
3139
|
+
const ts = timestamp ?? Date.now();
|
|
3140
|
+
if (state3.timestamp === 0 || compareTimestamps(ts, nodeId, state3.timestamp, state3.nodeId) > 0) {
|
|
3141
3141
|
state3 = {
|
|
3142
3142
|
value,
|
|
3143
|
-
timestamp:
|
|
3143
|
+
timestamp: ts,
|
|
3144
3144
|
nodeId,
|
|
3145
3145
|
version: state3.version + 1,
|
|
3146
3146
|
lastUpdated: Date.now()
|
|
@@ -5465,6 +5465,47 @@ var init_unified_persistence = __esm({
|
|
|
5465
5465
|
}
|
|
5466
5466
|
});
|
|
5467
5467
|
|
|
5468
|
+
// typescript-lazy:typescript
|
|
5469
|
+
import { createRequire as createRequire4 } from "module";
|
|
5470
|
+
function _load() {
|
|
5471
|
+
if (!_ts) {
|
|
5472
|
+
const req = createRequire4(import.meta.url);
|
|
5473
|
+
try {
|
|
5474
|
+
_ts = req("typescript");
|
|
5475
|
+
} catch {
|
|
5476
|
+
try {
|
|
5477
|
+
_ts = req("typescript/lib/typescript.js");
|
|
5478
|
+
} catch {
|
|
5479
|
+
_ts = new Proxy({}, { get(_56, p74) {
|
|
5480
|
+
if (p74 === "__esModule" || typeof p74 === "symbol") return void 0;
|
|
5481
|
+
throw new Error("TypeScript is required for code analysis. Install it: npm install -g typescript");
|
|
5482
|
+
} });
|
|
5483
|
+
}
|
|
5484
|
+
}
|
|
5485
|
+
}
|
|
5486
|
+
return _ts;
|
|
5487
|
+
}
|
|
5488
|
+
var _ts, typescript_default;
|
|
5489
|
+
var init_typescript = __esm({
|
|
5490
|
+
"typescript-lazy:typescript"() {
|
|
5491
|
+
typescript_default = new Proxy({}, {
|
|
5492
|
+
get(_56, p74) {
|
|
5493
|
+
return _load()[p74];
|
|
5494
|
+
},
|
|
5495
|
+
has(_56, p74) {
|
|
5496
|
+
return p74 in _load();
|
|
5497
|
+
},
|
|
5498
|
+
ownKeys() {
|
|
5499
|
+
return Object.keys(_load());
|
|
5500
|
+
},
|
|
5501
|
+
getOwnPropertyDescriptor(_56, p74) {
|
|
5502
|
+
const v65 = _load()[p74];
|
|
5503
|
+
if (v65 !== void 0) return { configurable: true, enumerable: true, value: v65 };
|
|
5504
|
+
}
|
|
5505
|
+
});
|
|
5506
|
+
}
|
|
5507
|
+
});
|
|
5508
|
+
|
|
5468
5509
|
// src/shared/types/test-frameworks.ts
|
|
5469
5510
|
var test_frameworks_exports = {};
|
|
5470
5511
|
__export(test_frameworks_exports, {
|
|
@@ -9386,11 +9427,11 @@ __export(sona_exports, {
|
|
|
9386
9427
|
init: () => init4,
|
|
9387
9428
|
pipeline: () => pipeline5
|
|
9388
9429
|
});
|
|
9389
|
-
import { createRequire as
|
|
9430
|
+
import { createRequire as createRequire5 } from "module";
|
|
9390
9431
|
var __require5, __mod4, sona_default, RuvectorLayer4, TensorCompress4, differentiableSearch4, hierarchicalForward4, getCompressionLevel4, init4, FlashAttention4, DotProductAttention4, MultiHeadAttention4, HyperbolicAttention4, LinearAttention4, MoEAttention4, SonaEngine4, pipeline5;
|
|
9391
9432
|
var init_sona = __esm({
|
|
9392
9433
|
"native-require:@ruvector/sona"() {
|
|
9393
|
-
__require5 =
|
|
9434
|
+
__require5 = createRequire5(import.meta.url);
|
|
9394
9435
|
__mod4 = __require5("@ruvector/sona");
|
|
9395
9436
|
sona_default = __mod4;
|
|
9396
9437
|
({
|
|
@@ -10009,11 +10050,11 @@ __export(attention_exports, {
|
|
|
10009
10050
|
init: () => init5,
|
|
10010
10051
|
pipeline: () => pipeline6
|
|
10011
10052
|
});
|
|
10012
|
-
import { createRequire as
|
|
10053
|
+
import { createRequire as createRequire6 } from "module";
|
|
10013
10054
|
var __require6, __mod5, attention_default, RuvectorLayer5, TensorCompress5, differentiableSearch5, hierarchicalForward5, getCompressionLevel5, init5, FlashAttention5, DotProductAttention5, MultiHeadAttention5, HyperbolicAttention5, LinearAttention5, MoEAttention5, SonaEngine5, pipeline6;
|
|
10014
10055
|
var init_attention = __esm({
|
|
10015
10056
|
"native-require:@ruvector/attention"() {
|
|
10016
|
-
__require6 =
|
|
10057
|
+
__require6 = createRequire6(import.meta.url);
|
|
10017
10058
|
__mod5 = __require6("@ruvector/attention");
|
|
10018
10059
|
attention_default = __mod5;
|
|
10019
10060
|
({
|
|
@@ -11842,20 +11883,20 @@ var init_hnsw_index = __esm({
|
|
|
11842
11883
|
});
|
|
11843
11884
|
|
|
11844
11885
|
// src/shared/parsers/typescript-parser.ts
|
|
11845
|
-
import * as ts3 from "typescript/lib/typescript.js";
|
|
11846
11886
|
var TypeScriptParser, typescriptParser, TypeScriptLanguageParser, typescriptLanguageParser;
|
|
11847
11887
|
var init_typescript_parser = __esm({
|
|
11848
11888
|
"src/shared/parsers/typescript-parser.ts"() {
|
|
11849
11889
|
"use strict";
|
|
11890
|
+
init_typescript();
|
|
11850
11891
|
TypeScriptParser = class {
|
|
11851
11892
|
/**
|
|
11852
11893
|
* Parse a TypeScript file and return the AST SourceFile
|
|
11853
11894
|
*/
|
|
11854
11895
|
parseFile(filePath, content) {
|
|
11855
|
-
return
|
|
11896
|
+
return typescript_default.createSourceFile(
|
|
11856
11897
|
filePath,
|
|
11857
11898
|
content,
|
|
11858
|
-
|
|
11899
|
+
typescript_default.ScriptTarget.Latest,
|
|
11859
11900
|
true,
|
|
11860
11901
|
this.getScriptKind(filePath)
|
|
11861
11902
|
);
|
|
@@ -11866,14 +11907,14 @@ var init_typescript_parser = __esm({
|
|
|
11866
11907
|
extractFunctions(ast) {
|
|
11867
11908
|
const functions = [];
|
|
11868
11909
|
const visit = (node) => {
|
|
11869
|
-
if (
|
|
11910
|
+
if (typescript_default.isFunctionDeclaration(node) && node.name) {
|
|
11870
11911
|
functions.push(this.extractFunctionDeclaration(node, ast));
|
|
11871
|
-
} else if (
|
|
11912
|
+
} else if (typescript_default.isVariableStatement(node)) {
|
|
11872
11913
|
this.extractArrowFunctions(node, ast, functions);
|
|
11873
11914
|
}
|
|
11874
|
-
|
|
11915
|
+
typescript_default.forEachChild(node, visit);
|
|
11875
11916
|
};
|
|
11876
|
-
|
|
11917
|
+
typescript_default.forEachChild(ast, visit);
|
|
11877
11918
|
return functions;
|
|
11878
11919
|
}
|
|
11879
11920
|
/**
|
|
@@ -11882,12 +11923,12 @@ var init_typescript_parser = __esm({
|
|
|
11882
11923
|
extractClasses(ast) {
|
|
11883
11924
|
const classes = [];
|
|
11884
11925
|
const visit = (node) => {
|
|
11885
|
-
if (
|
|
11926
|
+
if (typescript_default.isClassDeclaration(node) && node.name) {
|
|
11886
11927
|
classes.push(this.extractClassDeclaration(node, ast));
|
|
11887
11928
|
}
|
|
11888
|
-
|
|
11929
|
+
typescript_default.forEachChild(node, visit);
|
|
11889
11930
|
};
|
|
11890
|
-
|
|
11931
|
+
typescript_default.forEachChild(ast, visit);
|
|
11891
11932
|
return classes;
|
|
11892
11933
|
}
|
|
11893
11934
|
/**
|
|
@@ -11896,12 +11937,12 @@ var init_typescript_parser = __esm({
|
|
|
11896
11937
|
extractImports(ast) {
|
|
11897
11938
|
const imports = [];
|
|
11898
11939
|
const visit = (node) => {
|
|
11899
|
-
if (
|
|
11940
|
+
if (typescript_default.isImportDeclaration(node)) {
|
|
11900
11941
|
imports.push(this.extractImportDeclaration(node));
|
|
11901
11942
|
}
|
|
11902
|
-
|
|
11943
|
+
typescript_default.forEachChild(node, visit);
|
|
11903
11944
|
};
|
|
11904
|
-
|
|
11945
|
+
typescript_default.forEachChild(ast, visit);
|
|
11905
11946
|
return imports;
|
|
11906
11947
|
}
|
|
11907
11948
|
/**
|
|
@@ -11910,9 +11951,9 @@ var init_typescript_parser = __esm({
|
|
|
11910
11951
|
extractExports(ast) {
|
|
11911
11952
|
const exports = [];
|
|
11912
11953
|
const visit = (node) => {
|
|
11913
|
-
if (
|
|
11954
|
+
if (typescript_default.isExportDeclaration(node)) {
|
|
11914
11955
|
this.extractExportDeclaration(node, exports);
|
|
11915
|
-
} else if (
|
|
11956
|
+
} else if (typescript_default.isExportAssignment(node)) {
|
|
11916
11957
|
exports.push({
|
|
11917
11958
|
name: this.getExportAssignmentName(node),
|
|
11918
11959
|
type: "unknown",
|
|
@@ -11920,7 +11961,7 @@ var init_typescript_parser = __esm({
|
|
|
11920
11961
|
isReexport: false,
|
|
11921
11962
|
sourceModule: void 0
|
|
11922
11963
|
});
|
|
11923
|
-
} else if (
|
|
11964
|
+
} else if (typescript_default.isFunctionDeclaration(node) && node.name && this.hasExportModifier(node)) {
|
|
11924
11965
|
exports.push({
|
|
11925
11966
|
name: node.name.text,
|
|
11926
11967
|
type: "function",
|
|
@@ -11928,7 +11969,7 @@ var init_typescript_parser = __esm({
|
|
|
11928
11969
|
isReexport: false,
|
|
11929
11970
|
sourceModule: void 0
|
|
11930
11971
|
});
|
|
11931
|
-
} else if (
|
|
11972
|
+
} else if (typescript_default.isClassDeclaration(node) && node.name && this.hasExportModifier(node)) {
|
|
11932
11973
|
exports.push({
|
|
11933
11974
|
name: node.name.text,
|
|
11934
11975
|
type: "class",
|
|
@@ -11936,9 +11977,9 @@ var init_typescript_parser = __esm({
|
|
|
11936
11977
|
isReexport: false,
|
|
11937
11978
|
sourceModule: void 0
|
|
11938
11979
|
});
|
|
11939
|
-
} else if (
|
|
11980
|
+
} else if (typescript_default.isVariableStatement(node) && this.hasExportModifier(node)) {
|
|
11940
11981
|
for (const declaration of node.declarationList.declarations) {
|
|
11941
|
-
if (
|
|
11982
|
+
if (typescript_default.isIdentifier(declaration.name)) {
|
|
11942
11983
|
exports.push({
|
|
11943
11984
|
name: declaration.name.text,
|
|
11944
11985
|
type: "variable",
|
|
@@ -11948,7 +11989,7 @@ var init_typescript_parser = __esm({
|
|
|
11948
11989
|
});
|
|
11949
11990
|
}
|
|
11950
11991
|
}
|
|
11951
|
-
} else if (
|
|
11992
|
+
} else if (typescript_default.isInterfaceDeclaration(node) && this.hasExportModifier(node)) {
|
|
11952
11993
|
exports.push({
|
|
11953
11994
|
name: node.name.text,
|
|
11954
11995
|
type: "interface",
|
|
@@ -11956,7 +11997,7 @@ var init_typescript_parser = __esm({
|
|
|
11956
11997
|
isReexport: false,
|
|
11957
11998
|
sourceModule: void 0
|
|
11958
11999
|
});
|
|
11959
|
-
} else if (
|
|
12000
|
+
} else if (typescript_default.isTypeAliasDeclaration(node) && this.hasExportModifier(node)) {
|
|
11960
12001
|
exports.push({
|
|
11961
12002
|
name: node.name.text,
|
|
11962
12003
|
type: "type",
|
|
@@ -11964,7 +12005,7 @@ var init_typescript_parser = __esm({
|
|
|
11964
12005
|
isReexport: false,
|
|
11965
12006
|
sourceModule: void 0
|
|
11966
12007
|
});
|
|
11967
|
-
} else if (
|
|
12008
|
+
} else if (typescript_default.isEnumDeclaration(node) && this.hasExportModifier(node)) {
|
|
11968
12009
|
exports.push({
|
|
11969
12010
|
name: node.name.text,
|
|
11970
12011
|
type: "enum",
|
|
@@ -11973,9 +12014,9 @@ var init_typescript_parser = __esm({
|
|
|
11973
12014
|
sourceModule: void 0
|
|
11974
12015
|
});
|
|
11975
12016
|
}
|
|
11976
|
-
|
|
12017
|
+
typescript_default.forEachChild(node, visit);
|
|
11977
12018
|
};
|
|
11978
|
-
|
|
12019
|
+
typescript_default.forEachChild(ast, visit);
|
|
11979
12020
|
return exports;
|
|
11980
12021
|
}
|
|
11981
12022
|
/**
|
|
@@ -11984,12 +12025,12 @@ var init_typescript_parser = __esm({
|
|
|
11984
12025
|
extractInterfaces(ast) {
|
|
11985
12026
|
const interfaces = [];
|
|
11986
12027
|
const visit = (node) => {
|
|
11987
|
-
if (
|
|
12028
|
+
if (typescript_default.isInterfaceDeclaration(node)) {
|
|
11988
12029
|
interfaces.push(this.extractInterfaceDeclaration(node, ast));
|
|
11989
12030
|
}
|
|
11990
|
-
|
|
12031
|
+
typescript_default.forEachChild(node, visit);
|
|
11991
12032
|
};
|
|
11992
|
-
|
|
12033
|
+
typescript_default.forEachChild(ast, visit);
|
|
11993
12034
|
return interfaces;
|
|
11994
12035
|
}
|
|
11995
12036
|
/**
|
|
@@ -12045,11 +12086,11 @@ var init_typescript_parser = __esm({
|
|
|
12045
12086
|
// Private Helper Methods
|
|
12046
12087
|
// ============================================================================
|
|
12047
12088
|
getScriptKind(filePath) {
|
|
12048
|
-
if (filePath.endsWith(".tsx")) return
|
|
12049
|
-
if (filePath.endsWith(".ts")) return
|
|
12050
|
-
if (filePath.endsWith(".jsx")) return
|
|
12051
|
-
if (filePath.endsWith(".js")) return
|
|
12052
|
-
return
|
|
12089
|
+
if (filePath.endsWith(".tsx")) return typescript_default.ScriptKind.TSX;
|
|
12090
|
+
if (filePath.endsWith(".ts")) return typescript_default.ScriptKind.TS;
|
|
12091
|
+
if (filePath.endsWith(".jsx")) return typescript_default.ScriptKind.JSX;
|
|
12092
|
+
if (filePath.endsWith(".js")) return typescript_default.ScriptKind.JS;
|
|
12093
|
+
return typescript_default.ScriptKind.TS;
|
|
12053
12094
|
}
|
|
12054
12095
|
extractFunctionDeclaration(node, sourceFile) {
|
|
12055
12096
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
@@ -12068,7 +12109,7 @@ var init_typescript_parser = __esm({
|
|
|
12068
12109
|
}
|
|
12069
12110
|
extractArrowFunctions(node, sourceFile, functions) {
|
|
12070
12111
|
for (const declaration of node.declarationList.declarations) {
|
|
12071
|
-
if (
|
|
12112
|
+
if (typescript_default.isIdentifier(declaration.name) && declaration.initializer && typescript_default.isArrowFunction(declaration.initializer)) {
|
|
12072
12113
|
const arrow = declaration.initializer;
|
|
12073
12114
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
|
12074
12115
|
const { line: endLine } = sourceFile.getLineAndCharacterOfPosition(node.getEnd());
|
|
@@ -12092,11 +12133,11 @@ var init_typescript_parser = __esm({
|
|
|
12092
12133
|
const methods = [];
|
|
12093
12134
|
const properties = [];
|
|
12094
12135
|
for (const member of node.members) {
|
|
12095
|
-
if (
|
|
12136
|
+
if (typescript_default.isMethodDeclaration(member) && member.name) {
|
|
12096
12137
|
methods.push(this.extractMethodDeclaration(member, sourceFile));
|
|
12097
|
-
} else if (
|
|
12138
|
+
} else if (typescript_default.isPropertyDeclaration(member) && member.name) {
|
|
12098
12139
|
properties.push(this.extractPropertyDeclaration(member, sourceFile));
|
|
12099
|
-
} else if (
|
|
12140
|
+
} else if (typescript_default.isConstructorDeclaration(member)) {
|
|
12100
12141
|
methods.push(this.extractConstructor(member, sourceFile));
|
|
12101
12142
|
this.extractParameterProperties(member, properties, sourceFile);
|
|
12102
12143
|
}
|
|
@@ -12105,9 +12146,9 @@ var init_typescript_parser = __esm({
|
|
|
12105
12146
|
const implementsClause = [];
|
|
12106
12147
|
if (node.heritageClauses) {
|
|
12107
12148
|
for (const clause of node.heritageClauses) {
|
|
12108
|
-
if (clause.token ===
|
|
12149
|
+
if (clause.token === typescript_default.SyntaxKind.ExtendsKeyword) {
|
|
12109
12150
|
extendsClause = clause.types[0]?.expression.getText(sourceFile);
|
|
12110
|
-
} else if (clause.token ===
|
|
12151
|
+
} else if (clause.token === typescript_default.SyntaxKind.ImplementsKeyword) {
|
|
12111
12152
|
for (const type of clause.types) {
|
|
12112
12153
|
implementsClause.push(type.expression.getText(sourceFile));
|
|
12113
12154
|
}
|
|
@@ -12161,7 +12202,7 @@ var init_typescript_parser = __esm({
|
|
|
12161
12202
|
for (const param of node.parameters) {
|
|
12162
12203
|
if (this.isParameterProperty(param)) {
|
|
12163
12204
|
properties.push({
|
|
12164
|
-
name:
|
|
12205
|
+
name: typescript_default.isIdentifier(param.name) ? param.name.text : param.name.getText(sourceFile),
|
|
12165
12206
|
type: param.type ? param.type.getText(sourceFile) : void 0,
|
|
12166
12207
|
isStatic: false,
|
|
12167
12208
|
isReadonly: this.hasReadonlyModifier(param),
|
|
@@ -12173,7 +12214,7 @@ var init_typescript_parser = __esm({
|
|
|
12173
12214
|
}
|
|
12174
12215
|
isParameterProperty(param) {
|
|
12175
12216
|
return !!param.modifiers?.some(
|
|
12176
|
-
(m74) => m74.kind ===
|
|
12217
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.PublicKeyword || m74.kind === typescript_default.SyntaxKind.PrivateKeyword || m74.kind === typescript_default.SyntaxKind.ProtectedKeyword || m74.kind === typescript_default.SyntaxKind.ReadonlyKeyword
|
|
12177
12218
|
);
|
|
12178
12219
|
}
|
|
12179
12220
|
extractPropertyDeclaration(node, sourceFile) {
|
|
@@ -12197,9 +12238,9 @@ var init_typescript_parser = __esm({
|
|
|
12197
12238
|
defaultImport = node.importClause.name.text;
|
|
12198
12239
|
}
|
|
12199
12240
|
if (node.importClause.namedBindings) {
|
|
12200
|
-
if (
|
|
12241
|
+
if (typescript_default.isNamespaceImport(node.importClause.namedBindings)) {
|
|
12201
12242
|
namespaceImport = node.importClause.namedBindings.name.text;
|
|
12202
|
-
} else if (
|
|
12243
|
+
} else if (typescript_default.isNamedImports(node.importClause.namedBindings)) {
|
|
12203
12244
|
for (const element of node.importClause.namedBindings.elements) {
|
|
12204
12245
|
namedImports.push({
|
|
12205
12246
|
name: element.propertyName?.text ?? element.name.text,
|
|
@@ -12219,7 +12260,7 @@ var init_typescript_parser = __esm({
|
|
|
12219
12260
|
}
|
|
12220
12261
|
extractExportDeclaration(node, exports) {
|
|
12221
12262
|
const sourceModule = node.moduleSpecifier ? node.moduleSpecifier.text : void 0;
|
|
12222
|
-
if (node.exportClause &&
|
|
12263
|
+
if (node.exportClause && typescript_default.isNamedExports(node.exportClause)) {
|
|
12223
12264
|
for (const element of node.exportClause.elements) {
|
|
12224
12265
|
exports.push({
|
|
12225
12266
|
name: element.name.text,
|
|
@@ -12245,14 +12286,14 @@ var init_typescript_parser = __esm({
|
|
|
12245
12286
|
const properties = [];
|
|
12246
12287
|
const methods = [];
|
|
12247
12288
|
for (const member of node.members) {
|
|
12248
|
-
if (
|
|
12289
|
+
if (typescript_default.isPropertySignature(member) && member.name) {
|
|
12249
12290
|
properties.push({
|
|
12250
12291
|
name: this.getPropertyName(member.name, sourceFile),
|
|
12251
12292
|
type: member.type ? member.type.getText(sourceFile) : void 0,
|
|
12252
12293
|
isOptional: !!member.questionToken,
|
|
12253
12294
|
isReadonly: this.hasReadonlyModifier(member)
|
|
12254
12295
|
});
|
|
12255
|
-
} else if (
|
|
12296
|
+
} else if (typescript_default.isMethodSignature(member) && member.name) {
|
|
12256
12297
|
methods.push({
|
|
12257
12298
|
name: this.getPropertyName(member.name, sourceFile),
|
|
12258
12299
|
parameters: this.extractParameters(member.parameters),
|
|
@@ -12264,7 +12305,7 @@ var init_typescript_parser = __esm({
|
|
|
12264
12305
|
const extendsClause = [];
|
|
12265
12306
|
if (node.heritageClauses) {
|
|
12266
12307
|
for (const clause of node.heritageClauses) {
|
|
12267
|
-
if (clause.token ===
|
|
12308
|
+
if (clause.token === typescript_default.SyntaxKind.ExtendsKeyword) {
|
|
12268
12309
|
for (const type of clause.types) {
|
|
12269
12310
|
extendsClause.push(type.expression.getText(sourceFile));
|
|
12270
12311
|
}
|
|
@@ -12286,7 +12327,7 @@ var init_typescript_parser = __esm({
|
|
|
12286
12327
|
return parameters.map((param) => {
|
|
12287
12328
|
const sourceFile = param.getSourceFile();
|
|
12288
12329
|
return {
|
|
12289
|
-
name:
|
|
12330
|
+
name: typescript_default.isIdentifier(param.name) ? param.name.text : param.name.getText(sourceFile),
|
|
12290
12331
|
type: param.type ? param.type.getText(sourceFile) : void 0,
|
|
12291
12332
|
isOptional: !!param.questionToken || !!param.initializer,
|
|
12292
12333
|
isRest: !!param.dotDotDotToken,
|
|
@@ -12299,49 +12340,49 @@ var init_typescript_parser = __esm({
|
|
|
12299
12340
|
return typeParams.map((tp) => tp.name.text);
|
|
12300
12341
|
}
|
|
12301
12342
|
getPropertyName(name, sourceFile) {
|
|
12302
|
-
if (
|
|
12343
|
+
if (typescript_default.isIdentifier(name)) {
|
|
12303
12344
|
return name.text;
|
|
12304
12345
|
}
|
|
12305
|
-
if (
|
|
12346
|
+
if (typescript_default.isStringLiteral(name)) {
|
|
12306
12347
|
return name.text;
|
|
12307
12348
|
}
|
|
12308
|
-
if (
|
|
12349
|
+
if (typescript_default.isNumericLiteral(name)) {
|
|
12309
12350
|
return name.text;
|
|
12310
12351
|
}
|
|
12311
12352
|
return name.getText(sourceFile);
|
|
12312
12353
|
}
|
|
12313
12354
|
getExportAssignmentName(node) {
|
|
12314
|
-
if (
|
|
12355
|
+
if (typescript_default.isIdentifier(node.expression)) {
|
|
12315
12356
|
return node.expression.text;
|
|
12316
12357
|
}
|
|
12317
12358
|
return "default";
|
|
12318
12359
|
}
|
|
12319
12360
|
hasExportModifier(node) {
|
|
12320
|
-
return
|
|
12361
|
+
return typescript_default.canHaveModifiers(node) && !!typescript_default.getModifiers(node)?.some((m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword);
|
|
12321
12362
|
}
|
|
12322
12363
|
hasDefaultModifier(node) {
|
|
12323
|
-
return
|
|
12364
|
+
return typescript_default.canHaveModifiers(node) && !!typescript_default.getModifiers(node)?.some((m74) => m74.kind === typescript_default.SyntaxKind.DefaultKeyword);
|
|
12324
12365
|
}
|
|
12325
12366
|
hasAsyncModifier(node) {
|
|
12326
|
-
return
|
|
12367
|
+
return typescript_default.canHaveModifiers(node) && !!typescript_default.getModifiers(node)?.some((m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword);
|
|
12327
12368
|
}
|
|
12328
12369
|
hasStaticModifier(node) {
|
|
12329
|
-
return
|
|
12370
|
+
return typescript_default.canHaveModifiers(node) && !!typescript_default.getModifiers(node)?.some((m74) => m74.kind === typescript_default.SyntaxKind.StaticKeyword);
|
|
12330
12371
|
}
|
|
12331
12372
|
hasAbstractModifier(node) {
|
|
12332
|
-
return
|
|
12373
|
+
return typescript_default.canHaveModifiers(node) && !!typescript_default.getModifiers(node)?.some((m74) => m74.kind === typescript_default.SyntaxKind.AbstractKeyword);
|
|
12333
12374
|
}
|
|
12334
12375
|
hasReadonlyModifier(node) {
|
|
12335
|
-
return
|
|
12376
|
+
return typescript_default.canHaveModifiers(node) && !!typescript_default.getModifiers(node)?.some((m74) => m74.kind === typescript_default.SyntaxKind.ReadonlyKeyword);
|
|
12336
12377
|
}
|
|
12337
12378
|
getVisibility(node) {
|
|
12338
|
-
if (!
|
|
12339
|
-
const modifiers =
|
|
12379
|
+
if (!typescript_default.canHaveModifiers(node)) return "public";
|
|
12380
|
+
const modifiers = typescript_default.getModifiers(node);
|
|
12340
12381
|
if (!modifiers) return "public";
|
|
12341
|
-
if (modifiers.some((m74) => m74.kind ===
|
|
12382
|
+
if (modifiers.some((m74) => m74.kind === typescript_default.SyntaxKind.PrivateKeyword)) {
|
|
12342
12383
|
return "private";
|
|
12343
12384
|
}
|
|
12344
|
-
if (modifiers.some((m74) => m74.kind ===
|
|
12385
|
+
if (modifiers.some((m74) => m74.kind === typescript_default.SyntaxKind.ProtectedKeyword)) {
|
|
12345
12386
|
return "protected";
|
|
12346
12387
|
}
|
|
12347
12388
|
return "public";
|
|
@@ -20067,8 +20108,8 @@ var init_kiro_installer = __esm({
|
|
|
20067
20108
|
continue;
|
|
20068
20109
|
}
|
|
20069
20110
|
try {
|
|
20070
|
-
const
|
|
20071
|
-
const parsed = this.parseYamlAgent(
|
|
20111
|
+
const yaml3 = readFileSync21(join33(sourceDir, file), "utf-8");
|
|
20112
|
+
const parsed = this.parseYamlAgent(yaml3);
|
|
20072
20113
|
const kiroAgent = this.convertToKiroAgent(parsed);
|
|
20073
20114
|
writeFileSync13(targetFile, JSON.stringify(kiroAgent, null, 2) + "\n");
|
|
20074
20115
|
installed.push(name);
|
|
@@ -20144,19 +20185,19 @@ var init_kiro_installer = __esm({
|
|
|
20144
20185
|
includeMcpJson: true
|
|
20145
20186
|
};
|
|
20146
20187
|
}
|
|
20147
|
-
parseYamlAgent(
|
|
20188
|
+
parseYamlAgent(yaml3) {
|
|
20148
20189
|
const get = (key) => {
|
|
20149
20190
|
const re18 = new RegExp(`^${key}:\\s*(?:"([^"]*)"|(.*))`, "m");
|
|
20150
|
-
const m74 =
|
|
20191
|
+
const m74 = yaml3.match(re18);
|
|
20151
20192
|
return m74 ? (m74[1] ?? m74[2] ?? "").trim() : "";
|
|
20152
20193
|
};
|
|
20153
20194
|
let systemPrompt = "";
|
|
20154
|
-
const promptMatch =
|
|
20195
|
+
const promptMatch = yaml3.match(/^systemPrompt:\s*\|\s*\n([\s\S]*?)(?=\n\w|\n$)/m);
|
|
20155
20196
|
if (promptMatch) {
|
|
20156
20197
|
systemPrompt = promptMatch[1].split("\n").map((l75) => l75.replace(/^ {2}/, "")).join("\n").trim();
|
|
20157
20198
|
}
|
|
20158
20199
|
const tools = [];
|
|
20159
|
-
const toolsMatch =
|
|
20200
|
+
const toolsMatch = yaml3.match(/^tools:\s*\n((?:\s+-\s+.*\n?)*)/m);
|
|
20160
20201
|
if (toolsMatch) {
|
|
20161
20202
|
const lines = toolsMatch[1].split("\n");
|
|
20162
20203
|
for (const line of lines) {
|
|
@@ -20165,7 +20206,7 @@ var init_kiro_installer = __esm({
|
|
|
20165
20206
|
}
|
|
20166
20207
|
}
|
|
20167
20208
|
const permissions = {};
|
|
20168
|
-
const permMatch =
|
|
20209
|
+
const permMatch = yaml3.match(/^permissions:\s*\n((?:\s+.*\n?)*)/m);
|
|
20169
20210
|
if (permMatch) {
|
|
20170
20211
|
const lines = permMatch[1].split("\n");
|
|
20171
20212
|
for (const line of lines) {
|
|
@@ -20286,8 +20327,8 @@ var init_kiro_installer = __esm({
|
|
|
20286
20327
|
} else {
|
|
20287
20328
|
const yamlPath = join33(openCodeSkillsDir, `${skillName}.yaml`);
|
|
20288
20329
|
if (existsSync29(yamlPath)) {
|
|
20289
|
-
const
|
|
20290
|
-
const parsed = this.parseYamlSkill(
|
|
20330
|
+
const yaml3 = readFileSync21(yamlPath, "utf-8");
|
|
20331
|
+
const parsed = this.parseYamlSkill(yaml3);
|
|
20291
20332
|
const markdown = this.convertToSkillMd(parsed);
|
|
20292
20333
|
mkdirSync15(kiroSkillDir, { recursive: true });
|
|
20293
20334
|
writeFileSync13(targetFile, markdown, { mode: 420 });
|
|
@@ -20353,19 +20394,19 @@ ${claudeContent}`;
|
|
|
20353
20394
|
return `${kiroFrontmatter}
|
|
20354
20395
|
${body}`;
|
|
20355
20396
|
}
|
|
20356
|
-
parseYamlSkill(
|
|
20397
|
+
parseYamlSkill(yaml3) {
|
|
20357
20398
|
const get = (key) => {
|
|
20358
20399
|
const re18 = new RegExp(`^${key}:\\s*(?:"([^"]*)"|(.*))`, "m");
|
|
20359
|
-
const m74 =
|
|
20400
|
+
const m74 = yaml3.match(re18);
|
|
20360
20401
|
return m74 ? (m74[1] ?? m74[2] ?? "").trim() : "";
|
|
20361
20402
|
};
|
|
20362
20403
|
const tags = [];
|
|
20363
|
-
const tagsMatch =
|
|
20404
|
+
const tagsMatch = yaml3.match(/^tags:\s*\[([^\]]*)\]/m);
|
|
20364
20405
|
if (tagsMatch) {
|
|
20365
20406
|
tags.push(...tagsMatch[1].split(",").map((t50) => t50.trim().replace(/^"|"$/g, "")));
|
|
20366
20407
|
}
|
|
20367
20408
|
const steps = [];
|
|
20368
|
-
const stepsMatch =
|
|
20409
|
+
const stepsMatch = yaml3.match(/^steps:\s*\n([\s\S]*)$/m);
|
|
20369
20410
|
if (stepsMatch) {
|
|
20370
20411
|
const rawBlocks = stepsMatch[1].split(/\n\s*-\s+name:\s*/);
|
|
20371
20412
|
for (const block of rawBlocks) {
|
|
@@ -22103,11 +22144,11 @@ __export(rvf_node_exports, {
|
|
|
22103
22144
|
init: () => init6,
|
|
22104
22145
|
pipeline: () => pipeline7
|
|
22105
22146
|
});
|
|
22106
|
-
import { createRequire as
|
|
22147
|
+
import { createRequire as createRequire7 } from "module";
|
|
22107
22148
|
var __require7, __mod6, rvf_node_default, RuvectorLayer6, TensorCompress6, differentiableSearch6, hierarchicalForward6, getCompressionLevel6, init6, FlashAttention6, DotProductAttention6, MultiHeadAttention6, HyperbolicAttention6, LinearAttention6, MoEAttention6, SonaEngine6, pipeline7;
|
|
22108
22149
|
var init_rvf_node = __esm({
|
|
22109
22150
|
"native-require:@ruvector/rvf-node"() {
|
|
22110
|
-
__require7 =
|
|
22151
|
+
__require7 = createRequire7(import.meta.url);
|
|
22111
22152
|
__mod6 = __require7("@ruvector/rvf-node");
|
|
22112
22153
|
rvf_node_default = __mod6;
|
|
22113
22154
|
({
|
|
@@ -22610,8 +22651,8 @@ var init_base = __esm({
|
|
|
22610
22651
|
/**
|
|
22611
22652
|
* Set logger for this tool
|
|
22612
22653
|
*/
|
|
22613
|
-
setLogger(
|
|
22614
|
-
this.logger =
|
|
22654
|
+
setLogger(logger25) {
|
|
22655
|
+
this.logger = logger25;
|
|
22615
22656
|
}
|
|
22616
22657
|
/**
|
|
22617
22658
|
* Mark result as coming from demo/sample data
|
|
@@ -27237,11 +27278,11 @@ __export(hnswlib_node_exports, {
|
|
|
27237
27278
|
init: () => init7,
|
|
27238
27279
|
pipeline: () => pipeline8
|
|
27239
27280
|
});
|
|
27240
|
-
import { createRequire as
|
|
27281
|
+
import { createRequire as createRequire8 } from "module";
|
|
27241
27282
|
var __require8, __mod7, hnswlib_node_default, RuvectorLayer7, TensorCompress7, differentiableSearch7, hierarchicalForward7, getCompressionLevel7, init7, FlashAttention7, DotProductAttention7, MultiHeadAttention7, HyperbolicAttention7, LinearAttention7, MoEAttention7, SonaEngine7, pipeline8;
|
|
27242
27283
|
var init_hnswlib_node = __esm({
|
|
27243
27284
|
"native-require:hnswlib-node"() {
|
|
27244
|
-
__require8 =
|
|
27285
|
+
__require8 = createRequire8(import.meta.url);
|
|
27245
27286
|
__mod7 = __require8("hnswlib-node");
|
|
27246
27287
|
hnswlib_node_default = __mod7;
|
|
27247
27288
|
({
|
|
@@ -27292,7 +27333,7 @@ __export(qe_reasoning_bank_exports, {
|
|
|
27292
27333
|
function createQEReasoningBank(memory, eventBus, config, coherenceService) {
|
|
27293
27334
|
return new QEReasoningBank(memory, eventBus, config, coherenceService);
|
|
27294
27335
|
}
|
|
27295
|
-
var
|
|
27336
|
+
var logger23, DEFAULT_QE_REASONING_BANK_CONFIG, QEReasoningBank;
|
|
27296
27337
|
var init_qe_reasoning_bank = __esm({
|
|
27297
27338
|
"src/learning/qe-reasoning-bank.ts"() {
|
|
27298
27339
|
"use strict";
|
|
@@ -27306,7 +27347,7 @@ var init_qe_reasoning_bank = __esm({
|
|
|
27306
27347
|
init_witness_chain();
|
|
27307
27348
|
init_qe_patterns();
|
|
27308
27349
|
init_qe_guidance();
|
|
27309
|
-
|
|
27350
|
+
logger23 = LoggerFactory.create("QEReasoningBank");
|
|
27310
27351
|
DEFAULT_QE_REASONING_BANK_CONFIG = {
|
|
27311
27352
|
enableLearning: true,
|
|
27312
27353
|
enableGuidance: true,
|
|
@@ -27351,7 +27392,7 @@ var init_qe_reasoning_bank = __esm({
|
|
|
27351
27392
|
if (!this.sqliteStore) {
|
|
27352
27393
|
this.sqliteStore = createSQLitePatternStore();
|
|
27353
27394
|
this.sqliteStore.initialize().catch((e20) => {
|
|
27354
|
-
|
|
27395
|
+
logger23.warn("SQLitePatternStore init failed", { error: toErrorMessage(e20) });
|
|
27355
27396
|
});
|
|
27356
27397
|
}
|
|
27357
27398
|
return this.sqliteStore;
|
|
@@ -27439,7 +27480,7 @@ var init_qe_reasoning_bank = __esm({
|
|
|
27439
27480
|
await store.initialize();
|
|
27440
27481
|
this.patternStore.setSqliteStore(store);
|
|
27441
27482
|
} catch (e20) {
|
|
27442
|
-
|
|
27483
|
+
logger23.warn("Failed to wire SQLitePatternStore into PatternStore", { error: toErrorMessage(e20) });
|
|
27443
27484
|
}
|
|
27444
27485
|
await this.loadPretrainedPatterns();
|
|
27445
27486
|
this.initialized = true;
|
|
@@ -27451,12 +27492,12 @@ var init_qe_reasoning_bank = __esm({
|
|
|
27451
27492
|
await this.seedCrossDomainPatterns();
|
|
27452
27493
|
} else {
|
|
27453
27494
|
const stats = await this.patternStore.getStats();
|
|
27454
|
-
|
|
27495
|
+
logger23.info("Cross-domain transfer already complete", { totalPatterns: stats.totalPatterns });
|
|
27455
27496
|
}
|
|
27456
27497
|
} catch (error) {
|
|
27457
|
-
|
|
27498
|
+
logger23.warn("Cross-domain seeding failed (non-fatal)", { error });
|
|
27458
27499
|
}
|
|
27459
|
-
|
|
27500
|
+
logger23.info("Initialized");
|
|
27460
27501
|
}
|
|
27461
27502
|
/**
|
|
27462
27503
|
* Load pre-trained patterns for common QE scenarios
|
|
@@ -27464,7 +27505,7 @@ var init_qe_reasoning_bank = __esm({
|
|
|
27464
27505
|
async loadPretrainedPatterns() {
|
|
27465
27506
|
const stats = await this.patternStore.getStats();
|
|
27466
27507
|
if (stats.totalPatterns > 0) {
|
|
27467
|
-
|
|
27508
|
+
logger23.info("Found existing patterns", { totalPatterns: stats.totalPatterns });
|
|
27468
27509
|
return;
|
|
27469
27510
|
}
|
|
27470
27511
|
const foundationalPatterns = [
|
|
@@ -28182,10 +28223,10 @@ On promotion:
|
|
|
28182
28223
|
try {
|
|
28183
28224
|
await this.patternStore.create(options);
|
|
28184
28225
|
} catch (error) {
|
|
28185
|
-
|
|
28226
|
+
logger23.warn("Failed to load pattern", { name: options.name, error });
|
|
28186
28227
|
}
|
|
28187
28228
|
}
|
|
28188
|
-
|
|
28229
|
+
logger23.info("Loaded foundational patterns", { count: foundationalPatterns.length });
|
|
28189
28230
|
}
|
|
28190
28231
|
/**
|
|
28191
28232
|
* Seed cross-domain patterns by transferring generalizable patterns
|
|
@@ -28268,7 +28309,7 @@ On promotion:
|
|
|
28268
28309
|
}
|
|
28269
28310
|
}
|
|
28270
28311
|
}
|
|
28271
|
-
|
|
28312
|
+
logger23.info("Cross-domain transfer complete", { transferred, skipped });
|
|
28272
28313
|
return { transferred, skipped };
|
|
28273
28314
|
}
|
|
28274
28315
|
/**
|
|
@@ -28295,7 +28336,7 @@ On promotion:
|
|
|
28295
28336
|
try {
|
|
28296
28337
|
this.rvfDualWriter.writePattern(result.value.id, result.value.embedding);
|
|
28297
28338
|
} catch (rvfErr) {
|
|
28298
|
-
|
|
28339
|
+
logger23.warn("RVF dual-write failed (non-fatal)", { patternId: result.value.id, error: toErrorMessage(rvfErr) });
|
|
28299
28340
|
}
|
|
28300
28341
|
}
|
|
28301
28342
|
}
|
|
@@ -28359,7 +28400,7 @@ On promotion:
|
|
|
28359
28400
|
outcome.feedback
|
|
28360
28401
|
);
|
|
28361
28402
|
} catch (persistError) {
|
|
28362
|
-
|
|
28403
|
+
logger23.warn("SQLite pattern usage persist failed", { error: toErrorMessage(persistError) });
|
|
28363
28404
|
}
|
|
28364
28405
|
if (result.success) {
|
|
28365
28406
|
this.stats.learningOutcomes++;
|
|
@@ -28371,7 +28412,7 @@ On promotion:
|
|
|
28371
28412
|
const pattern = await this.getPattern(outcome.patternId);
|
|
28372
28413
|
if (pattern && await this.checkPatternPromotionWithCoherence(pattern)) {
|
|
28373
28414
|
await this.promotePattern(outcome.patternId);
|
|
28374
|
-
|
|
28415
|
+
logger23.info("Pattern promoted to long-term", { name: pattern.name });
|
|
28375
28416
|
}
|
|
28376
28417
|
}
|
|
28377
28418
|
return result;
|
|
@@ -28418,7 +28459,7 @@ On promotion:
|
|
|
28418
28459
|
payload: event
|
|
28419
28460
|
});
|
|
28420
28461
|
}
|
|
28421
|
-
|
|
28462
|
+
logger23.info("Pattern promotion blocked due to coherence violation", {
|
|
28422
28463
|
name: pattern.name,
|
|
28423
28464
|
energy: coherenceResult.energy
|
|
28424
28465
|
});
|
|
@@ -28447,7 +28488,7 @@ On promotion:
|
|
|
28447
28488
|
try {
|
|
28448
28489
|
this.getSqliteStore().promotePattern(patternId);
|
|
28449
28490
|
} catch (e20) {
|
|
28450
|
-
|
|
28491
|
+
logger23.warn("SQLite pattern promotion persist failed", { error: toErrorMessage(e20) });
|
|
28451
28492
|
}
|
|
28452
28493
|
if (this.rvfDualWriter) {
|
|
28453
28494
|
try {
|
|
@@ -28456,12 +28497,12 @@ On promotion:
|
|
|
28456
28497
|
this.rvfDualWriter.writePattern(patternId, promoted.embedding);
|
|
28457
28498
|
}
|
|
28458
28499
|
} catch (rvfErr) {
|
|
28459
|
-
|
|
28500
|
+
logger23.warn("RVF dual-write on promote failed (non-fatal)", { patternId, error: toErrorMessage(rvfErr) });
|
|
28460
28501
|
}
|
|
28461
28502
|
}
|
|
28462
28503
|
getWitnessChain().then((wc) => wc.append("PATTERN_PROMOTE", { patternId }, "reasoning-bank")).catch(() => {
|
|
28463
28504
|
});
|
|
28464
|
-
|
|
28505
|
+
logger23.info("Promoted pattern to long-term", { patternId });
|
|
28465
28506
|
if (this.eventBus) {
|
|
28466
28507
|
await this.eventBus.publish({
|
|
28467
28508
|
id: `pattern-promoted-${patternId}`,
|
|
@@ -28472,7 +28513,7 @@ On promotion:
|
|
|
28472
28513
|
});
|
|
28473
28514
|
}
|
|
28474
28515
|
} else {
|
|
28475
|
-
|
|
28516
|
+
logger23.error("Failed to promote pattern", result.error, { patternId });
|
|
28476
28517
|
}
|
|
28477
28518
|
}
|
|
28478
28519
|
/**
|
|
@@ -28598,7 +28639,7 @@ On promotion:
|
|
|
28598
28639
|
return embedding;
|
|
28599
28640
|
} catch (error) {
|
|
28600
28641
|
if (process.env.DEBUG) {
|
|
28601
|
-
|
|
28642
|
+
logger23.warn("ONNX embeddings unavailable, using hash fallback", {
|
|
28602
28643
|
error: toErrorMessage(error)
|
|
28603
28644
|
});
|
|
28604
28645
|
}
|
|
@@ -28738,11 +28779,11 @@ __export(prime_radiant_advanced_wasm_exports, {
|
|
|
28738
28779
|
init: () => init8,
|
|
28739
28780
|
pipeline: () => pipeline9
|
|
28740
28781
|
});
|
|
28741
|
-
import { createRequire as
|
|
28782
|
+
import { createRequire as createRequire10 } from "module";
|
|
28742
28783
|
var __require9, __mod8, prime_radiant_advanced_wasm_default, RuvectorLayer8, TensorCompress8, differentiableSearch8, hierarchicalForward8, getCompressionLevel8, init8, FlashAttention8, DotProductAttention8, MultiHeadAttention8, HyperbolicAttention8, LinearAttention8, MoEAttention8, SonaEngine8, pipeline9;
|
|
28743
28784
|
var init_prime_radiant_advanced_wasm = __esm({
|
|
28744
28785
|
"native-require:prime-radiant-advanced-wasm"() {
|
|
28745
|
-
__require9 =
|
|
28786
|
+
__require9 = createRequire10(import.meta.url);
|
|
28746
28787
|
__mod8 = __require9("prime-radiant-advanced-wasm");
|
|
28747
28788
|
prime_radiant_advanced_wasm_default = __mod8;
|
|
28748
28789
|
({
|
|
@@ -30600,10 +30641,10 @@ var AllDomainEvents = {
|
|
|
30600
30641
|
|
|
30601
30642
|
// src/domains/test-generation/services/test-generator.ts
|
|
30602
30643
|
init_esm_node();
|
|
30644
|
+
init_typescript();
|
|
30603
30645
|
init_types();
|
|
30604
30646
|
import * as fs4 from "fs";
|
|
30605
30647
|
import * as path5 from "path";
|
|
30606
|
-
import * as ts from "typescript/lib/typescript.js";
|
|
30607
30648
|
|
|
30608
30649
|
// src/domains/test-generation/factories/test-generator-factory.ts
|
|
30609
30650
|
init_test_frameworks();
|
|
@@ -44937,41 +44978,41 @@ ${sourceCode}
|
|
|
44937
44978
|
return PytestGenerator.convertParsedFile(parsed);
|
|
44938
44979
|
}
|
|
44939
44980
|
}
|
|
44940
|
-
const sourceFile =
|
|
44981
|
+
const sourceFile = typescript_default.createSourceFile(
|
|
44941
44982
|
path5.basename(fileName),
|
|
44942
44983
|
content,
|
|
44943
|
-
|
|
44984
|
+
typescript_default.ScriptTarget.Latest,
|
|
44944
44985
|
true,
|
|
44945
|
-
|
|
44986
|
+
typescript_default.ScriptKind.TS
|
|
44946
44987
|
);
|
|
44947
44988
|
const functions = [];
|
|
44948
44989
|
const classes = [];
|
|
44949
44990
|
const visit = (node) => {
|
|
44950
|
-
if (
|
|
44991
|
+
if (typescript_default.isFunctionDeclaration(node) && node.name) {
|
|
44951
44992
|
functions.push(this.extractFunctionInfo(node, sourceFile));
|
|
44952
|
-
} else if (
|
|
44993
|
+
} else if (typescript_default.isVariableStatement(node)) {
|
|
44953
44994
|
for (const declaration of node.declarationList.declarations) {
|
|
44954
|
-
if (
|
|
44995
|
+
if (typescript_default.isVariableDeclaration(declaration) && declaration.initializer && (typescript_default.isArrowFunction(declaration.initializer) || typescript_default.isFunctionExpression(declaration.initializer))) {
|
|
44955
44996
|
const name = declaration.name.getText(sourceFile);
|
|
44956
44997
|
functions.push(
|
|
44957
44998
|
this.extractArrowFunctionInfo(name, declaration.initializer, sourceFile, node)
|
|
44958
44999
|
);
|
|
44959
45000
|
}
|
|
44960
45001
|
}
|
|
44961
|
-
} else if (
|
|
45002
|
+
} else if (typescript_default.isClassDeclaration(node) && node.name) {
|
|
44962
45003
|
classes.push(this.extractClassInfo(node, sourceFile));
|
|
44963
45004
|
}
|
|
44964
|
-
|
|
45005
|
+
typescript_default.forEachChild(node, visit);
|
|
44965
45006
|
};
|
|
44966
|
-
|
|
45007
|
+
typescript_default.forEachChild(sourceFile, visit);
|
|
44967
45008
|
return { functions, classes };
|
|
44968
45009
|
}
|
|
44969
45010
|
extractFunctionInfo(node, sourceFile) {
|
|
44970
45011
|
const name = node.name?.getText(sourceFile) || "anonymous";
|
|
44971
45012
|
const parameters = this.extractParameters(node.parameters, sourceFile);
|
|
44972
45013
|
const returnType = node.type?.getText(sourceFile);
|
|
44973
|
-
const isAsync = node.modifiers?.some((m74) => m74.kind ===
|
|
44974
|
-
const isExported = node.modifiers?.some((m74) => m74.kind ===
|
|
45014
|
+
const isAsync = node.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword) ?? false;
|
|
45015
|
+
const isExported = node.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword) ?? false;
|
|
44975
45016
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile));
|
|
44976
45017
|
const { line: endLine } = sourceFile.getLineAndCharacterOfPosition(node.getEnd());
|
|
44977
45018
|
return {
|
|
@@ -44989,8 +45030,8 @@ ${sourceCode}
|
|
|
44989
45030
|
extractArrowFunctionInfo(name, node, sourceFile, parentNode) {
|
|
44990
45031
|
const parameters = this.extractParameters(node.parameters, sourceFile);
|
|
44991
45032
|
const returnType = node.type?.getText(sourceFile);
|
|
44992
|
-
const isAsync = node.modifiers?.some((m74) => m74.kind ===
|
|
44993
|
-
const isExported =
|
|
45033
|
+
const isAsync = node.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword) ?? false;
|
|
45034
|
+
const isExported = typescript_default.isVariableStatement(parentNode) && (parentNode.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword) ?? false);
|
|
44994
45035
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile));
|
|
44995
45036
|
const { line: endLine } = sourceFile.getLineAndCharacterOfPosition(node.getEnd());
|
|
44996
45037
|
return {
|
|
@@ -45011,13 +45052,13 @@ ${sourceCode}
|
|
|
45011
45052
|
const properties = [];
|
|
45012
45053
|
let hasConstructor = false;
|
|
45013
45054
|
let constructorParams;
|
|
45014
|
-
const isExported = node.modifiers?.some((m74) => m74.kind ===
|
|
45055
|
+
const isExported = node.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword) ?? false;
|
|
45015
45056
|
for (const member of node.members) {
|
|
45016
|
-
if (
|
|
45057
|
+
if (typescript_default.isMethodDeclaration(member)) {
|
|
45017
45058
|
const methodName = member.name.getText(sourceFile);
|
|
45018
45059
|
const parameters = this.extractParameters(member.parameters, sourceFile);
|
|
45019
45060
|
const returnType = member.type?.getText(sourceFile);
|
|
45020
|
-
const isAsync = member.modifiers?.some((m74) => m74.kind ===
|
|
45061
|
+
const isAsync = member.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword) ?? false;
|
|
45021
45062
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(
|
|
45022
45063
|
member.getStart(sourceFile)
|
|
45023
45064
|
);
|
|
@@ -45033,14 +45074,14 @@ ${sourceCode}
|
|
|
45033
45074
|
endLine: endLine + 1,
|
|
45034
45075
|
body: member.body?.getText(sourceFile)
|
|
45035
45076
|
});
|
|
45036
|
-
} else if (
|
|
45077
|
+
} else if (typescript_default.isConstructorDeclaration(member)) {
|
|
45037
45078
|
hasConstructor = true;
|
|
45038
45079
|
constructorParams = this.extractParameters(member.parameters, sourceFile);
|
|
45039
|
-
} else if (
|
|
45080
|
+
} else if (typescript_default.isPropertyDeclaration(member)) {
|
|
45040
45081
|
const propName = member.name.getText(sourceFile);
|
|
45041
45082
|
const propType = member.type?.getText(sourceFile);
|
|
45042
|
-
const isPrivate = member.modifiers?.some((m74) => m74.kind ===
|
|
45043
|
-
const isReadonly = member.modifiers?.some((m74) => m74.kind ===
|
|
45083
|
+
const isPrivate = member.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.PrivateKeyword) ?? false;
|
|
45084
|
+
const isReadonly = member.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.ReadonlyKeyword) ?? false;
|
|
45044
45085
|
properties.push({
|
|
45045
45086
|
name: propName,
|
|
45046
45087
|
type: propType,
|
|
@@ -45064,14 +45105,14 @@ ${sourceCode}
|
|
|
45064
45105
|
return params.map((param) => {
|
|
45065
45106
|
let name = param.name.getText(sourceFile);
|
|
45066
45107
|
let type = param.type?.getText(sourceFile);
|
|
45067
|
-
if (
|
|
45108
|
+
if (typescript_default.isObjectBindingPattern(param.name)) {
|
|
45068
45109
|
objectDestructureCount++;
|
|
45069
45110
|
name = objectDestructureCount > 1 ? `options${objectDestructureCount}` : "options";
|
|
45070
45111
|
if (!type) {
|
|
45071
45112
|
const props = param.name.elements.map((el) => `${el.name.getText(sourceFile)}: unknown`).join(", ");
|
|
45072
45113
|
type = `{ ${props} }`;
|
|
45073
45114
|
}
|
|
45074
|
-
} else if (
|
|
45115
|
+
} else if (typescript_default.isArrayBindingPattern(param.name)) {
|
|
45075
45116
|
arrayDestructureCount++;
|
|
45076
45117
|
name = arrayDestructureCount > 1 ? `items${arrayDestructureCount}` : "items";
|
|
45077
45118
|
if (!type) {
|
|
@@ -45090,28 +45131,28 @@ ${sourceCode}
|
|
|
45090
45131
|
let complexity = 1;
|
|
45091
45132
|
const visit = (n61) => {
|
|
45092
45133
|
switch (n61.kind) {
|
|
45093
|
-
case
|
|
45094
|
-
case
|
|
45095
|
-
case
|
|
45096
|
-
case
|
|
45097
|
-
case
|
|
45098
|
-
case
|
|
45099
|
-
case
|
|
45100
|
-
case
|
|
45101
|
-
case
|
|
45134
|
+
case typescript_default.SyntaxKind.IfStatement:
|
|
45135
|
+
case typescript_default.SyntaxKind.ForStatement:
|
|
45136
|
+
case typescript_default.SyntaxKind.ForInStatement:
|
|
45137
|
+
case typescript_default.SyntaxKind.ForOfStatement:
|
|
45138
|
+
case typescript_default.SyntaxKind.WhileStatement:
|
|
45139
|
+
case typescript_default.SyntaxKind.DoStatement:
|
|
45140
|
+
case typescript_default.SyntaxKind.CaseClause:
|
|
45141
|
+
case typescript_default.SyntaxKind.CatchClause:
|
|
45142
|
+
case typescript_default.SyntaxKind.ConditionalExpression:
|
|
45102
45143
|
complexity++;
|
|
45103
45144
|
break;
|
|
45104
|
-
case
|
|
45145
|
+
case typescript_default.SyntaxKind.BinaryExpression: {
|
|
45105
45146
|
const binary = n61;
|
|
45106
|
-
if (binary.operatorToken.kind ===
|
|
45147
|
+
if (binary.operatorToken.kind === typescript_default.SyntaxKind.AmpersandAmpersandToken || binary.operatorToken.kind === typescript_default.SyntaxKind.BarBarToken) {
|
|
45107
45148
|
complexity++;
|
|
45108
45149
|
}
|
|
45109
45150
|
break;
|
|
45110
45151
|
}
|
|
45111
45152
|
}
|
|
45112
|
-
|
|
45153
|
+
typescript_default.forEachChild(n61, visit);
|
|
45113
45154
|
};
|
|
45114
|
-
|
|
45155
|
+
typescript_default.forEachChild(node, visit);
|
|
45115
45156
|
return complexity;
|
|
45116
45157
|
}
|
|
45117
45158
|
// ============================================================================
|
|
@@ -45378,10 +45419,10 @@ function createTestGeneratorService(memory, config = {}) {
|
|
|
45378
45419
|
|
|
45379
45420
|
// src/domains/test-generation/services/pattern-matcher.ts
|
|
45380
45421
|
init_esm_node();
|
|
45422
|
+
init_typescript();
|
|
45381
45423
|
init_types();
|
|
45382
45424
|
init_embeddings();
|
|
45383
45425
|
init_error_utils();
|
|
45384
|
-
import * as ts2 from "typescript/lib/typescript.js";
|
|
45385
45426
|
import * as fs5 from "fs";
|
|
45386
45427
|
import * as path6 from "path";
|
|
45387
45428
|
var DEFAULT_CONFIG5 = {
|
|
@@ -46362,12 +46403,12 @@ var TypeScriptASTParser = class {
|
|
|
46362
46403
|
} else {
|
|
46363
46404
|
this.sourceCode = fs5.readFileSync(filePath, "utf-8");
|
|
46364
46405
|
}
|
|
46365
|
-
this.sourceFile =
|
|
46406
|
+
this.sourceFile = typescript_default.createSourceFile(
|
|
46366
46407
|
path6.basename(filePath),
|
|
46367
46408
|
this.sourceCode,
|
|
46368
|
-
|
|
46409
|
+
typescript_default.ScriptTarget.Latest,
|
|
46369
46410
|
true,
|
|
46370
|
-
|
|
46411
|
+
typescript_default.ScriptKind.TS
|
|
46371
46412
|
);
|
|
46372
46413
|
return this.sourceFile;
|
|
46373
46414
|
}
|
|
@@ -46376,12 +46417,12 @@ var TypeScriptASTParser = class {
|
|
|
46376
46417
|
*/
|
|
46377
46418
|
parseSource(source, fileName = "module.ts") {
|
|
46378
46419
|
this.sourceCode = source;
|
|
46379
|
-
this.sourceFile =
|
|
46420
|
+
this.sourceFile = typescript_default.createSourceFile(
|
|
46380
46421
|
fileName,
|
|
46381
46422
|
source,
|
|
46382
|
-
|
|
46423
|
+
typescript_default.ScriptTarget.Latest,
|
|
46383
46424
|
true,
|
|
46384
|
-
|
|
46425
|
+
typescript_default.ScriptKind.TS
|
|
46385
46426
|
);
|
|
46386
46427
|
return this.sourceFile;
|
|
46387
46428
|
}
|
|
@@ -46391,11 +46432,11 @@ var TypeScriptASTParser = class {
|
|
|
46391
46432
|
extractFunctions(sourceFile) {
|
|
46392
46433
|
const functions = [];
|
|
46393
46434
|
const visit = (node) => {
|
|
46394
|
-
if (
|
|
46435
|
+
if (typescript_default.isFunctionDeclaration(node) && node.name) {
|
|
46395
46436
|
functions.push(this.extractFunctionInfo(node, sourceFile));
|
|
46396
|
-
} else if (
|
|
46437
|
+
} else if (typescript_default.isVariableStatement(node)) {
|
|
46397
46438
|
for (const declaration of node.declarationList.declarations) {
|
|
46398
|
-
if (
|
|
46439
|
+
if (typescript_default.isVariableDeclaration(declaration) && declaration.initializer && (typescript_default.isArrowFunction(declaration.initializer) || typescript_default.isFunctionExpression(declaration.initializer))) {
|
|
46399
46440
|
const name = declaration.name.getText(sourceFile);
|
|
46400
46441
|
functions.push(
|
|
46401
46442
|
this.extractArrowFunctionInfo(
|
|
@@ -46408,9 +46449,9 @@ var TypeScriptASTParser = class {
|
|
|
46408
46449
|
}
|
|
46409
46450
|
}
|
|
46410
46451
|
}
|
|
46411
|
-
|
|
46452
|
+
typescript_default.forEachChild(node, visit);
|
|
46412
46453
|
};
|
|
46413
|
-
|
|
46454
|
+
typescript_default.forEachChild(sourceFile, visit);
|
|
46414
46455
|
return functions;
|
|
46415
46456
|
}
|
|
46416
46457
|
/**
|
|
@@ -46419,12 +46460,12 @@ var TypeScriptASTParser = class {
|
|
|
46419
46460
|
extractClasses(sourceFile) {
|
|
46420
46461
|
const classes = [];
|
|
46421
46462
|
const visit = (node) => {
|
|
46422
|
-
if (
|
|
46463
|
+
if (typescript_default.isClassDeclaration(node) && node.name) {
|
|
46423
46464
|
classes.push(this.extractClassInfo(node, sourceFile));
|
|
46424
46465
|
}
|
|
46425
|
-
|
|
46466
|
+
typescript_default.forEachChild(node, visit);
|
|
46426
46467
|
};
|
|
46427
|
-
|
|
46468
|
+
typescript_default.forEachChild(sourceFile, visit);
|
|
46428
46469
|
return classes;
|
|
46429
46470
|
}
|
|
46430
46471
|
/**
|
|
@@ -46435,10 +46476,10 @@ var TypeScriptASTParser = class {
|
|
|
46435
46476
|
const parameters = this.extractParameters(node.parameters, sourceFile);
|
|
46436
46477
|
const returnType = node.type?.getText(sourceFile);
|
|
46437
46478
|
const isAsync = node.modifiers?.some(
|
|
46438
|
-
(m74) => m74.kind ===
|
|
46479
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword
|
|
46439
46480
|
) ?? false;
|
|
46440
46481
|
const isExported = node.modifiers?.some(
|
|
46441
|
-
(m74) => m74.kind ===
|
|
46482
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword
|
|
46442
46483
|
) ?? false;
|
|
46443
46484
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(
|
|
46444
46485
|
node.getStart(sourceFile)
|
|
@@ -46466,9 +46507,9 @@ var TypeScriptASTParser = class {
|
|
|
46466
46507
|
const parameters = this.extractParameters(node.parameters, sourceFile);
|
|
46467
46508
|
const returnType = node.type?.getText(sourceFile);
|
|
46468
46509
|
const isAsync = node.modifiers?.some(
|
|
46469
|
-
(m74) => m74.kind ===
|
|
46510
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword
|
|
46470
46511
|
) ?? false;
|
|
46471
|
-
const isExported =
|
|
46512
|
+
const isExported = typescript_default.isVariableStatement(parentNode) && (parentNode.modifiers?.some((m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword) ?? false);
|
|
46472
46513
|
const { line: startLine } = sourceFile.getLineAndCharacterOfPosition(
|
|
46473
46514
|
node.getStart(sourceFile)
|
|
46474
46515
|
);
|
|
@@ -46497,15 +46538,15 @@ var TypeScriptASTParser = class {
|
|
|
46497
46538
|
const properties = [];
|
|
46498
46539
|
let hasConstructor = false;
|
|
46499
46540
|
const isExported = node.modifiers?.some(
|
|
46500
|
-
(m74) => m74.kind ===
|
|
46541
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.ExportKeyword
|
|
46501
46542
|
) ?? false;
|
|
46502
46543
|
for (const member of node.members) {
|
|
46503
|
-
if (
|
|
46544
|
+
if (typescript_default.isMethodDeclaration(member)) {
|
|
46504
46545
|
const methodName = member.name.getText(sourceFile);
|
|
46505
46546
|
const parameters = this.extractParameters(member.parameters, sourceFile);
|
|
46506
46547
|
const returnType = member.type?.getText(sourceFile);
|
|
46507
46548
|
const isAsync = member.modifiers?.some(
|
|
46508
|
-
(m74) => m74.kind ===
|
|
46549
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.AsyncKeyword
|
|
46509
46550
|
) ?? false;
|
|
46510
46551
|
const { line: startLine2 } = sourceFile.getLineAndCharacterOfPosition(
|
|
46511
46552
|
member.getStart(sourceFile)
|
|
@@ -46524,16 +46565,16 @@ var TypeScriptASTParser = class {
|
|
|
46524
46565
|
endLine: endLine2 + 1,
|
|
46525
46566
|
body: member.body?.getText(sourceFile)
|
|
46526
46567
|
});
|
|
46527
|
-
} else if (
|
|
46568
|
+
} else if (typescript_default.isConstructorDeclaration(member)) {
|
|
46528
46569
|
hasConstructor = true;
|
|
46529
|
-
} else if (
|
|
46570
|
+
} else if (typescript_default.isPropertyDeclaration(member)) {
|
|
46530
46571
|
const propName = member.name.getText(sourceFile);
|
|
46531
46572
|
const propType = member.type?.getText(sourceFile);
|
|
46532
46573
|
const isPrivate = member.modifiers?.some(
|
|
46533
|
-
(m74) => m74.kind ===
|
|
46574
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.PrivateKeyword
|
|
46534
46575
|
) ?? false;
|
|
46535
46576
|
const isReadonly = member.modifiers?.some(
|
|
46536
|
-
(m74) => m74.kind ===
|
|
46577
|
+
(m74) => m74.kind === typescript_default.SyntaxKind.ReadonlyKeyword
|
|
46537
46578
|
) ?? false;
|
|
46538
46579
|
properties.push({
|
|
46539
46580
|
name: propName,
|
|
@@ -46568,14 +46609,14 @@ var TypeScriptASTParser = class {
|
|
|
46568
46609
|
return params.map((param) => {
|
|
46569
46610
|
let name = param.name.getText(sourceFile);
|
|
46570
46611
|
let type = param.type?.getText(sourceFile);
|
|
46571
|
-
if (
|
|
46612
|
+
if (typescript_default.isObjectBindingPattern(param.name)) {
|
|
46572
46613
|
objectDestructureCount++;
|
|
46573
46614
|
name = objectDestructureCount > 1 ? `options${objectDestructureCount}` : "options";
|
|
46574
46615
|
if (!type) {
|
|
46575
46616
|
const props = param.name.elements.map((el) => `${el.name.getText(sourceFile)}: unknown`).join(", ");
|
|
46576
46617
|
type = `{ ${props} }`;
|
|
46577
46618
|
}
|
|
46578
|
-
} else if (
|
|
46619
|
+
} else if (typescript_default.isArrayBindingPattern(param.name)) {
|
|
46579
46620
|
arrayDestructureCount++;
|
|
46580
46621
|
name = arrayDestructureCount > 1 ? `items${arrayDestructureCount}` : "items";
|
|
46581
46622
|
if (!type) {
|
|
@@ -46597,28 +46638,28 @@ var TypeScriptASTParser = class {
|
|
|
46597
46638
|
let complexity = 1;
|
|
46598
46639
|
const visit = (n61) => {
|
|
46599
46640
|
switch (n61.kind) {
|
|
46600
|
-
case
|
|
46601
|
-
case
|
|
46602
|
-
case
|
|
46603
|
-
case
|
|
46604
|
-
case
|
|
46605
|
-
case
|
|
46606
|
-
case
|
|
46607
|
-
case
|
|
46608
|
-
case
|
|
46609
|
-
case
|
|
46641
|
+
case typescript_default.SyntaxKind.IfStatement:
|
|
46642
|
+
case typescript_default.SyntaxKind.ForStatement:
|
|
46643
|
+
case typescript_default.SyntaxKind.ForInStatement:
|
|
46644
|
+
case typescript_default.SyntaxKind.ForOfStatement:
|
|
46645
|
+
case typescript_default.SyntaxKind.WhileStatement:
|
|
46646
|
+
case typescript_default.SyntaxKind.DoStatement:
|
|
46647
|
+
case typescript_default.SyntaxKind.CaseClause:
|
|
46648
|
+
case typescript_default.SyntaxKind.CatchClause:
|
|
46649
|
+
case typescript_default.SyntaxKind.ConditionalExpression:
|
|
46650
|
+
case typescript_default.SyntaxKind.QuestionQuestionToken:
|
|
46610
46651
|
complexity++;
|
|
46611
46652
|
break;
|
|
46612
|
-
case
|
|
46653
|
+
case typescript_default.SyntaxKind.BinaryExpression:
|
|
46613
46654
|
const binary = n61;
|
|
46614
|
-
if (binary.operatorToken.kind ===
|
|
46655
|
+
if (binary.operatorToken.kind === typescript_default.SyntaxKind.AmpersandAmpersandToken || binary.operatorToken.kind === typescript_default.SyntaxKind.BarBarToken) {
|
|
46615
46656
|
complexity++;
|
|
46616
46657
|
}
|
|
46617
46658
|
break;
|
|
46618
46659
|
}
|
|
46619
|
-
|
|
46660
|
+
typescript_default.forEachChild(n61, visit);
|
|
46620
46661
|
};
|
|
46621
|
-
|
|
46662
|
+
typescript_default.forEachChild(node, visit);
|
|
46622
46663
|
return complexity;
|
|
46623
46664
|
}
|
|
46624
46665
|
};
|
|
@@ -67387,10 +67428,10 @@ var BrowserOrchestrator = class {
|
|
|
67387
67428
|
config;
|
|
67388
67429
|
log;
|
|
67389
67430
|
adaptiveLocator = null;
|
|
67390
|
-
constructor(client, config,
|
|
67431
|
+
constructor(client, config, logger25) {
|
|
67391
67432
|
this.client = client;
|
|
67392
67433
|
this.config = config;
|
|
67393
|
-
this.log =
|
|
67434
|
+
this.log = logger25;
|
|
67394
67435
|
this.unifiedClient = config.browserClient ?? client;
|
|
67395
67436
|
this.useAgentBrowser = isAgentBrowserClient(this.unifiedClient);
|
|
67396
67437
|
if (config.adaptiveLocator?.enabled) {
|
|
@@ -67669,17 +67710,17 @@ var BrowserOrchestrator = class {
|
|
|
67669
67710
|
return options;
|
|
67670
67711
|
}
|
|
67671
67712
|
};
|
|
67672
|
-
function createBrowserOrchestrator(client, config,
|
|
67673
|
-
return new BrowserOrchestrator(client, config,
|
|
67713
|
+
function createBrowserOrchestrator(client, config, logger25) {
|
|
67714
|
+
return new BrowserOrchestrator(client, config, logger25);
|
|
67674
67715
|
}
|
|
67675
67716
|
|
|
67676
67717
|
// src/domains/test-execution/services/e2e/assertion-handlers.ts
|
|
67677
67718
|
var AssertionHandlers = class {
|
|
67678
67719
|
orchestrator;
|
|
67679
67720
|
log;
|
|
67680
|
-
constructor(orchestrator,
|
|
67721
|
+
constructor(orchestrator, logger25) {
|
|
67681
67722
|
this.orchestrator = orchestrator;
|
|
67682
|
-
this.log =
|
|
67723
|
+
this.log = logger25;
|
|
67683
67724
|
}
|
|
67684
67725
|
// ==========================================================================
|
|
67685
67726
|
// Unified Browser Client Assertions
|
|
@@ -68092,8 +68133,8 @@ var AssertionHandlers = class {
|
|
|
68092
68133
|
this.assertCondition(matches, step, expected, actual);
|
|
68093
68134
|
}
|
|
68094
68135
|
};
|
|
68095
|
-
function createAssertionHandlers(orchestrator,
|
|
68096
|
-
return new AssertionHandlers(orchestrator,
|
|
68136
|
+
function createAssertionHandlers(orchestrator, logger25) {
|
|
68137
|
+
return new AssertionHandlers(orchestrator, logger25);
|
|
68097
68138
|
}
|
|
68098
68139
|
|
|
68099
68140
|
// src/domains/test-execution/services/e2e/wait-condition-handler.ts
|
|
@@ -68206,12 +68247,12 @@ var StepExecutors = class {
|
|
|
68206
68247
|
assertionHandlers;
|
|
68207
68248
|
waitConditionHandler;
|
|
68208
68249
|
log;
|
|
68209
|
-
constructor(config, orchestrator,
|
|
68250
|
+
constructor(config, orchestrator, logger25) {
|
|
68210
68251
|
this.config = config;
|
|
68211
68252
|
this.orchestrator = orchestrator;
|
|
68212
|
-
this.assertionHandlers = createAssertionHandlers(orchestrator,
|
|
68253
|
+
this.assertionHandlers = createAssertionHandlers(orchestrator, logger25);
|
|
68213
68254
|
this.waitConditionHandler = createWaitConditionHandler(orchestrator);
|
|
68214
|
-
this.log =
|
|
68255
|
+
this.log = logger25;
|
|
68215
68256
|
}
|
|
68216
68257
|
/**
|
|
68217
68258
|
* Execute a single step based on its type
|
|
@@ -68639,8 +68680,8 @@ var StepExecutors = class {
|
|
|
68639
68680
|
return new Promise((resolve22) => setTimeout(resolve22, ms));
|
|
68640
68681
|
}
|
|
68641
68682
|
};
|
|
68642
|
-
function createStepExecutors(config, orchestrator,
|
|
68643
|
-
return new StepExecutors(config, orchestrator,
|
|
68683
|
+
function createStepExecutors(config, orchestrator, logger25) {
|
|
68684
|
+
return new StepExecutors(config, orchestrator, logger25);
|
|
68644
68685
|
}
|
|
68645
68686
|
|
|
68646
68687
|
// src/domains/test-execution/services/e2e/step-retry-handler.ts
|
|
@@ -68650,10 +68691,10 @@ var StepRetryHandler = class {
|
|
|
68650
68691
|
config;
|
|
68651
68692
|
stepExecutors;
|
|
68652
68693
|
log;
|
|
68653
|
-
constructor(config, stepExecutors,
|
|
68694
|
+
constructor(config, stepExecutors, logger25) {
|
|
68654
68695
|
this.config = config;
|
|
68655
68696
|
this.stepExecutors = stepExecutors;
|
|
68656
|
-
this.log =
|
|
68697
|
+
this.log = logger25;
|
|
68657
68698
|
}
|
|
68658
68699
|
/**
|
|
68659
68700
|
* Execute a step with retry logic
|
|
@@ -68763,8 +68804,8 @@ var StepRetryHandler = class {
|
|
|
68763
68804
|
return new Promise((resolve22) => setTimeout(resolve22, ms));
|
|
68764
68805
|
}
|
|
68765
68806
|
};
|
|
68766
|
-
function createStepRetryHandler(config, stepExecutors,
|
|
68767
|
-
return new StepRetryHandler(config, stepExecutors,
|
|
68807
|
+
function createStepRetryHandler(config, stepExecutors, logger25) {
|
|
68808
|
+
return new StepRetryHandler(config, stepExecutors, logger25);
|
|
68768
68809
|
}
|
|
68769
68810
|
|
|
68770
68811
|
// src/domains/test-execution/services/e2e/result-collector.ts
|
|
@@ -68890,10 +68931,10 @@ var E2ETestRunnerService = class {
|
|
|
68890
68931
|
constructor(client, config = {}) {
|
|
68891
68932
|
this.client = client;
|
|
68892
68933
|
this.config = { ...DEFAULT_E2E_RUNNER_CONFIG, ...config };
|
|
68893
|
-
const
|
|
68894
|
-
this.orchestrator = createBrowserOrchestrator(client, this.config,
|
|
68895
|
-
this.stepExecutors = createStepExecutors(this.config, this.orchestrator,
|
|
68896
|
-
this.retryHandler = createStepRetryHandler(this.config, this.stepExecutors,
|
|
68934
|
+
const logger25 = (message) => this.log(message);
|
|
68935
|
+
this.orchestrator = createBrowserOrchestrator(client, this.config, logger25);
|
|
68936
|
+
this.stepExecutors = createStepExecutors(this.config, this.orchestrator, logger25);
|
|
68937
|
+
this.retryHandler = createStepRetryHandler(this.config, this.stepExecutors, logger25);
|
|
68897
68938
|
this.resultCollector = createResultCollector();
|
|
68898
68939
|
this.log(
|
|
68899
68940
|
`E2E Runner initialized with ${this.orchestrator.isUsingAgentBrowser() ? "agent-browser" : "vibium"} client`
|
|
@@ -134139,7 +134180,7 @@ var ALL_DOMAINS2 = [
|
|
|
134139
134180
|
"enterprise-integration"
|
|
134140
134181
|
];
|
|
134141
134182
|
function getAQEVersion() {
|
|
134142
|
-
return true ? "3.7.
|
|
134183
|
+
return true ? "3.7.13" : "3.0.0";
|
|
134143
134184
|
}
|
|
134144
134185
|
function createDefaultConfig(projectName, projectRoot) {
|
|
134145
134186
|
return {
|
|
@@ -135317,12 +135358,12 @@ async function migrateV2Config(projectRoot, v2Detection) {
|
|
|
135317
135358
|
codeIntelligence: codeIntelConfig
|
|
135318
135359
|
}
|
|
135319
135360
|
};
|
|
135320
|
-
const
|
|
135361
|
+
const yaml3 = await import("yaml");
|
|
135321
135362
|
const yamlContent = `# Agentic QE v3 Configuration
|
|
135322
135363
|
# Migrated from v2 on ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
135323
135364
|
# Original v2 settings preserved in _v2Backup section
|
|
135324
135365
|
|
|
135325
|
-
${
|
|
135366
|
+
${yaml3.stringify(v3Config)}`;
|
|
135326
135367
|
writeFileSync3(v3ConfigPath, yamlContent, "utf-8");
|
|
135327
135368
|
console.log(" \u2713 V2 config migrated to v3 format");
|
|
135328
135369
|
} catch (error) {
|
|
@@ -137505,9 +137546,9 @@ async function saveConfig(projectRoot, config) {
|
|
|
137505
137546
|
if (!existsSync21(configDir)) {
|
|
137506
137547
|
mkdirSync10(configDir, { recursive: true });
|
|
137507
137548
|
}
|
|
137508
|
-
const
|
|
137549
|
+
const yaml3 = configToYAML(config);
|
|
137509
137550
|
const configPath = join25(configDir, "config.yaml");
|
|
137510
|
-
writeFileSync8(configPath,
|
|
137551
|
+
writeFileSync8(configPath, yaml3, "utf-8");
|
|
137511
137552
|
}
|
|
137512
137553
|
function configToYAML(config) {
|
|
137513
137554
|
const lines = [
|
|
@@ -139910,8 +139951,8 @@ var VerificationPhase = class extends BasePhase {
|
|
|
139910
139951
|
config = this.mergeConfigs(config, existingConfig);
|
|
139911
139952
|
}
|
|
139912
139953
|
}
|
|
139913
|
-
const
|
|
139914
|
-
writeFileSync24(configPath,
|
|
139954
|
+
const yaml3 = this.configToYAML(config);
|
|
139955
|
+
writeFileSync24(configPath, yaml3, "utf-8");
|
|
139915
139956
|
}
|
|
139916
139957
|
/**
|
|
139917
139958
|
* Load existing config.yaml and parse it
|
|
@@ -150047,10 +150088,19 @@ function createValidationResultAggregator(learner, manifestPath, config) {
|
|
|
150047
150088
|
return new ValidationResultAggregator(learner, manifestPath, config);
|
|
150048
150089
|
}
|
|
150049
150090
|
|
|
150091
|
+
// src/validation/trigger-optimizer.ts
|
|
150092
|
+
init_logging();
|
|
150093
|
+
import * as yaml2 from "yaml";
|
|
150094
|
+
var logger11 = LoggerFactory.create("trigger-optimizer");
|
|
150095
|
+
|
|
150096
|
+
// src/validation/version-comparator.ts
|
|
150097
|
+
init_logging();
|
|
150098
|
+
var logger12 = LoggerFactory.create("version-comparator");
|
|
150099
|
+
|
|
150050
150100
|
// src/learning/skill-validation-learner.ts
|
|
150051
150101
|
init_safe_json();
|
|
150052
150102
|
init_logging();
|
|
150053
|
-
var
|
|
150103
|
+
var logger13 = LoggerFactory.create("skill-validation-learner");
|
|
150054
150104
|
var SkillValidationLearner = class {
|
|
150055
150105
|
constructor(reasoningBank) {
|
|
150056
150106
|
this.reasoningBank = reasoningBank;
|
|
@@ -150133,7 +150183,7 @@ var SkillValidationLearner = class {
|
|
|
150133
150183
|
history = this.createEmptyConfidence(outcome.skillName);
|
|
150134
150184
|
}
|
|
150135
150185
|
} catch (e20) {
|
|
150136
|
-
|
|
150186
|
+
logger13.debug("Confidence history parse failed", { skill: outcome.skillName, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
150137
150187
|
history = this.createEmptyConfidence(outcome.skillName);
|
|
150138
150188
|
}
|
|
150139
150189
|
} else {
|
|
@@ -150189,7 +150239,7 @@ var SkillValidationLearner = class {
|
|
|
150189
150239
|
crossModel = this.createEmptyCrossModelAnalysis();
|
|
150190
150240
|
}
|
|
150191
150241
|
} catch (e20) {
|
|
150192
|
-
|
|
150242
|
+
logger13.debug("Cross-model analysis parse failed", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
150193
150243
|
crossModel = this.createEmptyCrossModelAnalysis();
|
|
150194
150244
|
}
|
|
150195
150245
|
} else {
|
|
@@ -150278,7 +150328,7 @@ var SkillValidationLearner = class {
|
|
|
150278
150328
|
return safeJsonParse(templateContent);
|
|
150279
150329
|
}
|
|
150280
150330
|
} catch (e20) {
|
|
150281
|
-
|
|
150331
|
+
logger13.debug("Skill confidence pattern content invalid", { skill: skillName, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
150282
150332
|
}
|
|
150283
150333
|
}
|
|
150284
150334
|
return null;
|
|
@@ -150296,7 +150346,7 @@ var SkillValidationLearner = class {
|
|
|
150296
150346
|
return safeJsonParse(templateContent);
|
|
150297
150347
|
}
|
|
150298
150348
|
} catch (e20) {
|
|
150299
|
-
|
|
150349
|
+
logger13.debug("Cross-model pattern content invalid", { skill: skillName, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
150300
150350
|
}
|
|
150301
150351
|
}
|
|
150302
150352
|
return null;
|
|
@@ -150355,7 +150405,7 @@ var SkillValidationLearner = class {
|
|
|
150355
150405
|
}
|
|
150356
150406
|
byCategory.get(category).push(pattern);
|
|
150357
150407
|
} catch (e20) {
|
|
150358
|
-
|
|
150408
|
+
logger13.debug("Invalid pattern during category grouping", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
150359
150409
|
}
|
|
150360
150410
|
}
|
|
150361
150411
|
for (const [category, categoryPatterns] of Array.from(byCategory.entries())) {
|
|
@@ -150377,7 +150427,7 @@ var SkillValidationLearner = class {
|
|
|
150377
150427
|
tags.filter((t50) => !["skill-validation", skillName].includes(t50)).forEach((t50) => failureIndicators.add(t50));
|
|
150378
150428
|
}
|
|
150379
150429
|
} catch (e20) {
|
|
150380
|
-
|
|
150430
|
+
logger13.debug("Invalid pattern during category extraction", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
150381
150431
|
}
|
|
150382
150432
|
}
|
|
150383
150433
|
if (categoryPatterns.length > 0) {
|
|
@@ -150602,7 +150652,7 @@ function clamp2(value, min, max) {
|
|
|
150602
150652
|
init_types();
|
|
150603
150653
|
init_circular_buffer();
|
|
150604
150654
|
init_safe_json();
|
|
150605
|
-
var
|
|
150655
|
+
var logger14 = LoggerFactory.create("RealQEReasoningBank");
|
|
150606
150656
|
var DEFAULT_REAL_CONFIG = {
|
|
150607
150657
|
sqlite: {
|
|
150608
150658
|
// ADR-046: Now uses unified storage via UnifiedMemoryManager by default
|
|
@@ -150723,15 +150773,15 @@ var RealQEReasoningBank = class {
|
|
|
150723
150773
|
if (this.initialized) return;
|
|
150724
150774
|
const startTime = performance.now();
|
|
150725
150775
|
await this.sqliteStore.initialize();
|
|
150726
|
-
|
|
150776
|
+
logger14.info("SQLite persistence initialized");
|
|
150727
150777
|
await this.initializeHNSW();
|
|
150728
|
-
|
|
150778
|
+
logger14.info("HNSW index initialized");
|
|
150729
150779
|
await this.loadPatternsIntoHNSW();
|
|
150730
150780
|
const stats = this.sqliteStore.getStats();
|
|
150731
150781
|
if (stats.totalPatterns === 0) {
|
|
150732
150782
|
const hasHistoricalData = this.sqliteStore.hasAnyHistoricalData?.() ?? false;
|
|
150733
150783
|
if (hasHistoricalData) {
|
|
150734
|
-
|
|
150784
|
+
logger14.error(
|
|
150735
150785
|
"qe_patterns table is EMPTY but historical data exists \u2014 possible data loss! Restore from backup instead of loading seed patterns. Skipping foundational pattern load to avoid masking data loss."
|
|
150736
150786
|
);
|
|
150737
150787
|
} else {
|
|
@@ -150740,7 +150790,7 @@ var RealQEReasoningBank = class {
|
|
|
150740
150790
|
}
|
|
150741
150791
|
this.initialized = true;
|
|
150742
150792
|
const initTime = performance.now() - startTime;
|
|
150743
|
-
|
|
150793
|
+
logger14.info("Fully initialized", { durationMs: Math.round(initTime) });
|
|
150744
150794
|
}
|
|
150745
150795
|
/**
|
|
150746
150796
|
* Initialize HNSW index for fast similarity search
|
|
@@ -150763,9 +150813,9 @@ var RealQEReasoningBank = class {
|
|
|
150763
150813
|
this.qeConfig.hnsw.efConstruction
|
|
150764
150814
|
);
|
|
150765
150815
|
this.hnswIndex.setEf(this.qeConfig.hnsw.efSearch);
|
|
150766
|
-
|
|
150816
|
+
logger14.info("HNSW initialized", { dimension, M: this.qeConfig.hnsw.M });
|
|
150767
150817
|
} catch (error) {
|
|
150768
|
-
|
|
150818
|
+
logger14.error("HNSW initialization failed", error instanceof Error ? error : void 0);
|
|
150769
150819
|
throw error;
|
|
150770
150820
|
}
|
|
150771
150821
|
}
|
|
@@ -150789,9 +150839,9 @@ var RealQEReasoningBank = class {
|
|
|
150789
150839
|
loaded++;
|
|
150790
150840
|
}
|
|
150791
150841
|
if (skipped > 0) {
|
|
150792
|
-
|
|
150842
|
+
logger14.warn("Skipped invalid embeddings", { skipped, expectedDim });
|
|
150793
150843
|
}
|
|
150794
|
-
|
|
150844
|
+
logger14.info("Loaded patterns into HNSW index", { count: loaded });
|
|
150795
150845
|
}
|
|
150796
150846
|
/**
|
|
150797
150847
|
* Load foundational QE patterns
|
|
@@ -150842,10 +150892,10 @@ var RealQEReasoningBank = class {
|
|
|
150842
150892
|
try {
|
|
150843
150893
|
await this.storeQEPattern(options);
|
|
150844
150894
|
} catch (error) {
|
|
150845
|
-
|
|
150895
|
+
logger14.warn("Failed to load foundational pattern", { name: options.name, error });
|
|
150846
150896
|
}
|
|
150847
150897
|
}
|
|
150848
|
-
|
|
150898
|
+
logger14.info("Loaded foundational patterns", { count: foundationalPatterns.length });
|
|
150849
150899
|
}
|
|
150850
150900
|
/**
|
|
150851
150901
|
* Store a QE pattern with REAL embeddings
|
|
@@ -150872,7 +150922,7 @@ var RealQEReasoningBank = class {
|
|
|
150872
150922
|
);
|
|
150873
150923
|
const decision = await memoryWriteGateIntegration.evaluateWrite(memoryPattern);
|
|
150874
150924
|
if (!decision.allowed) {
|
|
150875
|
-
|
|
150925
|
+
logger14.warn("Pattern blocked by MemoryWriteGate", {
|
|
150876
150926
|
name: options.name,
|
|
150877
150927
|
reason: decision.reason,
|
|
150878
150928
|
conflicts: decision.conflictingPatterns?.join(", ") || "none"
|
|
@@ -150882,7 +150932,7 @@ var RealQEReasoningBank = class {
|
|
|
150882
150932
|
}
|
|
150883
150933
|
}
|
|
150884
150934
|
} catch (govError) {
|
|
150885
|
-
|
|
150935
|
+
logger14.warn("MemoryWriteGate check error (continuing)", { error: govError });
|
|
150886
150936
|
}
|
|
150887
150937
|
}
|
|
150888
150938
|
const patternId = v4_default();
|
|
@@ -150927,7 +150977,7 @@ var RealQEReasoningBank = class {
|
|
|
150927
150977
|
domain: pattern.domain
|
|
150928
150978
|
});
|
|
150929
150979
|
} catch (regError) {
|
|
150930
|
-
|
|
150980
|
+
logger14.warn("Pattern registration with MemoryWriteGate failed", { error: regError });
|
|
150931
150981
|
}
|
|
150932
150982
|
}
|
|
150933
150983
|
return ok(pattern);
|
|
@@ -150966,7 +151016,7 @@ var RealQEReasoningBank = class {
|
|
|
150966
151016
|
}
|
|
150967
151017
|
const searchTime = performance.now() - startTime;
|
|
150968
151018
|
if (searchTime > 10) {
|
|
150969
|
-
|
|
151019
|
+
logger14.warn("Slow search", { searchTimeMs: Number(searchTime.toFixed(1)) });
|
|
150970
151020
|
}
|
|
150971
151021
|
return ok(patterns);
|
|
150972
151022
|
} catch (error) {
|
|
@@ -151068,14 +151118,14 @@ var RealQEReasoningBank = class {
|
|
|
151068
151118
|
);
|
|
151069
151119
|
const quarantineDecision = this.asymmetricEngine.shouldQuarantine(newConfidence, domain);
|
|
151070
151120
|
if (quarantineDecision.shouldQuarantine) {
|
|
151071
|
-
|
|
151121
|
+
logger14.info("Pattern quarantined (asymmetric drop)", { name: pattern.name });
|
|
151072
151122
|
}
|
|
151073
151123
|
this.sqliteStore.updatePattern(outcome.patternId, {
|
|
151074
151124
|
confidence: newConfidence
|
|
151075
151125
|
});
|
|
151076
151126
|
if (await this.checkPatternPromotionWithCoherence(pattern)) {
|
|
151077
151127
|
this.sqliteStore.promotePattern(outcome.patternId);
|
|
151078
|
-
|
|
151128
|
+
logger14.info("Pattern promoted to long-term", { name: pattern.name });
|
|
151079
151129
|
}
|
|
151080
151130
|
}
|
|
151081
151131
|
return ok(void 0);
|
|
@@ -151109,12 +151159,12 @@ var RealQEReasoningBank = class {
|
|
|
151109
151159
|
}));
|
|
151110
151160
|
const coherenceResult = await this.coherenceService.checkCoherence(coherenceNodes);
|
|
151111
151161
|
if (coherenceResult.energy >= (this.qeConfig.coherenceThreshold || 0.4)) {
|
|
151112
|
-
|
|
151162
|
+
logger14.info("Pattern promotion blocked due to coherence violation", {
|
|
151113
151163
|
name: pattern.name,
|
|
151114
151164
|
energy: coherenceResult.energy
|
|
151115
151165
|
});
|
|
151116
151166
|
if (coherenceResult.contradictions && coherenceResult.contradictions.length > 0) {
|
|
151117
|
-
|
|
151167
|
+
logger14.info("Conflicts with existing patterns", {
|
|
151118
151168
|
conflictingNodeIds: coherenceResult.contradictions.map((c70) => c70.nodeIds).flat()
|
|
151119
151169
|
});
|
|
151120
151170
|
}
|
|
@@ -151280,7 +151330,7 @@ var RealQEReasoningBank = class {
|
|
|
151280
151330
|
if (currentIndex > 0) {
|
|
151281
151331
|
const newTier = tierOrder[currentIndex - 1];
|
|
151282
151332
|
this.sqliteStore.updatePattern(patternId, { tier: newTier });
|
|
151283
|
-
|
|
151333
|
+
logger14.info("Pattern demoted", { name: pattern.name, newTier });
|
|
151284
151334
|
}
|
|
151285
151335
|
}
|
|
151286
151336
|
// ============================================================================
|
|
@@ -151307,7 +151357,7 @@ var RealQEReasoningBank = class {
|
|
|
151307
151357
|
}
|
|
151308
151358
|
}
|
|
151309
151359
|
if (cleaned > 0) {
|
|
151310
|
-
|
|
151360
|
+
logger14.info("Cleaned stale patternIdMap entries", { count: cleaned });
|
|
151311
151361
|
}
|
|
151312
151362
|
return cleaned;
|
|
151313
151363
|
}
|
|
@@ -151323,7 +151373,7 @@ var RealQEReasoningBank = class {
|
|
|
151323
151373
|
for (const [hnswIdx, id] of Array.from(this.patternIdMap.entries())) {
|
|
151324
151374
|
if (id === patternId) {
|
|
151325
151375
|
this.patternIdMap.delete(hnswIdx);
|
|
151326
|
-
|
|
151376
|
+
logger14.info("Removed pattern from HNSW mapping", { patternId });
|
|
151327
151377
|
return true;
|
|
151328
151378
|
}
|
|
151329
151379
|
}
|
|
@@ -151439,7 +151489,7 @@ var RealQEReasoningBank = class {
|
|
|
151439
151489
|
this.stats.learningOutcomes = 0;
|
|
151440
151490
|
this.stats.successfulOutcomes = 0;
|
|
151441
151491
|
this.initialized = false;
|
|
151442
|
-
|
|
151492
|
+
logger14.info("Disposed");
|
|
151443
151493
|
}
|
|
151444
151494
|
/**
|
|
151445
151495
|
* Alias for dispose() for consistency with other components
|
|
@@ -154310,7 +154360,7 @@ init_error_utils();
|
|
|
154310
154360
|
init_logging();
|
|
154311
154361
|
import * as fs26 from "fs";
|
|
154312
154362
|
import * as path27 from "path";
|
|
154313
|
-
var
|
|
154363
|
+
var logger15 = LoggerFactory.create("sqlite-reader");
|
|
154314
154364
|
var SQLiteReader = class {
|
|
154315
154365
|
name;
|
|
154316
154366
|
type = "sqlite";
|
|
@@ -154406,7 +154456,7 @@ var SQLiteReader = class {
|
|
|
154406
154456
|
const result = stmt.get();
|
|
154407
154457
|
return result.count;
|
|
154408
154458
|
} catch (error) {
|
|
154409
|
-
|
|
154459
|
+
logger15.debug("Record count query failed", { table: tableName, error: toErrorMessage(error) });
|
|
154410
154460
|
return 0;
|
|
154411
154461
|
}
|
|
154412
154462
|
}
|
|
@@ -154447,7 +154497,7 @@ var SQLiteReader = class {
|
|
|
154447
154497
|
const result = stmt.get(tableName);
|
|
154448
154498
|
return !!result;
|
|
154449
154499
|
} catch (e20) {
|
|
154450
|
-
|
|
154500
|
+
logger15.debug("Table existence check failed", { table: tableName, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
154451
154501
|
return false;
|
|
154452
154502
|
}
|
|
154453
154503
|
}
|
|
@@ -154468,7 +154518,7 @@ var SQLiteReader = class {
|
|
|
154468
154518
|
}
|
|
154469
154519
|
}
|
|
154470
154520
|
} catch (e20) {
|
|
154471
|
-
|
|
154521
|
+
logger15.debug("Timestamp column detection failed", { table: tableName, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
154472
154522
|
return null;
|
|
154473
154523
|
}
|
|
154474
154524
|
return null;
|
|
@@ -154486,7 +154536,7 @@ var SQLiteReader = class {
|
|
|
154486
154536
|
try {
|
|
154487
154537
|
transformed[key] = safeJsonParse(value);
|
|
154488
154538
|
} catch (e20) {
|
|
154489
|
-
|
|
154539
|
+
logger15.debug("JSON parse failed for record field", { key, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
154490
154540
|
}
|
|
154491
154541
|
}
|
|
154492
154542
|
if (key.endsWith("_at") && typeof value === "number") {
|
|
@@ -154809,7 +154859,7 @@ function createJSONReader(config) {
|
|
|
154809
154859
|
init_logging();
|
|
154810
154860
|
import { spawn as spawn8 } from "child_process";
|
|
154811
154861
|
import { createConnection } from "net";
|
|
154812
|
-
var
|
|
154862
|
+
var logger16 = LoggerFactory.create("tunnel-manager");
|
|
154813
154863
|
function redactConnectionString(url) {
|
|
154814
154864
|
try {
|
|
154815
154865
|
const parsed = new URL(url);
|
|
@@ -154818,7 +154868,7 @@ function redactConnectionString(url) {
|
|
|
154818
154868
|
}
|
|
154819
154869
|
return parsed.toString();
|
|
154820
154870
|
} catch (e20) {
|
|
154821
|
-
|
|
154871
|
+
logger16.debug("URL parse failed during redaction, using regex fallback", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
154822
154872
|
return url.replace(/:\/\/([^:]+):([^@]+)@/, "://$1:***@");
|
|
154823
154873
|
}
|
|
154824
154874
|
}
|
|
@@ -155043,9 +155093,9 @@ function createConnectionManager(config) {
|
|
|
155043
155093
|
init_sql_safety();
|
|
155044
155094
|
init_error_utils();
|
|
155045
155095
|
init_logging();
|
|
155046
|
-
import { createRequire as
|
|
155047
|
-
var
|
|
155048
|
-
var requirePg =
|
|
155096
|
+
import { createRequire as createRequire9 } from "module";
|
|
155097
|
+
var logger17 = LoggerFactory.create("postgres-writer");
|
|
155098
|
+
var requirePg = createRequire9(import.meta.url);
|
|
155049
155099
|
var PostgresWriter = class {
|
|
155050
155100
|
client = null;
|
|
155051
155101
|
config;
|
|
@@ -155070,7 +155120,7 @@ var PostgresWriter = class {
|
|
|
155070
155120
|
try {
|
|
155071
155121
|
pg = requirePg("pg");
|
|
155072
155122
|
} catch (e20) {
|
|
155073
|
-
|
|
155123
|
+
logger17.debug("pg module not installed, using mock mode", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
155074
155124
|
console.warn("[PostgresWriter] pg module not installed, running in mock mode");
|
|
155075
155125
|
this.client = this.createMockClient();
|
|
155076
155126
|
this.connected = true;
|
|
@@ -155151,7 +155201,7 @@ var PostgresWriter = class {
|
|
|
155151
155201
|
} catch (error) {
|
|
155152
155202
|
const batchNum = Math.floor(i58 / batchSize) + 1;
|
|
155153
155203
|
const totalBatches = Math.ceil(records.length / batchSize);
|
|
155154
|
-
|
|
155204
|
+
logger17.debug(`Batch ${batchNum}/${totalBatches} failed for ${table}, retrying individually`, { error: toErrorMessage(error) });
|
|
155155
155205
|
let recovered = 0;
|
|
155156
155206
|
for (const record of batch) {
|
|
155157
155207
|
try {
|
|
@@ -155159,7 +155209,7 @@ var PostgresWriter = class {
|
|
|
155159
155209
|
recovered += inserted;
|
|
155160
155210
|
} catch (retryError) {
|
|
155161
155211
|
const recordId = record["id"] || record["key"] || "?";
|
|
155162
|
-
|
|
155212
|
+
logger17.debug(`Skipped record ${String(recordId).slice(0, 50)} in ${table}`, { error: toErrorMessage(retryError) });
|
|
155163
155213
|
}
|
|
155164
155214
|
}
|
|
155165
155215
|
totalInserted += recovered;
|
|
@@ -155209,7 +155259,7 @@ var PostgresWriter = class {
|
|
|
155209
155259
|
const result = await this.client.query(sql, params);
|
|
155210
155260
|
return result.rowCount || 0;
|
|
155211
155261
|
} catch (error) {
|
|
155212
|
-
|
|
155262
|
+
logger17.debug(`Upsert failed for ${table}`, { error: toErrorMessage(error) });
|
|
155213
155263
|
throw error;
|
|
155214
155264
|
}
|
|
155215
155265
|
}
|
|
@@ -155260,7 +155310,7 @@ var PostgresWriter = class {
|
|
|
155260
155310
|
return `[${Array.from(floats).join(",")}]`;
|
|
155261
155311
|
}
|
|
155262
155312
|
} catch (e20) {
|
|
155263
|
-
|
|
155313
|
+
logger17.debug("Buffer to float array conversion failed", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
155264
155314
|
}
|
|
155265
155315
|
return null;
|
|
155266
155316
|
}
|
|
@@ -155419,7 +155469,7 @@ function createPostgresWriter(config) {
|
|
|
155419
155469
|
init_sql_safety();
|
|
155420
155470
|
init_error_utils();
|
|
155421
155471
|
init_logging();
|
|
155422
|
-
var
|
|
155472
|
+
var logger18 = LoggerFactory.create("postgres-reader");
|
|
155423
155473
|
var PostgresReader = class {
|
|
155424
155474
|
writer;
|
|
155425
155475
|
environment;
|
|
@@ -155458,7 +155508,7 @@ var PostgresReader = class {
|
|
|
155458
155508
|
}
|
|
155459
155509
|
try {
|
|
155460
155510
|
const rows = await this.writer.query(sql, params);
|
|
155461
|
-
|
|
155511
|
+
logger18.debug(`Read ${rows.length} records from ${source.cloudTable}`, {
|
|
155462
155512
|
env: this.environment
|
|
155463
155513
|
});
|
|
155464
155514
|
return rows.map((row) => this.transformRecord(row, source));
|
|
@@ -155475,7 +155525,7 @@ var PostgresReader = class {
|
|
|
155475
155525
|
const safeTable = this.sanitizeCloudTable(source.cloudTable);
|
|
155476
155526
|
const timestampCol = await this.findTimestampColumn(safeTable);
|
|
155477
155527
|
if (!timestampCol) {
|
|
155478
|
-
|
|
155528
|
+
logger18.debug(`No timestamp column found for ${source.cloudTable}, falling back to readAll`);
|
|
155479
155529
|
return this.readAll(source);
|
|
155480
155530
|
}
|
|
155481
155531
|
let sql;
|
|
@@ -155491,7 +155541,7 @@ var PostgresReader = class {
|
|
|
155491
155541
|
const rows = await this.writer.query(sql, params);
|
|
155492
155542
|
return rows.map((row) => this.transformRecord(row, source));
|
|
155493
155543
|
} catch (error) {
|
|
155494
|
-
|
|
155544
|
+
logger18.debug(`Changed query failed for ${source.cloudTable}, falling back to readAll`, {
|
|
155495
155545
|
error: toErrorMessage(error)
|
|
155496
155546
|
});
|
|
155497
155547
|
return this.readAll(source);
|
|
@@ -155522,7 +155572,7 @@ var PostgresReader = class {
|
|
|
155522
155572
|
await this.writer.rollback();
|
|
155523
155573
|
} catch {
|
|
155524
155574
|
}
|
|
155525
|
-
|
|
155575
|
+
logger18.debug(`Count query failed for ${source.cloudTable}`, {
|
|
155526
155576
|
error: toErrorMessage(error)
|
|
155527
155577
|
});
|
|
155528
155578
|
return -1;
|
|
@@ -155614,7 +155664,7 @@ init_sql_safety();
|
|
|
155614
155664
|
init_error_utils();
|
|
155615
155665
|
init_logging();
|
|
155616
155666
|
import * as fs28 from "fs";
|
|
155617
|
-
var
|
|
155667
|
+
var logger19 = LoggerFactory.create("sqlite-writer");
|
|
155618
155668
|
var SQLiteWriter = class {
|
|
155619
155669
|
db = null;
|
|
155620
155670
|
dbPath;
|
|
@@ -155635,7 +155685,7 @@ var SQLiteWriter = class {
|
|
|
155635
155685
|
this.db = openDatabase(this.dbPath);
|
|
155636
155686
|
this.db.pragma("journal_mode = WAL");
|
|
155637
155687
|
this.db.pragma("synchronous = NORMAL");
|
|
155638
|
-
|
|
155688
|
+
logger19.debug(`Opened SQLite database: ${this.dbPath}`);
|
|
155639
155689
|
} catch (error) {
|
|
155640
155690
|
throw new Error(`Failed to open SQLite database ${this.dbPath}: ${toErrorMessage(error)}`);
|
|
155641
155691
|
}
|
|
@@ -155654,7 +155704,7 @@ var SQLiteWriter = class {
|
|
|
155654
155704
|
}
|
|
155655
155705
|
const localColumns = this.getTableColumns(table);
|
|
155656
155706
|
if (localColumns.length === 0) {
|
|
155657
|
-
|
|
155707
|
+
logger19.debug(`No columns found for table ${table}`);
|
|
155658
155708
|
return 0;
|
|
155659
155709
|
}
|
|
155660
155710
|
const localColumnSet = new Set(localColumns);
|
|
@@ -155666,7 +155716,7 @@ var SQLiteWriter = class {
|
|
|
155666
155716
|
totalWritten += written;
|
|
155667
155717
|
} catch (error) {
|
|
155668
155718
|
const batchNum = Math.floor(i58 / this.batchSize) + 1;
|
|
155669
|
-
|
|
155719
|
+
logger19.debug(`Batch ${batchNum} failed for ${table}, retrying individually`, {
|
|
155670
155720
|
error: toErrorMessage(error)
|
|
155671
155721
|
});
|
|
155672
155722
|
let recovered = 0;
|
|
@@ -155675,7 +155725,7 @@ var SQLiteWriter = class {
|
|
|
155675
155725
|
recovered += this.upsertBatch(safeTable, [record], localColumnSet);
|
|
155676
155726
|
} catch (retryError) {
|
|
155677
155727
|
const recordId = record["id"] || record["key"] || "?";
|
|
155678
|
-
|
|
155728
|
+
logger19.debug(`Skipped record ${String(recordId).slice(0, 50)} in ${table}`, {
|
|
155679
155729
|
error: toErrorMessage(retryError)
|
|
155680
155730
|
});
|
|
155681
155731
|
}
|
|
@@ -155706,7 +155756,7 @@ var SQLiteWriter = class {
|
|
|
155706
155756
|
if (this.db) {
|
|
155707
155757
|
this.db.close();
|
|
155708
155758
|
this.db = null;
|
|
155709
|
-
|
|
155759
|
+
logger19.debug("SQLite writer closed");
|
|
155710
155760
|
}
|
|
155711
155761
|
}
|
|
155712
155762
|
/**
|
|
@@ -155818,7 +155868,7 @@ function createSQLiteWriter(config) {
|
|
|
155818
155868
|
init_esm_node();
|
|
155819
155869
|
init_logging();
|
|
155820
155870
|
init_error_utils();
|
|
155821
|
-
var
|
|
155871
|
+
var logger20 = LoggerFactory.create("sync-agent");
|
|
155822
155872
|
var CloudSyncAgent = class {
|
|
155823
155873
|
config;
|
|
155824
155874
|
readers = /* @__PURE__ */ new Map();
|
|
@@ -156053,7 +156103,7 @@ var CloudSyncAgent = class {
|
|
|
156053
156103
|
await this.writer.rollback();
|
|
156054
156104
|
} catch {
|
|
156055
156105
|
}
|
|
156056
|
-
|
|
156106
|
+
logger20.debug("Cloud count query failed", { source: source.name, error: e20 instanceof Error ? e20.message : String(e20) });
|
|
156057
156107
|
cloudCount = -1;
|
|
156058
156108
|
}
|
|
156059
156109
|
}
|
|
@@ -156176,7 +156226,7 @@ import * as fs29 from "fs";
|
|
|
156176
156226
|
import * as path29 from "path";
|
|
156177
156227
|
init_error_utils();
|
|
156178
156228
|
init_logging();
|
|
156179
|
-
var
|
|
156229
|
+
var logger21 = LoggerFactory.create("pull-agent");
|
|
156180
156230
|
var PullSyncAgent = class {
|
|
156181
156231
|
config;
|
|
156182
156232
|
reader = null;
|
|
@@ -156489,7 +156539,7 @@ init_safe_json();
|
|
|
156489
156539
|
init_logging();
|
|
156490
156540
|
import { resolve as resolve21, dirname as dirname25 } from "path";
|
|
156491
156541
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
156492
|
-
var
|
|
156542
|
+
var logger22 = LoggerFactory.create("sync-embedding-generator");
|
|
156493
156543
|
var __filename6 = fileURLToPath8(import.meta.url);
|
|
156494
156544
|
var __dirname6 = dirname25(__filename6);
|
|
156495
156545
|
|
|
@@ -156925,9 +156975,9 @@ var CohomologyAdapter = class {
|
|
|
156925
156975
|
* @param wasmLoader - WASM module loader
|
|
156926
156976
|
* @param logger - Optional logger for diagnostics
|
|
156927
156977
|
*/
|
|
156928
|
-
constructor(wasmLoader2,
|
|
156978
|
+
constructor(wasmLoader2, logger25 = DEFAULT_COHERENCE_LOGGER) {
|
|
156929
156979
|
this.wasmLoader = wasmLoader2;
|
|
156930
|
-
this.logger =
|
|
156980
|
+
this.logger = logger25;
|
|
156931
156981
|
}
|
|
156932
156982
|
engine = null;
|
|
156933
156983
|
initialized = false;
|
|
@@ -157271,9 +157321,9 @@ var SpectralAdapter = class {
|
|
|
157271
157321
|
* @param wasmLoader - WASM module loader
|
|
157272
157322
|
* @param logger - Optional logger for diagnostics
|
|
157273
157323
|
*/
|
|
157274
|
-
constructor(wasmLoader2,
|
|
157324
|
+
constructor(wasmLoader2, logger25 = DEFAULT_COHERENCE_LOGGER) {
|
|
157275
157325
|
this.wasmLoader = wasmLoader2;
|
|
157276
|
-
this.logger =
|
|
157326
|
+
this.logger = logger25;
|
|
157277
157327
|
}
|
|
157278
157328
|
engine = null;
|
|
157279
157329
|
initialized = false;
|
|
@@ -157682,9 +157732,9 @@ var CausalAdapter = class {
|
|
|
157682
157732
|
* @param wasmLoader - WASM module loader
|
|
157683
157733
|
* @param logger - Optional logger for diagnostics
|
|
157684
157734
|
*/
|
|
157685
|
-
constructor(wasmLoader2,
|
|
157735
|
+
constructor(wasmLoader2, logger25 = DEFAULT_COHERENCE_LOGGER) {
|
|
157686
157736
|
this.wasmLoader = wasmLoader2;
|
|
157687
|
-
this.logger =
|
|
157737
|
+
this.logger = logger25;
|
|
157688
157738
|
}
|
|
157689
157739
|
engine = null;
|
|
157690
157740
|
initialized = false;
|
|
@@ -157977,9 +158027,9 @@ var CategoryAdapter = class {
|
|
|
157977
158027
|
* @param wasmLoader - WASM module loader
|
|
157978
158028
|
* @param logger - Optional logger for diagnostics
|
|
157979
158029
|
*/
|
|
157980
|
-
constructor(wasmLoader2,
|
|
158030
|
+
constructor(wasmLoader2, logger25 = DEFAULT_COHERENCE_LOGGER) {
|
|
157981
158031
|
this.wasmLoader = wasmLoader2;
|
|
157982
|
-
this.logger =
|
|
158032
|
+
this.logger = logger25;
|
|
157983
158033
|
}
|
|
157984
158034
|
engine = null;
|
|
157985
158035
|
initialized = false;
|
|
@@ -158291,9 +158341,9 @@ var HomotopyAdapter = class {
|
|
|
158291
158341
|
* @param wasmLoader - WASM module loader
|
|
158292
158342
|
* @param logger - Optional logger for diagnostics
|
|
158293
158343
|
*/
|
|
158294
|
-
constructor(wasmLoader2,
|
|
158344
|
+
constructor(wasmLoader2, logger25 = DEFAULT_COHERENCE_LOGGER) {
|
|
158295
158345
|
this.wasmLoader = wasmLoader2;
|
|
158296
|
-
this.logger =
|
|
158346
|
+
this.logger = logger25;
|
|
158297
158347
|
}
|
|
158298
158348
|
engine = null;
|
|
158299
158349
|
initialized = false;
|
|
@@ -158494,9 +158544,9 @@ var WitnessAdapter = class {
|
|
|
158494
158544
|
* @param wasmLoader - WASM module loader
|
|
158495
158545
|
* @param logger - Optional logger for diagnostics
|
|
158496
158546
|
*/
|
|
158497
|
-
constructor(wasmLoader2,
|
|
158547
|
+
constructor(wasmLoader2, logger25 = DEFAULT_COHERENCE_LOGGER) {
|
|
158498
158548
|
this.wasmLoader = wasmLoader2;
|
|
158499
|
-
this.logger =
|
|
158549
|
+
this.logger = logger25;
|
|
158500
158550
|
}
|
|
158501
158551
|
engine = null;
|
|
158502
158552
|
initialized = false;
|
|
@@ -158791,10 +158841,10 @@ var CoherenceService = class {
|
|
|
158791
158841
|
* @param config - Optional service configuration
|
|
158792
158842
|
* @param logger - Optional logger for diagnostics
|
|
158793
158843
|
*/
|
|
158794
|
-
constructor(wasmLoader2, config = {},
|
|
158844
|
+
constructor(wasmLoader2, config = {}, logger25) {
|
|
158795
158845
|
this.wasmLoader = wasmLoader2;
|
|
158796
158846
|
this.config = { ...DEFAULT_COHERENCE_CONFIG, ...config };
|
|
158797
|
-
this.logger =
|
|
158847
|
+
this.logger = logger25 || DEFAULT_COHERENCE_LOGGER;
|
|
158798
158848
|
}
|
|
158799
158849
|
config;
|
|
158800
158850
|
logger;
|
|
@@ -159495,15 +159545,15 @@ var CoherenceService = class {
|
|
|
159495
159545
|
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
159496
159546
|
}
|
|
159497
159547
|
};
|
|
159498
|
-
async function createCoherenceService(wasmLoader2, config,
|
|
159499
|
-
const service = new CoherenceService(wasmLoader2, config,
|
|
159548
|
+
async function createCoherenceService(wasmLoader2, config, logger25) {
|
|
159549
|
+
const service = new CoherenceService(wasmLoader2, config, logger25);
|
|
159500
159550
|
await service.initialize();
|
|
159501
159551
|
return service;
|
|
159502
159552
|
}
|
|
159503
159553
|
|
|
159504
159554
|
// src/integrations/coherence/wasm-loader.ts
|
|
159505
159555
|
init_error_utils();
|
|
159506
|
-
import { createRequire as
|
|
159556
|
+
import { createRequire as createRequire11 } from "node:module";
|
|
159507
159557
|
import { fileURLToPath as fileURLToPath9 } from "node:url";
|
|
159508
159558
|
import { dirname as dirname26, join as join63 } from "node:path";
|
|
159509
159559
|
import { readFileSync as readFileSync48, existsSync as existsSync63 } from "node:fs";
|
|
@@ -159759,7 +159809,7 @@ var WasmLoader = class {
|
|
|
159759
159809
|
return false;
|
|
159760
159810
|
}
|
|
159761
159811
|
try {
|
|
159762
|
-
const require2 =
|
|
159812
|
+
const require2 = createRequire11(import.meta.url);
|
|
159763
159813
|
const wasmPaths = [
|
|
159764
159814
|
(() => {
|
|
159765
159815
|
try {
|
|
@@ -159967,7 +160017,7 @@ var WasmLoader = class {
|
|
|
159967
160017
|
async attemptLoad() {
|
|
159968
160018
|
let require2;
|
|
159969
160019
|
try {
|
|
159970
|
-
require2 =
|
|
160020
|
+
require2 = createRequire11(import.meta.url);
|
|
159971
160021
|
} catch {
|
|
159972
160022
|
require2 = globalThis.require || (await import("module")).createRequire(__filename);
|
|
159973
160023
|
}
|
|
@@ -161352,7 +161402,7 @@ init_safe_json();
|
|
|
161352
161402
|
init_logging();
|
|
161353
161403
|
import path32 from "node:path";
|
|
161354
161404
|
import { existsSync as existsSync64 } from "node:fs";
|
|
161355
|
-
var
|
|
161405
|
+
var logger24 = LoggerFactory.create("metrics-tracker");
|
|
161356
161406
|
var LearningMetricsTracker = class {
|
|
161357
161407
|
db = null;
|
|
161358
161408
|
dbPath;
|
|
@@ -161633,7 +161683,7 @@ var LearningMetricsTracker = class {
|
|
|
161633
161683
|
try {
|
|
161634
161684
|
domainCoverage = safeJsonParse(row.domain_coverage_json || "{}");
|
|
161635
161685
|
} catch (e20) {
|
|
161636
|
-
|
|
161686
|
+
logger24.debug("Domain coverage JSON parse failed", { error: e20 instanceof Error ? e20.message : String(e20) });
|
|
161637
161687
|
for (const domain of QE_DOMAIN_LIST) {
|
|
161638
161688
|
domainCoverage[domain] = 0;
|
|
161639
161689
|
}
|
|
@@ -163365,7 +163415,7 @@ async function cleanupAndExit(code = 0) {
|
|
|
163365
163415
|
process.exit(code);
|
|
163366
163416
|
}
|
|
163367
163417
|
var program = new Command20();
|
|
163368
|
-
var VERSION = true ? "3.7.
|
|
163418
|
+
var VERSION = true ? "3.7.13" : "0.0.0-dev";
|
|
163369
163419
|
program.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(VERSION);
|
|
163370
163420
|
var registry2 = createCommandRegistry(context, cleanupAndExit, ensureInitialized, ensureInitializedStrict);
|
|
163371
163421
|
registry2.registerAll(program);
|