jumbo-cli 2.7.2 → 2.8.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/assets/skills/jumbo-add-component/SKILL.md +45 -0
- package/assets/skills/jumbo-add-decision/SKILL.md +42 -0
- package/assets/skills/jumbo-add-dependency/SKILL.md +41 -0
- package/assets/skills/jumbo-add-guideline/SKILL.md +47 -0
- package/assets/skills/jumbo-add-invariant/SKILL.md +44 -0
- package/dist/application/context/project/init/AgentSelection.d.ts +1 -1
- package/dist/application/context/project/init/AgentSelection.d.ts.map +1 -1
- package/dist/domain/project/CursorRulesContent.d.ts +32 -0
- package/dist/domain/project/CursorRulesContent.d.ts.map +1 -0
- package/dist/domain/project/CursorRulesContent.js +60 -0
- package/dist/domain/project/CursorRulesContent.js.map +1 -0
- package/dist/infrastructure/context/project/init/AgentFileProtocol.d.ts.map +1 -1
- package/dist/infrastructure/context/project/init/AgentFileProtocol.js +6 -2
- package/dist/infrastructure/context/project/init/AgentFileProtocol.js.map +1 -1
- package/dist/infrastructure/context/project/init/CodexConfigurer.d.ts +34 -0
- package/dist/infrastructure/context/project/init/CodexConfigurer.d.ts.map +1 -0
- package/dist/infrastructure/context/project/init/CodexConfigurer.js +43 -0
- package/dist/infrastructure/context/project/init/CodexConfigurer.js.map +1 -0
- package/dist/infrastructure/context/project/init/CopilotConfigurer.d.ts +14 -4
- package/dist/infrastructure/context/project/init/CopilotConfigurer.d.ts.map +1 -1
- package/dist/infrastructure/context/project/init/CopilotConfigurer.js +97 -4
- package/dist/infrastructure/context/project/init/CopilotConfigurer.js.map +1 -1
- package/dist/infrastructure/context/project/init/CursorConfigurer.d.ts +60 -0
- package/dist/infrastructure/context/project/init/CursorConfigurer.d.ts.map +1 -0
- package/dist/infrastructure/context/project/init/CursorConfigurer.js +236 -0
- package/dist/infrastructure/context/project/init/CursorConfigurer.js.map +1 -0
- package/dist/infrastructure/context/project/init/VibeConfigurer.d.ts +33 -0
- package/dist/infrastructure/context/project/init/VibeConfigurer.d.ts.map +1 -0
- package/dist/infrastructure/context/project/init/VibeConfigurer.js +42 -0
- package/dist/infrastructure/context/project/init/VibeConfigurer.js.map +1 -0
- package/package.json +1 -1
- package/dist/infrastructure/context/project/init/GitHubHooksConfigurer.d.ts +0 -40
- package/dist/infrastructure/context/project/init/GitHubHooksConfigurer.d.ts.map +0 -1
- package/dist/infrastructure/context/project/init/GitHubHooksConfigurer.js +0 -135
- package/dist/infrastructure/context/project/init/GitHubHooksConfigurer.js.map +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Infrastructure: GitHub Hooks Configurer
|
|
4
|
-
*
|
|
5
|
-
* Encapsulates all knowledge about GitHub hooks configuration:
|
|
6
|
-
* - .github/hooks/hooks.json with SessionStart hooks
|
|
7
|
-
*
|
|
8
|
-
* Operations are idempotent and gracefully handle errors.
|
|
9
|
-
*/
|
|
10
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.GitHubHooksConfigurer = void 0;
|
|
15
|
-
const path_1 = __importDefault(require("path"));
|
|
16
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
17
|
-
class GitHubHooksConfigurer {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.agent = {
|
|
20
|
-
id: "github-hooks",
|
|
21
|
-
name: "GitHub Hooks",
|
|
22
|
-
};
|
|
23
|
-
this.skillPlatforms = [".vibe/skills"];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Configure all GitHub hooks requirements for Jumbo
|
|
27
|
-
*
|
|
28
|
-
* @param projectRoot Absolute path to project root directory
|
|
29
|
-
*/
|
|
30
|
-
async configure(projectRoot) {
|
|
31
|
-
await this.ensureGitHubHooks(projectRoot);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Ensure GitHub hooks are configured in .github/hooks/hooks.json
|
|
35
|
-
*/
|
|
36
|
-
async ensureGitHubHooks(projectRoot) {
|
|
37
|
-
try {
|
|
38
|
-
const hooksPath = path_1.default.join(projectRoot, ".github", "hooks", "hooks.json");
|
|
39
|
-
// Ensure .github/hooks directory exists
|
|
40
|
-
await fs_extra_1.default.ensureDir(path_1.default.join(projectRoot, ".github", "hooks"));
|
|
41
|
-
// Define all Jumbo hooks for GitHub
|
|
42
|
-
const jumboHooks = {
|
|
43
|
-
version: 1,
|
|
44
|
-
hooks: {
|
|
45
|
-
sessionStart: [
|
|
46
|
-
{
|
|
47
|
-
type: "command",
|
|
48
|
-
bash: "jumbo session start",
|
|
49
|
-
cwd: ".",
|
|
50
|
-
timeoutSec: 10
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
// Check if file exists
|
|
56
|
-
const exists = await fs_extra_1.default.pathExists(hooksPath);
|
|
57
|
-
if (!exists) {
|
|
58
|
-
// File doesn't exist - create with full content
|
|
59
|
-
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(jumboHooks, null, 2) + "\n", "utf-8");
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
// File exists - merge with existing content
|
|
63
|
-
const existingContent = await fs_extra_1.default.readFile(hooksPath, "utf-8");
|
|
64
|
-
let existingHooks = {};
|
|
65
|
-
if (existingContent.trim()) {
|
|
66
|
-
try {
|
|
67
|
-
existingHooks = JSON.parse(existingContent);
|
|
68
|
-
}
|
|
69
|
-
catch (parseError) {
|
|
70
|
-
// If JSON is malformed, overwrite with our content
|
|
71
|
-
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(jumboHooks, null, 2) + "\n", "utf-8");
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
// Merge hooks - ensure sessionStart hooks are present
|
|
76
|
-
const mergedHooks = this.mergeHooks(existingHooks, jumboHooks);
|
|
77
|
-
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(mergedHooks, null, 2) + "\n", "utf-8");
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
// Graceful degradation - log but don't throw
|
|
81
|
-
console.warn(`Warning: Failed to configure GitHub hooks: ${error instanceof Error ? error.message : String(error)}`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Merge hooks, preserving existing content and adding missing Jumbo hooks
|
|
86
|
-
*/
|
|
87
|
-
mergeHooks(existing, jumbo) {
|
|
88
|
-
const result = { ...existing };
|
|
89
|
-
// Ensure version is set
|
|
90
|
-
if (jumbo.version !== undefined) {
|
|
91
|
-
result.version = jumbo.version;
|
|
92
|
-
}
|
|
93
|
-
// Merge hooks
|
|
94
|
-
if (jumbo.hooks) {
|
|
95
|
-
result.hooks = result.hooks ?? {};
|
|
96
|
-
for (const [hookType, hooks] of Object.entries(jumbo.hooks)) {
|
|
97
|
-
if (hooks && Array.isArray(hooks)) {
|
|
98
|
-
const existingHooks = Array.isArray(result.hooks[hookType]) ? result.hooks[hookType] : [];
|
|
99
|
-
result.hooks[hookType] = this.mergeHookArray(existingHooks, hooks);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Merge hook arrays, deduplicating by command content
|
|
107
|
-
*/
|
|
108
|
-
mergeHookArray(existing, additions) {
|
|
109
|
-
const merged = [...existing];
|
|
110
|
-
const existingCommands = new Set(existing.map(h => JSON.stringify(h)));
|
|
111
|
-
for (const addition of additions) {
|
|
112
|
-
const additionKey = JSON.stringify(addition);
|
|
113
|
-
if (!existingCommands.has(additionKey)) {
|
|
114
|
-
merged.push(addition);
|
|
115
|
-
existingCommands.add(additionKey);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return merged;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Return what changes this configurer will make without executing.
|
|
122
|
-
*/
|
|
123
|
-
async getPlannedFileChanges(projectRoot) {
|
|
124
|
-
const hooksPath = path_1.default.join(projectRoot, ".github", "hooks", "hooks.json");
|
|
125
|
-
return [
|
|
126
|
-
{
|
|
127
|
-
path: ".github/hooks/hooks.json",
|
|
128
|
-
action: (await fs_extra_1.default.pathExists(hooksPath)) ? "modify" : "create",
|
|
129
|
-
description: "Add GitHub hooks configuration",
|
|
130
|
-
},
|
|
131
|
-
];
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.GitHubHooksConfigurer = GitHubHooksConfigurer;
|
|
135
|
-
//# sourceMappingURL=GitHubHooksConfigurer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubHooksConfigurer.js","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/GitHubHooksConfigurer.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;AAEH,gDAAwB;AACxB,wDAA0B;AAI1B,MAAa,qBAAqB;IAAlC;QACW,UAAK,GAAG;YACf,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,cAAc;SACZ,CAAC;QAEF,mBAAc,GAAG,CAAC,cAAc,CAAU,CAAC;IAkItD,CAAC;IAhIC;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,iBAAiB,CAAC,WAAmB;QACjD,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;YAE3E,wCAAwC;YACxC,MAAM,kBAAE,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;YAE/D,oC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