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.
Files changed (322) hide show
  1. package/README.md +45 -1
  2. package/ci-local/README.md +56 -11
  3. package/ci-local/ci-local.ps1 +445 -0
  4. package/ci-local/ci-local.sh +52 -9
  5. package/ci-local/docker/python.Dockerfile +7 -0
  6. package/ci-local/hooks/commit-msg +120 -44
  7. package/ci-local/hooks/commit-msg.test.sh +286 -0
  8. package/ci-local/hooks/pre-commit +9 -1
  9. package/ci-local/hooks/pre-push +13 -2
  10. package/ci-local/install.ps1 +367 -0
  11. package/ci-local/install.sh +151 -5
  12. package/ci-local/uninstall.ps1 +85 -0
  13. package/ci-local/uninstall.sh +95 -0
  14. package/dist/cli/dispatch/ci.d.ts +12 -0
  15. package/dist/cli/dispatch/ci.js +38 -0
  16. package/dist/cli/dispatch/security.d.ts +11 -0
  17. package/dist/cli/dispatch/security.js +68 -0
  18. package/dist/cli/dispatch/simple-renderers.d.ts +16 -0
  19. package/dist/cli/dispatch/simple-renderers.js +65 -0
  20. package/dist/cli/dispatch/skill-publish.d.ts +15 -0
  21. package/dist/cli/dispatch/skill-publish.js +44 -0
  22. package/dist/cli/dispatch/skills-cmd.d.ts +13 -0
  23. package/dist/cli/dispatch/skills-cmd.js +93 -0
  24. package/dist/cli/dispatch/tdd.d.ts +11 -0
  25. package/dist/cli/dispatch/tdd.js +45 -0
  26. package/dist/cli/dispatch/types.d.ts +29 -0
  27. package/dist/cli/dispatch/types.js +2 -0
  28. package/dist/cli/dispatch/workflow.d.ts +11 -0
  29. package/dist/cli/dispatch/workflow.js +67 -0
  30. package/dist/cli/help.d.ts +127 -0
  31. package/dist/cli/help.js +138 -0
  32. package/dist/cli/runtime.d.ts +16 -0
  33. package/dist/cli/runtime.js +38 -0
  34. package/dist/cli/validators.d.ts +17 -0
  35. package/dist/cli/validators.js +35 -0
  36. package/dist/commands/analyze.d.ts +1 -1
  37. package/dist/commands/analyze.js +14 -16
  38. package/dist/commands/ci.d.ts +50 -3
  39. package/dist/commands/ci.js +537 -182
  40. package/dist/commands/doctor.d.ts +2 -2
  41. package/dist/commands/doctor.js +112 -62
  42. package/dist/commands/init/report.d.ts +13 -0
  43. package/dist/commands/init/report.js +13 -0
  44. package/dist/commands/init/steps/agent-skills.d.ts +13 -0
  45. package/dist/commands/init/steps/agent-skills.js +45 -0
  46. package/dist/commands/init/steps/ai-sync.d.ts +15 -0
  47. package/dist/commands/init/steps/ai-sync.js +62 -0
  48. package/dist/commands/init/steps/ci.d.ts +24 -0
  49. package/dist/commands/init/steps/ci.js +74 -0
  50. package/dist/commands/init/steps/claude-md.d.ts +14 -0
  51. package/dist/commands/init/steps/claude-md.js +54 -0
  52. package/dist/commands/init/steps/code-graph.d.ts +16 -0
  53. package/dist/commands/init/steps/code-graph.js +68 -0
  54. package/dist/commands/init/steps/context-dir.d.ts +13 -0
  55. package/dist/commands/init/steps/context-dir.js +47 -0
  56. package/dist/commands/init/steps/docker-deploy.d.ts +16 -0
  57. package/dist/commands/init/steps/docker-deploy.js +60 -0
  58. package/dist/commands/init/steps/ghagga.d.ts +15 -0
  59. package/dist/commands/init/steps/ghagga.js +58 -0
  60. package/dist/commands/init/steps/git.d.ts +25 -0
  61. package/dist/commands/init/steps/git.js +81 -0
  62. package/dist/commands/init/steps/gitignore.d.ts +13 -0
  63. package/dist/commands/init/steps/gitignore.js +39 -0
  64. package/dist/commands/init/steps/local-ai.d.ts +14 -0
  65. package/dist/commands/init/steps/local-ai.js +53 -0
  66. package/dist/commands/init/steps/manifest.d.ts +13 -0
  67. package/dist/commands/init/steps/manifest.js +58 -0
  68. package/dist/commands/init/steps/memory.d.ts +15 -0
  69. package/dist/commands/init/steps/memory.js +60 -0
  70. package/dist/commands/init/steps/mock.d.ts +13 -0
  71. package/dist/commands/init/steps/mock.js +64 -0
  72. package/dist/commands/init/steps/sdd.d.ts +12 -0
  73. package/dist/commands/init/steps/sdd.js +40 -0
  74. package/dist/commands/init/steps/security.d.ts +28 -0
  75. package/dist/commands/init/steps/security.js +103 -0
  76. package/dist/commands/init/types.d.ts +30 -0
  77. package/dist/commands/init/types.js +2 -0
  78. package/dist/commands/init.d.ts +5 -4
  79. package/dist/commands/init.js +42 -387
  80. package/dist/commands/llmstxt.d.ts +1 -1
  81. package/dist/commands/llmstxt.js +36 -34
  82. package/dist/commands/plugin.d.ts +10 -1
  83. package/dist/commands/plugin.js +92 -47
  84. package/dist/commands/security.d.ts +11 -5
  85. package/dist/commands/security.js +236 -77
  86. package/dist/commands/skills/analysis.d.ts +19 -0
  87. package/dist/commands/skills/analysis.js +211 -0
  88. package/dist/commands/skills/benchmark.d.ts +6 -0
  89. package/dist/commands/skills/benchmark.js +82 -0
  90. package/dist/commands/skills/constants.d.ts +10 -0
  91. package/dist/commands/skills/constants.js +27 -0
  92. package/dist/commands/skills/directives.d.ts +21 -0
  93. package/dist/commands/skills/directives.js +101 -0
  94. package/dist/commands/skills/parsing.d.ts +16 -0
  95. package/dist/commands/skills/parsing.js +108 -0
  96. package/dist/commands/skills/rules.d.ts +5 -0
  97. package/dist/commands/skills/rules.js +32 -0
  98. package/dist/commands/skills/scoring.d.ts +47 -0
  99. package/dist/commands/skills/scoring.js +306 -0
  100. package/dist/commands/skills.d.ts +8 -69
  101. package/dist/commands/skills.js +9 -490
  102. package/dist/commands/tdd-pipeline.d.ts +17 -0
  103. package/dist/commands/tdd-pipeline.js +144 -0
  104. package/dist/commands/tdd.d.ts +1 -1
  105. package/dist/commands/tdd.js +21 -18
  106. package/dist/commands/workflow.d.ts +23 -0
  107. package/dist/commands/workflow.js +116 -0
  108. package/dist/constants.d.ts +15 -1
  109. package/dist/constants.js +161 -122
  110. package/dist/index.js +43 -280
  111. package/dist/lib/agent-skills.d.ts +36 -1
  112. package/dist/lib/agent-skills.js +168 -19
  113. package/dist/lib/atlassian-mcp.d.ts +42 -0
  114. package/dist/lib/atlassian-mcp.js +98 -0
  115. package/dist/lib/auto-skill-install.d.ts +37 -0
  116. package/dist/lib/auto-skill-install.js +91 -0
  117. package/dist/lib/auto-wire.d.ts +20 -0
  118. package/dist/lib/auto-wire.js +240 -0
  119. package/dist/lib/ci-config.d.ts +65 -0
  120. package/dist/lib/ci-config.js +297 -0
  121. package/dist/lib/claudemd.d.ts +13 -1
  122. package/dist/lib/claudemd.js +174 -24
  123. package/dist/lib/codex-export.d.ts +1 -1
  124. package/dist/lib/codex-export.js +26 -32
  125. package/dist/lib/common.d.ts +1 -1
  126. package/dist/lib/common.js +52 -44
  127. package/dist/lib/context.d.ts +17 -2
  128. package/dist/lib/context.js +142 -13
  129. package/dist/lib/crash-recovery.d.ts +34 -0
  130. package/dist/lib/crash-recovery.js +123 -0
  131. package/dist/lib/docker.d.ts +23 -2
  132. package/dist/lib/docker.js +168 -131
  133. package/dist/lib/exec.d.ts +10 -0
  134. package/dist/lib/exec.js +11 -0
  135. package/dist/lib/frontmatter.d.ts +1 -1
  136. package/dist/lib/frontmatter.js +29 -15
  137. package/dist/lib/harness-audit.d.ts +35 -0
  138. package/dist/lib/harness-audit.js +277 -0
  139. package/dist/lib/parallel-batch.d.ts +42 -0
  140. package/dist/lib/parallel-batch.js +88 -0
  141. package/dist/lib/plugin.d.ts +9 -3
  142. package/dist/lib/plugin.js +127 -70
  143. package/dist/lib/secret-scanner.d.ts +30 -0
  144. package/dist/lib/secret-scanner.js +274 -0
  145. package/dist/lib/security-analysis.d.ts +74 -0
  146. package/dist/lib/security-analysis.js +489 -0
  147. package/dist/lib/skill-publish.d.ts +40 -0
  148. package/dist/lib/skill-publish.js +164 -0
  149. package/dist/lib/skill-scanner.d.ts +63 -0
  150. package/dist/lib/skill-scanner.js +383 -0
  151. package/dist/lib/stack-detector.d.ts +38 -0
  152. package/dist/lib/stack-detector.js +207 -0
  153. package/dist/lib/supply-chain.d.ts +23 -0
  154. package/dist/lib/supply-chain.js +126 -0
  155. package/dist/lib/team-presets.d.ts +53 -0
  156. package/dist/lib/team-presets.js +201 -0
  157. package/dist/lib/template.d.ts +16 -1
  158. package/dist/lib/template.js +46 -17
  159. package/dist/lib/workflow/discovery.d.ts +27 -0
  160. package/dist/lib/workflow/discovery.js +85 -0
  161. package/dist/lib/workflow/index.d.ts +5 -0
  162. package/dist/lib/workflow/index.js +5 -0
  163. package/dist/lib/workflow/parser.d.ts +16 -0
  164. package/dist/lib/workflow/parser.js +198 -0
  165. package/dist/lib/workflow/renderer.d.ts +9 -0
  166. package/dist/lib/workflow/renderer.js +152 -0
  167. package/dist/lib/workflow/validator.d.ts +10 -0
  168. package/dist/lib/workflow/validator.js +189 -0
  169. package/dist/tasks/index.d.ts +4 -0
  170. package/dist/tasks/index.js +4 -0
  171. package/dist/tasks/scaffold-tasks.d.ts +3 -0
  172. package/dist/tasks/scaffold-tasks.js +14 -0
  173. package/dist/tasks/task-id.d.ts +30 -0
  174. package/dist/tasks/task-id.js +59 -0
  175. package/dist/tasks/task-tracker.d.ts +15 -0
  176. package/dist/tasks/task-tracker.js +81 -0
  177. package/dist/types/index.d.ts +134 -6
  178. package/dist/types/index.js +11 -1
  179. package/dist/ui/AnalyzeUI.d.ts +1 -1
  180. package/dist/ui/AnalyzeUI.js +38 -39
  181. package/dist/ui/App.d.ts +5 -3
  182. package/dist/ui/App.js +86 -46
  183. package/dist/ui/AutoSkills.d.ts +9 -0
  184. package/dist/ui/AutoSkills.js +124 -0
  185. package/dist/ui/CI.d.ts +2 -2
  186. package/dist/ui/CI.js +24 -26
  187. package/dist/ui/CIContext.d.ts +1 -1
  188. package/dist/ui/CIContext.js +2 -2
  189. package/dist/ui/CISelector.d.ts +2 -2
  190. package/dist/ui/CISelector.js +23 -15
  191. package/dist/ui/Doctor.d.ts +1 -1
  192. package/dist/ui/Doctor.js +35 -29
  193. package/dist/ui/Header.d.ts +1 -1
  194. package/dist/ui/Header.js +14 -14
  195. package/dist/ui/HookProfileSelector.d.ts +9 -0
  196. package/dist/ui/HookProfileSelector.js +54 -0
  197. package/dist/ui/LlmsTxt.d.ts +1 -1
  198. package/dist/ui/LlmsTxt.js +31 -22
  199. package/dist/ui/MemorySelector.d.ts +2 -2
  200. package/dist/ui/MemorySelector.js +28 -16
  201. package/dist/ui/NameInput.d.ts +1 -1
  202. package/dist/ui/NameInput.js +21 -21
  203. package/dist/ui/OptionSelector.d.ts +6 -2
  204. package/dist/ui/OptionSelector.js +83 -32
  205. package/dist/ui/Plugin.d.ts +4 -3
  206. package/dist/ui/Plugin.js +78 -35
  207. package/dist/ui/Progress.d.ts +3 -3
  208. package/dist/ui/Progress.js +23 -22
  209. package/dist/ui/Skills.d.ts +2 -2
  210. package/dist/ui/Skills.js +61 -32
  211. package/dist/ui/StackSelector.d.ts +2 -2
  212. package/dist/ui/StackSelector.js +27 -17
  213. package/dist/ui/Summary.d.ts +3 -3
  214. package/dist/ui/Summary.js +60 -50
  215. package/dist/ui/Welcome.d.ts +1 -1
  216. package/dist/ui/Welcome.js +15 -16
  217. package/dist/ui/theme.d.ts +1 -1
  218. package/dist/ui/theme.js +6 -6
  219. package/lib/common.psm1 +167 -0
  220. package/lib/common.sh +30 -0
  221. package/package.json +46 -24
  222. package/templates/common/atlassian/mcp-atlassian-snippet.json +16 -0
  223. package/templates/common/repoforge/mcp-repoforge-snippet.json +11 -0
  224. package/templates/common/repoforge/repoforge.yaml +34 -0
  225. package/templates/github/deploy-docker-zero-downtime.yml +140 -0
  226. package/templates/github/repoforge-graph.yml +45 -0
  227. package/templates/gitlab/deploy-docker-zero-downtime.yml +57 -0
  228. package/templates/local-ai/.env.example +17 -0
  229. package/templates/local-ai/docker-compose.yml +95 -0
  230. package/templates/security-hooks/claude-settings-security.json +30 -0
  231. package/templates/security-hooks/commit-msg-signing +29 -0
  232. package/templates/security-hooks/pre-commit-permissions +74 -0
  233. package/templates/security-hooks/pre-commit-secrets +74 -0
  234. package/templates/security-hooks/pre-push-branch-protection +62 -0
  235. package/templates/security-hooks/pre-push-deps +83 -0
  236. package/templates/security-hooks/pre-push-signing +67 -0
  237. package/templates/woodpecker/deploy-docker-zero-downtime.yml +50 -0
  238. package/templates/workflows/ci-pipeline.dot +15 -0
  239. package/templates/workflows/feature-flow.dot +21 -0
  240. package/templates/workflows/release.dot +16 -0
  241. package/dist/__integration__/helpers.d.ts +0 -20
  242. package/dist/__integration__/helpers.d.ts.map +0 -1
  243. package/dist/__integration__/helpers.js +0 -31
  244. package/dist/__integration__/helpers.js.map +0 -1
  245. package/dist/commands/analyze.d.ts.map +0 -1
  246. package/dist/commands/analyze.js.map +0 -1
  247. package/dist/commands/ci.d.ts.map +0 -1
  248. package/dist/commands/ci.js.map +0 -1
  249. package/dist/commands/doctor.d.ts.map +0 -1
  250. package/dist/commands/doctor.js.map +0 -1
  251. package/dist/commands/init.d.ts.map +0 -1
  252. package/dist/commands/init.js.map +0 -1
  253. package/dist/commands/llmstxt.d.ts.map +0 -1
  254. package/dist/commands/llmstxt.js.map +0 -1
  255. package/dist/commands/plugin.d.ts.map +0 -1
  256. package/dist/commands/plugin.js.map +0 -1
  257. package/dist/commands/security.d.ts.map +0 -1
  258. package/dist/commands/security.js.map +0 -1
  259. package/dist/commands/skills.d.ts.map +0 -1
  260. package/dist/commands/skills.js.map +0 -1
  261. package/dist/commands/tdd.d.ts.map +0 -1
  262. package/dist/commands/tdd.js.map +0 -1
  263. package/dist/constants.d.ts.map +0 -1
  264. package/dist/constants.js.map +0 -1
  265. package/dist/index.d.ts.map +0 -1
  266. package/dist/index.js.map +0 -1
  267. package/dist/lib/agent-skills.d.ts.map +0 -1
  268. package/dist/lib/agent-skills.js.map +0 -1
  269. package/dist/lib/claudemd.d.ts.map +0 -1
  270. package/dist/lib/claudemd.js.map +0 -1
  271. package/dist/lib/codex-export.d.ts.map +0 -1
  272. package/dist/lib/codex-export.js.map +0 -1
  273. package/dist/lib/common.d.ts.map +0 -1
  274. package/dist/lib/common.js.map +0 -1
  275. package/dist/lib/context.d.ts.map +0 -1
  276. package/dist/lib/context.js.map +0 -1
  277. package/dist/lib/docker.d.ts.map +0 -1
  278. package/dist/lib/docker.js.map +0 -1
  279. package/dist/lib/frontmatter.d.ts.map +0 -1
  280. package/dist/lib/frontmatter.js.map +0 -1
  281. package/dist/lib/plugin.d.ts.map +0 -1
  282. package/dist/lib/plugin.js.map +0 -1
  283. package/dist/lib/template.d.ts.map +0 -1
  284. package/dist/lib/template.js.map +0 -1
  285. package/dist/types/index.d.ts.map +0 -1
  286. package/dist/types/index.js.map +0 -1
  287. package/dist/ui/AnalyzeUI.d.ts.map +0 -1
  288. package/dist/ui/AnalyzeUI.js.map +0 -1
  289. package/dist/ui/App.d.ts.map +0 -1
  290. package/dist/ui/App.js.map +0 -1
  291. package/dist/ui/CI.d.ts.map +0 -1
  292. package/dist/ui/CI.js.map +0 -1
  293. package/dist/ui/CIContext.d.ts.map +0 -1
  294. package/dist/ui/CIContext.js.map +0 -1
  295. package/dist/ui/CISelector.d.ts.map +0 -1
  296. package/dist/ui/CISelector.js.map +0 -1
  297. package/dist/ui/Doctor.d.ts.map +0 -1
  298. package/dist/ui/Doctor.js.map +0 -1
  299. package/dist/ui/Header.d.ts.map +0 -1
  300. package/dist/ui/Header.js.map +0 -1
  301. package/dist/ui/LlmsTxt.d.ts.map +0 -1
  302. package/dist/ui/LlmsTxt.js.map +0 -1
  303. package/dist/ui/MemorySelector.d.ts.map +0 -1
  304. package/dist/ui/MemorySelector.js.map +0 -1
  305. package/dist/ui/NameInput.d.ts.map +0 -1
  306. package/dist/ui/NameInput.js.map +0 -1
  307. package/dist/ui/OptionSelector.d.ts.map +0 -1
  308. package/dist/ui/OptionSelector.js.map +0 -1
  309. package/dist/ui/Plugin.d.ts.map +0 -1
  310. package/dist/ui/Plugin.js.map +0 -1
  311. package/dist/ui/Progress.d.ts.map +0 -1
  312. package/dist/ui/Progress.js.map +0 -1
  313. package/dist/ui/Skills.d.ts.map +0 -1
  314. package/dist/ui/Skills.js.map +0 -1
  315. package/dist/ui/StackSelector.d.ts.map +0 -1
  316. package/dist/ui/StackSelector.js.map +0 -1
  317. package/dist/ui/Summary.d.ts.map +0 -1
  318. package/dist/ui/Summary.js.map +0 -1
  319. package/dist/ui/Welcome.d.ts.map +0 -1
  320. package/dist/ui/Welcome.js.map +0 -1
  321. package/dist/ui/theme.d.ts.map +0 -1
  322. package/dist/ui/theme.js.map +0 -1
