@mcptoolshop/loadout-os 1.0.1 → 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.
- package/CHANGELOG.md +11 -0
- package/dist/loadout-os.js +36 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
9
9
|
> history (workspace wiring, the runtime hook, the adapters), see the
|
|
10
10
|
> [root CHANGELOG](../../CHANGELOG.md).
|
|
11
11
|
|
|
12
|
+
## [1.0.2] - 2026-06-16
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `refresh` no longer prints a stale closing note claiming "this scratch/CLI run … a LIVE
|
|
17
|
+
run … is deferred to a coordinator-supervised step" after it has already written the
|
|
18
|
+
live resolver index. The note is now contrastive and accurate: a default-dest run
|
|
19
|
+
confirms "the change is live now"; a custom `--dest` run states the live index the hook
|
|
20
|
+
reads was **not** modified. Behaviour was always correct — only the message was wrong.
|
|
21
|
+
Adds a `printRefresh` regression test asserting the stale phrasing is gone in both paths.
|
|
22
|
+
|
|
12
23
|
## [1.0.1] - 2026-06-16
|
|
13
24
|
|
|
14
25
|
### Fixed
|
package/dist/loadout-os.js
CHANGED
|
@@ -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
|
|
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:
|
|
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:
|
|
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 ${
|
|
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 ${
|
|
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 ${
|
|
2190
|
+
ok(`Rewrote ${relative3(process.cwd(), filePath)}`);
|
|
2187
2191
|
} finally {
|
|
2188
2192
|
try {
|
|
2189
2193
|
rmSync(stagingDir, { recursive: true, force: true });
|
|
@@ -3036,10 +3040,21 @@ 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 =
|
|
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
|
}
|
|
3053
|
+
function sameResolvedPath(a, b) {
|
|
3054
|
+
const ra = resolve10(a);
|
|
3055
|
+
const rb = resolve10(b);
|
|
3056
|
+
return process.platform === "win32" ? ra.toLowerCase() === rb.toLowerCase() : ra === rb;
|
|
3057
|
+
}
|
|
3043
3058
|
var RefreshError = class extends Error {
|
|
3044
3059
|
code;
|
|
3045
3060
|
exitCode;
|
|
@@ -3207,9 +3222,15 @@ function printRefresh(r) {
|
|
|
3207
3222
|
}
|
|
3208
3223
|
}
|
|
3209
3224
|
log();
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3225
|
+
if (sameResolvedPath(r.dest, defaultDest())) {
|
|
3226
|
+
log(
|
|
3227
|
+
` ${DIM}This refreshed the LIVE global resolver index the UserPromptSubmit hook reads on every prompt \u2014 the change is live now.${RESET}`
|
|
3228
|
+
);
|
|
3229
|
+
} else {
|
|
3230
|
+
log(
|
|
3231
|
+
` ${DIM}Note: --dest is a custom path, not the live resolver index (${defaultDest()}) \u2014 the index the hook reads was NOT modified. Re-run without --dest to refresh the live one.${RESET}`
|
|
3232
|
+
);
|
|
3233
|
+
}
|
|
3213
3234
|
log();
|
|
3214
3235
|
}
|
|
3215
3236
|
function printRefreshAndon(issues) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcptoolshop/loadout-os",
|
|
3
|
-
"version": "1.0.
|
|
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",
|