tribunal-kit 5.8.3 → 5.8.5
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 +5 -5
- package/.agent/history/integrity_manifest.json +1026 -0
- package/.agent/history/memory/.memory.idx +1217 -1
- package/.agent/history/memory/MEMORY.md +81 -1
- package/.agent/rules/GEMINI.md +1 -1
- package/.agent/scripts/_utils.js +28 -7
- package/.agent/scripts/case_law_manager.js +3 -15
- package/.agent/scripts/context_broker.js +3 -20
- package/.agent/scripts/guardrail_engine.js +643 -0
- package/.agent/scripts/integrity_manifest.js +492 -0
- package/.agent/scripts/marathon_harness.js +10 -1
- package/.agent/scripts/signal_detector.js +1 -1
- package/.agent/scripts/skill_evolution.js +39 -36
- package/.agent/scripts/skill_integrator.js +2 -12
- package/.agent/scripts/swarm_dispatcher.js +54 -5
- package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
- package/.agent/skills/60fps-animation/SKILL.md +78 -0
- package/.agent/skills/accessible-animation/SKILL.md +86 -0
- package/.agent/skills/adapt/SKILL.md +75 -0
- package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
- package/.agent/skills/animation-systems/SKILL.md +69 -0
- package/.agent/skills/antfu-conventions/SKILL.md +74 -0
- package/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-311.pyc +0 -0
- package/.agent/skills/apple-design/SKILL.md +108 -0
- package/.agent/skills/audit-and-fix/SKILL.md +83 -0
- package/.agent/skills/baseline-ui/SKILL.md +74 -0
- package/.agent/skills/better-colors/SKILL.md +132 -0
- package/.agent/skills/better-typography/SKILL.md +111 -0
- package/.agent/skills/better-ui/SKILL.md +102 -0
- package/.agent/skills/bolder/SKILL.md +68 -0
- package/.agent/skills/build-primitive/SKILL.md +70 -0
- package/.agent/skills/clarify/SKILL.md +75 -0
- package/.agent/skills/cobejs/SKILL.md +96 -0
- package/.agent/skills/codebase-design/SKILL.md +84 -0
- package/.agent/skills/colorize/SKILL.md +77 -0
- package/.agent/skills/compact-landing/SKILL.md +70 -0
- package/.agent/skills/company-logos/SKILL.md +73 -0
- package/.agent/skills/create-design-md/SKILL.md +104 -0
- package/.agent/skills/critique/SKILL.md +95 -0
- package/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-311.pyc +0 -0
- package/.agent/skills/delight/SKILL.md +65 -0
- package/.agent/skills/design-lab/SKILL.md +59 -0
- package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
- package/.agent/skills/distill/SKILL.md +65 -0
- package/.agent/skills/domain-modeling/SKILL.md +78 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +100 -0
- package/.agent/skills/fixing-metadata/SKILL.md +97 -0
- package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
- package/.agent/skills/frontend-design/SKILL.md +80 -81
- 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/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/gpt-taste/SKILL.md +68 -0
- package/.agent/skills/harden/SKILL.md +74 -0
- package/.agent/skills/i18n-localization/scripts/__pycache__/i18n_checker.cpython-311.pyc +0 -0
- package/.agent/skills/impeccable/SKILL.md +74 -0
- package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
- package/.agent/skills/improve-ui/SKILL.md +83 -0
- package/.agent/skills/landing-page/SKILL.md +88 -0
- package/.agent/skills/lint-and-validate/SKILL.md +0 -1
- 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/local-first-architecture/SKILL.md +66 -0
- package/.agent/skills/lottie-animation/SKILL.md +82 -0
- package/.agent/skills/marquee-loop/SKILL.md +96 -0
- package/.agent/skills/masked-reveal/SKILL.md +88 -0
- package/.agent/skills/micro-interaction/SKILL.md +100 -0
- package/.agent/skills/mobile-design/scripts/__pycache__/mobile_audit.cpython-311.pyc +0 -0
- package/.agent/skills/morphing-icons/SKILL.md +85 -0
- package/.agent/skills/motion-engineering/SKILL.md +66 -164
- 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/page-transition-animation/SKILL.md +108 -0
- package/.agent/skills/parallel-agents/SKILL.md +5 -5
- package/.agent/skills/performance-profiling/scripts/__pycache__/lighthouse_audit.cpython-311.pyc +0 -0
- package/.agent/skills/polish/SKILL.md +63 -0
- package/.agent/skills/pricing-page/SKILL.md +68 -0
- package/.agent/skills/progressive-blur/SKILL.md +100 -0
- package/.agent/skills/quieter/SKILL.md +68 -0
- package/.agent/skills/react-doctor/SKILL.md +70 -0
- package/.agent/skills/redesign-skill/SKILL.md +65 -0
- package/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/shape/SKILL.md +73 -0
- package/.agent/skills/soft-skill/SKILL.md +72 -0
- package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
- package/.agent/skills/svg-animation/SKILL.md +91 -0
- package/.agent/skills/swiss-design/SKILL.md +64 -0
- package/.agent/skills/taste-skill/SKILL.md +71 -0
- package/.agent/skills/tdd-workflow/SKILL.md +36 -165
- package/.agent/skills/testing-patterns/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
- package/.agent/skills/transitions-dev/SKILL.md +101 -0
- package/.agent/skills/typeset/SKILL.md +76 -0
- package/.agent/skills/ui-skills-root/SKILL.md +85 -0
- package/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/skills/web-quality-audit/SKILL.md +67 -0
- package/.agent/skills/webapp-testing/scripts/__pycache__/playwright_runner.cpython-311.pyc +0 -0
- package/.agent/workflows/generate.md +1 -1
- package/.agent/workflows/tribunal-full.md +2 -2
- package/.agent/workflows/tribunal-speed.md +2 -2
- package/CONTRIBUTING.md +1 -1
- package/README.md +349 -239
- package/bin/mcp-server.js +45 -45
- package/bin/tribunal-kit.js +62 -1482
- package/bin/wrapper.js +50 -25
- package/dist/cli.js +43 -0
- package/dist/commands/align.js +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/guardrail.js +275 -0
- package/dist/commands/init.js +35 -10
- package/dist/commands/native.js +228 -0
- package/dist/commands/optimize.js +318 -0
- package/dist/commands/validate.js +67 -0
- package/dist/mcp/server.js +4 -138
- package/dist/utils/version.js +1 -1
- package/package.json +13 -10
- package/scripts/benchmark.js +42 -0
- package/scripts/fix-vbc.js +98 -0
- package/scripts/fix-vbc.ps1 +119 -0
- package/scripts/sync-version.js +129 -76
package/bin/mcp-server.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* over standard I/O, allowing AI clients (Cursor, Windsurf, Claude) to natively
|
|
8
8
|
* invoke tribunal checks.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* In-process tools load reusable modules directly. Commands that depend on a
|
|
11
|
+
* standalone CLI process remain isolated deliberately.
|
|
12
12
|
*
|
|
13
13
|
* Protocol: MCP 2024-11-05 over JSON-RPC 2.0 / stdio
|
|
14
14
|
*/
|
|
@@ -18,7 +18,7 @@ const { spawnSync } = require("child_process");
|
|
|
18
18
|
|
|
19
19
|
const PKG = require(path.resolve(__dirname, "../package.json"));
|
|
20
20
|
|
|
21
|
-
// Timeout for
|
|
21
|
+
// Timeout for intentionally isolated child processes (30 seconds).
|
|
22
22
|
const SPAWN_TIMEOUT_MS = 30000;
|
|
23
23
|
|
|
24
24
|
// Minimal JSON-RPC 2.0 over stdio
|
|
@@ -31,61 +31,60 @@ const rl = readline.createInterface({
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* Run the
|
|
35
|
-
*
|
|
34
|
+
* Run the workspace integrity audit without invoking the CLI schema validator.
|
|
35
|
+
* The MCP audit is about Tribunal assets, while `tk validate` validates one
|
|
36
|
+
* explicitly supplied payload and schema.
|
|
36
37
|
*/
|
|
37
|
-
function
|
|
38
|
-
const os = require("os");
|
|
38
|
+
function runTribunalAudit() {
|
|
39
39
|
const fs = require("fs");
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
let binPath = null;
|
|
48
|
-
try {
|
|
49
|
-
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
50
|
-
const candidatePath = path.resolve(
|
|
51
|
-
path.dirname(pkgPath),
|
|
52
|
-
`bin/tribunal-core${ext}`,
|
|
53
|
-
);
|
|
54
|
-
if (fs.existsSync(candidatePath)) binPath = candidatePath;
|
|
55
|
-
} catch (_) {}
|
|
56
|
-
if (!binPath) {
|
|
57
|
-
const devPath = path.resolve(
|
|
58
|
-
__dirname,
|
|
59
|
-
"..",
|
|
60
|
-
"target",
|
|
61
|
-
"release",
|
|
62
|
-
`tribunal-core${ext}`,
|
|
63
|
-
);
|
|
64
|
-
if (fs.existsSync(devPath)) binPath = devPath;
|
|
65
|
-
}
|
|
40
|
+
const projectRoot = process.cwd();
|
|
41
|
+
const manifestScript = path.join(
|
|
42
|
+
projectRoot,
|
|
43
|
+
".agent",
|
|
44
|
+
"scripts",
|
|
45
|
+
"integrity_manifest.js",
|
|
46
|
+
);
|
|
66
47
|
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
encoding: "utf8",
|
|
70
|
-
timeout: SPAWN_TIMEOUT_MS,
|
|
71
|
-
});
|
|
72
|
-
return result.stdout || result.stderr || "No output";
|
|
48
|
+
if (!fs.existsSync(manifestScript)) {
|
|
49
|
+
return "Error: .agent/scripts/integrity_manifest.js was not found. Run `tk init` first.";
|
|
73
50
|
}
|
|
74
51
|
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
try {
|
|
53
|
+
const { generateManifest } = require(manifestScript);
|
|
54
|
+
const manifest = generateManifest(projectRoot);
|
|
55
|
+
if (manifest.error) return `Error: ${manifest.error}`;
|
|
56
|
+
|
|
57
|
+
const { integrity } = manifest;
|
|
58
|
+
const lines = [
|
|
59
|
+
"Tribunal audit complete.",
|
|
60
|
+
`Agents: ${manifest.agents.total} (${manifest.agents.reviewer_count} reviewers)`,
|
|
61
|
+
`Skills: ${manifest.skills.total}`,
|
|
62
|
+
`Scripts: ${manifest.scripts.total}`,
|
|
63
|
+
`Workflows: ${manifest.workflows.total}`,
|
|
64
|
+
`References: ${integrity.total_references}; phantom references: ${integrity.phantom_references}`,
|
|
65
|
+
`Count claims: ${integrity.total_claims}; invalid claims: ${integrity.invalid_claims}`,
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
if (integrity.phantom_references > 0 || integrity.invalid_claims > 0) {
|
|
69
|
+
lines.push("Audit found integrity issues; run `tk guardrail --scan` for remediation details.");
|
|
70
|
+
} else {
|
|
71
|
+
lines.push("All discovered references and global asset-count claims are valid.");
|
|
72
|
+
}
|
|
73
|
+
return lines.join("\n");
|
|
74
|
+
} catch (error) {
|
|
75
|
+
return `Audit failed: ${error.message}`;
|
|
76
|
+
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* Search case law
|
|
80
|
+
* Search case law in an isolated process because its CLI owns persistent state.
|
|
81
81
|
*/
|
|
82
82
|
function searchCaseLaw(query) {
|
|
83
83
|
const caseLawScript = path.resolve(
|
|
84
84
|
__dirname,
|
|
85
85
|
"../.agent/scripts/case_law_manager.js",
|
|
86
86
|
);
|
|
87
|
-
//
|
|
88
|
-
// that modifies global state, but we use spawn with minimal overhead
|
|
87
|
+
// case_law_manager is a standalone stateful CLI, so retain its process boundary.
|
|
89
88
|
const result = spawnSync(
|
|
90
89
|
process.execPath,
|
|
91
90
|
[caseLawScript, "search-cases", "--query", query],
|
|
@@ -301,7 +300,7 @@ function handleRequest(req) {
|
|
|
301
300
|
}
|
|
302
301
|
|
|
303
302
|
if (toolName === "run_tribunal_audit") {
|
|
304
|
-
const text =
|
|
303
|
+
const text = runTribunalAudit();
|
|
305
304
|
return { content: [{ type: "text", text }] };
|
|
306
305
|
}
|
|
307
306
|
|
|
@@ -548,5 +547,6 @@ if (process.env.NODE_ENV === "test") {
|
|
|
548
547
|
module.exports = {
|
|
549
548
|
handleRequest,
|
|
550
549
|
stripBoilerplate,
|
|
550
|
+
runTribunalAudit,
|
|
551
551
|
};
|
|
552
552
|
}
|