skillwiki 0.9.52 → 0.9.56
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/auto-update-bg.js +28 -8
- package/dist/chunk-7I2TPIV5.js +154 -0
- package/dist/{chunk-D6T7GSHK.js → chunk-SE5URAJR.js} +480 -216
- package/dist/cli.js +56 -10
- 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
- package/dist/chunk-E6UWZ3S3.js +0 -62
package/dist/cli.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
TypedKnowledgeSchema,
|
|
8
8
|
appendLastOp,
|
|
9
9
|
assessSourceIdentity,
|
|
10
|
+
buildDegradedReasons,
|
|
10
11
|
buildRemoteObjectPath,
|
|
11
12
|
clearLastOp,
|
|
12
13
|
configPath,
|
|
@@ -28,6 +29,7 @@ import {
|
|
|
28
29
|
parseDotenvFile,
|
|
29
30
|
parseDotenvText,
|
|
30
31
|
planAndMaybePruneRemoteObjects,
|
|
32
|
+
probeRemoteHealth,
|
|
31
33
|
profileKey,
|
|
32
34
|
readCliPackageJson,
|
|
33
35
|
readLastOp,
|
|
@@ -71,14 +73,17 @@ import {
|
|
|
71
73
|
satelliteLatestRunPath,
|
|
72
74
|
scanSensitiveContent,
|
|
73
75
|
scanVault,
|
|
76
|
+
snapshotterAliasForLocalHost,
|
|
74
77
|
splitFrontmatter,
|
|
75
|
-
triggerAutoUpdate,
|
|
76
|
-
writeCache,
|
|
77
78
|
writeDotenv
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-SE5URAJR.js";
|
|
79
80
|
import {
|
|
80
|
-
normalizeDistTag
|
|
81
|
-
|
|
81
|
+
normalizeDistTag,
|
|
82
|
+
readCache,
|
|
83
|
+
resolveAutoApplyAt,
|
|
84
|
+
triggerAutoUpdate,
|
|
85
|
+
writeCache
|
|
86
|
+
} from "./chunk-7I2TPIV5.js";
|
|
82
87
|
|
|
83
88
|
// src/cli.ts
|
|
84
89
|
import { join as join26 } from "path";
|
|
@@ -1953,11 +1958,14 @@ async function runUpdate(input) {
|
|
|
1953
1958
|
result: err("PREFLIGHT_FAILED", { message: `Failed to query npm registry: ${String(e)}` })
|
|
1954
1959
|
};
|
|
1955
1960
|
}
|
|
1961
|
+
const { firstSeenAt, autoApplyAt } = resolveAutoApplyAt(readCache(input.home).cache, latest);
|
|
1956
1962
|
const cache = {
|
|
1957
1963
|
lastCheck: Date.now(),
|
|
1958
1964
|
latestVersion: latest,
|
|
1959
1965
|
currentVersion,
|
|
1960
|
-
distTag: tag
|
|
1966
|
+
distTag: tag,
|
|
1967
|
+
firstSeenAt,
|
|
1968
|
+
autoApplyAt
|
|
1961
1969
|
};
|
|
1962
1970
|
if (latest === currentVersion) {
|
|
1963
1971
|
writeCache(input.home, cache);
|
|
@@ -3660,6 +3668,24 @@ function runSyncStatus(input) {
|
|
|
3660
3668
|
if (stashes !== void 0) {
|
|
3661
3669
|
output.stashes = stashes;
|
|
3662
3670
|
}
|
|
3671
|
+
if (input.includeRemoteHealth) {
|
|
3672
|
+
const home = input.home ?? process.env.HOME ?? "";
|
|
3673
|
+
const remote_health = probeRemoteHealth({
|
|
3674
|
+
vaultPath: vault,
|
|
3675
|
+
home,
|
|
3676
|
+
s3Remote: input.s3Remote,
|
|
3677
|
+
snapshotterAlias: input.snapshotterAlias,
|
|
3678
|
+
checkSnapshotter: input.checkSnapshotter,
|
|
3679
|
+
exec: input.execProbe
|
|
3680
|
+
});
|
|
3681
|
+
output.remote_health = remote_health;
|
|
3682
|
+
const degraded = buildDegradedReasons(remote_health);
|
|
3683
|
+
if (degraded.length > 0) {
|
|
3684
|
+
output.degraded_reasons = degraded;
|
|
3685
|
+
hintLines.push(`degraded_reasons: ${degraded.join(", ")}`);
|
|
3686
|
+
output.humanHint = hintLines.join("\n");
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3663
3689
|
return {
|
|
3664
3690
|
exitCode,
|
|
3665
3691
|
result: ok(output)
|
|
@@ -5243,12 +5269,13 @@ configCmd.command("get <key>").description("print the value of a config key").ac
|
|
|
5243
5269
|
configCmd.command("set <key> <value>").description("set a config key value").action(async (key, value) => emit(await runConfigSet({ key, value, home: process.env.HOME ?? "" })));
|
|
5244
5270
|
configCmd.command("list").option("--profiles", "show wiki profiles summary", false).description("list all config key=value pairs").action(async (opts) => emit(await runConfigList({ home: process.env.HOME ?? "", profiles: !!opts.profiles })));
|
|
5245
5271
|
configCmd.command("path").description("print the config file path").action(async () => emit(await runConfigPath({ home: process.env.HOME ?? "" })));
|
|
5246
|
-
program.command("doctor").description("diagnose skillwiki setup issues").action(async () => emit(await runDoctor({
|
|
5272
|
+
program.command("doctor").description("diagnose skillwiki setup issues").option("--check-snapshotter", "SSH-probe fleet snapshotter (short timeout)", false).action(async (opts) => emit(await runDoctor({
|
|
5247
5273
|
home: process.env.HOME ?? "",
|
|
5248
5274
|
envValue: process.env.WIKI_PATH,
|
|
5249
5275
|
argv: process.argv,
|
|
5250
5276
|
currentVersion: pkg.version,
|
|
5251
|
-
cwd: process.cwd()
|
|
5277
|
+
cwd: process.cwd(),
|
|
5278
|
+
checkSnapshotter: !!opts.checkSnapshotter
|
|
5252
5279
|
})));
|
|
5253
5280
|
program.command("status [vault]").description("output vault diagnostics").option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
5254
5281
|
const v = await resolveVaultArg(vault, opts.wiki);
|
|
@@ -5403,10 +5430,29 @@ program.command("tag-sync [vault]").description("mirror frontmatter enum values
|
|
|
5403
5430
|
);
|
|
5404
5431
|
});
|
|
5405
5432
|
var syncCmd = program.command("sync").description("manage vault sync");
|
|
5406
|
-
syncCmd.command("status [vault]").description("check vault git sync status").option("--wiki <name>", "wiki profile name").option("--include-stashes", "enumerate all stashes in output", false).action(async (vault, opts) => {
|
|
5433
|
+
syncCmd.command("status [vault]").description("check vault git sync status").option("--wiki <name>", "wiki profile name").option("--include-stashes", "enumerate all stashes in output", false).option("--include-remote-health", "probe GitHub/S3 reachability (opt-in; adds network latency)", false).option("--check-snapshotter", "with --include-remote-health, also SSH-probe fleet snapshotter alias", false).action(async (vault, opts) => {
|
|
5407
5434
|
const v = await resolveVaultArg(vault, opts.wiki);
|
|
5408
5435
|
if (!v.ok) emit({ exitCode: v.exitCode, result: v.payload });
|
|
5409
|
-
else
|
|
5436
|
+
else {
|
|
5437
|
+
const home = process.env.HOME ?? "";
|
|
5438
|
+
let snapshotterAlias;
|
|
5439
|
+
if (opts.checkSnapshotter) {
|
|
5440
|
+
const fleetLoad = await loadFleetManifestAndHost({
|
|
5441
|
+
vault: v.vault,
|
|
5442
|
+
home,
|
|
5443
|
+
cwd: process.cwd()
|
|
5444
|
+
});
|
|
5445
|
+
snapshotterAlias = snapshotterAliasForLocalHost(fleetLoad);
|
|
5446
|
+
}
|
|
5447
|
+
emit(runSyncStatus({
|
|
5448
|
+
vault: v.vault,
|
|
5449
|
+
includeStashes: !!opts.includeStashes,
|
|
5450
|
+
includeRemoteHealth: !!opts.includeRemoteHealth,
|
|
5451
|
+
home,
|
|
5452
|
+
checkSnapshotter: !!opts.checkSnapshotter,
|
|
5453
|
+
snapshotterAlias
|
|
5454
|
+
}));
|
|
5455
|
+
}
|
|
5410
5456
|
});
|
|
5411
5457
|
syncCmd.command("push [vault]").description("lint, commit, and push vault changes to remote").option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
5412
5458
|
const v = await resolveVaultArg(vault, opts.wiki);
|
package/dist/skillwiki-mcp.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.56",
|
|
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": {
|
package/skills/package.json
CHANGED
package/dist/chunk-E6UWZ3S3.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/utils/semver.ts
|
|
4
|
-
function semverGt(a, b) {
|
|
5
|
-
const pa = parseSemver(a);
|
|
6
|
-
const pb = parseSemver(b);
|
|
7
|
-
if (!pa || !pb) return a > b;
|
|
8
|
-
if (pa.major !== pb.major) return pa.major > pb.major;
|
|
9
|
-
if (pa.minor !== pb.minor) return pa.minor > pb.minor;
|
|
10
|
-
if (pa.patch !== pb.patch) return pa.patch > pb.patch;
|
|
11
|
-
if (!pa.pre && pb.pre) return true;
|
|
12
|
-
if (pa.pre && !pb.pre) return false;
|
|
13
|
-
if (!pa.pre && !pb.pre) return false;
|
|
14
|
-
const aParts = pa.pre.split(".");
|
|
15
|
-
const bParts = pb.pre.split(".");
|
|
16
|
-
const len = Math.max(aParts.length, bParts.length);
|
|
17
|
-
for (let i = 0; i < len; i++) {
|
|
18
|
-
const ai = aParts[i];
|
|
19
|
-
const bi = bParts[i];
|
|
20
|
-
if (ai === void 0) return false;
|
|
21
|
-
if (bi === void 0) return true;
|
|
22
|
-
const aNum = parseInt(ai, 10);
|
|
23
|
-
const bNum = parseInt(bi, 10);
|
|
24
|
-
if (!isNaN(aNum) && !isNaN(bNum)) {
|
|
25
|
-
if (aNum !== bNum) return aNum > bNum;
|
|
26
|
-
} else {
|
|
27
|
-
if (ai !== bi) return ai > bi;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
function parseSemver(version) {
|
|
33
|
-
const match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);
|
|
34
|
-
if (!match) return null;
|
|
35
|
-
return {
|
|
36
|
-
major: parseInt(match[1], 10),
|
|
37
|
-
minor: parseInt(match[2], 10),
|
|
38
|
-
patch: parseInt(match[3], 10),
|
|
39
|
-
pre: match[4] ?? null
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// src/utils/update-consts.ts
|
|
44
|
-
var DIST_TAG = "latest";
|
|
45
|
-
var CACHE_FILENAME = ".update-cache.json";
|
|
46
|
-
var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
47
|
-
var ENV_DISABLE_KEY = "NO_UPDATE_NOTIFIER";
|
|
48
|
-
var CLI_DISABLE_FLAG = "--no-update-notifier";
|
|
49
|
-
function normalizeDistTag(tag) {
|
|
50
|
-
const value = (tag ?? DIST_TAG).trim();
|
|
51
|
-
return /^[A-Za-z0-9._-]+$/.test(value) ? value : DIST_TAG;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
semverGt,
|
|
56
|
-
DIST_TAG,
|
|
57
|
-
CACHE_FILENAME,
|
|
58
|
-
CHECK_INTERVAL_MS,
|
|
59
|
-
ENV_DISABLE_KEY,
|
|
60
|
-
CLI_DISABLE_FLAG,
|
|
61
|
-
normalizeDistTag
|
|
62
|
-
};
|