javi-forge 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -1
- package/ci-local/README.md +56 -11
- package/ci-local/ci-local.ps1 +445 -0
- package/ci-local/ci-local.sh +52 -9
- package/ci-local/docker/python.Dockerfile +7 -0
- package/ci-local/hooks/commit-msg +120 -44
- package/ci-local/hooks/commit-msg.test.sh +286 -0
- package/ci-local/hooks/pre-commit +9 -1
- package/ci-local/hooks/pre-push +13 -2
- package/ci-local/install.ps1 +367 -0
- package/ci-local/install.sh +151 -5
- package/ci-local/uninstall.ps1 +85 -0
- package/ci-local/uninstall.sh +95 -0
- package/dist/cli/dispatch/ci.d.ts +12 -0
- package/dist/cli/dispatch/ci.js +38 -0
- package/dist/cli/dispatch/security.d.ts +11 -0
- package/dist/cli/dispatch/security.js +68 -0
- package/dist/cli/dispatch/simple-renderers.d.ts +16 -0
- package/dist/cli/dispatch/simple-renderers.js +65 -0
- package/dist/cli/dispatch/skill-publish.d.ts +15 -0
- package/dist/cli/dispatch/skill-publish.js +44 -0
- package/dist/cli/dispatch/skills-cmd.d.ts +13 -0
- package/dist/cli/dispatch/skills-cmd.js +93 -0
- package/dist/cli/dispatch/tdd.d.ts +11 -0
- package/dist/cli/dispatch/tdd.js +45 -0
- package/dist/cli/dispatch/types.d.ts +29 -0
- package/dist/cli/dispatch/types.js +2 -0
- package/dist/cli/dispatch/workflow.d.ts +11 -0
- package/dist/cli/dispatch/workflow.js +67 -0
- package/dist/cli/help.d.ts +127 -0
- package/dist/cli/help.js +138 -0
- package/dist/cli/runtime.d.ts +16 -0
- package/dist/cli/runtime.js +38 -0
- package/dist/cli/validators.d.ts +17 -0
- package/dist/cli/validators.js +35 -0
- package/dist/commands/analyze.d.ts +1 -1
- package/dist/commands/analyze.js +14 -16
- package/dist/commands/ci.d.ts +50 -3
- package/dist/commands/ci.js +537 -182
- package/dist/commands/doctor.d.ts +2 -2
- package/dist/commands/doctor.js +112 -62
- package/dist/commands/init/report.d.ts +13 -0
- package/dist/commands/init/report.js +13 -0
- package/dist/commands/init/steps/agent-skills.d.ts +13 -0
- package/dist/commands/init/steps/agent-skills.js +45 -0
- package/dist/commands/init/steps/ai-sync.d.ts +15 -0
- package/dist/commands/init/steps/ai-sync.js +62 -0
- package/dist/commands/init/steps/ci.d.ts +24 -0
- package/dist/commands/init/steps/ci.js +74 -0
- package/dist/commands/init/steps/claude-md.d.ts +14 -0
- package/dist/commands/init/steps/claude-md.js +54 -0
- package/dist/commands/init/steps/code-graph.d.ts +16 -0
- package/dist/commands/init/steps/code-graph.js +68 -0
- package/dist/commands/init/steps/context-dir.d.ts +13 -0
- package/dist/commands/init/steps/context-dir.js +47 -0
- package/dist/commands/init/steps/docker-deploy.d.ts +16 -0
- package/dist/commands/init/steps/docker-deploy.js +60 -0
- package/dist/commands/init/steps/ghagga.d.ts +15 -0
- package/dist/commands/init/steps/ghagga.js +58 -0
- package/dist/commands/init/steps/git.d.ts +25 -0
- package/dist/commands/init/steps/git.js +81 -0
- package/dist/commands/init/steps/gitignore.d.ts +13 -0
- package/dist/commands/init/steps/gitignore.js +39 -0
- package/dist/commands/init/steps/local-ai.d.ts +14 -0
- package/dist/commands/init/steps/local-ai.js +53 -0
- package/dist/commands/init/steps/manifest.d.ts +13 -0
- package/dist/commands/init/steps/manifest.js +58 -0
- package/dist/commands/init/steps/memory.d.ts +15 -0
- package/dist/commands/init/steps/memory.js +60 -0
- package/dist/commands/init/steps/mock.d.ts +13 -0
- package/dist/commands/init/steps/mock.js +64 -0
- package/dist/commands/init/steps/sdd.d.ts +12 -0
- package/dist/commands/init/steps/sdd.js +40 -0
- package/dist/commands/init/steps/security.d.ts +28 -0
- package/dist/commands/init/steps/security.js +103 -0
- package/dist/commands/init/types.d.ts +30 -0
- package/dist/commands/init/types.js +2 -0
- package/dist/commands/init.d.ts +5 -4
- package/dist/commands/init.js +42 -387
- package/dist/commands/llmstxt.d.ts +1 -1
- package/dist/commands/llmstxt.js +36 -34
- package/dist/commands/plugin.d.ts +10 -1
- package/dist/commands/plugin.js +92 -47
- package/dist/commands/security.d.ts +11 -5
- package/dist/commands/security.js +236 -77
- package/dist/commands/skills/analysis.d.ts +19 -0
- package/dist/commands/skills/analysis.js +211 -0
- package/dist/commands/skills/benchmark.d.ts +6 -0
- package/dist/commands/skills/benchmark.js +82 -0
- package/dist/commands/skills/constants.d.ts +10 -0
- package/dist/commands/skills/constants.js +27 -0
- package/dist/commands/skills/directives.d.ts +21 -0
- package/dist/commands/skills/directives.js +101 -0
- package/dist/commands/skills/parsing.d.ts +16 -0
- package/dist/commands/skills/parsing.js +108 -0
- package/dist/commands/skills/rules.d.ts +5 -0
- package/dist/commands/skills/rules.js +32 -0
- package/dist/commands/skills/scoring.d.ts +47 -0
- package/dist/commands/skills/scoring.js +306 -0
- package/dist/commands/skills.d.ts +8 -69
- package/dist/commands/skills.js +9 -490
- package/dist/commands/tdd-pipeline.d.ts +17 -0
- package/dist/commands/tdd-pipeline.js +144 -0
- package/dist/commands/tdd.d.ts +1 -1
- package/dist/commands/tdd.js +21 -18
- package/dist/commands/workflow.d.ts +23 -0
- package/dist/commands/workflow.js +116 -0
- package/dist/constants.d.ts +15 -1
- package/dist/constants.js +161 -122
- package/dist/index.js +43 -280
- package/dist/lib/agent-skills.d.ts +36 -1
- package/dist/lib/agent-skills.js +168 -19
- package/dist/lib/atlassian-mcp.d.ts +42 -0
- package/dist/lib/atlassian-mcp.js +98 -0
- package/dist/lib/auto-skill-install.d.ts +37 -0
- package/dist/lib/auto-skill-install.js +91 -0
- package/dist/lib/auto-wire.d.ts +20 -0
- package/dist/lib/auto-wire.js +240 -0
- package/dist/lib/ci-config.d.ts +65 -0
- package/dist/lib/ci-config.js +297 -0
- package/dist/lib/claudemd.d.ts +13 -1
- package/dist/lib/claudemd.js +174 -24
- package/dist/lib/codex-export.d.ts +1 -1
- package/dist/lib/codex-export.js +26 -32
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.js +52 -44
- package/dist/lib/context.d.ts +17 -2
- package/dist/lib/context.js +142 -13
- package/dist/lib/crash-recovery.d.ts +34 -0
- package/dist/lib/crash-recovery.js +123 -0
- package/dist/lib/docker.d.ts +23 -2
- package/dist/lib/docker.js +168 -131
- package/dist/lib/exec.d.ts +10 -0
- package/dist/lib/exec.js +11 -0
- package/dist/lib/frontmatter.d.ts +1 -1
- package/dist/lib/frontmatter.js +29 -15
- package/dist/lib/harness-audit.d.ts +35 -0
- package/dist/lib/harness-audit.js +277 -0
- package/dist/lib/parallel-batch.d.ts +42 -0
- package/dist/lib/parallel-batch.js +88 -0
- package/dist/lib/plugin.d.ts +9 -3
- package/dist/lib/plugin.js +127 -70
- package/dist/lib/secret-scanner.d.ts +30 -0
- package/dist/lib/secret-scanner.js +274 -0
- package/dist/lib/security-analysis.d.ts +74 -0
- package/dist/lib/security-analysis.js +489 -0
- package/dist/lib/skill-publish.d.ts +40 -0
- package/dist/lib/skill-publish.js +164 -0
- package/dist/lib/skill-scanner.d.ts +63 -0
- package/dist/lib/skill-scanner.js +383 -0
- package/dist/lib/stack-detector.d.ts +38 -0
- package/dist/lib/stack-detector.js +207 -0
- package/dist/lib/supply-chain.d.ts +23 -0
- package/dist/lib/supply-chain.js +126 -0
- package/dist/lib/team-presets.d.ts +53 -0
- package/dist/lib/team-presets.js +201 -0
- package/dist/lib/template.d.ts +16 -1
- package/dist/lib/template.js +46 -17
- package/dist/lib/workflow/discovery.d.ts +27 -0
- package/dist/lib/workflow/discovery.js +85 -0
- package/dist/lib/workflow/index.d.ts +5 -0
- package/dist/lib/workflow/index.js +5 -0
- package/dist/lib/workflow/parser.d.ts +16 -0
- package/dist/lib/workflow/parser.js +198 -0
- package/dist/lib/workflow/renderer.d.ts +9 -0
- package/dist/lib/workflow/renderer.js +152 -0
- package/dist/lib/workflow/validator.d.ts +10 -0
- package/dist/lib/workflow/validator.js +189 -0
- package/dist/tasks/index.d.ts +4 -0
- package/dist/tasks/index.js +4 -0
- package/dist/tasks/scaffold-tasks.d.ts +3 -0
- package/dist/tasks/scaffold-tasks.js +14 -0
- package/dist/tasks/task-id.d.ts +30 -0
- package/dist/tasks/task-id.js +59 -0
- package/dist/tasks/task-tracker.d.ts +15 -0
- package/dist/tasks/task-tracker.js +81 -0
- package/dist/types/index.d.ts +134 -6
- package/dist/types/index.js +11 -1
- package/dist/ui/AnalyzeUI.d.ts +1 -1
- package/dist/ui/AnalyzeUI.js +38 -39
- package/dist/ui/App.d.ts +5 -3
- package/dist/ui/App.js +86 -46
- package/dist/ui/AutoSkills.d.ts +9 -0
- package/dist/ui/AutoSkills.js +124 -0
- package/dist/ui/CI.d.ts +2 -2
- package/dist/ui/CI.js +24 -26
- package/dist/ui/CIContext.d.ts +1 -1
- package/dist/ui/CIContext.js +2 -2
- package/dist/ui/CISelector.d.ts +2 -2
- package/dist/ui/CISelector.js +23 -15
- package/dist/ui/Doctor.d.ts +1 -1
- package/dist/ui/Doctor.js +35 -29
- package/dist/ui/Header.d.ts +1 -1
- package/dist/ui/Header.js +14 -14
- package/dist/ui/HookProfileSelector.d.ts +9 -0
- package/dist/ui/HookProfileSelector.js +54 -0
- package/dist/ui/LlmsTxt.d.ts +1 -1
- package/dist/ui/LlmsTxt.js +31 -22
- package/dist/ui/MemorySelector.d.ts +2 -2
- package/dist/ui/MemorySelector.js +28 -16
- package/dist/ui/NameInput.d.ts +1 -1
- package/dist/ui/NameInput.js +21 -21
- package/dist/ui/OptionSelector.d.ts +6 -2
- package/dist/ui/OptionSelector.js +83 -32
- package/dist/ui/Plugin.d.ts +4 -3
- package/dist/ui/Plugin.js +78 -35
- package/dist/ui/Progress.d.ts +3 -3
- package/dist/ui/Progress.js +23 -22
- package/dist/ui/Skills.d.ts +2 -2
- package/dist/ui/Skills.js +61 -32
- package/dist/ui/StackSelector.d.ts +2 -2
- package/dist/ui/StackSelector.js +27 -17
- package/dist/ui/Summary.d.ts +3 -3
- package/dist/ui/Summary.js +60 -50
- package/dist/ui/Welcome.d.ts +1 -1
- package/dist/ui/Welcome.js +15 -16
- package/dist/ui/theme.d.ts +1 -1
- package/dist/ui/theme.js +6 -6
- package/lib/common.psm1 +167 -0
- package/lib/common.sh +30 -0
- package/package.json +46 -24
- package/templates/common/atlassian/mcp-atlassian-snippet.json +16 -0
- package/templates/common/repoforge/mcp-repoforge-snippet.json +11 -0
- package/templates/common/repoforge/repoforge.yaml +34 -0
- package/templates/github/deploy-docker-zero-downtime.yml +140 -0
- package/templates/github/repoforge-graph.yml +45 -0
- package/templates/gitlab/deploy-docker-zero-downtime.yml +57 -0
- package/templates/local-ai/.env.example +17 -0
- package/templates/local-ai/docker-compose.yml +95 -0
- package/templates/security-hooks/claude-settings-security.json +30 -0
- package/templates/security-hooks/commit-msg-signing +29 -0
- package/templates/security-hooks/pre-commit-permissions +74 -0
- package/templates/security-hooks/pre-commit-secrets +74 -0
- package/templates/security-hooks/pre-push-branch-protection +62 -0
- package/templates/security-hooks/pre-push-deps +83 -0
- package/templates/security-hooks/pre-push-signing +67 -0
- package/templates/woodpecker/deploy-docker-zero-downtime.yml +50 -0
- package/templates/workflows/ci-pipeline.dot +15 -0
- package/templates/workflows/feature-flow.dot +21 -0
- package/templates/workflows/release.dot +16 -0
- package/dist/__integration__/helpers.d.ts +0 -20
- package/dist/__integration__/helpers.d.ts.map +0 -1
- package/dist/__integration__/helpers.js +0 -31
- package/dist/__integration__/helpers.js.map +0 -1
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/ci.d.ts.map +0 -1
- package/dist/commands/ci.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/llmstxt.d.ts.map +0 -1
- package/dist/commands/llmstxt.js.map +0 -1
- package/dist/commands/plugin.d.ts.map +0 -1
- package/dist/commands/plugin.js.map +0 -1
- package/dist/commands/security.d.ts.map +0 -1
- package/dist/commands/security.js.map +0 -1
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/tdd.d.ts.map +0 -1
- package/dist/commands/tdd.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/agent-skills.d.ts.map +0 -1
- package/dist/lib/agent-skills.js.map +0 -1
- package/dist/lib/claudemd.d.ts.map +0 -1
- package/dist/lib/claudemd.js.map +0 -1
- package/dist/lib/codex-export.d.ts.map +0 -1
- package/dist/lib/codex-export.js.map +0 -1
- package/dist/lib/common.d.ts.map +0 -1
- package/dist/lib/common.js.map +0 -1
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/context.js.map +0 -1
- package/dist/lib/docker.d.ts.map +0 -1
- package/dist/lib/docker.js.map +0 -1
- package/dist/lib/frontmatter.d.ts.map +0 -1
- package/dist/lib/frontmatter.js.map +0 -1
- package/dist/lib/plugin.d.ts.map +0 -1
- package/dist/lib/plugin.js.map +0 -1
- package/dist/lib/template.d.ts.map +0 -1
- package/dist/lib/template.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/ui/AnalyzeUI.d.ts.map +0 -1
- package/dist/ui/AnalyzeUI.js.map +0 -1
- package/dist/ui/App.d.ts.map +0 -1
- package/dist/ui/App.js.map +0 -1
- package/dist/ui/CI.d.ts.map +0 -1
- package/dist/ui/CI.js.map +0 -1
- package/dist/ui/CIContext.d.ts.map +0 -1
- package/dist/ui/CIContext.js.map +0 -1
- package/dist/ui/CISelector.d.ts.map +0 -1
- package/dist/ui/CISelector.js.map +0 -1
- package/dist/ui/Doctor.d.ts.map +0 -1
- package/dist/ui/Doctor.js.map +0 -1
- package/dist/ui/Header.d.ts.map +0 -1
- package/dist/ui/Header.js.map +0 -1
- package/dist/ui/LlmsTxt.d.ts.map +0 -1
- package/dist/ui/LlmsTxt.js.map +0 -1
- package/dist/ui/MemorySelector.d.ts.map +0 -1
- package/dist/ui/MemorySelector.js.map +0 -1
- package/dist/ui/NameInput.d.ts.map +0 -1
- package/dist/ui/NameInput.js.map +0 -1
- package/dist/ui/OptionSelector.d.ts.map +0 -1
- package/dist/ui/OptionSelector.js.map +0 -1
- package/dist/ui/Plugin.d.ts.map +0 -1
- package/dist/ui/Plugin.js.map +0 -1
- package/dist/ui/Progress.d.ts.map +0 -1
- package/dist/ui/Progress.js.map +0 -1
- package/dist/ui/Skills.d.ts.map +0 -1
- package/dist/ui/Skills.js.map +0 -1
- package/dist/ui/StackSelector.d.ts.map +0 -1
- package/dist/ui/StackSelector.js.map +0 -1
- package/dist/ui/Summary.d.ts.map +0 -1
- package/dist/ui/Summary.js.map +0 -1
- package/dist/ui/Welcome.d.ts.map +0 -1
- package/dist/ui/Welcome.js.map +0 -1
- package/dist/ui/theme.d.ts.map +0 -1
- package/dist/ui/theme.js.map +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI metadata: help text and meow flags schema.
|
|
3
|
+
*
|
|
4
|
+
* Pure data module — no runtime imports. Consumed by `src/index.tsx`
|
|
5
|
+
* when constructing the `meow` parser.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Help banner shown by meow when `--help` is passed or invalid args are supplied.
|
|
9
|
+
* Multi-line template literal — preserve exact formatting (whitespace is significant).
|
|
10
|
+
*/
|
|
11
|
+
export declare const HELP_TEXT = "\n Usage\n $ javi-forge [command] [options]\n\n Commands\n init Bootstrap a new project (default)\n ci Run CI simulation (lint + compile + test + security + ghagga)\n tdd init Install TDD-enforcing pre-commit hook (auto-detects stack)\n tdd pipeline Install TDD pipeline pre-push hook (--mode strict|warn)\n analyze Run repoforge skills analysis\n doctor Show health report\n workflow show Render a workflow graph as ASCII (--template <name> or file path)\n workflow validate Validate project state against a workflow graph\n workflow list List available workflows and built-in templates\n plugin add Install a plugin from GitHub (org/repo)\n plugin remove Remove an installed plugin\n plugin list List installed plugins\n plugin search Search the plugin registry\n plugin validate Validate a local plugin directory\n plugin sync Auto-detect and wire installed plugins\n plugin export Export plugin to Agent Skills spec format (skills.json)\n plugin export --codex: Export plugin to Codex-compatible TOML subagent files\n plugin export-skills Generate aggregated skills.json from all installed plugins\n plugin export-skills global Generate global skills.json from all globally installed plugins\n plugin import Import an Agent Skills spec package as a javi-forge plugin\n skills doctor Show skills health report (add --deep for conflict detection)\n skills budget Show token cost of loaded skills (add -b N for custom budget)\n skills score Score a skill on quality dimensions (completeness, clarity, testability, token-efficiency)\n skills benchmark Benchmark a skill with structural quality checks\n skills auto Auto-detect project stack and suggest/install matching AI skills\n skills auto-install Alias for skills auto\n skill publish Package a skill directory for marketplace distribution (generates plugin.json)\n security baseline Create security baseline from current audit findings\n security check Check for regressions against baseline (exits non-zero if found)\n security update Re-snapshot baseline (acknowledge current vulns)\n security allowlist Add all current findings to the allowlist (suppress in future checks)\n llms-txt Generate AI-friendly llms.txt for current project\n\n Options\n --dry-run Preview changes without writing files\n --stack Project stack (node, python, go, rust, java-gradle, java-maven, elixir)\n --ci CI provider (github, gitlab, woodpecker)\n --memory Memory module (engram, obsidian-brain, memory-simple, none)\n --project-name Project name (skips name prompt)\n --ghagga Enable GHAGGA review system\n --mock Enable mock-first mode (no real API keys needed)\n --local-ai Include local AI dev stack (Ollama + Docker Compose)\n --batch Non-interactive mode (auto-proceed, no keyboard input)\n --deep Enable deep analysis (conflict + duplicate detection)\n --budget, -b Token budget limit for skills (default: 8000)\n --skills-dir Custom skills directory path\n --author Author name for skill publish\n --repo Repository URL for skill publish\n --version Show version\n --help Show this help\n\n CI options (javi-forge ci)\n --quick Lint + compile only (fast, for pre-commit)\n --shell Open interactive shell in CI container\n --detect Show detected stack and exit\n --config PATH Load ordered CI runners from a versioned config file\n (default discovery: .javi-forge/ci.yaml)\n --stack STACK Force a single explicit stack (single-stack repos only \u2014\n insufficient for hybrid repos; use --config instead)\n --no-docker Run commands natively (no Docker)\n --no-ci-ghagga Skip GHAGGA review\n --no-security Skip Semgrep security scan\n --timeout N Per-step timeout in seconds (default: 600)\n\n CI hooks (javi-forge ci init)\n Install git hooks that call javi-forge ci.\n No files copied \u2014 hooks reference the global CLI.\n\n Examples\n $ javi-forge\n $ javi-forge init --dry-run\n $ javi-forge init --stack node --ci github\n $ javi-forge ci\n $ javi-forge ci init\n $ javi-forge tdd init\n $ javi-forge ci --quick\n $ javi-forge ci --no-ci-ghagga --no-security\n $ javi-forge ci --no-docker\n $ javi-forge ci --shell\n $ javi-forge ci --config .javi-forge/ci.yaml\n $ javi-forge analyze\n $ javi-forge doctor\n $ javi-forge plugin add mapbox/agent-skills\n $ javi-forge plugin list\n";
|
|
12
|
+
export declare const FLAGS_SCHEMA: {
|
|
13
|
+
readonly dryRun: {
|
|
14
|
+
readonly type: "boolean";
|
|
15
|
+
readonly default: false;
|
|
16
|
+
};
|
|
17
|
+
readonly stack: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly default: "";
|
|
20
|
+
};
|
|
21
|
+
readonly ci: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly default: "";
|
|
24
|
+
};
|
|
25
|
+
readonly memory: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
readonly default: "";
|
|
28
|
+
};
|
|
29
|
+
readonly projectName: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly default: "";
|
|
32
|
+
};
|
|
33
|
+
readonly ghagga: {
|
|
34
|
+
readonly type: "boolean";
|
|
35
|
+
readonly default: false;
|
|
36
|
+
};
|
|
37
|
+
readonly mock: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
readonly default: false;
|
|
40
|
+
};
|
|
41
|
+
readonly localAi: {
|
|
42
|
+
readonly type: "boolean";
|
|
43
|
+
readonly default: false;
|
|
44
|
+
};
|
|
45
|
+
readonly batch: {
|
|
46
|
+
readonly type: "boolean";
|
|
47
|
+
readonly default: false;
|
|
48
|
+
};
|
|
49
|
+
readonly quick: {
|
|
50
|
+
readonly type: "boolean";
|
|
51
|
+
readonly default: false;
|
|
52
|
+
};
|
|
53
|
+
readonly shell: {
|
|
54
|
+
readonly type: "boolean";
|
|
55
|
+
readonly default: false;
|
|
56
|
+
};
|
|
57
|
+
readonly detect: {
|
|
58
|
+
readonly type: "boolean";
|
|
59
|
+
readonly default: false;
|
|
60
|
+
};
|
|
61
|
+
readonly config: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly default: "";
|
|
64
|
+
};
|
|
65
|
+
readonly docker: {
|
|
66
|
+
readonly type: "boolean";
|
|
67
|
+
readonly default: true;
|
|
68
|
+
};
|
|
69
|
+
readonly ciGhagga: {
|
|
70
|
+
readonly type: "boolean";
|
|
71
|
+
readonly default: true;
|
|
72
|
+
};
|
|
73
|
+
readonly security: {
|
|
74
|
+
readonly type: "boolean";
|
|
75
|
+
readonly default: true;
|
|
76
|
+
};
|
|
77
|
+
readonly timeout: {
|
|
78
|
+
readonly type: "number";
|
|
79
|
+
readonly default: 600;
|
|
80
|
+
};
|
|
81
|
+
readonly minSeverity: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly default: "low";
|
|
84
|
+
};
|
|
85
|
+
readonly staleDays: {
|
|
86
|
+
readonly type: "number";
|
|
87
|
+
readonly default: 30;
|
|
88
|
+
};
|
|
89
|
+
readonly json: {
|
|
90
|
+
readonly type: "boolean";
|
|
91
|
+
readonly default: false;
|
|
92
|
+
};
|
|
93
|
+
readonly codex: {
|
|
94
|
+
readonly type: "boolean";
|
|
95
|
+
readonly default: false;
|
|
96
|
+
};
|
|
97
|
+
readonly deep: {
|
|
98
|
+
readonly type: "boolean";
|
|
99
|
+
readonly default: false;
|
|
100
|
+
};
|
|
101
|
+
readonly budget: {
|
|
102
|
+
readonly type: "number";
|
|
103
|
+
readonly shortFlag: "b";
|
|
104
|
+
readonly default: 8000;
|
|
105
|
+
};
|
|
106
|
+
readonly skillsDir: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly default: "";
|
|
109
|
+
};
|
|
110
|
+
readonly author: {
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
readonly default: "";
|
|
113
|
+
};
|
|
114
|
+
readonly repo: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly default: "";
|
|
117
|
+
};
|
|
118
|
+
readonly template: {
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
readonly default: "";
|
|
121
|
+
};
|
|
122
|
+
readonly mode: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
readonly default: "strict";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=help.d.ts.map
|
package/dist/cli/help.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI metadata: help text and meow flags schema.
|
|
3
|
+
*
|
|
4
|
+
* Pure data module — no runtime imports. Consumed by `src/index.tsx`
|
|
5
|
+
* when constructing the `meow` parser.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Help banner shown by meow when `--help` is passed or invalid args are supplied.
|
|
9
|
+
* Multi-line template literal — preserve exact formatting (whitespace is significant).
|
|
10
|
+
*/
|
|
11
|
+
export const HELP_TEXT = `
|
|
12
|
+
Usage
|
|
13
|
+
$ javi-forge [command] [options]
|
|
14
|
+
|
|
15
|
+
Commands
|
|
16
|
+
init Bootstrap a new project (default)
|
|
17
|
+
ci Run CI simulation (lint + compile + test + security + ghagga)
|
|
18
|
+
tdd init Install TDD-enforcing pre-commit hook (auto-detects stack)
|
|
19
|
+
tdd pipeline Install TDD pipeline pre-push hook (--mode strict|warn)
|
|
20
|
+
analyze Run repoforge skills analysis
|
|
21
|
+
doctor Show health report
|
|
22
|
+
workflow show Render a workflow graph as ASCII (--template <name> or file path)
|
|
23
|
+
workflow validate Validate project state against a workflow graph
|
|
24
|
+
workflow list List available workflows and built-in templates
|
|
25
|
+
plugin add Install a plugin from GitHub (org/repo)
|
|
26
|
+
plugin remove Remove an installed plugin
|
|
27
|
+
plugin list List installed plugins
|
|
28
|
+
plugin search Search the plugin registry
|
|
29
|
+
plugin validate Validate a local plugin directory
|
|
30
|
+
plugin sync Auto-detect and wire installed plugins
|
|
31
|
+
plugin export Export plugin to Agent Skills spec format (skills.json)
|
|
32
|
+
plugin export --codex: Export plugin to Codex-compatible TOML subagent files
|
|
33
|
+
plugin export-skills Generate aggregated skills.json from all installed plugins
|
|
34
|
+
plugin export-skills global Generate global skills.json from all globally installed plugins
|
|
35
|
+
plugin import Import an Agent Skills spec package as a javi-forge plugin
|
|
36
|
+
skills doctor Show skills health report (add --deep for conflict detection)
|
|
37
|
+
skills budget Show token cost of loaded skills (add -b N for custom budget)
|
|
38
|
+
skills score Score a skill on quality dimensions (completeness, clarity, testability, token-efficiency)
|
|
39
|
+
skills benchmark Benchmark a skill with structural quality checks
|
|
40
|
+
skills auto Auto-detect project stack and suggest/install matching AI skills
|
|
41
|
+
skills auto-install Alias for skills auto
|
|
42
|
+
skill publish Package a skill directory for marketplace distribution (generates plugin.json)
|
|
43
|
+
security baseline Create security baseline from current audit findings
|
|
44
|
+
security check Check for regressions against baseline (exits non-zero if found)
|
|
45
|
+
security update Re-snapshot baseline (acknowledge current vulns)
|
|
46
|
+
security allowlist Add all current findings to the allowlist (suppress in future checks)
|
|
47
|
+
llms-txt Generate AI-friendly llms.txt for current project
|
|
48
|
+
|
|
49
|
+
Options
|
|
50
|
+
--dry-run Preview changes without writing files
|
|
51
|
+
--stack Project stack (node, python, go, rust, java-gradle, java-maven, elixir)
|
|
52
|
+
--ci CI provider (github, gitlab, woodpecker)
|
|
53
|
+
--memory Memory module (engram, obsidian-brain, memory-simple, none)
|
|
54
|
+
--project-name Project name (skips name prompt)
|
|
55
|
+
--ghagga Enable GHAGGA review system
|
|
56
|
+
--mock Enable mock-first mode (no real API keys needed)
|
|
57
|
+
--local-ai Include local AI dev stack (Ollama + Docker Compose)
|
|
58
|
+
--batch Non-interactive mode (auto-proceed, no keyboard input)
|
|
59
|
+
--deep Enable deep analysis (conflict + duplicate detection)
|
|
60
|
+
--budget, -b Token budget limit for skills (default: 8000)
|
|
61
|
+
--skills-dir Custom skills directory path
|
|
62
|
+
--author Author name for skill publish
|
|
63
|
+
--repo Repository URL for skill publish
|
|
64
|
+
--version Show version
|
|
65
|
+
--help Show this help
|
|
66
|
+
|
|
67
|
+
CI options (javi-forge ci)
|
|
68
|
+
--quick Lint + compile only (fast, for pre-commit)
|
|
69
|
+
--shell Open interactive shell in CI container
|
|
70
|
+
--detect Show detected stack and exit
|
|
71
|
+
--config PATH Load ordered CI runners from a versioned config file
|
|
72
|
+
(default discovery: .javi-forge/ci.yaml)
|
|
73
|
+
--stack STACK Force a single explicit stack (single-stack repos only —
|
|
74
|
+
insufficient for hybrid repos; use --config instead)
|
|
75
|
+
--no-docker Run commands natively (no Docker)
|
|
76
|
+
--no-ci-ghagga Skip GHAGGA review
|
|
77
|
+
--no-security Skip Semgrep security scan
|
|
78
|
+
--timeout N Per-step timeout in seconds (default: 600)
|
|
79
|
+
|
|
80
|
+
CI hooks (javi-forge ci init)
|
|
81
|
+
Install git hooks that call javi-forge ci.
|
|
82
|
+
No files copied — hooks reference the global CLI.
|
|
83
|
+
|
|
84
|
+
Examples
|
|
85
|
+
$ javi-forge
|
|
86
|
+
$ javi-forge init --dry-run
|
|
87
|
+
$ javi-forge init --stack node --ci github
|
|
88
|
+
$ javi-forge ci
|
|
89
|
+
$ javi-forge ci init
|
|
90
|
+
$ javi-forge tdd init
|
|
91
|
+
$ javi-forge ci --quick
|
|
92
|
+
$ javi-forge ci --no-ci-ghagga --no-security
|
|
93
|
+
$ javi-forge ci --no-docker
|
|
94
|
+
$ javi-forge ci --shell
|
|
95
|
+
$ javi-forge ci --config .javi-forge/ci.yaml
|
|
96
|
+
$ javi-forge analyze
|
|
97
|
+
$ javi-forge doctor
|
|
98
|
+
$ javi-forge plugin add mapbox/agent-skills
|
|
99
|
+
$ javi-forge plugin list
|
|
100
|
+
`;
|
|
101
|
+
export const FLAGS_SCHEMA = {
|
|
102
|
+
dryRun: { type: "boolean", default: false },
|
|
103
|
+
stack: { type: "string", default: "" },
|
|
104
|
+
ci: { type: "string", default: "" },
|
|
105
|
+
memory: { type: "string", default: "" },
|
|
106
|
+
projectName: { type: "string", default: "" },
|
|
107
|
+
ghagga: { type: "boolean", default: false },
|
|
108
|
+
mock: { type: "boolean", default: false },
|
|
109
|
+
localAi: { type: "boolean", default: false },
|
|
110
|
+
batch: { type: "boolean", default: false },
|
|
111
|
+
// CI flags
|
|
112
|
+
quick: { type: "boolean", default: false },
|
|
113
|
+
shell: { type: "boolean", default: false },
|
|
114
|
+
detect: { type: "boolean", default: false },
|
|
115
|
+
config: { type: "string", default: "" },
|
|
116
|
+
docker: { type: "boolean", default: true },
|
|
117
|
+
ciGhagga: { type: "boolean", default: true },
|
|
118
|
+
security: { type: "boolean", default: true },
|
|
119
|
+
timeout: { type: "number", default: 600 },
|
|
120
|
+
// Security check flags
|
|
121
|
+
minSeverity: { type: "string", default: "low" },
|
|
122
|
+
staleDays: { type: "number", default: 30 },
|
|
123
|
+
json: { type: "boolean", default: false },
|
|
124
|
+
// Plugin flags
|
|
125
|
+
codex: { type: "boolean", default: false },
|
|
126
|
+
// Skills flags
|
|
127
|
+
deep: { type: "boolean", default: false },
|
|
128
|
+
budget: { type: "number", shortFlag: "b", default: 8000 },
|
|
129
|
+
skillsDir: { type: "string", default: "" },
|
|
130
|
+
// Skill publish flags
|
|
131
|
+
author: { type: "string", default: "" },
|
|
132
|
+
repo: { type: "string", default: "" },
|
|
133
|
+
// Workflow flags
|
|
134
|
+
template: { type: "string", default: "" },
|
|
135
|
+
// TDD flags
|
|
136
|
+
mode: { type: "string", default: "strict" },
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Detects whether the CLI is running in a non-interactive / CI context. */
|
|
2
|
+
export declare function detectCI(flags: {
|
|
3
|
+
batch?: boolean;
|
|
4
|
+
}): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a stdin stream suitable for Ink. When stdin is a TTY, the real
|
|
7
|
+
* `process.stdin` is returned; otherwise a `PassThrough` stand-in is supplied
|
|
8
|
+
* so Ink does not crash trying to enable raw mode on a non-TTY pipe.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createInkStdin(): NodeJS.ReadStream;
|
|
11
|
+
/** Schedules a non-blocking background update check (cached for 24h). */
|
|
12
|
+
export declare function setupUpdateNotifier(pkg: {
|
|
13
|
+
name: string;
|
|
14
|
+
version: string;
|
|
15
|
+
}): void;
|
|
16
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime adapters for the CLI entry point:
|
|
3
|
+
* - CI environment detection
|
|
4
|
+
* - TTY-aware stdin shim for Ink
|
|
5
|
+
* - update-notifier bootstrap
|
|
6
|
+
*
|
|
7
|
+
* Kept dependency-light: only `node:stream` and `update-notifier`.
|
|
8
|
+
* Heavy command modules (`./commands/*.js`) remain lazy-loaded from the
|
|
9
|
+
* dispatch handlers themselves. `react`, `ink`, and `meow` are eagerly
|
|
10
|
+
* imported at the CLI entry script (`src/index.tsx`) — not here.
|
|
11
|
+
*
|
|
12
|
+
* Pure-data validator constants live in `./validators.js` (separated to
|
|
13
|
+
* keep runtime adapters and data tables apart).
|
|
14
|
+
*/
|
|
15
|
+
import { PassThrough } from "node:stream";
|
|
16
|
+
import updateNotifier from "update-notifier";
|
|
17
|
+
/** Detects whether the CLI is running in a non-interactive / CI context. */
|
|
18
|
+
export function detectCI(flags) {
|
|
19
|
+
return (flags.batch === true || process.env.CI === "1" || process.env.CI === "true");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns a stdin stream suitable for Ink. When stdin is a TTY, the real
|
|
23
|
+
* `process.stdin` is returned; otherwise a `PassThrough` stand-in is supplied
|
|
24
|
+
* so Ink does not crash trying to enable raw mode on a non-TTY pipe.
|
|
25
|
+
*/
|
|
26
|
+
export function createInkStdin() {
|
|
27
|
+
const isTTY = process.stdin.isTTY === true;
|
|
28
|
+
if (isTTY)
|
|
29
|
+
return process.stdin;
|
|
30
|
+
const fakeStdin = new PassThrough();
|
|
31
|
+
Object.defineProperty(fakeStdin, "isTTY", { value: false });
|
|
32
|
+
return fakeStdin;
|
|
33
|
+
}
|
|
34
|
+
/** Schedules a non-blocking background update check (cached for 24h). */
|
|
35
|
+
export function setupUpdateNotifier(pkg) {
|
|
36
|
+
updateNotifier({ pkg, updateCheckInterval: 1000 * 60 * 60 * 24 }).notify();
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator constants for `init` command flags.
|
|
3
|
+
*
|
|
4
|
+
* Pure-data module (no runtime imports) — separated from `runtime.ts` which
|
|
5
|
+
* holds runtime adapters (CI detection, Ink stdin shim, update-notifier).
|
|
6
|
+
* Consumed by dispatch handlers to validate `--stack`, `--ci`, and `--memory`
|
|
7
|
+
* flag values before constructing preset props for the Ink UI.
|
|
8
|
+
*/
|
|
9
|
+
/** Valid `--stack` values accepted by the `init` command. */
|
|
10
|
+
export declare const VALID_STACKS: string[];
|
|
11
|
+
/** Valid `--ci` provider values accepted by the `init` command. */
|
|
12
|
+
export declare const VALID_CI: string[];
|
|
13
|
+
/** Valid `--memory` module values accepted by the `init` command. */
|
|
14
|
+
export declare const VALID_MEMORY: string[];
|
|
15
|
+
/** Valid action values accepted by the `security` command. */
|
|
16
|
+
export declare const VALID_SECURITY_ACTIONS: string[];
|
|
17
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validator constants for `init` command flags.
|
|
3
|
+
*
|
|
4
|
+
* Pure-data module (no runtime imports) — separated from `runtime.ts` which
|
|
5
|
+
* holds runtime adapters (CI detection, Ink stdin shim, update-notifier).
|
|
6
|
+
* Consumed by dispatch handlers to validate `--stack`, `--ci`, and `--memory`
|
|
7
|
+
* flag values before constructing preset props for the Ink UI.
|
|
8
|
+
*/
|
|
9
|
+
/** Valid `--stack` values accepted by the `init` command. */
|
|
10
|
+
export const VALID_STACKS = [
|
|
11
|
+
"node",
|
|
12
|
+
"python",
|
|
13
|
+
"go",
|
|
14
|
+
"rust",
|
|
15
|
+
"java-gradle",
|
|
16
|
+
"java-maven",
|
|
17
|
+
"elixir",
|
|
18
|
+
];
|
|
19
|
+
/** Valid `--ci` provider values accepted by the `init` command. */
|
|
20
|
+
export const VALID_CI = ["github", "gitlab", "woodpecker"];
|
|
21
|
+
/** Valid `--memory` module values accepted by the `init` command. */
|
|
22
|
+
export const VALID_MEMORY = [
|
|
23
|
+
"engram",
|
|
24
|
+
"obsidian-brain",
|
|
25
|
+
"memory-simple",
|
|
26
|
+
"none",
|
|
27
|
+
];
|
|
28
|
+
/** Valid action values accepted by the `security` command. */
|
|
29
|
+
export const VALID_SECURITY_ACTIONS = [
|
|
30
|
+
"baseline",
|
|
31
|
+
"check",
|
|
32
|
+
"update",
|
|
33
|
+
"allowlist",
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=validators.js.map
|
package/dist/commands/analyze.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { promisify } from 'util';
|
|
3
|
-
const execFileAsync = promisify(execFile);
|
|
1
|
+
import { execFileAsync } from "../lib/exec.js";
|
|
4
2
|
function report(onStep, id, label, status, detail) {
|
|
5
3
|
onStep({ id, label, status, detail });
|
|
6
4
|
}
|
|
7
5
|
/** Check if a binary is available in PATH */
|
|
8
6
|
async function which(bin) {
|
|
9
7
|
try {
|
|
10
|
-
await execFileAsync(
|
|
8
|
+
await execFileAsync("which", [bin]);
|
|
11
9
|
return true;
|
|
12
10
|
}
|
|
13
11
|
catch {
|
|
@@ -19,37 +17,37 @@ async function which(bin) {
|
|
|
19
17
|
* This is a thin wrapper that delegates to the repoforge CLI.
|
|
20
18
|
*/
|
|
21
19
|
export async function runAnalyze(projectDir, dryRun, onStep) {
|
|
22
|
-
const stepId =
|
|
23
|
-
report(onStep, stepId,
|
|
20
|
+
const stepId = "analyze-repoforge";
|
|
21
|
+
report(onStep, stepId, "Run repoforge skills analysis", "running");
|
|
24
22
|
try {
|
|
25
23
|
// Check if repoforge is installed
|
|
26
|
-
const hasRepoforge = await which(
|
|
24
|
+
const hasRepoforge = await which("repoforge");
|
|
27
25
|
if (!hasRepoforge) {
|
|
28
|
-
report(onStep, stepId,
|
|
26
|
+
report(onStep, stepId, "Run repoforge skills analysis", "error", "repoforge not found. Install with: pip install repoforge");
|
|
29
27
|
return;
|
|
30
28
|
}
|
|
31
|
-
const args = [
|
|
29
|
+
const args = ["skills", "-w", projectDir];
|
|
32
30
|
if (dryRun) {
|
|
33
|
-
args.push(
|
|
31
|
+
args.push("--dry-run");
|
|
34
32
|
}
|
|
35
|
-
const { stdout, stderr } = await execFileAsync(
|
|
33
|
+
const { stdout, stderr } = await execFileAsync("repoforge", args, {
|
|
36
34
|
cwd: projectDir,
|
|
37
35
|
timeout: 300_000, // 5 min — analysis can take a while on large repos
|
|
38
36
|
});
|
|
39
37
|
if (stdout) {
|
|
40
|
-
report(onStep, stepId,
|
|
38
|
+
report(onStep, stepId, "Run repoforge skills analysis", "done", stdout.trim().split("\n").pop() ?? "complete");
|
|
41
39
|
}
|
|
42
40
|
else {
|
|
43
|
-
report(onStep, stepId,
|
|
41
|
+
report(onStep, stepId, "Run repoforge skills analysis", "done", dryRun ? "dry-run complete" : "complete");
|
|
44
42
|
}
|
|
45
43
|
if (stderr) {
|
|
46
|
-
const warnId =
|
|
47
|
-
report(onStep, warnId,
|
|
44
|
+
const warnId = "analyze-warnings";
|
|
45
|
+
report(onStep, warnId, "Analysis warnings", "skipped", stderr.trim().split("\n").pop() ?? "");
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
catch (e) {
|
|
51
49
|
const msg = e instanceof Error ? e.message : String(e);
|
|
52
|
-
report(onStep, stepId,
|
|
50
|
+
report(onStep, stepId, "Run repoforge skills analysis", "error", msg);
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
//# sourceMappingURL=analyze.js.map
|
package/dist/commands/ci.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Stack } from
|
|
2
|
-
export type CIMode =
|
|
1
|
+
import type { Stack } from "../types/index.js";
|
|
2
|
+
export type CIMode = "full" | "quick" | "shell" | "detect";
|
|
3
3
|
export interface CIOptions {
|
|
4
4
|
projectDir?: string;
|
|
5
5
|
mode?: CIMode;
|
|
@@ -11,8 +11,12 @@ export interface CIOptions {
|
|
|
11
11
|
noSecurity?: boolean;
|
|
12
12
|
/** Timeout in seconds for each Docker step (default: 600) */
|
|
13
13
|
timeout?: number;
|
|
14
|
+
/** Explicit CI config path (--config). Default: .javi-forge/ci.yaml if present */
|
|
15
|
+
config?: string;
|
|
16
|
+
/** Explicit single-stack override (--stack). Insufficient for hybrid repos */
|
|
17
|
+
stack?: string;
|
|
14
18
|
}
|
|
15
|
-
export type CIStepStatus =
|
|
19
|
+
export type CIStepStatus = "pending" | "running" | "done" | "error" | "skipped";
|
|
16
20
|
export interface CIStep {
|
|
17
21
|
id: string;
|
|
18
22
|
label: string;
|
|
@@ -29,6 +33,49 @@ export interface CIStackInfo {
|
|
|
29
33
|
testCmd: string | null;
|
|
30
34
|
}
|
|
31
35
|
export declare function detectCIStack(projectDir: string): Promise<CIStackInfo>;
|
|
36
|
+
/**
|
|
37
|
+
* Immutable runner produced by resolveCIRunners(). Later stages (Docker
|
|
38
|
+
* execution, required-tool checks) receive this object and must not
|
|
39
|
+
* re-detect anything from filesystem markers.
|
|
40
|
+
*/
|
|
41
|
+
export interface ResolvedRunner {
|
|
42
|
+
name: string;
|
|
43
|
+
stack: Stack;
|
|
44
|
+
buildTool: string;
|
|
45
|
+
javaVersion: string;
|
|
46
|
+
/** Working directory relative to the project root */
|
|
47
|
+
directory: string;
|
|
48
|
+
/** Explicit container image (skips the default per-stack image) */
|
|
49
|
+
image?: string;
|
|
50
|
+
/** Docker build context directory (execution lands in Slice B) */
|
|
51
|
+
buildContext?: string;
|
|
52
|
+
setupCmds: readonly string[];
|
|
53
|
+
lintCmds: readonly string[];
|
|
54
|
+
compileCmds: readonly string[];
|
|
55
|
+
testCmds: readonly string[];
|
|
56
|
+
securityCmds: readonly string[];
|
|
57
|
+
requiredTools: readonly string[];
|
|
58
|
+
}
|
|
59
|
+
export type RunnerSource = "auto" | "config" | "stack-override";
|
|
60
|
+
export interface ResolvedRunners {
|
|
61
|
+
readonly source: RunnerSource;
|
|
62
|
+
readonly runners: readonly ResolvedRunner[];
|
|
63
|
+
}
|
|
64
|
+
export interface ResolveRunnerOptions {
|
|
65
|
+
/** Explicit config path (--config). Wins over default discovery */
|
|
66
|
+
config?: string;
|
|
67
|
+
/** Explicit single-stack override (--stack) */
|
|
68
|
+
stack?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Resolve the ordered runner list exactly once per CI run.
|
|
72
|
+
*
|
|
73
|
+
* Precedence (fail closed on ambiguity):
|
|
74
|
+
* 1. --config <path> (or discovered .javi-forge/ci.yaml) → configured runners
|
|
75
|
+
* 2. --stack <stack> → single explicit runner (single-stack repos only)
|
|
76
|
+
* 3. otherwise → single auto-detected runner (zero-config default)
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveCIRunners(projectDir: string, options?: ResolveRunnerOptions): Promise<ResolvedRunners>;
|
|
32
79
|
export declare function runCI(options: CIOptions, onStep: CIStepCallback): Promise<void>;
|
|
33
80
|
export declare function installCIHooks(projectDir: string): Promise<{
|
|
34
81
|
installed: string[];
|