maxsimcli 4.2.2 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/assets/CHANGELOG.md +7 -0
  3. package/dist/backend-server.cjs.map +1 -1
  4. package/dist/cli.cjs.map +1 -1
  5. package/dist/core/index.d.ts +1 -1
  6. package/dist/core/index.d.ts.map +1 -1
  7. package/dist/core/index.js.map +1 -1
  8. package/dist/core/types.d.ts +0 -9
  9. package/dist/core/types.d.ts.map +1 -1
  10. package/dist/install/adapters.js +2 -2
  11. package/dist/install/adapters.js.map +1 -1
  12. package/dist/install/copy.js +2 -2
  13. package/dist/install/copy.js.map +1 -1
  14. package/dist/install/hooks.js +6 -6
  15. package/dist/install/hooks.js.map +1 -1
  16. package/dist/install/index.js +5 -6
  17. package/dist/install/index.js.map +1 -1
  18. package/dist/install/shared.d.ts +6 -6
  19. package/dist/install/shared.d.ts.map +1 -1
  20. package/dist/install/shared.js +17 -8
  21. package/dist/install/shared.js.map +1 -1
  22. package/dist/install/uninstall.js +3 -3
  23. package/dist/install/uninstall.js.map +1 -1
  24. package/dist/{adapters/base.d.ts → install/utils.d.ts} +3 -10
  25. package/dist/install/utils.d.ts.map +1 -0
  26. package/dist/{adapters/base.js → install/utils.js} +3 -20
  27. package/dist/install/utils.js.map +1 -0
  28. package/dist/install.cjs +16 -65
  29. package/dist/install.cjs.map +1 -1
  30. package/dist/mcp-server.cjs.map +1 -1
  31. package/dist/skills-MYlMkYNt.cjs.map +1 -1
  32. package/package.json +1 -1
  33. package/dist/adapters/base.d.ts.map +0 -1
  34. package/dist/adapters/base.js.map +0 -1
  35. package/dist/adapters/claude.d.ts +0 -21
  36. package/dist/adapters/claude.d.ts.map +0 -1
  37. package/dist/adapters/claude.js +0 -104
  38. package/dist/adapters/claude.js.map +0 -1
  39. package/dist/adapters/index.d.ts +0 -9
  40. package/dist/adapters/index.d.ts.map +0 -1
  41. package/dist/adapters/index.js +0 -20
  42. package/dist/adapters/index.js.map +0 -1
  43. package/dist/adapters/types.d.ts +0 -10
  44. package/dist/adapters/types.d.ts.map +0 -1
  45. package/dist/adapters/types.js +0 -6
  46. package/dist/adapters/types.js.map +0 -1
@@ -1,18 +1,11 @@
1
1
  /**
2
- * @maxsim/adaptersShared base utilities extracted from bin/install.js
2
+ * Install utilities shared helper functions for the install pipeline.
3
+ * (Inlined from the former adapters/base.ts after multi-runtime removal.)
3
4
  */
4
5
  /**
5
6
  * Expand ~ to home directory (shell doesn't expand in env vars passed to node)
6
7
  */
7
8
  export declare function expandTilde(filePath: string): string;
8
- /**
9
- * Extract YAML frontmatter and body from markdown content.
10
- * Returns null frontmatter if content doesn't start with ---.
11
- */
12
- export declare function extractFrontmatterAndBody(content: string): {
13
- frontmatter: string | null;
14
- body: string;
15
- };
16
9
  /**
17
10
  * Process Co-Authored-By lines based on attribution setting.
18
11
  * @param content - File content to process
@@ -31,4 +24,4 @@ export declare function readSettings(settingsPath: string): Record<string, unkno
31
24
  * Write settings.json with proper formatting.
32
25
  */
33
26
  export declare function writeSettings(settingsPath: string, settings: Record<string, unknown>): void;
34
- //# sourceMappingURL=base.d.ts.map
27
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/install/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,GACrC,MAAM,CAYR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,YAAY,EAAE,MAAM,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI,CAEN"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
- * @maxsim/adaptersShared base utilities extracted from bin/install.js
3
+ * Install utilities shared helper functions for the install pipeline.
4
+ * (Inlined from the former adapters/base.ts after multi-runtime removal.)
4
5
  */
5
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
7
  if (k2 === undefined) k2 = k;
@@ -37,7 +38,6 @@ var __importStar = (this && this.__importStar) || (function () {
37
38
  })();
38
39
  Object.defineProperty(exports, "__esModule", { value: true });
39
40
  exports.expandTilde = expandTilde;
40
- exports.extractFrontmatterAndBody = extractFrontmatterAndBody;
41
41
  exports.processAttribution = processAttribution;
42
42
  exports.buildHookCommand = buildHookCommand;
43
43
  exports.readSettings = readSettings;
