olympus-ai 4.5.13 → 4.5.14
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/.claude-plugin/plugin.json +1 -1
- package/dist/cli/index.js +63 -27
- package/dist/cli/index.js.map +1 -1
- package/dist/hooks/olympus-hooks.cjs +257 -257
- package/dist/installer/hooks.d.ts +47 -14
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +45 -77
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +8 -7
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +49 -46
- package/dist/installer/index.js.map +1 -1
- package/package.json +1 -1
- package/resources/config/risk-keywords.json +5 -5
- package/resources/rules/common/ascii-diagram-standards.md +115 -115
- package/resources/rules/common/content-validation.md +131 -131
- package/resources/rules/common/error-handling.md +430 -430
- package/resources/rules/common/markdown-formatting.md +170 -170
- package/resources/rules/common/overconfidence-prevention.md +100 -100
- package/resources/rules/common/pathway-behaviors.json +60 -60
- package/resources/rules/common/pathway-behaviors.md +100 -100
- package/resources/rules/common/process-overview.md +157 -157
- package/resources/rules/common/terminal-formatting.md +161 -161
- package/resources/rules/common/terminology.md +189 -189
- package/resources/rules/common/welcome-message.md +118 -118
- package/resources/rules/common/workflow-changes.md +285 -285
- package/resources/rules/construction/bolt-planning.md +153 -153
- package/resources/rules/construction/bolt-review.md +143 -143
- package/resources/rules/construction/build-and-test.md +527 -527
- package/resources/rules/construction/code-generation.md +414 -414
- package/resources/rules/construction/documentation.md +201 -201
- package/resources/rules/construction/functional-design.md +135 -135
- package/resources/rules/construction/infrastructure-design.md +110 -110
- package/resources/rules/construction/nfr-design.md +106 -106
- package/resources/rules/construction/nfr-requirements.md +118 -118
- package/resources/rules/construction/test-generation.md +112 -112
- package/resources/rules/core-workflow.md +196 -196
- package/resources/rules/inception/application-design.md +195 -195
- package/resources/rules/inception/bolt-planning.md +588 -588
- package/resources/rules/inception/reverse-engineering.md +354 -354
- package/resources/rules/inception/units-generation.md +505 -505
- package/resources/rules/inception/user-stories.md +527 -527
- package/resources/rules/inception/workspace-detection.md +82 -82
- package/resources/rules/operations/operations.md +19 -19
- package/resources/skills/brief/templates/ai-dlc-intent-brief-template.md +149 -149
- package/resources/skills/getting-started/SKILL.md +79 -79
- package/resources/templates/construction/bolt-spec-template.md +270 -270
- package/resources/templates/inception/unit-brief-template.md +188 -188
- package/resources/templates/inception/units-template.md +99 -99
|
@@ -25,7 +25,7 @@ export declare function shouldUseNodeHooks(): boolean;
|
|
|
25
25
|
/** Get the Claude config directory path (cross-platform) */
|
|
26
26
|
export declare function getClaudeConfigDir(): string;
|
|
27
27
|
/** Get the hooks directory path */
|
|
28
|
-
export declare function getHooksDir(): string;
|
|
28
|
+
export declare function getHooksDir(baseDir?: string): string;
|
|
29
29
|
/**
|
|
30
30
|
* Get the home directory environment variable for hook commands.
|
|
31
31
|
* Returns the appropriate syntax for the current platform.
|
|
@@ -171,10 +171,28 @@ export declare const HOOKS_SETTINGS_CONFIG_BASH: {
|
|
|
171
171
|
}[];
|
|
172
172
|
};
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
export declare function getBashHooksSettingsConfig(hooksDir?: string): {
|
|
175
|
+
hooks: {
|
|
176
|
+
UserPromptSubmit: {
|
|
177
|
+
hooks: {
|
|
178
|
+
type: "command";
|
|
179
|
+
command: string;
|
|
180
|
+
}[];
|
|
181
|
+
}[];
|
|
182
|
+
SessionStart: {
|
|
183
|
+
hooks: {
|
|
184
|
+
type: "command";
|
|
185
|
+
command: string;
|
|
186
|
+
}[];
|
|
187
|
+
}[];
|
|
188
|
+
Stop: {
|
|
189
|
+
hooks: {
|
|
190
|
+
type: "command";
|
|
191
|
+
command: string;
|
|
192
|
+
}[];
|
|
193
|
+
}[];
|
|
194
|
+
};
|
|
195
|
+
};
|
|
178
196
|
export declare const HOOKS_SETTINGS_CONFIG_NODE: {
|
|
179
197
|
hooks: {
|
|
180
198
|
UserPromptSubmit: {
|
|
@@ -197,10 +215,28 @@ export declare const HOOKS_SETTINGS_CONFIG_NODE: {
|
|
|
197
215
|
}[];
|
|
198
216
|
};
|
|
199
217
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
218
|
+
export declare function getNodeHooksSettingsConfig(hooksDir?: string): {
|
|
219
|
+
hooks: {
|
|
220
|
+
UserPromptSubmit: {
|
|
221
|
+
hooks: {
|
|
222
|
+
type: "command";
|
|
223
|
+
command: string;
|
|
224
|
+
}[];
|
|
225
|
+
}[];
|
|
226
|
+
SessionStart: {
|
|
227
|
+
hooks: {
|
|
228
|
+
type: "command";
|
|
229
|
+
command: string;
|
|
230
|
+
}[];
|
|
231
|
+
}[];
|
|
232
|
+
Stop: {
|
|
233
|
+
hooks: {
|
|
234
|
+
type: "command";
|
|
235
|
+
command: string;
|
|
236
|
+
}[];
|
|
237
|
+
}[];
|
|
238
|
+
};
|
|
239
|
+
};
|
|
204
240
|
export declare const HOOKS_SETTINGS_CONFIG_BUNDLED: {
|
|
205
241
|
hooks: {
|
|
206
242
|
UserPromptSubmit: {
|
|
@@ -256,7 +292,7 @@ export declare function shouldUseBundledHooks(): boolean;
|
|
|
256
292
|
/**
|
|
257
293
|
* Get the bundled hooks settings config
|
|
258
294
|
*/
|
|
259
|
-
export declare function getBundledHooksSettingsConfig(): {
|
|
295
|
+
export declare function getBundledHooksSettingsConfig(hooksDir?: string): {
|
|
260
296
|
hooks: {
|
|
261
297
|
UserPromptSubmit: {
|
|
262
298
|
hooks: {
|
|
@@ -302,10 +338,7 @@ export declare function getBundledHooksSettingsConfig(): {
|
|
|
302
338
|
}[];
|
|
303
339
|
};
|
|
304
340
|
};
|
|
305
|
-
|
|
306
|
-
* Get the appropriate hooks settings config for the current platform
|
|
307
|
-
*/
|
|
308
|
-
export declare function getHooksSettingsConfig(): typeof HOOKS_SETTINGS_CONFIG_BASH;
|
|
341
|
+
export declare function getHooksSettingsConfig(hooksDir?: string): typeof HOOKS_SETTINGS_CONFIG_BASH;
|
|
309
342
|
/**
|
|
310
343
|
* Legacy: Settings.json hooks configuration (Bash)
|
|
311
344
|
* @deprecated Use getHooksSettingsConfig() for cross-platform support
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,kCAAkC;AAClC,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,IAAI,OAAO,CAU5C;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,mCAAmC;AACnC,wBAAgB,WAAW,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,kCAAkC;AAClC,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,IAAI,OAAO,CAU5C;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,mCAAmC;AACnC,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,woJA2F7B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,wcAgB9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,+gDAgD3B,CAAC;AAEF;;;;;;;;;;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B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,0BAA0B,CAK3F;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAMhE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEvD;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAqB,CAAC"}
|
package/dist/installer/hooks.js
CHANGED
|
@@ -41,8 +41,8 @@ export function getClaudeConfigDir() {
|
|
|
41
41
|
return join(homedir(), '.claude');
|
|
42
42
|
}
|
|
43
43
|
/** Get the hooks directory path */
|
|
44
|
-
export function getHooksDir() {
|
|
45
|
-
return join(getClaudeConfigDir(), 'hooks');
|
|
44
|
+
export function getHooksDir(baseDir) {
|
|
45
|
+
return join(baseDir || getClaudeConfigDir(), 'hooks');
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Get the home directory environment variable for hook commands.
|
|
@@ -1391,10 +1391,17 @@ export const HOOKS_SETTINGS_CONFIG_BASH = {
|
|
|
1391
1391
|
]
|
|
1392
1392
|
}
|
|
1393
1393
|
};
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1394
|
+
export function getBashHooksSettingsConfig(hooksDir) {
|
|
1395
|
+
if (!hooksDir)
|
|
1396
|
+
return HOOKS_SETTINGS_CONFIG_BASH;
|
|
1397
|
+
return {
|
|
1398
|
+
hooks: {
|
|
1399
|
+
UserPromptSubmit: [{ hooks: [{ type: "command", command: `bash "${join(hooksDir, 'keyword-detector.sh')}"` }] }],
|
|
1400
|
+
SessionStart: [{ hooks: [{ type: "command", command: `bash "${join(hooksDir, 'session-start.sh')}"` }] }],
|
|
1401
|
+
Stop: [{ hooks: [{ type: "command", command: `bash "${join(hooksDir, 'persistent-mode.sh')}"` }] }]
|
|
1402
|
+
}
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1398
1405
|
export const HOOKS_SETTINGS_CONFIG_NODE = {
|
|
1399
1406
|
hooks: {
|
|
1400
1407
|
UserPromptSubmit: [
|
|
@@ -1437,70 +1444,32 @@ export const HOOKS_SETTINGS_CONFIG_NODE = {
|
|
|
1437
1444
|
]
|
|
1438
1445
|
}
|
|
1439
1446
|
};
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
}]
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
? `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=Stop`
|
|
1467
|
-
: `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=Stop`
|
|
1468
|
-
}]
|
|
1469
|
-
}],
|
|
1470
|
-
PreToolUse: [{
|
|
1471
|
-
hooks: [{
|
|
1472
|
-
type: "command",
|
|
1473
|
-
command: isWindows()
|
|
1474
|
-
? `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=PreToolUse`
|
|
1475
|
-
: `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=PreToolUse`
|
|
1476
|
-
}]
|
|
1477
|
-
}],
|
|
1478
|
-
PostToolUse: [{
|
|
1479
|
-
hooks: [{
|
|
1480
|
-
type: "command",
|
|
1481
|
-
command: isWindows()
|
|
1482
|
-
? `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=PostToolUse`
|
|
1483
|
-
: `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=PostToolUse`
|
|
1484
|
-
}]
|
|
1485
|
-
}],
|
|
1486
|
-
PostToolUseFailure: [{
|
|
1487
|
-
hooks: [{
|
|
1488
|
-
type: "command",
|
|
1489
|
-
command: isWindows()
|
|
1490
|
-
? `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=PostToolUseFailure`
|
|
1491
|
-
: `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=PostToolUseFailure`
|
|
1492
|
-
}]
|
|
1493
|
-
}],
|
|
1494
|
-
Notification: [{
|
|
1495
|
-
hooks: [{
|
|
1496
|
-
type: "command",
|
|
1497
|
-
command: isWindows()
|
|
1498
|
-
? `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=Notification`
|
|
1499
|
-
: `node "${join(getHooksDir(), 'olympus-hooks.cjs')}" --event=Notification`
|
|
1500
|
-
}]
|
|
1501
|
-
}]
|
|
1502
|
-
}
|
|
1503
|
-
};
|
|
1447
|
+
export function getNodeHooksSettingsConfig(hooksDir) {
|
|
1448
|
+
if (!hooksDir)
|
|
1449
|
+
return HOOKS_SETTINGS_CONFIG_NODE;
|
|
1450
|
+
return {
|
|
1451
|
+
hooks: {
|
|
1452
|
+
UserPromptSubmit: [{ hooks: [{ type: "command", command: `node "${join(hooksDir, 'keyword-detector.mjs')}"` }] }],
|
|
1453
|
+
SessionStart: [{ hooks: [{ type: "command", command: `node "${join(hooksDir, 'session-start.mjs')}"` }] }],
|
|
1454
|
+
Stop: [{ hooks: [{ type: "command", command: `node "${join(hooksDir, 'persistent-mode.mjs')}"` }] }]
|
|
1455
|
+
}
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
function buildBundledHooksSettingsConfig(hooksDir) {
|
|
1459
|
+
const dir = hooksDir || getHooksDir();
|
|
1460
|
+
return {
|
|
1461
|
+
hooks: {
|
|
1462
|
+
UserPromptSubmit: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=UserPromptSubmit` }] }],
|
|
1463
|
+
SessionStart: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=SessionStart` }] }],
|
|
1464
|
+
Stop: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=Stop` }] }],
|
|
1465
|
+
PreToolUse: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=PreToolUse` }] }],
|
|
1466
|
+
PostToolUse: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=PostToolUse` }] }],
|
|
1467
|
+
PostToolUseFailure: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=PostToolUseFailure` }] }],
|
|
1468
|
+
Notification: [{ hooks: [{ type: "command", command: `node "${join(dir, 'olympus-hooks.cjs')}" --event=Notification` }] }]
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
export const HOOKS_SETTINGS_CONFIG_BUNDLED = buildBundledHooksSettingsConfig();
|
|
1504
1473
|
/**
|
|
1505
1474
|
* Check if bundled hooks should be used
|
|
1506
1475
|
* Enabled by default - includes all features like learning system
|
|
@@ -1517,17 +1486,16 @@ export function shouldUseBundledHooks() {
|
|
|
1517
1486
|
/**
|
|
1518
1487
|
* Get the bundled hooks settings config
|
|
1519
1488
|
*/
|
|
1520
|
-
export function getBundledHooksSettingsConfig() {
|
|
1489
|
+
export function getBundledHooksSettingsConfig(hooksDir) {
|
|
1490
|
+
if (hooksDir)
|
|
1491
|
+
return buildBundledHooksSettingsConfig(hooksDir);
|
|
1521
1492
|
return HOOKS_SETTINGS_CONFIG_BUNDLED;
|
|
1522
1493
|
}
|
|
1523
|
-
|
|
1524
|
-
* Get the appropriate hooks settings config for the current platform
|
|
1525
|
-
*/
|
|
1526
|
-
export function getHooksSettingsConfig() {
|
|
1494
|
+
export function getHooksSettingsConfig(hooksDir) {
|
|
1527
1495
|
if (shouldUseBundledHooks()) {
|
|
1528
|
-
return getBundledHooksSettingsConfig();
|
|
1496
|
+
return getBundledHooksSettingsConfig(hooksDir);
|
|
1529
1497
|
}
|
|
1530
|
-
return shouldUseNodeHooks() ?
|
|
1498
|
+
return shouldUseNodeHooks() ? getNodeHooksSettingsConfig(hooksDir) : getBashHooksSettingsConfig(hooksDir);
|
|
1531
1499
|
}
|
|
1532
1500
|
/**
|
|
1533
1501
|
* Legacy: Settings.json hooks configuration (Bash)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,kCAAkC;AAClC,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AACtC,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,kBAAkB;IAChC,iCAAiC;IACjC,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,GAAG,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,GAAG,EAAE,CAAC;QAC/C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,kDAAkD;IAClD,OAAO,SAAS,EAAE,CAAC;AACrB,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AACpC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AC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAA2B,iBAAiB,CAAC"}
|
|
@@ -24,7 +24,7 @@ export declare const HOOKS_DIR: string;
|
|
|
24
24
|
export declare const SETTINGS_FILE: string;
|
|
25
25
|
export declare const VERSION_FILE: string;
|
|
26
26
|
/** Current version - MUST match package.json */
|
|
27
|
-
export declare const VERSION = "4.5.
|
|
27
|
+
export declare const VERSION = "4.5.14";
|
|
28
28
|
/** Installation result */
|
|
29
29
|
export interface InstallResult {
|
|
30
30
|
success: boolean;
|
|
@@ -40,6 +40,8 @@ export interface InstallOptions {
|
|
|
40
40
|
verbose?: boolean;
|
|
41
41
|
skipClaudeCheck?: boolean;
|
|
42
42
|
local?: boolean;
|
|
43
|
+
global?: boolean;
|
|
44
|
+
projectDir?: string;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* Check if the current Node.js version meets the minimum requirement
|
|
@@ -57,7 +59,7 @@ export declare function isClaudeInstalled(): boolean;
|
|
|
57
59
|
/**
|
|
58
60
|
* Install the bundled hooks file
|
|
59
61
|
*/
|
|
60
|
-
export declare function installBundledHooks(): boolean;
|
|
62
|
+
export declare function installBundledHooks(targetHooksDir?: string): boolean;
|
|
61
63
|
/**
|
|
62
64
|
* Install Olympus agents, skills, rules, and hooks
|
|
63
65
|
*/
|
|
@@ -65,11 +67,8 @@ export declare function install(options?: InstallOptions): InstallResult;
|
|
|
65
67
|
/**
|
|
66
68
|
* Check if Olympus is already installed
|
|
67
69
|
*/
|
|
68
|
-
export declare function isInstalled(): boolean;
|
|
69
|
-
|
|
70
|
-
* Get installation info
|
|
71
|
-
*/
|
|
72
|
-
export declare function getInstallInfo(): {
|
|
70
|
+
export declare function isInstalled(local?: boolean): boolean;
|
|
71
|
+
export declare function getInstallInfo(local?: boolean): {
|
|
73
72
|
version: string;
|
|
74
73
|
installedAt: string;
|
|
75
74
|
method: string;
|
|
@@ -77,7 +76,9 @@ export declare function getInstallInfo(): {
|
|
|
77
76
|
export interface UninstallOptions {
|
|
78
77
|
verbose?: boolean;
|
|
79
78
|
local?: boolean;
|
|
79
|
+
global?: boolean;
|
|
80
80
|
dryRun?: boolean;
|
|
81
|
+
projectDir?: string;
|
|
81
82
|
}
|
|
82
83
|
export interface UninstallResult {
|
|
83
84
|
success: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiCH,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAC5D,eAAO,MAAM,UAAU,QAAoC,CAAC;AAC5D,eAAO,MAAM,UAAU,QAAoC,CAAC;AAC5D,eAAO,MAAM,SAAS,QAAmC,CAAC;AAC1D,eAAO,MAAM,aAAa,QAA2C,CAAC;AACtE,eAAO,MAAM,YAAY,QAAmD,CAAC;AAE7E,gDAAgD;AAChD,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC,0BAA0B;AAC1B,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,2BAA2B;AAC3B,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiCH,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AG,OAAO,CAMpD;AAED,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgB/G;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAuOzE"}
|
package/dist/installer/index.js
CHANGED
|
@@ -40,7 +40,7 @@ export const HOOKS_DIR = join(CLAUDE_CONFIG_DIR, 'hooks');
|
|
|
40
40
|
export const SETTINGS_FILE = join(CLAUDE_CONFIG_DIR, 'settings.json');
|
|
41
41
|
export const VERSION_FILE = join(CLAUDE_CONFIG_DIR, '.olympus-version.json');
|
|
42
42
|
/** Current version - MUST match package.json */
|
|
43
|
-
export const VERSION = '4.5.
|
|
43
|
+
export const VERSION = '4.5.14';
|
|
44
44
|
/**
|
|
45
45
|
* Read a content file from the resources/ directory.
|
|
46
46
|
*
|
|
@@ -82,9 +82,9 @@ const OLYMPUS_CLAUDE_MD_SENTINEL = '# Olympus Multi-Agent System';
|
|
|
82
82
|
* This ensures rule file references point to .claude/olympus/ instead of ~/.claude/olympus/.
|
|
83
83
|
*/
|
|
84
84
|
function localizeContent(content, isLocal) {
|
|
85
|
-
if (
|
|
85
|
+
if (isLocal)
|
|
86
86
|
return content;
|
|
87
|
-
return content.replaceAll('
|
|
87
|
+
return content.replaceAll('.claude/olympus/', '~/.claude/olympus/');
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Clean up legacy command files that were previously installed to ~/.claude/commands/.
|
|
@@ -392,15 +392,16 @@ function installClaudeMd(baseDir, force, isLocal, log) {
|
|
|
392
392
|
/**
|
|
393
393
|
* Install the bundled hooks file
|
|
394
394
|
*/
|
|
395
|
-
export function installBundledHooks() {
|
|
395
|
+
export function installBundledHooks(targetHooksDir) {
|
|
396
396
|
const bundleSource = join(__dirname, '..', '..', 'dist', 'hooks', 'olympus-hooks.cjs');
|
|
397
|
-
const
|
|
397
|
+
const destDir = targetHooksDir || HOOKS_DIR;
|
|
398
|
+
const bundleDest = join(destDir, 'olympus-hooks.cjs');
|
|
398
399
|
if (!existsSync(bundleSource)) {
|
|
399
400
|
console.warn('Warning: Bundled hooks not found. Run npm run build:hooks first.');
|
|
400
401
|
return false;
|
|
401
402
|
}
|
|
402
|
-
if (!existsSync(
|
|
403
|
-
mkdirSync(
|
|
403
|
+
if (!existsSync(destDir)) {
|
|
404
|
+
mkdirSync(destDir, { recursive: true });
|
|
404
405
|
}
|
|
405
406
|
try {
|
|
406
407
|
const content = readFileSync(bundleSource);
|
|
@@ -433,30 +434,31 @@ export function install(options = {}) {
|
|
|
433
434
|
console.log(msg);
|
|
434
435
|
}
|
|
435
436
|
};
|
|
436
|
-
// Determine installation paths based on --local flag
|
|
437
|
-
const
|
|
437
|
+
// Determine installation paths based on --global/--local flag
|
|
438
|
+
const isLocal = options.global ? false : true;
|
|
439
|
+
const projectRoot = options.projectDir || process.cwd();
|
|
440
|
+
const baseDir = isLocal ? join(projectRoot, '.claude') : CLAUDE_CONFIG_DIR;
|
|
438
441
|
const agentsDir = join(baseDir, 'agents');
|
|
439
442
|
const commandsDir = join(baseDir, 'commands');
|
|
440
443
|
const skillsDir = join(baseDir, 'skills');
|
|
441
|
-
const hooksDir =
|
|
442
|
-
const settingsFile =
|
|
443
|
-
const versionFile =
|
|
444
|
-
if (
|
|
445
|
-
log('Installing
|
|
444
|
+
const hooksDir = isLocal ? join(projectRoot, '.claude', 'hooks') : HOOKS_DIR;
|
|
445
|
+
const settingsFile = isLocal ? join(projectRoot, '.claude', 'settings.json') : SETTINGS_FILE;
|
|
446
|
+
const versionFile = isLocal ? join(baseDir, '.olympus-version.json') : VERSION_FILE;
|
|
447
|
+
if (!isLocal) {
|
|
448
|
+
log('Installing globally to ~/.claude/');
|
|
446
449
|
}
|
|
447
450
|
// Check Node.js version (required for Node.js hooks on Windows)
|
|
448
451
|
const nodeCheck = checkNodeVersion();
|
|
449
452
|
if (!nodeCheck.valid) {
|
|
450
453
|
log(`Warning: Node.js ${nodeCheck.required}+ required, found ${nodeCheck.current}`);
|
|
451
|
-
if (isWindows() &&
|
|
454
|
+
if (isWindows() && isLocal) {
|
|
452
455
|
result.errors.push(`Node.js ${nodeCheck.required}+ is required for Windows support. Found: ${nodeCheck.current}`);
|
|
453
456
|
result.message = `Installation failed: Node.js ${nodeCheck.required}+ required`;
|
|
454
457
|
return result;
|
|
455
458
|
}
|
|
456
459
|
// On Unix, we can still use bash hooks, so just warn
|
|
457
460
|
}
|
|
458
|
-
|
|
459
|
-
if (!options.local) {
|
|
461
|
+
if (!isLocal) {
|
|
460
462
|
log(`Platform: ${process.platform} (${shouldUseNodeHooks() ? 'Node.js hooks' : 'Bash hooks'})`);
|
|
461
463
|
}
|
|
462
464
|
// Check Claude installation (optional)
|
|
@@ -501,10 +503,10 @@ export function install(options = {}) {
|
|
|
501
503
|
}
|
|
502
504
|
// Install agents
|
|
503
505
|
log('Installing agent definitions...');
|
|
504
|
-
result.installedAgents = installAgents(agentsDir, !!options.force,
|
|
506
|
+
result.installedAgents = installAgents(agentsDir, !!options.force, isLocal, log);
|
|
505
507
|
// Install skills (migrated from commands)
|
|
506
508
|
log('Installing skills...');
|
|
507
|
-
result.installedSkills = installSkills(skillsDir, !!options.force,
|
|
509
|
+
result.installedSkills = installSkills(skillsDir, !!options.force, isLocal, log);
|
|
508
510
|
// Clean up legacy mega-rule files BEFORE writing new individual rule files
|
|
509
511
|
const rulesDir = join(baseDir, 'olympus', 'rules');
|
|
510
512
|
mkdirSync(rulesDir, { recursive: true });
|
|
@@ -512,25 +514,25 @@ export function install(options = {}) {
|
|
|
512
514
|
cleanupLegacyRuleFiles(rulesDir, log);
|
|
513
515
|
// Install individual rule files (always overwrite)
|
|
514
516
|
log('Installing AI-DLC rule files...');
|
|
515
|
-
installRules(rulesDir,
|
|
517
|
+
installRules(rulesDir, isLocal, log);
|
|
516
518
|
// Install template files (always overwrite)
|
|
517
519
|
log('Installing AI-DLC template files...');
|
|
518
520
|
const templatesDir = join(baseDir, 'olympus', 'templates');
|
|
519
521
|
mkdirSync(templatesDir, { recursive: true });
|
|
520
|
-
const installedTemplateCount = installTemplates(templatesDir,
|
|
522
|
+
const installedTemplateCount = installTemplates(templatesDir, isLocal, log);
|
|
521
523
|
// Install CLAUDE.md with smart detection
|
|
522
524
|
log('Installing CLAUDE.md...');
|
|
523
|
-
installClaudeMd(baseDir, !!options.force,
|
|
525
|
+
installClaudeMd(baseDir, !!options.force, isLocal, log);
|
|
524
526
|
// Merge AI-DLC core-workflow into the installed CLAUDE.md
|
|
525
527
|
log('Merging AI-DLC core workflow into CLAUDE.md...');
|
|
526
528
|
try {
|
|
527
529
|
const claudeMdPath = join(baseDir, 'CLAUDE.md');
|
|
528
530
|
if (existsSync(claudeMdPath)) {
|
|
529
|
-
const coreWorkflowContent = localizeContent(readContent('rules/core-workflow.md'),
|
|
531
|
+
const coreWorkflowContent = localizeContent(readContent('rules/core-workflow.md'), isLocal);
|
|
530
532
|
const currentContent = readFileSync(claudeMdPath, 'utf-8');
|
|
531
533
|
const merged = mergeAidlcRules(currentContent, coreWorkflowContent);
|
|
532
534
|
writeFileSync(claudeMdPath, merged, 'utf-8');
|
|
533
|
-
const location =
|
|
535
|
+
const location = isLocal ? './.claude/CLAUDE.md' : '~/.claude/CLAUDE.md';
|
|
534
536
|
log(` Merged AI-DLC core workflow into ${location}`);
|
|
535
537
|
}
|
|
536
538
|
}
|
|
@@ -573,12 +575,10 @@ export function install(options = {}) {
|
|
|
573
575
|
const existingContent = existsSync(projectClaudeMdPath)
|
|
574
576
|
? readFileSync(projectClaudeMdPath, 'utf-8')
|
|
575
577
|
: '';
|
|
576
|
-
const workflowRules = localizeContent(getAidlcRulesContent(workflowId, pathwayType),
|
|
577
|
-
// For global installs, core-workflow.md is already in ~/.claude/CLAUDE.md — don't duplicate.
|
|
578
|
-
// For local installs, include it since there's no global CLAUDE.md.
|
|
578
|
+
const workflowRules = localizeContent(getAidlcRulesContent(workflowId, pathwayType), isLocal);
|
|
579
579
|
let rules;
|
|
580
|
-
if (
|
|
581
|
-
const coreWorkflow = localizeContent(readContent('rules/core-workflow.md'),
|
|
580
|
+
if (isLocal) {
|
|
581
|
+
const coreWorkflow = localizeContent(readContent('rules/core-workflow.md'), isLocal);
|
|
582
582
|
rules = `${coreWorkflow}\n\n---\n\n${workflowRules}`;
|
|
583
583
|
}
|
|
584
584
|
else {
|
|
@@ -602,7 +602,7 @@ export function install(options = {}) {
|
|
|
602
602
|
if (shouldUseBundledHooks()) {
|
|
603
603
|
// Install bundled hooks (includes all features like learning system)
|
|
604
604
|
log('Installing bundled hook scripts...');
|
|
605
|
-
const bundleInstalled = installBundledHooks();
|
|
605
|
+
const bundleInstalled = installBundledHooks(hooksDir);
|
|
606
606
|
if (bundleInstalled) {
|
|
607
607
|
log(' Installed olympus-hooks.cjs (bundled)');
|
|
608
608
|
}
|
|
@@ -721,7 +721,7 @@ export function install(options = {}) {
|
|
|
721
721
|
}
|
|
722
722
|
// Merge hooks configuration (platform-aware)
|
|
723
723
|
const existingHooks = (existingSettings.hooks || {});
|
|
724
|
-
const hooksConfig = getHooksSettingsConfig();
|
|
724
|
+
const hooksConfig = getHooksSettingsConfig(hooksDir);
|
|
725
725
|
const newHooks = hooksConfig.hooks;
|
|
726
726
|
// Deep merge: add our hooks, or update if --force is used
|
|
727
727
|
for (const [eventType, eventHooks] of Object.entries(newHooks)) {
|
|
@@ -748,8 +748,7 @@ export function install(options = {}) {
|
|
|
748
748
|
result.hooksConfigured = false;
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
|
|
752
|
-
if (!options.local) {
|
|
751
|
+
if (!isLocal) {
|
|
753
752
|
log('Registering as Claude Code plugin...');
|
|
754
753
|
try {
|
|
755
754
|
// 1. Copy plugin.json to ~/.claude/.claude-plugin/
|
|
@@ -811,7 +810,7 @@ export function install(options = {}) {
|
|
|
811
810
|
const versionMetadata = {
|
|
812
811
|
version: VERSION,
|
|
813
812
|
installedAt: new Date().toISOString(),
|
|
814
|
-
installMethod:
|
|
813
|
+
installMethod: isLocal ? 'npm-local' : 'npm',
|
|
815
814
|
lastCheckAt: new Date().toISOString()
|
|
816
815
|
};
|
|
817
816
|
writeFileSync(versionFile, JSON.stringify(versionMetadata, null, 2));
|
|
@@ -830,18 +829,20 @@ export function install(options = {}) {
|
|
|
830
829
|
/**
|
|
831
830
|
* Check if Olympus is already installed
|
|
832
831
|
*/
|
|
833
|
-
export function isInstalled() {
|
|
832
|
+
export function isInstalled(local) {
|
|
833
|
+
if (local) {
|
|
834
|
+
const localBase = join(process.cwd(), '.claude');
|
|
835
|
+
return existsSync(join(localBase, '.olympus-version.json')) && existsSync(join(localBase, 'agents'));
|
|
836
|
+
}
|
|
834
837
|
return existsSync(VERSION_FILE) && existsSync(AGENTS_DIR);
|
|
835
838
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
export function getInstallInfo() {
|
|
840
|
-
if (!existsSync(VERSION_FILE)) {
|
|
839
|
+
export function getInstallInfo(local) {
|
|
840
|
+
const versionPath = local ? join(process.cwd(), '.claude', '.olympus-version.json') : VERSION_FILE;
|
|
841
|
+
if (!existsSync(versionPath)) {
|
|
841
842
|
return null;
|
|
842
843
|
}
|
|
843
844
|
try {
|
|
844
|
-
const content = readFileSync(
|
|
845
|
+
const content = readFileSync(versionPath, 'utf-8');
|
|
845
846
|
const data = JSON.parse(content);
|
|
846
847
|
return {
|
|
847
848
|
version: data.version,
|
|
@@ -862,7 +863,9 @@ export function uninstall(options = {}) {
|
|
|
862
863
|
};
|
|
863
864
|
const log = (msg) => { if (options.verbose)
|
|
864
865
|
console.log(msg); };
|
|
865
|
-
const
|
|
866
|
+
const isLocal = options.global ? false : true;
|
|
867
|
+
const projectRoot = options.projectDir || process.cwd();
|
|
868
|
+
const baseDir = isLocal ? join(projectRoot, '.claude') : CLAUDE_CONFIG_DIR;
|
|
866
869
|
const removeFile = (filePath, label) => {
|
|
867
870
|
if (options.dryRun) {
|
|
868
871
|
log(`[DRY RUN] Would remove ${label}: ${filePath}`);
|
|
@@ -926,7 +929,7 @@ export function uninstall(options = {}) {
|
|
|
926
929
|
result.errors.push(`Failed to remove olympus directory: ${error instanceof Error ? error.message : String(error)}`);
|
|
927
930
|
}
|
|
928
931
|
try {
|
|
929
|
-
const hooksDir =
|
|
932
|
+
const hooksDir = isLocal ? join(projectRoot, '.claude', 'hooks') : join(CLAUDE_CONFIG_DIR, 'hooks');
|
|
930
933
|
if (existsSync(hooksDir)) {
|
|
931
934
|
const allHookFilenames = new Set([
|
|
932
935
|
...Object.keys(HOOK_SCRIPTS_BASH),
|
|
@@ -945,7 +948,7 @@ export function uninstall(options = {}) {
|
|
|
945
948
|
result.errors.push(`Failed to remove hook scripts: ${error instanceof Error ? error.message : String(error)}`);
|
|
946
949
|
}
|
|
947
950
|
try {
|
|
948
|
-
const settingsPath =
|
|
951
|
+
const settingsPath = isLocal ? join(projectRoot, '.claude', 'settings.json') : join(CLAUDE_CONFIG_DIR, 'settings.json');
|
|
949
952
|
if (existsSync(settingsPath)) {
|
|
950
953
|
const settings = JSON.parse(readFileSync(settingsPath, 'utf-8'));
|
|
951
954
|
const existingHooks = settings.hooks;
|
|
@@ -1038,7 +1041,7 @@ export function uninstall(options = {}) {
|
|
|
1038
1041
|
catch (error) {
|
|
1039
1042
|
result.errors.push(`Failed to remove version file: ${error instanceof Error ? error.message : String(error)}`);
|
|
1040
1043
|
}
|
|
1041
|
-
if (!
|
|
1044
|
+
if (!isLocal) {
|
|
1042
1045
|
try {
|
|
1043
1046
|
const installedPluginsPath = join(CLAUDE_CONFIG_DIR, 'plugins', 'installed_plugins.json');
|
|
1044
1047
|
if (existsSync(installedPluginsPath)) {
|
|
@@ -1066,7 +1069,7 @@ export function uninstall(options = {}) {
|
|
|
1066
1069
|
result.errors.push(`Failed to unregister from installed_plugins.json: ${error instanceof Error ? error.message : String(error)}`);
|
|
1067
1070
|
}
|
|
1068
1071
|
}
|
|
1069
|
-
if (!
|
|
1072
|
+
if (!isLocal) {
|
|
1070
1073
|
try {
|
|
1071
1074
|
const pluginDir = join(CLAUDE_CONFIG_DIR, '.claude-plugin');
|
|
1072
1075
|
if (existsSync(pluginDir)) {
|