@litfamily/litcodex 1.0.25 → 1.0.26
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 +11 -12
- package/README.md +11 -13
- 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,12 +1,12 @@
|
|
|
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.26/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.26/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.26/readme-assets/badge-version.svg" alt="1.0.26" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.26/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.26/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.26/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.26/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
@@ -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.26 -- 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.26 -- 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.26 -- litcodex <command>` 형식을 사용하세요.
|
|
43
43
|
|
|
44
44
|
## 첫 작업
|
|
45
45
|
|
|
@@ -82,16 +82,15 @@ lit 회원가입 폼에 입력 검증을 추가해줘
|
|
|
82
82
|
대화형 관리 명령 뒤에는 업데이트 실행기가 새 전역 패키지를 설치할 수 있습니다. `LITCODEX_NO_UPDATE_CHECK=1`을
|
|
83
83
|
설정하면 둘 다 꺼집니다. 실패했거나 `--json`·`--dry-run`으로 돌렸거나, 비TTY·CI 환경이거나 이 설정으로 끈
|
|
84
84
|
doctor 실행은 부수 효과가 없습니다.
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
외부 서비스로 가는 [Jev 스킬 힌트](https://github.com/wjgoarxiv/litcodex/blob/main/docs/jev-skill-hint-Ko-KR.md)입니다.
|
|
85
|
+
- [자동 핸드오프](https://github.com/wjgoarxiv/litcodex/blob/main/docs/auto-handoff-Ko-KR.md)는 선택 기능이며
|
|
86
|
+
기본값은 꺼짐입니다.
|
|
88
87
|
- 테스트, 픽스처, 테스트 헬퍼, Vitest 설정은 저장소에만 있습니다. npm 패키지와 설치된 마켓플레이스 플러그인에는
|
|
89
88
|
들어가지 않습니다.
|
|
90
89
|
|
|
91
90
|
## 확인, 문제 해결, 제거
|
|
92
91
|
|
|
93
92
|
```sh
|
|
94
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
93
|
+
npm exec --yes --package @litfamily/litcodex@1.0.26 -- litcodex doctor
|
|
95
94
|
```
|
|
96
95
|
|
|
97
96
|
`litcodex doctor`는 등록·훅·설정·호스트 기능을, `litcodex loop doctor`는 현재 프로젝트의 루프 상태를 확인합니다.
|
|
@@ -99,7 +98,7 @@ npm exec --yes --package @litfamily/litcodex@1.0.25 -- litcodex doctor
|
|
|
99
98
|
[문제 해결](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#문제-해결)에 있습니다.
|
|
100
99
|
|
|
101
100
|
```sh
|
|
102
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
101
|
+
npm exec --yes --package @litfamily/litcodex@1.0.26 -- litcodex uninstall
|
|
103
102
|
```
|
|
104
103
|
|
|
105
104
|
플러그인과 LitCodex가 관리하는 설정을 지우고, 관련 없는 설정은 그대로 둡니다.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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.26/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.26/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.26/readme-assets/badge-version.svg" alt="1.0.26" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.26/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.26/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.26/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.26/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
@@ -23,12 +23,12 @@ and hands unfinished work to the next session.
|
|
|
23
23
|
You need Node.js 22 or later and 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.26 -- litcodex install
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
The installer asks which model leads, which model helps and which output style you like, shows what it is
|
|
30
30
|
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.
|
|
31
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.26 -- litcodex --dry-run install`. To skip the
|
|
32
32
|
questions, add `--yes` after `install`.
|
|
33
33
|
|
|
34
34
|
```sh
|
|
@@ -40,7 +40,7 @@ A global install also gets the video skill's tools ready with a few pinned downl
|
|
|
40
40
|
[install guide](https://github.com/wjgoarxiv/litcodex/blob/main/docs/install.md#a-global-command) lists them
|
|
41
41
|
and shows how to skip them.
|
|
42
42
|
|
|
43
|
-
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
43
|
+
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.26 -- litcodex <command>`.
|
|
44
44
|
|
|
45
45
|
## First task
|
|
46
46
|
|
|
@@ -86,17 +86,15 @@ Pick any skill in the Codex skill picker or mention it by scoped name, such as `
|
|
|
86
86
|
global package after an eligible interactive management command. Set `LITCODEX_NO_UPDATE_CHECK=1` to
|
|
87
87
|
turn off both. A doctor run that failed, or ran with `--json`, `--dry-run`, in a non-TTY or CI shell, or
|
|
88
88
|
with the opt-out set, stays side-effect-free.
|
|
89
|
-
-
|
|
90
|
-
|
|
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.
|
|
89
|
+
- [Automatic handoff](https://github.com/wjgoarxiv/litcodex/blob/main/docs/auto-handoff.md) is optional and
|
|
90
|
+
off by default.
|
|
93
91
|
- Tests, fixtures, test helpers and the Vitest configuration live only in the repository. Neither the npm
|
|
94
92
|
package nor the installed marketplace plugin includes them.
|
|
95
93
|
|
|
96
94
|
## Check, fix, remove
|
|
97
95
|
|
|
98
96
|
```sh
|
|
99
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
97
|
+
npm exec --yes --package @litfamily/litcodex@1.0.26 -- litcodex doctor
|
|
100
98
|
```
|
|
101
99
|
|
|
102
100
|
`litcodex doctor` checks registration, hooks, config and host capabilities; `litcodex loop doctor` checks
|
|
@@ -104,7 +102,7 @@ the current project's loop state. If `lit` does nothing, run doctor and check th
|
|
|
104
102
|
in Codex. More fixes are under [troubleshooting](https://github.com/wjgoarxiv/litcodex#troubleshooting).
|
|
105
103
|
|
|
106
104
|
```sh
|
|
107
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
105
|
+
npm exec --yes --package @litfamily/litcodex@1.0.26 -- litcodex uninstall
|
|
108
106
|
```
|
|
109
107
|
|
|
110
108
|
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");
|
package/dist/install/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import readline from "node:readline/promises";
|
|
|
12
12
|
import { migrateCodexConfig, readLitCodexOutputStyleId } from "../config-migration/index.js";
|
|
13
13
|
import { humanLabel, preflightLabel, renderBanner, renderInstallFailure, renderInstallReceipt, renderPreflightIntro, renderStepIntro, renderStepResult, Spinner, shouldDecorate, } from "../ui.js";
|
|
14
14
|
import { codexSpawnInvocation, resolveCodexHome } from "./codex.js";
|
|
15
|
-
import { renderDoctorText, runDoctor } from "./doctor.js";
|
|
15
|
+
import { doctorScopeFor, renderDoctorText, runDoctor } from "./doctor.js";
|
|
16
16
|
import { exitCodeForInstallError, InstallError, toErrorJson } from "./errors.js";
|
|
17
17
|
import { executeInstallPlan } from "./execute.js";
|
|
18
18
|
import { listPayloadEntries, readRegularFileBuffer } from "./file-walk.js";
|
|
@@ -371,7 +371,16 @@ export async function runInstallCli(args, io = defaultIo()) {
|
|
|
371
371
|
export function runDoctorCli(args, io = defaultIo()) {
|
|
372
372
|
const json = args.includes("--json");
|
|
373
373
|
writeCommandBanner(io, args);
|
|
374
|
-
const
|
|
374
|
+
const scope = doctorScopeFor(io.env);
|
|
375
|
+
const report = runDoctor({ spawn: realSpawn, fs: realFs, env: io.env, repoRoot: io.repoRoot, scope });
|
|
376
|
+
if (scope === "post-install") {
|
|
377
|
+
// The optional office and film runtimes never decide health; the update's 10 s check skips them.
|
|
378
|
+
if (json)
|
|
379
|
+
io.stdout.write(`${JSON.stringify(report)}\n`);
|
|
380
|
+
else
|
|
381
|
+
io.stdout.write(`${renderDoctorText(report)}\n`);
|
|
382
|
+
return report.ok ? 0 : 4;
|
|
383
|
+
}
|
|
375
384
|
const officeRuntime = officeRuntimeStatus(resolveCodexHome(io.env), spawnSync, io.env);
|
|
376
385
|
const motionRuntime = motionRuntimeStatus(resolveCodexHome(io.env), spawnSync, io.env);
|
|
377
386
|
if (json) {
|
package/dist/install/types.d.ts
CHANGED
|
@@ -71,6 +71,8 @@ export interface InstallResult {
|
|
|
71
71
|
}
|
|
72
72
|
export interface DoctorReport {
|
|
73
73
|
readonly ok: boolean;
|
|
74
|
+
/** Present only for the short check an automatic update runs right after its own install. */
|
|
75
|
+
readonly scope?: "post-install";
|
|
74
76
|
readonly marketplaceRegistered: boolean;
|
|
75
77
|
readonly pluginInstalled: boolean;
|
|
76
78
|
readonly hooksWired: boolean;
|
|
@@ -89,8 +91,6 @@ export interface DoctorReport {
|
|
|
89
91
|
readonly warnings: readonly string[];
|
|
90
92
|
/** Read-only foreground update barrier state; the updater owns the receipt/journal files. */
|
|
91
93
|
readonly autoUpdate?: AutoUpdateDoctorReport;
|
|
92
|
-
/** Opt-in Jev skill hint switch, read from this process's environment. Never carries the key. */
|
|
93
|
-
readonly jevSkillHint?: JevSkillHintState;
|
|
94
94
|
/** Opt-in automatic handoff: off by default; the percent comes from the user. */
|
|
95
95
|
readonly autoHandoff?: AutoHandoffDoctorReport;
|
|
96
96
|
/** Built-in Codex status line / terminal title snippet; null when the config already sets both. */
|
|
@@ -116,13 +116,17 @@ export interface AutoHandoffDoctorReport {
|
|
|
116
116
|
readonly compaction: "codex-after-handoff-turn" | "run-compact" | null;
|
|
117
117
|
readonly warnings: readonly string[];
|
|
118
118
|
}
|
|
119
|
-
export type JevSkillHintState = "off" | "on" | "flag on but TYPESAFE_API_KEY missing";
|
|
120
119
|
export interface AutoUpdateDoctorReport {
|
|
121
120
|
readonly enabled: boolean;
|
|
122
121
|
readonly status: string | null;
|
|
123
122
|
readonly receiptPath: string;
|
|
124
123
|
readonly detail: string;
|
|
124
|
+
/** One thing the user can do about the recorded state; absent when nothing is needed. */
|
|
125
|
+
readonly remedy?: string;
|
|
126
|
+
/** Whether Codex has an approval recorded for the SessionStart updater hook; absent when unknown. */
|
|
127
|
+
readonly hookReview?: AutoUpdateHookReview;
|
|
125
128
|
}
|
|
129
|
+
export type AutoUpdateHookReview = "approved" | "not-approved" | "turned-off";
|
|
126
130
|
export interface EffectiveConfigReport {
|
|
127
131
|
readonly state: "applied" | "preserved" | "unavailable";
|
|
128
132
|
readonly detail: string;
|
|
@@ -92,6 +92,13 @@ export interface AutoUpdateRunOptions extends AutoUpdatePlanOptions {
|
|
|
92
92
|
readonly spawn?: AutoUpdateSpawn;
|
|
93
93
|
readonly verifyInstalled?: AutoUpdateVerify;
|
|
94
94
|
readonly writeReceipt?: boolean;
|
|
95
|
+
/** Read at the start (unless `now` is given) and again at the end, so the receipt shows the real finish. */
|
|
96
|
+
readonly clock?: () => number;
|
|
97
|
+
/**
|
|
98
|
+
* The versioned plugin folder the running Codex session started from. Codex removes it when the new plugin
|
|
99
|
+
* is installed, yet the session keeps using its hooks and skill files, so the updater puts it back.
|
|
100
|
+
*/
|
|
101
|
+
readonly keepPluginRoot?: string;
|
|
95
102
|
}
|
|
96
103
|
export interface AutoUpdateReceipt {
|
|
97
104
|
readonly schemaVersion: typeof AUTO_UPDATE_SCHEMA_VERSION;
|