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

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 (46) 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 +116 -54
  39. package/dist/cli.node.js +116 -54
  40. package/package.json +1 -1
  41. package/src/commands/post-read.ts +94 -9
  42. package/src/core/framework-advisor/generate.ts +11 -1
  43. package/src/core/note-linker.ts +12 -7
  44. package/src/types/hook-input.ts +10 -0
  45. /package/dashboard/out/_next/static/{i9-16JmUxsS4K70sSYdYA → eZlC6TEe7TWUABN2-Ho0J}/_buildManifest.js +0 -0
  46. /package/dashboard/out/_next/static/{i9-16JmUxsS4K70sSYdYA → eZlC6TEe7TWUABN2-Ho0J}/_ssgManifest.js +0 -0
@@ -67,16 +67,12 @@ export function addBacklink(
67
67
  }
68
68
 
69
69
  export function updateMasterIndex(vaultRootPath: string): void {
70
- const now = new Date().toISOString().split("T")[0];
70
+ // Prompt-cache stability: keep the prefix (title + stable category sections)
71
+ // at the top. Volatile fields (updated timestamps) live in the footer so a
72
+ // regenerated index never busts an LLM provider's prefix prompt cache.
71
73
  const sections: string[] = [
72
- `---`,
73
- `updated: "${new Date().toISOString()}"`,
74
- `---`,
75
- ``,
76
74
  `# Knowledge Base`,
77
75
  ``,
78
- `> Last updated: ${now}`,
79
- ``,
80
76
  ];
81
77
 
82
78
  const categories = [
@@ -115,6 +111,15 @@ export function updateMasterIndex(vaultRootPath: string): void {
115
111
  sections.push("");
116
112
  }
117
113
 
114
+ // ── Footer (volatile, must stay at the END for prompt-cache stability) ──
115
+ const nowIso = new Date().toISOString();
116
+ const nowDate = nowIso.split("T")[0];
117
+ sections.push(`---`);
118
+ sections.push(``);
119
+ sections.push(`<!-- mink:footer (volatile — keep at end of file) -->`);
120
+ sections.push(`> Last updated: ${nowDate} (${nowIso})`);
121
+ sections.push(``);
122
+
118
123
  const indexPath = vaultMasterIndexPath();
119
124
  atomicWriteText(indexPath, sections.join("\n"));
120
125
  }
@@ -20,8 +20,18 @@ export interface PostToolUseInput {
20
20
  old_string?: string;
21
21
  new_string?: string;
22
22
  };
23
+ // Legacy / older hook payload shape — kept for backward compatibility.
23
24
  tool_output?: {
24
25
  content?: string;
25
26
  [key: string]: unknown;
26
27
  };
28
+ // Current Claude Code PostToolUse shape (>= 0.x). The Read tool delivers
29
+ // file content nested under `tool_response`; the exact field depends on
30
+ // the tool. We accept several common shapes opportunistically.
31
+ tool_response?: {
32
+ content?: string | Array<{ type?: string; text?: string }>;
33
+ file?: { content?: string };
34
+ text?: string;
35
+ [key: string]: unknown;
36
+ };
27
37
  }