@mcptoolshop/loadout-os 1.0.2 → 1.0.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 (2) hide show
  1. package/dist/loadout-os.js +22 -12
  2. package/package.json +1 -1
@@ -76,7 +76,7 @@ import {
76
76
  rmSync,
77
77
  mkdtempSync
78
78
  } from "node:fs";
79
- import { resolve as resolve7, dirname as dirname5, join as join5, relative as relative2 } from "node:path";
79
+ import { resolve as resolve7, dirname as dirname5, join as join5, relative as relative3 } from "node:path";
80
80
  import { tmpdir } from "node:os";
81
81
  import { createInterface } from "node:readline";
82
82
 
@@ -594,7 +594,7 @@ function explainEntry(entryId, layers) {
594
594
 
595
595
  // ../memories/dist/index-gen.js
596
596
  import { readFileSync as readFileSync4 } from "node:fs";
597
- import { dirname as dirname2, resolve as resolve2 } from "node:path";
597
+ import { dirname as dirname2, relative as relative2, resolve as resolve2, sep } from "node:path";
598
598
 
599
599
  // ../memories/dist/analyze.js
600
600
  import { readFileSync as readFileSync3, existsSync as existsSync4, readdirSync, statSync } from "node:fs";
@@ -832,12 +832,13 @@ function generateIndex(analysis, opts = {}) {
832
832
  }
833
833
  continue;
834
834
  }
835
+ const storePath = toStoreRelative(fileDir, fullPath);
835
836
  const content = readFileSync4(fullPath, "utf-8");
836
837
  const { frontmatter } = parseFrontmatter(content);
837
838
  if (frontmatter) {
838
- entries.push(entryFromFrontmatter(frontmatter, ref, content));
839
+ entries.push(entryFromFrontmatter(frontmatter, ref, content, storePath));
839
840
  } else {
840
- entries.push(entryFromContent(ref, content));
841
+ entries.push(entryFromContent(ref, content, storePath));
841
842
  }
842
843
  }
843
844
  const coreTokens = entries.filter((e) => e.priority === "core").reduce((sum, e) => sum + e.tokens_est, 0);
@@ -859,15 +860,18 @@ function generateIndex(analysis, opts = {}) {
859
860
  ...opts.lazyLoad ? { lazyLoad: true } : {}
860
861
  };
861
862
  }
863
+ function toStoreRelative(storeRoot, fullPath) {
864
+ return relative2(storeRoot, fullPath).split(sep).join("/");
865
+ }
862
866
  var MAX_SUMMARY = 120;
863
867
  function truncateSummary(summary) {
864
868
  return summary.slice(0, MAX_SUMMARY);
865
869
  }
866
- function entryFromFrontmatter(fm, ref, content) {
870
+ function entryFromFrontmatter(fm, ref, content, storePath) {
867
871
  const lines = content.split("\n").length;
868
872
  return {
869
873
  id: fm.id,
870
- path: ref.path,
874
+ path: storePath,
871
875
  keywords: fm.keywords,
872
876
  patterns: fm.patterns,
873
877
  priority: fm.priority,
@@ -879,13 +883,13 @@ function entryFromFrontmatter(fm, ref, content) {
879
883
  lines
880
884
  };
881
885
  }
882
- function entryFromContent(ref, content) {
886
+ function entryFromContent(ref, content, storePath) {
883
887
  const id = nameToId(ref.name);
884
888
  const keywords = extractKeywords(ref.name, content);
885
889
  const lines = content.split("\n").length;
886
890
  return {
887
891
  id,
888
- path: ref.path,
892
+ path: storePath,
889
893
  keywords,
890
894
  patterns: [],
891
895
  priority: "domain",
@@ -2168,14 +2172,14 @@ async function runSplit(args) {
2168
2172
  }
2169
2173
  const backupPath = resolve7(dirname5(filePath), "CLAUDE.md.bak");
2170
2174
  copyFileSync(filePath, backupPath);
2171
- info(`Backed up ${relative2(process.cwd(), filePath)} \u2192 CLAUDE.md.bak`);
2175
+ info(`Backed up ${relative3(process.cwd(), filePath)} \u2192 CLAUDE.md.bak`);
2172
2176
  mkdirSync2(absRulesDir, { recursive: true });
2173
2177
  for (const w of writes) mkdirSync2(dirname5(w.dest), { recursive: true });
2174
2178
  for (let i = 0; i < writes.length; i++) {
2175
2179
  try {
2176
2180
  copyFileSync(join5(stagingDir, `file-${i}`), writes[i].dest);
2177
2181
  } catch (copyErr) {
2178
- warn(`Split failed writing ${relative2(process.cwd(), writes[i].dest)}. Original CLAUDE.md backed up to CLAUDE.md.bak.`);
2182
+ warn(`Split failed writing ${relative3(process.cwd(), writes[i].dest)}. Original CLAUDE.md backed up to CLAUDE.md.bak.`);
2179
2183
  warn(`Error: ${copyErr.message}`);
2180
2184
  process.exitCode = 1;
2181
2185
  return;
@@ -2183,7 +2187,7 @@ async function runSplit(args) {
2183
2187
  }
2184
2188
  for (const p of accepted) ok(`${p.suggestedPath}`);
2185
2189
  ok(`${rulesDir}/index.json`);
2186
- ok(`Rewrote ${relative2(process.cwd(), filePath)}`);
2190
+ ok(`Rewrote ${relative3(process.cwd(), filePath)}`);
2187
2191
  } finally {
2188
2192
  try {
2189
2193
  rmSync(stagingDir, { recursive: true, force: true });
@@ -3036,7 +3040,13 @@ import {
3036
3040
  } from "node:fs";
3037
3041
  import { dirname as dirname7, isAbsolute, join as join8, resolve as resolve10 } from "node:path";
3038
3042
  import { homedir as homedir4 } from "node:os";
3039
- var DEFAULT_STORE = "C:/Users/mikey/.claude/projects/F--AI/memory";
3043
+ var DEFAULT_STORE = join8(
3044
+ homedir4(),
3045
+ ".claude",
3046
+ "projects",
3047
+ "F--AI",
3048
+ "memory"
3049
+ );
3040
3050
  function defaultDest() {
3041
3051
  return join8(homedir4(), ".ai-loadout", "index.json");
3042
3052
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcptoolshop/loadout-os",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Unified Knowledge OS CLI — wraps ai-loadout (kernel) + claude-memories + claude-rules and absorbs the operational rituals (doctor, report, refresh) into one loadout-os binary.",
5
5
  "license": "MIT",
6
6
  "author": "mcp-tool-shop",