@litfamily/litcodex 1.0.11 → 1.0.13
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 +16 -16
- package/README.md +17 -17
- package/dist/cli.js +11 -4
- package/dist/config-migration/gpt56-policy.js +3 -0
- package/dist/install/auto-handoff-doctor.d.ts +4 -0
- package/dist/install/auto-handoff-doctor.js +135 -0
- package/dist/install/doctor-render.js +2 -0
- package/dist/install/doctor.js +10 -0
- package/dist/install/types.d.ts +10 -0
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -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/auto-handoff-settings.d.ts +87 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/auto-handoff-settings.js +414 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/auto-handoff.d.ts +72 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/auto-handoff.js +317 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/cli.js +5 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +11 -2
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +137 -10
- 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/dist/model-metadata.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/rules/dist/model-metadata.js +1 -0
- 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/marketplace/plugins/litcodex/hooks/hooks.json +20 -0
- package/model-catalog.json +25 -5
- package/node_modules/@litcodex/lit-loop/README.md +10 -0
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff-settings.d.ts +87 -0
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff-settings.js +414 -0
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff.d.ts +72 -0
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff.js +317 -0
- package/node_modules/@litcodex/lit-loop/dist/cli.js +5 -1
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +11 -2
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +137 -10
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/package.json +2 -2
- package/readme-assets/badge-version.svg +1 -1
- package/readme-assets/ab-simple/assets/s11-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s5-baseline-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s5-lit-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s7-lit-diagram.webp +0 -0
- package/readme-assets/ab-simple/assets/s8-baseline-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s8-lit-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s9-lit-pages.webp +0 -0
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.13/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.13/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.13/readme-assets/badge-version.svg" alt="1.0.13" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.13/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.13/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.13/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.13/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
@@ -17,20 +17,20 @@ LitCodex는 Codex CLI 플러그인입니다. 계획, 검토, 조사와 오래
|
|
|
17
17
|
작업이 대화가 끝난 뒤에도 이어지게 합니다. 요청에 `lit`을 붙이면 목표와 확인 기준, 결과가 프로젝트에 남고,
|
|
18
18
|
다음 세션에 그 기록을 읽게 해서 이어갈 수 있습니다.
|
|
19
19
|
|
|
20
|
-
**[전체
|
|
20
|
+
**[전체 안내와 스킬 갤러리는 GitHub에서](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md)** · [English](https://github.com/wjgoarxiv/litcodex#readme)
|
|
21
21
|
|
|
22
22
|
## 설치
|
|
23
23
|
|
|
24
24
|
Node.js 22 이상과 Codex CLI가 필요합니다.
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
27
|
+
npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex install
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
설치기는 플러그인과 훅, 에이전트를 등록하고 `~/.codex/config.toml`에서는 자기가 관리하는 항목만 고칩니다.
|
|
31
31
|
설치 중에 어떤 모델이 작업을 이끌지(리드), 어떤 모델이 거들지(헬퍼), 답변 스타일은 무엇으로 할지 묻습니다.
|
|
32
32
|
새로 설치하면 리드는 `gpt-6-astra`/`xhigh`, 헬퍼는 `gpt-6-luna`/`max`로 시작합니다. 바뀔 내용을 먼저 보려면
|
|
33
|
-
`npm exec --yes --package @litfamily/litcodex@1.0.
|
|
33
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex --dry-run install`을 실행하고, 묻는 단계 없이
|
|
34
34
|
설치하려면 `install` 뒤에 `--yes`를 붙이세요.
|
|
35
35
|
|
|
36
36
|
전역 명령으로 쓰려면 다음을 실행합니다.
|
|
@@ -50,7 +50,7 @@ litcodex install
|
|
|
50
50
|
다만 이렇게 빼도 내려받기가 뒤로 미뤄질 뿐입니다. `litcodex install`이 설치에 성공한 뒤 같은 도구를 준비하고,
|
|
51
51
|
이 단계는 끌 수 없습니다.
|
|
52
52
|
|
|
53
|
-
> 전역 설치가 없다면 `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
53
|
+
> 전역 설치가 없다면 `npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex <command>` 형식을 사용하세요.
|
|
54
54
|
|
|
55
55
|
기존 설정과 떼어 놓고 써 보려면
|
|
56
56
|
[격리된 체험 안내](https://github.com/wjgoarxiv/litcodex/blob/main/docs/npm-migration.md#isolated-local-trial)를
|
|
@@ -150,12 +150,6 @@ lit 현재 폴더에 HTML 파일 하나로 할 일 목록을 만들어줘. 외
|
|
|
150
150
|
- `rules`, `lsp`, `comment-checker`는 알아서 돌아갑니다. 프롬프트마다 프로젝트 규칙을 넣고, 수정 뒤에는 LSP와
|
|
151
151
|
주석을 확인합니다.
|
|
152
152
|
|
|
153
|
-
## A/B 결과
|
|
154
|
-
|
|
155
|
-
기본 Codex와 비교한 한 줄짜리 A/B 작업 열 개에서 최종 판정은 LitCodex 기준 8승 1무 1패(S7은 메인테이너 미검토),
|
|
156
|
-
블라인드 심사 판정은 3승 2무 5패였습니다. 작업마다 한 번씩, 배포 전 로컬 빌드로 실행한 결과입니다. 작업별 내용과 두 판정, 화면은
|
|
157
|
-
[GitHub의 A/B 절](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#ab-기본-codex와-lit-비교)에 있습니다.
|
|
158
|
-
|
|
159
153
|
## 설치하면 달라지는 것
|
|
160
154
|
|
|
161
155
|
Codex가 플러그인을 불러오고 훅을 실행합니다. 훅은 요청이 어떤 모드에 속하는지 가리고, 스킬은 에이전트의 작업
|
|
@@ -182,10 +176,16 @@ Codex가 플러그인을 불러오고 훅을 실행합니다. 훅은 요청이
|
|
|
182
176
|
[전체 설명](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#jev-스킬-힌트-선택)(각 상태가 화면에서 어떻게 보이는지도 나옵니다)과
|
|
183
177
|
[개인정보 안내](https://github.com/wjgoarxiv/litcodex/blob/main/docs/privacy.md#optional-jev-skill-hint)를 읽어 주세요.
|
|
184
178
|
|
|
179
|
+
선택 기능인 자동 핸드오프는 대화가 정해 둔 퍼센트에 이르면 핸드오프를 대신 써 주며, 기본값은 꺼짐입니다.
|
|
180
|
+
`lit-handoff auto on 60`(1에서 99 사이의 정수)을 프롬프트 전체로 보내면 켜지고, `lit-handoff auto off`로 끕니다.
|
|
181
|
+
Codex에서는 모델이 핸드오프를 저장하고 그 턴이 끝나면 Codex가 압축합니다(Codex CLI 0.158 이상, 신뢰한 프로젝트).
|
|
182
|
+
Codex가 압축하도록 설정되어 있지 않으면 `/compact`를 실행하라는 한 줄이 나오고, 이후 핸드오프는 저절로 다시
|
|
183
|
+
불러옵니다. 각 단계는 [전체 설명](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#자동-핸드오프-선택)을 읽어 주세요.
|
|
184
|
+
|
|
185
185
|
## 확인, 문제 해결, 제거
|
|
186
186
|
|
|
187
187
|
```sh
|
|
188
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
188
|
+
npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex doctor
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
`litcodex doctor`는 등록·훅·설정·호스트 기능을, `litcodex loop doctor`는 현재 프로젝트의 루프 상태를 확인합니다.
|
|
@@ -200,7 +200,7 @@ npm exec --yes --package @litfamily/litcodex@1.0.11 -- litcodex doctor
|
|
|
200
200
|
[문제 해결](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#문제-해결)을 참고하세요.
|
|
201
201
|
|
|
202
202
|
```sh
|
|
203
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
203
|
+
npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex uninstall
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
플러그인과 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.13/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.13/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.13/readme-assets/badge-version.svg" alt="1.0.13" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.13/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.13/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.13/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.13/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
@@ -17,21 +17,21 @@ LitCodex is a plugin for Codex CLI. It adds planning, review, research and a dur
|
|
|
17
17
|
piece of work can outlast the conversation it started in. Add `lit` to a request, and the goal, its checks and
|
|
18
18
|
the results stay in your project, where a later session can pick them up.
|
|
19
19
|
|
|
20
|
-
**[Full guide
|
|
20
|
+
**[Full guide and skills gallery on GitHub](https://github.com/wjgoarxiv/litcodex#readme)** · [한국어](https://github.com/wjgoarxiv/litcodex/blob/main/packages/litcodex-ai/README-Ko-KR.md)
|
|
21
21
|
|
|
22
22
|
## Install
|
|
23
23
|
|
|
24
24
|
You need Node.js 22 or later and Codex CLI.
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
27
|
+
npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex install
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
The installer registers the plugin, its hooks and its agents, and changes only the keys it manages in
|
|
31
31
|
`~/.codex/config.toml`. It asks which model leads, which model helps, and which output style you like. A
|
|
32
32
|
fresh install starts with `gpt-6-astra` at `xhigh` for the lead and `gpt-6-luna` at `max` for helpers. To
|
|
33
33
|
see the changes before they happen, run
|
|
34
|
-
`npm exec --yes --package @litfamily/litcodex@1.0.
|
|
34
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex --dry-run install`. To install without
|
|
35
35
|
any questions, add `--yes` after `install`.
|
|
36
36
|
|
|
37
37
|
For a global command:
|
|
@@ -52,7 +52,7 @@ To keep the script out of the global install, add `--ignore-scripts` or set `CI=
|
|
|
52
52
|
That only postpones the downloads: `litcodex install` prepares
|
|
53
53
|
the same tools after a successful install, with no switch to turn it off.
|
|
54
54
|
|
|
55
|
-
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
55
|
+
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex <command>`.
|
|
56
56
|
|
|
57
57
|
To try LitCodex apart from your existing settings, follow the
|
|
58
58
|
[isolated trial guide](https://github.com/wjgoarxiv/litcodex/blob/main/docs/npm-migration.md#isolated-local-trial).
|
|
@@ -153,13 +153,6 @@ You can pick these skills in the Codex skill picker or mention one by scoped nam
|
|
|
153
153
|
- `rules`, `lsp` and `comment-checker` run on their own: project rules on each prompt, LSP and comment
|
|
154
154
|
checks after edits.
|
|
155
155
|
|
|
156
|
-
## A/B results
|
|
157
|
-
|
|
158
|
-
In ten one-line A/B tasks against plain Codex, the final verdicts for LitCodex were 8 won, 1 tie, 1 lost
|
|
159
|
-
(the maintainer's call, except S7, which only the blind judge reviewed); the blind judge's were
|
|
160
|
-
3 won, 2 ties, 5 lost. Each arm ran once, and the lit arm used a local pre-release build. The GitHub page has
|
|
161
|
-
[every task, both verdicts and the screenshots](https://github.com/wjgoarxiv/litcodex#ab-plain-codex-vs-lit).
|
|
162
|
-
|
|
163
156
|
## What it changes
|
|
164
157
|
|
|
165
158
|
Codex hosts the plugin and runs its hooks. The hooks work out which mode a request belongs to, the skills
|
|
@@ -191,10 +184,17 @@ appears on screen in each state, and the
|
|
|
191
184
|
[privacy notes](https://github.com/wjgoarxiv/litcodex/blob/main/docs/privacy.md#optional-jev-skill-hint)
|
|
192
185
|
before you turn it on.
|
|
193
186
|
|
|
187
|
+
The optional automatic handoff writes a handoff for you when a conversation reaches a percent you choose,
|
|
188
|
+
and is off by default. Turn it on by sending `lit-handoff auto on 60` (any whole number from 1 to 99) as your
|
|
189
|
+
whole prompt, and off with `lit-handoff auto off`. On Codex the model saves the handoff and Codex compacts
|
|
190
|
+
after that turn (Codex CLI 0.158 or newer, trusted project); when Codex is not set to compact, you get one
|
|
191
|
+
line asking you to run `/compact`. The handoff then comes back on its own. Read
|
|
192
|
+
[the full description](https://github.com/wjgoarxiv/litcodex#automatic-handoff-optional) for each step.
|
|
193
|
+
|
|
194
194
|
## Check, fix, remove
|
|
195
195
|
|
|
196
196
|
```sh
|
|
197
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
197
|
+
npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex doctor
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
`litcodex doctor` checks registration, hooks, config and host capabilities; `litcodex loop doctor` checks the
|
|
@@ -208,7 +208,7 @@ current project's loop state. Both look at the setup; a small real task shows wh
|
|
|
208
208
|
time in an open terminal, note each exit status, and see [troubleshooting](https://github.com/wjgoarxiv/litcodex#troubleshooting).
|
|
209
209
|
|
|
210
210
|
```sh
|
|
211
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
211
|
+
npm exec --yes --package @litfamily/litcodex@1.0.13 -- litcodex uninstall
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
This removes the plugin and the config LitCodex manages, and leaves your other settings alone.
|
package/dist/cli.js
CHANGED
|
@@ -234,13 +234,20 @@ export async function runCli(argv) {
|
|
|
234
234
|
return loopCommand(rest.slice(1), { stdout: process.stdout, stderr: process.stderr, stdin: process.stdin });
|
|
235
235
|
}
|
|
236
236
|
if (head === "hook") {
|
|
237
|
-
if (rest[1] !== "user-prompt-submit" &&
|
|
237
|
+
if (rest[1] !== "user-prompt-submit" &&
|
|
238
|
+
rest[1] !== "stop" &&
|
|
239
|
+
rest[1] !== "session-start" &&
|
|
240
|
+
rest[1] !== "post-compact") {
|
|
238
241
|
return dispatchExit(renderUnknown(rest[1] ?? "hook"));
|
|
239
242
|
}
|
|
240
243
|
const hooks = await import("@litcodex/lit-loop/dist/hook-cli.js");
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
+
if (rest[1] === "stop")
|
|
245
|
+
return hooks.runStopPlanPersistenceHookCli(process.stdin, process.stdout, process.stderr);
|
|
246
|
+
if (rest[1] === "session-start")
|
|
247
|
+
return hooks.runSessionStartHookCli(process.stdin, process.stdout, process.stderr);
|
|
248
|
+
if (rest[1] === "post-compact")
|
|
249
|
+
return hooks.runPostCompactHookCli(process.stdin, process.stdout, process.stderr);
|
|
250
|
+
return hooks.runUserPromptSubmitHookCli(process.stdin, process.stdout, process.stderr);
|
|
244
251
|
}
|
|
245
252
|
}
|
|
246
253
|
// The human-facing dispatcher routes get the same banner as install/doctor/uninstall. Machine
|
|
@@ -35,6 +35,8 @@ export const GPT56_MODELS = {
|
|
|
35
35
|
luna: requiredLegacyProfileModel("luna"),
|
|
36
36
|
};
|
|
37
37
|
export const ASTRA_MODEL = GPT6_MODELS.astra;
|
|
38
|
+
/** The previous-generation GPT-6 Sol id stays a known managed route for users who already chose it. */
|
|
39
|
+
const PREVIOUS_GPT6_SOL_MODEL = requiredModelForAlias("gpt-6-sol");
|
|
38
40
|
export const EXPLICIT_GPT56_SOL_MODEL = requiredModelForAlias("sol");
|
|
39
41
|
export const GPT56_CONTEXT_WINDOW_LIMIT = 372_000;
|
|
40
42
|
export const GPT56_AUTO_COMPACT_TOKEN_LIMIT = 334_800;
|
|
@@ -157,6 +159,7 @@ export function classifyCatalogInput(args) {
|
|
|
157
159
|
originalDispatchId === GPT56_MODELS.luna ||
|
|
158
160
|
originalDispatchId === ASTRA_MODEL ||
|
|
159
161
|
originalDispatchId === GPT6_MODELS.sol ||
|
|
162
|
+
originalDispatchId === PREVIOUS_GPT6_SOL_MODEL ||
|
|
160
163
|
originalDispatchId === GPT6_MODELS.luna) {
|
|
161
164
|
return { class: "existing_managed", originalDispatchId };
|
|
162
165
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReadonlyFsLike } from "./codex.js";
|
|
2
|
+
import type { AutoHandoffDoctorReport } from "./types.js";
|
|
3
|
+
export declare function inspectAutoHandoff(fs: ReadonlyFsLike, env: NodeJS.ProcessEnv, projectRoot: string, codexHome: string | null): AutoHandoffDoctorReport;
|
|
4
|
+
export declare function autoHandoffLine(report: AutoHandoffDoctorReport): string;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// Doctor view of the opt-in automatic handoff. The hook side lives in the lit-loop component
|
|
2
|
+
// (`auto-handoff-settings.ts`); this file reads the same environment variables and the same
|
|
3
|
+
// `.litcodex/auto-handoff/settings.json`, and mirrors its rules so the installer never imports hook code.
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { readRootSettings } from "../config-migration/root-settings.js";
|
|
6
|
+
const FLAG_ENV = "LITCODEX_AUTO_HANDOFF";
|
|
7
|
+
const PERCENT_ENV = "LITCODEX_AUTO_HANDOFF_PERCENT";
|
|
8
|
+
const HOST_KEY = "model_post_turn_compact_threshold_percent";
|
|
9
|
+
const KEY_LINE = new RegExp(`^\\s*${HOST_KEY}\\s*=\\s*(\\d+)\\s*(?:#.*)?$`, "mu");
|
|
10
|
+
/** The marker line `lit-handoff auto on` writes directly above the key; only a key under it is managed. */
|
|
11
|
+
const MANAGED_BEGIN = "# litcodex automatic handoff (managed by `lit-handoff auto`; `lit-handoff auto off` removes it)";
|
|
12
|
+
function percentOf(raw) {
|
|
13
|
+
if (!/^\d{1,2}$/u.test(raw))
|
|
14
|
+
return null;
|
|
15
|
+
const value = Number(raw);
|
|
16
|
+
return value >= 1 && value <= 99 ? value : null;
|
|
17
|
+
}
|
|
18
|
+
function shown(raw) {
|
|
19
|
+
const clean = raw.replace(/[^\x20-\x7e]/gu, "?");
|
|
20
|
+
return clean.length > 24 ? `${clean.slice(0, 24)}...` : clean;
|
|
21
|
+
}
|
|
22
|
+
/** True when the Codex config marks this project trusted; Codex ignores the project's own config until then. */
|
|
23
|
+
function projectTrusted(fs, projectRoot, codexHome) {
|
|
24
|
+
const raw = codexHome === null ? null : readIfPresent(fs, join(codexHome, "config.toml"));
|
|
25
|
+
if (raw === null)
|
|
26
|
+
return false;
|
|
27
|
+
let current = null;
|
|
28
|
+
for (const line of raw.split(/\r?\n/u)) {
|
|
29
|
+
const header = /^\s*\[(.*)\]\s*(?:#.*)?$/u.exec(line);
|
|
30
|
+
if (header?.[1] !== undefined) {
|
|
31
|
+
const table = /^\s*projects\s*\.\s*(?:"((?:[^"\\]|\\.)*)"|'([^']*)')\s*$/u.exec(header[1]);
|
|
32
|
+
current =
|
|
33
|
+
table === null ? null : table[1] !== undefined ? table[1].replace(/\\(["\\])/gu, "$1") : (table[2] ?? null);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (current === projectRoot && /^\s*trust_level\s*=\s*["']trusted["']\s*(?:#.*)?$/u.test(line))
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
/** The percent of a managed compaction block in the project config, else null. */
|
|
42
|
+
function managedCompactionPercent(projectConfig) {
|
|
43
|
+
if (projectConfig === null)
|
|
44
|
+
return null;
|
|
45
|
+
const lines = projectConfig.split("\n");
|
|
46
|
+
for (let index = 1; index < lines.length; index += 1) {
|
|
47
|
+
const match = KEY_LINE.exec((lines[index] ?? "").replace(/\r$/u, ""));
|
|
48
|
+
if (match?.[1] !== undefined && (lines[index - 1] ?? "").replace(/\r$/u, "") === MANAGED_BEGIN) {
|
|
49
|
+
return Number(match[1]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
function readIfPresent(fs, path) {
|
|
55
|
+
try {
|
|
56
|
+
return fs.existsSync(path) ? fs.readFileSync(path, "utf8") : null;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export function inspectAutoHandoff(fs, env, projectRoot, codexHome) {
|
|
63
|
+
const warnings = [];
|
|
64
|
+
let storedEnabled = false;
|
|
65
|
+
let storedPercent = null;
|
|
66
|
+
const rawSettings = readIfPresent(fs, join(projectRoot, ".litcodex", "auto-handoff", "settings.json"));
|
|
67
|
+
if (rawSettings !== null) {
|
|
68
|
+
try {
|
|
69
|
+
const parsed = JSON.parse(rawSettings);
|
|
70
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
71
|
+
throw new Error("not an object");
|
|
72
|
+
storedEnabled = parsed.enabled === true;
|
|
73
|
+
storedPercent = parsed.percent === null ? null : percentOf(String(parsed.percent));
|
|
74
|
+
if (parsed.percent !== null && storedPercent === null) {
|
|
75
|
+
warnings.push("The stored automatic handoff percent is not a whole number from 1 to 99 and was ignored.");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
warnings.push(".litcodex/auto-handoff/settings.json could not be read, so automatic handoff stays off.");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const flag = env[FLAG_ENV]?.trim() ?? "";
|
|
83
|
+
if (flag !== "" && flag !== "1" && flag !== "0") {
|
|
84
|
+
warnings.push(`${FLAG_ENV}=${shown(flag)} is not 1 or 0 and was ignored.`);
|
|
85
|
+
}
|
|
86
|
+
const enabled = flag === "1" ? true : flag === "0" ? false : storedEnabled;
|
|
87
|
+
const rawPercent = env[PERCENT_ENV]?.trim() ?? "";
|
|
88
|
+
const envPercent = rawPercent === "" ? null : percentOf(rawPercent);
|
|
89
|
+
const envInvalid = rawPercent !== "" && envPercent === null;
|
|
90
|
+
if (envInvalid) {
|
|
91
|
+
warnings.push(`${PERCENT_ENV}=${shown(rawPercent)} is not a whole number from 1 to 99, so automatic handoff stays off.`);
|
|
92
|
+
}
|
|
93
|
+
const percent = envInvalid ? null : (envPercent ?? storedPercent);
|
|
94
|
+
const source = flag === "1" || flag === "0" || envPercent !== null ? "environment" : enabled ? "command" : "default";
|
|
95
|
+
if (enabled && !envInvalid && percent === null) {
|
|
96
|
+
warnings.push(`Automatic handoff is on but has no percent. Run "lit-handoff auto on <percent>" or set ${PERCENT_ENV}.`);
|
|
97
|
+
}
|
|
98
|
+
const active = enabled && percent !== null;
|
|
99
|
+
const projectConfig = readIfPresent(fs, join(projectRoot, ".codex", "config.toml"));
|
|
100
|
+
if (!active || percent === null) {
|
|
101
|
+
const left = managedCompactionPercent(projectConfig);
|
|
102
|
+
if (left !== null) {
|
|
103
|
+
warnings.push(`Automatic handoff is off, but the managed block in your project .codex/config.toml keeps compacting at ${left}% with no handoff. The next hook run removes it, or run "lit-handoff auto off".`);
|
|
104
|
+
}
|
|
105
|
+
return { state: "off", percent, source, compaction: null, warnings };
|
|
106
|
+
}
|
|
107
|
+
const projectKey = projectConfig === null ? undefined : KEY_LINE.exec(projectConfig)?.[1];
|
|
108
|
+
const projectPercent = projectKey === undefined ? null : Number(projectKey);
|
|
109
|
+
const trusted = projectPercent !== null && projectTrusted(fs, projectRoot, codexHome);
|
|
110
|
+
const compaction = projectPercent !== null && projectPercent <= percent && trusted ? "codex-after-handoff-turn" : "run-compact";
|
|
111
|
+
if (projectPercent !== null && !trusted) {
|
|
112
|
+
warnings.push("Your project .codex/config.toml sets a compaction percent, but Codex reads that file only in a trusted project, so you will be asked to run /compact yourself.");
|
|
113
|
+
}
|
|
114
|
+
if (projectPercent !== null && trusted && projectPercent < percent) {
|
|
115
|
+
warnings.push(`Your project .codex/config.toml compacts at ${projectPercent}%, below the ${percent}% chosen for automatic handoff, so Codex compacts before the handoff is saved.`);
|
|
116
|
+
}
|
|
117
|
+
const userConfig = codexHome === null ? null : readIfPresent(fs, join(codexHome, "config.toml"));
|
|
118
|
+
if (userConfig !== null) {
|
|
119
|
+
const root = readRootSettings(userConfig);
|
|
120
|
+
const limit = root.model_auto_compact_token_limit;
|
|
121
|
+
const window = root.model_context_window;
|
|
122
|
+
if (typeof limit === "number" && typeof window === "number" && window > 0 && percent >= (limit / window) * 100) {
|
|
123
|
+
warnings.push(`Automatic handoff at ${percent}% is at or above Codex's own automatic compaction point (${Math.round((limit / window) * 100)}% of the context window), so Codex can compact before the handoff is saved. Choose a lower percent.`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return { state: "on", percent, source, compaction, warnings };
|
|
127
|
+
}
|
|
128
|
+
export function autoHandoffLine(report) {
|
|
129
|
+
if (report.state === "off")
|
|
130
|
+
return "off";
|
|
131
|
+
const how = report.compaction === "codex-after-handoff-turn"
|
|
132
|
+
? "Codex compacts after the handoff turn"
|
|
133
|
+
: "you run /compact after the handoff";
|
|
134
|
+
return `on at ${report.percent}% (${report.source}; ${how})`;
|
|
135
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { autoHandoffLine } from "./auto-handoff-doctor.js";
|
|
1
2
|
const MAX_RESOURCE_FAMILIES = 2;
|
|
2
3
|
const MAX_RESOURCE_EXAMPLES = 2;
|
|
3
4
|
const MAX_RESOURCE_PATH_LENGTH = 120;
|
|
@@ -27,6 +28,7 @@ export function renderDoctorText(report) {
|
|
|
27
28
|
` auto-update: ${report.autoUpdate.enabled ? "enabled" : "disabled"} (${report.autoUpdate.status ?? "no receipt"}; ${report.autoUpdate.detail})`,
|
|
28
29
|
]),
|
|
29
30
|
...(report.jevSkillHint === undefined ? [] : [` Jev skill hint: ${report.jevSkillHint}`]),
|
|
31
|
+
...(report.autoHandoff === undefined ? [] : [` automatic handoff: ${autoHandoffLine(report.autoHandoff)}`]),
|
|
30
32
|
` concurrency: ${capabilityText(report.capabilities.concurrency)}`,
|
|
31
33
|
` probe-only explicit context/auto-compaction override: ${capabilityText(report.capabilities.autoCompaction)}`,
|
|
32
34
|
];
|
package/dist/install/doctor.js
CHANGED
|
@@ -11,6 +11,7 @@ import { EXPLICIT_GPT56_SOL_MODEL, GPT56_MODELS } from "../config-migration/gpt5
|
|
|
11
11
|
import { isNewer } from "../update-check.js";
|
|
12
12
|
import { inspectAgentRouting, routingReport } from "./agent-routing.js";
|
|
13
13
|
import { detectAuthMode } from "./auth-mode.js";
|
|
14
|
+
import { inspectAutoHandoff } from "./auto-handoff-doctor.js";
|
|
14
15
|
import { probeBundledSkills } from "./bundled-skills.js";
|
|
15
16
|
import { findCodexBinary, probeMarketplaceRegistration, probePluginInstalled, resolveCodexHome, } from "./codex.js";
|
|
16
17
|
import { inspectEffectiveConfig } from "./doctor-config.js";
|
|
@@ -84,6 +85,7 @@ export function runDoctor(deps) {
|
|
|
84
85
|
capabilities: unavailableCapabilities,
|
|
85
86
|
autoUpdate: readAutoUpdateReport(deps.env),
|
|
86
87
|
jevSkillHint: jevSkillHintState(deps.env),
|
|
88
|
+
autoHandoff: autoHandoffWithWarnings(deps, null, warnings),
|
|
87
89
|
issues,
|
|
88
90
|
warnings,
|
|
89
91
|
};
|
|
@@ -172,10 +174,18 @@ export function runDoctor(deps) {
|
|
|
172
174
|
capabilities,
|
|
173
175
|
autoUpdate,
|
|
174
176
|
jevSkillHint: jevSkillHintState(deps.env),
|
|
177
|
+
autoHandoff: autoHandoffWithWarnings(deps, codexHome, warnings),
|
|
175
178
|
issues,
|
|
176
179
|
warnings,
|
|
177
180
|
};
|
|
178
181
|
}
|
|
182
|
+
/** The automatic handoff report; its warnings also join the doctor's own warning list. */
|
|
183
|
+
function autoHandoffWithWarnings(deps, codexHome, warnings) {
|
|
184
|
+
const report = inspectAutoHandoff(deps.fs, deps.env, deps.repoRoot, codexHome);
|
|
185
|
+
for (const warning of report.warnings)
|
|
186
|
+
warnings.push(warning);
|
|
187
|
+
return report;
|
|
188
|
+
}
|
|
179
189
|
/** Mirrors the lit-loop hook switch: `LITCODEX_JEV=1` plus a non-empty `TYPESAFE_API_KEY`. */
|
|
180
190
|
function jevSkillHintState(env) {
|
|
181
191
|
if (env["LITCODEX_JEV"] !== "1")
|
package/dist/install/types.d.ts
CHANGED
|
@@ -91,6 +91,16 @@ export interface DoctorReport {
|
|
|
91
91
|
readonly autoUpdate?: AutoUpdateDoctorReport;
|
|
92
92
|
/** Opt-in Jev skill hint switch, read from this process's environment. Never carries the key. */
|
|
93
93
|
readonly jevSkillHint?: JevSkillHintState;
|
|
94
|
+
/** Opt-in automatic handoff: off by default; the percent comes from the user. */
|
|
95
|
+
readonly autoHandoff?: AutoHandoffDoctorReport;
|
|
96
|
+
}
|
|
97
|
+
export interface AutoHandoffDoctorReport {
|
|
98
|
+
readonly state: "on" | "off";
|
|
99
|
+
readonly percent: number | null;
|
|
100
|
+
readonly source: "default" | "command" | "environment";
|
|
101
|
+
/** Who compacts once the handoff is saved; null while off. */
|
|
102
|
+
readonly compaction: "codex-after-handoff-turn" | "run-compact" | null;
|
|
103
|
+
readonly warnings: readonly string[];
|
|
94
104
|
}
|
|
95
105
|
export type JevSkillHintState = "off" | "on" | "flag on but TYPESAFE_API_KEY missing";
|
|
96
106
|
export interface AutoUpdateDoctorReport {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const AUTO_HANDOFF_FLAG_ENV = "LITCODEX_AUTO_HANDOFF";
|
|
2
|
+
export declare const AUTO_HANDOFF_PERCENT_ENV = "LITCODEX_AUTO_HANDOFF_PERCENT";
|
|
3
|
+
export declare const AUTO_HANDOFF_DIR = ".litcodex/auto-handoff";
|
|
4
|
+
export declare const AUTO_HANDOFF_SETTINGS_FILE = "settings.json";
|
|
5
|
+
export declare const HOST_COMPACT_KEY = "model_post_turn_compact_threshold_percent";
|
|
6
|
+
export declare const HOST_COMPACT_BEGIN = "# litcodex automatic handoff (managed by `lit-handoff auto`; `lit-handoff auto off` removes it)";
|
|
7
|
+
export interface StoredAutoHandoff {
|
|
8
|
+
readonly enabled: boolean;
|
|
9
|
+
readonly percent: number | null;
|
|
10
|
+
}
|
|
11
|
+
export type AutoHandoffSource = "default" | "command" | "environment";
|
|
12
|
+
export interface AutoHandoffState {
|
|
13
|
+
/** True only when the feature is on AND has a valid percent. */
|
|
14
|
+
readonly active: boolean;
|
|
15
|
+
/** The percent in force, or null when there is none. */
|
|
16
|
+
readonly percent: number | null;
|
|
17
|
+
/** Where the on/off decision came from. */
|
|
18
|
+
readonly source: AutoHandoffSource;
|
|
19
|
+
/** Plain-language problems the doctor and `status` show. */
|
|
20
|
+
readonly warnings: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
/** A whole number from 1 to 99 written as plain digits, else null. */
|
|
23
|
+
export declare function parsePercent(raw: string | undefined): number | null;
|
|
24
|
+
export declare function settingsPath(repoRoot: string): string;
|
|
25
|
+
/** Read a small regular file; null when missing, a symlink, too large, or unreadable. */
|
|
26
|
+
export declare function readSmallFile(path: string): string | null;
|
|
27
|
+
/** The stored choice; a missing, malformed or hand-edited file reads as "off, no percent". */
|
|
28
|
+
export declare function readStoredAutoHandoff(repoRoot: string): {
|
|
29
|
+
stored: StoredAutoHandoff;
|
|
30
|
+
warning: string | null;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Combine the environment with the stored choice. The environment wins when it is set: `=1` turns the
|
|
34
|
+
* feature on and `=0` turns it off. The percent comes from its variable first, then from the stored
|
|
35
|
+
* value. Nothing is active without a valid percent.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveAutoHandoff(env: NodeJS.ProcessEnv, stored: StoredAutoHandoff, storedWarning?: string | null): AutoHandoffState;
|
|
38
|
+
export declare function loadAutoHandoffState(repoRoot: string, env: NodeJS.ProcessEnv): AutoHandoffState;
|
|
39
|
+
/** Atomic write that refuses to go through a symlink (in any component below `root`) or replace anything but a regular file. */
|
|
40
|
+
export declare function writeSmallFile(path: string, text: string, root: string): boolean;
|
|
41
|
+
export declare function writeStoredAutoHandoff(repoRoot: string, stored: StoredAutoHandoff): boolean;
|
|
42
|
+
export declare function projectConfigPath(repoRoot: string): string;
|
|
43
|
+
export type ProjectCompaction = {
|
|
44
|
+
readonly kind: "managed";
|
|
45
|
+
readonly percent: number;
|
|
46
|
+
} | {
|
|
47
|
+
readonly kind: "user-set";
|
|
48
|
+
readonly percent: number;
|
|
49
|
+
} | {
|
|
50
|
+
readonly kind: "absent";
|
|
51
|
+
};
|
|
52
|
+
/** What the project's `.codex/config.toml` says about compacting after a turn. */
|
|
53
|
+
export declare function readProjectCompaction(repoRoot: string): ProjectCompaction;
|
|
54
|
+
/**
|
|
55
|
+
* True when `$CODEX_HOME/config.toml` marks this project trusted. Codex ignores a project's own
|
|
56
|
+
* `.codex/config.toml` until then, so an untrusted project never gets the compaction setting applied.
|
|
57
|
+
*/
|
|
58
|
+
export declare function projectTrusted(repoRoot: string, env: NodeJS.ProcessEnv): boolean;
|
|
59
|
+
/** True when Codex itself will compact once a turn ends with usage at or above `percent`. */
|
|
60
|
+
export declare function hostCompactsAt(repoRoot: string, percent: number, env: NodeJS.ProcessEnv): boolean;
|
|
61
|
+
export type ProjectConfigResult = "written" | "unchanged-user-key" | "failed" | "removed" | "nothing-to-remove";
|
|
62
|
+
/** Write (or update) the marked block. A key the user wrote by hand stays as it is. */
|
|
63
|
+
export declare function writeProjectCompaction(repoRoot: string, percent: number): ProjectConfigResult;
|
|
64
|
+
/** Remove only the marked block; delete the file (and an empty `.codex`) when nothing else is left. */
|
|
65
|
+
export declare function removeProjectCompaction(repoRoot: string): ProjectConfigResult;
|
|
66
|
+
/**
|
|
67
|
+
* Remove the managed block when the feature is effectively off, however it got there: `lit-handoff auto
|
|
68
|
+
* off`, `LITCODEX_AUTO_HANDOFF=0`, a deleted settings file, or a percent that is not valid. Without this the
|
|
69
|
+
* block outlives the switch and Codex keeps compacting at that percent with no handoff. Only the marked
|
|
70
|
+
* block goes; a key the user wrote by hand is never touched. Never throws.
|
|
71
|
+
*/
|
|
72
|
+
export declare function clearManagedCompactionWhenOff(repoRoot: string, env: NodeJS.ProcessEnv): ProjectConfigResult;
|
|
73
|
+
export type AutoHandoffRoute = {
|
|
74
|
+
readonly action: "on";
|
|
75
|
+
readonly argument: string | null;
|
|
76
|
+
} | {
|
|
77
|
+
readonly action: "off";
|
|
78
|
+
} | {
|
|
79
|
+
readonly action: "status";
|
|
80
|
+
} | {
|
|
81
|
+
readonly action: "usage";
|
|
82
|
+
};
|
|
83
|
+
/** Only the complete prompt `lit-handoff auto ...` (case-insensitive, edge whitespace allowed) is a route. */
|
|
84
|
+
export declare function parseAutoHandoffRoute(prompt: string): AutoHandoffRoute | null;
|
|
85
|
+
export declare function describeAutoHandoff(repoRoot: string, state: AutoHandoffState, env: NodeJS.ProcessEnv): string;
|
|
86
|
+
/** Apply a parsed route and return the one message the user sees. Never throws. */
|
|
87
|
+
export declare function applyAutoHandoffRoute(repoRoot: string, env: NodeJS.ProcessEnv, route: AutoHandoffRoute): string;
|