@litfamily/litmuse 0.1.18 → 0.1.19

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.19 — 2026-11-24
4
+
5
+ - A lit-team lock folder that has no owner record yet is judged only after it is at least 5 seconds old, whatever stale window the caller passes. Before, a stale window of 0 could move aside a lock another process had just created, and that process then failed with `lock ownership receipt failed`.
6
+ - Both READMEs explain the LIT mark (where it appears and what a terminal without colour, a pipe or a narrow window gets), that a request ending with `lit`, `lit-loop` or `litwork` works like one starting with it, and what to do when lit-team stops with `team state lock timed out`. The Korean reference now also describes the lit-loop goal question.
7
+
3
8
  ## 0.1.18 — 2026-11-24
4
9
 
5
10
  - `litmuse install`, `update`, `doctor` and `--help` now print the synthwave LIT mark above their output, and `litmuse status --card` in a truecolor terminal shows a gradient version pill on the stage card. Output to a pipe gets a plain one-line mark instead, and `doctor --json` and `status --card --json` get none.
package/README.md CHANGED
@@ -32,6 +32,11 @@ fix the date parsing bug in src/dates.js lit
32
32
  Muse sets the goal, writes a failing test, fixes the bug, checks the result and tells you what it checked.
33
33
  Most tasks need nothing more.
34
34
 
35
+ Both places work the same way. When `lit` comes last, the words before it are the task, so `fix the login redirect lit`
36
+ gets the same goal question as `lit fix the login redirect`, with "fix the login redirect" as the objective. The two run
37
+ words behave like this too: `fix the login redirect lit-loop` runs lit-loop and `add a --json flag litwork` runs
38
+ litwork, just as they would at the start.
39
+
35
40
  **The full workflow.** For a bigger job, go one step at a time. Each step leaves a file the next step reads,
36
41
  and you can skip any step you do not need.
37
42
 
