oh-my-adhd 0.2.5 β†’ 0.2.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.
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { getThreads, getThread, OPEN_SIGNAL, DONE_SIGNAL, extractFieldBrain } from "../../lib/brain.js";
2
+ import { getThreads, getThread, OPEN_SIGNAL, DONE_SIGNAL, extractFieldBrain, updateManifestEntry } from "../../lib/brain.js";
3
3
  import { runConsolidationIfDue } from "../../lib/consolidate.js";
4
4
  import { git } from "../utils.js";
5
5
  export function registerWikiRecall(server) {
@@ -72,6 +72,16 @@ export function registerWikiRecall(server) {
72
72
  const gapHours = isNaN(new Date(t.updatedAt).getTime())
73
73
  ? null
74
74
  : Math.round((Date.now() - new Date(t.updatedAt).getTime()) / 3600000);
75
+ // Back-fill manifest cache so stop hook sees correct is_open next time
76
+ updateManifestEntry(t.id, {
77
+ is_open,
78
+ is_done: isDone,
79
+ capture_count,
80
+ last_action: last_action.slice(0, 160),
81
+ next_action: next_action || undefined,
82
+ blocker: blocker || undefined,
83
+ title,
84
+ }).catch(() => { });
75
85
  return {
76
86
  threadId: t.id,
77
87
  title,
@@ -136,8 +146,16 @@ export function registerWikiRecall(server) {
136
146
  // Lead entry β€” the most important thread, formatted as a direct question
137
147
  const top = sorted[0];
138
148
  const others = sorted.slice(1);
149
+ // Stale-open threads: split by depth of abandonment
150
+ const GHOST_THRESHOLD_H = 336; // 2 weeks
151
+ const topIsGhost = top.is_open && top.status === "stale" && (top.gap_hours ?? 0) >= GHOST_THRESHOLD_H;
139
152
  // Lead section header
140
- if (top.is_open) {
153
+ if (topIsGhost) {
154
+ lines.push("## πŸ’€ 아직도 ν•  κ±°μ•Ό?\n");
155
+ const weeks = top.gap_hours !== null ? Math.floor(top.gap_hours / 168) : null;
156
+ lines.push(`_${weeks ? `${weeks}μ£Ό` : "μ˜€λž«λ™μ•ˆ"} λͺ» λ΄€μ–΄. 계속할 건지, 정리할 건지 κ²°μ •ν•΄μ€˜._\n`);
157
+ }
158
+ else if (top.is_open) {
141
159
  lines.push("## μ–΄μ œ 멈좘 κ³³\n");
142
160
  }
143
161
  else {
@@ -154,16 +172,18 @@ export function registerWikiRecall(server) {
154
172
  if (top.blocker)
155
173
  lines.push(`> β›” λ§‰νžŒκ²ƒ: ${top.blocker}`);
156
174
  // Call to action
157
- if (top.is_open) {
158
- lines.push(`>`);
175
+ lines.push(`>`);
176
+ if (topIsGhost) {
177
+ lines.push(`> β†’ μ΄μ–΄μ„œ? \`wiki_dump({ threadId: "${top.threadId}", content: "계속" })\``);
178
+ lines.push(`> β†’ 정리? \`wiki_dump({ threadId: "${top.threadId}", content: "κ²°μ •: 이 ν”„λ‘œμ νŠΈ μ’…λ£Œ" })\``);
179
+ }
180
+ else if (top.is_open) {
159
181
  lines.push(`> μ΄μ–΄μ„œ 갈까? (thread: \`${top.threadId}\`)`);
160
182
  }
161
183
  else {
162
- lines.push(`>`);
163
184
  lines.push(`> thread: \`${top.threadId}\``);
164
185
  }
165
186
  // Stale-open threads: split by depth of abandonment
166
- const GHOST_THRESHOLD_H = 336; // 2 weeks β€” "μ§„μ§œ μžŠν˜€μ§„ 것"
167
187
  const ghostThreads = others.filter(t => t.is_open && t.status === "stale" && (t.gap_hours ?? 0) >= GHOST_THRESHOLD_H);
168
188
  const forgottenThreads = others.filter(t => t.is_open && t.status === "stale" && (t.gap_hours ?? 0) < GHOST_THRESHOLD_H);
169
189
  const activeOthers = others.filter(t => !(t.is_open && t.status === "stale"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-adhd",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "ADHD second brain β€” zero-friction capture, auto context restore, unstick. MCP-native Claude Code plugin.",
5
5
  "author": "Yeachan Heo",
6
6
  "repository": {