@@ -0,0 +1,95 @@
1
+ #!/bin/bash
2
+ # =============================================================================
3
+ # CI-LOCAL: Uninstall Script
4
+ # =============================================================================
5
+ # Reverses what install.sh did:
6
+ # - Unset core.hooksPath
7
+ # - Optionally restore .git/hooks/ backups (if --restore-backups given)
8
+ # - Optionally delete the ci-local/ directory (if --purge given)
9
+ #
10
+ # Usage:
11
+ # ./uninstall.sh # only unset core.hooksPath
12
+ # ./uninstall.sh --restore-backups # also restore .bak hooks
13
+ # ./uninstall.sh --purge # also rm -rf ci-local/ + lib/common.sh
14
+ # =============================================================================
15
+
16
+ set -e
17
+
18
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
19
+ PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
20
+
21
+ # Source colors if available; degrade gracefully if not.
22
+ if [ -f "$SCRIPT_DIR/../lib/common.sh" ]; then
23
+ # shellcheck disable=SC1091
24
+ source "$SCRIPT_DIR/../lib/common.sh" 2>/dev/null || true
25
+ fi
26
+ : "${RED:=}" "${GREEN:=}" "${YELLOW:=}" "${CYAN:=}" "${NC:=}"
27
+
28
+ RESTORE_BACKUPS=0
29
+ PURGE=0
30
+ for arg in "$@"; do
31
+ case "$arg" in
32
+ --restore-backups) RESTORE_BACKUPS=1 ;;
33
+ --purge) PURGE=1 ;;
34
+ --help|-h)
35
+ echo "Usage: $0 [--restore-backups] [--purge]"
36
+ exit 0
37
+ ;;
38
+ *)
39
+ echo "Unknown argument: $arg" >&2
40
+ echo "Usage: $0 [--restore-backups] [--purge]" >&2
41
+ exit 1
42
+ ;;
43
+ esac
44
+ done
45
+
46
+ cd "$PROJECT_DIR"
47
+
48
+ echo -e "${CYAN}=== CI-LOCAL Uninstall ===${NC}"
49
+
50
+ # 1. Unset core.hooksPath if it points at us
51
+ echo -e "${YELLOW}[1/3] Removing core.hooksPath...${NC}"
52
+ current=$(git config --get core.hooksPath 2>/dev/null || echo "")
53
+ if [ -n "$current" ]; then
54
+ git config --unset core.hooksPath
55
+ echo -e "${GREEN}Removed hooksPath = $current${NC}"
56
+ else
57
+ echo -e "${YELLOW}No core.hooksPath was set; nothing to remove${NC}"
58
+ fi
59
+
60
+ # 2. Restore .bak hooks if requested
61
+ echo -e "${YELLOW}[2/3] Restoring hook backups...${NC}"
62
+ if [ "$RESTORE_BACKUPS" -eq 1 ]; then
63
+ restored=0
64
+ for hook in pre-commit commit-msg pre-push; do
65
+ if [ -f ".git/hooks/$hook.bak" ]; then
66
+ mv ".git/hooks/$hook.bak" ".git/hooks/$hook"
67
+ echo -e "${GREEN}Restored .git/hooks/$hook${NC}"
68
+ restored=$((restored + 1))
69
+ fi
70
+ done
71
+ if [ "$restored" -eq 0 ]; then
72
+ echo -e "${YELLOW}No .bak hooks found to restore${NC}"
73
+ fi
74
+ else
75
+ echo -e "${YELLOW}Skipped (pass --restore-backups to enable)${NC}"
76
+ fi
77
+
78
+ # 3. Purge ci-local/ directory if requested
79
+ echo -e "${YELLOW}[3/3] Purging ci-local/ directory...${NC}"
80
+ if [ "$PURGE" -eq 1 ]; then
81
+ if [ -d ".ci-local" ]; then
82
+ rm -rf ".ci-local"
83
+ echo -e "${GREEN}Removed .ci-local/${NC}"
84
+ fi
85
+ if [ -d "ci-local" ] && [ "$(realpath "$SCRIPT_DIR")" = "$(realpath "$PROJECT_DIR/ci-local")" ]; then
86
+ echo -e "${YELLOW}WARNING: ci-local/ directory contains THIS uninstall script.${NC}"
87
+ echo -e "${YELLOW}Refusing to delete it. Remove manually after this script exits.${NC}"
88
+ fi
89
+ else
90
+ echo -e "${YELLOW}Skipped (pass --purge to delete directories)${NC}"
91
+ fi
92
+
93
+ echo -e ""
94
+ echo -e "${GREEN}Uninstall complete!${NC}"
95
+ echo -e ""
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `javi-forge ci` handler — two branches:
3
+ * 1. `ci init` — console-only, installs git hooks via ./commands/ci.js (lazy)
4
+ * 2. `ci [--detect|--shell|--quick|...]` — Ink render of <CI /> (eager)
5
+ *
6
+ * The command module (`./commands/ci.js`) is lazy-loaded inside the function
7
+ * to preserve cold-start performance; Ink + React are already eagerly loaded
8
+ * at the entrypoint, so importing the UI component at the top is fine.
9
+ */
10
+ import type { CLI, RendererCtx } from "./types.js";
11
+ export declare function handleCi(cli: CLI, ctx: RendererCtx): Promise<void>;
12
+ //# sourceMappingURL=ci.d.ts.map
@@ -0,0 +1,38 @@
1
+ /**
2
+ * `javi-forge ci` handler — two branches:
3
+ * 1. `ci init` — console-only, installs git hooks via ./commands/ci.js (lazy)
4
+ * 2. `ci [--detect|--shell|--quick|...]` — Ink render of <CI /> (eager)
5
+ *
6
+ * The command module (`./commands/ci.js`) is lazy-loaded inside the function
7
+ * to preserve cold-start performance; Ink + React are already eagerly loaded
8
+ * at the entrypoint, so importing the UI component at the top is fine.
9
+ */
10
+ import { render } from "ink";
11
+ import React from "react";
12
+ import CI from "../../ui/CI.js";
13
+ import { CIProvider as CIContextProvider } from "../../ui/CIContext.js";
14
+ export async function handleCi(cli, ctx) {
15
+ // Sub-command: javi-forge ci init → install git hooks
16
+ if (cli.input[1] === "init") {
17
+ const { installCIHooks } = await import("../../commands/ci.js");
18
+ const { installed, errors } = await installCIHooks(process.cwd());
19
+ if (installed.length > 0) {
20
+ console.log(`✓ Installed git hooks: ${installed.join(", ")}`);
21
+ console.log(" Hooks call javi-forge ci (with npx fallback)");
22
+ }
23
+ for (const err of errors) {
24
+ console.error(`✗ ${err}`);
25
+ }
26
+ process.exit(errors.length > 0 ? 1 : 0);
27
+ }
28
+ const ciMode = cli.flags.detect
29
+ ? "detect"
30
+ : cli.flags.shell
31
+ ? "shell"
32
+ : cli.flags.quick
33
+ ? "quick"
34
+ : "full";
35
+ render(React.createElement(CIContextProvider, { isCI: true },
36
+ React.createElement(CI, { projectDir: process.cwd(), mode: ciMode, noDocker: !cli.flags.docker, noGhagga: !cli.flags.ciGhagga, noSecurity: !cli.flags.security, timeout: cli.flags.timeout, config: cli.flags.config || undefined, stack: cli.flags.stack || undefined })), { stdin: ctx.inkStdin });
37
+ }
38
+ //# sourceMappingURL=ci.js.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * `javi-forge security <baseline|check|update|allowlist>` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ../../commands/security.js INSIDE the function to preserve
6
+ * cold-start performance — heavy command modules MUST NOT be eager-imported
7
+ * at the top of this file.
8
+ */
9
+ import type { CLI } from "./types.js";
10
+ export declare function handleSecurity(cli: CLI): Promise<void>;
11
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1,68 @@
1
+ /**
2
+ * `javi-forge security <baseline|check|update|allowlist>` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ../../commands/security.js INSIDE the function to preserve
6
+ * cold-start performance — heavy command modules MUST NOT be eager-imported
7
+ * at the top of this file.
8
+ */
9
+ import { VALID_SECURITY_ACTIONS } from "../validators.js";
10
+ export async function handleSecurity(cli) {
11
+ const securityAction = cli.input[1];
12
+ if (!securityAction || !VALID_SECURITY_ACTIONS.includes(securityAction)) {
13
+ console.error("Usage: javi-forge security <baseline|check|update|allowlist>");
14
+ console.error(" baseline Create security baseline from current audit findings");
15
+ console.error(" check Check for regressions against baseline (exits non-zero if found)");
16
+ console.error(" update Re-snapshot baseline (acknowledge current vulns)");
17
+ console.error(" allowlist Add all current findings to the allowlist (suppress in future checks)");
18
+ console.error("");
19
+ console.error(" Options (check mode):");
20
+ console.error(" --min-severity <level> Only fail on regressions >= level (critical|high|moderate|low|info)");
21
+ console.error(" --stale-days <N> Warn if baseline older than N days (default: 30)");
22
+ console.error(" --json Output result as JSON (for CI integration)");
23
+ process.exit(1);
24
+ }
25
+ const { runSecurity } = await import("../../commands/security.js");
26
+ const mode = securityAction;
27
+ const rawMinSev = cli.flags.minSeverity;
28
+ const validSeverities = [
29
+ "critical",
30
+ "high",
31
+ "moderate",
32
+ "low",
33
+ "info",
34
+ ];
35
+ const checkOptions = {
36
+ minSeverity: (rawMinSev && validSeverities.includes(rawMinSev)
37
+ ? rawMinSev
38
+ : "low"),
39
+ staleDays: cli.flags.staleDays,
40
+ };
41
+ const jsonOutput = cli.flags.json;
42
+ try {
43
+ const result = await runSecurity(mode, process.cwd(), (step) => {
44
+ if (jsonOutput)
45
+ return; // suppress step output in JSON mode
46
+ const icon = step.status === "done"
47
+ ? "\u2713"
48
+ : step.status === "error"
49
+ ? "\u2717"
50
+ : step.status === "skipped"
51
+ ? "-"
52
+ : "\u25CB";
53
+ console.log(`${icon} ${step.label}`);
54
+ if (step.detail)
55
+ console.log(` ${step.detail}`);
56
+ }, checkOptions);
57
+ if (jsonOutput && result) {
58
+ console.log(JSON.stringify(result, null, 2));
59
+ }
60
+ if (mode === "check" && result && result.filteredRegressions.length > 0) {
61
+ process.exit(1);
62
+ }
63
+ }
64
+ catch {
65
+ process.exit(1);
66
+ }
67
+ }
68
+ //# sourceMappingURL=security.js.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Trivial Ink renderers for CLI subcommands.
3
+ *
4
+ * Each handler is a thin wrapper around `render(<Provider><Component .../></Provider>)`.
5
+ * Grouped here because the bodies are 5-10 LOC apiece and share the same shape.
6
+ *
7
+ * Ink + React are already eagerly imported at the entrypoint, so importing the
8
+ * concrete UI components at the top of this file does NOT worsen cold-start.
9
+ */
10
+ import type { CLI, RendererCtx } from "./types.js";
11
+ export declare function handleDoctor(_cli: CLI, ctx: RendererCtx): void;
12
+ export declare function handleAnalyze(cli: CLI, ctx: RendererCtx): void;
13
+ export declare function handleLlmsTxt(cli: CLI, ctx: RendererCtx): void;
14
+ export declare function handlePlugin(cli: CLI, ctx: RendererCtx): void;
15
+ export declare function handleInitDefault(cli: CLI, ctx: RendererCtx): void;
16
+ //# sourceMappingURL=simple-renderers.d.ts.map
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Trivial Ink renderers for CLI subcommands.
3
+ *
4
+ * Each handler is a thin wrapper around `render(<Provider><Component .../></Provider>)`.
5
+ * Grouped here because the bodies are 5-10 LOC apiece and share the same shape.
6
+ *
7
+ * Ink + React are already eagerly imported at the entrypoint, so importing the
8
+ * concrete UI components at the top of this file does NOT worsen cold-start.
9
+ */
10
+ import { render } from "ink";
11
+ import React from "react";
12
+ import AnalyzeUI from "../../ui/AnalyzeUI.js";
13
+ import App from "../../ui/App.js";
14
+ import { CIProvider as CIContextProvider } from "../../ui/CIContext.js";
15
+ import Doctor from "../../ui/Doctor.js";
16
+ import LlmsTxt from "../../ui/LlmsTxt.js";
17
+ import Plugin from "../../ui/Plugin.js";
18
+ import { VALID_CI, VALID_MEMORY, VALID_STACKS } from "../validators.js";
19
+ export function handleDoctor(_cli, ctx) {
20
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
21
+ React.createElement(Doctor, null)), { stdin: ctx.inkStdin });
22
+ }
23
+ export function handleAnalyze(cli, ctx) {
24
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
25
+ React.createElement(AnalyzeUI, { dryRun: cli.flags.dryRun })), { stdin: ctx.inkStdin });
26
+ }
27
+ export function handleLlmsTxt(cli, ctx) {
28
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
29
+ React.createElement(LlmsTxt, { projectDir: process.cwd(), dryRun: cli.flags.dryRun })), { stdin: ctx.inkStdin });
30
+ }
31
+ export function handlePlugin(cli, ctx) {
32
+ const pluginAction = cli.input[1];
33
+ const VALID_PLUGIN_ACTIONS = [
34
+ "add",
35
+ "remove",
36
+ "list",
37
+ "search",
38
+ "validate",
39
+ "sync",
40
+ "export",
41
+ "import",
42
+ "export-skills",
43
+ ];
44
+ const action = pluginAction && VALID_PLUGIN_ACTIONS.includes(pluginAction)
45
+ ? pluginAction
46
+ : "list";
47
+ const target = cli.input[2];
48
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
49
+ React.createElement(Plugin, { action: action, target: target, dryRun: cli.flags.dryRun, codex: cli.flags.codex })), { stdin: ctx.inkStdin });
50
+ }
51
+ export function handleInitDefault(cli, ctx) {
52
+ const presetStack = VALID_STACKS.includes(cli.flags.stack)
53
+ ? cli.flags.stack
54
+ : undefined;
55
+ const presetCI = VALID_CI.includes(cli.flags.ci)
56
+ ? cli.flags.ci
57
+ : undefined;
58
+ const presetMemory = VALID_MEMORY.includes(cli.flags.memory)
59
+ ? cli.flags.memory
60
+ : undefined;
61
+ const presetName = cli.flags.projectName || undefined;
62
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
63
+ React.createElement(App, { dryRun: cli.flags.dryRun, presetStack: presetStack, presetCI: presetCI, presetMemory: presetMemory, presetName: presetName, presetGhagga: cli.flags.ghagga, presetMock: cli.flags.mock ?? false, presetLocalAi: cli.flags.localAi ?? false })), { stdin: ctx.inkStdin });
64
+ }
65
+ //# sourceMappingURL=simple-renderers.js.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `javi-forge skill publish [dir]` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ../../lib/skill-publish.js INSIDE the function to preserve
6
+ * cold-start performance — heavy command modules MUST NOT be eager-imported
7
+ * at the top of this file.
8
+ *
9
+ * The case label in src/index.tsx is `"skill"` (with `publish` as the only
10
+ * supported subcommand); the handler is named `handleSkillPublish` for clarity
11
+ * since "skill" alone is ambiguous next to the `skills` command group.
12
+ */
13
+ import type { CLI } from "./types.js";
14
+ export declare function handleSkillPublish(cli: CLI): Promise<void>;
15
+ //# sourceMappingURL=skill-publish.d.ts.map
@@ -0,0 +1,44 @@
1
+ /**
2
+ * `javi-forge skill publish [dir]` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ../../lib/skill-publish.js INSIDE the function to preserve
6
+ * cold-start performance — heavy command modules MUST NOT be eager-imported
7
+ * at the top of this file.
8
+ *
9
+ * The case label in src/index.tsx is `"skill"` (with `publish` as the only
10
+ * supported subcommand); the handler is named `handleSkillPublish` for clarity
11
+ * since "skill" alone is ambiguous next to the `skills` command group.
12
+ */
13
+ import path from "node:path";
14
+ export async function handleSkillPublish(cli) {
15
+ const skillAction = cli.input[1];
16
+ if (skillAction !== "publish") {
17
+ console.error("Usage: javi-forge skill <publish>");
18
+ console.error(" publish Package a skill directory for marketplace distribution");
19
+ process.exit(1);
20
+ }
21
+ const targetDir = cli.input[2] ?? process.cwd();
22
+ const { publishSkill } = await import("../../lib/skill-publish.js");
23
+ const result = await publishSkill({
24
+ skillDir: path.resolve(targetDir),
25
+ author: cli.flags.author || undefined,
26
+ repository: cli.flags.repo || undefined,
27
+ dryRun: cli.flags.dryRun,
28
+ });
29
+ if (result.success) {
30
+ console.log(`\u2713 Published: ${result.manifest?.name}@${result.manifest?.version}`);
31
+ console.log(` plugin.json: ${result.pluginJsonPath}`);
32
+ if (result.manifest?.tags?.length) {
33
+ console.log(` tags: ${result.manifest.tags.join(", ")}`);
34
+ }
35
+ if (cli.flags.dryRun) {
36
+ console.log(" (dry-run: no files written)");
37
+ }
38
+ }
39
+ else {
40
+ console.error(`\u2717 ${result.error}`);
41
+ process.exit(1);
42
+ }
43
+ }
44
+ //# sourceMappingURL=skill-publish.js.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `javi-forge skills` handler — three branches:
3
+ * 1. `skills auto` / `skills auto-install` — Ink render of <AutoSkills /> (eager)
4
+ * 2. `skills score` / `skills benchmark` — console-only, lazy-loads ./commands/skills.js
5
+ * 3. `skills doctor` / `skills budget` — Ink render of <Skills mode=... /> (eager)
6
+ *
7
+ * The command module (`./commands/skills.js`) is lazy-loaded inside the function
8
+ * to preserve cold-start performance for the Ink branches. Ink + React are
9
+ * already eagerly loaded by the entrypoint, so the UI components stay eager.
10
+ */
11
+ import type { CLI, RendererCtx } from "./types.js";
12
+ export declare function handleSkillsCmd(cli: CLI, ctx: RendererCtx): Promise<void>;
13
+ //# sourceMappingURL=skills-cmd.d.ts.map
@@ -0,0 +1,93 @@
1
+ /**
2
+ * `javi-forge skills` handler — three branches:
3
+ * 1. `skills auto` / `skills auto-install` — Ink render of <AutoSkills /> (eager)
4
+ * 2. `skills score` / `skills benchmark` — console-only, lazy-loads ./commands/skills.js
5
+ * 3. `skills doctor` / `skills budget` — Ink render of <Skills mode=... /> (eager)
6
+ *
7
+ * The command module (`./commands/skills.js`) is lazy-loaded inside the function
8
+ * to preserve cold-start performance for the Ink branches. Ink + React are
9
+ * already eagerly loaded by the entrypoint, so the UI components stay eager.
10
+ */
11
+ import path from "node:path";
12
+ import { render } from "ink";
13
+ import React from "react";
14
+ import AutoSkills from "../../ui/AutoSkills.js";
15
+ import { CIProvider as CIContextProvider } from "../../ui/CIContext.js";
16
+ import Skills from "../../ui/Skills.js";
17
+ const VALID_SKILLS_ACTIONS = [
18
+ "doctor",
19
+ "budget",
20
+ "score",
21
+ "benchmark",
22
+ "auto",
23
+ "auto-install",
24
+ ];
25
+ export async function handleSkillsCmd(cli, ctx) {
26
+ const skillsAction = cli.input[1];
27
+ if (!skillsAction || !VALID_SKILLS_ACTIONS.includes(skillsAction)) {
28
+ console.error("Usage: javi-forge skills <doctor|budget|score|benchmark|auto>");
29
+ console.error(" doctor Show skills health report (add --deep for conflict detection)");
30
+ console.error(" budget Show token cost of loaded skills (add -b N for custom budget)");
31
+ console.error(" score Score a skill on quality dimensions (0-100)");
32
+ console.error(" benchmark Benchmark a skill with structural quality checks");
33
+ console.error(" auto Auto-detect project stack and suggest/install matching AI skills");
34
+ console.error(" auto-install Alias for auto");
35
+ process.exit(1);
36
+ }
37
+ // Auto / auto-install: render interactive Ink UI
38
+ if (skillsAction === "auto" || skillsAction === "auto-install") {
39
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
40
+ React.createElement(AutoSkills, { projectDir: process.cwd(), skillsDir: cli.flags.skillsDir || undefined, dryRun: cli.flags.dryRun })), { stdin: ctx.inkStdin });
41
+ return;
42
+ }
43
+ // Score and benchmark are non-interactive CLI commands
44
+ if (skillsAction === "score" || skillsAction === "benchmark") {
45
+ const targetSkill = cli.input[2];
46
+ if (!targetSkill) {
47
+ console.error(`Usage: javi-forge skills ${skillsAction} <skill-name>`);
48
+ process.exit(1);
49
+ }
50
+ const skillsDir = cli.flags.skillsDir ||
51
+ path.join(process.env.HOME ?? "~", ".claude", "skills");
52
+ const skillPath = path.join(skillsDir, targetSkill, "SKILL.md");
53
+ if (skillsAction === "score") {
54
+ const { scoreSkill } = await import("../../commands/skills.js");
55
+ const result = await scoreSkill(skillPath, cli.flags.budget);
56
+ if (!result) {
57
+ console.error(`\u2717 Skill not found: ${skillPath}`);
58
+ process.exit(1);
59
+ }
60
+ console.log(`\nSkill: ${result.skillName}`);
61
+ console.log(` Completeness: ${result.completeness}/100`);
62
+ console.log(` Clarity: ${result.clarity}/100`);
63
+ console.log(` Testability: ${result.testability}/100`);
64
+ console.log(` Token Efficiency: ${result.tokenEfficiency}/100`);
65
+ console.log(` Safety: ${result.safety}/100`);
66
+ console.log(` Agent Readiness: ${result.agentReadiness}/100`);
67
+ console.log(` ─────────────────────────`);
68
+ console.log(` Overall: ${result.overall}/100`);
69
+ console.log(` Grade: ${result.grade}`);
70
+ console.log(` Threshold: ${result.threshold}`);
71
+ console.log(` Status: ${result.passing ? "\u2713 PASSING" : "\u2717 FAILING"}`);
72
+ process.exit(result.passing ? 0 : 1);
73
+ }
74
+ const { benchmarkSkill } = await import("../../commands/skills.js");
75
+ const result = await benchmarkSkill(skillPath);
76
+ if (!result) {
77
+ console.error(`\u2717 Skill not found: ${skillPath}`);
78
+ process.exit(1);
79
+ }
80
+ console.log(`\nBenchmark: ${result.skillName}`);
81
+ for (const check of result.checks) {
82
+ const icon = check.passed ? "\u2713" : "\u2717";
83
+ console.log(` ${icon} ${check.name}${check.detail ? ` — ${check.detail}` : ""}`);
84
+ }
85
+ console.log(`\n Pass rate: ${result.passRate}%`);
86
+ process.exit(result.passRate >= 50 ? 0 : 1);
87
+ }
88
+ // Doctor / budget: render Ink UI with mode prop
89
+ const skillsMode = skillsAction;
90
+ render(React.createElement(CIContextProvider, { isCI: ctx.isCI },
91
+ React.createElement(Skills, { mode: skillsMode, budget: cli.flags.budget, deep: cli.flags.deep, skillsDir: cli.flags.skillsDir || undefined })), { stdin: ctx.inkStdin });
92
+ }
93
+ //# sourceMappingURL=skills-cmd.js.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * `javi-forge tdd <init|pipeline>` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ./commands/tdd.js or ./commands/tdd-pipeline.js INSIDE the function
6
+ * to preserve cold-start performance — heavy command modules MUST NOT be
7
+ * eager-imported at the top of this file.
8
+ */
9
+ import type { CLI } from "./types.js";
10
+ export declare function handleTdd(cli: CLI): Promise<void>;
11
+ //# sourceMappingURL=tdd.d.ts.map
@@ -0,0 +1,45 @@
1
+ /**
2
+ * `javi-forge tdd <init|pipeline>` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ./commands/tdd.js or ./commands/tdd-pipeline.js INSIDE the function
6
+ * to preserve cold-start performance — heavy command modules MUST NOT be
7
+ * eager-imported at the top of this file.
8
+ */
9
+ export async function handleTdd(cli) {
10
+ if (cli.input[1] === "init") {
11
+ const { installTddHooks } = await import("../../commands/tdd.js");
12
+ const { installed, errors } = await installTddHooks(process.cwd());
13
+ if (installed.length > 0) {
14
+ console.log(`\u2713 Installed TDD hooks: ${installed.join(", ")}`);
15
+ console.log(" Pre-commit hook enforces tests must pass before commit");
16
+ }
17
+ for (const err of errors) {
18
+ console.error(`\u2717 ${err}`);
19
+ }
20
+ process.exit(errors.length > 0 ? 1 : 0);
21
+ }
22
+ else if (cli.input[1] === "pipeline") {
23
+ const { installTddPipelineHook } = await import("../../commands/tdd-pipeline.js");
24
+ const mode = cli.flags.mode === "warn" ? "warn" : "strict";
25
+ const result = await installTddPipelineHook(process.cwd(), mode);
26
+ if (result.installed.length > 0) {
27
+ console.log(`\u2713 Installed TDD pipeline hook: ${result.installed.join(", ")} [${result.mode}]`);
28
+ console.log(` Pre-push hook enforces TDD pipeline (${result.mode} mode)`);
29
+ }
30
+ for (const skip of result.skipped) {
31
+ console.log(`\u26A0 ${skip}`);
32
+ }
33
+ for (const err of result.errors) {
34
+ console.error(`\u2717 ${err}`);
35
+ }
36
+ process.exit(result.errors.length > 0 ? 1 : 0);
37
+ }
38
+ else {
39
+ console.error("Usage: javi-forge tdd <command>");
40
+ console.error(" init Install TDD-enforcing pre-commit hook");
41
+ console.error(" pipeline Install TDD pipeline pre-push hook (--mode strict|warn)");
42
+ process.exit(1);
43
+ }
44
+ }
45
+ //# sourceMappingURL=tdd.js.map
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Shared types for the CLI dispatch layer.
3
+ *
4
+ * `CLI` is the meow `Result` parameterized over FLAGS_SCHEMA — imported
5
+ * by all dispatch handlers for the `cli` parameter type.
6
+ *
7
+ * `RendererCtx` carries the Ink-render-specific context (stdin shim +
8
+ * CI flag) — imported by Ink-rendering handlers only.
9
+ */
10
+ import type { Result } from "meow";
11
+ import type { FLAGS_SCHEMA } from "../help.js";
12
+ /**
13
+ * Type of the meow `Result` parameterized over our FLAGS_SCHEMA.
14
+ * Shared by all dispatch handlers as the `cli` parameter type.
15
+ */
16
+ export type CLI = Result<typeof FLAGS_SCHEMA>;
17
+ /**
18
+ * Context passed to dispatch handlers that need to render Ink components.
19
+ * - `inkStdin`: the (possibly shimmed) stdin used by Ink's render — built via
20
+ * `createInkStdin()` in `src/cli/runtime.ts` (a `PassThrough` stand-in when
21
+ * stdin is not a TTY, the real `process.stdin` otherwise).
22
+ * - `isCI`: controls `CIContextProvider` behavior — derived from
23
+ * `detectCI(cli.flags)` in `src/cli/runtime.ts`.
24
+ */
25
+ export type RendererCtx = {
26
+ inkStdin: NodeJS.ReadStream;
27
+ isCI: boolean;
28
+ };
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * `javi-forge workflow <show|validate|list>` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ../../commands/workflow.js INSIDE the function to preserve
6
+ * cold-start performance — heavy command modules MUST NOT be eager-imported
7
+ * at the top of this file.
8
+ */
9
+ import type { CLI } from "./types.js";
10
+ export declare function handleWorkflow(cli: CLI): Promise<void>;
11
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1,67 @@
1
+ /**
2
+ * `javi-forge workflow <show|validate|list>` handler.
3
+ *
4
+ * Console-only (no Ink, no React, no CIContextProvider).
5
+ * Lazy-loads ../../commands/workflow.js INSIDE the function to preserve
6
+ * cold-start performance — heavy command modules MUST NOT be eager-imported
7
+ * at the top of this file.
8
+ */
9
+ export async function handleWorkflow(cli) {
10
+ const workflowAction = cli.input[1];
11
+ const VALID_WORKFLOW_ACTIONS = ["show", "validate", "list"];
12
+ if (!workflowAction || !VALID_WORKFLOW_ACTIONS.includes(workflowAction)) {
13
+ console.error("Usage: javi-forge workflow <show|validate|list>");
14
+ console.error(" show Render a workflow graph as ASCII");
15
+ console.error(" validate Validate project state against a workflow graph");
16
+ console.error(" list List available workflows and built-in templates");
17
+ console.error("");
18
+ console.error(" Options:");
19
+ console.error(" --template <name> Use a built-in template (ci-pipeline, release, feature-flow)");
20
+ console.error(" <file> Path to a .dot or .mermaid file");
21
+ process.exit(1);
22
+ }
23
+ const { runWorkflowShow, runWorkflowValidate, runWorkflowList } = await import("../../commands/workflow.js");
24
+ const workflowTarget = cli.input[2];
25
+ const workflowTemplate = cli.flags.template || undefined;
26
+ const onStep = (step) => {
27
+ const icon = step.status === "done"
28
+ ? "\u2713"
29
+ : step.status === "error"
30
+ ? "\u2717"
31
+ : "\u25CB";
32
+ console.log(`${icon} ${step.label}`);
33
+ if (step.detail)
34
+ console.log(` ${step.detail}`);
35
+ };
36
+ try {
37
+ if (workflowAction === "show") {
38
+ const output = await runWorkflowShow(process.cwd(), onStep, {
39
+ target: workflowTarget,
40
+ template: workflowTemplate,
41
+ });
42
+ if (output)
43
+ console.log(`\n${output}`);
44
+ else
45
+ process.exit(1);
46
+ }
47
+ else if (workflowAction === "validate") {
48
+ const output = await runWorkflowValidate(process.cwd(), onStep, {
49
+ target: workflowTarget,
50
+ template: workflowTemplate,
51
+ });
52
+ if (output)
53
+ console.log(`\n${output}`);
54
+ else
55
+ process.exit(1);
56
+ }
57
+ else {
58
+ const output = await runWorkflowList(process.cwd(), onStep);
59
+ console.log(`\n${output}`);
60
+ }
61
+ }
62
+ catch (e) {
63
+ console.error(`\u2717 ${e instanceof Error ? e.message : String(e)}`);
64
+ process.exit(1);
65
+ }
66
+ }
67
+ //# sourceMappingURL=workflow.js.map