agentic-kdd 3.5.4 → 3.5.6
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/mcp-server.cjs +3 -0
- package/package.json +1 -1
- package/regression-guard.cjs +16 -2
- package/spec-gate.cjs +9 -0
- package/src/init.js +16 -0
- package/tdd-gate.cjs +12 -0
package/mcp-server.cjs
CHANGED
|
@@ -545,6 +545,9 @@ console.error(`[Agentic KDD MCP v2.0] ${TOOLS.length} tools disponibles. ROOT: $
|
|
|
545
545
|
// ─── v3.2: TOOLS ADICIONALES ──────────────────────────────────────────────────
|
|
546
546
|
// mem_curate, generate_llms_txt, report_benchmarks, causal_prune
|
|
547
547
|
|
|
548
|
+
// Lookup map para tools registradas dinámicamente (v3.2+)
|
|
549
|
+
const TOOL_MAP = {};
|
|
550
|
+
|
|
548
551
|
// Añadir al TOOL_MAP y TOOLS en runtime
|
|
549
552
|
const TOOLS_V32 = [
|
|
550
553
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-kdd",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.6",
|
|
4
4
|
"description": "Autonomous development pipeline — aa: · ag: · audit: · AST graph · Harness · Specs · Impact analysis · Decision trail · Metrics · MCP server. Works with Cursor and Claude Code.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/regression-guard.cjs
CHANGED
|
@@ -122,8 +122,22 @@ function runTestFile(testPattern, projectRoot) {
|
|
|
122
122
|
const isWin = process.platform === 'win32';
|
|
123
123
|
const shell = isWin ? 'cmd.exe' : 'sh';
|
|
124
124
|
const flag = isWin ? '/c' : '-c';
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
|
|
126
|
+
// Detect Python project
|
|
127
|
+
const isPython =
|
|
128
|
+
fs.existsSync(path.join(projectRoot, 'requirements.txt')) ||
|
|
129
|
+
fs.existsSync(path.join(projectRoot, 'backend', 'requirements.txt'));
|
|
130
|
+
|
|
131
|
+
let cmd;
|
|
132
|
+
if (isPython) {
|
|
133
|
+
// testPattern for pytest = test file or -k expression
|
|
134
|
+
const backendDir = fs.existsSync(path.join(projectRoot, 'backend', 'requirements.txt'))
|
|
135
|
+
? 'backend' : '.';
|
|
136
|
+
cmd = `cd ${backendDir} && pytest -x -v 2>&1`;
|
|
137
|
+
} else {
|
|
138
|
+
cmd = `npm test -- --testPathPattern="${testPattern}" 2>&1`;
|
|
139
|
+
}
|
|
140
|
+
|
|
127
141
|
const result = require('child_process').spawnSync(
|
|
128
142
|
shell, [flag, cmd],
|
|
129
143
|
{ cwd: projectRoot, timeout: 60000, encoding: 'utf8', stdio: 'pipe' }
|
package/spec-gate.cjs
CHANGED
|
@@ -44,12 +44,21 @@ function extractValuesFromPrompt(prompt) {
|
|
|
44
44
|
|
|
45
45
|
// Numbers in context of known business fields
|
|
46
46
|
const businessFields = [
|
|
47
|
+
// SaaS Billing (original)
|
|
47
48
|
'trial_days', 'trial_period', 'trial',
|
|
48
49
|
'discount', 'yearly_discount',
|
|
49
50
|
'password', 'min_password', 'password_min',
|
|
50
51
|
'invoice_prefix', 'invoice_number',
|
|
51
52
|
'max_users', 'max_api_calls', 'max_storage',
|
|
52
53
|
'rate_limit', 'timeout', 'retries',
|
|
54
|
+
// Agency OS
|
|
55
|
+
'hourly_rate', 'hourly_rate_default',
|
|
56
|
+
'overtime_threshold', 'overtime_multiplier', 'overtime',
|
|
57
|
+
'invoice_due', 'invoice_due_days', 'due_days',
|
|
58
|
+
'budget_warning', 'campaign_budget_warning',
|
|
59
|
+
'tax_rate', 'tax_rate_default',
|
|
60
|
+
'password_min_length',
|
|
61
|
+
'retainer_billing_day', 'billing_day',
|
|
53
62
|
];
|
|
54
63
|
|
|
55
64
|
businessFields.forEach(field => {
|
package/src/init.js
CHANGED
|
@@ -222,6 +222,22 @@ async function init() {
|
|
|
222
222
|
process.exit(1);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
// ── Agregar dev:kdd al package.json si es proyecto Node ────
|
|
226
|
+
const pkgPath = path.join(projectPath, 'package.json');
|
|
227
|
+
if (fs.existsSync(pkgPath) && stack.language !== 'Python') {
|
|
228
|
+
try {
|
|
229
|
+
const pkg = fs.readJsonSync(pkgPath, { throws: false }) || {};
|
|
230
|
+
if (!pkg.scripts) pkg.scripts = {};
|
|
231
|
+
if (!pkg.scripts['dev:kdd']) {
|
|
232
|
+
pkg.scripts['dev:kdd'] = 'npm run dev 2>&1 | node .agentic/grafo/watch-errors.cjs';
|
|
233
|
+
fs.writeJsonSync(pkgPath, pkg, { spaces: 2 });
|
|
234
|
+
console.log(chalk.green(' ✓ Script dev:kdd agregado al package.json'));
|
|
235
|
+
}
|
|
236
|
+
} catch(e) {
|
|
237
|
+
console.log(chalk.yellow(' ⚠ No se pudo agregar dev:kdd al package.json — agrégalo manualmente'));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
225
241
|
// ── PREGUNTA 3: Docs (DESPUÉS de crear carpetas) ───────────
|
|
226
242
|
const { hasDocs } = await inquirer.prompt([{
|
|
227
243
|
type: 'confirm', name: 'hasDocs',
|
package/tdd-gate.cjs
CHANGED
|
@@ -32,6 +32,10 @@ const TEST_COMMANDS = [
|
|
|
32
32
|
'npx jest --passWithNoTests',
|
|
33
33
|
'npx vitest run',
|
|
34
34
|
'npx jest',
|
|
35
|
+
// Python projects
|
|
36
|
+
'pytest',
|
|
37
|
+
'python -m pytest',
|
|
38
|
+
'python3 -m pytest',
|
|
35
39
|
];
|
|
36
40
|
|
|
37
41
|
// ─── TEST RUNNER ──────────────────────────────────────────────────────────────
|
|
@@ -356,6 +360,14 @@ function runSelfHealingLoop(opts) {
|
|
|
356
360
|
const contractGuardPath = require('path').join(__dirname, 'contract-guard.cjs');
|
|
357
361
|
const cg = require(contractGuardPath);
|
|
358
362
|
const dbPath = require('path').join(projectRoot || process.cwd(), '.agentic/memoria.db');
|
|
363
|
+
// Add project node_modules to require path so better-sqlite3 can be found
|
|
364
|
+
const projNodeModules = require('path').join(projectRoot || process.cwd(), 'node_modules');
|
|
365
|
+
if (!require.resolve.paths('better-sqlite3').includes(projNodeModules)) {
|
|
366
|
+
require('module').Module._nodeModulePaths(projNodeModules).forEach(p => {
|
|
367
|
+
if (!require.resolve.paths('').includes(p)) require.resolve.paths('').push(p);
|
|
368
|
+
});
|
|
369
|
+
module.paths.unshift(projNodeModules);
|
|
370
|
+
}
|
|
359
371
|
const DB = (() => {
|
|
360
372
|
try { return new (require('better-sqlite3'))(dbPath); } catch { return null; }
|
|
361
373
|
})();
|