javi-forge 1.5.0 → 1.6.1
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 +191 -3
- package/ci-local/hooks/pre-push +17 -13
- package/dist/commands/analyze.d.ts +1 -1
- package/dist/commands/analyze.js +15 -15
- package/dist/commands/atlassian-mcp.d.ts +42 -0
- package/dist/commands/atlassian-mcp.js +98 -0
- package/dist/commands/ci.d.ts +3 -3
- package/dist/commands/ci.js +185 -147
- package/dist/commands/crash-recovery.d.ts +34 -0
- package/dist/commands/crash-recovery.js +123 -0
- package/dist/commands/doctor.d.ts +2 -2
- package/dist/commands/doctor.js +113 -61
- package/dist/commands/harness-audit.d.ts +35 -0
- package/dist/commands/harness-audit.js +277 -0
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +415 -118
- package/dist/commands/llmstxt.d.ts +1 -1
- package/dist/commands/llmstxt.js +36 -34
- package/dist/commands/parallel-batch.d.ts +42 -0
- package/dist/commands/parallel-batch.js +90 -0
- package/dist/commands/plugin.d.ts +26 -1
- package/dist/commands/plugin.js +138 -24
- package/dist/commands/secret-scanner.d.ts +30 -0
- package/dist/commands/secret-scanner.js +272 -0
- package/dist/commands/security-analysis.d.ts +74 -0
- package/dist/commands/security-analysis.js +487 -0
- package/dist/commands/security.d.ts +31 -0
- package/dist/commands/security.js +445 -0
- package/dist/commands/skill-scanner.d.ts +63 -0
- package/dist/commands/skill-scanner.js +383 -0
- package/dist/commands/skills.d.ts +139 -0
- package/dist/commands/skills.js +895 -0
- package/dist/commands/supply-chain.d.ts +23 -0
- package/dist/commands/supply-chain.js +126 -0
- package/dist/commands/tdd-pipeline.d.ts +17 -0
- package/dist/commands/tdd-pipeline.js +144 -0
- package/dist/commands/tdd.d.ts +21 -0
- package/dist/commands/tdd.js +120 -0
- package/dist/commands/team-presets.d.ts +53 -0
- package/dist/commands/team-presets.js +201 -0
- package/dist/commands/workflow.d.ts +23 -0
- package/dist/commands/workflow.js +114 -0
- package/dist/constants.d.ts +21 -0
- package/dist/constants.js +208 -37
- package/dist/index.js +400 -54
- package/dist/lib/agent-skills.d.ts +73 -0
- package/dist/lib/agent-skills.js +260 -0
- package/dist/lib/auto-skill-install.d.ts +37 -0
- package/dist/lib/auto-skill-install.js +92 -0
- package/dist/lib/auto-wire.d.ts +20 -0
- package/dist/lib/auto-wire.js +240 -0
- package/dist/lib/claudemd.d.ts +20 -0
- package/dist/lib/claudemd.js +222 -0
- package/dist/lib/codex-export.d.ts +16 -0
- package/dist/lib/codex-export.js +109 -0
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.js +52 -44
- package/dist/lib/context.d.ts +27 -0
- package/dist/lib/context.js +204 -0
- package/dist/lib/docker.d.ts +1 -1
- package/dist/lib/docker.js +141 -112
- package/dist/lib/frontmatter.d.ts +1 -1
- package/dist/lib/frontmatter.js +29 -15
- package/dist/lib/plugin.d.ts +19 -1
- package/dist/lib/plugin.js +174 -47
- package/dist/lib/skill-publish.d.ts +40 -0
- package/dist/lib/skill-publish.js +146 -0
- package/dist/lib/stack-detector.d.ts +38 -0
- package/dist/lib/stack-detector.js +207 -0
- package/dist/lib/template.d.ts +16 -1
- package/dist/lib/template.js +46 -17
- package/dist/lib/workflow/discovery.d.ts +19 -0
- package/dist/lib/workflow/discovery.js +68 -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 +55 -0
- package/dist/tasks/task-tracker.d.ts +15 -0
- package/dist/tasks/task-tracker.js +81 -0
- package/dist/types/index.d.ts +252 -5
- 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 +92 -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 +3 -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 +8 -2
- package/dist/ui/OptionSelector.js +83 -26
- package/dist/ui/Plugin.d.ts +4 -3
- package/dist/ui/Plugin.js +89 -29
- package/dist/ui/Progress.d.ts +3 -3
- package/dist/ui/Progress.js +23 -22
- package/dist/ui/Skills.d.ts +11 -0
- package/dist/ui/Skills.js +148 -0
- package/dist/ui/StackSelector.d.ts +2 -2
- package/dist/ui/StackSelector.js +26 -16
- 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/package.json +9 -6
- 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/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/common.d.ts.map +0 -1
- package/dist/lib/common.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/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
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Box, Text, useInput } from "ink";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { useCIMode } from "./CIContext.js";
|
|
4
|
+
import { theme } from "./theme.js";
|
|
5
5
|
const MEMORY_OPTIONS = [
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
{
|
|
7
|
+
id: "engram",
|
|
8
|
+
label: "Engram",
|
|
9
|
+
description: "SQLite-backed persistent memory with MCP",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "obsidian-brain",
|
|
13
|
+
label: "Obsidian Brain",
|
|
14
|
+
description: "Obsidian vault with Kanban + Dataview",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "memory-simple",
|
|
18
|
+
label: "Simple Memory",
|
|
19
|
+
description: "File-based .project/ memory",
|
|
20
|
+
},
|
|
21
|
+
{ id: "none", label: "None", description: "Skip memory module" },
|
|
10
22
|
];
|
|
11
23
|
export default function MemorySelector({ onConfirm }) {
|
|
12
24
|
const isCI = useCIMode();
|
|
@@ -19,9 +31,9 @@ export default function MemorySelector({ onConfirm }) {
|
|
|
19
31
|
}, [isCI]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
20
32
|
useInput((_, key) => {
|
|
21
33
|
if (key.upArrow)
|
|
22
|
-
setCursor(c => Math.max(0, c - 1));
|
|
34
|
+
setCursor((c) => Math.max(0, c - 1));
|
|
23
35
|
if (key.downArrow)
|
|
24
|
-
setCursor(c => Math.min(MEMORY_OPTIONS.length - 1, c + 1));
|
|
36
|
+
setCursor((c) => Math.min(MEMORY_OPTIONS.length - 1, c + 1));
|
|
25
37
|
if (key.return) {
|
|
26
38
|
onConfirm(MEMORY_OPTIONS[cursor].id);
|
|
27
39
|
}
|
|
@@ -29,18 +41,18 @@ export default function MemorySelector({ onConfirm }) {
|
|
|
29
41
|
return (React.createElement(Box, { flexDirection: "column" },
|
|
30
42
|
React.createElement(Text, { bold: true }, "Select memory module:"),
|
|
31
43
|
React.createElement(Box, { marginTop: 1, flexDirection: "column", borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: theme.muted, paddingLeft: 1 }, MEMORY_OPTIONS.map((m, i) => (React.createElement(Box, { key: m.id },
|
|
32
|
-
React.createElement(Text, { color: i === cursor ? theme.primary :
|
|
33
|
-
i === cursor ?
|
|
34
|
-
i === cursor ?
|
|
44
|
+
React.createElement(Text, { color: i === cursor ? theme.primary : "white" },
|
|
45
|
+
i === cursor ? "\u25b6 " : " ",
|
|
46
|
+
i === cursor ? "\u25c9" : "\u25cb",
|
|
35
47
|
" ",
|
|
36
48
|
m.label),
|
|
37
49
|
React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
38
|
-
"
|
|
50
|
+
" ",
|
|
39
51
|
m.description))))),
|
|
40
52
|
React.createElement(Box, { marginTop: 1, gap: 2 },
|
|
41
53
|
React.createElement(Text, { color: theme.primary }, MEMORY_OPTIONS[cursor].label),
|
|
42
54
|
React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
43
|
-
|
|
44
|
-
" navigate
|
|
55
|
+
"\u2191\u2193",
|
|
56
|
+
" navigate Enter confirm"))));
|
|
45
57
|
}
|
|
46
58
|
//# sourceMappingURL=MemorySelector.js.map
|
package/dist/ui/NameInput.d.ts
CHANGED
package/dist/ui/NameInput.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Box, Text, useInput } from "ink";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import React, { useEffect, useState } from "react";
|
|
4
|
+
import { useCIMode } from "./CIContext.js";
|
|
5
|
+
import { theme } from "./theme.js";
|
|
6
6
|
const VALID_NAME = /^[a-z0-9][a-z0-9._-]*$/;
|
|
7
7
|
function validateName(name) {
|
|
8
8
|
if (name.length === 0)
|
|
9
|
-
return
|
|
9
|
+
return "Name cannot be empty";
|
|
10
10
|
if (name !== name.toLowerCase())
|
|
11
|
-
return
|
|
12
|
-
if (name.includes(
|
|
13
|
-
return
|
|
11
|
+
return "Use lowercase only";
|
|
12
|
+
if (name.includes(" "))
|
|
13
|
+
return "No spaces allowed (use - or _)";
|
|
14
14
|
if (!VALID_NAME.test(name))
|
|
15
|
-
return
|
|
15
|
+
return "Use lowercase letters, numbers, hyphens, dots";
|
|
16
16
|
if (name.length > 60)
|
|
17
|
-
return
|
|
17
|
+
return "Name too long (max 60 chars)";
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
export default function NameInput({ defaultName, onConfirm }) {
|
|
@@ -23,7 +23,7 @@ export default function NameInput({ defaultName, onConfirm }) {
|
|
|
23
23
|
const trimmed = value.trim();
|
|
24
24
|
const error = validateName(trimmed);
|
|
25
25
|
const isValid = error === null && trimmed.length > 0;
|
|
26
|
-
const targetDir = path.resolve(process.cwd(), trimmed ||
|
|
26
|
+
const targetDir = path.resolve(process.cwd(), trimmed || ".");
|
|
27
27
|
// Auto-confirm in CI mode
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
if (isCI && isValid) {
|
|
@@ -35,33 +35,33 @@ export default function NameInput({ defaultName, onConfirm }) {
|
|
|
35
35
|
onConfirm(trimmed, targetDir);
|
|
36
36
|
}
|
|
37
37
|
else if (key.backspace || key.delete) {
|
|
38
|
-
setValue(v => v.slice(0, -1));
|
|
38
|
+
setValue((v) => v.slice(0, -1));
|
|
39
39
|
}
|
|
40
40
|
else if (input && !key.ctrl && !key.meta) {
|
|
41
|
-
setValue(v => v + input);
|
|
41
|
+
setValue((v) => v + input);
|
|
42
42
|
}
|
|
43
43
|
}, { isActive: !isCI });
|
|
44
44
|
return (React.createElement(Box, { flexDirection: "column" },
|
|
45
45
|
React.createElement(Text, { bold: true }, "Project name:"),
|
|
46
46
|
React.createElement(Box, { marginTop: 1 },
|
|
47
47
|
React.createElement(Text, { color: isValid ? theme.primary : theme.error },
|
|
48
|
-
|
|
48
|
+
"\u25b6",
|
|
49
49
|
" "),
|
|
50
50
|
React.createElement(Text, null, value),
|
|
51
|
-
React.createElement(Text, { color: theme.muted },
|
|
51
|
+
React.createElement(Text, { color: theme.muted }, "\u2588")),
|
|
52
52
|
trimmed.length > 0 && error && (React.createElement(Box, { marginTop: 1 },
|
|
53
53
|
React.createElement(Text, { color: theme.error },
|
|
54
|
-
"
|
|
55
|
-
|
|
54
|
+
" ",
|
|
55
|
+
"\u2717",
|
|
56
56
|
" ",
|
|
57
57
|
error))),
|
|
58
58
|
isValid && (React.createElement(Box, { marginTop: 1 },
|
|
59
59
|
React.createElement(Text, { color: theme.success },
|
|
60
|
-
"
|
|
61
|
-
|
|
60
|
+
" ",
|
|
61
|
+
"\u2713",
|
|
62
62
|
" Valid name"))),
|
|
63
63
|
React.createElement(Box, { marginTop: 1 },
|
|
64
|
-
React.createElement(Text, { color: theme.muted }, "
|
|
64
|
+
React.createElement(Text, { color: theme.muted }, " Will create: "),
|
|
65
65
|
React.createElement(Text, { color: isValid ? theme.primary : theme.muted, dimColor: !isValid }, targetDir)),
|
|
66
66
|
React.createElement(Box, { marginTop: 1 },
|
|
67
67
|
React.createElement(Text, { color: theme.muted, dimColor: true }, "Enter to confirm"))));
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
interface Props {
|
|
3
3
|
onConfirm: (selected: {
|
|
4
4
|
aiSync: boolean;
|
|
5
5
|
sdd: boolean;
|
|
6
|
+
contextDir: boolean;
|
|
7
|
+
claudeMd: boolean;
|
|
6
8
|
ghagga: boolean;
|
|
9
|
+
securityHooks: boolean;
|
|
10
|
+
codeGraph: boolean;
|
|
11
|
+
localAi: boolean;
|
|
7
12
|
}) => void;
|
|
8
13
|
presetGhagga?: boolean;
|
|
14
|
+
presetLocalAi?: boolean;
|
|
9
15
|
}
|
|
10
|
-
export default function OptionSelector({ onConfirm, presetGhagga }: Props): React.JSX.Element;
|
|
16
|
+
export default function OptionSelector({ onConfirm, presetGhagga, presetLocalAi, }: Props): React.JSX.Element;
|
|
11
17
|
export {};
|
|
12
18
|
//# sourceMappingURL=OptionSelector.d.ts.map
|
|
@@ -1,39 +1,91 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Box, Text, useInput } from "ink";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { useCIMode } from "./CIContext.js";
|
|
4
|
+
import { theme } from "./theme.js";
|
|
5
5
|
const OPTIONS = [
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
{
|
|
7
|
+
id: "aiSync",
|
|
8
|
+
label: "AI Config Sync",
|
|
9
|
+
description: "Sync AI config via javi-ai",
|
|
10
|
+
default: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "sdd",
|
|
14
|
+
label: "SDD (openspec/)",
|
|
15
|
+
description: "Spec-Driven Development workflow",
|
|
16
|
+
default: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "contextDir",
|
|
20
|
+
label: ".context/ Directory",
|
|
21
|
+
description: "AI-ready project context files",
|
|
22
|
+
default: true,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "claudeMd",
|
|
26
|
+
label: "CLAUDE.md",
|
|
27
|
+
description: "AI agent project instructions",
|
|
28
|
+
default: true,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "ghagga",
|
|
32
|
+
label: "GHAGGA Review",
|
|
33
|
+
description: "Multi-agent AI code review system",
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "securityHooks",
|
|
38
|
+
label: "Security Hooks",
|
|
39
|
+
description: "6-layer git hooks + runtime AI guardrails",
|
|
40
|
+
default: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "codeGraph",
|
|
44
|
+
label: "Code Graph",
|
|
45
|
+
description: "RepoForge call-graph scaffolding + CI",
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "localAi",
|
|
50
|
+
label: "Local AI Stack",
|
|
51
|
+
description: "Ollama + Open WebUI + n8n + Supabase (Docker)",
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
9
54
|
];
|
|
10
|
-
export default function OptionSelector({ onConfirm, presetGhagga = false }) {
|
|
55
|
+
export default function OptionSelector({ onConfirm, presetGhagga = false, presetLocalAi = false, }) {
|
|
11
56
|
const isCI = useCIMode();
|
|
12
57
|
const [cursor, setCursor] = useState(0);
|
|
13
58
|
const [selected, setSelected] = useState(() => {
|
|
14
|
-
const defaults = new Set(OPTIONS.filter(o => o.default).map(o => o.id));
|
|
59
|
+
const defaults = new Set(OPTIONS.filter((o) => o.default).map((o) => o.id));
|
|
15
60
|
if (presetGhagga)
|
|
16
|
-
defaults.add(
|
|
61
|
+
defaults.add("ghagga");
|
|
62
|
+
if (presetLocalAi)
|
|
63
|
+
defaults.add("localAi");
|
|
17
64
|
return defaults;
|
|
18
65
|
});
|
|
19
66
|
// Auto-confirm in CI mode with defaults
|
|
20
67
|
useEffect(() => {
|
|
21
68
|
if (isCI) {
|
|
22
69
|
onConfirm({
|
|
23
|
-
aiSync: selected.has(
|
|
24
|
-
sdd: selected.has(
|
|
25
|
-
|
|
70
|
+
aiSync: selected.has("aiSync"),
|
|
71
|
+
sdd: selected.has("sdd"),
|
|
72
|
+
contextDir: selected.has("contextDir"),
|
|
73
|
+
claudeMd: selected.has("claudeMd"),
|
|
74
|
+
ghagga: selected.has("ghagga"),
|
|
75
|
+
securityHooks: selected.has("securityHooks"),
|
|
76
|
+
codeGraph: selected.has("codeGraph"),
|
|
77
|
+
localAi: selected.has("localAi"),
|
|
26
78
|
});
|
|
27
79
|
}
|
|
28
80
|
}, [isCI]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
29
81
|
useInput((input, key) => {
|
|
30
82
|
if (key.upArrow)
|
|
31
|
-
setCursor(c => Math.max(0, c - 1));
|
|
83
|
+
setCursor((c) => Math.max(0, c - 1));
|
|
32
84
|
if (key.downArrow)
|
|
33
|
-
setCursor(c => Math.min(OPTIONS.length - 1, c + 1));
|
|
34
|
-
if (input ===
|
|
85
|
+
setCursor((c) => Math.min(OPTIONS.length - 1, c + 1));
|
|
86
|
+
if (input === " ") {
|
|
35
87
|
const opt = OPTIONS[cursor].id;
|
|
36
|
-
setSelected(prev => {
|
|
88
|
+
setSelected((prev) => {
|
|
37
89
|
const next = new Set(prev);
|
|
38
90
|
next.has(opt) ? next.delete(opt) : next.add(opt);
|
|
39
91
|
return next;
|
|
@@ -41,29 +93,34 @@ export default function OptionSelector({ onConfirm, presetGhagga = false }) {
|
|
|
41
93
|
}
|
|
42
94
|
if (key.return) {
|
|
43
95
|
onConfirm({
|
|
44
|
-
aiSync: selected.has(
|
|
45
|
-
sdd: selected.has(
|
|
46
|
-
|
|
96
|
+
aiSync: selected.has("aiSync"),
|
|
97
|
+
sdd: selected.has("sdd"),
|
|
98
|
+
contextDir: selected.has("contextDir"),
|
|
99
|
+
claudeMd: selected.has("claudeMd"),
|
|
100
|
+
ghagga: selected.has("ghagga"),
|
|
101
|
+
securityHooks: selected.has("securityHooks"),
|
|
102
|
+
codeGraph: selected.has("codeGraph"),
|
|
103
|
+
localAi: selected.has("localAi"),
|
|
47
104
|
});
|
|
48
105
|
}
|
|
49
106
|
}, { isActive: !isCI });
|
|
50
107
|
return (React.createElement(Box, { flexDirection: "column" },
|
|
51
108
|
React.createElement(Text, { bold: true }, "Select additional options:"),
|
|
52
109
|
React.createElement(Box, { marginTop: 1, flexDirection: "column", borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: theme.muted, paddingLeft: 1 }, OPTIONS.map((opt, i) => (React.createElement(Box, { key: opt.id },
|
|
53
|
-
React.createElement(Text, { color: i === cursor ? theme.primary :
|
|
54
|
-
i === cursor ?
|
|
55
|
-
selected.has(opt.id) ?
|
|
110
|
+
React.createElement(Text, { color: i === cursor ? theme.primary : "white" },
|
|
111
|
+
i === cursor ? "\u25b6 " : " ",
|
|
112
|
+
selected.has(opt.id) ? "\u25c9" : "\u25cb",
|
|
56
113
|
" ",
|
|
57
114
|
opt.label),
|
|
58
115
|
React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
59
|
-
"
|
|
116
|
+
" ",
|
|
60
117
|
opt.description))))),
|
|
61
118
|
React.createElement(Box, { marginTop: 1, gap: 2 },
|
|
62
119
|
React.createElement(Text, { color: selected.size > 0 ? theme.accent : theme.muted },
|
|
63
120
|
selected.size,
|
|
64
121
|
" selected"),
|
|
65
122
|
React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
66
|
-
|
|
67
|
-
" navigate
|
|
123
|
+
"\u2191\u2193",
|
|
124
|
+
" navigate Space toggle Enter confirm"))));
|
|
68
125
|
}
|
|
69
126
|
//# sourceMappingURL=OptionSelector.js.map
|
package/dist/ui/Plugin.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
interface PluginProps {
|
|
3
|
-
action:
|
|
3
|
+
action: "add" | "remove" | "list" | "search" | "validate" | "sync" | "export" | "import" | "export-skills";
|
|
4
4
|
target?: string;
|
|
5
5
|
dryRun: boolean;
|
|
6
|
+
codex?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export default function Plugin({ action, target, dryRun }: PluginProps): React.JSX.Element;
|
|
8
|
+
export default function Plugin({ action, target, dryRun, codex, }: PluginProps): React.JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=Plugin.d.ts.map
|
package/dist/ui/Plugin.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { runPluginAdd,
|
|
5
|
-
import { theme } from
|
|
1
|
+
import { Box, Text } from "ink";
|
|
2
|
+
import Spinner from "ink-spinner";
|
|
3
|
+
import React, { useEffect, useState } from "react";
|
|
4
|
+
import { runPluginAdd, runPluginExport, runPluginExportCodex, runPluginExportGlobalSkillsJson, runPluginExportSkillsJson, runPluginImport, runPluginList, runPluginRemove, runPluginSearch, runPluginSync, runPluginValidate, } from "../commands/plugin.js";
|
|
5
|
+
import { theme } from "./theme.js";
|
|
6
6
|
const STATUS_ICON = {
|
|
7
|
-
pending:
|
|
8
|
-
done:
|
|
9
|
-
error:
|
|
10
|
-
skipped:
|
|
7
|
+
pending: "\u25cb",
|
|
8
|
+
done: "\u2713",
|
|
9
|
+
error: "\u2717",
|
|
10
|
+
skipped: "\u2013",
|
|
11
11
|
};
|
|
12
12
|
const STATUS_COLOR = {
|
|
13
13
|
pending: theme.muted,
|
|
@@ -16,12 +16,12 @@ const STATUS_COLOR = {
|
|
|
16
16
|
error: theme.error,
|
|
17
17
|
skipped: theme.muted,
|
|
18
18
|
};
|
|
19
|
-
export default function Plugin({ action, target, dryRun }) {
|
|
19
|
+
export default function Plugin({ action, target, dryRun, codex = false, }) {
|
|
20
20
|
const [steps, setSteps] = useState([]);
|
|
21
21
|
const [done, setDone] = useState(false);
|
|
22
22
|
const onStep = (step) => {
|
|
23
|
-
setSteps(prev => {
|
|
24
|
-
const idx = prev.findIndex(s => s.id === step.id);
|
|
23
|
+
setSteps((prev) => {
|
|
24
|
+
const idx = prev.findIndex((s) => s.id === step.id);
|
|
25
25
|
if (idx >= 0) {
|
|
26
26
|
const next = [...prev];
|
|
27
27
|
next[idx] = step;
|
|
@@ -34,37 +34,97 @@ export default function Plugin({ action, target, dryRun }) {
|
|
|
34
34
|
const run = async () => {
|
|
35
35
|
try {
|
|
36
36
|
switch (action) {
|
|
37
|
-
case
|
|
37
|
+
case "add":
|
|
38
38
|
if (!target) {
|
|
39
|
-
onStep({
|
|
39
|
+
onStep({
|
|
40
|
+
id: "err",
|
|
41
|
+
label: "Error",
|
|
42
|
+
status: "error",
|
|
43
|
+
detail: "source required: javi-forge plugin add <org/repo>",
|
|
44
|
+
});
|
|
40
45
|
break;
|
|
41
46
|
}
|
|
42
47
|
await runPluginAdd(target, dryRun, onStep);
|
|
43
48
|
break;
|
|
44
|
-
case
|
|
49
|
+
case "remove":
|
|
45
50
|
if (!target) {
|
|
46
|
-
onStep({
|
|
51
|
+
onStep({
|
|
52
|
+
id: "err",
|
|
53
|
+
label: "Error",
|
|
54
|
+
status: "error",
|
|
55
|
+
detail: "name required: javi-forge plugin remove <name>",
|
|
56
|
+
});
|
|
47
57
|
break;
|
|
48
58
|
}
|
|
49
59
|
await runPluginRemove(target, dryRun, onStep);
|
|
50
60
|
break;
|
|
51
|
-
case
|
|
61
|
+
case "list":
|
|
52
62
|
await runPluginList(onStep);
|
|
53
63
|
break;
|
|
54
|
-
case
|
|
64
|
+
case "search":
|
|
55
65
|
await runPluginSearch(target, onStep);
|
|
56
66
|
break;
|
|
57
|
-
case
|
|
67
|
+
case "validate":
|
|
58
68
|
if (!target) {
|
|
59
|
-
onStep({
|
|
69
|
+
onStep({
|
|
70
|
+
id: "err",
|
|
71
|
+
label: "Error",
|
|
72
|
+
status: "error",
|
|
73
|
+
detail: "path required: javi-forge plugin validate <dir>",
|
|
74
|
+
});
|
|
60
75
|
break;
|
|
61
76
|
}
|
|
62
77
|
await runPluginValidate(target, onStep);
|
|
63
78
|
break;
|
|
79
|
+
case "sync":
|
|
80
|
+
await runPluginSync(process.cwd(), dryRun, onStep);
|
|
81
|
+
break;
|
|
82
|
+
case "export":
|
|
83
|
+
if (!target) {
|
|
84
|
+
onStep({
|
|
85
|
+
id: "err",
|
|
86
|
+
label: "Error",
|
|
87
|
+
status: "error",
|
|
88
|
+
detail: "name required: javi-forge plugin export <name>",
|
|
89
|
+
});
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
if (codex) {
|
|
93
|
+
await runPluginExportCodex(target, onStep);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
await runPluginExport(target, onStep);
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case "import":
|
|
100
|
+
if (!target) {
|
|
101
|
+
onStep({
|
|
102
|
+
id: "err",
|
|
103
|
+
label: "Error",
|
|
104
|
+
status: "error",
|
|
105
|
+
detail: "path required: javi-forge plugin import <dir>",
|
|
106
|
+
});
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
await runPluginImport(target, dryRun, onStep);
|
|
110
|
+
break;
|
|
111
|
+
case "export-skills":
|
|
112
|
+
if (target === "global") {
|
|
113
|
+
await runPluginExportGlobalSkillsJson(dryRun, onStep);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
await runPluginExportSkillsJson(target ?? process.cwd(), dryRun, onStep);
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
64
119
|
}
|
|
65
120
|
}
|
|
66
121
|
catch (e) {
|
|
67
|
-
onStep({
|
|
122
|
+
onStep({
|
|
123
|
+
id: "fatal",
|
|
124
|
+
label: "Fatal error",
|
|
125
|
+
status: "error",
|
|
126
|
+
detail: String(e),
|
|
127
|
+
});
|
|
68
128
|
}
|
|
69
129
|
setDone(true);
|
|
70
130
|
};
|
|
@@ -77,19 +137,19 @@ export default function Plugin({ action, target, dryRun }) {
|
|
|
77
137
|
" plugin ",
|
|
78
138
|
action),
|
|
79
139
|
dryRun && React.createElement(Text, { color: theme.warning }, " (dry-run)")),
|
|
80
|
-
steps.map(step => (React.createElement(Box, { key: step.id, marginLeft: 2 }, step.status ===
|
|
140
|
+
steps.map((step) => (React.createElement(Box, { key: step.id, marginLeft: 2 }, step.status === "running" ? (React.createElement(Text, { color: theme.warning },
|
|
81
141
|
React.createElement(Spinner, { type: "dots" }),
|
|
82
|
-
|
|
142
|
+
" ",
|
|
83
143
|
step.label,
|
|
84
|
-
step.detail ? React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
85
|
-
"
|
|
86
|
-
step.detail) : null)) : (React.createElement(Text, { color: STATUS_COLOR[step.status] },
|
|
144
|
+
step.detail ? (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
145
|
+
" ",
|
|
146
|
+
step.detail)) : null)) : (React.createElement(Text, { color: STATUS_COLOR[step.status] },
|
|
87
147
|
STATUS_ICON[step.status],
|
|
88
148
|
" ",
|
|
89
149
|
step.label,
|
|
90
|
-
step.detail ? React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
91
|
-
"
|
|
92
|
-
step.detail) : null))))),
|
|
150
|
+
step.detail ? (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
151
|
+
" ",
|
|
152
|
+
step.detail)) : null))))),
|
|
93
153
|
done && (React.createElement(Box, { marginTop: 1 },
|
|
94
154
|
React.createElement(Text, { color: theme.muted }, "Done.")))));
|
|
95
155
|
}
|
package/dist/ui/Progress.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { InitStep } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { InitStep } from "../types/index.js";
|
|
3
3
|
interface Props {
|
|
4
4
|
steps: InitStep[];
|
|
5
5
|
projectName?: string;
|
|
6
6
|
contextLine?: string;
|
|
7
7
|
onDone?: () => void;
|
|
8
8
|
}
|
|
9
|
-
export default function Progress({ steps, projectName, contextLine, onDone }: Props): React.JSX.Element;
|
|
9
|
+
export default function Progress({ steps, projectName, contextLine, onDone, }: Props): React.JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=Progress.d.ts.map
|
package/dist/ui/Progress.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { theme } from
|
|
1
|
+
import { Box, Text } from "ink";
|
|
2
|
+
import Spinner from "ink-spinner";
|
|
3
|
+
import React, { useEffect, useRef } from "react";
|
|
4
|
+
import { theme } from "./theme.js";
|
|
5
5
|
const STATUS_ICON = {
|
|
6
|
-
pending:
|
|
7
|
-
done:
|
|
8
|
-
error:
|
|
9
|
-
skipped:
|
|
6
|
+
pending: "\u25cb",
|
|
7
|
+
done: "\u2713",
|
|
8
|
+
error: "\u2717",
|
|
9
|
+
skipped: "\u2013",
|
|
10
10
|
};
|
|
11
11
|
const STATUS_COLOR = {
|
|
12
12
|
pending: theme.muted,
|
|
@@ -15,12 +15,13 @@ const STATUS_COLOR = {
|
|
|
15
15
|
error: theme.error,
|
|
16
16
|
skipped: theme.muted,
|
|
17
17
|
};
|
|
18
|
-
export default function Progress({ steps, projectName, contextLine, onDone }) {
|
|
18
|
+
export default function Progress({ steps, projectName, contextLine, onDone, }) {
|
|
19
19
|
const doneRef = useRef(false);
|
|
20
20
|
const total = steps.length;
|
|
21
|
-
const completed = steps.filter(s => s.status ===
|
|
22
|
-
const hasError = steps.some(s => s.status ===
|
|
23
|
-
const allFinished = total > 0 &&
|
|
21
|
+
const completed = steps.filter((s) => s.status === "done" || s.status === "skipped").length;
|
|
22
|
+
const hasError = steps.some((s) => s.status === "error");
|
|
23
|
+
const allFinished = total > 0 &&
|
|
24
|
+
steps.every((s) => s.status === "done" || s.status === "error" || s.status === "skipped");
|
|
24
25
|
useEffect(() => {
|
|
25
26
|
if (allFinished && !hasError && !doneRef.current && onDone) {
|
|
26
27
|
doneRef.current = true;
|
|
@@ -32,27 +33,27 @@ export default function Progress({ steps, projectName, contextLine, onDone }) {
|
|
|
32
33
|
return (React.createElement(Box, { flexDirection: "column" },
|
|
33
34
|
React.createElement(Box, { marginBottom: 1, flexDirection: "column" },
|
|
34
35
|
contextLine && (React.createElement(Text, { color: theme.muted },
|
|
35
|
-
|
|
36
|
+
"Initializing: ",
|
|
36
37
|
React.createElement(Text, { color: theme.primary }, contextLine))),
|
|
37
38
|
total > 0 && (React.createElement(Text, { color: theme.muted },
|
|
38
|
-
|
|
39
|
+
"Progress: ",
|
|
39
40
|
React.createElement(Text, { color: completed === total ? theme.success : theme.warning },
|
|
40
41
|
completed,
|
|
41
42
|
"/",
|
|
42
43
|
total,
|
|
43
44
|
" steps")))),
|
|
44
|
-
React.createElement(Box, { flexDirection: "column" }, steps.map(step => (React.createElement(Box, { key: step.id, marginLeft: 2 }, step.status ===
|
|
45
|
+
React.createElement(Box, { flexDirection: "column" }, steps.map((step) => (React.createElement(Box, { key: step.id, marginLeft: 2 }, step.status === "running" ? (React.createElement(Text, { color: theme.warning },
|
|
45
46
|
React.createElement(Spinner, { type: "dots" }),
|
|
46
|
-
|
|
47
|
+
" ",
|
|
47
48
|
step.label,
|
|
48
|
-
step.detail ? React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
49
|
-
"
|
|
50
|
-
step.detail) : null)) : (React.createElement(Text, { color: STATUS_COLOR[step.status] },
|
|
49
|
+
step.detail ? (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
50
|
+
" ",
|
|
51
|
+
step.detail)) : null)) : (React.createElement(Text, { color: STATUS_COLOR[step.status] },
|
|
51
52
|
STATUS_ICON[step.status],
|
|
52
53
|
" ",
|
|
53
54
|
step.label,
|
|
54
|
-
step.detail ? React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
55
|
-
"
|
|
56
|
-
step.detail) : null))))))));
|
|
55
|
+
step.detail ? (React.createElement(Text, { color: theme.muted, dimColor: true },
|
|
56
|
+
" ",
|
|
57
|
+
step.detail)) : null))))))));
|
|
57
58
|
}
|
|
58
59
|
//# sourceMappingURL=Progress.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SkillsDoctorMode } from "../commands/skills.js";
|
|
3
|
+
interface SkillsProps {
|
|
4
|
+
mode: SkillsDoctorMode;
|
|
5
|
+
budget?: number;
|
|
6
|
+
deep?: boolean;
|
|
7
|
+
skillsDir?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function Skills({ mode, budget, deep, skillsDir }: SkillsProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Skills.d.ts.map
|