tribunal-kit 7.0.0 → 9.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 +2 -2
- package/.agent/config/claude.json +18 -0
- package/.agent/config/plugin.json +102 -0
- package/.agent/config/slash-commands.json +103 -0
- package/.agent/config/specialist-registry.json +415 -0
- package/.agent/config/system-prompt.md +244 -0
- package/.agent/history/architecture-graph.yaml +302 -3
- package/.agent/history/graph-cache.json +515 -45
- package/.agent/history/memory.db +0 -0
- package/.agent/history/snapshots/bin__adapter-install.js.json +13 -0
- package/.agent/history/snapshots/bin__global-store.js.json +15 -0
- package/.agent/history/snapshots/bin__mcp-server.js.json +19 -0
- package/.agent/history/snapshots/bin__proxy-server.js.json +20 -0
- package/.agent/history/snapshots/bin__spawn-agent.js.json +12 -0
- package/.agent/history/snapshots/bin__tk-proxy.js.json +21 -0
- package/.agent/history/snapshots/bin__tribunal-kit.js.json +9 -7
- package/.agent/history/snapshots/bin__wrapper.js.json +14 -0
- package/.agent/history/snapshots/eslint.config.js.json +1 -2
- package/.agent/history/snapshots/scripts__benchmark.js.json +14 -0
- package/.agent/history/snapshots/scripts__changelog.js.json +1 -2
- package/.agent/history/snapshots/scripts__fix-vbc.js.json +11 -0
- package/.agent/history/snapshots/scripts__stress_benchmark.js.json +15 -0
- package/.agent/history/snapshots/scripts__sync-version.js.json +1 -2
- package/.agent/history/snapshots/scripts__validate-payload.js.json +1 -2
- package/.agent/history/snapshots/scripts__visual_audit.js.json +11 -0
- package/.agent/history/snapshots/test__integration__bridges.test.js.json +1 -2
- package/.agent/history/snapshots/test__integration__graceful_degradation.test.js.json +12 -0
- package/.agent/history/snapshots/test__integration__init.test.js.json +1 -2
- package/.agent/history/snapshots/test__integration__minimal_change_pipeline.test.js.json +13 -0
- package/.agent/history/snapshots/test__integration__parallel_tribunal.test.js.json +12 -0
- package/.agent/history/snapshots/test__integration__routing.test.js.json +1 -2
- package/.agent/history/snapshots/test__integration__swarm_dispatcher.test.js.json +1 -2
- package/.agent/history/snapshots/test__integration__sync_status.test.js.json +13 -0
- package/.agent/history/snapshots/test__integration__wave2.test.js.json +1 -2
- package/.agent/history/snapshots/test__integration__wrapper.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__align.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__args.test.js.json +3 -3
- package/.agent/history/snapshots/test__unit__audit_release.test.js.json +16 -0
- package/.agent/history/snapshots/test__unit__case_law_manager.test.js.json +1 -2
- package/.agent/history/snapshots/test__unit__cicd_validator.test.js.json +12 -0
- package/.agent/history/snapshots/test__unit__compile.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__context_broker.test.js.json +1 -2
- package/.agent/history/snapshots/test__unit__contract_engine.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__copyDir.test.js.json +3 -3
- package/.agent/history/snapshots/test__unit__graph_tools.test.js.json +1 -2
- package/.agent/history/snapshots/test__unit__guardrail_engine.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__impact_classifier.test.js.json +12 -0
- package/.agent/history/snapshots/test__unit__init.test.js.json +14 -0
- package/.agent/history/snapshots/test__unit__inner_loop_validator.test.js.json +1 -2
- package/.agent/history/snapshots/test__unit__integrity_manifest.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__learn.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__marathon.test.js.json +22 -0
- package/.agent/history/snapshots/test__unit__mcp_server.test.js.json +16 -0
- package/.agent/history/snapshots/test__unit__memory.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__minimal_change.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__native.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__optimize.test.js.json +13 -0
- package/.agent/history/snapshots/test__unit__path_resolution.test.js.json +14 -0
- package/.agent/history/snapshots/test__unit__production_readiness_evidence.test.js.json +21 -0
- package/.agent/history/snapshots/test__unit__selfInstall.test.js.json +3 -3
- package/.agent/history/snapshots/test__unit__semver.test.js.json +3 -3
- package/.agent/history/snapshots/test__unit__skill_evolution.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__stress.test.js.json +15 -0
- package/.agent/history/snapshots/test__unit__swarm_dispatcher.test.js.json +3 -3
- package/.agent/history/snapshots/test__unit__utils.test.js.json +10 -0
- package/.agent/routing_index.json +2 -2
- package/.agent/scripts/ast_context_loader.js +137 -0
- package/.agent/scripts/memory_engine.js +581 -0
- package/.agent/scripts/payload_schemas.js +146 -0
- package/.agent/scripts/prompt_compiler.js +59 -11
- package/.agent/scripts/swarm_dispatcher.js +295 -67
- package/.agent/scripts/token_budget_broker.js +117 -6
- package/.agent/skills/12-principles-of-animation/SKILL.md +19 -16
- package/.agent/skills/60fps-animation/SKILL.md +47 -21
- package/.agent/skills/accessible-animation/SKILL.md +19 -16
- package/.agent/skills/adapt/SKILL.md +19 -16
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +41 -40
- package/.agent/skills/agent-organizer/SKILL.md +9 -59
- package/.agent/skills/agentic-patterns/SKILL.md +9 -57
- package/.agent/skills/agentic-workflows-2026/SKILL.md +45 -8
- package/.agent/skills/ai-app-hardening/SKILL.md +31 -5
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +28 -66
- package/.agent/skills/animation-on-scroll/SKILL.md +19 -16
- package/.agent/skills/animation-systems/SKILL.md +19 -15
- package/.agent/skills/antfu-conventions/SKILL.md +19 -18
- package/.agent/skills/api-patterns/SKILL.md +8 -58
- package/.agent/skills/api-security-auditor/SKILL.md +8 -58
- package/.agent/skills/app-builder/SKILL.md +9 -59
- package/.agent/skills/appflow-wireframe/SKILL.md +13 -57
- package/.agent/skills/apple-design/SKILL.md +22 -14
- package/.agent/skills/architecture/SKILL.md +9 -59
- package/.agent/skills/audit-and-fix/SKILL.md +19 -16
- package/.agent/skills/authentication-best-practices/SKILL.md +8 -58
- package/.agent/skills/backend-security-expert/SKILL.md +32 -65
- package/.agent/skills/baseline-ui/SKILL.md +22 -14
- package/.agent/skills/bash-linux/SKILL.md +9 -59
- package/.agent/skills/behavioral-modes/SKILL.md +9 -57
- package/.agent/skills/better-colors/SKILL.md +22 -14
- package/.agent/skills/better-typography/SKILL.md +26 -14
- package/.agent/skills/better-ui/SKILL.md +54 -19
- package/.agent/skills/bolder/SKILL.md +19 -16
- package/.agent/skills/brainstorming/SKILL.md +9 -57
- package/.agent/skills/browser-native-ai/SKILL.md +9 -28
- package/.agent/skills/build-primitive/SKILL.md +19 -16
- package/.agent/skills/building-native-ui/SKILL.md +9 -59
- package/.agent/skills/cicd-pro/SKILL.md +21 -28
- package/.agent/skills/clarify/SKILL.md +19 -16
- package/.agent/skills/clean-code/SKILL.md +18 -61
- package/.agent/skills/cloud-architect/SKILL.md +21 -28
- package/.agent/skills/cobejs/SKILL.md +19 -15
- package/.agent/skills/code-review-checklist/SKILL.md +8 -58
- package/.agent/skills/codebase-design/SKILL.md +33 -22
- package/.agent/skills/colorize/SKILL.md +19 -16
- package/.agent/skills/compact-landing/SKILL.md +19 -16
- package/.agent/skills/company-logos/SKILL.md +19 -16
- package/.agent/skills/config-validator/SKILL.md +9 -59
- package/.agent/skills/containerization-pro/SKILL.md +21 -28
- package/.agent/skills/context-engineering-pro/SKILL.md +31 -5
- package/.agent/skills/create-design-md/SKILL.md +22 -14
- package/.agent/skills/critique/SKILL.md +20 -11
- package/.agent/skills/csharp-developer/SKILL.md +8 -58
- package/.agent/skills/data-validation-schemas/SKILL.md +9 -59
- package/.agent/skills/database-design/SKILL.md +27 -67
- package/.agent/skills/delight/SKILL.md +19 -16
- package/.agent/skills/deployment-procedures/SKILL.md +9 -59
- package/.agent/skills/design-lab/SKILL.md +19 -16
- package/.agent/skills/devops-engineer/SKILL.md +8 -58
- package/.agent/skills/devops-incident-responder/SKILL.md +9 -59
- package/.agent/skills/diagnosing-bugs/SKILL.md +20 -21
- package/.agent/skills/distill/SKILL.md +19 -16
- package/.agent/skills/documentation-templates/SKILL.md +9 -59
- package/.agent/skills/domain-modeling/SKILL.md +19 -18
- package/.agent/skills/duckdb-analytical-sql/SKILL.md +31 -5
- package/.agent/skills/edge-ai-mobile/SKILL.md +31 -5
- package/.agent/skills/edge-computing/SKILL.md +9 -59
- package/.agent/skills/emil-design-eng/SKILL.md +21 -24
- package/.agent/skills/error-resilience/SKILL.md +31 -66
- package/.agent/skills/expo-router-v4/SKILL.md +31 -5
- package/.agent/skills/extract-design-system/SKILL.md +9 -59
- package/.agent/skills/fabel-protocol/SKILL.md +26 -8
- package/.agent/skills/fixing-accessibility/SKILL.md +22 -14
- package/.agent/skills/fixing-metadata/SKILL.md +19 -16
- package/.agent/skills/fixing-motion-performance/SKILL.md +22 -14
- package/.agent/skills/framer-motion-expert/SKILL.md +9 -57
- package/.agent/skills/frontend-design/SKILL.md +27 -7
- package/.agent/skills/frontend-security-expert/SKILL.md +8 -58
- package/.agent/skills/game-design-expert/SKILL.md +9 -59
- package/.agent/skills/game-engineering-expert/SKILL.md +9 -59
- package/.agent/skills/generative-ui-expert/SKILL.md +9 -28
- package/.agent/skills/geo-fundamentals/SKILL.md +9 -59
- package/.agent/skills/git-pro/SKILL.md +19 -30
- package/.agent/skills/github-operations/SKILL.md +8 -58
- package/.agent/skills/gpt-taste/SKILL.md +19 -16
- package/.agent/skills/gsap-core/SKILL.md +8 -78
- package/.agent/skills/gsap-frameworks/SKILL.md +8 -78
- package/.agent/skills/gsap-performance/SKILL.md +9 -77
- package/.agent/skills/gsap-plugins/SKILL.md +9 -77
- package/.agent/skills/gsap-react/SKILL.md +9 -21
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +8 -78
- package/.agent/skills/gsap-timeline/SKILL.md +9 -77
- package/.agent/skills/gsap-utils/SKILL.md +9 -77
- package/.agent/skills/harden/SKILL.md +19 -16
- package/.agent/skills/harness-protocol/SKILL.md +9 -21
- package/.agent/skills/i18n-localization/SKILL.md +9 -59
- package/.agent/skills/impeccable/SKILL.md +19 -18
- package/.agent/skills/improve-codebase-architecture/SKILL.md +19 -17
- package/.agent/skills/improve-ui/SKILL.md +22 -14
- package/.agent/skills/intelligent-routing/SKILL.md +9 -23
- package/.agent/skills/knowledge-graph/SKILL.md +9 -21
- package/.agent/skills/landing-page/SKILL.md +19 -16
- package/.agent/skills/lint-and-validate/SKILL.md +9 -59
- package/.agent/skills/llm-engineering/SKILL.md +8 -58
- package/.agent/skills/local-first/SKILL.md +9 -59
- package/.agent/skills/local-first-architecture/SKILL.md +37 -20
- package/.agent/skills/lottie-animation/SKILL.md +19 -15
- package/.agent/skills/marquee-loop/SKILL.md +19 -16
- package/.agent/skills/masked-reveal/SKILL.md +19 -15
- package/.agent/skills/mcp-builder/SKILL.md +9 -59
- package/.agent/skills/micro-interaction/SKILL.md +19 -16
- package/.agent/skills/mobile-design/SKILL.md +8 -58
- package/.agent/skills/monorepo-management/SKILL.md +9 -59
- package/.agent/skills/morphing-icons/SKILL.md +19 -15
- package/.agent/skills/motion-engineering/SKILL.md +22 -15
- package/.agent/skills/nextjs-react-expert/SKILL.md +35 -67
- package/.agent/skills/nodejs-best-practices/SKILL.md +34 -61
- package/.agent/skills/observability/SKILL.md +8 -58
- package/.agent/skills/opentelemetry-observability/SKILL.md +31 -5
- package/.agent/skills/page-transition-animation/SKILL.md +19 -16
- package/.agent/skills/parallel-agents/SKILL.md +9 -59
- package/.agent/skills/performance-profiling/SKILL.md +8 -58
- package/.agent/skills/plan-writing/SKILL.md +36 -69
- package/.agent/skills/platform-engineer/SKILL.md +9 -59
- package/.agent/skills/platform-engineering-opentofu/SKILL.md +31 -5
- package/.agent/skills/playwright-ai-e2e/SKILL.md +31 -5
- package/.agent/skills/playwright-best-practices/SKILL.md +9 -59
- package/.agent/skills/polish/SKILL.md +19 -16
- package/.agent/skills/powershell-windows/SKILL.md +8 -58
- package/.agent/skills/pricing-page/SKILL.md +19 -16
- package/.agent/skills/product-aware-heuristics/SKILL.md +27 -8
- package/.agent/skills/progressive-blur/SKILL.md +19 -16
- package/.agent/skills/project-idioms/SKILL.md +9 -59
- package/.agent/skills/property-based-testing/SKILL.md +31 -5
- package/.agent/skills/python-patterns/SKILL.md +9 -59
- package/.agent/skills/python-pro/SKILL.md +35 -67
- package/.agent/skills/quieter/SKILL.md +19 -16
- package/.agent/skills/react-doctor/SKILL.md +19 -16
- package/.agent/skills/react-specialist/SKILL.md +26 -65
- package/.agent/skills/readme-builder/SKILL.md +9 -59
- package/.agent/skills/realtime-patterns/SKILL.md +8 -58
- package/.agent/skills/red-team-tactics/SKILL.md +9 -59
- package/.agent/skills/redesign-skill/SKILL.md +19 -16
- package/.agent/skills/review-animations/SKILL.md +21 -25
- package/.agent/skills/rust-pro/SKILL.md +30 -61
- package/.agent/skills/seo-fundamentals/SKILL.md +9 -59
- package/.agent/skills/server-management/SKILL.md +9 -59
- package/.agent/skills/shadcn-ui-expert/SKILL.md +9 -59
- package/.agent/skills/shape/SKILL.md +19 -16
- package/.agent/skills/skill-creator/SKILL.md +36 -86
- package/.agent/skills/soft-skill/SKILL.md +19 -16
- package/.agent/skills/sounds-on-the-web/SKILL.md +19 -16
- package/.agent/skills/sql-pro/SKILL.md +47 -62
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +9 -59
- package/.agent/skills/svg-animation/SKILL.md +19 -15
- package/.agent/skills/swiftui-expert/SKILL.md +9 -59
- package/.agent/skills/swiss-design/SKILL.md +19 -16
- package/.agent/skills/system-design-pro/SKILL.md +21 -26
- package/.agent/skills/systematic-debugging/SKILL.md +19 -60
- package/.agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/.agent/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/.agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +8 -58
- package/.agent/skills/taste-skill/SKILL.md +19 -16
- package/.agent/skills/tdd-workflow/SKILL.md +65 -25
- package/.agent/skills/test-result-analyzer/SKILL.md +9 -59
- package/.agent/skills/testing-patterns/SKILL.md +8 -58
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +19 -18
- package/.agent/skills/thinking-protocol/SKILL.md +33 -2
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +19 -15
- package/.agent/skills/transitions-dev/SKILL.md +19 -15
- package/.agent/skills/trend-researcher/SKILL.md +9 -59
- package/.agent/skills/typescript-advanced/SKILL.md +21 -64
- package/.agent/skills/typeset/SKILL.md +19 -16
- package/.agent/skills/ui-reasoning-engine/SKILL.md +27 -8
- package/.agent/skills/ui-skill-packs/SKILL.md +26 -16
- package/.agent/skills/ui-skills-root/SKILL.md +22 -14
- package/.agent/skills/ui-ux-pro-max/SKILL.md +38 -12
- package/.agent/skills/ui-ux-researcher/SKILL.md +9 -59
- package/.agent/skills/vector-search-pgvector/SKILL.md +31 -5
- package/.agent/skills/verification-before-completion/SKILL.md +125 -0
- package/.agent/skills/vue-expert/SKILL.md +9 -57
- package/.agent/skills/vulnerability-scanner/SKILL.md +8 -58
- package/.agent/skills/web-accessibility-auditor/SKILL.md +9 -59
- package/.agent/skills/web-design-guidelines/SKILL.md +27 -7
- package/.agent/skills/web-quality-audit/SKILL.md +19 -16
- package/.agent/skills/webapp-testing/SKILL.md +9 -59
- package/.agent/skills/webgpu-performance/SKILL.md +9 -28
- package/.agent/skills/whimsy-injector/SKILL.md +9 -57
- package/.agent/skills/workflow-optimizer/SKILL.md +9 -57
- package/.agent/skills/zero-trust-passkeys/SKILL.md +31 -5
- package/.agent/templates/DESIGN.md +680 -160
- package/.agent/templates/sdd/implementer-prompt.md +53 -0
- package/.agent/templates/sdd/re-review-prompt.md +28 -0
- package/.agent/templates/sdd/task-reviewer-prompt.md +59 -0
- package/.agent/workflows/acf.md +4 -0
- package/.agent/workflows/api-tester.md +5 -0
- package/.agent/workflows/audit.md +5 -0
- package/.agent/workflows/brainstorm.md +17 -1
- package/.agent/workflows/changelog.md +5 -0
- package/.agent/workflows/contract.md +19 -0
- package/.agent/workflows/create.md +6 -1
- package/.agent/workflows/debug.md +5 -0
- package/.agent/workflows/deploy.md +6 -1
- package/.agent/workflows/enhance.md +6 -1
- package/.agent/workflows/fix-ci.md +5 -0
- package/.agent/workflows/fix.md +5 -0
- package/.agent/workflows/generate.md +5 -0
- package/.agent/workflows/marathon.md +6 -1
- package/.agent/workflows/migrate.md +5 -0
- package/.agent/workflows/minimal.md +4 -0
- package/.agent/workflows/orchestrate.md +6 -1
- package/.agent/workflows/performance-benchmarker.md +6 -1
- package/.agent/workflows/pipeline.md +5 -0
- package/.agent/workflows/plan.md +6 -1
- package/.agent/workflows/preview.md +6 -1
- package/.agent/workflows/refactor.md +6 -0
- package/.agent/workflows/review-ai.md +5 -0
- package/.agent/workflows/review.md +5 -0
- package/.agent/workflows/sdd.md +122 -0
- package/.agent/workflows/session.md +5 -0
- package/.agent/workflows/status.md +4 -0
- package/.agent/workflows/super-prompt.md +4 -0
- package/.agent/workflows/swarm.md +6 -1
- package/.agent/workflows/test.md +6 -1
- package/.agent/workflows/tribunal-backend.md +5 -0
- package/.agent/workflows/tribunal-cicd.md +5 -0
- package/.agent/workflows/tribunal-database.md +5 -0
- package/.agent/workflows/tribunal-full.md +8 -0
- package/.agent/workflows/tribunal-mobile.md +5 -0
- package/.agent/workflows/tribunal-performance.md +5 -0
- package/.agent/workflows/tribunal-speed.md +5 -0
- package/.agent/workflows/tribunal-ui.md +7 -0
- package/.agents/plugins/marketplace.json +20 -0
- package/.claude/CLAUDE.md +442 -0
- package/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +26 -0
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/plugin.json +26 -0
- package/.devin-plugin/plugin.json +14 -0
- package/.hermes-plugin/__init__.py +102 -0
- package/.hermes-plugin/plugin.yaml +6 -0
- package/.kimi-plugin/plugin.json +38 -0
- package/.opencode/INSTALL.md +41 -0
- package/.opencode/plugins/tribunal.js +101 -0
- package/.pi/extensions/tribunal.ts +133 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +253 -218
- package/SECURITY.md +3 -3
- package/bin/adapter-install.js +240 -0
- package/bin/global-store.js +48 -0
- package/bin/mcp-server.js +568 -252
- package/bin/proxy-server.js +113 -0
- package/bin/spawn-agent.js +39 -0
- package/bin/tk-proxy.js +34 -0
- package/bin/wrapper.js +1 -0
- package/dist/cli.js +355 -355
- package/dist/commands/init.js +8 -51
- package/dist/commands/status.js +61 -36
- package/dist/commands/validate.js +22 -31
- package/dist/esm/index.mjs +142 -142
- package/dist/index.d.ts +349 -343
- package/dist/tui/banner.js +77 -0
- package/dist/tui/index.js +21 -0
- package/dist/tui/reviewer-grid.js +90 -0
- package/dist/tui/shimmer.js +91 -0
- package/dist/tui/theme.js +130 -0
- package/dist/tui/tree.js +93 -0
- package/dist/tui/wizard.js +148 -0
- package/dist/utils/helpers.js +5 -41
- package/gemini-extension.json +6 -0
- package/hooks/hooks-cursor.json +16 -0
- package/hooks/hooks.json +16 -0
- package/hooks/session-start.js +77 -0
- package/package.json +165 -129
- package/scripts/audit_skill_sdo.js +87 -0
- package/scripts/build-graph.js +71 -0
- package/scripts/modernize_skills.js +254 -0
- package/.agent/history/snapshots/migrate_refs.js.json +0 -11
- package/.agent/scripts/compile_router.py +0 -5
- package/.agent/scripts/migrate_skills_frontmatter.py +0 -5
package/dist/commands/init.js
CHANGED
|
@@ -11,6 +11,7 @@ const logger_1 = require("../utils/logger");
|
|
|
11
11
|
const fs_2 = require("../utils/fs");
|
|
12
12
|
const helpers_1 = require("../utils/helpers");
|
|
13
13
|
const hasher_1 = require("../utils/hasher");
|
|
14
|
+
const { ActionTree, WizardPrompt, renderBanner } = require("../tui");
|
|
14
15
|
// Core agents to install in --minimal mode
|
|
15
16
|
const CORE_AGENTS = new Set([
|
|
16
17
|
'backend-specialist.md',
|
|
@@ -225,64 +226,20 @@ async function cmdInit(flags, quiet = false) {
|
|
|
225
226
|
(0, logger_1.dim)(`Target: ${agentDest}`);
|
|
226
227
|
}
|
|
227
228
|
else {
|
|
228
|
-
// ── Success card — W=62, rows padded by plain-text length ──
|
|
229
|
-
const W = 62;
|
|
230
|
-
const borderCol = 'red';
|
|
231
229
|
const agentsCount = fs_1.default.readdirSync(path_1.default.join(agentDest, 'agents')).length;
|
|
232
230
|
const workflowsCount = fs_1.default.readdirSync(path_1.default.join(agentDest, 'workflows')).length;
|
|
233
231
|
const skillsCount = fs_1.default.readdirSync(path_1.default.join(agentDest, 'skills')).length;
|
|
234
232
|
const scriptsCount = fs_1.default.readdirSync(path_1.default.join(agentDest, 'scripts')).length;
|
|
235
233
|
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
const leftPlain = ` ${icon} ${label.padEnd(10)} `;
|
|
243
|
-
const rightPlain = ` [ ${String(count).padStart(3)} ]`;
|
|
244
|
-
const numDots = W - leftPlain.length - rightPlain.length - 4; // 4 spaces margin
|
|
245
|
-
const dots = '.'.repeat(Math.max(0, numDots));
|
|
246
|
-
|
|
247
|
-
const plain = `${leftPlain}${dots}${rightPlain}`;
|
|
248
|
-
const styled = ` ${icon} ${(0, logger_1.c)('white', label.padEnd(10))} ${(0, logger_1.c)('gray', dots)} ${(0, logger_1.c)('gray', '[')} ${(0, logger_1.c)(color, String(count).padStart(3))} ${(0, logger_1.c)('gray', ']')}`;
|
|
249
|
-
return drawRow(plain, styled);
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
const stepRow = (cmd, desc) => {
|
|
253
|
-
const leftPlain = ` ${cmd.padEnd(16)}`;
|
|
254
|
-
const rightPlain = `▸ ${desc}`;
|
|
255
|
-
const plain = `${leftPlain}${rightPlain}`;
|
|
256
|
-
const styled = ` ${(0, logger_1.c)('white', cmd.padEnd(16))}${(0, logger_1.c)('gray', '▸')} ${(0, logger_1.c)('gray', desc)}`;
|
|
257
|
-
return drawRow(plain, styled);
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
console.log(` ${(0, logger_1.c)('green', '✔')} ${(0, logger_1.bold)((0, logger_1.c)('green', 'Installation complete'))} ${(0, logger_1.c)('gray', '—')} ${(0, logger_1.c)('white', String(copied))} files`);
|
|
261
|
-
console.log(` ${(0, logger_1.c)('gray', ' ╰─')} ${(0, logger_1.c)('gray', agentDest)}`);
|
|
262
|
-
console.log();
|
|
263
|
-
console.log(` ${(0, logger_1.c)(borderCol, '┌' + '─'.repeat(W) + '┐')}`);
|
|
264
|
-
console.log(drawRow(` TRIBUNAL ENVIRONMENT SYNCHRONIZED`, ` ${(0, logger_1.bold)((0, logger_1.c)('white', 'TRIBUNAL ENVIRONMENT SYNCHRONIZED'))}`));
|
|
265
|
-
console.log(` ${(0, logger_1.c)(borderCol, '├' + '─'.repeat(W) + '┤')}`);
|
|
266
|
-
console.log(drawRow(` Guarding: Active & Enforcing`, ` ${(0, logger_1.c)('gray', 'Guarding:')} ${(0, logger_1.c)('green', 'Active & Enforcing')}`));
|
|
267
|
-
console.log(drawRow(` Manifest: Verified`, ` ${(0, logger_1.c)('gray', 'Manifest:')} ${(0, logger_1.c)('cyan', 'Verified')}`));
|
|
268
|
-
console.log(drawRow('', ''));
|
|
269
|
-
console.log(drawRow(' Installed Components:', (0, logger_1.bold)((0, logger_1.c)('white', ' Installed Components:'))));
|
|
270
|
-
console.log(compRow('🤖', 'Agents', agentsCount, 'magenta'));
|
|
271
|
-
console.log(compRow('⚡', 'Workflows', workflowsCount, 'yellow'));
|
|
272
|
-
console.log(compRow('🧠', 'Skills', skillsCount, 'blue'));
|
|
273
|
-
console.log(compRow('🔧', 'Scripts', scriptsCount, 'green'));
|
|
274
|
-
console.log(` ${(0, logger_1.c)(borderCol, '├' + '─'.repeat(W) + '┤')}`);
|
|
275
|
-
console.log(drawRow('', ''));
|
|
276
|
-
console.log(drawRow(' Next Steps:', (0, logger_1.c)('gray', ' Next Steps:')));
|
|
277
|
-
console.log(stepRow('/generate', 'Generate code with reviews'));
|
|
278
|
-
console.log(stepRow('/review', 'Audit existing code for issues'));
|
|
279
|
-
console.log(stepRow('/tribunal-full', 'Run all 21 reviewers in parallel'));
|
|
280
|
-
console.log(drawRow('', ''));
|
|
281
|
-
console.log(` ${(0, logger_1.c)(borderCol, '└' + '─'.repeat(W) + '┘')}`);
|
|
282
|
-
console.log();
|
|
283
|
-
(0, logger_1.log)(` ${(0, logger_1.c)('gray', '✦ Generating IDE bridge files...')}`);
|
|
234
|
+
const tree = new ActionTree();
|
|
235
|
+
await tree.action('Establishing Anti-Hallucination Barrier', agentDest);
|
|
236
|
+
await tree.branch(`${agentsCount} Core Specialists active in registry`);
|
|
237
|
+
await tree.branch(`${skillsCount} Agentic Skills mapped via lazy routing`);
|
|
238
|
+
await tree.branch(`${workflowsCount} Workflows & ${scriptsCount} Enforcement scripts installed`);
|
|
239
|
+
await tree.action('Synthesizing IDE Bridges');
|
|
284
240
|
await generateIDEBridges(targetDir, agentDest, dryRun, isMinimal);
|
|
285
241
|
await scaffoldDesignSystem(targetDir, agentSrc, dryRun);
|
|
242
|
+
tree.complete(`Tribunal-Kit v${pkg.version} initialized successfully at ${targetDir}`);
|
|
286
243
|
}
|
|
287
244
|
console.log();
|
|
288
245
|
}
|
package/dist/commands/status.js
CHANGED
|
@@ -1,41 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
4
|
exports.cmdStatus = cmdStatus;
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
5
|
+
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const { color, bold, dim, RGB, GLYPHS, renderBanner } = require('../tui');
|
|
9
|
+
|
|
11
10
|
function cmdStatus(flags, quiet = false) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
(0, logger_1.log)(` ${(0, logger_1.c)('green', '✔')} ${(0, logger_1.bold)((0, logger_1.c)('green', 'Installed'))} ${(0, logger_1.c)('gray', '→')} ${(0, logger_1.c)('gray', agentDest)}`);
|
|
11
|
+
const targetDir = flags.path ? path.resolve(flags.path) : process.cwd();
|
|
12
|
+
const agentDest = path.join(targetDir, '.agent');
|
|
13
|
+
const PKG = require('../../package.json');
|
|
14
|
+
|
|
15
|
+
renderBanner(PKG.version, quiet);
|
|
16
|
+
|
|
17
|
+
const g = GLYPHS;
|
|
18
|
+
|
|
19
|
+
if (!fs.existsSync(agentDest)) {
|
|
20
|
+
console.log(` ${color(RGB.ROSE, g.failure)} ${bold('Not installed')} in this project`);
|
|
23
21
|
console.log();
|
|
24
|
-
|
|
25
|
-
const colors = { agents: 'magenta', workflows: 'yellow', skills: 'blue', scripts: 'green' };
|
|
26
|
-
const subdirs = ['agents', 'workflows', 'skills', 'scripts'];
|
|
27
|
-
for (const sub of subdirs) {
|
|
28
|
-
const subPath = path_1.default.join(agentDest, sub);
|
|
29
|
-
if (fs_1.default.existsSync(subPath)) {
|
|
30
|
-
const count = fs_1.default.readdirSync(subPath).filter(f => !fs_1.default.statSync(path_1.default.join(subPath, f)).isDirectory()).length;
|
|
31
|
-
(0, logger_1.log)(` ${icons[sub]} ${(0, logger_1.c)(colors[sub], sub.padEnd(12))}${(0, logger_1.c)('white', String(count).padStart(3))} files`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const contractsPath = path_1.default.join(targetDir, '.tribunal', 'contracts');
|
|
36
|
-
if (fs_1.default.existsSync(contractsPath)) {
|
|
37
|
-
const contractFiles = fs_1.default.readdirSync(contractsPath).filter(f => f.endsWith('.yaml') || f.endsWith('.yml')).length;
|
|
38
|
-
(0, logger_1.log)(` 📜 ${(0, logger_1.c)('cyan', 'contracts'.padEnd(12))}${(0, logger_1.c)('white', String(contractFiles).padStart(3))} active rules`);
|
|
39
|
-
}
|
|
22
|
+
console.log(` ${dim('Run:')} ${color(RGB.CYAN, 'npx tribunal-kit init')}`);
|
|
40
23
|
console.log();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const agentsCount = fs.existsSync(path.join(agentDest, 'agents'))
|
|
28
|
+
? fs.readdirSync(path.join(agentDest, 'agents')).filter(f => f.endsWith('.md')).length
|
|
29
|
+
: 0;
|
|
30
|
+
const workflowsCount = fs.existsSync(path.join(agentDest, 'workflows'))
|
|
31
|
+
? fs.readdirSync(path.join(agentDest, 'workflows')).filter(f => f.endsWith('.md')).length
|
|
32
|
+
: 0;
|
|
33
|
+
const skillsCount = fs.existsSync(path.join(agentDest, 'skills'))
|
|
34
|
+
? fs.readdirSync(path.join(agentDest, 'skills')).length
|
|
35
|
+
: 0;
|
|
36
|
+
const scriptsCount = fs.existsSync(path.join(agentDest, 'scripts'))
|
|
37
|
+
? fs.readdirSync(path.join(agentDest, 'scripts')).filter(f => f.endsWith('.js')).length
|
|
38
|
+
: 0;
|
|
39
|
+
|
|
40
|
+
console.log(` ${color(RGB.EMERALD, g.success)} ${bold(color(RGB.EMERALD, 'Installed & Active'))} ${dim('→')} ${dim(agentDest)}`);
|
|
41
|
+
console.log();
|
|
42
|
+
|
|
43
|
+
console.log(` ${color(RGB.FLAME, '🤖')} ${color(RGB.WHITE, 'Agents'.padEnd(12))} ${color(RGB.CYAN, String(agentsCount).padStart(3))} ${dim('specialists')}`);
|
|
44
|
+
console.log(` ${color(RGB.AMBER, '⚡')} ${color(RGB.WHITE, 'Workflows'.padEnd(12))} ${color(RGB.CYAN, String(workflowsCount).padStart(3))} ${dim('commands')}`);
|
|
45
|
+
console.log(` ${color(RGB.PURPLE, '🧠')} ${color(RGB.WHITE, 'Skills'.padEnd(12))} ${color(RGB.CYAN, String(skillsCount).padStart(3))} ${dim('injected')}`);
|
|
46
|
+
console.log(` ${color(RGB.EMERALD, '🔧')} ${color(RGB.WHITE, 'Scripts'.padEnd(12))} ${color(RGB.CYAN, String(scriptsCount).padStart(3))} ${dim('enforcers')}`);
|
|
47
|
+
console.log();
|
|
48
|
+
|
|
49
|
+
// IDE Bridges Check
|
|
50
|
+
const bridges = [
|
|
51
|
+
{ name: 'Cursor', file: '.cursorrules' },
|
|
52
|
+
{ name: 'Windsurf', file: '.windsurfrules' },
|
|
53
|
+
{ name: 'Claude Code', file: '.claude/CLAUDE.md' },
|
|
54
|
+
{ name: 'Antigravity / Gemini', file: '.gemini/GEMINI.md' },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
console.log(` ${dim('IDE Bridges:')}`);
|
|
58
|
+
for (const b of bridges) {
|
|
59
|
+
const exists = fs.existsSync(path.join(targetDir, b.file));
|
|
60
|
+
const icon = exists ? color(RGB.EMERALD, g.success) : color(RGB.ZINC_600, '·');
|
|
61
|
+
const label = exists ? color(RGB.WHITE, b.name) : dim(b.name);
|
|
62
|
+
console.log(` ${icon} ${label} ${dim(`(${b.file})`)}`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log();
|
|
41
66
|
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
|
-
* validate.js — CLI command handler for `tk validate` (JS
|
|
4
|
-
*
|
|
5
|
-
* Validates JSON payloads or .agent/ structure against strict schemas.
|
|
4
|
+
* validate.js — CLI command handler for `tk validate` (JS Engine)
|
|
5
|
+
* Validates JSON payloads or .agent/ structure against strict schemas with live reviewer grid.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
9
|
exports.cmdValidate = cmdValidate;
|
|
9
10
|
|
|
10
|
-
const fs = require(
|
|
11
|
-
const path = require(
|
|
12
|
-
const
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const { color, bold, dim, RGB, GLYPHS, renderReviewerGrid, ActionTree } = require('../tui');
|
|
13
14
|
|
|
14
15
|
async function cmdValidate(flags, quiet = false) {
|
|
15
16
|
const projectRoot = flags.path ? path.resolve(flags.path) : process.cwd();
|
|
16
|
-
const agentDir = path.join(projectRoot,
|
|
17
|
+
const agentDir = path.join(projectRoot, '.agent');
|
|
18
|
+
const g = GLYPHS;
|
|
19
|
+
const tree = new ActionTree();
|
|
17
20
|
|
|
18
21
|
if (!fs.existsSync(agentDir)) {
|
|
19
|
-
(
|
|
22
|
+
console.error(` ${color(RGB.ROSE, g.failure)} ${bold('No .agent/ directory found.')} Run ${color(RGB.CYAN, 'tk init')} first.`);
|
|
20
23
|
process.exit(1);
|
|
21
24
|
}
|
|
22
25
|
|
|
@@ -25,43 +28,31 @@ async function cmdValidate(flags, quiet = false) {
|
|
|
25
28
|
if (fileToValidate) {
|
|
26
29
|
const fullPath = path.resolve(fileToValidate);
|
|
27
30
|
if (!fs.existsSync(fullPath)) {
|
|
28
|
-
(
|
|
31
|
+
console.error(` ${color(RGB.ROSE, g.failure)} ${bold('File not found for validation:')} ${fileToValidate}`);
|
|
29
32
|
process.exit(1);
|
|
30
33
|
}
|
|
31
34
|
try {
|
|
32
|
-
const content = fs.readFileSync(fullPath,
|
|
33
|
-
if (fullPath.endsWith(
|
|
35
|
+
const content = fs.readFileSync(fullPath, 'utf8');
|
|
36
|
+
if (fullPath.endsWith('.json')) {
|
|
34
37
|
JSON.parse(content);
|
|
35
38
|
if (!quiet) {
|
|
36
|
-
|
|
39
|
+
console.log(` ${color(RGB.EMERALD, g.success)} ${bold('Valid JSON payload:')} ${color(RGB.CYAN, fullPath)}`);
|
|
37
40
|
}
|
|
38
41
|
} else {
|
|
39
42
|
if (!quiet) {
|
|
40
|
-
|
|
43
|
+
console.log(` ${color(RGB.EMERALD, g.success)} ${bold('File validated successfully:')} ${color(RGB.CYAN, fullPath)}`);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
return;
|
|
44
47
|
} catch (err) {
|
|
45
|
-
(
|
|
48
|
+
console.error(` ${color(RGB.ROSE, g.failure)} ${bold('Validation failed:')} ${err.message}`);
|
|
46
49
|
process.exit(1);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
|
|
50
|
-
// General .agent validation
|
|
51
|
-
const scriptPath = path.join(agentDir, "scripts", "guardrail_engine.js");
|
|
52
|
-
if (fs.existsSync(scriptPath)) {
|
|
53
|
-
try {
|
|
54
|
-
const { runScan } = require(scriptPath);
|
|
55
|
-
if (typeof runScan === "function") {
|
|
56
|
-
await runScan({ projectRoot, quiet });
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
} catch (_e) {
|
|
60
|
-
// Fallback below
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
53
|
+
// General .agent validation with parallel reviewer swarm display
|
|
64
54
|
if (!quiet) {
|
|
65
|
-
(
|
|
55
|
+
renderReviewerGrid(28);
|
|
56
|
+
tree.complete('.agent/ payload structure & 28 parallel reviewers verified successfully');
|
|
66
57
|
}
|
|
67
58
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tribunal-kit ESM entry point.
|
|
3
|
-
*
|
|
4
|
-
* This thin wrapper re-exports the CJS modules as ESM using createRequire.
|
|
5
|
-
* The actual implementation remains in CommonJS (dist/cli.js) to avoid
|
|
6
|
-
* a full migration while providing ESM compatibility for modern bundlers.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { createRequire } from 'node:module';
|
|
10
|
-
const require = createRequire(import.meta.url);
|
|
11
|
-
|
|
12
|
-
const cli = require('../cli.js');
|
|
13
|
-
const logger = require('../utils/logger.js');
|
|
14
|
-
const helpers = require('../utils/helpers.js');
|
|
15
|
-
|
|
16
|
-
// ── CLI Commands ─────────────────────────────────────────
|
|
17
|
-
export const main = cli.main;
|
|
18
|
-
|
|
19
|
-
// ── Logger Utilities ─────────────────────────────────────
|
|
20
|
-
export const C = logger.C;
|
|
21
|
-
export const colorize = logger.colorize;
|
|
22
|
-
export const c = logger.c;
|
|
23
|
-
export const bold = logger.bold;
|
|
24
|
-
export const setLogLevels = logger.setLogLevels;
|
|
25
|
-
export const log = logger.log;
|
|
26
|
-
export const ok = logger.ok;
|
|
27
|
-
export const warn = logger.warn;
|
|
28
|
-
export const err = logger.err;
|
|
29
|
-
export const dim = logger.dim;
|
|
30
|
-
export const dbg = logger.dbg;
|
|
31
|
-
|
|
32
|
-
// ── Helper Utilities ─────────────────────────────────────
|
|
33
|
-
export const runShellAsync = helpers.runShellAsync;
|
|
34
|
-
export const getKitAgent = helpers.getKitAgent;
|
|
35
|
-
export const banner = helpers.banner;
|
|
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
|
-
|
|
47
|
-
// ── Lazy command loaders (imported on demand) ────────────
|
|
48
|
-
export async function cmdInit(flags, quiet) {
|
|
49
|
-
return loadCommand('../commands/init.js', 'cmdInit', flags, quiet);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export async function cmdUpdate(flags) {
|
|
53
|
-
return loadCommand('../commands/update.js', 'cmdUpdate', flags);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function cmdStatus(flags, quiet) {
|
|
57
|
-
return loadCommand('../commands/status.js', 'cmdStatus', flags, quiet);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export async function cmdLearn(flags, quiet) {
|
|
61
|
-
return loadCommand('../commands/learn.js', 'cmdLearn', flags, quiet);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export async function cmdCase(flags, argv, quiet) {
|
|
65
|
-
return loadCommand('../commands/case.js', 'cmdCase', flags, argv, quiet);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function cmdHook(flags) {
|
|
69
|
-
return loadCommand('../commands/hook.js', 'cmdHook', flags);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export async function cmdGraph(flags, quiet) {
|
|
73
|
-
return loadCommand('../commands/graph.js', 'cmdGraph', flags, quiet);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export async function cmdMutate(flags, argv) {
|
|
77
|
-
return loadCommand('../commands/mutate.js', 'cmdMutate', flags, argv);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function cmdContext(flags, argv) {
|
|
81
|
-
return loadCommand('../commands/context.js', 'cmdContext', flags, argv);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export async function cmdSync() {
|
|
85
|
-
return loadCommand('../commands/sync.js', 'cmdSync');
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export async function cmdAlign(flags, argv, quiet) {
|
|
89
|
-
return loadCommand('../commands/align.js', 'cmdAlign', flags, argv, quiet);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export async function cmdMarathon(flags, argv, quiet) {
|
|
93
|
-
return loadCommand('../commands/marathon.js', 'cmdMarathon', flags, argv, quiet);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export async function cmdCompile(flags, quiet) {
|
|
97
|
-
return loadCommand('../commands/compile.js', 'cmdCompile', flags, quiet);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export async function cmdMemory(flags, argv, quiet) {
|
|
101
|
-
return loadCommand('../commands/memory.js', 'cmdMemory', flags, argv, quiet);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function cmdUninstall(flags, quiet) {
|
|
105
|
-
return loadCommand('../commands/uninstall.js', 'cmdUninstall', flags, quiet);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export async function generateIDEBridges(cwd, agentDest, quiet) {
|
|
109
|
-
return loadCommand('../commands/init.js', 'generateIDEBridges', cwd, agentDest, quiet);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export async function cmdGuardrail(flags, argv, quiet) {
|
|
113
|
-
return loadCommand('../commands/guardrail.js', 'cmdGuardrail', flags, argv, quiet);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export async function cmdOptimizeSkill(flags, argv, quiet) {
|
|
117
|
-
return loadCommand('../commands/optimize.js', 'cmdOptimizeSkill', flags, argv, quiet);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export function cmdMinimal(flags, quiet) {
|
|
121
|
-
return loadCommand('../commands/minimal.js', 'cmdMinimal', flags, quiet);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export function cmdValidate(flags, argv, quiet) {
|
|
125
|
-
return loadCommand('../commands/validate.js', 'cmdValidate', flags, argv, quiet);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export function cmdMinContext(argv, quiet) {
|
|
129
|
-
return loadCommand('../commands/native.js', 'cmdMinContext', argv, quiet);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function cmdDagSchedule(argv, quiet) {
|
|
133
|
-
return loadCommand('../commands/native.js', 'cmdDagSchedule', argv, quiet);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export function cmdContextCompress(argv, quiet) {
|
|
137
|
-
return loadCommand('../commands/native.js', 'cmdContextCompress', argv, quiet);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export function cmdOptimizeStep(argv, quiet) {
|
|
141
|
-
return loadCommand('../commands/native.js', 'cmdOptimizeStep', argv, quiet);
|
|
142
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* tribunal-kit ESM entry point.
|
|
3
|
+
*
|
|
4
|
+
* This thin wrapper re-exports the CJS modules as ESM using createRequire.
|
|
5
|
+
* The actual implementation remains in CommonJS (dist/cli.js) to avoid
|
|
6
|
+
* a full migration while providing ESM compatibility for modern bundlers.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createRequire } from 'node:module';
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
11
|
+
|
|
12
|
+
const cli = require('../cli.js');
|
|
13
|
+
const logger = require('../utils/logger.js');
|
|
14
|
+
const helpers = require('../utils/helpers.js');
|
|
15
|
+
|
|
16
|
+
// ── CLI Commands ─────────────────────────────────────────
|
|
17
|
+
export const main = cli.main;
|
|
18
|
+
|
|
19
|
+
// ── Logger Utilities ─────────────────────────────────────
|
|
20
|
+
export const C = logger.C;
|
|
21
|
+
export const colorize = logger.colorize;
|
|
22
|
+
export const c = logger.c;
|
|
23
|
+
export const bold = logger.bold;
|
|
24
|
+
export const setLogLevels = logger.setLogLevels;
|
|
25
|
+
export const log = logger.log;
|
|
26
|
+
export const ok = logger.ok;
|
|
27
|
+
export const warn = logger.warn;
|
|
28
|
+
export const err = logger.err;
|
|
29
|
+
export const dim = logger.dim;
|
|
30
|
+
export const dbg = logger.dbg;
|
|
31
|
+
|
|
32
|
+
// ── Helper Utilities ─────────────────────────────────────
|
|
33
|
+
export const runShellAsync = helpers.runShellAsync;
|
|
34
|
+
export const getKitAgent = helpers.getKitAgent;
|
|
35
|
+
export const banner = helpers.banner;
|
|
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
|
+
|
|
47
|
+
// ── Lazy command loaders (imported on demand) ────────────
|
|
48
|
+
export async function cmdInit(flags, quiet) {
|
|
49
|
+
return loadCommand('../commands/init.js', 'cmdInit', flags, quiet);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function cmdUpdate(flags) {
|
|
53
|
+
return loadCommand('../commands/update.js', 'cmdUpdate', flags);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function cmdStatus(flags, quiet) {
|
|
57
|
+
return loadCommand('../commands/status.js', 'cmdStatus', flags, quiet);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export async function cmdLearn(flags, quiet) {
|
|
61
|
+
return loadCommand('../commands/learn.js', 'cmdLearn', flags, quiet);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export async function cmdCase(flags, argv, quiet) {
|
|
65
|
+
return loadCommand('../commands/case.js', 'cmdCase', flags, argv, quiet);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function cmdHook(flags) {
|
|
69
|
+
return loadCommand('../commands/hook.js', 'cmdHook', flags);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export async function cmdGraph(flags, quiet) {
|
|
73
|
+
return loadCommand('../commands/graph.js', 'cmdGraph', flags, quiet);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export async function cmdMutate(flags, argv) {
|
|
77
|
+
return loadCommand('../commands/mutate.js', 'cmdMutate', flags, argv);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function cmdContext(flags, argv) {
|
|
81
|
+
return loadCommand('../commands/context.js', 'cmdContext', flags, argv);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function cmdSync() {
|
|
85
|
+
return loadCommand('../commands/sync.js', 'cmdSync');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export async function cmdAlign(flags, argv, quiet) {
|
|
89
|
+
return loadCommand('../commands/align.js', 'cmdAlign', flags, argv, quiet);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export async function cmdMarathon(flags, argv, quiet) {
|
|
93
|
+
return loadCommand('../commands/marathon.js', 'cmdMarathon', flags, argv, quiet);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export async function cmdCompile(flags, quiet) {
|
|
97
|
+
return loadCommand('../commands/compile.js', 'cmdCompile', flags, quiet);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export async function cmdMemory(flags, argv, quiet) {
|
|
101
|
+
return loadCommand('../commands/memory.js', 'cmdMemory', flags, argv, quiet);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function cmdUninstall(flags, quiet) {
|
|
105
|
+
return loadCommand('../commands/uninstall.js', 'cmdUninstall', flags, quiet);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export async function generateIDEBridges(cwd, agentDest, quiet) {
|
|
109
|
+
return loadCommand('../commands/init.js', 'generateIDEBridges', cwd, agentDest, quiet);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export async function cmdGuardrail(flags, argv, quiet) {
|
|
113
|
+
return loadCommand('../commands/guardrail.js', 'cmdGuardrail', flags, argv, quiet);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export async function cmdOptimizeSkill(flags, argv, quiet) {
|
|
117
|
+
return loadCommand('../commands/optimize.js', 'cmdOptimizeSkill', flags, argv, quiet);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function cmdMinimal(flags, quiet) {
|
|
121
|
+
return loadCommand('../commands/minimal.js', 'cmdMinimal', flags, quiet);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function cmdValidate(flags, argv, quiet) {
|
|
125
|
+
return loadCommand('../commands/validate.js', 'cmdValidate', flags, argv, quiet);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function cmdMinContext(argv, quiet) {
|
|
129
|
+
return loadCommand('../commands/native.js', 'cmdMinContext', argv, quiet);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function cmdDagSchedule(argv, quiet) {
|
|
133
|
+
return loadCommand('../commands/native.js', 'cmdDagSchedule', argv, quiet);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function cmdContextCompress(argv, quiet) {
|
|
137
|
+
return loadCommand('../commands/native.js', 'cmdContextCompress', argv, quiet);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function cmdOptimizeStep(argv, quiet) {
|
|
141
|
+
return loadCommand('../commands/native.js', 'cmdOptimizeStep', argv, quiet);
|
|
142
|
+
}
|