tribunal-kit 5.8.4 → 6.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/.agent/ARCHITECTURE.md +219 -215
- package/.agent/agents/accessibility-reviewer.md +66 -151
- package/.agent/agents/ai-code-reviewer.md +22 -2
- package/.agent/agents/anti-pattern-reviewer.md +99 -0
- package/.agent/agents/api-architect.md +19 -2
- package/.agent/agents/backend-specialist.md +25 -3
- package/.agent/agents/cloud-engineer.md +21 -0
- package/.agent/agents/code-archaeologist.md +20 -3
- package/.agent/agents/complexity-reviewer.md +22 -2
- package/.agent/agents/database-architect.md +24 -3
- package/.agent/agents/db-latency-auditor.md +22 -2
- package/.agent/agents/debugger.md +19 -3
- package/.agent/agents/dependency-reviewer.md +19 -2
- package/.agent/agents/devops-engineer.md +24 -3
- package/.agent/agents/documentation-writer.md +21 -3
- package/.agent/agents/explorer-agent.md +21 -3
- package/.agent/agents/frontend-reviewer.md +19 -3
- package/.agent/agents/frontend-specialist.md +72 -224
- package/.agent/agents/game-developer.md +22 -3
- package/.agent/agents/interaction-reviewer.md +118 -0
- package/.agent/agents/logic-reviewer.md +18 -3
- package/.agent/agents/minimalist-reviewer.md +98 -0
- package/.agent/agents/mobile-developer.md +21 -3
- package/.agent/agents/mobile-reviewer.md +22 -2
- package/.agent/agents/orchestrator.md +19 -3
- package/.agent/agents/penetration-tester.md +22 -3
- package/.agent/agents/performance-optimizer.md +21 -3
- package/.agent/agents/performance-reviewer.md +2 -0
- package/.agent/agents/precedence-reviewer.md +19 -5
- package/.agent/agents/product-manager.md +20 -3
- package/.agent/agents/product-owner.md +22 -1
- package/.agent/agents/product-reviewer.md +98 -0
- package/.agent/agents/project-planner.md +19 -3
- package/.agent/agents/qa-automation-engineer.md +24 -3
- package/.agent/agents/resilience-reviewer.md +21 -2
- package/.agent/agents/schema-reviewer.md +21 -2
- package/.agent/agents/security-auditor.md +7 -1
- package/.agent/agents/seo-specialist.md +18 -3
- package/.agent/agents/sql-reviewer.md +22 -2
- package/.agent/agents/supervisor-agent.md +22 -3
- package/.agent/agents/swarm-worker-registry.md +7 -0
- package/.agent/agents/system-architect.md +19 -0
- package/.agent/agents/test-coverage-reviewer.md +22 -2
- package/.agent/agents/test-engineer.md +21 -2
- package/.agent/agents/throughput-optimizer.md +22 -2
- package/.agent/agents/type-safety-reviewer.md +21 -2
- package/.agent/agents/ui-ux-auditor.md +44 -242
- package/.agent/agents/ui-visual-auditor.md +99 -0
- package/.agent/agents/ux-reviewer.md +104 -0
- package/.agent/agents/visual-reviewer.md +98 -0
- package/.agent/agents/vitals-reviewer.md +23 -2
- package/.agent/history/README.md +53 -0
- package/.agent/history/case-law/cases/template-case.json +19 -0
- package/.agent/history/integrity_manifest.json +131 -33
- package/.agent/history/memory/.memory.idx +1581 -1
- package/.agent/history/memory/MEMORY.md +105 -1
- package/.agent/routing_index.json +272 -690
- package/.agent/rules/GEMINI.md +10 -12
- package/.agent/rules/GEMINI_PLANNER.md +84 -0
- package/.agent/scripts/_utils.js +28 -7
- package/.agent/scripts/case_law_manager.js +2 -0
- package/.agent/scripts/context_broker.js +152 -19
- package/.agent/scripts/guardrail_engine.js +60 -5
- package/.agent/scripts/impact_classifier.js +167 -0
- package/.agent/scripts/integrity_manifest.js +10 -4
- package/.agent/scripts/marathon_harness.js +10 -1
- package/.agent/scripts/minimal_change_engine.js +437 -0
- package/.agent/scripts/pipeline_engine.js +856 -0
- package/.agent/scripts/skill_evolution.js +36 -21
- package/.agent/scripts/socratic_gate_policy.js +60 -0
- package/.agent/scripts/swarm_dispatcher.js +65 -6
- package/.agent/scripts/token_budget_broker.js +52 -0
- package/.agent/scripts/verify_all.js +13 -0
- package/.agent/scripts/visual_audit.js +92 -0
- package/.agent/skills/12-principles-of-animation/SKILL.md +19 -10
- package/.agent/skills/60fps-animation/SKILL.md +19 -10
- package/.agent/skills/accessible-animation/SKILL.md +19 -10
- package/.agent/skills/adapt/SKILL.md +19 -10
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +21 -3
- package/.agent/skills/agent-organizer/SKILL.md +21 -7
- package/.agent/skills/agentic-patterns/SKILL.md +19 -7
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +21 -7
- package/.agent/skills/animation-on-scroll/SKILL.md +19 -10
- package/.agent/skills/animation-systems/SKILL.md +19 -10
- package/.agent/skills/antfu-conventions/SKILL.md +21 -10
- package/.agent/skills/api-patterns/SKILL.md +21 -7
- package/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-311.pyc +0 -0
- package/.agent/skills/api-security-auditor/SKILL.md +21 -7
- package/.agent/skills/app-builder/SKILL.md +21 -7
- package/.agent/skills/apple-design/SKILL.md +19 -10
- package/.agent/skills/architecture/SKILL.md +21 -7
- package/.agent/skills/audit-and-fix/SKILL.md +19 -10
- package/.agent/skills/authentication-best-practices/SKILL.md +21 -7
- package/.agent/skills/backend-security-expert/SKILL.md +21 -7
- package/.agent/skills/baseline-ui/SKILL.md +19 -10
- package/.agent/skills/bash-linux/SKILL.md +21 -7
- package/.agent/skills/behavioral-modes/SKILL.md +19 -7
- package/.agent/skills/better-colors/SKILL.md +31 -14
- package/.agent/skills/better-ui/SKILL.md +19 -10
- package/.agent/skills/bolder/SKILL.md +19 -10
- package/.agent/skills/brainstorming/SKILL.md +17 -7
- package/.agent/skills/browser-native-ai/SKILL.md +19 -3
- package/.agent/skills/build-primitive/SKILL.md +19 -10
- package/.agent/skills/building-native-ui/SKILL.md +21 -7
- package/.agent/skills/cicd-pro/SKILL.md +21 -10
- package/.agent/skills/clarify/SKILL.md +19 -10
- package/.agent/skills/clean-code/SKILL.md +21 -7
- package/.agent/skills/cloud-architect/SKILL.md +21 -10
- package/.agent/skills/cobejs/SKILL.md +19 -10
- package/.agent/skills/code-review-checklist/SKILL.md +21 -7
- package/.agent/skills/codebase-design/SKILL.md +21 -10
- package/.agent/skills/colorize/SKILL.md +19 -10
- package/.agent/skills/compact-landing/SKILL.md +19 -10
- package/.agent/skills/company-logos/SKILL.md +19 -10
- package/.agent/skills/config-validator/SKILL.md +21 -7
- package/.agent/skills/containerization-pro/SKILL.md +21 -10
- package/.agent/skills/create-design-md/SKILL.md +19 -10
- package/.agent/skills/critique/SKILL.md +19 -10
- package/.agent/skills/csharp-developer/SKILL.md +21 -7
- package/.agent/skills/data-validation-schemas/SKILL.md +21 -7
- package/.agent/skills/database-design/SKILL.md +21 -7
- package/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-311.pyc +0 -0
- package/.agent/skills/delight/SKILL.md +19 -10
- package/.agent/skills/deployment-procedures/SKILL.md +21 -7
- package/.agent/skills/design-lab/SKILL.md +21 -10
- package/.agent/skills/devops-engineer/SKILL.md +21 -7
- package/.agent/skills/devops-incident-responder/SKILL.md +21 -7
- package/.agent/skills/diagnosing-bugs/SKILL.md +21 -10
- package/.agent/skills/distill/SKILL.md +19 -10
- package/.agent/skills/documentation-templates/SKILL.md +21 -7
- package/.agent/skills/domain-modeling/SKILL.md +21 -10
- package/.agent/skills/edge-computing/SKILL.md +21 -7
- package/.agent/skills/emil-design-eng/SKILL.md +19 -10
- package/.agent/skills/error-resilience/SKILL.md +21 -7
- package/.agent/skills/extract-design-system/SKILL.md +21 -7
- package/.agent/skills/fabel-protocol/SKILL.md +19 -2
- package/.agent/skills/fixing-accessibility/SKILL.md +25 -14
- package/.agent/skills/fixing-metadata/SKILL.md +19 -10
- package/.agent/skills/fixing-motion-performance/SKILL.md +19 -10
- package/.agent/skills/framer-motion-expert/SKILL.md +19 -6
- package/.agent/skills/frontend-design/SKILL.md +66 -204
- package/.agent/skills/frontend-design/scripts/__pycache__/accessibility_checker.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-design/scripts/__pycache__/ux_audit.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-security-expert/SKILL.md +21 -7
- package/.agent/skills/game-design-expert/SKILL.md +21 -7
- package/.agent/skills/game-engineering-expert/SKILL.md +21 -7
- package/.agent/skills/generative-ui-expert/SKILL.md +19 -3
- package/.agent/skills/geo-fundamentals/SKILL.md +21 -7
- package/.agent/skills/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/git-pro/SKILL.md +21 -10
- package/.agent/skills/github-operations/SKILL.md +21 -7
- package/.agent/skills/gpt-taste/SKILL.md +19 -10
- package/.agent/skills/gsap-core/SKILL.md +21 -4
- package/.agent/skills/gsap-frameworks/SKILL.md +21 -4
- package/.agent/skills/gsap-performance/SKILL.md +20 -5
- package/.agent/skills/gsap-plugins/SKILL.md +20 -5
- package/.agent/skills/gsap-react/SKILL.md +20 -5
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +21 -4
- package/.agent/skills/gsap-timeline/SKILL.md +20 -5
- package/.agent/skills/gsap-utils/SKILL.md +20 -5
- package/.agent/skills/harden/SKILL.md +19 -10
- package/.agent/skills/harness-protocol/SKILL.md +20 -4
- package/.agent/skills/i18n-localization/SKILL.md +21 -7
- package/.agent/skills/i18n-localization/scripts/__pycache__/i18n_checker.cpython-311.pyc +0 -0
- package/.agent/skills/impeccable/SKILL.md +21 -10
- package/.agent/skills/improve-codebase-architecture/SKILL.md +21 -10
- package/.agent/skills/improve-ui/SKILL.md +19 -10
- package/.agent/skills/intelligent-routing/SKILL.md +19 -7
- package/.agent/skills/knowledge-graph/SKILL.md +20 -4
- package/.agent/skills/landing-page/SKILL.md +20 -10
- package/.agent/skills/lint-and-validate/SKILL.md +21 -7
- package/.agent/skills/lint-and-validate/scripts/__pycache__/lint_runner.cpython-311.pyc +0 -0
- package/.agent/skills/lint-and-validate/scripts/__pycache__/type_coverage.cpython-311.pyc +0 -0
- package/.agent/skills/llm-engineering/SKILL.md +21 -7
- package/.agent/skills/local-first/SKILL.md +21 -7
- package/.agent/skills/local-first-architecture/SKILL.md +19 -10
- package/.agent/skills/lottie-animation/SKILL.md +19 -10
- package/.agent/skills/marquee-loop/SKILL.md +19 -10
- package/.agent/skills/masked-reveal/SKILL.md +19 -10
- package/.agent/skills/mcp-builder/SKILL.md +21 -7
- package/.agent/skills/micro-interaction/SKILL.md +19 -10
- package/.agent/skills/mobile-design/SKILL.md +21 -6
- package/.agent/skills/mobile-design/scripts/__pycache__/mobile_audit.cpython-311.pyc +0 -0
- package/.agent/skills/monorepo-management/SKILL.md +21 -7
- package/.agent/skills/morphing-icons/SKILL.md +19 -10
- package/.agent/skills/motion-engineering/SKILL.md +86 -171
- package/.agent/skills/nextjs-react-expert/SKILL.md +19 -7
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/convert_rules.cpython-311.pyc +0 -0
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/react_performance_checker.cpython-311.pyc +0 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +21 -7
- package/.agent/skills/observability/SKILL.md +21 -7
- package/.agent/skills/page-transition-animation/SKILL.md +19 -10
- package/.agent/skills/parallel-agents/SKILL.md +23 -7
- package/.agent/skills/performance-profiling/SKILL.md +21 -7
- package/.agent/skills/performance-profiling/scripts/__pycache__/lighthouse_audit.cpython-311.pyc +0 -0
- package/.agent/skills/plan-writing/SKILL.md +21 -7
- package/.agent/skills/platform-engineer/SKILL.md +21 -7
- package/.agent/skills/playwright-best-practices/SKILL.md +21 -7
- package/.agent/skills/polish/SKILL.md +19 -10
- package/.agent/skills/powershell-windows/SKILL.md +21 -7
- package/.agent/skills/pricing-page/SKILL.md +19 -10
- package/.agent/skills/product-aware-heuristics/SKILL.md +358 -0
- package/.agent/skills/progressive-blur/SKILL.md +19 -10
- package/.agent/skills/project-idioms/SKILL.md +20 -8
- package/.agent/skills/python-patterns/SKILL.md +21 -7
- package/.agent/skills/python-pro/SKILL.md +21 -6
- package/.agent/skills/quieter/SKILL.md +19 -10
- package/.agent/skills/react-doctor/SKILL.md +19 -10
- package/.agent/skills/react-specialist/SKILL.md +19 -6
- package/.agent/skills/readme-builder/SKILL.md +21 -7
- package/.agent/skills/realtime-patterns/SKILL.md +21 -7
- package/.agent/skills/red-team-tactics/SKILL.md +21 -7
- package/.agent/skills/redesign-skill/SKILL.md +19 -10
- package/.agent/skills/review-animations/SKILL.md +21 -10
- package/.agent/skills/rust-pro/SKILL.md +21 -7
- package/.agent/skills/seo-fundamentals/SKILL.md +21 -7
- package/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/server-management/SKILL.md +21 -7
- package/.agent/skills/shadcn-ui-expert/SKILL.md +21 -7
- package/.agent/skills/shape/SKILL.md +19 -10
- package/.agent/skills/skill-creator/SKILL.md +21 -7
- package/.agent/skills/soft-skill/SKILL.md +19 -10
- package/.agent/skills/sounds-on-the-web/SKILL.md +19 -10
- package/.agent/skills/sql-pro/SKILL.md +21 -7
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +21 -7
- package/.agent/skills/svg-animation/SKILL.md +19 -10
- package/.agent/skills/swiftui-expert/SKILL.md +21 -7
- package/.agent/skills/swiss-design/SKILL.md +19 -10
- package/.agent/skills/system-design-pro/SKILL.md +21 -9
- package/.agent/skills/systematic-debugging/SKILL.md +21 -7
- package/.agent/skills/tailwind-patterns/SKILL.md +21 -7
- package/.agent/skills/taste-skill/SKILL.md +19 -10
- package/.agent/skills/tdd-workflow/SKILL.md +21 -10
- package/.agent/skills/test-result-analyzer/SKILL.md +18 -6
- package/.agent/skills/testing-patterns/SKILL.md +21 -7
- package/.agent/skills/testing-patterns/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +21 -10
- package/.agent/skills/thinking-protocol/SKILL.md +20 -8
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +19 -10
- package/.agent/skills/transitions-dev/SKILL.md +19 -10
- package/.agent/skills/trend-researcher/SKILL.md +17 -6
- package/.agent/skills/typescript-advanced/SKILL.md +21 -7
- package/.agent/skills/typeset/SKILL.md +19 -10
- package/.agent/skills/ui-reasoning-engine/SKILL.md +154 -0
- package/.agent/skills/ui-skill-packs/SKILL.md +77 -0
- package/.agent/skills/ui-skills-root/SKILL.md +21 -9
- package/.agent/skills/ui-ux-pro-max/SKILL.md +62 -583
- package/.agent/skills/ui-ux-researcher/SKILL.md +17 -6
- package/.agent/skills/vue-expert/SKILL.md +19 -6
- package/.agent/skills/vulnerability-scanner/SKILL.md +21 -7
- package/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/skills/web-accessibility-auditor/SKILL.md +21 -7
- package/.agent/skills/web-design-guidelines/SKILL.md +32 -206
- package/.agent/skills/web-quality-audit/SKILL.md +19 -10
- package/.agent/skills/webapp-testing/SKILL.md +21 -7
- package/.agent/skills/webapp-testing/scripts/__pycache__/playwright_runner.cpython-311.pyc +0 -0
- package/.agent/skills/webgpu-performance/SKILL.md +19 -3
- package/.agent/skills/whimsy-injector/SKILL.md +20 -10
- package/.agent/skills/workflow-optimizer/SKILL.md +16 -6
- package/.agent/templates/DESIGN.md +292 -0
- package/.agent/templates/design-tokens.json +137 -0
- package/.agent/workflows/acf.md +13 -6
- package/.agent/workflows/api-tester.md +15 -8
- package/.agent/workflows/audit.md +19 -8
- package/.agent/workflows/brainstorm.md +14 -9
- package/.agent/workflows/changelog.md +14 -8
- package/.agent/workflows/create.md +16 -8
- package/.agent/workflows/debug.md +15 -10
- package/.agent/workflows/deploy.md +16 -8
- package/.agent/workflows/enhance.md +15 -10
- package/.agent/workflows/fix.md +15 -8
- package/.agent/workflows/generate.md +17 -11
- package/.agent/workflows/marathon.md +15 -8
- package/.agent/workflows/migrate.md +16 -8
- package/.agent/workflows/minimal.md +94 -0
- package/.agent/workflows/orchestrate.md +15 -8
- package/.agent/workflows/performance-benchmarker.md +15 -8
- package/.agent/workflows/pipeline.md +155 -0
- package/.agent/workflows/plan.md +14 -10
- package/.agent/workflows/preview.md +14 -7
- package/.agent/workflows/refactor.md +16 -8
- package/.agent/workflows/review-ai.md +15 -7
- package/.agent/workflows/review.md +15 -7
- package/.agent/workflows/session.md +14 -7
- package/.agent/workflows/status.md +13 -7
- package/.agent/workflows/strengthen-skills.md +15 -6
- package/.agent/workflows/super-prompt.md +19 -10
- package/.agent/workflows/swarm.md +15 -7
- package/.agent/workflows/test.md +15 -8
- package/.agent/workflows/tribunal-backend.md +16 -9
- package/.agent/workflows/tribunal-database.md +15 -8
- package/.agent/workflows/tribunal-frontend.md +26 -11
- package/.agent/workflows/tribunal-full.md +29 -14
- package/.agent/workflows/tribunal-mobile.md +15 -8
- package/.agent/workflows/tribunal-performance.md +15 -8
- package/.agent/workflows/tribunal-speed.md +16 -9
- package/.agent/workflows/tribunal-ui.md +82 -0
- package/.agent/workflows/ui-ux-pro-max.md +51 -107
- package/CONTRIBUTING.md +2 -2
- package/README.md +5 -5
- package/bin/mcp-server.js +126 -76
- package/bin/wrapper.js +67 -31
- package/dist/cli.js +39 -1
- package/dist/commands/compile.js +7 -0
- package/dist/commands/context.js +8 -3
- package/dist/commands/graph.js +8 -2
- package/dist/commands/init.js +37 -2
- package/dist/commands/memory.js +119 -68
- package/dist/commands/minimal.js +71 -0
- package/dist/commands/native.js +228 -0
- package/dist/commands/optimize.js +15 -5
- package/dist/commands/validate.js +67 -0
- package/dist/esm/index.mjs +26 -32
- package/dist/mcp/server.js +4 -138
- package/dist/utils/fs.js +10 -4
- package/dist/utils/helpers.js +10 -1
- package/dist/utils/version.js +9 -2
- package/mcp_config.json +10 -1
- package/package.json +19 -15
- package/scripts/benchmark.js +58 -0
- package/scripts/sync-version.js +129 -76
- package/scripts/visual_audit.js +126 -0
package/dist/esm/index.mjs
CHANGED
|
@@ -34,83 +34,77 @@ export const runShellAsync = helpers.runShellAsync;
|
|
|
34
34
|
export const getKitAgent = helpers.getKitAgent;
|
|
35
35
|
export const banner = helpers.banner;
|
|
36
36
|
|
|
37
|
+
// Helper to wrap CommonJS requires in friendly error diagnostics
|
|
38
|
+
function loadCommand(modulePath, functionName, ...args) {
|
|
39
|
+
try {
|
|
40
|
+
const mod = require(modulePath);
|
|
41
|
+
return mod[functionName](...args);
|
|
42
|
+
} catch (err) {
|
|
43
|
+
throw new Error(`Tribunal ESM wrapper failed to load command '${functionName}' from '${modulePath}': ${err.message}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
37
47
|
// ── Lazy command loaders (imported on demand) ────────────
|
|
38
48
|
export async function cmdInit(flags, quiet) {
|
|
39
|
-
|
|
40
|
-
return mod.cmdInit(flags, quiet);
|
|
49
|
+
return loadCommand('../commands/init.js', 'cmdInit', flags, quiet);
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
export async function cmdUpdate(flags) {
|
|
44
|
-
|
|
45
|
-
return mod.cmdUpdate(flags);
|
|
53
|
+
return loadCommand('../commands/update.js', 'cmdUpdate', flags);
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
export function cmdStatus(flags, quiet) {
|
|
49
|
-
|
|
50
|
-
return mod.cmdStatus(flags, quiet);
|
|
57
|
+
return loadCommand('../commands/status.js', 'cmdStatus', flags, quiet);
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
export async function cmdLearn(flags, quiet) {
|
|
54
|
-
|
|
55
|
-
return mod.cmdLearn(flags, quiet);
|
|
61
|
+
return loadCommand('../commands/learn.js', 'cmdLearn', flags, quiet);
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
export async function cmdCase(flags, argv, quiet) {
|
|
59
|
-
|
|
60
|
-
return mod.cmdCase(flags, argv, quiet);
|
|
65
|
+
return loadCommand('../commands/case.js', 'cmdCase', flags, argv, quiet);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
export function cmdHook(flags) {
|
|
64
|
-
|
|
65
|
-
return mod.cmdHook(flags);
|
|
69
|
+
return loadCommand('../commands/hook.js', 'cmdHook', flags);
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
export async function cmdGraph(flags, quiet) {
|
|
69
|
-
|
|
70
|
-
return mod.cmdGraph(flags, quiet);
|
|
73
|
+
return loadCommand('../commands/graph.js', 'cmdGraph', flags, quiet);
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
export async function cmdMutate(flags, argv) {
|
|
74
|
-
|
|
75
|
-
return mod.cmdMutate(flags, argv);
|
|
77
|
+
return loadCommand('../commands/mutate.js', 'cmdMutate', flags, argv);
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
export function cmdContext(flags, argv) {
|
|
79
|
-
|
|
80
|
-
return mod.cmdContext(flags, argv);
|
|
81
|
+
return loadCommand('../commands/context.js', 'cmdContext', flags, argv);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
export async function cmdSync() {
|
|
84
|
-
|
|
85
|
-
return mod.cmdSync();
|
|
85
|
+
return loadCommand('../commands/sync.js', 'cmdSync');
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
export async function cmdAlign(flags, argv, quiet) {
|
|
89
|
-
|
|
90
|
-
return mod.cmdAlign(flags, argv, quiet);
|
|
89
|
+
return loadCommand('../commands/align.js', 'cmdAlign', flags, argv, quiet);
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
export async function cmdMarathon(flags, argv, quiet) {
|
|
94
|
-
|
|
95
|
-
return mod.cmdMarathon(flags, argv, quiet);
|
|
93
|
+
return loadCommand('../commands/marathon.js', 'cmdMarathon', flags, argv, quiet);
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
export async function cmdCompile(flags, quiet) {
|
|
99
|
-
|
|
100
|
-
return mod.cmdCompile(flags, quiet);
|
|
97
|
+
return loadCommand('../commands/compile.js', 'cmdCompile', flags, quiet);
|
|
101
98
|
}
|
|
102
99
|
|
|
103
100
|
export async function cmdMemory(flags, argv, quiet) {
|
|
104
|
-
|
|
105
|
-
return mod.cmdMemory(flags, argv, quiet);
|
|
101
|
+
return loadCommand('../commands/memory.js', 'cmdMemory', flags, argv, quiet);
|
|
106
102
|
}
|
|
107
103
|
|
|
108
104
|
export function cmdUninstall(flags, quiet) {
|
|
109
|
-
|
|
110
|
-
return mod.cmdUninstall(flags, quiet);
|
|
105
|
+
return loadCommand('../commands/uninstall.js', 'cmdUninstall', flags, quiet);
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
export async function generateIDEBridges(cwd, agentDest, quiet) {
|
|
114
|
-
|
|
115
|
-
return mod.generateIDEBridges(cwd, agentDest, quiet);
|
|
109
|
+
return loadCommand('../commands/init.js', 'generateIDEBridges', cwd, agentDest, quiet);
|
|
116
110
|
}
|
package/dist/mcp/server.js
CHANGED
|
@@ -1,142 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Uses in-process require() for commands instead of spawning child processes.
|
|
7
|
-
* Protocol: MCP 2024-11-05 over JSON-RPC 2.0 / stdio
|
|
5
|
+
* Compatibility entry point for the historical dist/mcp/server.js path.
|
|
6
|
+
* bin/mcp-server.js is the single canonical MCP implementation.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
const path = require('path');
|
|
11
|
-
|
|
12
|
-
const PKG = require('../../package.json');
|
|
13
|
-
|
|
14
|
-
// Timeout for spawned processes (30 seconds)
|
|
15
|
-
const SPAWN_TIMEOUT_MS = 30000;
|
|
16
|
-
|
|
17
|
-
const readline = require('readline');
|
|
18
|
-
const rl = readline.createInterface({
|
|
19
|
-
input: process.stdin,
|
|
20
|
-
output: process.stdout,
|
|
21
|
-
terminal: false
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
function handleRequest(req) {
|
|
25
|
-
if (req.method === 'initialize') {
|
|
26
|
-
return {
|
|
27
|
-
protocolVersion: "2024-11-05",
|
|
28
|
-
capabilities: { tools: {} },
|
|
29
|
-
serverInfo: {
|
|
30
|
-
name: "tribunal-kit-mcp",
|
|
31
|
-
version: PKG.version
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (req.method === 'tools/list') {
|
|
37
|
-
return {
|
|
38
|
-
tools: [
|
|
39
|
-
{
|
|
40
|
-
name: "run_tribunal_audit",
|
|
41
|
-
description: "Runs a full anti-hallucination audit across the workspace.",
|
|
42
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "sync_ide_bridges",
|
|
46
|
-
description: "Synchronize IDE bridge files with the current GEMINI.md rules.",
|
|
47
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "search_case_law",
|
|
51
|
-
description: "Search historical code rejections and legal precedent.",
|
|
52
|
-
inputSchema: {
|
|
53
|
-
type: "object",
|
|
54
|
-
properties: {
|
|
55
|
-
query: { type: "string", description: "Search query" }
|
|
56
|
-
},
|
|
57
|
-
required: ["query"],
|
|
58
|
-
additionalProperties: false
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (req.method === 'tools/call') {
|
|
66
|
-
const toolName = req.params && req.params.name;
|
|
67
|
-
if (!toolName) {
|
|
68
|
-
throw { code: -32602, message: "Missing required parameter: params.name" };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (toolName === 'run_tribunal_audit') {
|
|
72
|
-
// Validate uses the Rust binary — still needs spawn
|
|
73
|
-
const CLI = path.resolve(__dirname, '../../bin/wrapper.js');
|
|
74
|
-
const result = spawnSync(process.execPath, [CLI, 'validate', '--quiet'], {
|
|
75
|
-
encoding: 'utf8',
|
|
76
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
77
|
-
});
|
|
78
|
-
return { content: [{ type: "text", text: result.stdout || result.stderr || "No output" }] };
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (toolName === 'sync_ide_bridges') {
|
|
82
|
-
// In-process — no spawn needed
|
|
83
|
-
const CLI = path.resolve(__dirname, '../../bin/wrapper.js');
|
|
84
|
-
const result = spawnSync(process.execPath, [CLI, 'sync', '--quiet'], {
|
|
85
|
-
encoding: 'utf8',
|
|
86
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
87
|
-
});
|
|
88
|
-
return { content: [{ type: "text", text: result.stdout || result.stderr || "Sync complete" }] };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (toolName === 'search_case_law') {
|
|
92
|
-
const query = req.params && req.params.arguments && req.params.arguments.query;
|
|
93
|
-
if (!query || typeof query !== 'string') {
|
|
94
|
-
throw { code: -32602, message: "Missing or invalid required argument: query (string)" };
|
|
95
|
-
}
|
|
96
|
-
const script = path.resolve(__dirname, '../../.agent/scripts/case_law_manager.js');
|
|
97
|
-
const result = spawnSync(process.execPath, [script, 'search-cases', '--query', query], {
|
|
98
|
-
encoding: 'utf8',
|
|
99
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
100
|
-
});
|
|
101
|
-
return { content: [{ type: "text", text: result.stdout || result.stderr || "No results" }] };
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
throw { code: -32601, message: `Unknown tool: ${toolName}` };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
throw { code: -32601, message: `Unknown method: ${req.method}` };
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
rl.on('line', (line) => {
|
|
111
|
-
if (!line.trim()) return;
|
|
112
|
-
|
|
113
|
-
let req;
|
|
114
|
-
try {
|
|
115
|
-
req = JSON.parse(line);
|
|
116
|
-
} catch (parseErr) {
|
|
117
|
-
const errorRes = {
|
|
118
|
-
jsonrpc: "2.0", id: null,
|
|
119
|
-
error: { code: -32700, message: "Parse error: " + parseErr.message }
|
|
120
|
-
};
|
|
121
|
-
console.log(JSON.stringify(errorRes));
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
try {
|
|
126
|
-
const result = handleRequest(req);
|
|
127
|
-
const res = { jsonrpc: "2.0", id: req.id, result };
|
|
128
|
-
console.log(JSON.stringify(res));
|
|
129
|
-
|
|
130
|
-
if (req.method === 'initialize') {
|
|
131
|
-
console.log(JSON.stringify({ jsonrpc: "2.0", method: "notifications/initialized", params: {} }));
|
|
132
|
-
}
|
|
133
|
-
} catch (e) {
|
|
134
|
-
const code = (e && typeof e.code === 'number') ? e.code : -32603;
|
|
135
|
-
const message = (e && e.message) ? e.message : "Internal server error";
|
|
136
|
-
const errorRes = {
|
|
137
|
-
jsonrpc: "2.0", id: req.id || null,
|
|
138
|
-
error: { code, message }
|
|
139
|
-
};
|
|
140
|
-
console.log(JSON.stringify(errorRes));
|
|
141
|
-
}
|
|
142
|
-
});
|
|
8
|
+
module.exports = require("../../bin/mcp-server.js");
|
package/dist/utils/fs.js
CHANGED
|
@@ -12,7 +12,10 @@ const logger_1 = require("./logger");
|
|
|
12
12
|
// Concurrency limit for parallel file operations to avoid fd exhaustion
|
|
13
13
|
const COPY_CONCURRENCY = 32;
|
|
14
14
|
|
|
15
|
-
async function copyDir(src, dest, dryRun = false, filter = null) {
|
|
15
|
+
async function copyDir(src, dest, dryRun = false, filter = null, currentDepth = 0) {
|
|
16
|
+
if (currentDepth > 20) {
|
|
17
|
+
throw new Error(`Maximum directory copy depth (20) exceeded at: ${src}`);
|
|
18
|
+
}
|
|
16
19
|
if (!dryRun) {
|
|
17
20
|
await fs_1.default.promises.mkdir(dest, { recursive: true });
|
|
18
21
|
}
|
|
@@ -51,7 +54,7 @@ async function copyDir(src, dest, dryRun = false, filter = null) {
|
|
|
51
54
|
|
|
52
55
|
// Recurse into directories in parallel (dirs are I/O-independent)
|
|
53
56
|
const dirResults = await Promise.all(
|
|
54
|
-
dirs.map(({ srcPath, destPath }) => copyDir(srcPath, destPath, dryRun, filter))
|
|
57
|
+
dirs.map(({ srcPath, destPath }) => copyDir(srcPath, destPath, dryRun, filter, currentDepth + 1))
|
|
55
58
|
);
|
|
56
59
|
for (const dirCount of dirResults) {
|
|
57
60
|
count += dirCount;
|
|
@@ -59,12 +62,15 @@ async function copyDir(src, dest, dryRun = false, filter = null) {
|
|
|
59
62
|
|
|
60
63
|
return count;
|
|
61
64
|
}
|
|
62
|
-
async function countDir(dir) {
|
|
65
|
+
async function countDir(dir, currentDepth = 0) {
|
|
66
|
+
if (currentDepth > 20) {
|
|
67
|
+
throw new Error(`Maximum directory count depth (20) exceeded at: ${dir}`);
|
|
68
|
+
}
|
|
63
69
|
let count = 0;
|
|
64
70
|
const entries = await fs_1.default.promises.readdir(dir, { withFileTypes: true });
|
|
65
71
|
for (const e of entries) {
|
|
66
72
|
if (e.isDirectory())
|
|
67
|
-
count += await countDir(path_1.default.join(dir, e.name));
|
|
73
|
+
count += await countDir(path_1.default.join(dir, e.name), currentDepth + 1);
|
|
68
74
|
else
|
|
69
75
|
count++;
|
|
70
76
|
}
|
package/dist/utils/helpers.js
CHANGED
|
@@ -12,14 +12,23 @@ const path_1 = __importDefault(require("path"));
|
|
|
12
12
|
const logger_1 = require("./logger");
|
|
13
13
|
function runShellAsync(command, options) {
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
|
+
const timeoutMs = (options && options.timeout) || 120000;
|
|
15
16
|
const child = (0, child_process_1.spawn)(command, [], { ...options, shell: true });
|
|
17
|
+
const timer = setTimeout(() => {
|
|
18
|
+
child.kill('SIGTERM');
|
|
19
|
+
reject(new Error(`Command timed out after ${timeoutMs}ms: ${command}`));
|
|
20
|
+
}, timeoutMs);
|
|
16
21
|
child.on('close', code => {
|
|
22
|
+
clearTimeout(timer);
|
|
17
23
|
if (code !== 0)
|
|
18
24
|
reject(new Error(`Command failed with exit code ${code}`));
|
|
19
25
|
else
|
|
20
26
|
resolve();
|
|
21
27
|
});
|
|
22
|
-
child.on('error',
|
|
28
|
+
child.on('error', err => {
|
|
29
|
+
clearTimeout(timer);
|
|
30
|
+
reject(err);
|
|
31
|
+
});
|
|
23
32
|
});
|
|
24
33
|
}
|
|
25
34
|
function getKitAgent() {
|
package/dist/utils/version.js
CHANGED
|
@@ -119,18 +119,25 @@ function fetchLatestVersion(currentVersion) {
|
|
|
119
119
|
*
|
|
120
120
|
* Returns true if a re-invoke happened (caller should exit), false otherwise.
|
|
121
121
|
*/
|
|
122
|
+
let hasRegisteredUpdateNotifier = false;
|
|
123
|
+
|
|
122
124
|
async function autoUpdateCheck(originalArgs, currentVersion) {
|
|
123
125
|
// Recursion guard: if we're already a re-invoked process, skip
|
|
124
126
|
if (process.env.TK_SKIP_UPDATE_CHECK === '1') {
|
|
125
127
|
return false;
|
|
126
128
|
}
|
|
127
129
|
|
|
130
|
+
if (hasRegisteredUpdateNotifier) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
hasRegisteredUpdateNotifier = true;
|
|
134
|
+
|
|
128
135
|
// Fire the fetch but DON'T await it immediately — let the command run first
|
|
129
136
|
const versionPromise = fetchLatestVersion(currentVersion);
|
|
130
137
|
|
|
131
|
-
// Register a process.
|
|
138
|
+
// Register a process.once('beforeExit') hook to show the update notification
|
|
132
139
|
// AFTER the command has finished executing
|
|
133
|
-
process.
|
|
140
|
+
process.once('beforeExit', async () => {
|
|
134
141
|
try {
|
|
135
142
|
const latestVersion = await versionPromise;
|
|
136
143
|
if (!latestVersion) return;
|
package/mcp_config.json
CHANGED
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
"tribunal-kit": {
|
|
4
4
|
"command": "node",
|
|
5
5
|
"args": ["bin/mcp-server.js"],
|
|
6
|
-
"env": {
|
|
6
|
+
"env": {
|
|
7
|
+
"NODE_ENV": "production"
|
|
8
|
+
}
|
|
7
9
|
}
|
|
10
|
+
},
|
|
11
|
+
"minimal_change": {
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"mode": "balanced",
|
|
14
|
+
"repository_search": true,
|
|
15
|
+
"change_budget": true,
|
|
16
|
+
"minimality_score": true
|
|
8
17
|
}
|
|
9
18
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tribunal-kit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The operating system for AI software engineering — governance, memory, review pipelines, and reusable skills for every coding agent.
|
|
3
|
+
"version": "6.0.0",
|
|
4
|
+
"description": "The operating system for AI software engineering — governance, memory, review pipelines, and reusable skills for every coding agent. 45 specialist agents, 35 workflows, 21 parallel Tribunal code reviewers, MCP server, Rust core engine, and long-running autonomous agent harness for Cursor, VSCode, Windsurf, Claude Code, and Aider.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
7
7
|
"ai-agent",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"node": ">=18.0.0"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
|
-
"test": "npm run validate-payload && jest --coverage",
|
|
83
|
+
"test": "npm run validate-payload && jest --runInBand --coverage",
|
|
84
84
|
"test:unit": "jest test/unit --coverage",
|
|
85
85
|
"test:integration": "jest test/integration --coverage",
|
|
86
86
|
"preversion": "node scripts/sync-version.js",
|
|
@@ -92,21 +92,23 @@
|
|
|
92
92
|
"benchmark": "node scripts/benchmark.js",
|
|
93
93
|
"benchmark:rust": "cargo build --release && node scripts/benchmark.js",
|
|
94
94
|
"build:rust": "cargo build --release",
|
|
95
|
+
"build:core": "cargo build --release --manifest-path crates/core/Cargo.toml",
|
|
95
96
|
"test:rust": "cargo test --manifest-path crates/core/Cargo.toml",
|
|
96
|
-
"
|
|
97
|
+
"test:all": "npm run validate-payload && npm run test:rust && jest --runInBand --coverage",
|
|
98
|
+
"build": "npm run build:rust"
|
|
97
99
|
},
|
|
98
100
|
"devDependencies": {
|
|
99
|
-
"eslint": "
|
|
100
|
-
"jest": "
|
|
101
|
-
"typescript": "
|
|
102
|
-
|
|
101
|
+
"eslint": "9.1.1",
|
|
102
|
+
"jest": "30.4.2",
|
|
103
|
+
"typescript": "5.4.5"
|
|
104
|
+
},
|
|
103
105
|
"optionalDependencies": {
|
|
104
|
-
"@tribunal-kit/core-darwin-arm64": "^
|
|
105
|
-
"@tribunal-kit/core-darwin-x64": "^
|
|
106
|
-
"@tribunal-kit/core-linux-arm64": "^
|
|
107
|
-
"@tribunal-kit/core-linux-x64": "^
|
|
108
|
-
"@tribunal-kit/core-win32-arm64": "^
|
|
109
|
-
"@tribunal-kit/core-win32-x64": "^
|
|
106
|
+
"@tribunal-kit/core-darwin-arm64": "^6.0.0",
|
|
107
|
+
"@tribunal-kit/core-darwin-x64": "^6.0.0",
|
|
108
|
+
"@tribunal-kit/core-linux-arm64": "^6.0.0",
|
|
109
|
+
"@tribunal-kit/core-linux-x64": "^6.0.0",
|
|
110
|
+
"@tribunal-kit/core-win32-arm64": "^6.0.0",
|
|
111
|
+
"@tribunal-kit/core-win32-x64": "^6.0.0"
|
|
110
112
|
},
|
|
111
113
|
"jest": {
|
|
112
114
|
"testMatch": [
|
|
@@ -115,7 +117,9 @@
|
|
|
115
117
|
"testEnvironment": "node",
|
|
116
118
|
"coverageDirectory": "coverage",
|
|
117
119
|
"collectCoverageFrom": [
|
|
118
|
-
"bin/**/*.js"
|
|
120
|
+
"bin/**/*.js",
|
|
121
|
+
".agent/scripts/**/*.js",
|
|
122
|
+
"dist/**/*.js"
|
|
119
123
|
]
|
|
120
124
|
}
|
|
121
125
|
}
|
package/scripts/benchmark.js
CHANGED
|
@@ -142,6 +142,64 @@ async function main() {
|
|
|
142
142
|
);
|
|
143
143
|
results.push(initRealResult);
|
|
144
144
|
|
|
145
|
+
// 5. DAG scheduling benchmark
|
|
146
|
+
console.log(c("cyan", " ▸ Benchmarking: DAG scheduling calculation"));
|
|
147
|
+
const dagResult = await benchmark(
|
|
148
|
+
"DAG wave scheduling",
|
|
149
|
+
() => {
|
|
150
|
+
const workers = [
|
|
151
|
+
{ task_id: "w1", dependencies: [] },
|
|
152
|
+
{ task_id: "w2", dependencies: ["w1"] },
|
|
153
|
+
{ task_id: "w3", dependencies: ["w1"] },
|
|
154
|
+
{ task_id: "w4", dependencies: ["w2", "w3"] },
|
|
155
|
+
];
|
|
156
|
+
const inDegree = {};
|
|
157
|
+
const adjList = {};
|
|
158
|
+
workers.forEach((w) => {
|
|
159
|
+
inDegree[w.task_id] = 0;
|
|
160
|
+
adjList[w.task_id] = [];
|
|
161
|
+
});
|
|
162
|
+
workers.forEach((w) => {
|
|
163
|
+
w.dependencies.forEach((dep) => {
|
|
164
|
+
adjList[dep].push(w.task_id);
|
|
165
|
+
inDegree[w.task_id] += 1;
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
let currentWave = Object.keys(inDegree).filter((id) => inDegree[id] === 0);
|
|
169
|
+
const waves = [];
|
|
170
|
+
while (currentWave.length > 0) {
|
|
171
|
+
waves.push(currentWave);
|
|
172
|
+
const next = [];
|
|
173
|
+
currentWave.forEach((id) => {
|
|
174
|
+
adjList[id].forEach((nbr) => {
|
|
175
|
+
inDegree[nbr] -= 1;
|
|
176
|
+
if (inDegree[nbr] === 0) next.push(nbr);
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
currentWave = next;
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
100,
|
|
183
|
+
);
|
|
184
|
+
results.push(dagResult);
|
|
185
|
+
|
|
186
|
+
// 6. Minimal Change Governance Engine benchmark
|
|
187
|
+
console.log(c("cyan", " ▸ Benchmarking: Minimal Change Governance Engine"));
|
|
188
|
+
const minResult = await benchmark(
|
|
189
|
+
"Minimal Change Audit",
|
|
190
|
+
() => {
|
|
191
|
+
const minEngine = require("../.agent/scripts/minimal_change_engine");
|
|
192
|
+
minEngine.evaluateMinimalChange("add retry logic to API requests", {
|
|
193
|
+
files_added: 0,
|
|
194
|
+
files_modified: 1,
|
|
195
|
+
estimated_lines_added: 15,
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
20,
|
|
199
|
+
);
|
|
200
|
+
results.push(minResult);
|
|
201
|
+
|
|
202
|
+
|
|
145
203
|
// Print results table
|
|
146
204
|
console.log();
|
|
147
205
|
console.log(bold(` Results`));
|