@litfamily/litcodex 1.0.25 → 1.0.27
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-KR.md +29 -29
- package/README.md +33 -32
- package/dist/install/auto-update-doctor.d.ts +15 -0
- package/dist/install/auto-update-doctor.js +146 -0
- package/dist/install/doctor-render.js +7 -1
- package/dist/install/doctor.d.ts +9 -0
- package/dist/install/doctor.js +42 -19
- package/dist/install/index.js +11 -2
- package/dist/install/types.d.ts +7 -3
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/dist/auto-update.d.ts +7 -0
- package/marketplace/plugins/litcodex/components/auto-update/dist/auto-update.js +55 -7
- package/marketplace/plugins/litcodex/components/auto-update/dist/cli.js +5 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +5 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/directive.d.ts +2 -8
- package/marketplace/plugins/litcodex/components/lit-loop/dist/directive.js +2 -45
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +1 -8
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +27 -32
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-context.d.ts +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-context.js +69 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +285 -0
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/bundled-rules/lit-humanizer.md +4 -2
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +5 -3
- package/node_modules/@litcodex/lit-loop/dist/directive.d.ts +2 -8
- package/node_modules/@litcodex/lit-loop/dist/directive.js +2 -45
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +1 -8
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +27 -32
- package/node_modules/@litcodex/lit-loop/dist/route-context.d.ts +8 -0
- package/node_modules/@litcodex/lit-loop/dist/route-context.js +69 -0
- package/node_modules/@litcodex/lit-loop/dist/route-heads.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/route-heads.js +285 -0
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/package.json +2 -2
- package/readme-assets/badge-version.svg +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/jev-hint.d.ts +0 -123
- package/marketplace/plugins/litcodex/components/lit-loop/dist/jev-hint.js +0 -553
- package/node_modules/@litcodex/lit-loop/dist/jev-hint.d.ts +0 -123
- package/node_modules/@litcodex/lit-loop/dist/jev-hint.js +0 -553
package/README-Ko-KR.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 다섯 로봇 패널이 차례로 켜지고, LitCodex 로봇의 눈과 테두리가 빛난 뒤 LITFAMILY와 KEEP THE WORK LIT. 문구가 밝아지는 영상" /></picture></p>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="#설치"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
5
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
4
|
+
<a href="#설치"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/badge-version.svg" alt="1.0.27" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/badge-license.svg" alt="MIT license" /></a>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage-Ko-KR.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
9
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage-Ko-KR.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/lucide-book-open.svg" width="16" alt="" /> 문서</a> <a href="#설치">설치</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/assets/readme/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
13
13
|
|
|
14
14
|
**Keep the work lit.**
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
요청 앞에 `lit`을 붙이면 Codex CLI가 통과·실패를 가릴 수 있는 기준을 세우고, 기준마다 증거가 남아야 일을 끝냅니다.
|
|
17
|
+
증거는 프로젝트 안에 남기 때문에 내일 세션은 오늘 멈춘 자리에서 시작합니다.
|
|
18
18
|
|
|
19
19
|
**[GitHub에서 전체 안내 보기](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md)** · [English](https://github.com/wjgoarxiv/litcodex#readme)
|
|
20
20
|
|
|
@@ -23,12 +23,12 @@ Codex CLI 플러그인입니다.
|
|
|
23
23
|
Node.js 22 이상과 Codex CLI가 필요합니다.
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
26
|
+
npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex install
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
설치기는 어떤 모델이 이끌지, 어떤 모델이 거들지, 답변 스타일은 무엇으로 할지 묻고, 쓰려는 내용을 먼저 보여 준 뒤
|
|
30
30
|
`~/.codex/config.toml`에서 자기가 관리하는 항목만 고칩니다. 계획만 먼저 보려면
|
|
31
|
-
`npm exec --yes --package @litfamily/litcodex@1.0.
|
|
31
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex --dry-run install`을 실행하고, 묻는 단계 없이
|
|
32
32
|
설치하려면 `install` 뒤에 `--yes`를 붙이세요.
|
|
33
33
|
|
|
34
34
|
```sh
|
|
@@ -39,7 +39,7 @@ litcodex install
|
|
|
39
39
|
전역으로 설치하면 영상 스킬이 쓸 도구를 미리 준비하느라 버전이 고정된 파일 몇 개를 내려받습니다. 무엇을 받는지와
|
|
40
40
|
건너뛰는 방법은 [설치 안내](https://github.com/wjgoarxiv/litcodex/blob/main/docs/install-Ko-KR.md#전역-명령으로-쓰기)에 있습니다.
|
|
41
41
|
|
|
42
|
-
> 전역 설치가 없다면 `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
42
|
+
> 전역 설치가 없다면 `npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex <command>` 형식을 사용하세요.
|
|
43
43
|
|
|
44
44
|
## 첫 작업
|
|
45
45
|
|
|
@@ -49,10 +49,10 @@ litcodex install
|
|
|
49
49
|
lit 회원가입 폼에 입력 검증을 추가해줘
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
답변이 `🔥 **LIT IGNITED · <discipline>** 🔥` 한 줄로
|
|
53
|
-
기록은 프로젝트의 `.litcodex/lit-loop/` 아래에
|
|
54
|
-
`handoff`만 따로 보내면 다음 세션이 시작할 인수인계 문서가 생깁니다.
|
|
55
|
-
어댑터를
|
|
52
|
+
답변이 `🔥 **LIT IGNITED · <discipline>** 🔥` 한 줄로 시작하고, 그때부터 요청은 확인 기준이 붙은 목표가 됩니다.
|
|
53
|
+
모든 기준에 통과 증거가 있어야 완료되고, 기록은 프로젝트의 `.litcodex/lit-loop/` 아래에 남아 `lit recap`으로 다시
|
|
54
|
+
읽을 수 있습니다. 세션을 마치기 전에 `handoff`만 따로 보내면 다음 세션이 시작할 인수인계 문서가 생깁니다. 출판용
|
|
55
|
+
그래프가 필요할 때 `lit-scientific-visualization`만 보내면 시각화 어댑터를 불러오고, Python 패키지는 설치하지 않습니다.
|
|
56
56
|
|
|
57
57
|
## 스킬
|
|
58
58
|
|
|
@@ -60,15 +60,15 @@ lit 회원가입 폼에 입력 검증을 추가해줘
|
|
|
60
60
|
`$litcodex:lit-handoff`, `$litcodex:lit-scientific-visualization`처럼 이름으로 부를 수 있습니다. 스킬마다 그림은
|
|
61
61
|
[스킬 안내](https://github.com/wjgoarxiv/litcodex/blob/main/docs/skills-Ko-KR.md)에 있습니다.
|
|
62
62
|
|
|
63
|
-
-
|
|
63
|
+
- 루프와 계획: `lit-loop`(`lit`), `litwork`, `lit-plan`, Start Work(`lit start work <승인된 계획>`), `litgoal`,
|
|
64
64
|
`deep-interview`, `lit-crucible`, `lit-team`, `lit-recap`, `lit-handoff`.
|
|
65
|
-
-
|
|
65
|
+
- 검토와 조사: `review-work`, `litresearch`, `autoresearch`, `autoconference`, `lit-fetch`, `wikify`,
|
|
66
66
|
`coding-session-audit`, `lit-comprehend`.
|
|
67
|
-
-
|
|
67
|
+
- 문서, 그림, 화면: `lit-docx`, `lit-pptx`, `lit-diagram-drawer`, `lit-scientific-visualization`,
|
|
68
68
|
`lit-typographic-motion`, `lit-humanizer`, `readme-studio`, `frontend-ui-ux`, `visual-qa`, `browser-drive`.
|
|
69
|
-
-
|
|
69
|
+
- 코드: `debugging`, `refactor`, `lit-code`, `lit-commit`, `lit-burnoff`, `lit-burnoff-file`,
|
|
70
70
|
`structural-search`, `lsp-setup`, `lit-init`.
|
|
71
|
-
-
|
|
71
|
+
- 관리: `litcodex-doctor`, `litcodex-report-bug`, `litcodex-contribute-bug-fix`. `rules`, `lsp`,
|
|
72
72
|
`comment-checker`는 알아서 돌아갑니다.
|
|
73
73
|
|
|
74
74
|
## 설치하면 달라지는 것
|
|
@@ -76,22 +76,22 @@ lit 회원가입 폼에 입력 검증을 추가해줘
|
|
|
76
76
|
- Codex에 플러그인·훅·에이전트가 등록되고 `~/.codex/config.toml`의 관리 항목이 갱신됩니다. 관련 없는 Codex
|
|
77
77
|
설정은 그대로 둡니다.
|
|
78
78
|
- 프로젝트마다 `.litcodex/lit-loop/` 아래에 로컬 기록이 생기며, Git과 패키지에서는 제외됩니다.
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
`~/.litcodex/update-check.json`에 적어 둡니다. 이 작업은 아무것도 설치하지 않습니다. 이와 별개로, 조건에 맞는
|
|
82
|
-
대화형 관리 명령 뒤에는 업데이트 실행기가 새 전역 패키지를 설치할 수 있습니다. `LITCODEX_NO_UPDATE_CHECK=1`을
|
|
83
|
-
설정하면 둘 다 꺼집니다. 실패했거나 `--json`·`--dry-run`으로 돌렸거나, 비TTY·CI 환경이거나 이 설정으로 끈
|
|
84
|
-
doctor 실행은 부수 효과가 없습니다.
|
|
85
|
-
- 선택 기능 두 가지는 기본값이 꺼짐입니다.
|
|
86
|
-
[자동 핸드오프](https://github.com/wjgoarxiv/litcodex/blob/main/docs/auto-handoff-Ko-KR.md)와, 켜면 프롬프트가
|
|
87
|
-
외부 서비스로 가는 [Jev 스킬 힌트](https://github.com/wjgoarxiv/litcodex/blob/main/docs/jev-skill-hint-Ko-KR.md)입니다.
|
|
79
|
+
- [자동 핸드오프](https://github.com/wjgoarxiv/litcodex/blob/main/docs/auto-handoff-Ko-KR.md)는 선택 기능이며
|
|
80
|
+
기본값은 꺼짐입니다.
|
|
88
81
|
- 테스트, 픽스처, 테스트 헬퍼, Vitest 설정은 저장소에만 있습니다. npm 패키지와 설치된 마켓플레이스 플러그인에는
|
|
89
82
|
들어가지 않습니다.
|
|
90
83
|
|
|
84
|
+
업데이트 확인은 이렇게 동작합니다. doctor 진단은 Codex 설정, 설치 상태, 플러그인 상태를 살펴보기만 하고 바꾸지 않습니다.
|
|
85
|
+
조건에 맞는 대화형 doctor 실행 뒤에는 캐시해 둔 새 버전 안내가 뜰 수 있습니다. 이 안내는 백그라운드 작업이 정해진
|
|
86
|
+
레지스트리만 조회해 `~/.litcodex/update-check.json`에 적어 둔 내용이며, 이 작업은 아무것도 설치하지 않습니다. 이와
|
|
87
|
+
별개로 조건에 맞는 대화형 관리 명령 뒤에는 업데이트 실행기가 새 전역 패키지를 설치할 수 있습니다. 둘 다 끄려면
|
|
88
|
+
`LITCODEX_NO_UPDATE_CHECK=1`을 설정하세요. 실패했거나 `--json`·`--dry-run`으로 돌렸거나, 비TTY·CI 환경이거나
|
|
89
|
+
이 설정으로 끈 doctor 실행은 아무것도 바꾸지 않습니다.
|
|
90
|
+
|
|
91
91
|
## 확인, 문제 해결, 제거
|
|
92
92
|
|
|
93
93
|
```sh
|
|
94
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
94
|
+
npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex doctor
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
`litcodex doctor`는 등록·훅·설정·호스트 기능을, `litcodex loop doctor`는 현재 프로젝트의 루프 상태를 확인합니다.
|
|
@@ -99,7 +99,7 @@ npm exec --yes --package @litfamily/litcodex@1.0.25 -- litcodex doctor
|
|
|
99
99
|
[문제 해결](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#문제-해결)에 있습니다.
|
|
100
100
|
|
|
101
101
|
```sh
|
|
102
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
102
|
+
npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex uninstall
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
플러그인과 LitCodex가 관리하는 설정을 지우고, 관련 없는 설정은 그대로 둡니다.
|
package/README.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: five armored robots power on one by one, the LitCodex robot wakes with glowing eyes and a lit frame, then LITFAMILY and KEEP THE WORK LIT. light up." /></picture></p>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="#install"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
5
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
4
|
+
<a href="#install"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/badge-version.svg" alt="1.0.27" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/badge-license.svg" alt="MIT license" /></a>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
9
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/lucide-book-open.svg" width="16" alt="" /> Docs</a> <a href="#install">Install</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/assets/readme/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.27/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
13
13
|
|
|
14
14
|
**Keep the work lit.**
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Put `lit` in front of a request and Codex CLI works toward checks that can pass or fail, calling the job
|
|
17
|
+
done only when each one has proof. The proof stays in your project, so tomorrow's session starts where
|
|
18
|
+
today's stopped.
|
|
18
19
|
|
|
19
20
|
**[Full guide on GitHub](https://github.com/wjgoarxiv/litcodex#readme)** · [한국어](https://github.com/wjgoarxiv/litcodex/blob/main/packages/litcodex-ai/README-Ko-KR.md)
|
|
20
21
|
|
|
@@ -23,12 +24,12 @@ and hands unfinished work to the next session.
|
|
|
23
24
|
You need Node.js 22 or later and Codex CLI.
|
|
24
25
|
|
|
25
26
|
```sh
|
|
26
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
27
|
+
npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex install
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
The installer asks which model leads, which model helps and which output style you like, shows what it is
|
|
30
31
|
about to write, and changes only the keys it manages in `~/.codex/config.toml`. To see the plan first, run
|
|
31
|
-
`npm exec --yes --package @litfamily/litcodex@1.0.
|
|
32
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex --dry-run install`. To skip the
|
|
32
33
|
questions, add `--yes` after `install`.
|
|
33
34
|
|
|
34
35
|
```sh
|
|
@@ -40,7 +41,7 @@ A global install also gets the video skill's tools ready with a few pinned downl
|
|
|
40
41
|
[install guide](https://github.com/wjgoarxiv/litcodex/blob/main/docs/install.md#a-global-command) lists them
|
|
41
42
|
and shows how to skip them.
|
|
42
43
|
|
|
43
|
-
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
44
|
+
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex <command>`.
|
|
44
45
|
|
|
45
46
|
## First task
|
|
46
47
|
|
|
@@ -50,11 +51,12 @@ Open Codex in your project, approve the LitCodex hooks in the startup review, an
|
|
|
50
51
|
lit add input validation to the signup form
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
The reply opens with `🔥 **LIT IGNITED · <discipline>**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
The reply opens with `🔥 **LIT IGNITED · <discipline>** 🔥`, and from there the request is a goal with
|
|
55
|
+
checks. It counts as done once every check has passing evidence. The records live under
|
|
56
|
+
`.litcodex/lit-loop/` in your project, and `lit recap` reads them back. Before you leave, send
|
|
57
|
+
exact bare `handoff` and the next session gets a continuation packet to start from. When you need
|
|
58
|
+
publication plots, send the exact bare `lit-scientific-visualization` hook route; it loads the plotting
|
|
59
|
+
adapter and does not install Python dependencies.
|
|
58
60
|
|
|
59
61
|
## Skills
|
|
60
62
|
|
|
@@ -62,16 +64,16 @@ Pick any skill in the Codex skill picker or mention it by scoped name, such as `
|
|
|
62
64
|
`$litcodex:lit-fetch`, `$litcodex:lit-handoff` or `$litcodex:lit-scientific-visualization`. The
|
|
63
65
|
[skills page](https://github.com/wjgoarxiv/litcodex/blob/main/docs/skills.md) has a picture of each one.
|
|
64
66
|
|
|
65
|
-
-
|
|
67
|
+
- Loop and planning: `lit-loop` (`lit`), `litwork`, `lit-plan`, Start Work (`lit start work <approved-plan>`),
|
|
66
68
|
`litgoal`, `deep-interview`, `lit-crucible`, `lit-team`, `lit-recap` and `lit-handoff`.
|
|
67
|
-
-
|
|
69
|
+
- Review and research: `review-work`, `litresearch`, `autoresearch`, `autoconference`, `lit-fetch`,
|
|
68
70
|
`wikify`, `coding-session-audit` and `lit-comprehend`.
|
|
69
|
-
-
|
|
71
|
+
- Documents, figures and screens: `lit-docx`, `lit-pptx`, `lit-diagram-drawer`,
|
|
70
72
|
`lit-scientific-visualization`, `lit-typographic-motion`, `lit-humanizer`, `readme-studio`,
|
|
71
73
|
`frontend-ui-ux`, `visual-qa` and `browser-drive`.
|
|
72
|
-
-
|
|
74
|
+
- Code: `debugging`, `refactor`, `lit-code`, `lit-commit`, `lit-burnoff`, `lit-burnoff-file`,
|
|
73
75
|
`structural-search`, `lsp-setup` and `lit-init`.
|
|
74
|
-
-
|
|
76
|
+
- Upkeep: `litcodex-doctor`, `litcodex-report-bug` and `litcodex-contribute-bug-fix`. `rules`, `lsp`
|
|
75
77
|
and `comment-checker` run on their own.
|
|
76
78
|
|
|
77
79
|
## What it changes
|
|
@@ -79,24 +81,23 @@ Pick any skill in the Codex skill picker or mention it by scoped name, such as `
|
|
|
79
81
|
- Codex gets the plugin, hooks and agents, plus the managed keys in `~/.codex/config.toml`. Your unrelated
|
|
80
82
|
Codex settings stay as they are.
|
|
81
83
|
- Each project gets local records under `.litcodex/lit-loop/`, kept out of Git and packages.
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
newer version; a detached worker keeps it fresh with a fixed registry refresh saved at
|
|
85
|
-
`~/.litcodex/update-check.json`, and installs nothing. A separate foreground updater can install a newer
|
|
86
|
-
global package after an eligible interactive management command. Set `LITCODEX_NO_UPDATE_CHECK=1` to
|
|
87
|
-
turn off both. A doctor run that failed, or ran with `--json`, `--dry-run`, in a non-TTY or CI shell, or
|
|
88
|
-
with the opt-out set, stays side-effect-free.
|
|
89
|
-
- Two optional features are off by default:
|
|
90
|
-
[automatic handoff](https://github.com/wjgoarxiv/litcodex/blob/main/docs/auto-handoff.md) and the
|
|
91
|
-
[Jev skill hint](https://github.com/wjgoarxiv/litcodex/blob/main/docs/jev-skill-hint.md), which sends
|
|
92
|
-
prompts to a third party once you turn it on.
|
|
84
|
+
- [Automatic handoff](https://github.com/wjgoarxiv/litcodex/blob/main/docs/auto-handoff.md) is optional and
|
|
85
|
+
off by default.
|
|
93
86
|
- Tests, fixtures, test helpers and the Vitest configuration live only in the repository. Neither the npm
|
|
94
87
|
package nor the installed marketplace plugin includes them.
|
|
95
88
|
|
|
89
|
+
LitCodex also keeps an eye on new releases. The doctor diagnostic core never modifies Codex config, install
|
|
90
|
+
state or plugin state. After an eligible interactive doctor run (a successful one you start by hand) it may
|
|
91
|
+
show a cached advisory notice about a newer version; a detached worker keeps that notice fresh with a fixed
|
|
92
|
+
registry refresh saved at `~/.litcodex/update-check.json`, and installs nothing. A separate foreground
|
|
93
|
+
updater can install a newer global package after an eligible interactive management command. If you would
|
|
94
|
+
rather have neither, set `LITCODEX_NO_UPDATE_CHECK=1`. A doctor run that failed, or ran with `--json`,
|
|
95
|
+
`--dry-run`, in a non-TTY or CI shell, or with the opt-out set, stays side-effect-free.
|
|
96
|
+
|
|
96
97
|
## Check, fix, remove
|
|
97
98
|
|
|
98
99
|
```sh
|
|
99
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
100
|
+
npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex doctor
|
|
100
101
|
```
|
|
101
102
|
|
|
102
103
|
`litcodex doctor` checks registration, hooks, config and host capabilities; `litcodex loop doctor` checks
|
|
@@ -104,7 +105,7 @@ the current project's loop state. If `lit` does nothing, run doctor and check th
|
|
|
104
105
|
in Codex. More fixes are under [troubleshooting](https://github.com/wjgoarxiv/litcodex#troubleshooting).
|
|
105
106
|
|
|
106
107
|
```sh
|
|
107
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
108
|
+
npm exec --yes --package @litfamily/litcodex@1.0.27 -- litcodex uninstall
|
|
108
109
|
```
|
|
109
110
|
|
|
110
111
|
This removes the plugin and the config LitCodex manages, and leaves your other settings alone.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReadonlyFsLike } from "./codex.js";
|
|
2
|
+
import type { AutoUpdateHookReview } from "./types.js";
|
|
3
|
+
export interface AutoUpdateExplanation {
|
|
4
|
+
readonly detail: string;
|
|
5
|
+
readonly remedy?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Turn one receipt into a cause and a remedy. Unknown shapes keep the plain "receipt present" detail. */
|
|
8
|
+
export declare function explainAutoUpdateReceipt(fields: Record<string, unknown>): AutoUpdateExplanation;
|
|
9
|
+
/**
|
|
10
|
+
* Codex runs a plugin hook only after the user approves it; the approval sits in config.toml under
|
|
11
|
+
* `[hooks.state."<plugin>:hooks/hooks.json:session_start:<group>:<hook>"]`. Doctor can see whether an approval
|
|
12
|
+
* is recorded, not whether its hash still matches, so a recorded approval is reported as nothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare function inspectAutoUpdateHookReview(fs: ReadonlyFsLike, codexHome: string, managedRoot: string): AutoUpdateHookReview | undefined;
|
|
15
|
+
export declare function hookReviewLine(review: AutoUpdateHookReview): string | null;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// Read-only explanations for the foreground updater's receipt, plus the Codex hook approval it depends on.
|
|
2
|
+
// Every line names one cause and one thing the user can do; nothing here touches npm, the lock or the journal.
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { LITCODEX_PLUGIN_REF } from "./marketplace.js";
|
|
5
|
+
const BY_HAND = "update by hand: npm install -g @litfamily/litcodex@latest, then litcodex install";
|
|
6
|
+
/** Turn one receipt into a cause and a remedy. Unknown shapes keep the plain "receipt present" detail. */
|
|
7
|
+
export function explainAutoUpdateReceipt(fields) {
|
|
8
|
+
const status = fields["status"];
|
|
9
|
+
const reason = typeof fields["reason"] === "string" ? fields["reason"] : "";
|
|
10
|
+
const from = typeof fields["currentVersion"] === "string" ? fields["currentVersion"] : "the earlier version";
|
|
11
|
+
const to = typeof fields["latestVersion"] === "string" ? fields["latestVersion"] : "latest";
|
|
12
|
+
const at = typeof fields["finishedAt"] === "string" ? fields["finishedAt"] : "an unknown time";
|
|
13
|
+
const byHandTo = `update by hand: npm install -g @litfamily/litcodex@${to}, then litcodex install`;
|
|
14
|
+
switch (status) {
|
|
15
|
+
case "updated":
|
|
16
|
+
return {
|
|
17
|
+
detail: `${from} → ${to} at ${at}; it takes effect in the next Codex session, and sessions opened before then keep ${from}`,
|
|
18
|
+
remedy: `Start a new Codex session to use ${to}. Doctor cannot see which version an open Codex session runs.`,
|
|
19
|
+
};
|
|
20
|
+
case "up-to-date":
|
|
21
|
+
return { detail: "the installed version was the latest release at the last check" };
|
|
22
|
+
case "throttled":
|
|
23
|
+
return reason === "retry-throttled"
|
|
24
|
+
? {
|
|
25
|
+
detail: "the last attempt failed, so the next try waits 30 minutes",
|
|
26
|
+
remedy: `Start a Codex session after that, or ${BY_HAND}.`,
|
|
27
|
+
}
|
|
28
|
+
: { detail: "checked within the last 24 hours; a session start after that checks again" };
|
|
29
|
+
case "locked":
|
|
30
|
+
return {
|
|
31
|
+
detail: "another session was updating at the same time",
|
|
32
|
+
remedy: "Wait for it to finish, then run litcodex doctor again.",
|
|
33
|
+
};
|
|
34
|
+
case "failed":
|
|
35
|
+
if (/ETIMEDOUT|terminated:SIGTERM/u.test(reason)) {
|
|
36
|
+
return {
|
|
37
|
+
detail: "an install step ran past its 60-second limit",
|
|
38
|
+
remedy: `On a slow network, ${byHandTo}. Sessions retry after 30 minutes.`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (reason.startsWith("post-install-verification:")) {
|
|
42
|
+
return {
|
|
43
|
+
detail: `${to} installed but failed its own checks, so ${from} was put back`,
|
|
44
|
+
remedy: `Sessions retry after 30 minutes. To see the error, ${byHandTo}.`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
detail: `npm could not install ${to} (${reason || "no reason recorded"}); a global npm folder you cannot write to is the usual cause`,
|
|
49
|
+
remedy: `Run npm install -g @litfamily/litcodex@${to} to see npm's own message.`,
|
|
50
|
+
};
|
|
51
|
+
case "skipped":
|
|
52
|
+
return explainSkip(reason);
|
|
53
|
+
default:
|
|
54
|
+
return { detail: "receipt present" };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function explainSkip(reason) {
|
|
58
|
+
switch (reason) {
|
|
59
|
+
case "existing-opt-out":
|
|
60
|
+
return {
|
|
61
|
+
detail: "turned off by NO_UPDATE_NOTIFIER or LITCODEX_NO_UPDATE_CHECK where Codex runs",
|
|
62
|
+
remedy: `Remove it to get updates, or ${BY_HAND}.`,
|
|
63
|
+
};
|
|
64
|
+
case "disabled":
|
|
65
|
+
return {
|
|
66
|
+
detail: "turned off by LITCODEX_NO_AUTO_UPDATE or --no-auto-update",
|
|
67
|
+
remedy: `Remove it to get updates, or ${BY_HAND}.`,
|
|
68
|
+
};
|
|
69
|
+
case "ci":
|
|
70
|
+
return { detail: "skipped because CI is set", remedy: `Unset CI outside automation, or ${BY_HAND}.` };
|
|
71
|
+
case "marketplace-flow":
|
|
72
|
+
return {
|
|
73
|
+
detail: "installed through the Codex marketplace, which this updater leaves alone",
|
|
74
|
+
remedy: "Update it through the Codex marketplace you installed it from.",
|
|
75
|
+
};
|
|
76
|
+
case "unknown-latest":
|
|
77
|
+
return {
|
|
78
|
+
detail: "could not read the latest version from registry.npmjs.org (offline, a proxy, or a registry error)",
|
|
79
|
+
remedy: "Check the network; the next Codex session start tries again.",
|
|
80
|
+
};
|
|
81
|
+
case "unknown-current":
|
|
82
|
+
return { detail: "could not read the installed version", remedy: "Run litcodex install again." };
|
|
83
|
+
default:
|
|
84
|
+
return { detail: `skipped (${reason || "no reason recorded"})` };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Codex runs a plugin hook only after the user approves it; the approval sits in config.toml under
|
|
89
|
+
* `[hooks.state."<plugin>:hooks/hooks.json:session_start:<group>:<hook>"]`. Doctor can see whether an approval
|
|
90
|
+
* is recorded, not whether its hash still matches, so a recorded approval is reported as nothing.
|
|
91
|
+
*/
|
|
92
|
+
export function inspectAutoUpdateHookReview(fs, codexHome, managedRoot) {
|
|
93
|
+
const key = autoUpdateHookKey(fs, join(managedRoot, "plugins", "litcodex", "hooks", "hooks.json"));
|
|
94
|
+
if (key === null)
|
|
95
|
+
return undefined;
|
|
96
|
+
const configPath = join(codexHome, "config.toml");
|
|
97
|
+
let config = "";
|
|
98
|
+
try {
|
|
99
|
+
config = fs.existsSync(configPath) ? fs.readFileSync(configPath, "utf8") : "";
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const lines = config.split(/\r?\n/u);
|
|
105
|
+
const header = `[hooks.state."${key}"]`;
|
|
106
|
+
const start = lines.findIndex((line) => line.trim() === header);
|
|
107
|
+
if (start < 0)
|
|
108
|
+
return "not-approved";
|
|
109
|
+
let approved = false;
|
|
110
|
+
for (const line of lines.slice(start + 1)) {
|
|
111
|
+
const trimmed = line.trim();
|
|
112
|
+
if (trimmed.startsWith("["))
|
|
113
|
+
break;
|
|
114
|
+
if (/^enabled\s*=\s*false\b/u.test(trimmed))
|
|
115
|
+
return "turned-off";
|
|
116
|
+
if (/^trusted_hash\s*=/u.test(trimmed))
|
|
117
|
+
approved = true;
|
|
118
|
+
}
|
|
119
|
+
return approved ? "approved" : "not-approved";
|
|
120
|
+
}
|
|
121
|
+
function autoUpdateHookKey(fs, hooksPath) {
|
|
122
|
+
try {
|
|
123
|
+
if (!fs.existsSync(hooksPath))
|
|
124
|
+
return null;
|
|
125
|
+
const parsed = JSON.parse(fs.readFileSync(hooksPath, "utf8"));
|
|
126
|
+
const groups = parsed.hooks?.SessionStart ?? [];
|
|
127
|
+
for (const [group, entry] of groups.entries()) {
|
|
128
|
+
const hook = (entry.hooks ?? []).findIndex((item) => String(item.command).includes("components/auto-update/dist/cli.js"));
|
|
129
|
+
if (hook >= 0)
|
|
130
|
+
return `${LITCODEX_PLUGIN_REF}:hooks/hooks.json:session_start:${group}:${hook}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
// An unreadable hooks file is already reported by the payload check.
|
|
135
|
+
}
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
export function hookReviewLine(review) {
|
|
139
|
+
if (review === "not-approved") {
|
|
140
|
+
return "auto-update hook: not approved in Codex. Codex skips hooks you have not approved and codex exec never asks, so no session updates LitCodex. Start codex and approve the LitCodex hooks when it asks.";
|
|
141
|
+
}
|
|
142
|
+
if (review === "turned-off") {
|
|
143
|
+
return "auto-update hook: turned off in Codex, so no session updates LitCodex. Turn it back on in Codex's hook settings, or update by hand.";
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { autoHandoffLine } from "./auto-handoff-doctor.js";
|
|
2
|
+
import { hookReviewLine } from "./auto-update-doctor.js";
|
|
2
3
|
const MAX_RESOURCE_FAMILIES = 2;
|
|
3
4
|
const MAX_RESOURCE_EXAMPLES = 2;
|
|
4
5
|
const MAX_RESOURCE_PATH_LENGTH = 120;
|
|
@@ -26,8 +27,9 @@ export function renderDoctorText(report) {
|
|
|
26
27
|
? []
|
|
27
28
|
: [
|
|
28
29
|
` auto-update: ${report.autoUpdate.enabled ? "enabled" : "disabled"} (${report.autoUpdate.status ?? "no receipt"}; ${report.autoUpdate.detail})`,
|
|
30
|
+
...(report.autoUpdate.remedy === undefined ? [] : [` → ${report.autoUpdate.remedy}`]),
|
|
31
|
+
...autoUpdateHookLines(report.autoUpdate.hookReview),
|
|
29
32
|
]),
|
|
30
|
-
...(report.jevSkillHint === undefined ? [] : [` Jev skill hint: ${report.jevSkillHint}`]),
|
|
31
33
|
...(report.autoHandoff === undefined ? [] : [` automatic handoff: ${autoHandoffLine(report.autoHandoff)}`]),
|
|
32
34
|
...(report.statusCard === undefined
|
|
33
35
|
? []
|
|
@@ -94,6 +96,10 @@ function missingResourceSummary(paths) {
|
|
|
94
96
|
const familyLabel = families.length === 1 ? "family" : "families";
|
|
95
97
|
return `${paths.length} across ${families.length} ${familyLabel} (${examples.join("; ")}; full paths: --json)`;
|
|
96
98
|
}
|
|
99
|
+
function autoUpdateHookLines(review) {
|
|
100
|
+
const line = review === undefined ? null : hookReviewLine(review);
|
|
101
|
+
return line === null ? [] : [` ${line}`];
|
|
102
|
+
}
|
|
97
103
|
function yn(value) {
|
|
98
104
|
return value ? "yes" : "no";
|
|
99
105
|
}
|
package/dist/install/doctor.d.ts
CHANGED
|
@@ -8,5 +8,14 @@ export interface DoctorDeps {
|
|
|
8
8
|
readonly repoRoot: string;
|
|
9
9
|
/** Hook verification (defaults to the M14 resolvers over repoRoot). */
|
|
10
10
|
readonly verifyHook?: (repoRoot: string) => void;
|
|
11
|
+
readonly scope?: DoctorScope;
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* "post-install" is the check an automatic update runs on the version it just installed, inside a 10 s
|
|
15
|
+
* limit. It keeps every check of what the install wrote and drops the Codex host probes: the update's own
|
|
16
|
+
* `litcodex install` ran those as its preflight a moment earlier, and they cost seconds under load.
|
|
17
|
+
*/
|
|
18
|
+
export type DoctorScope = "full" | "post-install";
|
|
19
|
+
/** Every updater, released ones included, marks the children it starts; its doctor child is one of them. */
|
|
20
|
+
export declare function doctorScopeFor(env: NodeJS.ProcessEnv): DoctorScope;
|
|
12
21
|
export declare function runDoctor(deps: DoctorDeps): DoctorReport;
|
package/dist/install/doctor.js
CHANGED
|
@@ -12,6 +12,7 @@ import { isNewer } from "../update-check.js";
|
|
|
12
12
|
import { inspectAgentRouting, routingReport } from "./agent-routing.js";
|
|
13
13
|
import { detectAuthMode } from "./auth-mode.js";
|
|
14
14
|
import { inspectAutoHandoff } from "./auto-handoff-doctor.js";
|
|
15
|
+
import { explainAutoUpdateReceipt, inspectAutoUpdateHookReview } from "./auto-update-doctor.js";
|
|
15
16
|
import { probeBundledSkills } from "./bundled-skills.js";
|
|
16
17
|
import { findCodexBinary, probeMarketplaceRegistration, probePluginInstalled, resolveCodexHome, } from "./codex.js";
|
|
17
18
|
import { inspectEffectiveConfig } from "./doctor-config.js";
|
|
@@ -50,7 +51,17 @@ function boundedCatalogSummary(missingSkillIds, missingResourcePaths) {
|
|
|
50
51
|
summaries.push(`+${remainingFamilies} more families`);
|
|
51
52
|
return summaries.join("; ");
|
|
52
53
|
}
|
|
54
|
+
/** Every updater, released ones included, marks the children it starts; its doctor child is one of them. */
|
|
55
|
+
export function doctorScopeFor(env) {
|
|
56
|
+
return Object.hasOwn(env, "LITCODEX_AUTO_UPDATE_IN_PROGRESS") ? "post-install" : "full";
|
|
57
|
+
}
|
|
58
|
+
const POST_INSTALL_CAPABILITY = {
|
|
59
|
+
status: "unavailable",
|
|
60
|
+
reason: "not-probed-after-update",
|
|
61
|
+
observedSource: "the update's litcodex install preflight",
|
|
62
|
+
};
|
|
53
63
|
export function runDoctor(deps) {
|
|
64
|
+
const postInstall = deps.scope === "post-install";
|
|
54
65
|
const codexBin = findCodexBinary(deps.env, deps.fs);
|
|
55
66
|
const codexBinaryFound = codexBin !== null;
|
|
56
67
|
const issues = [];
|
|
@@ -72,6 +83,7 @@ export function runDoctor(deps) {
|
|
|
72
83
|
issues.push("Codex CLI not found on PATH or in CODEX_HOME.");
|
|
73
84
|
return {
|
|
74
85
|
ok: false,
|
|
86
|
+
...(postInstall ? { scope: "post-install" } : {}),
|
|
75
87
|
marketplaceRegistered: false,
|
|
76
88
|
pluginInstalled: false,
|
|
77
89
|
hooksWired: false,
|
|
@@ -87,7 +99,6 @@ export function runDoctor(deps) {
|
|
|
87
99
|
scientificVisualizationInstalled: false,
|
|
88
100
|
capabilities: unavailableCapabilities,
|
|
89
101
|
autoUpdate: readAutoUpdateReport(deps.env),
|
|
90
|
-
jevSkillHint: jevSkillHintState(deps.env),
|
|
91
102
|
autoHandoff: autoHandoffWithWarnings(deps, null, warnings),
|
|
92
103
|
issues,
|
|
93
104
|
warnings,
|
|
@@ -99,7 +110,13 @@ export function runDoctor(deps) {
|
|
|
99
110
|
const marketplaceRegistered = registration?.source !== null &&
|
|
100
111
|
registration?.source !== undefined &&
|
|
101
112
|
canonicalMarketplacePath(registration.source) === canonicalMarketplacePath(managedRoot);
|
|
102
|
-
const capabilities =
|
|
113
|
+
const capabilities = postInstall
|
|
114
|
+
? {
|
|
115
|
+
concurrency: POST_INSTALL_CAPABILITY,
|
|
116
|
+
autoCompaction: POST_INSTALL_CAPABILITY,
|
|
117
|
+
modelContexts: modelContextsForWrites(),
|
|
118
|
+
}
|
|
119
|
+
: probeHostCapabilities(codexBin, deps.spawn, { env: deps.env });
|
|
103
120
|
if (!marketplaceRegistered) {
|
|
104
121
|
issues.push("LitCodex managed local marketplace is not registered. Run `litcodex install`.");
|
|
105
122
|
}
|
|
@@ -114,8 +131,14 @@ export function runDoctor(deps) {
|
|
|
114
131
|
catch {
|
|
115
132
|
hooksWired = false;
|
|
116
133
|
}
|
|
117
|
-
|
|
134
|
+
const payloadVersion = managedPluginVersion(deps.fs, managedRoot);
|
|
135
|
+
if (payloadVersion !== null && payloadVersion !== PACKAGE_VERSION) {
|
|
136
|
+
// The updater installs with the first npm on Codex's PATH, so two global copies can drift apart.
|
|
137
|
+
issues.push(`The managed plugin payload is LitCodex ${payloadVersion}, but this litcodex command is ${PACKAGE_VERSION}; another npm global folder probably holds the other copy. Run \`litcodex install\` with the copy Codex should use, or remove the other one.`);
|
|
138
|
+
}
|
|
139
|
+
else if (!hooksWired) {
|
|
118
140
|
issues.push("Bundled UserPromptSubmit hook payload is missing or malformed.");
|
|
141
|
+
}
|
|
119
142
|
const effectiveConfig = inspectEffectiveConfig(deps.fs, join(codexHome, "config.toml"));
|
|
120
143
|
const configManaged = effectiveConfig.state !== "unavailable";
|
|
121
144
|
if (effectiveConfig.state === "unavailable") {
|
|
@@ -140,10 +163,11 @@ export function runDoctor(deps) {
|
|
|
140
163
|
if (!bundledSkills.scientificVisualizationInstalled) {
|
|
141
164
|
issues.push("Bundled lit-scientific-visualization payload is incomplete. Run `litcodex install`.");
|
|
142
165
|
}
|
|
143
|
-
|
|
166
|
+
// After an update the install preflight has judged concurrency already; it refuses to install when unavailable.
|
|
167
|
+
if (!postInstall && capabilities.concurrency.status === "unavailable") {
|
|
144
168
|
issues.push(`Concurrency 20 is ${capabilities.concurrency.status}: ${capabilities.concurrency.reason}.`);
|
|
145
169
|
}
|
|
146
|
-
else if (capabilities.concurrency.status === "advisory") {
|
|
170
|
+
else if (!postInstall && capabilities.concurrency.status === "advisory") {
|
|
147
171
|
warnings.push(`Concurrency 20 is advisory: ${capabilities.concurrency.reason}.`);
|
|
148
172
|
}
|
|
149
173
|
if (authMode === "chatgpt") {
|
|
@@ -162,12 +186,14 @@ export function runDoctor(deps) {
|
|
|
162
186
|
if (pluginInstalled && !statusCard.serverInstalled) {
|
|
163
187
|
warnings.push("LIT card server is missing from the installed plugin. Run `litcodex install`.");
|
|
164
188
|
}
|
|
165
|
-
const
|
|
189
|
+
const hookReview = inspectAutoUpdateHookReview(deps.fs, codexHome, managedRoot);
|
|
190
|
+
const autoUpdate = { ...readAutoUpdateReport(deps.env), ...(hookReview === undefined ? {} : { hookReview }) };
|
|
166
191
|
if (autoUpdate.status === "unknown-state") {
|
|
167
192
|
issues.push(`Foreground auto-update rollback failed; installation state is unknown. Inspect ${autoUpdate.receiptPath} and reinstall the exact stable package.`);
|
|
168
193
|
}
|
|
169
194
|
return {
|
|
170
195
|
ok: issues.length === 0,
|
|
196
|
+
...(postInstall ? { scope: "post-install" } : {}),
|
|
171
197
|
marketplaceRegistered,
|
|
172
198
|
pluginInstalled,
|
|
173
199
|
hooksWired,
|
|
@@ -182,7 +208,6 @@ export function runDoctor(deps) {
|
|
|
182
208
|
...bundledSkills,
|
|
183
209
|
capabilities,
|
|
184
210
|
autoUpdate,
|
|
185
|
-
jevSkillHint: jevSkillHintState(deps.env),
|
|
186
211
|
autoHandoff: autoHandoffWithWarnings(deps, codexHome, warnings),
|
|
187
212
|
tuiSuggestion: inspectTuiSuggestion(deps.fs, join(codexHome, "config.toml")),
|
|
188
213
|
statusCard,
|
|
@@ -197,12 +222,6 @@ function autoHandoffWithWarnings(deps, codexHome, warnings) {
|
|
|
197
222
|
warnings.push(warning);
|
|
198
223
|
return report;
|
|
199
224
|
}
|
|
200
|
-
/** Mirrors the lit-loop hook switch: `LITCODEX_JEV=1` plus a non-empty `TYPESAFE_API_KEY`. */
|
|
201
|
-
function jevSkillHintState(env) {
|
|
202
|
-
if (env["LITCODEX_JEV"] !== "1")
|
|
203
|
-
return "off";
|
|
204
|
-
return (env["TYPESAFE_API_KEY"]?.trim() ?? "") !== "" ? "on" : "flag on but TYPESAFE_API_KEY missing";
|
|
205
|
-
}
|
|
206
225
|
/** Read the updater receipt without touching the updater lock, journal, or npm. */
|
|
207
226
|
function readAutoUpdateReport(env) {
|
|
208
227
|
const configuredRoot = env["LITCODEX_AUTO_UPDATE_STATE_ROOT"]?.trim();
|
|
@@ -231,12 +250,7 @@ function readAutoUpdateReport(env) {
|
|
|
231
250
|
detail: `an earlier update to ${target} did not finish, and ${PACKAGE_VERSION} is installed now`,
|
|
232
251
|
};
|
|
233
252
|
}
|
|
234
|
-
return {
|
|
235
|
-
enabled,
|
|
236
|
-
status,
|
|
237
|
-
receiptPath,
|
|
238
|
-
detail: "receipt present",
|
|
239
|
-
};
|
|
253
|
+
return { enabled, status, receiptPath, ...explainAutoUpdateReceipt(fields) };
|
|
240
254
|
}
|
|
241
255
|
}
|
|
242
256
|
}
|
|
@@ -245,6 +259,15 @@ function readAutoUpdateReport(env) {
|
|
|
245
259
|
}
|
|
246
260
|
return { enabled, status: null, receiptPath, detail: "no receipt yet" };
|
|
247
261
|
}
|
|
262
|
+
function managedPluginVersion(fs, root) {
|
|
263
|
+
try {
|
|
264
|
+
const version = JSON.parse(fs.readFileSync(join(root, "plugins", "litcodex", ".codex-plugin", "plugin.json"), "utf8")).version;
|
|
265
|
+
return typeof version === "string" && /^\d+\.\d+\.\d+$/u.test(version) ? version : null;
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
248
271
|
function payloadHealthy(fs, root) {
|
|
249
272
|
const marketplacePath = join(root, ".agents", "plugins", "marketplace.json");
|
|
250
273
|
const pluginPath = join(root, "plugins", "litcodex", ".codex-plugin", "plugin.json");
|