skillwiki 0.10.51 → 0.10.52

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.
@@ -35,7 +35,7 @@ import {
35
35
  snapshotterAliasForLocalHost,
36
36
  toUndirectedWeighted,
37
37
  writeDotenv
38
- } from "./chunk-UPQ6XJSV.js";
38
+ } from "./chunk-VRK5DOC5.js";
39
39
  import {
40
40
  atomicWriteText,
41
41
  prepareTypedPage
@@ -607,7 +607,7 @@ function safeUserName() {
607
607
  // src/commands/sync.ts
608
608
  import { existsSync as existsSync8, readFileSync as readFileSync5 } from "fs";
609
609
  import { join as join17 } from "path";
610
- import { execFileSync as execFileSync3 } from "child_process";
610
+ import { execFileSync as execFileSync4 } from "child_process";
611
611
 
612
612
  // src/utils/last-op.ts
613
613
  import { readFileSync, writeFileSync, mkdirSync, unlinkSync, existsSync } from "fs";
@@ -5037,6 +5037,41 @@ var LINT_RULES = [
5037
5037
  cycleTrapsRule
5038
5038
  ];
5039
5039
 
5040
+ // src/utils/git-archive.ts
5041
+ import { execFileSync } from "child_process";
5042
+ import { rmSync } from "fs";
5043
+ function extractGitTree(vault, ref, destDir) {
5044
+ if (process.platform === "win32") {
5045
+ const zipPath = `${destDir}.zip`;
5046
+ execFileSync("git", ["archive", "--format=zip", `--output=${zipPath}`, ref], {
5047
+ cwd: vault,
5048
+ stdio: ["pipe", "pipe", "pipe"]
5049
+ });
5050
+ try {
5051
+ execFileSync("tar", ["-xf", zipPath], {
5052
+ cwd: destDir,
5053
+ stdio: ["pipe", "pipe", "pipe"]
5054
+ });
5055
+ } finally {
5056
+ try {
5057
+ rmSync(zipPath, { force: true });
5058
+ } catch {
5059
+ }
5060
+ }
5061
+ return;
5062
+ }
5063
+ const archive = execFileSync("git", ["archive", "--format=tar", ref], {
5064
+ cwd: vault,
5065
+ stdio: ["pipe", "pipe", "pipe"],
5066
+ maxBuffer: 256 * 1024 * 1024
5067
+ });
5068
+ execFileSync("tar", ["-xf", "-"], {
5069
+ cwd: destDir,
5070
+ input: archive,
5071
+ stdio: ["pipe", "pipe", "pipe"]
5072
+ });
5073
+ }
5074
+
5040
5075
  // src/lint/runner.ts
5041
5076
  var LintRunner = class {
5042
5077
  rules;
@@ -5183,10 +5218,10 @@ function runLint(input) {
5183
5218
  return defaultLintRunner.run(input);
5184
5219
  }
5185
5220
  async function runSyncLintDelta(input) {
5186
- const { mkdtempSync, rmSync, existsSync: fsExists } = await import("fs");
5221
+ const { mkdtempSync, rmSync: rmSync2, existsSync: fsExists } = await import("fs");
5187
5222
  const { join: pathJoin } = await import("path");
5188
5223
  const { tmpdir } = await import("os");
5189
- const { execFileSync: execFileSync4 } = await import("child_process");
5224
+ const { execFileSync: execFileSync5 } = await import("child_process");
5190
5225
  const vault = input.vault;
5191
5226
  const baseRef = input.baseRef ?? "origin/main";
5192
5227
  const days = input.days ?? 90;
@@ -5199,7 +5234,7 @@ async function runSyncLintDelta(input) {
5199
5234
  };
5200
5235
  }
5201
5236
  try {
5202
- execFileSync4("git", ["rev-parse", "--verify", baseRef], {
5237
+ execFileSync5("git", ["rev-parse", "--verify", baseRef], {
5203
5238
  cwd: vault,
5204
5239
  stdio: ["pipe", "pipe", "pipe"]
5205
5240
  });
@@ -5229,16 +5264,7 @@ async function runSyncLintDelta(input) {
5229
5264
  const fullFps = collectLintErrorFingerprints(fullOutput);
5230
5265
  const tmpRoot = mkdtempSync(pathJoin(tmpdir(), "skillwiki-lint-delta-"));
5231
5266
  try {
5232
- const archive = execFileSync4("git", ["archive", "--format=tar", baseRef], {
5233
- cwd: vault,
5234
- stdio: ["pipe", "pipe", "pipe"],
5235
- maxBuffer: 256 * 1024 * 1024
5236
- });
5237
- execFileSync4("tar", ["-xf", "-"], {
5238
- cwd: tmpRoot,
5239
- input: archive,
5240
- stdio: ["pipe", "pipe", "pipe"]
5241
- });
5267
+ extractGitTree(vault, baseRef, tmpRoot);
5242
5268
  if (!fsExists(pathJoin(tmpRoot, "SCHEMA.md"))) {
5243
5269
  }
5244
5270
  const baseLint = await runLint({ vault: tmpRoot, days, lines, logThreshold });
@@ -5293,23 +5319,23 @@ async function runSyncLintDelta(input) {
5293
5319
  };
5294
5320
  } finally {
5295
5321
  try {
5296
- rmSync(tmpRoot, { recursive: true, force: true });
5322
+ rmSync2(tmpRoot, { recursive: true, force: true });
5297
5323
  } catch {
5298
5324
  }
5299
5325
  }
5300
5326
  }
5301
5327
 
5302
5328
  // src/utils/git.ts
5303
- import { execFileSync } from "child_process";
5329
+ import { execFileSync as execFileSync2 } from "child_process";
5304
5330
  function git(cwd, args) {
5305
5331
  try {
5306
- return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
5332
+ return execFileSync2("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
5307
5333
  } catch {
5308
5334
  return "";
5309
5335
  }
5310
5336
  }
5311
5337
  function gitStrict(cwd, args) {
5312
- return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
5338
+ return execFileSync2("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
5313
5339
  }
5314
5340
 
5315
5341
  // src/utils/sync-lock.ts
@@ -5494,9 +5520,9 @@ function stageVaultContentChanges(vault) {
5494
5520
  // src/utils/remote-health.ts
5495
5521
  import { existsSync as existsSync6, readFileSync as readFileSync4 } from "fs";
5496
5522
  import { join as join15 } from "path";
5497
- import { execFileSync as execFileSync2 } from "child_process";
5523
+ import { execFileSync as execFileSync3 } from "child_process";
5498
5524
  var REMOTE_PROBE_TIMEOUT_MS = 3e3;
5499
- var defaultExec = (file, args, cwd) => execFileSync2(file, args, {
5525
+ var defaultExec = (file, args, cwd) => execFileSync3(file, args, {
5500
5526
  cwd,
5501
5527
  encoding: "utf8",
5502
5528
  stdio: ["pipe", "pipe", "pipe"],
@@ -5716,7 +5742,7 @@ function isTrackedNotePath(path) {
5716
5742
  }
5717
5743
  function refHasPath(vault, ref, path) {
5718
5744
  try {
5719
- execFileSync3("git", ["cat-file", "-e", `${ref}:${path}`], {
5745
+ execFileSync4("git", ["cat-file", "-e", `${ref}:${path}`], {
5720
5746
  cwd: vault,
5721
5747
  stdio: ["pipe", "pipe", "pipe"]
5722
5748
  });
@@ -6103,6 +6129,7 @@ function collectManagedWriterAncestorPids(startPid, readStatus = readProcStatus)
6103
6129
  return ids;
6104
6130
  }
6105
6131
  function readProcStatus(pid) {
6132
+ if (process.platform !== "linux") return null;
6106
6133
  try {
6107
6134
  return readFileSync5(`/proc/${pid}/status`, "utf8");
6108
6135
  } catch {
@@ -6145,12 +6172,12 @@ function classifyManagedWriterProcesses(snapshot, currentPid = process.pid, ance
6145
6172
  function managedWriterSnapshot() {
6146
6173
  try {
6147
6174
  if (process.platform === "win32") {
6148
- return execFileSync3("tasklist", ["/FO", "CSV", "/NH"], {
6175
+ return execFileSync4("tasklist", ["/FO", "CSV", "/NH"], {
6149
6176
  encoding: "utf8",
6150
6177
  stdio: ["pipe", "pipe", "pipe"]
6151
6178
  });
6152
6179
  }
6153
- return execFileSync3("ps", ["-axo", "pid=,command="], {
6180
+ return execFileSync4("ps", ["-axo", "pid=,command="], {
6154
6181
  encoding: "utf8",
6155
6182
  stdio: ["pipe", "pipe", "pipe"]
6156
6183
  });
@@ -7103,6 +7130,7 @@ export {
7103
7130
  louvain,
7104
7131
  communityCohesion,
7105
7132
  extractIssuePage,
7133
+ extractGitTree,
7106
7134
  runLinks,
7107
7135
  extractTaxonomy,
7108
7136
  taxonomyCommentForPage,
package/dist/cli.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  snapshotterHealthChecks,
51
51
  upsertIndexEntry,
52
52
  vectorIndexStatus
53
- } from "./chunk-3IBRZTLF.js";
53
+ } from "./chunk-JTAZUR2W.js";
54
54
  import {
55
55
  normalizeDistTag,
56
56
  readCache,
@@ -79,6 +79,7 @@ import {
79
79
  collectClaimedTranscripts,
80
80
  defaultLintRunner,
81
81
  extractBodyWikilinks,
82
+ extractGitTree,
82
83
  extractIssuePage,
83
84
  extractTaxonomy,
84
85
  getCliSessionId,
@@ -145,7 +146,7 @@ import {
145
146
  supersedeStaleReviewRequiredJournals,
146
147
  taxonomyCommentForPage,
147
148
  writeDotenv
148
- } from "./chunk-UPQ6XJSV.js";
149
+ } from "./chunk-VRK5DOC5.js";
149
150
  import {
150
151
  assertTargetInsideVault,
151
152
  atomicWriteText,
@@ -549,16 +550,7 @@ async function runEval(input) {
549
550
  }
550
551
  const tmpRoot = mkdtempSync(join2(tmpdir(), "skillwiki-eval-delta-"));
551
552
  try {
552
- const archive = execFileSync("git", ["archive", "--format=tar", baseRef], {
553
- cwd: vaultPath,
554
- stdio: ["pipe", "pipe", "pipe"],
555
- maxBuffer: 256 * 1024 * 1024
556
- });
557
- execFileSync("tar", ["-xf", "-"], {
558
- cwd: tmpRoot,
559
- input: archive,
560
- stdio: ["pipe", "pipe", "pipe"]
561
- });
553
+ extractGitTree(vaultPath, baseRef, tmpRoot);
562
554
  const baseAggRes = await aggregateVault(tmpRoot, topLimit);
563
555
  if (!baseAggRes.ok) {
564
556
  return {
@@ -10076,7 +10068,7 @@ async function emitManagedVaultWrite(vault, command, mutate, opts) {
10076
10068
  if (dirty) {
10077
10069
  return emit(dirty, void 0, { postCommit: false });
10078
10070
  }
10079
- const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-7GDFRPUT.js");
10071
+ const { runManagedWriteTransaction: runManagedWriteTransaction2 } = await import("./managed-write-preflight-WIW5L22Q.js");
10080
10072
  const run = await runManagedWriteTransaction2({
10081
10073
  vault,
10082
10074
  command,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runManagedWritePreflight,
4
4
  runManagedWriteTransaction
5
- } from "./chunk-UPQ6XJSV.js";
5
+ } from "./chunk-VRK5DOC5.js";
6
6
  import "./chunk-74OSLCXE.js";
7
7
  import "./chunk-GAHMWLWU.js";
8
8
  import "./chunk-IJ7DD7QZ.js";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runSkillwikiMcpStdio
4
- } from "./chunk-3IBRZTLF.js";
4
+ } from "./chunk-JTAZUR2W.js";
5
5
  import "./chunk-7I2TPIV5.js";
6
6
  import "./chunk-O3HCB7R2.js";
7
- import "./chunk-UPQ6XJSV.js";
7
+ import "./chunk-VRK5DOC5.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.51",
3
+ "version": "0.10.52",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.51",
3
+ "version": "0.10.52",
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": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.51",
3
+ "version": "0.10.52",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 20 prompt-only skills backed by the deterministic skillwiki CLI.",
5
5
  "author": {
6
6
  "name": "karlorz",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.10.51",
3
+ "version": "0.10.52",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",