skillwiki 0.10.53 → 0.10.55
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/dist/{chunk-TZXWZ75D.js → chunk-EHUFPORA.js} +1 -0
- package/dist/{chunk-NPHWECWR.js → chunk-Q23OSECM.js} +6 -2
- package/dist/cli.js +55 -16
- package/dist/{managed-write-preflight-SERVDSY6.js → managed-write-preflight-CMVCRXRG.js} +1 -1
- package/dist/skillwiki-mcp.js +2 -2
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/.codex-plugin/plugin.json +1 -1
- package/skills/package.json +1 -1
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
snapshotterAliasForLocalHost,
|
|
36
36
|
toUndirectedWeighted,
|
|
37
37
|
writeDotenv
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-EHUFPORA.js";
|
|
39
39
|
import {
|
|
40
40
|
atomicWriteText,
|
|
41
41
|
prepareTypedPage
|
|
@@ -325,10 +325,14 @@ async function runLogAppend(input) {
|
|
|
325
325
|
}
|
|
326
326
|
if (outcome.result.ok && outcome.result.data.appended && input.recordLastOp !== false) {
|
|
327
327
|
try {
|
|
328
|
+
const files = ["log.md"];
|
|
329
|
+
if (eventPath) {
|
|
330
|
+
files.push(eventPath);
|
|
331
|
+
}
|
|
328
332
|
appendLastOp(input.vault, {
|
|
329
333
|
operation: "log-append",
|
|
330
334
|
summary: `appended log entry (${outcome.result.data.entries_before}->${outcome.result.data.entries_after})`,
|
|
331
|
-
files
|
|
335
|
+
files,
|
|
332
336
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
333
337
|
});
|
|
334
338
|
} catch (error) {
|
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
snapshotterHealthChecks,
|
|
51
51
|
upsertIndexEntry,
|
|
52
52
|
vectorIndexStatus
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-Q23OSECM.js";
|
|
54
54
|
import {
|
|
55
55
|
normalizeDistTag,
|
|
56
56
|
readCache,
|
|
@@ -68,6 +68,7 @@ import {
|
|
|
68
68
|
FLEET_REL_PATH,
|
|
69
69
|
REDACTED_MALFORMED_REFERENCE,
|
|
70
70
|
VAULT_COMMIT_PATHSPEC,
|
|
71
|
+
VAULT_GENERATED_COMMIT_PATHS,
|
|
71
72
|
acquireOwnedSyncLock,
|
|
72
73
|
appendLastOp,
|
|
73
74
|
applyRawStructuralMove,
|
|
@@ -146,7 +147,7 @@ import {
|
|
|
146
147
|
supersedeStaleReviewRequiredJournals,
|
|
147
148
|
taxonomyCommentForPage,
|
|
148
149
|
writeDotenv
|
|
149
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-EHUFPORA.js";
|
|
150
151
|
import {
|
|
151
152
|
assertTargetInsideVault,
|
|
152
153
|
atomicWriteText,
|
|
@@ -3657,6 +3658,7 @@ async function runArchive(input) {
|
|
|
3657
3658
|
});
|
|
3658
3659
|
if (!moved.ok) return { exitCode: ExitCode.WRITE_FAILED, result: moved };
|
|
3659
3660
|
}
|
|
3661
|
+
const rewrittenCascadePages = [];
|
|
3660
3662
|
if ((input.cascade || isRaw) && input.apply && cascade) {
|
|
3661
3663
|
for (const ref of cascade.source_array_refs) {
|
|
3662
3664
|
const absPath = join19(input.vault, ref.page);
|
|
@@ -3680,6 +3682,7 @@ ${fmRewritten}
|
|
|
3680
3682
|
}
|
|
3681
3683
|
const write = await safeWritePage(absPath, updated);
|
|
3682
3684
|
if (!write.ok) return { exitCode: ExitCode.WRITE_FAILED, result: write };
|
|
3685
|
+
rewrittenCascadePages.push(ref.page);
|
|
3683
3686
|
}
|
|
3684
3687
|
}
|
|
3685
3688
|
if (isRaw) {
|
|
@@ -3691,6 +3694,7 @@ ${fmRewritten}
|
|
|
3691
3694
|
if (updated !== original) {
|
|
3692
3695
|
const write = await safeWritePage(absPath, updated);
|
|
3693
3696
|
if (!write.ok) return { exitCode: ExitCode.WRITE_FAILED, result: write };
|
|
3697
|
+
rewrittenCascadePages.push(ref.page);
|
|
3694
3698
|
}
|
|
3695
3699
|
}
|
|
3696
3700
|
}
|
|
@@ -3719,10 +3723,13 @@ ${fmRewritten}
|
|
|
3719
3723
|
source: "cli"
|
|
3720
3724
|
});
|
|
3721
3725
|
const tombstonePath = await writeDeleteIntent(input.vault, archiveIntent);
|
|
3726
|
+
const lastOpFiles = [relPath, archivePath, tombstonePath, ...rewrittenCascadePages];
|
|
3727
|
+
if (indexUpdated) lastOpFiles.push("index.md");
|
|
3728
|
+
const uniqueLastOpFiles = [...new Set(lastOpFiles)];
|
|
3722
3729
|
appendLastOp(input.vault, {
|
|
3723
3730
|
operation: input.cascade ? "archive-cascade" : "archive",
|
|
3724
3731
|
summary: `moved ${relPath} to ${archivePath}${input.cascade ? ` (cascade: ${cascade?.source_array_refs.length ?? 0} source arrays updated)` : ""}; tombstone ${tombstonePath}`,
|
|
3725
|
-
files:
|
|
3732
|
+
files: uniqueLastOpFiles,
|
|
3726
3733
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3727
3734
|
});
|
|
3728
3735
|
let remote;
|
|
@@ -5300,14 +5307,17 @@ async function writeBriefArtifacts(vault, input) {
|
|
|
5300
5307
|
logUpdated = log.result.ok && log.result.data.appended;
|
|
5301
5308
|
}
|
|
5302
5309
|
if (materialChange) {
|
|
5310
|
+
const files = [
|
|
5311
|
+
"meta/latest-session-brief.md",
|
|
5312
|
+
".skillwiki/session-brief.md",
|
|
5313
|
+
".skillwiki/session-brief.json"
|
|
5314
|
+
];
|
|
5315
|
+
if (indexUpdated) files.push("index.md");
|
|
5316
|
+
if (logUpdated) files.push("log.md");
|
|
5303
5317
|
appendLastOp(vault, {
|
|
5304
5318
|
operation: "session-brief",
|
|
5305
5319
|
summary: "refreshed latest session brief",
|
|
5306
|
-
files
|
|
5307
|
-
"meta/latest-session-brief.md",
|
|
5308
|
-
".skillwiki/session-brief.md",
|
|
5309
|
-
".skillwiki/session-brief.json"
|
|
5310
|
-
],
|
|
5320
|
+
files,
|
|
5311
5321
|
timestamp: input.generatedAt
|
|
5312
5322
|
});
|
|
5313
5323
|
}
|
|
@@ -9901,7 +9911,21 @@ async function runFleetHealth(input) {
|
|
|
9901
9911
|
|
|
9902
9912
|
// src/utils/auto-commit.ts
|
|
9903
9913
|
import { existsSync as existsSync14 } from "fs";
|
|
9904
|
-
import { join as join41 } from "path";
|
|
9914
|
+
import { isAbsolute, join as join41, normalize } from "path";
|
|
9915
|
+
function isValidLastOpPath(file) {
|
|
9916
|
+
if (!file || typeof file !== "string") return false;
|
|
9917
|
+
const trimmed = file.trim();
|
|
9918
|
+
if (trimmed.length === 0) return false;
|
|
9919
|
+
if (isAbsolute(trimmed)) return false;
|
|
9920
|
+
const normalized = normalize(trimmed).replace(/\\/g, "/");
|
|
9921
|
+
if (normalized.startsWith("../") || normalized === ".." || normalized.includes("/../")) return false;
|
|
9922
|
+
for (const generatedPath of VAULT_GENERATED_COMMIT_PATHS) {
|
|
9923
|
+
if (normalized === generatedPath || normalized.startsWith(`${generatedPath}/`)) {
|
|
9924
|
+
return false;
|
|
9925
|
+
}
|
|
9926
|
+
}
|
|
9927
|
+
return true;
|
|
9928
|
+
}
|
|
9905
9929
|
async function postCommit(vault, exitCode) {
|
|
9906
9930
|
if (exitCode !== 0) return;
|
|
9907
9931
|
const home = process.env.HOME ?? "";
|
|
@@ -9913,16 +9937,31 @@ async function postCommit(vault, exitCode) {
|
|
|
9913
9937
|
if (lastOps.length === 0) return;
|
|
9914
9938
|
const porcelain = git(vault, ["status", "--porcelain", "--", ...VAULT_COMMIT_PATHSPEC]);
|
|
9915
9939
|
if (!porcelain || porcelain.trim().length === 0) return;
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9940
|
+
const rawFiles = lastOps.flatMap((op) => op.files ?? []);
|
|
9941
|
+
const candidateFiles = Array.from(new Set(rawFiles)).filter(isValidLastOpPath);
|
|
9942
|
+
if (candidateFiles.length === 0) {
|
|
9943
|
+
try {
|
|
9944
|
+
stageVaultContentChanges(vault);
|
|
9945
|
+
} catch (e) {
|
|
9946
|
+
process.stderr.write(`auto-commit: stage vault content failed: ${String(e)}
|
|
9920
9947
|
`);
|
|
9921
|
-
|
|
9948
|
+
return;
|
|
9949
|
+
}
|
|
9950
|
+
} else {
|
|
9951
|
+
try {
|
|
9952
|
+
gitStrict(vault, ["add", "--", ...candidateFiles]);
|
|
9953
|
+
} catch (e) {
|
|
9954
|
+
process.stderr.write(`auto-commit: git add failed: ${String(e)}
|
|
9955
|
+
`);
|
|
9956
|
+
return;
|
|
9957
|
+
}
|
|
9922
9958
|
}
|
|
9959
|
+
const staged = git(vault, ["diff", "--cached", "--name-only"]);
|
|
9960
|
+
if (!staged || staged.trim().length === 0) return;
|
|
9923
9961
|
const commitMessage = lastOps.map((op) => `${op.operation}: ${op.summary} (${op.files.length} files)`).join("; ");
|
|
9924
9962
|
try {
|
|
9925
|
-
|
|
9963
|
+
const commitArgs = candidateFiles.length === 0 ? ["commit", "-m", commitMessage] : ["commit", "-m", commitMessage, "--", ...candidateFiles];
|
|
9964
|
+
gitStrict(vault, commitArgs);
|
|
9926
9965
|
} catch (e) {
|
|
9927
9966
|
process.stderr.write(`auto-commit: git commit failed: ${String(e)}
|
|
9928
9967
|
`);
|
|
@@ -10069,7 +10108,7 @@ async function emitManagedVaultWrite(vault, command, mutate, opts) {
|
|
|
10069
10108
|
if (dirty) {
|
|
10070
10109
|
return emit(dirty, void 0, { postCommit: false });
|
|
10071
10110
|
}
|
|
10072
|
-
const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-
|
|
10111
|
+
const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-CMVCRXRG.js");
|
|
10073
10112
|
const run = await runManagedWriteTransaction2({
|
|
10074
10113
|
vault,
|
|
10075
10114
|
command,
|
package/dist/skillwiki-mcp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runSkillwikiMcpStdio
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q23OSECM.js";
|
|
5
5
|
import "./chunk-7I2TPIV5.js";
|
|
6
6
|
import "./chunk-O3HCB7R2.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-EHUFPORA.js";
|
|
8
8
|
import "./chunk-74OSLCXE.js";
|
|
9
9
|
import "./chunk-HBQTTYXZ.js";
|
|
10
10
|
import "./chunk-GAHMWLWU.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.55",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 20 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|