skillwiki 0.10.89 → 0.10.90

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.
@@ -4512,10 +4512,16 @@ function isHygieneCommand(command) {
4512
4512
  }
4513
4513
  return false;
4514
4514
  }
4515
+ function isEventLedgerPath(rel) {
4516
+ const n = rel.replace(/\\/g, "/").replace(/^\.\//, "");
4517
+ return n === "meta/log-events" || n.startsWith("meta/log-events/");
4518
+ }
4515
4519
  function measureDirtyVolume(vault) {
4516
4520
  const empty = (extra = {}) => ({
4517
4521
  porcelain_lines: 0,
4518
4522
  expanded_files: 0,
4523
+ content_files: 0,
4524
+ ledger_files: 0,
4519
4525
  modified: 0,
4520
4526
  untracked: 0,
4521
4527
  buckets: [],
@@ -4545,7 +4551,13 @@ function measureDirtyVolume(vault) {
4545
4551
  let modified = 0;
4546
4552
  let untracked = 0;
4547
4553
  let expanded = 0;
4554
+ let contentFiles = 0;
4555
+ let ledgerFiles = 0;
4548
4556
  const bucketMap = /* @__PURE__ */ new Map();
4557
+ const classify = (rel, n) => {
4558
+ if (isEventLedgerPath(rel)) ledgerFiles += n;
4559
+ else contentFiles += n;
4560
+ };
4549
4561
  const addBucket = (rel, n) => {
4550
4562
  const top = rel.split(/[/\\]/)[0] || ".";
4551
4563
  bucketMap.set(top, (bucketMap.get(top) ?? 0) + n);
@@ -4567,20 +4579,27 @@ function measureDirtyVolume(vault) {
4567
4579
  const files = listFilesRecursive(abs);
4568
4580
  expanded += files.length;
4569
4581
  addBucket(rel, files.length);
4582
+ for (const file of files) {
4583
+ classify(relative2(vault, file).replace(/\\/g, "/"), 1);
4584
+ }
4570
4585
  } else {
4571
4586
  expanded += 1;
4572
4587
  addBucket(rel, 1);
4588
+ classify(rel, 1);
4573
4589
  }
4574
4590
  } else {
4575
4591
  modified += 1;
4576
4592
  expanded += 1;
4577
4593
  addBucket(rel, 1);
4594
+ classify(rel, 1);
4578
4595
  }
4579
4596
  }
4580
4597
  const buckets = [...bucketMap.entries()].map(([bucket, count]) => ({ bucket, count })).sort((a, b) => b.count - a.count);
4581
4598
  return {
4582
4599
  porcelain_lines: lines.length,
4583
4600
  expanded_files: expanded,
4601
+ content_files: contentFiles,
4602
+ ledger_files: ledgerFiles,
4584
4603
  modified,
4585
4604
  untracked,
4586
4605
  buckets,
@@ -4613,7 +4632,7 @@ function evaluateDirtyVolumeGate(input) {
4613
4632
  const threshold = input.threshold ?? DEFAULT_DIRTY_VOLUME_THRESHOLD;
4614
4633
  const report = measureDirtyVolume(input.vault);
4615
4634
  report.threshold = threshold;
4616
- report.over_threshold = report.is_git_repo && report.expanded_files > threshold;
4635
+ report.over_threshold = report.is_git_repo && report.content_files > threshold;
4617
4636
  if (input.skip) {
4618
4637
  return { allowed: true, reason: "skipped", report };
4619
4638
  }
@@ -4632,7 +4651,7 @@ function evaluateDirtyVolumeGate(input) {
4632
4651
  reason: "over_threshold",
4633
4652
  code: GateError.VAULT_DIRTY_BACKLOG,
4634
4653
  report,
4635
- humanHint: `Vault dirty volume ${report.expanded_files} exceeds threshold ${threshold} (porcelain ${report.porcelain_lines}; buckets: ${top || "none"}). Triage/commit keep-set before more non-hygiene writes. Hygiene commands still allowed.`
4654
+ humanHint: `Vault content dirty volume ${report.content_files} exceeds threshold ${threshold} (event-ledger ${report.ledger_files} excluded; porcelain ${report.porcelain_lines}; buckets: ${top || "none"}). Triage/commit keep-set before more non-hygiene writes. Do not git add meta/log-events. Hygiene commands still allowed.`
4636
4655
  };
4637
4656
  }
4638
4657
  var SATURATION_PATTERNS = [
package/dist/cli.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
  snapshotterHealthChecks,
54
54
  upsertIndexEntry,
55
55
  vectorIndexStatus
56
- } from "./chunk-IZ6I7GSG.js";
56
+ } from "./chunk-ZYVP52PM.js";
57
57
  import {
58
58
  normalizeDistTag,
59
59
  readCache,
@@ -9352,6 +9352,8 @@ function githubRecord(p) {
9352
9352
  function withDirty(rec, p) {
9353
9353
  if (p.dirty !== void 0) rec.dirty = p.dirty;
9354
9354
  if (p.untracked !== void 0) rec.untracked = p.untracked;
9355
+ if (p.ledger_untracked !== void 0) rec.ledger_untracked = p.ledger_untracked;
9356
+ if (p.content_untracked !== void 0) rec.content_untracked = p.content_untracked;
9355
9357
  return rec;
9356
9358
  }
9357
9359
  function localRecord(p, githubOid) {
@@ -9418,8 +9420,10 @@ function formatPlane(name, rec) {
9418
9420
  if (rec.oid) parts.push(`oid=${rec.oid.slice(0, 12)}`);
9419
9421
  if (rec.behind !== void 0) parts.push(`behind=${rec.behind}`);
9420
9422
  if (rec.age_hours !== void 0) parts.push(`age_hours=${rec.age_hours}`);
9421
- if (rec.dirty !== void 0) parts.push(`dirty=${rec.dirty}`);
9422
- if (rec.untracked !== void 0) parts.push(`untracked=${rec.untracked}`);
9423
+ if (rec.ledger_untracked !== void 0) parts.push(`ledger_untracked=${rec.ledger_untracked}`);
9424
+ if (rec.content_untracked !== void 0) parts.push(`content_untracked=${rec.content_untracked}`);
9425
+ if (rec.ledger_untracked === void 0 && rec.dirty !== void 0) parts.push(`dirty=${rec.dirty}`);
9426
+ if (rec.ledger_untracked === void 0 && rec.untracked !== void 0) parts.push(`untracked=${rec.untracked}`);
9423
9427
  if (rec.blocked_reason) parts.push(rec.blocked_reason);
9424
9428
  if (rec.detail && rec.detail !== rec.blocked_reason) parts.push(rec.detail);
9425
9429
  return parts.join(" ");
@@ -9492,13 +9496,17 @@ function defaultCopyStatusDeps(input) {
9492
9496
  const dirty = measureDirtyVolume(input.vault);
9493
9497
  const dirtyCount = dirty.is_git_repo ? dirty.expanded_files : void 0;
9494
9498
  const untrackedCount = dirty.is_git_repo ? dirty.untracked : void 0;
9495
- const dirtyHint = dirtyCount && dirtyCount > 0 ? `dirty=${dirtyCount} untracked=${untrackedCount ?? 0} live-ahead of GitHub; do not git add` : void 0;
9499
+ const ledgerUntracked = dirty.is_git_repo ? dirty.ledger_files : void 0;
9500
+ const contentUntracked = dirty.is_git_repo ? dirty.content_files : void 0;
9501
+ const dirtyHint = dirtyCount && dirtyCount > 0 ? ledgerUntracked && ledgerUntracked > 0 ? `event-ledger live-ahead of GitHub; do not git add` : `live-ahead of GitHub; do not git add` : void 0;
9496
9502
  return {
9497
9503
  head,
9498
9504
  behind: Number.isFinite(behind) ? behind : void 0,
9499
9505
  blockedReason,
9500
9506
  dirty: dirtyCount,
9501
9507
  untracked: untrackedCount,
9508
+ ledger_untracked: dirtyCount && dirtyCount > 0 ? ledgerUntracked : void 0,
9509
+ content_untracked: dirtyCount && dirtyCount > 0 ? contentUntracked : void 0,
9502
9510
  detail: dirtyHint ?? blockedReason
9503
9511
  };
9504
9512
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runSkillwikiMcpStdio
4
- } from "./chunk-IZ6I7GSG.js";
4
+ } from "./chunk-ZYVP52PM.js";
5
5
  import "./chunk-7I2TPIV5.js";
6
6
  import "./chunk-ZUHA2EXE.js";
7
7
  import "./chunk-6WE7E6VB.js";
@@ -100,6 +100,26 @@ CLOUD_REMOTE="${CLOUD_REMOTE:-cloud:cloud/wiki}"
100
100
  REPAIR_SCRIPT="${WIKI_GIT_REPAIR_SCRIPT:-$SCRIPT_DIR/wiki-git-repair-v3.sh}"
101
101
  MAX_S3_ONLY_NOTES="${WIKI_SNAPSHOT_MAX_S3_ONLY_NOTES:-200}"
102
102
  MAX_TOMBSTONE_PRUNES="${WIKI_SNAPSHOT_MAX_TOMBSTONE_PRUNES:-10}"
103
+
104
+ # Classified inventory: event ledger + local scratch are not GitHub-promotable notes.
105
+ # Cap and rclone must share this class. Do not raise MAX_S3_ONLY_NOTES instead.
106
+ # meta/log-events stay S3-authoritative; snapshot copies them separately for --events-from.
107
+ snapshot_non_promotable_path() {
108
+ local p="${1#./}"
109
+ case "$p" in
110
+ .skillwiki/*|.claude/*|.obsidian/*|.antigravitycli/*|.playwright-cli/*|.superpowers/*|.snapshots/*|.git/*|.drafts/*)
111
+ return 0 ;;
112
+ tmp/*|logs|logs/*|meta/log-events|meta/log-events/*)
113
+ return 0 ;;
114
+ raw/._.DS_Store|._.DS_Store)
115
+ return 0 ;;
116
+ ._*)
117
+ return 0 ;;
118
+ .conflict*|*.conflict-*)
119
+ return 0 ;;
120
+ esac
121
+ return 1
122
+ }
103
123
  PROJECTION_PARITY_TIMEOUT_SECONDS="${WIKI_SNAPSHOT_PROJECTION_PARITY_TIMEOUT_SECONDS:-120}"
104
124
  PROJECTION_PARITY_POLL_SECONDS="${WIKI_SNAPSHOT_PROJECTION_PARITY_POLL_SECONDS:-2}"
105
125
  PROJECTION_READ_TIMEOUT_SECONDS="${WIKI_SNAPSHOT_PROJECTION_READ_TIMEOUT_SECONDS:-15}"
@@ -185,7 +205,14 @@ snapshot_direct_s3_preflight() {
185
205
  fi
186
206
  SNAPSHOT_REMOTE_INVENTORY_READY=1
187
207
 
188
- grep -vE '^(\.skillwiki/|\.claude/|\.obsidian/|\.antigravitycli/|\.playwright-cli/|\.superpowers/|raw/\._\.DS_Store$|\._\.DS_Store$)' "$direct_paths" | LC_ALL=C sort -u > "$direct_notes" || true
208
+ : > "$direct_notes"
209
+ while IFS= read -r snapshot_inv_path || [ -n "$snapshot_inv_path" ]; do
210
+ [ -n "$snapshot_inv_path" ] || continue
211
+ if snapshot_non_promotable_path "$snapshot_inv_path"; then
212
+ continue
213
+ fi
214
+ printf '%s\n' "$snapshot_inv_path"
215
+ done < "$direct_paths" | LC_ALL=C sort -u > "$direct_notes" || true
189
216
  (
190
217
  cd "$SNAPSHOT_WORKTREE" || exit 1
191
218
  if git rev-parse --verify --quiet origin/main >/dev/null 2>&1; then
@@ -939,6 +966,11 @@ RCLONE_OPTS=(
939
966
  --exclude ".antigravitycli/**"
940
967
  --exclude ".playwright-cli/**"
941
968
  --exclude ".superpowers/**"
969
+ --exclude ".drafts/**"
970
+ --exclude "tmp/**"
971
+ --exclude "logs"
972
+ --exclude "logs/**"
973
+ --exclude "meta/log-events/**"
942
974
  --exclude "._*"
943
975
  --exclude ".conflict*"
944
976
  --exclude "*.conflict-*"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.89",
3
+ "version": "0.10.90",
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.89",
3
+ "version": "0.10.90",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by the deterministic `skillwiki` CLI.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.89",
3
+ "version": "0.10.90",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 21 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",
3
- "version": "0.10.89",
3
+ "version": "0.10.90",
4
4
  "description": "Project-aware Karpathy-style knowledge base: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by HTTP MCP wiki_capture.",
5
5
  "author": {
6
6
  "name": "karlorz"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.10.89",
3
+ "version": "0.10.90",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",