@@ -54,23 +54,6 @@ function expandTilde(filePath) {
54
54
  }
55
55
  return filePath;
56
56
  }
57
- /**
58
- * Extract YAML frontmatter and body from markdown content.
59
- * Returns null frontmatter if content doesn't start with ---.
60
- */
61
- function extractFrontmatterAndBody(content) {
62
- if (!content.startsWith('---')) {
63
- return { frontmatter: null, body: content };
64
- }
65
- const endIndex = content.indexOf('---', 3);
66
- if (endIndex === -1) {
67
- return { frontmatter: null, body: content };
68
- }
69
- return {
70
- frontmatter: content.substring(3, endIndex).trim(),
71
- body: content.substring(endIndex + 3),
72
- };
73
- }
74
57
  /**
75
58
  * Process Co-Authored-By lines based on attribution setting.
76
59
  * @param content - File content to process
@@ -113,4 +96,4 @@ function readSettings(settingsPath) {
113
96
  function writeSettings(settingsPath, settings) {
114
97
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
115
98
  }
116
- //# sourceMappingURL=base.js.map
99
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/install/utils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASH,kCAKC;AAOD,gDAeC;AAKD,4CAGC;AAKD,oCAWC;AAKD,sCAKC;AApED,gDAAkC;AAClC,4CAA8B;AAC9B,4CAA8B;AAE9B;;GAEG;AACH,SAAgB,WAAW,CAAC,QAAgB;IAC1C,IAAI,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAsC;IAEtC,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,OAAO,CAAC,iCAAiC,EAAE,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3D,OAAO,OAAO,CAAC,OAAO,CACpB,uBAAuB,EACvB,mBAAmB,eAAe,EAAE,CACrC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,SAAiB,EAAE,QAAgB;IAClE,MAAM,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC;IACvE,OAAO,SAAS,SAAS,GAAG,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY,CAC1B,YAAoB;IAEpB,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;QAC3D,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAC3B,YAAoB,EACpB,QAAiC;IAEjC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAC3E,CAAC"}
package/dist/install.cjs CHANGED
@@ -7507,10 +7507,11 @@ var require_minimist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7507
7507
  }));
7508
7508
 
7509
7509
  //#endregion
7510
- //#region src/adapters/base.ts
7510
+ //#region src/install/utils.ts
7511
7511
  var import_minimist = /* @__PURE__ */ __toESM(require_minimist());
7512
7512
  /**
7513
- * @maxsim/adaptersShared base utilities extracted from bin/install.js
7513
+ * Install utilities shared helper functions for the install pipeline.
7514
+ * (Inlined from the former adapters/base.ts after multi-runtime removal.)
7514
7515
  */
7515
7516
  /**
7516
7517
  * Expand ~ to home directory (shell doesn't expand in env vars passed to node)
@@ -7554,58 +7555,6 @@ function writeSettings(settingsPath, settings) {
7554
7555
  node_fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
7555
7556
  }
7556
7557
 
7557
- //#endregion
7558
- //#region src/adapters/claude.ts
7559
- /**
7560
- * @maxsim/adapters — Claude Code adapter
7561
- *
7562
- * Ports the Claude-specific logic from bin/install.js:
7563
- * - getGlobalDir('claude', ...) (lines 135-142)
7564
- * - getDirName('claude') (line 49)
7565
- * - getConfigDirFromHome('claude', isGlobal) (lines 58-72)
7566
- * - copyWithPathReplacement for Claude (lines 839-892)
7567
- */
7568
- /**
7569
- * Get the global config directory for Claude Code.
7570
- * Priority: explicitDir > CLAUDE_CONFIG_DIR env > ~/.claude
7571
- */
7572
- function getGlobalDir$1(explicitDir) {
7573
- if (explicitDir) return expandTilde(explicitDir);
7574
- if (process.env.CLAUDE_CONFIG_DIR) return expandTilde(process.env.CLAUDE_CONFIG_DIR);
7575
- return node_path.join(node_os.homedir(), ".claude");
7576
- }
7577
- /**
7578
- * Get the config directory path relative to home for hook templating.
7579
- * Used for path.join(homeDir, '<configDir>', ...) replacement in hooks.
7580
- */
7581
- function getConfigDirFromHome$1(isGlobal) {
7582
- return "'.claude'";
7583
- }
7584
- /**
7585
- * Transform markdown content for Claude Code installation.
7586
- * For Claude, this is path replacement only — no frontmatter conversion needed.
7587
- * Replaces ~/.claude/ and ./.claude/ references with the actual install path prefix.
7588
- */
7589
- function transformContent(content, pathPrefix) {
7590
- const globalClaudeRegex = /~\/\.claude\//g;
7591
- const localClaudeRegex = /\.\/\.claude\//g;
7592
- let result = content.replace(globalClaudeRegex, pathPrefix);
7593
- result = result.replace(localClaudeRegex, `./.claude/`);
7594
- return result;
7595
- }
7596
- /**
7597
- * Claude Code adapter configuration.
7598
- * Claude uses nested command structure (commands/maxsim/*.md).
7599
- */
7600
- const claudeAdapter = {
7601
- runtime: "claude",
7602
- dirName: ".claude",
7603
- getGlobalDir: getGlobalDir$1,
7604
- getConfigDirFromHome: getConfigDirFromHome$1,
7605
- transformContent,
7606
- commandStructure: "nested"
7607
- };
7608
-
7609
7558
  //#endregion
