@drewpayment/mink 0.12.0-beta.4 → 0.12.0-beta.6

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.
Files changed (48) hide show
  1. package/dashboard/out/404.html +1 -1
  2. package/dashboard/out/action-log.html +1 -1
  3. package/dashboard/out/action-log.txt +1 -1
  4. package/dashboard/out/activity.html +1 -1
  5. package/dashboard/out/activity.txt +1 -1
  6. package/dashboard/out/bugs.html +1 -1
  7. package/dashboard/out/bugs.txt +1 -1
  8. package/dashboard/out/capture.html +1 -1
  9. package/dashboard/out/capture.txt +1 -1
  10. package/dashboard/out/config.html +1 -1
  11. package/dashboard/out/config.txt +1 -1
  12. package/dashboard/out/daemon.html +1 -1
  13. package/dashboard/out/daemon.txt +1 -1
  14. package/dashboard/out/design.html +1 -1
  15. package/dashboard/out/design.txt +1 -1
  16. package/dashboard/out/discord.html +1 -1
  17. package/dashboard/out/discord.txt +1 -1
  18. package/dashboard/out/file-index.html +1 -1
  19. package/dashboard/out/file-index.txt +1 -1
  20. package/dashboard/out/index.html +1 -1
  21. package/dashboard/out/index.txt +1 -1
  22. package/dashboard/out/insights.html +1 -1
  23. package/dashboard/out/insights.txt +1 -1
  24. package/dashboard/out/learning.html +1 -1
  25. package/dashboard/out/learning.txt +1 -1
  26. package/dashboard/out/overview.html +1 -1
  27. package/dashboard/out/overview.txt +1 -1
  28. package/dashboard/out/scheduler.html +1 -1
  29. package/dashboard/out/scheduler.txt +1 -1
  30. package/dashboard/out/sync.html +1 -1
  31. package/dashboard/out/sync.txt +1 -1
  32. package/dashboard/out/tokens.html +1 -1
  33. package/dashboard/out/tokens.txt +1 -1
  34. package/dashboard/out/waste.html +1 -1
  35. package/dashboard/out/waste.txt +1 -1
  36. package/dashboard/out/wiki.html +1 -1
  37. package/dashboard/out/wiki.txt +1 -1
  38. package/dist/cli.bun.js +148 -69
  39. package/dist/cli.node.js +148 -69
  40. package/package.json +1 -1
  41. package/src/commands/post-read.ts +94 -9
  42. package/src/commands/status.ts +37 -12
  43. package/src/core/framework-advisor/generate.ts +11 -1
  44. package/src/core/note-linker.ts +12 -7
  45. package/src/core/state-aggregator.ts +3 -3
  46. package/src/types/hook-input.ts +10 -0
  47. /package/dashboard/out/_next/static/{i9-16JmUxsS4K70sSYdYA → 2qo2HCBP_HsNoQT7-KrRp}/_buildManifest.js +0 -0
  48. /package/dashboard/out/_next/static/{i9-16JmUxsS4K70sSYdYA → 2qo2HCBP_HsNoQT7-KrRp}/_ssgManifest.js +0 -0
package/dist/cli.bun.js CHANGED
@@ -2680,15 +2680,8 @@ function addBacklink(targetNotePath, sourceTitle) {
2680
2680
  }
2681
2681
  }
