skillwiki 0.10.11 → 0.10.13
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-TYN2IHBY.js → chunk-E3PMAHS3.js} +12 -11
- package/dist/{chunk-3ZVZ2YEE.js → chunk-IIUMTKKA.js} +5 -2
- package/dist/{chunk-U34B2XQJ.js → chunk-NMUYMNNB.js} +2 -0
- package/dist/{chunk-P2FCRGKU.js → chunk-X2CPXF4T.js} +6 -2
- package/dist/cli.js +465 -165
- package/dist/{index-projection-VNJ3TLEK.js → index-projection-MHXG7QO2.js} +5 -1
- package/dist/{managed-write-preflight-7TWSEZJZ.js → managed-write-preflight-4SWWFT75.js} +2 -2
- package/dist/skillwiki-mcp.js +3 -3
- package/dist/vault-sync/scripts/lib/delete-intent.sh +27 -0
- package/dist/vault-sync/scripts/lib/git-operation-journal.sh +106 -13
- package/dist/vault-sync/scripts/lib/managed-write-lock.sh +10 -7
- package/dist/vault-sync/scripts/wiki-snapshot.sh +246 -43
- 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
- package/skills/skills/using-skillwiki/SKILL.md +1 -1
- package/skills/using-skillwiki/SKILL.md +1 -1
|
@@ -702,14 +702,17 @@ function isWorktreeClean(vault) {
|
|
|
702
702
|
const porcelain = git(vault, ["status", "--porcelain"]);
|
|
703
703
|
return !porcelain || porcelain.trim() === "";
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
if (hasUnmergedPaths(vault).length > 0)
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
const target = fields.target_oid?.trim();
|
|
710
|
-
if (!target) return false;
|
|
705
|
+
function journalSupersedeHead(vault, requireClean) {
|
|
706
|
+
if (hasUnmergedPaths(vault).length > 0 || hasActiveGitSequencer(vault) || requireClean && !isWorktreeClean(vault)) {
|
|
707
|
+
return null;
|
|
708
|
+
}
|
|
711
709
|
const head = git(vault, ["rev-parse", "HEAD"]);
|
|
710
|
+
return head || null;
|
|
711
|
+
}
|
|
712
|
+
function canSupersedeJournalInContext(vault, fields, head) {
|
|
712
713
|
if (!head) return false;
|
|
714
|
+
const target = fields.target_oid?.trim();
|
|
715
|
+
if (!target) return false;
|
|
713
716
|
return gitMergeBaseIsAncestor(vault, target, head);
|
|
714
717
|
}
|
|
715
718
|
function gitMergeBaseIsAncestor(vault, ancestor, tip) {
|
|
@@ -733,14 +736,12 @@ function markJournalSuperseded(vault, opId, fields, by) {
|
|
|
733
736
|
}
|
|
734
737
|
function supersedeStaleReviewRequiredJournals(vault, opts = {}) {
|
|
735
738
|
const by = opts.by ?? "skillwiki-preflight";
|
|
739
|
+
const requireClean = opts.requireClean !== false;
|
|
736
740
|
const superseded = [];
|
|
737
741
|
const skipped = [];
|
|
738
|
-
|
|
739
|
-
for (const { opId } of listReviewRequiredOps(vault)) skipped.push(opId);
|
|
740
|
-
return { superseded, skipped };
|
|
741
|
-
}
|
|
742
|
+
const head = journalSupersedeHead(vault, requireClean);
|
|
742
743
|
for (const { opId, fields } of listReviewRequiredOps(vault)) {
|
|
743
|
-
if (!
|
|
744
|
+
if (!canSupersedeJournalInContext(vault, fields, head)) {
|
|
744
745
|
skipped.push(opId);
|
|
745
746
|
continue;
|
|
746
747
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
loadFleetManifestAndHost,
|
|
9
9
|
runVaultSyncPullHelper,
|
|
10
10
|
supersedeStaleReviewRequiredJournals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E3PMAHS3.js";
|
|
12
12
|
import {
|
|
13
13
|
ExitCode,
|
|
14
14
|
err,
|
|
@@ -163,7 +163,10 @@ function preflightBlocker(vault) {
|
|
|
163
163
|
if (hasActiveGitSequencer(vault)) {
|
|
164
164
|
return { reason: "git-operation-in-progress" };
|
|
165
165
|
}
|
|
166
|
-
supersedeStaleReviewRequiredJournals(vault, {
|
|
166
|
+
supersedeStaleReviewRequiredJournals(vault, {
|
|
167
|
+
by: "skillwiki-managed-write-preflight",
|
|
168
|
+
requireClean: false
|
|
169
|
+
});
|
|
167
170
|
const op = findReviewRequiredOp(vault);
|
|
168
171
|
if (op) return { reason: "review-required", operation_id: op };
|
|
169
172
|
return null;
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitFrontmatter,
|
|
20
20
|
vaultIoConcurrency,
|
|
21
21
|
writeRootIndexProjection
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NMUYMNNB.js";
|
|
23
23
|
import {
|
|
24
24
|
CONFIG_KEYS,
|
|
25
25
|
git,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
satelliteGateFromFleetLoad,
|
|
34
34
|
snapshotterAliasForLocalHost,
|
|
35
35
|
writeDotenv
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-E3PMAHS3.js";
|
|
37
37
|
import {
|
|
38
38
|
CompoundSchema,
|
|
39
39
|
ExitCode,
|
|
@@ -7158,6 +7158,7 @@ var HYGIENE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
7158
7158
|
"log migrate-legacy",
|
|
7159
7159
|
"index rebuild",
|
|
7160
7160
|
"projections materialize",
|
|
7161
|
+
"projections repair-legacy",
|
|
7161
7162
|
"doctor",
|
|
7162
7163
|
"health",
|
|
7163
7164
|
"lint",
|
|
@@ -9853,6 +9854,9 @@ export {
|
|
|
9853
9854
|
readLastOp,
|
|
9854
9855
|
appendLastOp,
|
|
9855
9856
|
clearLastOp,
|
|
9857
|
+
eventPathFor,
|
|
9858
|
+
validateLogEvent,
|
|
9859
|
+
canonicalEventJson,
|
|
9856
9860
|
writeLogEvent,
|
|
9857
9861
|
readLogEvents,
|
|
9858
9862
|
runLogAppend,
|