hypomnema 1.6.1 → 1.6.2
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.
package/README.ko.md
CHANGED
|
@@ -25,7 +25,7 @@ Andrej Karpathy의 "LLM 네이티브 위키" 스케치에서 출발했습니다.
|
|
|
25
25
|
|
|
26
26
|
### 지금 어디까지 자동인가
|
|
27
27
|
|
|
28
|
-
현재 릴리스는 v1.6.
|
|
28
|
+
현재 릴리스는 v1.6.2입니다. 세션종료 재확인이 백그라운드 셸 작업이나 예약된 wake도 진행 중 작업으로 보게 해, 백그라운드 명령을 기다리며 유예된 close("퍼블리시 하고 세션 마무리")가 매 턴 마커를 조르지 않습니다. 그 앞 v1.6.1은 조건부나 유예된 세션 마무리에서 미커밋이나 진행 중인 작업이 남아 문구가 모호할 때 조기 nag 대신 지금 닫을지 되묻고, `working_dir` provenance를 강화해 앵커가 없던 프로젝트도 `cwd`-first resume이 앵커하도록 고쳤습니다. 그 앞 v1.6.0은 역방향 확장 capture를 완성했습니다. `hypomnema capture`(그리고 `/hypo:capture` 슬래시 커맨드)가 `~/.claude/` 아래에 보통 방식으로 만든 command·agent·hook을 위키로 끌어와, forward-sync가 다른 머신에 원래 이름 그대로 전파합니다. 손으로 만든 확장의 "한 머신에서 등록, 다른 머신에서 동기화" 갭을 데몬 없이 메웁니다. 그 앞 v1.5.1은 위키가 자기 신선도를 알리는 방식을 다듬었습니다. `verify_by_date`가 지난 페이지는 주입되는 순간 `[STALE ...]`로 표시되고, lookup 사용을 로컬에서 추적해 링크됐지만 한 번도 주입되지 않은 페이지를 crystallize가 cold 후보로 표면화하며, 표준 `session | project: title` 콜론 로그 포맷을 stale로 오진하던 세션 마무리도 견고해졌습니다. 다시 그 앞 v1.5.0은 머신 간 안정성에 집중했습니다. git 동기화 볼트의 `cwd`-first resume와 코드 레포 세션에 위키 위치를 안내하는 것이었습니다.
|
|
29
29
|
|
|
30
30
|
위키 작업(자료 정리·검색·세션 마무리)은 아직 `/hypo:*` 명령이나 자연어로 시작합니다. v2의 목표는 Claude가 시키지 않아도 위키를 읽고 쓰고 합성하는 완전 자율 동작이고, 지금 그쪽으로 가는 중입니다.
|
|
31
31
|
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ New to the terms below? Keep the [Term decoder](#term-decoder) open in another t
|
|
|
25
25
|
|
|
26
26
|
### Where automation stands today
|
|
27
27
|
|
|
28
|
-
The current release is v1.6.
|
|
28
|
+
The current release is v1.6.2. It teaches session-close reconfirm to treat a background shell task or a scheduled wake as work still in flight, so a deferred close ("publish, then wrap up") waiting on a background command no longer nags for the marker on every turn. The v1.6.1 release before it fixes session close so a conditional or deferred wrap-up ("once X is done, wrap up") that still has uncommitted or in-flight work asks you whether to close now instead of nagging prematurely, and it hardens `working_dir` provenance so `cwd`-first resume can anchor a project that was missing its anchor. The v1.6.0 release before it completed reverse extension capture: `hypomnema capture` (and the `/hypo:capture` slash command) pulls a command, agent, or hook you created the normal way under `~/.claude/` into the wiki, so forward-sync propagates it to your other machines under its original name. That closes the "register on one machine, sync on another" gap for extensions you author by hand, without a daemon. The v1.5.1 release before it sharpened how the wiki signals its own freshness: a page whose `verify_by_date` has passed is flagged `[STALE ...]` the moment it is injected, lookup usage is tracked locally so crystallize can surface a linked-but-never-injected page as a cold candidate, and session close was made robust to the standard `session | project: title` colon log format that had been misread as stale. The v1.5.0 line before that turned to cross-machine reliability: `cwd`-first resume on a git-synced vault and a code-repo session told where the wiki lives.
|
|
29
29
|
|
|
30
30
|
Wiki work (ingest, query, session-close) still starts from an explicit `/hypo:*` command or plain language. The v2 goal is full autonomy: Claude reading, writing, and synthesizing the wiki without being asked, which is the direction this is heading.
|
|
31
31
|
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
* gate above was found to be unable to distinguish "close now" from "close
|
|
37
37
|
* once X is done" by regex alone — same sentence shape either way). When the
|
|
38
38
|
* close-intent gate above fires AND the session has a work-incomplete signal
|
|
39
|
-
* (an uncommitted wiki, or
|
|
40
|
-
*
|
|
39
|
+
* (an uncommitted wiki, or pending background work — a non-terminal
|
|
40
|
+
* background task or a scheduled cron wake — per hasPendingBackgroundWork),
|
|
41
|
+
* step 6's block reason is replaced with an
|
|
41
42
|
* AskUserQuestion instruction instead of a crystallize command — the model
|
|
42
43
|
* asks the user "close now?" rather than deciding for them. A correlated
|
|
43
44
|
* "아직"/"나중"/"not yet"/"later" answer (isCloseReconfirmDeclined) suppresses
|
|
@@ -65,7 +66,7 @@ import {
|
|
|
65
66
|
isClosePattern,
|
|
66
67
|
isGateSkipped,
|
|
67
68
|
precompactGateStatus,
|
|
68
|
-
|
|
69
|
+
hasPendingBackgroundWork,
|
|
69
70
|
isCloseReconfirmDeclined,
|
|
70
71
|
CLOSE_RECONFIRM_MARK,
|
|
71
72
|
} from './hypo-shared.mjs';
|
|
@@ -95,8 +96,8 @@ function emitBlock(sessionId, transcriptPath, gate = null, opts = {}) {
|
|
|
95
96
|
JSON.stringify({
|
|
96
97
|
decision: 'block',
|
|
97
98
|
reason:
|
|
98
|
-
`[WIKI_AUTOCLOSE] close 신호가 잡혔지만 아직 커밋되지 않은 변경
|
|
99
|
-
|
|
99
|
+
`[WIKI_AUTOCLOSE] close 신호가 잡혔지만 아직 커밋되지 않은 변경 또는 진행 중인 ` +
|
|
100
|
+
`백그라운드·위임 작업이 있어 지금 닫을지 뒤로 미룰지 모호합니다 (session_id=${sessionId}). ` +
|
|
100
101
|
`임의로 닫지 말고 AskUserQuestion으로 사용자에게 지금 세션을 닫을지 물어보세요. ` +
|
|
101
102
|
`선택지는 "${CLOSE_RECONFIRM_MARK}"와 "아직, 계속"으로 제시합니다. 사용자가 ` +
|
|
102
103
|
`"${CLOSE_RECONFIRM_MARK}"를 고른 뒤에만 세션 마무리를 진행하세요. 그전에는 ` +
|
|
@@ -250,14 +251,16 @@ process.stdin.on('end', () => {
|
|
|
250
251
|
// "work-incomplete" together are exactly the case where the transcript's
|
|
251
252
|
// NL close phrase can't tell "close now" from "close once X is done" —
|
|
252
253
|
// regex can't disambiguate this (see spec background). Narrowed to the
|
|
253
|
-
//
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
//
|
|
254
|
+
// work-incomplete signals only: an uncommitted wiki (`git` blocker; real
|
|
255
|
+
// unsaved work) OR pending background work — a non-terminal background task
|
|
256
|
+
// (delegated subagent OR shell, e.g. a deferred push/CI wait) or a
|
|
257
|
+
// scheduled cron wake (hasPendingBackgroundWork). `hot` / `lint` / `close`
|
|
258
|
+
// / `design-history` / `feedback` blockers are real close blockers but not
|
|
259
|
+
// evidence of "later" intent, so they keep the existing wording (unchanged
|
|
260
|
+
// from before this feature).
|
|
258
261
|
const workIncomplete =
|
|
259
262
|
(gate && gate.blockers && gate.blockers.some((b) => b.type === 'git')) ||
|
|
260
|
-
|
|
263
|
+
hasPendingBackgroundWork(payload);
|
|
261
264
|
if (workIncomplete && isCloseReconfirmDeclined(transcriptPath)) {
|
|
262
265
|
// The user already answered "아직" to the ambiguous close signal that
|
|
263
266
|
// triggered this Stop turn — suppressing is a continue, not a
|
package/hooks/hypo-shared.mjs
CHANGED
|
@@ -2758,29 +2758,50 @@ export function hasUserCloseSignal(transcriptPath) {
|
|
|
2758
2758
|
}
|
|
2759
2759
|
|
|
2760
2760
|
/**
|
|
2761
|
-
* True iff the Stop payload
|
|
2762
|
-
*
|
|
2763
|
-
* reconfirm trigger (see
|
|
2764
|
-
*
|
|
2761
|
+
* True iff the Stop payload shows work still pending in the background —
|
|
2762
|
+
* either a non-terminal `background_tasks` entry OR a scheduled `session_crons`
|
|
2763
|
+
* wake. Read-only: used to widen the autoclose reconfirm trigger (see
|
|
2764
|
+
* hypo-auto-minimal-crystallize.mjs) to "work is demonstrably still running",
|
|
2765
|
+
* not just "the wiki has uncommitted changes".
|
|
2766
|
+
*
|
|
2767
|
+
* ANY non-terminal `background_tasks` entry counts, not just delegated
|
|
2768
|
+
* subagents. A Stop payload captured from a real session confirmed the field
|
|
2769
|
+
* is genuinely sent (the older "grep turns up nothing / may not be sent" note
|
|
2770
|
+
* is retired): a background Bash appears as
|
|
2771
|
+
* `{id, type:'shell', status:'running', description, command}`, alongside
|
|
2772
|
+
* `type:'subagent'` for delegations. Restricting to `type==='subagent'` missed
|
|
2773
|
+
* shell background work (e.g. a `git push` / CI wait deferred behind a close
|
|
2774
|
+
* signal), letting the reconfirm branch mis-classify the session as idle and
|
|
2775
|
+
* re-nag every Stop turn.
|
|
2765
2776
|
*
|
|
2766
2777
|
* Defined as the NEGATION of a terminal status, not an enumeration of
|
|
2767
|
-
* "running" states
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2770
|
-
*
|
|
2778
|
+
* "running" states: the observed non-terminal status is "running", and a
|
|
2779
|
+
* finished task is removed from the array entirely (it does NOT linger in a
|
|
2780
|
+
* terminal state — the next Stop simply reports `background_tasks:[]`). An
|
|
2781
|
+
* unrecognized/absent status is therefore treated as in-flight; only a
|
|
2782
|
+
* recognized terminal status clears an entry that is still present.
|
|
2783
|
+
*
|
|
2784
|
+
* `session_crons`: a non-empty array means the session is waiting on a
|
|
2785
|
+
* scheduled wake, which is itself pending work. A missing / non-array
|
|
2786
|
+
* `session_crons` is ignored (fail-open).
|
|
2771
2787
|
*
|
|
2772
|
-
* Fail-open: a missing or non-array `background_tasks`
|
|
2773
|
-
*
|
|
2774
|
-
*
|
|
2775
|
-
* alone rather than spuriously blocking.
|
|
2788
|
+
* Fail-open overall: a missing or non-array `background_tasks` contributes no
|
|
2789
|
+
* pending signal, so detection degrades gracefully to the git-uncommitted
|
|
2790
|
+
* signal alone rather than spuriously blocking.
|
|
2776
2791
|
*/
|
|
2777
|
-
export function
|
|
2778
|
-
|
|
2779
|
-
if (!Array.isArray(tasks)) return false;
|
|
2792
|
+
export function hasPendingBackgroundWork(payload) {
|
|
2793
|
+
if (!payload || typeof payload !== 'object') return false;
|
|
2780
2794
|
const TERMINAL = /^(completed|complete|done|finished|failed|error|errored|cancelled|canceled)$/i;
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2795
|
+
const tasks = payload.background_tasks;
|
|
2796
|
+
if (
|
|
2797
|
+
Array.isArray(tasks) &&
|
|
2798
|
+
tasks.some((t) => t && (t.status == null || !TERMINAL.test(String(t.status))))
|
|
2799
|
+
) {
|
|
2800
|
+
return true;
|
|
2801
|
+
}
|
|
2802
|
+
const crons = payload.session_crons;
|
|
2803
|
+
if (Array.isArray(crons) && crons.length > 0) return true;
|
|
2804
|
+
return false;
|
|
2784
2805
|
}
|
|
2785
2806
|
|
|
2786
2807
|
// The reconfirm reason (hypo-auto-minimal-crystallize.mjs emitBlock's
|
package/package.json
CHANGED