skillwiki 0.6.1 → 0.6.2-beta.1
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/cli.js
CHANGED
|
@@ -6206,6 +6206,15 @@ function releaseLock(vault, opts = {}) {
|
|
|
6206
6206
|
}
|
|
6207
6207
|
const sessionId = opts.sessionId ?? getSessionId();
|
|
6208
6208
|
const existing = readLock(vault);
|
|
6209
|
+
if (opts.force) {
|
|
6210
|
+
try {
|
|
6211
|
+
unlinkSync4(path);
|
|
6212
|
+
const prior = existing && existing.session_id !== sessionId ? existing : void 0;
|
|
6213
|
+
return { released: true, prior };
|
|
6214
|
+
} catch {
|
|
6215
|
+
return { released: false };
|
|
6216
|
+
}
|
|
6217
|
+
}
|
|
6209
6218
|
if (!existing || existing.session_id !== sessionId) {
|
|
6210
6219
|
return { released: false };
|
|
6211
6220
|
}
|
|
@@ -6562,13 +6571,29 @@ function runSyncUnlock(input) {
|
|
|
6562
6571
|
result: err("VAULT_PATH_INVALID", { path: vault })
|
|
6563
6572
|
};
|
|
6564
6573
|
}
|
|
6565
|
-
const result = releaseLock(vault, { sessionId: input.sessionId });
|
|
6574
|
+
const result = releaseLock(vault, { sessionId: input.sessionId, force: input.force });
|
|
6575
|
+
let humanHint;
|
|
6576
|
+
if (result.released && result.prior) {
|
|
6577
|
+
humanHint = `lock force-released (was held by session ${result.prior.session_id}, PID ${result.prior.pid})`;
|
|
6578
|
+
} else if (result.released) {
|
|
6579
|
+
humanHint = "lock released";
|
|
6580
|
+
} else {
|
|
6581
|
+
humanHint = "lock not held by this session (no-op)";
|
|
6582
|
+
}
|
|
6583
|
+
const output = {
|
|
6584
|
+
released: result.released,
|
|
6585
|
+
humanHint
|
|
6586
|
+
};
|
|
6587
|
+
if (result.prior) {
|
|
6588
|
+
output.prior = {
|
|
6589
|
+
session_id: result.prior.session_id,
|
|
6590
|
+
pid: result.prior.pid,
|
|
6591
|
+
summary: result.prior.summary
|
|
6592
|
+
};
|
|
6593
|
+
}
|
|
6566
6594
|
return {
|
|
6567
6595
|
exitCode: ExitCode.OK,
|
|
6568
|
-
result: ok(
|
|
6569
|
-
released: result.released,
|
|
6570
|
-
humanHint: result.released ? "lock released" : "lock not held by this session (no-op)"
|
|
6571
|
-
})
|
|
6596
|
+
result: ok(output)
|
|
6572
6597
|
};
|
|
6573
6598
|
}
|
|
6574
6599
|
|
|
@@ -7537,10 +7562,10 @@ syncCmd.command("lock [vault]").description("acquire advisory lock on vault").op
|
|
|
7537
7562
|
emit(runSyncLock({ vault: v.vault, summary: opts.summary, ttlMinutes: ttl, force: !!opts.force }));
|
|
7538
7563
|
}
|
|
7539
7564
|
});
|
|
7540
|
-
syncCmd.command("unlock [vault]").description("release advisory lock on vault").option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
7565
|
+
syncCmd.command("unlock [vault]").description("release advisory lock on vault").option("--force", "release lock regardless of holder", false).option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
7541
7566
|
const v = await resolveVaultArg(vault, opts.wiki);
|
|
7542
7567
|
if (!v.ok) emit({ exitCode: v.exitCode, result: v.payload });
|
|
7543
|
-
else emit(runSyncUnlock({ vault: v.vault }));
|
|
7568
|
+
else emit(runSyncUnlock({ vault: v.vault, force: !!opts.force }));
|
|
7544
7569
|
});
|
|
7545
7570
|
syncCmd.command("peers [vault]").description("list active locks and recent wiki-sync stashes").option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
7546
7571
|
const v = await resolveVaultArg(vault, opts.wiki);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.6.1",
|
|
3
|
+
"version": "0.6.2-beta.1",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 18 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|