jumbo-cli 2.7.2 → 2.9.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 +1 -0
- package/assets/skills/define-jumbo-goals/SKILL.md +2 -0
- 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/assets/skills/jumbo-design-goal/SKILL.md +123 -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/application/context/relations/deactivate/DeactivateRelationCommandHandler.d.ts.map +1 -1
- package/dist/application/context/relations/deactivate/DeactivateRelationCommandHandler.js +5 -0
- package/dist/application/context/relations/deactivate/DeactivateRelationCommandHandler.js.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/dist/infrastructure/host/HostBuilder.d.ts.map +1 -1
- package/dist/infrastructure/host/HostBuilder.js +4 -6
- package/dist/infrastructure/host/HostBuilder.js.map +1 -1
- package/dist/infrastructure/local/LocalDatabaseRebuildService.d.ts +9 -13
- package/dist/infrastructure/local/LocalDatabaseRebuildService.d.ts.map +1 -1
- package/dist/infrastructure/local/LocalDatabaseRebuildService.js +36 -29
- package/dist/infrastructure/local/LocalDatabaseRebuildService.js.map +1 -1
- package/dist/infrastructure/messaging/ProjectionBusFactory.d.ts +25 -0
- package/dist/infrastructure/messaging/ProjectionBusFactory.d.ts.map +1 -0
- package/dist/infrastructure/messaging/ProjectionBusFactory.js +242 -0
- package/dist/infrastructure/messaging/ProjectionBusFactory.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
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.d.ts +0 -43
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.d.ts.map +0 -1
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.js +0 -441
- package/dist/infrastructure/local/TemporarySequentialDatabaseRebuildService.js.map +0 -1
- package/dist/infrastructure/messaging/TemporarySequentialRebuildEventBus.d.ts +0 -37
- package/dist/infrastructure/messaging/TemporarySequentialRebuildEventBus.d.ts.map +0 -1
- package/dist/infrastructure/messaging/TemporarySequentialRebuildEventBus.js +0 -64
- package/dist/infrastructure/messaging/TemporarySequentialRebuildEventBus.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Infrastructure: OpenAI Codex Configurer
|
|
4
|
+
*
|
|
5
|
+
* Encapsulates all knowledge about OpenAI Codex configuration:
|
|
6
|
+
* - Skills distributed to .codex/skills
|
|
7
|
+
*
|
|
8
|
+
* Codex reads AGENTS.md natively, so no instruction file is needed.
|
|
9
|
+
* Codex does not support lifecycle hooks, so configuration is
|
|
10
|
+
* limited to skill distribution.
|
|
11
|
+
*
|
|
12
|
+
* Operations are idempotent and gracefully handle errors.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CodexConfigurer = void 0;
|
|
16
|
+
class CodexConfigurer {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.agent = {
|
|
19
|
+
id: "codex",
|
|
20
|
+
name: "Codex",
|
|
21
|
+
};
|
|
22
|
+
this.skillPlatforms = [".codex/skills"];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Configure all OpenAI Codex requirements for Jumbo.
|
|
26
|
+
* Codex reads AGENTS.md natively and has no hook system,
|
|
27
|
+
* so no additional configuration files are needed.
|
|
28
|
+
*
|
|
29
|
+
* @param projectRoot Absolute path to project root directory
|
|
30
|
+
*/
|
|
31
|
+
async configure(_projectRoot) {
|
|
32
|
+
// Codex reads AGENTS.md natively - no additional files needed.
|
|
33
|
+
// Skills are installed by AgentFileProtocol via skillPlatforms.
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Return what changes this configurer will make without executing.
|
|
37
|
+
*/
|
|
38
|
+
async getPlannedFileChanges(_projectRoot) {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CodexConfigurer = CodexConfigurer;
|
|
43
|
+
//# sourceMappingURL=CodexConfigurer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodexConfigurer.js","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CodexConfigurer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAKH,MAAa,eAAe;IAA5B;QACW,UAAK,GAAG;YACf,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,OAAO;SACL,CAAC;QAEF,mBAAc,GAAG,CAAC,eAAe,CAAU,CAAC;IAoBvD,CAAC;IAlBC;;;;;;OAMG;IACH,KAAK,CAAC,SAAS,CAAC,YAAoB;QAClC,+DAA+D;QAC/D,gEAAgE;IAClE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,qBAAqB,CAAC,YAAoB;QAC9C,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AA1BD,0CA0BC"}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Encapsulates all knowledge about GitHub Copilot configuration:
|
|
5
5
|
* - .github/copilot-instructions.md with thin reference to JUMBO.md
|
|
6
|
-
*
|
|
7
|
-
* Note: Copilot does not support SessionStart hooks, so configuration
|
|
8
|
-
* is limited to static instruction files.
|
|
6
|
+
* - .github/hooks/hooks.json with SessionStart hooks
|
|
9
7
|
*
|
|
10
8
|
* Operations are idempotent and gracefully handle errors.
|
|
11
9
|
*/
|
|
@@ -28,7 +26,19 @@ export declare class CopilotConfigurer implements IConfigurer {
|
|
|
28
26
|
*/
|
|
29
27
|
private ensureCopilotInstructions;
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
29
|
+
* Ensure GitHub hooks are configured in .github/hooks/hooks.json
|
|
30
|
+
*/
|
|
31
|
+
private ensureGitHubHooks;
|
|
32
|
+
/**
|
|
33
|
+
* Merge hooks, preserving existing content and adding missing Jumbo hooks
|
|
34
|
+
*/
|
|
35
|
+
private mergeHooks;
|
|
36
|
+
/**
|
|
37
|
+
* Merge hook arrays, deduplicating by command content
|
|
38
|
+
*/
|
|
39
|
+
private mergeHookArray;
|
|
40
|
+
/**
|
|
41
|
+
* Repair Copilot configuration by replacing stale Jumbo section and ensuring hooks
|
|
32
42
|
*/
|
|
33
43
|
repair(projectRoot: string): Promise<void>;
|
|
34
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotConfigurer.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CopilotConfigurer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CopilotConfigurer.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CopilotConfigurer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mEAAmE,CAAC;AAEtG,qBAAa,iBAAkB,YAAW,WAAW;IACnD,QAAQ,CAAC,KAAK;;;MAGH;IAEX,QAAQ,CAAC,cAAc,8BAA+B;IAEtD;;;;OAIG;IACG,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD;;OAEG;YACW,yBAAyB;IA6CvC;;OAEG;YACW,iBAAiB;IA0D/B;;OAEG;IACH,OAAO,CAAC,UAAU;IAuBlB;;OAEG;IACH,OAAO,CAAC,cAAc;IAetB;;OAEG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhD;;OAEG;YACW,yBAAyB;IA2CvC;;OAEG;IACG,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAqB/E"}
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Encapsulates all knowledge about GitHub Copilot configuration:
|
|
6
6
|
* - .github/copilot-instructions.md with thin reference to JUMBO.md
|
|
7
|
-
*
|
|
8
|
-
* Note: Copilot does not support SessionStart hooks, so configuration
|
|
9
|
-
* is limited to static instruction files.
|
|
7
|
+
* - .github/hooks/hooks.json with SessionStart hooks
|
|
10
8
|
*
|
|
11
9
|
* Operations are idempotent and gracefully handle errors.
|
|
12
10
|
*/
|
|
@@ -33,6 +31,7 @@ class CopilotConfigurer {
|
|
|
33
31
|
*/
|
|
34
32
|
async configure(projectRoot) {
|
|
35
33
|
await this.ensureCopilotInstructions(projectRoot);
|
|
34
|
+
await this.ensureGitHubHooks(projectRoot);
|
|
36
35
|
}
|
|
37
36
|
/**
|
|
38
37
|
* Ensure GitHub Copilot instructions exist in .github/copilot-instructions.md
|
|
@@ -68,10 +67,98 @@ See ../JUMBO.md and follow all instructions. If the file does not exist, then ig
|
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
/**
|
|
71
|
-
*
|
|
70
|
+
* Ensure GitHub hooks are configured in .github/hooks/hooks.json
|
|
71
|
+
*/
|
|
72
|
+
async ensureGitHubHooks(projectRoot) {
|
|
73
|
+
try {
|
|
74
|
+
const hooksPath = path_1.default.join(projectRoot, ".github", "hooks", "hooks.json");
|
|
75
|
+
// Ensure .github/hooks directory exists
|
|
76
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectRoot, ".github", "hooks"));
|
|
77
|
+
// Define all Jumbo hooks for GitHub
|
|
78
|
+
const jumboHooks = {
|
|
79
|
+
version: 1,
|
|
80
|
+
hooks: {
|
|
81
|
+
sessionStart: [
|
|
82
|
+
{
|
|
83
|
+
type: "command",
|
|
84
|
+
bash: "jumbo session start",
|
|
85
|
+
cwd: ".",
|
|
86
|
+
timeoutSec: 10
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
// Check if file exists
|
|
92
|
+
const exists = await fs_extra_1.default.pathExists(hooksPath);
|
|
93
|
+
if (!exists) {
|
|
94
|
+
// File doesn't exist - create with full content
|
|
95
|
+
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(jumboHooks, null, 2) + "\n", "utf-8");
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
// File exists - merge with existing content
|
|
99
|
+
const existingContent = await fs_extra_1.default.readFile(hooksPath, "utf-8");
|
|
100
|
+
let existingHooks = {};
|
|
101
|
+
if (existingContent.trim()) {
|
|
102
|
+
try {
|
|
103
|
+
existingHooks = JSON.parse(existingContent);
|
|
104
|
+
}
|
|
105
|
+
catch (parseError) {
|
|
106
|
+
// If JSON is malformed, overwrite with our content
|
|
107
|
+
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(jumboHooks, null, 2) + "\n", "utf-8");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Merge hooks - ensure sessionStart hooks are present
|
|
112
|
+
const mergedHooks = this.mergeHooks(existingHooks, jumboHooks);
|
|
113
|
+
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(mergedHooks, null, 2) + "\n", "utf-8");
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
// Graceful degradation - log but don't throw
|
|
117
|
+
console.warn(`Warning: Failed to configure GitHub hooks: ${error instanceof Error ? error.message : String(error)}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Merge hooks, preserving existing content and adding missing Jumbo hooks
|
|
122
|
+
*/
|
|
123
|
+
mergeHooks(existing, jumbo) {
|
|
124
|
+
const result = { ...existing };
|
|
125
|
+
// Ensure version is set
|
|
126
|
+
if (jumbo.version !== undefined) {
|
|
127
|
+
result.version = jumbo.version;
|
|
128
|
+
}
|
|
129
|
+
// Merge hooks
|
|
130
|
+
if (jumbo.hooks) {
|
|
131
|
+
result.hooks = result.hooks ?? {};
|
|
132
|
+
for (const [hookType, hooks] of Object.entries(jumbo.hooks)) {
|
|
133
|
+
if (hooks && Array.isArray(hooks)) {
|
|
134
|
+
const existingHooks = Array.isArray(result.hooks[hookType]) ? result.hooks[hookType] : [];
|
|
135
|
+
result.hooks[hookType] = this.mergeHookArray(existingHooks, hooks);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Merge hook arrays, deduplicating by command content
|
|
143
|
+
*/
|
|
144
|
+
mergeHookArray(existing, additions) {
|
|
145
|
+
const merged = [...existing];
|
|
146
|
+
const existingCommands = new Set(existing.map(h => JSON.stringify(h)));
|
|
147
|
+
for (const addition of additions) {
|
|
148
|
+
const additionKey = JSON.stringify(addition);
|
|
149
|
+
if (!existingCommands.has(additionKey)) {
|
|
150
|
+
merged.push(addition);
|
|
151
|
+
existingCommands.add(additionKey);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return merged;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Repair Copilot configuration by replacing stale Jumbo section and ensuring hooks
|
|
72
158
|
*/
|
|
73
159
|
async repair(projectRoot) {
|
|
74
160
|
await this.repairCopilotInstructions(projectRoot);
|
|
161
|
+
await this.ensureGitHubHooks(projectRoot);
|
|
75
162
|
}
|
|
76
163
|
/**
|
|
77
164
|
* Repair copilot-instructions.md by replacing the Jumbo section with current thin reference
|
|
@@ -110,12 +197,18 @@ See ../JUMBO.md and follow all instructions. If the file does not exist, then ig
|
|
|
110
197
|
*/
|
|
111
198
|
async getPlannedFileChanges(projectRoot) {
|
|
112
199
|
const copilotInstructionsPath = path_1.default.join(projectRoot, ".github", "copilot-instructions.md");
|
|
200
|
+
const hooksPath = path_1.default.join(projectRoot, ".github", "hooks", "hooks.json");
|
|
113
201
|
return [
|
|
114
202
|
{
|
|
115
203
|
path: ".github/copilot-instructions.md",
|
|
116
204
|
action: (await fs_extra_1.default.pathExists(copilotInstructionsPath)) ? "modify" : "create",
|
|
117
205
|
description: "Add Jumbo instructions",
|
|
118
206
|
},
|
|
207
|
+
{
|
|
208
|
+
path: ".github/hooks/hooks.json",
|
|
209
|
+
action: (await fs_extra_1.default.pathExists(hooksPath)) ? "modify" : "create",
|
|
210
|
+
description: "Add GitHub hooks configuration",
|
|
211
|
+
},
|
|
119
212
|
];
|
|
120
213
|
}
|
|
121
214
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotConfigurer.js","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CopilotConfigurer.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"CopilotConfigurer.js","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CopilotConfigurer.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;AAEH,gDAAwB;AACxB,wDAA0B;AAC1B,4GAAsG;AAItG,MAAa,iBAAiB;IAA9B;QACW,UAAK,GAAG;YACf,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,SAAS;SACP,CAAC;QAEF,mBAAc,GAAG,CAAC,gBAAgB,CAAU,CAAC;IAmPxD,CAAC;IAjPC;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,MAAM,IAAI,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,yBAAyB,CAAC,WAAmB;QACzD,MAAM,uBAAuB,GAAG,cAAI,CAAC,IAAI,CACvC,WAAW,EACX,SAAS,EACT,yBAAyB,CAC1B,CAAC;QAEF,IAAI,CAAC;YACH,kCAAkC;YAClC,MAAM,kBAAE,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;YAEtD,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,UAAU,CAAC,u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,IAAI,EAAE,0BAA0B;gBAChC,MAAM,EAAE,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;gBAC9D,WAAW,EAAE,gCAAgC;aAC9C;SACF,CAAC;IACJ,CAAC;CACF;AAzPD,8CAyPC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Cursor Configurer
|
|
3
|
+
*
|
|
4
|
+
* Encapsulates all knowledge about Cursor configuration:
|
|
5
|
+
* - .cursor/rules/jumbo.mdc with YAML frontmatter (alwaysApply: true) referencing JUMBO.md
|
|
6
|
+
* - .cursor/hooks.json with Cursor-native sessionStart hook
|
|
7
|
+
*
|
|
8
|
+
* Operations are idempotent and gracefully handle errors.
|
|
9
|
+
*/
|
|
10
|
+
import { IConfigurer } from "./IConfigurer.js";
|
|
11
|
+
import { PlannedFileChange } from "../../../../application/context/project/init/PlannedFileChange.js";
|
|
12
|
+
export declare class CursorConfigurer implements IConfigurer {
|
|
13
|
+
readonly agent: {
|
|
14
|
+
readonly id: "cursor";
|
|
15
|
+
readonly name: "Cursor";
|
|
16
|
+
};
|
|
17
|
+
readonly skillPlatforms: readonly [];
|
|
18
|
+
/**
|
|
19
|
+
* Configure all Cursor requirements for Jumbo
|
|
20
|
+
*
|
|
21
|
+
* @param projectRoot Absolute path to project root directory
|
|
22
|
+
*/
|
|
23
|
+
configure(projectRoot: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Ensure .cursor/rules/jumbo.mdc exists with YAML frontmatter and JUMBO.md reference
|
|
26
|
+
*/
|
|
27
|
+
private ensureCursorRules;
|
|
28
|
+
/**
|
|
29
|
+
* Ensure Cursor hooks are configured in .cursor/hooks.json
|
|
30
|
+
*/
|
|
31
|
+
private ensureCursorHooks;
|
|
32
|
+
/**
|
|
33
|
+
* Merge hooks, preserving existing content and adding missing Jumbo hooks
|
|
34
|
+
*/
|
|
35
|
+
private mergeHooks;
|
|
36
|
+
/**
|
|
37
|
+
* Merge hook arrays, deduplicating by command content
|
|
38
|
+
*/
|
|
39
|
+
private mergeHookArray;
|
|
40
|
+
/**
|
|
41
|
+
* Normalize existing hook entries to Cursor's schema and remove stale
|
|
42
|
+
* Jumbo preCompact hooks when no resume trigger exists in Cursor.
|
|
43
|
+
*/
|
|
44
|
+
private normalizeExistingHooks;
|
|
45
|
+
private normalizeHookEntry;
|
|
46
|
+
private isJumboPauseHook;
|
|
47
|
+
/**
|
|
48
|
+
* Repair Cursor configuration by replacing stale content
|
|
49
|
+
*/
|
|
50
|
+
repair(projectRoot: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Repair .cursor/rules/jumbo.mdc by replacing the Jumbo section with current content
|
|
53
|
+
*/
|
|
54
|
+
private repairCursorRules;
|
|
55
|
+
/**
|
|
56
|
+
* Return what changes this configurer will make without executing.
|
|
57
|
+
*/
|
|
58
|
+
getPlannedFileChanges(projectRoot: string): Promise<PlannedFileChange[]>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=CursorConfigurer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CursorConfigurer.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CursorConfigurer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mEAAmE,CAAC;AAEtG,qBAAa,gBAAiB,YAAW,WAAW;IAClD,QAAQ,CAAC,KAAK;;;MAGH;IAEX,QAAQ,CAAC,cAAc,cAAe;IAEtC;;;;OAIG;IACG,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD;;OAEG;YACW,iBAAiB;IA0B/B;;OAEG;YACW,iBAAiB;IA8C/B;;OAEG;IACH,OAAO,CAAC,UAAU;IAqBlB;;OAEG;IACH,OAAO,CAAC,cAAc;IAetB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IA+B9B,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,gBAAgB;IAIxB;;OAEG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhD;;OAEG;YACW,iBAAiB;IA6B/B;;OAEG;IACG,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAmB/E"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Infrastructure: Cursor Configurer
|
|
4
|
+
*
|
|
5
|
+
* Encapsulates all knowledge about Cursor configuration:
|
|
6
|
+
* - .cursor/rules/jumbo.mdc with YAML frontmatter (alwaysApply: true) referencing JUMBO.md
|
|
7
|
+
* - .cursor/hooks.json with Cursor-native sessionStart hook
|
|
8
|
+
*
|
|
9
|
+
* Operations are idempotent and gracefully handle errors.
|
|
10
|
+
*/
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CursorConfigurer = void 0;
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
18
|
+
const CursorRulesContent_js_1 = require("../../../../domain/project/CursorRulesContent.js");
|
|
19
|
+
class CursorConfigurer {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.agent = {
|
|
22
|
+
id: "cursor",
|
|
23
|
+
name: "Cursor",
|
|
24
|
+
};
|
|
25
|
+
this.skillPlatforms = [];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Configure all Cursor requirements for Jumbo
|
|
29
|
+
*
|
|
30
|
+
* @param projectRoot Absolute path to project root directory
|
|
31
|
+
*/
|
|
32
|
+
async configure(projectRoot) {
|
|
33
|
+
await this.ensureCursorRules(projectRoot);
|
|
34
|
+
await this.ensureCursorHooks(projectRoot);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Ensure .cursor/rules/jumbo.mdc exists with YAML frontmatter and JUMBO.md reference
|
|
38
|
+
*/
|
|
39
|
+
async ensureCursorRules(projectRoot) {
|
|
40
|
+
const rulesPath = path_1.default.join(projectRoot, ".cursor", "rules", "jumbo.mdc");
|
|
41
|
+
try {
|
|
42
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectRoot, ".cursor", "rules"));
|
|
43
|
+
const exists = await fs_extra_1.default.pathExists(rulesPath);
|
|
44
|
+
if (!exists) {
|
|
45
|
+
await fs_extra_1.default.writeFile(rulesPath, CursorRulesContent_js_1.CursorRulesContent.getFullContent(), "utf-8");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const content = await fs_extra_1.default.readFile(rulesPath, "utf-8");
|
|
49
|
+
if (!content.includes(CursorRulesContent_js_1.CursorRulesContent.getSectionMarker())) {
|
|
50
|
+
const updatedContent = content.trimEnd() + "\n\n" + CursorRulesContent_js_1.CursorRulesContent.getFullContent();
|
|
51
|
+
await fs_extra_1.default.writeFile(rulesPath, updatedContent, "utf-8");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.warn(`Warning: Failed to update .cursor/rules/jumbo.mdc: ${error instanceof Error ? error.message : String(error)}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Ensure Cursor hooks are configured in .cursor/hooks.json
|
|
60
|
+
*/
|
|
61
|
+
async ensureCursorHooks(projectRoot) {
|
|
62
|
+
try {
|
|
63
|
+
const hooksPath = path_1.default.join(projectRoot, ".cursor", "hooks.json");
|
|
64
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectRoot, ".cursor"));
|
|
65
|
+
const jumboHooks = {
|
|
66
|
+
version: 1,
|
|
67
|
+
hooks: {
|
|
68
|
+
sessionStart: [
|
|
69
|
+
{
|
|
70
|
+
command: "jumbo session start",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
const exists = await fs_extra_1.default.pathExists(hooksPath);
|
|
76
|
+
if (!exists) {
|
|
77
|
+
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(jumboHooks, null, 2) + "\n", "utf-8");
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const existingContent = await fs_extra_1.default.readFile(hooksPath, "utf-8");
|
|
81
|
+
let existingHooks = {};
|
|
82
|
+
if (existingContent.trim()) {
|
|
83
|
+
try {
|
|
84
|
+
existingHooks = JSON.parse(existingContent);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(jumboHooks, null, 2) + "\n", "utf-8");
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const normalizedExistingHooks = this.normalizeExistingHooks(existingHooks);
|
|
92
|
+
const mergedHooks = this.mergeHooks(normalizedExistingHooks, jumboHooks);
|
|
93
|
+
await fs_extra_1.default.writeFile(hooksPath, JSON.stringify(mergedHooks, null, 2) + "\n", "utf-8");
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
console.warn(`Warning: Failed to configure Cursor hooks: ${error instanceof Error ? error.message : String(error)}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Merge hooks, preserving existing content and adding missing Jumbo hooks
|
|
101
|
+
*/
|
|
102
|
+
mergeHooks(existing, jumbo) {
|
|
103
|
+
const result = { ...existing };
|
|
104
|
+
if (jumbo.version !== undefined) {
|
|
105
|
+
result.version = jumbo.version;
|
|
106
|
+
}
|
|
107
|
+
if (jumbo.hooks) {
|
|
108
|
+
result.hooks = result.hooks ?? {};
|
|
109
|
+
for (const [hookType, hooks] of Object.entries(jumbo.hooks)) {
|
|
110
|
+
if (hooks && Array.isArray(hooks)) {
|
|
111
|
+
const existingHooks = Array.isArray(result.hooks[hookType]) ? result.hooks[hookType] : [];
|
|
112
|
+
result.hooks[hookType] = this.mergeHookArray(existingHooks, hooks);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Merge hook arrays, deduplicating by command content
|
|
120
|
+
*/
|
|
121
|
+
mergeHookArray(existing, additions) {
|
|
122
|
+
const merged = [...existing];
|
|
123
|
+
const existingCommands = new Set(existing.map((h) => JSON.stringify(h)));
|
|
124
|
+
for (const addition of additions) {
|
|
125
|
+
const additionKey = JSON.stringify(addition);
|
|
126
|
+
if (!existingCommands.has(additionKey)) {
|
|
127
|
+
merged.push(addition);
|
|
128
|
+
existingCommands.add(additionKey);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return merged;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Normalize existing hook entries to Cursor's schema and remove stale
|
|
135
|
+
* Jumbo preCompact hooks when no resume trigger exists in Cursor.
|
|
136
|
+
*/
|
|
137
|
+
normalizeExistingHooks(existing) {
|
|
138
|
+
if (!existing || typeof existing !== "object") {
|
|
139
|
+
return {};
|
|
140
|
+
}
|
|
141
|
+
const result = { ...existing };
|
|
142
|
+
const rawHooks = existing.hooks;
|
|
143
|
+
if (!rawHooks || typeof rawHooks !== "object") {
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
const normalizedHooks = {};
|
|
147
|
+
for (const [hookType, hookEntries] of Object.entries(rawHooks)) {
|
|
148
|
+
if (!Array.isArray(hookEntries)) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const normalizedEntries = hookEntries
|
|
152
|
+
.map((entry) => this.normalizeHookEntry(entry))
|
|
153
|
+
.filter((entry) => entry !== null)
|
|
154
|
+
.filter((entry) => !(hookType === "preCompact" && this.isJumboPauseHook(entry)));
|
|
155
|
+
if (normalizedEntries.length > 0) {
|
|
156
|
+
normalizedHooks[hookType] = normalizedEntries;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
result.hooks = normalizedHooks;
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
normalizeHookEntry(entry) {
|
|
163
|
+
if (!entry || typeof entry !== "object") {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
const candidate = entry;
|
|
167
|
+
if (typeof candidate.command === "string" && candidate.command.length > 0) {
|
|
168
|
+
return candidate;
|
|
169
|
+
}
|
|
170
|
+
if (typeof candidate.bash === "string" && candidate.bash.length > 0) {
|
|
171
|
+
const normalized = { command: candidate.bash };
|
|
172
|
+
if (typeof candidate.timeoutSec === "number") {
|
|
173
|
+
normalized.timeout = candidate.timeoutSec;
|
|
174
|
+
}
|
|
175
|
+
return normalized;
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
isJumboPauseHook(entry) {
|
|
180
|
+
return entry.command === "jumbo work pause";
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Repair Cursor configuration by replacing stale content
|
|
184
|
+
*/
|
|
185
|
+
async repair(projectRoot) {
|
|
186
|
+
await this.repairCursorRules(projectRoot);
|
|
187
|
+
await this.ensureCursorHooks(projectRoot);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Repair .cursor/rules/jumbo.mdc by replacing the Jumbo section with current content
|
|
191
|
+
*/
|
|
192
|
+
async repairCursorRules(projectRoot) {
|
|
193
|
+
const rulesPath = path_1.default.join(projectRoot, ".cursor", "rules", "jumbo.mdc");
|
|
194
|
+
try {
|
|
195
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectRoot, ".cursor", "rules"));
|
|
196
|
+
const exists = await fs_extra_1.default.pathExists(rulesPath);
|
|
197
|
+
if (!exists) {
|
|
198
|
+
await fs_extra_1.default.writeFile(rulesPath, CursorRulesContent_js_1.CursorRulesContent.getFullContent(), "utf-8");
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const content = await fs_extra_1.default.readFile(rulesPath, "utf-8");
|
|
202
|
+
const replaced = CursorRulesContent_js_1.CursorRulesContent.replaceSection(content);
|
|
203
|
+
if (replaced !== null) {
|
|
204
|
+
await fs_extra_1.default.writeFile(rulesPath, replaced, "utf-8");
|
|
205
|
+
}
|
|
206
|
+
else if (!content.includes("JUMBO.md")) {
|
|
207
|
+
const updatedContent = content.trimEnd() + "\n\n" + CursorRulesContent_js_1.CursorRulesContent.getFullContent();
|
|
208
|
+
await fs_extra_1.default.writeFile(rulesPath, updatedContent, "utf-8");
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
console.warn(`Warning: Failed to repair .cursor/rules/jumbo.mdc: ${error instanceof Error ? error.message : String(error)}`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Return what changes this configurer will make without executing.
|
|
217
|
+
*/
|
|
218
|
+
async getPlannedFileChanges(projectRoot) {
|
|
219
|
+
const changes = [];
|
|
220
|
+
const rulesPath = path_1.default.join(projectRoot, ".cursor", "rules", "jumbo.mdc");
|
|
221
|
+
changes.push({
|
|
222
|
+
path: ".cursor/rules/jumbo.mdc",
|
|
223
|
+
action: (await fs_extra_1.default.pathExists(rulesPath)) ? "modify" : "create",
|
|
224
|
+
description: "Add Jumbo instructions with alwaysApply frontmatter",
|
|
225
|
+
});
|
|
226
|
+
const hooksPath = path_1.default.join(projectRoot, ".cursor", "hooks.json");
|
|
227
|
+
changes.push({
|
|
228
|
+
path: ".cursor/hooks.json",
|
|
229
|
+
action: (await fs_extra_1.default.pathExists(hooksPath)) ? "modify" : "create",
|
|
230
|
+
description: "Add Cursor-compatible sessionStart hook",
|
|
231
|
+
});
|
|
232
|
+
return changes;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
exports.CursorConfigurer = CursorConfigurer;
|
|
236
|
+
//# sourceMappingURL=CursorConfigurer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CursorConfigurer.js","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/CursorConfigurer.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;AAEH,gDAAwB;AACxB,wDAA0B;AAC1B,4FAAsF;AAItF,MAAa,gBAAgB;IAA7B;QACW,UAAK,GAAG;YACf,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;SACN,CAAC;QAEF,mBAAc,GAAG,EAAW,CAAC;IA+PxC,CAAC;IA7PC;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,iBAAiB,CAAC,WAAmB;QACjD,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAE1E,IAAI,CAAC;YACH,MAAM,kBAAE,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;YAE/D,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAE9C,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,kBAAE,CAAC,SAAS,CAAC,SAAS,EAAE,0CAAkB,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;gBAC5E,OAAO;YACT,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,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AAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;YAC9D,WAAW,EAAE,qDAAqD;SACnE,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;YAC9D,WAAW,EAAE,yCAAyC;SACvD,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AArQD,4CAqQC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Mistral Vibe Configurer
|
|
3
|
+
*
|
|
4
|
+
* Encapsulates all knowledge about Mistral Vibe configuration:
|
|
5
|
+
* - Skills distributed to .vibe/skills
|
|
6
|
+
*
|
|
7
|
+
* Vibe reads AGENTS.md natively and does not support lifecycle hooks,
|
|
8
|
+
* so configuration is limited to skill distribution.
|
|
9
|
+
*
|
|
10
|
+
* Operations are idempotent and gracefully handle errors.
|
|
11
|
+
*/
|
|
12
|
+
import { IConfigurer } from "./IConfigurer.js";
|
|
13
|
+
import { PlannedFileChange } from "../../../../application/context/project/init/PlannedFileChange.js";
|
|
14
|
+
export declare class VibeConfigurer implements IConfigurer {
|
|
15
|
+
readonly agent: {
|
|
16
|
+
readonly id: "vibe";
|
|
17
|
+
readonly name: "Vibe";
|
|
18
|
+
};
|
|
19
|
+
readonly skillPlatforms: readonly [".vibe/skills"];
|
|
20
|
+
/**
|
|
21
|
+
* Configure all Mistral Vibe requirements for Jumbo.
|
|
22
|
+
* Vibe reads AGENTS.md natively and has no hook system,
|
|
23
|
+
* so no additional configuration files are needed.
|
|
24
|
+
*
|
|
25
|
+
* @param projectRoot Absolute path to project root directory
|
|
26
|
+
*/
|
|
27
|
+
configure(_projectRoot: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Return what changes this configurer will make without executing.
|
|
30
|
+
*/
|
|
31
|
+
getPlannedFileChanges(_projectRoot: string): Promise<PlannedFileChange[]>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=VibeConfigurer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VibeConfigurer.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/VibeConfigurer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mEAAmE,CAAC;AAEtG,qBAAa,cAAe,YAAW,WAAW;IAChD,QAAQ,CAAC,KAAK;;;MAGH;IAEX,QAAQ,CAAC,cAAc,4BAA6B;IAEpD;;;;;;OAMG;IACG,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD;;OAEG;IACG,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAGhF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Infrastructure: Mistral Vibe Configurer
|
|
4
|
+
*
|
|
5
|
+
* Encapsulates all knowledge about Mistral Vibe configuration:
|
|
6
|
+
* - Skills distributed to .vibe/skills
|
|
7
|
+
*
|
|
8
|
+
* Vibe reads AGENTS.md natively and does not support lifecycle hooks,
|
|
9
|
+
* so configuration is limited to skill distribution.
|
|
10
|
+
*
|
|
11
|
+
* Operations are idempotent and gracefully handle errors.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.VibeConfigurer = void 0;
|
|
15
|
+
class VibeConfigurer {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.agent = {
|
|
18
|
+
id: "vibe",
|
|
19
|
+
name: "Vibe",
|
|
20
|
+
};
|
|
21
|
+
this.skillPlatforms = [".vibe/skills"];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Configure all Mistral Vibe requirements for Jumbo.
|
|
25
|
+
* Vibe reads AGENTS.md natively and has no hook system,
|
|
26
|
+
* so no additional configuration files are needed.
|
|
27
|
+
*
|
|
28
|
+
* @param projectRoot Absolute path to project root directory
|
|
29
|
+
*/
|
|
30
|
+
async configure(_projectRoot) {
|
|
31
|
+
// Vibe reads AGENTS.md natively - no additional files needed.
|
|
32
|
+
// Skills are installed by AgentFileProtocol via skillPlatforms.
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Return what changes this configurer will make without executing.
|
|
36
|
+
*/
|
|
37
|
+
async getPlannedFileChanges(_projectRoot) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.VibeConfigurer = VibeConfigurer;
|
|
42
|
+
//# sourceMappingURL=VibeConfigurer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VibeConfigurer.js","sourceRoot":"","sources":["../../../../../src/infrastructure/context/project/init/VibeConfigurer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAKH,MAAa,cAAc;IAA3B;QACW,UAAK,GAAG;YACf,EAAE,EAAE,MAAM;YACV,IAAI,EAAE,MAAM;SACJ,CAAC;QAEF,mBAAc,GAAG,CAAC,cAAc,CAAU,CAAC;IAoBtD,CAAC;IAlBC;;;;;;OAMG;IACH,KAAK,CAAC,SAAS,CAAC,YAAoB;QAClC,8DAA8D;QAC9D,gEAAgE;IAClE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,qBAAqB,CAAC,YAAoB;QAC9C,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AA1BD,wCA0BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostBuilder.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/host/HostBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AASxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"HostBuilder.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/host/HostBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AASxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAshBnF,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAoB;IACvC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAE1B;gBAGZ,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,uBAAuB,CAAC,EAAE,CAAC,eAAe,EAAE,gBAAgB,KAAK,IAAI;IAOvE;;;;;;;OAOG;IACG,KAAK,IAAI,OAAO,CAAC,qBAAqB,CAAC;CA8mD9C"}
|