@jigyasudham/veto 0.8.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -52
- package/dist/agents/executor.js +36 -3
- package/dist/cli.js +350 -51
- package/dist/context/reader.js +113 -0
- package/dist/council/index.js +3 -1
- package/dist/plugins/loader.js +49 -0
- package/dist/router/index.js +2 -2
- package/dist/router/learning-updater.js +45 -1
- package/dist/server.js +478 -14
- package/dist/watcher/index.js +77 -0
- package/dist/workflow/pipeline.js +64 -0
- package/package.json +12 -3
- package/.claude/settings.local.json +0 -9
- package/src/adapters/claude.ts +0 -70
- package/src/adapters/codex.ts +0 -71
- package/src/adapters/gemini.ts +0 -71
- package/src/adapters/index.ts +0 -217
- package/src/agents/development/api.ts +0 -120
- package/src/agents/development/backend.ts +0 -85
- package/src/agents/development/coder.ts +0 -213
- package/src/agents/development/database.ts +0 -83
- package/src/agents/development/debugger.ts +0 -238
- package/src/agents/development/devops.ts +0 -86
- package/src/agents/development/frontend.ts +0 -85
- package/src/agents/development/migration.ts +0 -144
- package/src/agents/development/performance.ts +0 -144
- package/src/agents/development/refactor.ts +0 -86
- package/src/agents/development/reviewer.ts +0 -268
- package/src/agents/development/tester.ts +0 -151
- package/src/agents/executor.ts +0 -158
- package/src/agents/memory/context-manager.ts +0 -171
- package/src/agents/memory/decision-logger.ts +0 -160
- package/src/agents/memory/knowledge-base.ts +0 -124
- package/src/agents/memory/pattern-learner.ts +0 -143
- package/src/agents/memory/project-mapper.ts +0 -118
- package/src/agents/quality/accessibility.ts +0 -99
- package/src/agents/quality/code-quality.ts +0 -115
- package/src/agents/quality/compatibility.ts +0 -58
- package/src/agents/quality/documentation.ts +0 -105
- package/src/agents/quality/error-handling.ts +0 -96
- package/src/agents/research/competitor-analyzer.ts +0 -45
- package/src/agents/research/cost-analyzer.ts +0 -54
- package/src/agents/research/estimator.ts +0 -60
- package/src/agents/research/ethics-bias.ts +0 -113
- package/src/agents/research/researcher.ts +0 -114
- package/src/agents/research/risk-assessor.ts +0 -63
- package/src/agents/research/tech-advisor.ts +0 -55
- package/src/agents/security/auth.ts +0 -287
- package/src/agents/security/dependency-audit.ts +0 -337
- package/src/agents/security/penetration.ts +0 -262
- package/src/agents/security/privacy.ts +0 -285
- package/src/agents/security/scanner.ts +0 -322
- package/src/agents/security/secrets.ts +0 -249
- package/src/agents/types.ts +0 -66
- package/src/agents/workflow/automation.ts +0 -59
- package/src/agents/workflow/file-manager.ts +0 -52
- package/src/agents/workflow/git-agent.ts +0 -55
- package/src/agents/workflow/reporter.ts +0 -51
- package/src/agents/workflow/search-agent.ts +0 -40
- package/src/agents/workflow/task-coordinator.ts +0 -41
- package/src/agents/workflow/task-planner.ts +0 -47
- package/src/cli.ts +0 -135
- package/src/council/decision-engine.ts +0 -171
- package/src/council/devil-advocate.ts +0 -116
- package/src/council/index.ts +0 -44
- package/src/council/lead-developer.ts +0 -118
- package/src/council/legal-compliance.ts +0 -152
- package/src/council/product-manager.ts +0 -102
- package/src/council/security.ts +0 -172
- package/src/council/system-architect.ts +0 -132
- package/src/council/types.ts +0 -33
- package/src/council/ux-designer.ts +0 -121
- package/src/memory/local.ts +0 -305
- package/src/memory/schema.ts +0 -174
- package/src/memory/sync.ts +0 -274
- package/src/router/complexity-scorer.ts +0 -96
- package/src/router/context-compressor.ts +0 -74
- package/src/router/index.ts +0 -60
- package/src/router/learning-updater.ts +0 -271
- package/src/router/model-selector.ts +0 -83
- package/src/router/rate-monitor.ts +0 -103
- package/src/server.ts +0 -1038
- package/src/skills/development/skill-api-design.ts +0 -329
- package/src/skills/development/skill-auth.ts +0 -271
- package/src/skills/development/skill-ci-cd.ts +0 -0
- package/src/skills/development/skill-crud.ts +0 -209
- package/src/skills/development/skill-db-schema.ts +0 -0
- package/src/skills/development/skill-docker.ts +0 -0
- package/src/skills/development/skill-env-setup.ts +0 -0
- package/src/skills/development/skill-scaffold.ts +0 -323
- package/src/skills/intelligence/skill-complexity-score.ts +0 -69
- package/src/skills/intelligence/skill-cost-track.ts +0 -39
- package/src/skills/intelligence/skill-learning-loop.ts +0 -69
- package/src/skills/intelligence/skill-pattern-detect.ts +0 -38
- package/src/skills/intelligence/skill-rate-watch.ts +0 -61
- package/src/skills/memory/skill-context-compress.ts +0 -98
- package/src/skills/memory/skill-cross-sync.ts +0 -104
- package/src/skills/memory/skill-decision-log.ts +0 -119
- package/src/skills/memory/skill-session-restore.ts +0 -59
- package/src/skills/memory/skill-session-save.ts +0 -94
- package/src/skills/quality/skill-accessibility.ts +0 -0
- package/src/skills/quality/skill-code-review.ts +0 -84
- package/src/skills/quality/skill-docs-gen.ts +0 -0
- package/src/skills/quality/skill-perf-audit.ts +0 -0
- package/src/skills/quality/skill-security-scan.ts +0 -91
- package/src/skills/quality/skill-test-suite.ts +0 -290
- package/src/skills/workflow/skill-deploy.ts +0 -0
- package/src/skills/workflow/skill-git-workflow.ts +0 -0
- package/src/skills/workflow/skill-rollback.ts +0 -0
- package/src/skills/workflow/skill-task-breakdown.ts +0 -0
- package/tsconfig.json +0 -20
|
@@ -2,10 +2,54 @@
|
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { getDb } from '../memory/local.js';
|
|
4
4
|
// ─── Record ───────────────────────────────────────────────────────────────────
|
|
5
|
-
export function recordOutcome(taskType, complexity, modelTier, agent, outputQuality, tokensUsed = 0) {
|
|
5
|
+
export function recordOutcome(taskType, complexity, modelTier, agent, outputQuality, tokensUsed = 0, fileExt) {
|
|
6
6
|
const db = getDb();
|
|
7
7
|
db.prepare(`INSERT INTO learning_data (id, task_type, complexity, model_tier, output_quality, tokens_used, agent)
|
|
8
8
|
VALUES (?, ?, ?, ?, ?, ?, ?)`).run(randomUUID(), taskType, complexity, modelTier, outputQuality, tokensUsed, agent);
|
|
9
|
+
// Predictive routing: track agent quality per file extension and task type keyword
|
|
10
|
+
if (agent && agent !== 'dynamic' && outputQuality > 0) {
|
|
11
|
+
const now = new Date().toISOString();
|
|
12
|
+
const upsert = (key) => {
|
|
13
|
+
const existing = db.prepare('SELECT id, pattern_val, confidence, seen_count FROM patterns WHERE pattern_key = ?').get(key);
|
|
14
|
+
if (existing) {
|
|
15
|
+
// running average quality as confidence (0–1)
|
|
16
|
+
const newConf = ((existing.confidence * existing.seen_count) + (outputQuality / 100)) / (existing.seen_count + 1);
|
|
17
|
+
db.prepare('UPDATE patterns SET confidence = ?, seen_count = ?, updated_at = ? WHERE pattern_key = ?')
|
|
18
|
+
.run(Math.min(1, newConf), existing.seen_count + 1, now, key);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
db.prepare('INSERT INTO patterns (id, pattern_key, pattern_val, confidence, seen_count, updated_at) VALUES (?, ?, ?, ?, ?, ?)')
|
|
22
|
+
.run(randomUUID(), key, agent, outputQuality / 100, 1, now);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
if (fileExt)
|
|
26
|
+
upsert(`file_agent:${fileExt.toLowerCase()}:${agent}`);
|
|
27
|
+
const keyword = taskType.toLowerCase().split(/[\s_-]/)[0];
|
|
28
|
+
if (keyword)
|
|
29
|
+
upsert(`task_agent:${keyword}:${agent}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// ─── Predictive Agent Recommendation ─────────────────────────────────────────
|
|
33
|
+
export function getRecommendedAgent(taskType, fileExt) {
|
|
34
|
+
const db = getDb();
|
|
35
|
+
// Try file extension match first (more specific)
|
|
36
|
+
if (fileExt) {
|
|
37
|
+
const rows = db.prepare(`SELECT pattern_key, pattern_val, confidence, seen_count FROM patterns
|
|
38
|
+
WHERE pattern_key LIKE ? AND seen_count >= 3
|
|
39
|
+
ORDER BY confidence DESC LIMIT 1`).all(`file_agent:${fileExt.toLowerCase()}:%`);
|
|
40
|
+
if (rows.length > 0 && rows[0].confidence >= 0.7)
|
|
41
|
+
return rows[0].pattern_val;
|
|
42
|
+
}
|
|
43
|
+
// Fall back to task keyword match
|
|
44
|
+
const keyword = taskType.toLowerCase().split(/[\s_-]/)[0];
|
|
45
|
+
if (keyword) {
|
|
46
|
+
const rows = db.prepare(`SELECT pattern_key, pattern_val, confidence, seen_count FROM patterns
|
|
47
|
+
WHERE pattern_key LIKE ? AND seen_count >= 3
|
|
48
|
+
ORDER BY confidence DESC LIMIT 1`).all(`task_agent:${keyword}:%`);
|
|
49
|
+
if (rows.length > 0 && rows[0].confidence >= 0.7)
|
|
50
|
+
return rows[0].pattern_val;
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
9
53
|
}
|
|
10
54
|
// ─── Stats ────────────────────────────────────────────────────────────────────
|
|
11
55
|
export function getLearningStats() {
|