7610
7559
  //#region src/install/shared.ts
7611
7560
  const pkg = JSON.parse(node_fs.readFileSync(node_path.resolve(__dirname, "..", "package.json"), "utf-8"));
@@ -7622,22 +7571,26 @@ const builtInSkills = [
7622
7571
  "roadmap-writing"
7623
7572
  ];
7624
7573
  /**
7625
- * Get the global config directory, using the Claude adapter
7574
+ * Get the global config directory for Claude Code.
7575
+ * Priority: explicitDir > CLAUDE_CONFIG_DIR env > ~/.claude
7626
7576
  */
7627
7577
  function getGlobalDir(explicitDir = null) {
7628
- return claudeAdapter.getGlobalDir(explicitDir);
7578
+ if (explicitDir) return expandTilde(explicitDir);
7579
+ if (process.env.CLAUDE_CONFIG_DIR) return expandTilde(process.env.CLAUDE_CONFIG_DIR);
7580
+ return node_path.join(node_os.homedir(), ".claude");
7629
7581
  }
7630
7582
  /**
7631
- * Get the config directory path relative to home for hook templating
7583
+ * Get the config directory path relative to home for hook templating.
7584
+ * Used for path.join(homeDir, '<configDir>', ...) replacement in hooks.
7632
7585
  */
7633
- function getConfigDirFromHome(isGlobal) {
7634
- return claudeAdapter.getConfigDirFromHome(isGlobal);
7586
+ function getConfigDirFromHome(_isGlobal) {
7587
+ return "'.claude'";
7635
7588
  }
7636
7589
  /**
7637
7590
  * Get the local directory name
7638
7591
  */
7639
7592
  function getDirName() {
7640
- return claudeAdapter.dirName;
7593
+ return ".claude";
7641
7594
  }
7642
7595
  /**
7643
7596
  * Recursively remove a directory, handling Windows read-only file attributes.
@@ -7697,7 +7650,7 @@ function verifyFileInstalled(filePath, description) {
7697
7650
  * Returns an object with `complete` (boolean) and `missing` (list of
7698
7651
  * component names that are absent or incomplete).
7699
7652
  */
7700
- function verifyInstallComplete(configDir, _runtime, manifest = null) {
7653
+ function verifyInstallComplete(configDir, manifest = null) {
7701
7654
  const missing = [];
7702
7655
  if (manifest && manifest.files) {
7703
7656
  for (const relPath of Object.keys(manifest.files)) if (!node_fs.existsSync(node_path.join(configDir, relPath))) missing.push(relPath);
@@ -8410,7 +8363,6 @@ if (hasHelp) {
8410
8363
  process.exit(0);
8411
8364
  }
8412
8365
  async function install(isGlobal) {
8413
- const runtime = "claude";
8414
8366
  const dirName = getDirName();
8415
8367
  const src = templatesRoot;
8416
8368
  const targetDir = isGlobal ? getGlobalDir(explicitConfigDir) : node_path.join(process.cwd(), dirName);
@@ -8421,7 +8373,7 @@ async function install(isGlobal) {
8421
8373
  const existingManifest = readManifest(targetDir);
8422
8374
  const isAlreadyCurrent = existingManifest !== null && existingManifest.version === pkg.version;
8423
8375
  if (existingManifest !== null) {
8424
- const { complete, missing } = verifyInstallComplete(targetDir, runtime, existingManifest);
8376
+ const { complete, missing } = verifyInstallComplete(targetDir, existingManifest);
8425
8377
  if (!complete) console.log(` ${chalk.yellow("!")} Previous install (v${existingManifest.version}) is incomplete — ${missing.length} missing file(s). Re-installing.`);
8426
8378
  else if (isAlreadyCurrent) console.log(` ${chalk.dim(`Version ${pkg.version} already installed — upgrading in place`)}`);
8427
8379
  }
@@ -8644,8 +8596,7 @@ async function install(isGlobal) {
8644
8596
  return {
8645
8597
  settingsPath,
8646
8598
  settings,
8647
- statuslineCommand,
8648
- runtime
8599
+ statuslineCommand
8649
8600
  };
8650
8601
  }
8651
8602
  /**