2682
2682
  function updateMasterIndex(vaultRootPath) {
2683
- const now = new Date().toISOString().split("T")[0];
2684
2683
  const sections = [
2685
- `---`,
2686
- `updated: "${new Date().toISOString()}"`,
2687
- `---`,
2688
- ``,
2689
2684
  `# Knowledge Base`,
2690
- ``,
2691
- `> Last updated: ${now}`,
2692
2685
  ``
2693
2686
  ];
2694
2687
  const categories = [
@@ -2721,6 +2714,13 @@ function updateMasterIndex(vaultRootPath) {
2721
2714
  }
2722
2715
  sections.push("");
2723
2716
  }
2717
+ const nowIso = new Date().toISOString();
2718
+ const nowDate = nowIso.split("T")[0];
2719
+ sections.push(`---`);
2720
+ sections.push(``);
2721
+ sections.push(`<!-- mink:footer (volatile \u2014 keep at end of file) -->`);
2722
+ sections.push(`> Last updated: ${nowDate} (${nowIso})`);
2723
+ sections.push(``);
2724
2724
  const indexPath = vaultMasterIndexPath();
2725
2725
  atomicWriteText(indexPath, sections.join(`
2726
2726
  `));
@@ -6528,16 +6528,6 @@ function checkJsonFile(name, filePath, validator) {
6528
6528
  return { name, path: filePath, status: "corrupt" };
6529
6529
  return { name, path: filePath, status: "ok" };
6530
6530
  }
6531
- function checkTextFile(name, filePath) {
6532
- if (!existsSync23(filePath))
6533
- return { name, path: filePath, status: "missing" };
6534
- try {
6535
- readFileSync17(filePath, "utf-8");
6536
- return { name, path: filePath, status: "ok" };
6537
- } catch {
6538
- return { name, path: filePath, status: "corrupt" };
6539
- }
6540
- }
6541
6531
  function checkDbFile(name, filePath) {
6542
6532
  if (!existsSync23(filePath))
6543
6533
  return { name, path: filePath, status: "missing" };
@@ -6551,6 +6541,33 @@ function checkDbFile(name, filePath) {
6551
6541
  return { name, path: filePath, status: "corrupt" };
6552
6542
  }
6553
6543
  }
6544
+ function checkShardedText(name, candidatePaths) {
6545
+ const canonical = candidatePaths[0];
6546
+ for (const p of candidatePaths) {
6547
+ if (!existsSync23(p))
6548
+ continue;
6549
+ try {
6550
+ if (statSync9(p).size === 0)
6551
+ continue;
6552
+ readFileSync17(p, "utf-8");
6553
+ return { name, path: p, status: "ok" };
6554
+ } catch {
6555
+ return { name, path: p, status: "corrupt" };
6556
+ }
6557
+ }
6558
+ return { name, path: canonical, status: "missing" };
6559
+ }
6560
+ function actionLogCandidates(cwd) {
6561
+ const dir = projectDir(cwd);
6562
+ return [
6563
+ actionLogPath(cwd),
6564
+ ...listDeviceShardsAt(dir).map((id) => shardPath(dir, id, "action-log.md"))
6565
+ ];
6566
+ }
6567
+ function learningMemoryCandidates(cwd) {
6568
+ const dir = projectDir(cwd);
6569
+ return [learningMemoryPath(cwd), ...listLearningMemorySidecarPathsAt(dir)];
6570
+ }
6554
6571
  function status(cwd) {
6555
6572
  console.log("[mink] project status");
6556
6573
  console.log();
@@ -6561,8 +6578,8 @@ function status(cwd) {
6561
6578
  checkJsonFile("session.json", sessionPath(cwd)),
6562
6579
  checkDbFile("mink.db", projectDbPath(cwd)),
6563
6580
  checkJsonFile("config.json", configPath(cwd)),
6564
- checkTextFile("learning-memory.md", learningMemoryPath(cwd)),
6565
- checkTextFile("action-log.md", actionLogPath(cwd))
6581
+ checkShardedText("learning-memory.md", learningMemoryCandidates(cwd)),
6582
+ checkShardedText("action-log.md", actionLogCandidates(cwd))
6566
6583
  ];
6567
6584
  console.log(" State files:");
6568
6585
  for (const check of checks) {
@@ -6759,20 +6776,46 @@ var init_pre_read = __esm(() => {
6759
6776
  var exports_post_read = {};
6760
6777
  __export(exports_post_read, {
6761
6778
  postRead: () => postRead,
6779
+ extractContent: () => extractContent,
6762
6780
  analyzePostRead: () => analyzePostRead
6763
6781
  });
6764
6782
  import { relative as relative4 } from "path";
6783
+ import { readFileSync as readFileSync18 } from "fs";
6765
6784
  function analyzePostRead(filePath, content, index) {
6766
6785
  if (isBinaryFile(filePath, content ?? undefined)) {
6767
6786
  const entry = index ? index.lookupEntry(filePath) : null;
6768
- return { estimatedTokens: 0, indexHit: !!entry, source: "none" };
6787
+ return {
6788
+ estimatedTokens: 0,
6789
+ indexHit: !!entry,
6790
+ source: "none",
6791
+ indexEntry: null
6792
+ };
6769
6793
  }
6770
6794
  if (content !== null && content.length > 0) {
6771
6795
  const entry = index ? index.lookupEntry(filePath) : null;
6796
+ const tokens = estimateTokens2(content, filePath);
6797
+ let indexEntry = null;
6798
+ if (!entry) {
6799
+ let description = "";
6800
+ try {
6801
+ description = extractDescription(filePath, content);
6802
+ } catch {
6803
+ description = "";
6804
+ }
6805
+ const now = new Date().toISOString();
6806
+ indexEntry = {
6807
+ filePath,
6808
+ description,
6809
+ estimatedTokens: tokens,
6810
+ lastModified: now,
6811
+ lastIndexed: now
6812
+ };
6813
+ }
6772
6814
  return {
6773
- estimatedTokens: estimateTokens2(content, filePath),
6815
+ estimatedTokens: tokens,
6774
6816
  indexHit: !!entry,
6775
- source: "content"
6817
+ source: "content",
6818
+ indexEntry
6776
6819
  };
6777
6820
  }
6778
6821
  if (index) {
@@ -6781,11 +6824,17 @@ function analyzePostRead(filePath, content, index) {
6781
6824
  return {
6782
6825
  estimatedTokens: entry.estimatedTokens,
6783
6826
  indexHit: true,
6784
- source: "index-fallback"
6827
+ source: "index-fallback",
6828
+ indexEntry: null
6785
6829
  };
6786
6830
  }
6787
6831
  }
6788
- return { estimatedTokens: 0, indexHit: false, source: "none" };
6832
+ return {
6833
+ estimatedTokens: 0,
6834
+ indexHit: false,
6835
+ source: "none",
6836
+ indexEntry: null
6837
+ };
6789
6838
  }
6790
6839
  function isPostToolUseInput(value) {
6791
6840
  if (value === null || typeof value !== "object")
@@ -6798,9 +6847,22 @@ function isPostToolUseInput(value) {
6798
6847
  return true;
6799
6848
  }
6800
6849
  function extractContent(input) {
6801
- if (!input.tool_output)
6802
- return null;
6803
- if (typeof input.tool_output.content === "string") {
6850
+ const tr = input.tool_response;
6851
+ if (tr) {
6852
+ if (typeof tr.content === "string")
6853
+ return tr.content;
6854
+ if (Array.isArray(tr.content)) {
6855
+ const parts = tr.content.map((p) => p && typeof p.text === "string" ? p.text : "").filter((s) => s.length > 0);
6856
+ if (parts.length > 0)
6857
+ return parts.join("");
6858
+ }
6859
+ if (tr.file && typeof tr.file.content === "string") {
6860
+ return tr.file.content;
6861
+ }
6862
+ if (typeof tr.text === "string")
6863
+ return tr.text;
6864
+ }
6865
+ if (input.tool_output && typeof input.tool_output.content === "string") {
6804
6866
  return input.tool_output.content;
6805
6867
  }
6806
6868
  return null;
@@ -6820,8 +6882,19 @@ async function postRead(cwd) {
6820
6882
  const rawState = safeReadJson(sessionPath(cwd));
6821
6883
  const state = isSessionState(rawState) ? rawState : createSessionState();
6822
6884
  const repo = FileIndexRepo.for(cwd);
6823
- const content = extractContent(input);
6885
+ let content = null;
6886
+ try {
6887
+ content = readFileSync18(absolutePath, "utf-8");
6888
+ } catch {}
6889
+ if (content === null) {
6890
+ content = extractContent(input);
6891
+ }
6824
6892
  const result = analyzePostRead(filePath, content, repo);
6893
+ if (result.indexEntry) {
6894
+ try {
6895
+ repo.upsert(result.indexEntry);
6896
+ } catch {}
6897
+ }
6825
6898
  recordRead(state, filePath, result.estimatedTokens, result.indexHit);
6826
6899
  try {
6827
6900
  const logWriter = createActionLogWriter(actionLogShardPath(cwd, getOrCreateDeviceId()));
@@ -6838,6 +6911,7 @@ var init_post_read = __esm(() => {
6838
6911
  init_session();
6839
6912
  init_file_index_repo();
6840
6913
  init_token_estimate();
6914
+ init_description();
6841
6915
  init_action_log();
6842
6916
  init_device();
6843
6917
  });
@@ -7038,7 +7112,7 @@ __export(exports_post_write, {
7038
7112
  analyzePostWrite: () => analyzePostWrite
7039
7113
  });
7040
7114
  import { relative as relative6 } from "path";
7041
- import { readFileSync as readFileSync18 } from "fs";
7115
+ import { readFileSync as readFileSync19 } from "fs";
7042
7116
  function analyzePostWrite(filePath, fileContent, index) {
7043
7117
  if (isWriteExcluded(filePath)) {
7044
7118
  return {
@@ -7102,7 +7176,7 @@ async function postWrite(cwd) {
7102
7176
  const filePath = relative6(cwd, absolutePath);
7103
7177
  let fileContent = null;
7104
7178
  try {
7105
- fileContent = readFileSync18(absolutePath, "utf-8");
7179
+ fileContent = readFileSync19(absolutePath, "utf-8");
7106
7180
  } catch {}
7107
7181
  const rawState = safeReadJson(sessionPath(cwd));
7108
7182
  const state = isSessionState(rawState) ? rawState : createSessionState();
@@ -7403,7 +7477,7 @@ __export(exports_self_update, {
7403
7477
  PACKAGE_NAME: () => PACKAGE_NAME
7404
7478
  });
7405
7479
  import { spawnSync as spawnSync2 } from "child_process";
7406
- import { existsSync as existsSync24, readFileSync as readFileSync19 } from "fs";
7480
+ import { existsSync as existsSync24, readFileSync as readFileSync20 } from "fs";
7407
7481
  import { dirname as dirname10 } from "path";
7408
7482
  import { join as join21 } from "path";
7409
7483
  function parseSemver(input) {
@@ -7470,7 +7544,7 @@ function getInstallInfo() {
7470
7544
  }
7471
7545
  let currentVersion = "0.0.0";
7472
7546
  try {
7473
- const pkg = JSON.parse(readFileSync19(packageJsonPath, "utf-8"));
7547
+ const pkg = JSON.parse(readFileSync20(packageJsonPath, "utf-8"));
7474
7548
  if (typeof pkg.version === "string")
7475
7549
  currentVersion = pkg.version;
7476
7550
  } catch {}
@@ -7543,7 +7617,7 @@ function appendLogEntry(entry) {
7543
7617
  }
7544
7618
  function rotateLogIfNeeded(path) {
7545
7619
  try {
7546
- const content = readFileSync19(path, "utf-8");
7620
+ const content = readFileSync20(path, "utf-8");
7547
7621
  const lines = content.split(`
7548
7622
  `);
7549
7623
  if (lines.length <= LOG_MAX_LINES + 1)
@@ -7646,7 +7720,7 @@ async function runSelfUpgradeInner(opts) {
7646
7720
  }
7647
7721
  let verifiedVersion = latest;
7648
7722
  try {
7649
- const pkg = JSON.parse(readFileSync19(info.packageJsonPath, "utf-8"));
7723
+ const pkg = JSON.parse(readFileSync20(info.packageJsonPath, "utf-8"));
7650
7724
  if (typeof pkg.version === "string")
7651
7725
  verifiedVersion = pkg.version;
7652
7726
  } catch {}
@@ -7752,10 +7826,10 @@ async function executeTask(taskId, projectCwd) {
7752
7826
  if (task.actionType === "ai-cli") {
7753
7827
  try {
7754
7828
  const { learningMemoryPath: learningMemoryPath4 } = await Promise.resolve().then(() => (init_paths(), exports_paths));
7755
- const { readFileSync: readFileSync20 } = await import("fs");
7829
+ const { readFileSync: readFileSync21 } = await import("fs");
7756
7830
  let memoryContent;
7757
7831
  try {
7758
- memoryContent = readFileSync20(learningMemoryPath4(projectCwd), "utf-8");
7832
+ memoryContent = readFileSync21(learningMemoryPath4(projectCwd), "utf-8");
7759
7833
  } catch {
7760
7834
  console.log("[mink] no learning memory found, skipping reflection");
7761
7835
  return;
@@ -8320,7 +8394,7 @@ var init_cron = __esm(() => {
8320
8394
 
8321
8395
  // src/core/vault-templates.ts
8322
8396
  import { join as join22 } from "path";
8323
- import { existsSync as existsSync25, writeFileSync as writeFileSync9, readFileSync as readFileSync20, mkdirSync as mkdirSync13 } from "fs";
8397
+ import { existsSync as existsSync25, writeFileSync as writeFileSync9, readFileSync as readFileSync21, mkdirSync as mkdirSync13 } from "fs";
8324
8398
  function seedTemplates(templatesDir) {
8325
8399
  mkdirSync13(templatesDir, { recursive: true });
8326
8400
  for (const [name, content] of Object.entries(DEFAULT_TEMPLATES)) {
@@ -8334,7 +8408,7 @@ function loadTemplate(templatesDir, templateName, vars) {
8334
8408
  const filePath = join22(templatesDir, `${templateName}.md`);
8335
8409
  let content;
8336
8410
  if (existsSync25(filePath)) {
8337
- content = readFileSync20(filePath, "utf-8");
8411
+ content = readFileSync21(filePath, "utf-8");
8338
8412
  } else if (DEFAULT_TEMPLATES[templateName]) {
8339
8413
  content = DEFAULT_TEMPLATES[templateName];
8340
8414
  } else {
@@ -8488,7 +8562,7 @@ category: resources
8488
8562
 
8489
8563
  // src/core/note-writer.ts
8490
8564
  import { join as join23 } from "path";
8491
- import { existsSync as existsSync26, readFileSync as readFileSync21 } from "fs";
8565
+ import { existsSync as existsSync26, readFileSync as readFileSync22 } from "fs";
8492
8566
  import { createHash as createHash3 } from "crypto";
8493
8567
  function sha256(content) {
8494
8568
  return createHash3("sha256").update(content).digest("hex");
@@ -8513,7 +8587,7 @@ function resolveUniqueNotePath(dir, baseSlug, content) {
8513
8587
  }
8514
8588
  function sameContent(filePath, expectedHash) {
8515
8589
  try {
8516
- return sha256(readFileSync21(filePath, "utf-8")) === expectedHash;
8590
+ return sha256(readFileSync22(filePath, "utf-8")) === expectedHash;
8517
8591
  } catch {
8518
8592
  return false;
8519
8593
  }
@@ -8622,7 +8696,7 @@ ${content}
8622
8696
  return filePath;
8623
8697
  }
8624
8698
  function ingestFile(sourcePath, meta) {
8625
- const raw = readFileSync21(sourcePath, "utf-8");
8699
+ const raw = readFileSync22(sourcePath, "utf-8");
8626
8700
  const now = new Date().toISOString();
8627
8701
  const headingMatch = raw.match(/^#\s+(.+)$/m);
8628
8702
  const title = headingMatch?.[1] ?? sourcePath.split("/").pop().replace(/\.md$/, "");
@@ -8694,7 +8768,7 @@ var init_design_eval = __esm(() => {
8694
8768
  });
8695
8769
 
8696
8770
  // src/core/dashboard-api.ts
8697
- import { existsSync as existsSync27, readFileSync as readFileSync22 } from "fs";
8771
+ import { existsSync as existsSync27, readFileSync as readFileSync23 } from "fs";
8698
8772
  import { readdirSync as readdirSync9, readFileSync as readFileSyncFS, existsSync as fsExistsSync } from "fs";
8699
8773
  import { join as join24, resolve as resolve5, normalize, sep } from "path";
8700
8774
  import { execSync as execSync6 } from "child_process";
@@ -8718,11 +8792,11 @@ function checkJsonFile2(name, filePath, validator) {
8718
8792
  return { name, status: "corrupt" };
8719
8793
  return { name, status: "ok" };
8720
8794
  }
8721
- function checkTextFile2(name, filePath) {
8795
+ function checkTextFile(name, filePath) {
8722
8796
  if (!existsSync27(filePath))
8723
8797
  return { name, status: "missing" };
8724
8798
  try {
8725
- readFileSync22(filePath, "utf-8");
8799
+ readFileSync23(filePath, "utf-8");
8726
8800
  return { name, status: "ok" };
8727
8801
  } catch {
8728
8802
  return { name, status: "corrupt" };
@@ -8732,7 +8806,7 @@ function checkDbFile2(name, filePath) {
8732
8806
  if (!existsSync27(filePath))
8733
8807
  return { name, status: "missing" };
8734
8808
  try {
8735
- const header = readFileSync22(filePath).slice(0, 16).toString("utf-8");
8809
+ const header = readFileSync23(filePath).slice(0, 16).toString("utf-8");
8736
8810
  return header.startsWith("SQLite format 3") ? { name, status: "ok" } : { name, status: "corrupt" };
8737
8811
  } catch {
8738
8812
  return { name, status: "corrupt" };
@@ -8767,8 +8841,8 @@ function loadOverview(cwd) {
8767
8841
  checkJsonFile2("session.json", sessionPath(cwd)),
8768
8842
  checkDbFile2("mink.db", projectDbPath(cwd)),
8769
8843
  checkJsonFile2("config.json", configPath(cwd)),
8770
- checkTextFile2("learning-memory.md", learningMemoryPath(cwd)),
8771
- checkTextFile2("action-log.md", actionLogPath(cwd)),
8844
+ checkTextFile("learning-memory.md", learningMemoryPath(cwd)),
8845
+ checkTextFile("action-log.md", actionLogPath(cwd)),
8772
8846
  checkJsonFile2("scheduler-manifest.json", schedulerManifestPath(cwd))
8773
8847
  ];
8774
8848
  return { project, daemon, summary, stateFiles };
@@ -10322,7 +10396,7 @@ var exports_daemon = {};
10322
10396
  __export(exports_daemon, {
10323
10397
  daemon: () => daemon
10324
10398
  });
10325
- import { readFileSync as readFileSync23, existsSync as existsSync31 } from "fs";
10399
+ import { readFileSync as readFileSync24, existsSync as existsSync31 } from "fs";
10326
10400
  async function daemon(cwd, args) {
10327
10401
  const subcommand = args[0];
10328
10402
  switch (subcommand) {
@@ -10343,7 +10417,7 @@ async function daemon(cwd, args) {
10343
10417
  return;
10344
10418
  }
10345
10419
  try {
10346
- const content = readFileSync23(logPath, "utf-8");
10420
+ const content = readFileSync24(logPath, "utf-8");
10347
10421
  const lines = content.split(`
10348
10422
  `);
10349
10423
  const tail = lines.slice(-50).join(`
@@ -10924,7 +10998,7 @@ var init_restore = __esm(() => {
10924
10998
  });
10925
10999
 
10926
11000
  // src/core/design-eval/server-detect.ts
10927
- import { readFileSync as readFileSync24 } from "fs";
11001
+ import { readFileSync as readFileSync25 } from "fs";
10928
11002
  import { join as join27 } from "path";
10929
11003
  async function probePort(port) {
10930
11004
  try {
@@ -10947,7 +11021,7 @@ async function findRunningServer(ports = DEFAULT_PROBE_PORTS) {
10947
11021
  }
10948
11022
  function detectDevCommand(cwd) {
10949
11023
  try {
10950
- const raw = readFileSync24(join27(cwd, "package.json"), "utf-8");
11024
+ const raw = readFileSync25(join27(cwd, "package.json"), "utf-8");
10951
11025
  const pkg = JSON.parse(raw);
10952
11026
  const scripts = pkg.scripts;
10953
11027
  if (!scripts || typeof scripts !== "object")
@@ -80449,7 +80523,7 @@ var init_fileUtil = __esm(() => {
80449
80523
  // node_modules/@puppeteer/browsers/lib/esm/install.js
80450
80524
  import assert2 from "assert";
80451
80525
  import { spawnSync as spawnSync4 } from "child_process";
80452
- import { existsSync as existsSync33, readFileSync as readFileSync25 } from "fs";
80526
+ import { existsSync as existsSync33, readFileSync as readFileSync26 } from "fs";
80453
80527
  import { mkdir as mkdir2, unlink } from "fs/promises";
80454
80528
  import os5 from "os";
80455
80529
  import path8 from "path";
@@ -80539,7 +80613,7 @@ async function installDeps(installedBrowser) {
80539
80613
  debugInstall(`deb.deps file was not found at ${depsPath}`);
80540
80614
  return;
80541
80615
  }
80542
- const data = readFileSync25(depsPath, "utf-8").split(`
80616
+ const data = readFileSync26(depsPath, "utf-8").split(`
80543
80617
  `).join(",");
80544
80618
  if (process.getuid?.() !== 0) {
80545
80619
  throw new Error("Installing system dependencies requires root privileges");
@@ -82064,14 +82138,14 @@ var init_yerror = __esm(() => {
82064
82138
  });
82065
82139
 
82066
82140
  // node_modules/y18n/build/lib/platform-shims/node.js
82067
- import { readFileSync as readFileSync26, statSync as statSync13, writeFile } from "fs";
82141
+ import { readFileSync as readFileSync27, statSync as statSync13, writeFile } from "fs";
82068
82142
  import { format as format2 } from "util";
82069
82143
  import { resolve as resolve11 } from "path";
82070
82144
  var node_default;
82071
82145
  var init_node = __esm(() => {
82072
82146
  node_default = {
82073
82147
  fs: {
82074
- readFileSync: readFileSync26,
82148
+ readFileSync: readFileSync27,
82075
82149
  writeFile
82076
82150
  },
82077
82151
  format: format2,
@@ -82256,7 +82330,7 @@ var init_y18n = __esm(() => {
82256
82330
  // node_modules/yargs/lib/platform-shims/esm.mjs
82257
82331
  import { notStrictEqual, strictEqual } from "assert";
82258
82332
  import { inspect } from "util";
82259
- import { readFileSync as readFileSync27 } from "fs";
82333
+ import { readFileSync as readFileSync28 } from "fs";
82260
82334
  import { fileURLToPath } from "url";
82261
82335
  import { basename as basename8, dirname as dirname14, extname as extname3, relative as relative8, resolve as resolve12 } from "path";
82262
82336
  var REQUIRE_ERROR = "require is not supported by ESM", REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM", __dirname2, mainFilename, esm_default;
@@ -82305,7 +82379,7 @@ var init_esm = __esm(() => {
82305
82379
  nextTick: process.nextTick,
82306
82380
  stdColumns: typeof process.stdout.columns !== "undefined" ? process.stdout.columns : null
82307
82381
  },
82308
- readFileSync: readFileSync27,
82382
+ readFileSync: readFileSync28,
82309
82383
  require: () => {
82310
82384
  throw new YError(REQUIRE_ERROR);
82311
82385
  },
@@ -88564,7 +88638,7 @@ function generateKnowledgeMarkdown(k) {
88564
88638
  const parts = [];
88565
88639
  parts.push(`# Framework Advisor Knowledge Base`);
88566
88640
  parts.push("");
88567
- parts.push(`> Generated: ${k.generatedAt} | Version: ${k.version} | Frameworks: ${k.frameworks.length}`);
88641
+ parts.push(`> Version: ${k.version} | Frameworks: ${k.frameworks.length}`);
88568
88642
  parts.push("");
88569
88643
  parts.push("## Comparison Matrix");
88570
88644
  parts.push("");
@@ -88620,6 +88694,11 @@ function generateKnowledgeMarkdown(k) {
88620
88694
  parts.push("");
88621
88695
  }
88622
88696
  }
88697
+ parts.push(`---`);
88698
+ parts.push(``);
88699
+ parts.push(`<!-- mink:footer (volatile \u2014 keep at end of file) -->`);
88700
+ parts.push(`> Generated: ${k.generatedAt}`);
88701
+ parts.push(``);
88623
88702
  return parts.join(`
88624
88703
  `);
88625
88704
  }
@@ -89095,7 +89174,7 @@ __export(exports_note, {
89095
89174
  note: () => note
89096
89175
  });
89097
89176
  import { resolve as resolve14 } from "path";
89098
- import { existsSync as existsSync37, readFileSync as readFileSync28 } from "fs";
89177
+ import { existsSync as existsSync37, readFileSync as readFileSync29 } from "fs";
89099
89178
  async function note(cwd, args) {
89100
89179
  if (!isWikiEnabled()) {
89101
89180
  console.error("[mink] wiki feature is disabled");
@@ -89120,7 +89199,7 @@ async function note(cwd, args) {
89120
89199
  const date = new Date().toISOString().split("T")[0];
89121
89200
  const content = parsed.positional || parsed.body || "";
89122
89201
  const filePath = appendToDaily(date, content);
89123
- updateVaultIndexForFile(filePath, readFileSync28(filePath, "utf-8"));
89202
+ updateVaultIndexForFile(filePath, readFileSync29(filePath, "utf-8"));
89124
89203
  console.log(`[mink] daily note: ${filePath}`);
89125
89204
  return;
89126
89205
  }
@@ -89453,7 +89532,7 @@ import { homedir as homedir6 } from "os";
89453
89532
  import {
89454
89533
  existsSync as existsSync39,
89455
89534
  mkdirSync as mkdirSync17,
89456
- readFileSync as readFileSync29,
89535
+ readFileSync as readFileSync30,
89457
89536
  writeFileSync as writeFileSync11
89458
89537
  } from "fs";
89459
89538
  import { createHash as createHash4 } from "crypto";
@@ -89477,7 +89556,7 @@ function getMinkVersion() {
89477
89556
  const pkgPath = join33(dir, "package.json");
89478
89557
  if (existsSync39(pkgPath)) {
89479
89558
  try {
89480
- const pkg = JSON.parse(readFileSync29(pkgPath, "utf-8"));
89559
+ const pkg = JSON.parse(readFileSync30(pkgPath, "utf-8"));
89481
89560
  if (pkg.name && pkg.version)
89482
89561
  return pkg.version;
89483
89562
  } catch {}
@@ -89515,7 +89594,7 @@ function installAgentDefinition(opts) {
89515
89594
  if (opts.skip && existsSync39(installed)) {
89516
89595
  return { action: "skipped", path: installed };
89517
89596
  }
89518
- const template = readFileSync29(templatePath, "utf-8");
89597
+ const template = readFileSync30(templatePath, "utf-8");
89519
89598
  const rendered = renderTemplate(template, {
89520
89599
  MINK_ROOT: minkRoot(),
89521
89600
  VAULT_PATH: resolveVaultPath(),
@@ -89523,7 +89602,7 @@ function installAgentDefinition(opts) {
89523
89602
  });
89524
89603
  const exists = existsSync39(installed);
89525
89604
  if (!opts.force && exists) {
89526
- const current = readFileSync29(installed, "utf-8");
89605
+ const current = readFileSync30(installed, "utf-8");
89527
89606
  if (sha2562(current) === sha2562(rendered)) {
89528
89607
  return { action: "unchanged", path: installed };
89529
89608
  }
@@ -89651,7 +89730,7 @@ var init_agent = __esm(() => {
89651
89730
  });
89652
89731
 
89653
89732
  // src/core/sync-merge-drivers.ts
89654
- import { readFileSync as readFileSync30, writeFileSync as writeFileSync12, appendFileSync as appendFileSync2, copyFileSync as copyFileSync2, unlinkSync as unlinkSync7 } from "fs";
89733
+ import { readFileSync as readFileSync31, writeFileSync as writeFileSync12, appendFileSync as appendFileSync2, copyFileSync as copyFileSync2, unlinkSync as unlinkSync7 } from "fs";
89655
89734
  import { join as join34 } from "path";
89656
89735
  function logWarning(driver, args, err) {
89657
89736
  try {
@@ -89662,14 +89741,14 @@ function logWarning(driver, args, err) {
89662
89741
  }
89663
89742
  function readJsonOrNull(path12) {
89664
89743
  try {
89665
- return JSON.parse(readFileSync30(path12, "utf-8"));
89744
+ return JSON.parse(readFileSync31(path12, "utf-8"));
89666
89745
  } catch {
89667
89746
  return null;
89668
89747
  }
89669
89748
  }
89670
89749
  function readTextOrEmpty(path12) {
89671
89750
  try {
89672
- return readFileSync30(path12, "utf-8");
89751
+ return readFileSync31(path12, "utf-8");
89673
89752
  } catch {
89674
89753
  return "";
89675
89754
  }
@@ -90559,9 +90638,9 @@ switch (command2) {
90559
90638
  const { resolve: resolve17, dirname: dirname18, basename: basename9 } = await import("path");
90560
90639
  const bundlePath = new URL(import.meta.url).pathname;
90561
90640
  const cliPath = resolve17(dirname18(bundlePath));
90562
- const { readFileSync: readFileSync31 } = await import("fs");
90641
+ const { readFileSync: readFileSync32 } = await import("fs");
90563
90642
  try {
90564
- const pkg = JSON.parse(readFileSync31(resolve17(cliPath, "../package.json"), "utf-8"));
90643
+ const pkg = JSON.parse(readFileSync32(resolve17(cliPath, "../package.json"), "utf-8"));
90565
90644
  console.log(`mink ${pkg.version}`);
90566
90645
  } catch {
90567
90646
  console.log("mink (unknown version)");