@@ -166,6 +171,8 @@ The [Quick start](#quick-start) line installs LitMuse at user scope, so it is av
166
171
 
167
172
  The bottom row of the picture covers why an update may ask again, what install leaves alone, and the one file it writes only after you agree ([the rules-file block](./docs/reference.md#a-short-block-in-muses-own-rules-file)). Muse re-arms the agent approvals whenever the plugin is updated, so after an update the installer asks once more for those. In `doctor`, each capability that still waits for approval appears as `APPROVAL NEEDED` together with the exact command.
168
173
 
174
+ `install`, `update`, `doctor` and `--help` open with the synthwave LIT mark, so you can tell at a glance which tool is talking. It is drawn for the terminal it lands in: full colour in a truecolor or 256-colour terminal, the same picture without colour when colour is off (`NO_COLOR`, `TERM=dumb`, an 8-colour terminal), and the single line `LIT · muse code` when the output goes to a pipe, a log or the model's bash tool, or the window is narrower than 24 columns. `doctor --json` prints no mark.
175
+
169
176
  <details>
170
177
  <summary>Install switches</summary>
171
178
 
@@ -215,6 +222,8 @@ Ticking a row moves the count and the next-row pointer:
215
222
 
216
223
  <p align="center"><img src="./docs/assets/card/after.webp" width="960" alt="The same card after row 1 is ticked: plan 1/2 in plans/todo-app.md, next row 2, Write the tests." /></p>
217
224
 
225
+ Run in a terminal, `litmuse status --card` also puts the mark above the card, and a truecolor terminal gets a gradient `🔥LIT v<version>` pill at the start of its first line. When `/lit-status` has the model run the card through its bash tool, or colour is off, the card keeps its plain `LIT ·` headline, and `--json` prints only the record.
226
+
218
227
  The card reads the hook-kept state under `~/.local/state/litmuse/`, outside the project. How it lists other sessions is in [the reference](./docs/reference.md#the-live-record-behind-the-card).
219
228
 
220
229
  ### Automatic handoff
@@ -334,7 +343,7 @@ A prompt that starts with `lit` goes through four steps, and each one leaves som
334
343
  <details>
335
344
  <summary>The four steps, one by one</summary>
336
345
 
337
- 1. **Route.** The prompt hook reads the word after `lit` and picks the route. `lit plan` goes to lit-plan, plain `lit` goes to lit-loop, and another `lit` while that route is still running carries it on.
346
+ 1. **Route.** The prompt hook reads the word after `lit` and picks the route. `lit plan` goes to lit-plan, plain `lit` goes to lit-loop, and another `lit` while that route is still running carries it on. A request that ends with `lit` goes to lit-loop with the words before it as the task, and one that ends with `lit-loop` or `litwork` goes to that route.
338
347
  2. **Load.** Muse loads the route's skill, which may hand parts of the work to child agents such as `litmuse/lit-verifier`.
339
348
  3. **Work.** During a planning turn the PreToolUse hook lets writes land only under `plans/` and `.litmuse/`.
340
349
  4. **Review.** The work counts as done when the tests pass and someone looked at the real surface; anything nobody could check is marked unverified. While plan rows are still open, the Stop hook keeps the turn going.
@@ -395,6 +404,8 @@ To update, run the install line again. To remove everything, run `uninstall` (ad
395
404
 
396
405
  **`doctor` shows `INFO leftover`.** LitMuse ships no engine runtime any more; releases up to 0.1.11 cached them under `~/.local/share/litmuse/runtime/`, and `uninstall` never removed that folder. Nothing reads it now (an extension sets up its own engines), so delete it to free the space.
397
406
 
407
+ **lit-team stops with `team state lock timed out`.** The lit-team script takes a short lock on the team folder while it updates the team file, and a process that crashed can leave that lock behind. The next command clears it on its own: a lock with no owner record that is older than 5 seconds (or the stale window, if that is longer), a lock whose process is gone, and a lock held for more than 10 minutes, even when its process number now belongs to another program. When the message still appears, it names the lock folder and its holder, `held by pid <n> for <s> s` or `with no owner record`. A live holder is a lit-team command still running in another session, so let it finish. If nothing is running, close the other Muse sessions on this project and delete the named `.lock` folder under `.litmuse/team/<team-id>/`.
408
+
398
409
  ## Reference
399
410
 
400
411
  [docs/reference.md](./docs/reference.md) holds what a first install does not need: [every hook](./docs/reference.md#hooks), [the live record behind the card](./docs/reference.md#the-live-record-behind-the-card), and [the short block in Muse's own rules file](./docs/reference.md#a-short-block-in-muses-own-rules-file).
package/README_ko-KR.md CHANGED
@@ -27,6 +27,8 @@ src/dates.js의 날짜 파싱 버그 고쳐줘 lit
27
27
 
28
28
  Muse가 목표를 정하고, 실패하는 테스트를 쓰고, 버그를 고치고, 결과를 확인한 뒤 무엇을 확인했는지 알려 줍니다. 웬만한 작업은 이것으로 충분합니다.
29
29
 
30
+ 앞에 붙이든 끝에 붙이든 똑같이 동작합니다. `lit`이 맨 끝에 오면 그 앞의 말이 할 일이 되므로, `로그인 버튼 고쳐줘 lit`도 `lit 로그인 버튼 고쳐줘`처럼 "로그인 버튼 고쳐줘"를 목표로 삼아 목표 질문을 합니다. 실행 단어 두 개도 마찬가지입니다. `로그인 버튼 고쳐줘 lit-loop`는 lit-loop을, `--json 플래그 추가해줘 litwork`는 litwork를 앞에 붙였을 때와 똑같이 실행합니다.
31
+
30
32
  **본격적으로.** 큰 작업은 한 단계씩 밟아 갑니다. 단계마다 남긴 파일을 다음 단계가 읽고, 필요 없는 단계는 건너뛰어도 됩니다.
31
33
 
32
34
  | 단계 | 입력 | 하는 일 |
@@ -160,6 +162,8 @@ npx @litfamily/litmuse doctor
160
162
 
161
163
  그림의 맨 아래 줄은 업데이트 뒤에 다시 묻는 이유, 설치가 손대지 않는 곳, 동의를 받은 뒤에만 쓰는 파일 하나([규칙 파일 블록](./docs/reference_ko-KR.md#muse-자체-규칙-파일의-짧은-블록))를 정리했습니다. Muse는 플러그인이 업데이트될 때마다 에이전트 승인을 다시 요구하므로, 업데이트 뒤에는 설치기가 그 부분만 한 번 더 묻습니다. `doctor`에서는 아직 승인을 기다리는 항목이 `APPROVAL NEEDED`와 실행할 명령으로 표시됩니다.
162
164
 
165
+ `install`, `update`, `doctor`, `--help`는 맨 위에 신스웨이브 LIT 마크를 찍어서, 어느 도구가 말하는지 한눈에 보이게 합니다. 마크는 출력되는 터미널에 맞춰 그려집니다. truecolor나 256색 터미널에서는 컬러로, 색이 꺼져 있으면(`NO_COLOR`, `TERM=dumb`, 8색 터미널) 같은 그림이 색 없이 나옵니다. 출력이 파이프나 로그, 모델의 bash 도구로 가거나 창 폭이 24칸보다 좁으면 `LIT · muse code` 한 줄만 나옵니다. `doctor --json`에는 마크가 없습니다.
166
+
163
167
  <details>
164
168
  <summary>설치 옵션</summary>
165
169
 
@@ -209,6 +213,8 @@ Muse의 `/hud`는 켜고 끄는 고정 항목 목록이라서 플러그인 글
209
213
 
210
214
  <p align="center"><img src="./docs/assets/card/after.webp" width="960" alt="1번 행을 체크한 뒤의 같은 카드. plans/todo-app.md 계획이 1/2가 되고 다음 행은 2. Write the tests입니다." /></p>
211
215
 
216
+ 터미널에서 `litmuse status --card`를 실행하면 카드 위에 마크가 붙고, truecolor 터미널이면 첫 줄 맨 앞에 그라데이션 `🔥LIT v<버전>` 알약도 붙습니다. `/lit-status`가 모델의 bash 도구로 카드를 돌릴 때나 색이 꺼져 있을 때는 원래의 `LIT ·` 머리줄이 그대로 남고, `--json`은 기록만 출력합니다.
217
+
212
218
  카드는 프로젝트 밖에 있는 `~/.local/state/litmuse/` 아래 훅 기록을 읽습니다. 다른 세션을 어떻게 보여 주는지는 [참고 자료](./docs/reference_ko-KR.md#카드-뒤의-실시간-기록)에 있습니다.
213
219
 
214
220
  ### 자동 핸드오프
@@ -328,7 +334,7 @@ npx @litfamily/litmuse extensions prune-backups --older-than 30 --yes
328
334
  <details>
329
335
  <summary>네 단계를 하나씩</summary>
330
336
 
331
- 1. **경로.** 프롬프트 훅이 `lit` 다음 단어를 읽고 경로를 고릅니다. `lit plan`은 lit-plan으로, 그냥 `lit`은 lit-loop으로 가고, 그 경로가 아직 도는 중에 다시 `lit`을 치면 하던 일을 이어 갑니다.
337
+ 1. **경로.** 프롬프트 훅이 `lit` 다음 단어를 읽고 경로를 고릅니다. `lit plan`은 lit-plan으로, 그냥 `lit`은 lit-loop으로 가고, 그 경로가 아직 도는 중에 다시 `lit`을 치면 하던 일을 이어 갑니다. 요청이 `lit`으로 끝나면 그 앞의 말을 할 일로 삼아 lit-loop으로 가고, `lit-loop`나 `litwork`로 끝나면 그 경로로 갑니다.
332
338
  2. **불러오기.** Muse가 그 경로의 스킬을 불러오고, 스킬은 일부를 `litmuse/lit-verifier` 같은 자식 에이전트에게 맡기기도 합니다.
333
339
  3. **작업.** 계획 턴에서는 PreToolUse 훅이 쓰기를 `plans/`와 `.litmuse/` 안으로만 받아 줍니다.
334
340
  4. **리뷰.** 테스트가 통과하고 실제 화면까지 확인해야 끝난 것으로 치고, 아무도 확인하지 못한 부분은 미확인으로 표시합니다. 계획 행이 남아 있는 동안에는 Stop 훅이 턴을 계속 이어 갑니다.
@@ -389,6 +395,8 @@ npx @litfamily/litmuse extensions prune-backups --older-than 30 --yes
389
395
 
390
396
  **`doctor`가 `INFO leftover`를 보여 줍니다.** LitMuse는 이제 엔진 런타임을 싣지 않습니다. 0.1.11까지의 릴리스는 엔진을 `~/.local/share/litmuse/runtime/`에 캐시했고 `uninstall`은 그 폴더를 지우지 않았습니다. 이제 그 폴더를 읽는 것은 없으므로(확장은 자기 엔진을 따로 준비합니다) 공간을 비우려면 지우세요.
391
397
 
398
+ **lit-team이 `team state lock timed out`으로 멈춥니다.** lit-team 스크립트는 팀 파일을 고치는 동안 팀 폴더에 잠깐 잠금을 걸고, 도중에 죽은 프로세스는 그 잠금을 남길 수 있습니다. 남은 잠금은 다음 명령이 알아서 치웁니다. 주인 기록 없이 5초(stale 기간이 더 길면 그 기간)보다 오래된 잠금, 프로세스가 사라진 잠금, 10분 넘게 잡힌 잠금이 대상이고, 마지막 것은 그 프로세스 번호를 지금 다른 프로그램이 쓰고 있어도 치웁니다. 그래도 메시지가 나오면 잠금 폴더와 잡고 있는 쪽이 함께 적힙니다(`held by pid <n> for <s> s` 또는 `with no owner record`). 살아 있는 쪽은 다른 세션에서 아직 도는 lit-team 명령이니 끝나기를 기다리세요. 도는 것이 없다면 이 프로젝트의 다른 Muse 세션을 닫고, `.litmuse/team/<team-id>/` 아래 적힌 `.lock` 폴더를 지우면 됩니다.
399
+
392
400
  ## 참고 자료
393
401
 
394
402
  처음 설치할 때 필요 없는 내용은 [docs/reference_ko-KR.md](./docs/reference_ko-KR.md)에 있습니다: [훅별 설명](./docs/reference_ko-KR.md#훅), [카드 뒤의 실시간 기록](./docs/reference_ko-KR.md#카드-뒤의-실시간-기록), [Muse 자체 규칙 파일의 짧은 블록](./docs/reference_ko-KR.md#muse-자체-규칙-파일의-짧은-블록).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litfamily/litmuse",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Installer for LitMuse: skills, hooks and agents that help Meta's Muse Code plan, build, check and hand off work.",
5
5
  "keywords": [
6
6
  "muse",
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "litmuse",
4
4
  "displayName": "LitMuse",
5
- "version": "0.1.18",
5
+ "version": "0.1.19",
6
6
  "description": "LitFamily workflows for Muse Code: bare lit activation, planning, evidence-bound execution, review, research, handoff and Korean prose care.",
7
7
  "compat": {
8
8
  "source": "native",
@@ -25,6 +25,9 @@ const MAX_OWNER_BYTES = 4096;
25
25
  // No team update holds the lock for more than a moment, so an owner older than this crashed even when its recorded pid
26
26
  // now belongs to another live process (pids are reused, often on WSL).
27
27
  const MAX_HOLD_MS = 10 * 60 * 1000;
28
+ // A folder with no owner record may be one another process created a moment ago and is still writing; it is judged
29
+ // only after this long, whatever stale window the caller passed.
30
+ const OWNERLESS_GRACE_MS = 5_000;
28
31
  const sleepSync = (milliseconds) => Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds);
29
32
  const monotonicNowMs = () => Number(process.hrtime.bigint()) / 1_000_000;
30
33
 
@@ -284,9 +287,9 @@ export const acquireOwnerLock = (lockDir, { timeoutMs = 500, staleMs = 30_000 }
284
287
  const incumbent = readOwnerLock(lockDir);
285
288
  if (!incumbent && lockDirectory) {
286
289
  // A holder that died between creating the folder and writing its owner record left a lock nobody can judge;
287
- // once it is older than the stale window it is moved aside and the acquisition retried.
290
+ // once it is older than the stale window (and the grace) it is moved aside and the acquisition retried.
288
291
  const folder = lstatSync(lockDir, { throwIfNoEntry: false });
289
- if (folder && Date.now() - folder.mtimeMs >= staleAfter) {
292
+ if (folder && Date.now() - folder.mtimeMs >= Math.max(staleAfter, OWNERLESS_GRACE_MS)) {
290
293
  try {
291
294
  if (removeVerifiedPath(lockDir, lockDirectory, undefined, `${lockDir}.stale.ownerless.${randomUUID()}`,
292
295
  (quarantine) => !readOwnerLock(quarantine))) continue;