@litfamily/lithermes 1.0.13 → 1.0.15

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.
Files changed (28) hide show
  1. package/README.md +11 -27
  2. package/README_Ko-KR.md +11 -27
  3. package/assets/lithermes-plugin/README.md +35 -4
  4. package/assets/lithermes-plugin/__init__.py +25 -2
  5. package/assets/lithermes-plugin/auto_handoff.py +733 -0
  6. package/assets/lithermes-plugin/core.py +10 -0
  7. package/assets/lithermes-plugin/diagnostics.py +12 -2
  8. package/assets/lithermes-plugin/handoff.py +13 -2
  9. package/assets/lithermes-plugin/payload-version.json +15 -11
  10. package/assets/lithermes-plugin/plugin.yaml +1 -1
  11. package/assets/lithermes-plugin/skills/frontend-ui-ux/references/complete-contract.md +2 -2
  12. package/assets/lithermes-plugin/skills/lit-handoff/SKILL.md +7 -0
  13. package/assets/lithermes-plugin/skills/visual-qa/references/complete-contract.md +2 -2
  14. package/package.json +1 -1
  15. package/readme-assets/badge-version.svg +1 -1
  16. package/src/lib/modelRoutePolicy.js +9 -1
  17. package/readme-assets/ab-simple/s11-ui-baseline-desktop.webp +0 -0
  18. package/readme-assets/ab-simple/s11-ui-lithermes-desktop.webp +0 -0
  19. package/readme-assets/ab-simple/s3-ui-baseline-desktop.webp +0 -0
  20. package/readme-assets/ab-simple/s3-ui-lithermes-desktop.webp +0 -0
  21. package/readme-assets/ab-simple/s4-ui-baseline-desktop.webp +0 -0
  22. package/readme-assets/ab-simple/s4-ui-lithermes-desktop.webp +0 -0
  23. package/readme-assets/ab-simple/s5-office-baseline-slides.webp +0 -0
  24. package/readme-assets/ab-simple/s5-office-lithermes-slides.webp +0 -0
  25. package/readme-assets/ab-simple/s7-lithermes-diagram.webp +0 -0
  26. package/readme-assets/ab-simple/s8-office-baseline-slides.webp +0 -0
  27. package/readme-assets/ab-simple/s8-office-lithermes-slides.webp +0 -0
  28. package/readme-assets/ab-simple/s9-office-lithermes-pages.webp +0 -0
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
- <p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: five armored robots power on one by one, the LitHermes robot wakes with glowing eyes and a lit frame, then LITFAMILY and KEEP THE WORK LIT. light up." /></picture></p>
1
+ <p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: five armored robots power on one by one, the LitHermes robot wakes with glowing eyes and a lit frame, then LITFAMILY and KEEP THE WORK LIT. light up." /></picture></p>
2
2
 
3
- <p align="center"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/ascii-readme.svg" width="480" alt="LIT ASCII B mark" /></p>
3
+ <p align="center"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/ascii-readme.svg" width="480" alt="LIT ASCII B mark" /></p>
4
4
 
5
5
  <p align="center">
6
- <a href="#install"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/badge-version.svg" alt="1.0.13" /></a>
7
- <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/badge-license.svg" alt="MIT license" /></a>
6
+ <a href="#install"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/badge-version.svg" alt="1.0.15" /></a>
7
+ <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/badge-license.svg" alt="MIT license" /></a>
8
8
  </p>
9
9
 
10
10
  <p align="center">
11
- <a href="https://github.com/wjgoarxiv/lithermes/blob/main/docs/guide.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/lucide-book-open.svg" width="16" alt="" /> Guide</a> &nbsp;
12
- <a href="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition film</a> &nbsp;
13
- <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
11
+ <a href="https://github.com/wjgoarxiv/lithermes/blob/main/docs/guide.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/lucide-book-open.svg" width="16" alt="" /> Guide</a> &nbsp;
12
+ <a href="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition film</a> &nbsp;
13
+ <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
14
14
  </p>
15
15
 
16
16
  # LitHermes
@@ -19,7 +19,7 @@
19
19
 
20
20
  A plugin for **Hermes Agent**. Add `lit` to a request, and Hermes plans the task, does it, checks it, and leaves a note the next session can pick up.
21
21
 
22
- **[Full guide, skills gallery and A/B results on GitHub](https://github.com/wjgoarxiv/lithermes#readme)** · [한국어](https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/README_Ko-KR.md)
22
+ **[Full guide and skills gallery on GitHub](https://github.com/wjgoarxiv/lithermes#readme)** · [한국어](https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/README_Ko-KR.md)
23
23
 
24
24
  ## Install
25
25
 
@@ -84,25 +84,9 @@ On a Telegram gateway, use `/lit_loop` and `/lit_plan`. Every skill also loads b
84
84
  - To stop every version check, set `NO_UPDATE_NOTIFIER=1` or `LITHERMES_NO_UPDATE_CHECK=1`. Any value counts for these variables. The GitHub page explains the update step in full.
85
85
  - LitHermes decides where a request goes; Hermes Agent still runs the model.
86
86
 
87
- ## Does it help?
87
+ ## Automatic handoff
88
88
 
89
- Ten casual one-line Korean prompts were each run once in Hermes Agent v0.21.3 with `gpt-6-sol` at reasoning `high`, as written and with ` lit` added at the end. A blind judge compared each pair in both orders, and the maintainer made the final call.
90
-
91
- | Task | Prompt | Final verdict | Blind judge (same round) |
92
- |---|---|---|---|
93
- | S1 · Terminal to-do CLI | 터미널에서 쓰는 할 일 관리 CLI 만들어줘 | Tie | Baseline won |
94
- | S2 · API server bugs | 이 API 서버 가끔 이상하게 동작하는데 고쳐줘 | Tie | Tie |
95
- | S3 · Budget dashboard (UI round) | 개인 가계부 대시보드 웹페이지 만들어줘 | **LitHermes won** | LitHermes won |
96
- | S4 · Café landing page (UI round) | 동네 카페 브랜드 랜딩페이지 만들어줘 | **LitHermes won** | LitHermes won |
97
- | S5 · Report and slides from sources (office round) | sources 폴더 자료로 보고서랑 발표자료 만들어줘 | **LitHermes won** | LitHermes won |
98
- | S6 · Node 22→24 research | Node 22에서 24로 올릴 때 달라지는 거 조사해줘 | **LitHermes won** | Tie |
99
- | S7 · Order, payment and shipping diagram | 주문-결제-배송 서비스 구조도 그려줘 | **LitHermes won** | LitHermes won |
100
- | S8 · Quarterly results deck (office round) | 분기 실적 발표자료 만들어줘 | **LitHermes won** | Baseline won |
101
- | S9 · New product plan (office round) | 신제품 기획서 써줘 | **LitHermes won** | LitHermes won |
102
- | S11 · Meeting-room booking web app (UI round) | 회의실 예약 웹앱 만들어줘 | **LitHermes won** | Tie |
103
- | Total | | **8 won, 2 tied, 0 lost** | 5 won, 3 tied, 2 lost |
104
-
105
- The judge preferred the baseline in S1 and S8. What each side produced, the screenshots, and the notes on which tasks came from later rounds are on GitHub. The motion cover at the top was made with the LitFamily motion skill. That skill (`lit-typographic-motion` here) was rebuilt after its first A/B and has no A/B result yet.
89
+ This is off by default, and the percent is yours to choose. `/lit-handoff auto on 60` (any whole number from 1 to 99) makes LitHermes ask the model for a handoff on the first message after a model call passes 60% of the context window, and then tell you to run `/compact`. A plugin cannot start compaction on Hermes, so you run it, or Hermes compacts on its own threshold. After compaction the handoff comes back as a short digest. `/lit-handoff auto off` and `/lit-handoff auto status` do what they say, and `LITHERMES_AUTO_HANDOFF=1` with `LITHERMES_AUTO_HANDOFF_PERCENT` sets it from the environment. The [GitHub README](https://github.com/wjgoarxiv/lithermes#automatic-handoff) lists which steps are automatic and how to pick a percent that Hermes' own compaction leaves alone.
106
90
 
107
91
  ## Optional: Jev skill hint
108
92
 
@@ -130,7 +114,7 @@ npx --package @litfamily/lithermes -- lithermes uninstall --yes
130
114
 
131
115
  ## Learn more
132
116
 
133
- - [Full README on GitHub](https://github.com/wjgoarxiv/lithermes#readme): the skills gallery, the A/B results with screenshots, and how it works
117
+ - [Full README on GitHub](https://github.com/wjgoarxiv/lithermes#readme): the skills gallery and how it works
134
118
  - [Operating guide](https://github.com/wjgoarxiv/lithermes/blob/main/docs/guide.md): commands, models, skins and troubleshooting
135
119
  - [Changelog](https://github.com/wjgoarxiv/lithermes/blob/main/CHANGELOG.md) · [Contributing](https://github.com/wjgoarxiv/lithermes/blob/main/CONTRIBUTING.md) · [Security](https://github.com/wjgoarxiv/lithermes/blob/main/SECURITY.md) · [Support](https://github.com/wjgoarxiv/lithermes/blob/main/SUPPORT.md)
136
120
 
package/README_Ko-KR.md CHANGED
@@ -1,16 +1,16 @@
1
- <p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 다섯 로봇 패널이 차례로 켜지고, LitHermes 로봇의 눈과 테두리가 빛난 뒤 LITFAMILY와 KEEP THE WORK LIT. 문구가 밝아지는 영상" /></picture></p>
1
+ <p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 다섯 로봇 패널이 차례로 켜지고, LitHermes 로봇의 눈과 테두리가 빛난 뒤 LITFAMILY와 KEEP THE WORK LIT. 문구가 밝아지는 영상" /></picture></p>
2
2
 
3
- <p align="center"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/ascii-readme.svg" width="480" alt="LIT ASCII B 마크" /></p>
3
+ <p align="center"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/ascii-readme.svg" width="480" alt="LIT ASCII B 마크" /></p>
4
4
 
5
5
  <p align="center">
6
- <a href="#설치"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/badge-version.svg" alt="1.0.13" /></a>
7
- <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/badge-license.svg" alt="MIT license" /></a>
6
+ <a href="#설치"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/badge-version.svg" alt="1.0.15" /></a>
7
+ <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/badge-license.svg" alt="MIT license" /></a>
8
8
  </p>
9
9
 
10
10
  <p align="center">
11
- <a href="https://github.com/wjgoarxiv/lithermes/blob/main/docs/guide.ko.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/lucide-book-open.svg" width="16" alt="" /> 안내</a> &nbsp;
12
- <a href="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition 영상</a> &nbsp;
13
- <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
11
+ <a href="https://github.com/wjgoarxiv/lithermes/blob/main/docs/guide.ko.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/lucide-book-open.svg" width="16" alt="" /> 안내</a> &nbsp;
12
+ <a href="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition 영상</a> &nbsp;
13
+ <a href="https://github.com/wjgoarxiv/lithermes/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
14
14
  </p>
15
15
 
16
16
  # LitHermes
@@ -19,7 +19,7 @@
19
19
 
20
20
  **Hermes Agent**용 플러그인입니다. 요청에 `lit`을 붙이면 Hermes가 작업을 계획하고, 실행하고, 확인한 뒤 다음 세션이 이어받을 기록을 남깁니다.
21
21
 
22
- **[전체 안내, 스킬 갤러리, A/B 결과는 GitHub에서](https://github.com/wjgoarxiv/lithermes/blob/main/README_Ko-KR.md)** · [English](https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.13/README.md)
22
+ **[전체 안내와 스킬 갤러리는 GitHub에서](https://github.com/wjgoarxiv/lithermes/blob/main/README_Ko-KR.md)** · [English](https://cdn.jsdelivr.net/npm/@litfamily/lithermes@1.0.15/README.md)
23
23
 
24
24
  ## 설치
25
25
 
@@ -83,25 +83,9 @@ Telegram gateway에서는 `/lit_loop`와 `/lit_plan`을 쓰세요. 모든 스킬
83
83
  - 버전 확인을 모두 멈추려면 `NO_UPDATE_NOTIFIER=1` 또는 `LITHERMES_NO_UPDATE_CHECK=1`을 설정하세요. 이 변수들은 어떤 값이든 똑같이 적용됩니다. 업데이트 과정의 자세한 설명은 GitHub 문서에 있습니다.
84
84
  - 요청을 어디로 보낼지는 LitHermes가 정하고, 모델은 여전히 Hermes Agent가 돌립니다.
85
85
 
86
- ## 정말 도움이 되나요?
86
+ ## 자동 핸드오프
87
87
 
88
- 가볍게 쓴 한국어 한 줄 요청 10개를 각각 원문 그대로 한 번, 끝에 ` lit`을 붙여 한 번, 이렇게 두 번씩 Hermes Agent v0.21.3, `gpt-6-sol`, 추론 `high`로 실행했습니다. 블라인드 판정자가 두 결과를 순서를 바꿔 비교했고, 최종 판정은 메인테이너가 내렸습니다.
89
-
90
- | 작업 | 요청 | 최종 판정 | 블라인드 판정(같은 라운드) |
91
- |---|---|---|---|
92
- | S1 · 터미널 할 일 CLI | 터미널에서 쓰는 할 일 관리 CLI 만들어줘 | 무승부 | 기준선 승 |
93
- | S2 · API 서버 버그 | 이 API 서버 가끔 이상하게 동작하는데 고쳐줘 | 무승부 | 무승부 |
94
- | S3 · 가계부 대시보드 (UI 라운드) | 개인 가계부 대시보드 웹페이지 만들어줘 | **LitHermes 승** | LitHermes 승 |
95
- | S4 · 카페 랜딩페이지 (UI 라운드) | 동네 카페 브랜드 랜딩페이지 만들어줘 | **LitHermes 승** | LitHermes 승 |
96
- | S5 · 자료 기반 보고서와 발표자료 (오피스 라운드) | sources 폴더 자료로 보고서랑 발표자료 만들어줘 | **LitHermes 승** | LitHermes 승 |
97
- | S6 · Node 22→24 조사 | Node 22에서 24로 올릴 때 달라지는 거 조사해줘 | **LitHermes 승** | 무승부 |
98
- | S7 · 주문·결제·배송 구조도 | 주문-결제-배송 서비스 구조도 그려줘 | **LitHermes 승** | LitHermes 승 |
99
- | S8 · 분기 실적 발표자료 (오피스 라운드) | 분기 실적 발표자료 만들어줘 | **LitHermes 승** | 기준선 승 |
100
- | S9 · 신제품 기획서 (오피스 라운드) | 신제품 기획서 써줘 | **LitHermes 승** | LitHermes 승 |
101
- | S11 · 회의실 예약 웹앱 (UI 라운드) | 회의실 예약 웹앱 만들어줘 | **LitHermes 승** | 무승부 |
102
- | 합계 | | **8승 2무 0패** | 5승 3무 2패 |
103
-
104
- 판정자는 S1과 S8에서 기준선을 골랐습니다. 양쪽이 만든 결과물과 스크린샷, 그리고 각 작업이 어느 라운드에서 나왔는지는 GitHub에서 확인할 수 있습니다. 맨 위 모션 표지는 LitFamily 모션 스킬로 만들었습니다. 이 스킬(여기서는 `lit-typographic-motion`)은 첫 A/B 이후 다시 만들어졌고, 아직 A/B 결과가 없습니다.
88
+ 기본값은 꺼짐이고, 퍼센트는 직접 고릅니다. `/lit-handoff auto on 60`(1에서 99 사이의 정수)을 실행하면, 모델 호출 하나가 컨텍스트 창의 60%를 넘은 뒤 첫 메시지에서 LitHermes가 모델에게 핸드오프를 요청하고 `/compact`를 실행하라고 알려 줍니다. Hermes에서는 플러그인이 압축을 시작할 수 없으므로, 사용자가 직접 실행하거나 Hermes가 자체 기준으로 압축합니다. 압축 뒤에는 핸드오프가 짧은 요약으로 돌아옵니다. `/lit-handoff auto off`와 `/lit-handoff auto status`는 이름 그대로 동작하고, 환경에서는 `LITHERMES_AUTO_HANDOFF=1`과 `LITHERMES_AUTO_HANDOFF_PERCENT`로 설정합니다. 어느 단계가 자동이고 Hermes 자체 압축과 겹치지 않는 퍼센트를 어떻게 고르는지는 [GitHub README](https://github.com/wjgoarxiv/lithermes/blob/main/README_Ko-KR.md#자동-핸드오프)에 있습니다.
105
89
 
106
90
  ## 선택 기능: Jev 스킬 힌트
107
91
 
@@ -129,7 +113,7 @@ npx --package @litfamily/lithermes -- lithermes uninstall --yes
129
113
 
130
114
  ## 더 알아보기
131
115
 
132
- - [GitHub의 전체 README](https://github.com/wjgoarxiv/lithermes/blob/main/README_Ko-KR.md): 스킬 갤러리, 스크린샷이 있는 A/B 결과, 작동 방식
116
+ - [GitHub의 전체 README](https://github.com/wjgoarxiv/lithermes/blob/main/README_Ko-KR.md): 스킬 갤러리와 작동 방식
133
117
  - [운영 안내](https://github.com/wjgoarxiv/lithermes/blob/main/docs/guide.ko.md): 명령, 모델, 스킨, 문제 해결
134
118
  - [변경 기록](https://github.com/wjgoarxiv/lithermes/blob/main/CHANGELOG.md) · [기여](https://github.com/wjgoarxiv/lithermes/blob/main/CONTRIBUTING.md) · [보안](https://github.com/wjgoarxiv/lithermes/blob/main/SECURITY.md) · [지원](https://github.com/wjgoarxiv/lithermes/blob/main/SUPPORT.md)
135
119
 
@@ -135,6 +135,35 @@ CLI/plugin name, not the npm package name.
135
135
  timestamp to Hermes home `lithermes/jev-last-<session hash>.json` (mode 0600,
136
136
  atomic), one file per session, removed when the session ends. Neither file is
137
137
  written through a symlink.
138
+ - Optional automatic handoff (`auto_handoff.py`), off by default. The user
139
+ switches it on with `/lit-handoff auto on <percent>` (plain text reply, no
140
+ model call; `auto off` and `auto status` likewise) or with
141
+ `LITHERMES_AUTO_HANDOFF=1` plus `LITHERMES_AUTO_HANDOFF_PERCENT`; the
142
+ environment wins over the saved value, any flag value other than `1` keeps it
143
+ off, and a percent that is not a whole number from 1 to 99 leaves it off with a
144
+ doctor warning. There is no built-in percent: `on` without a number reuses the
145
+ last saved one and asks when none exists. The switch is saved in Hermes home
146
+ `lithermes/auto-handoff.json` (mode 0600, atomic, never written through a
147
+ symlink). `post_api_request` reads the prompt size of each model call
148
+ (`usage.prompt_tokens`, else input plus cache read plus cache write) over the
149
+ model's context window (`model.context_length` from the Hermes config, else
150
+ the host's own lookup, bounded to 3 seconds) and keeps the latest reading per
151
+ session in memory. Crossing the percent marks one pending directive;
152
+ `pre_llm_call` delivers it on the next turn, merged through the post-edit
153
+ composition so the byte budget keeps it whole. The directive names the bundled
154
+ lit-handoff source, asks for an `auto-handoff-id:` line in the file and for
155
+ the one plain line `Handoff saved. Run /compact now.` (`/compress` on Hermes
156
+ 0.17, which has no `/compact`). A plugin cannot start compaction here. After
157
+ the user compacts, or Hermes compacts on its own, the next `pre_llm_call`
158
+ sees a new `_compressed_summary` message, and loads a digest (Current State
159
+ and Next Steps, at most 1,400 bytes, redacted and escaped) of `HANDOFF.md` or
160
+ `.handoff/HANDOFF.md`, but only when the file carries this session's id, was
161
+ written after the directive and is a regular file. Anything else gets a
162
+ one-line refusal. It fires once per crossing, never for delegate children,
163
+ and forgets a session when it ends. Status and doctor print `Automatic
164
+ handoff: ...` and warn when the percent is at or above the estimate of
165
+ Hermes' own compaction point (the `compression` settings, the small-window
166
+ floor and the token cap when the running host has them).
138
167
  - The `post_tool_call` hook is an observer — Hermes discards its return value — so
139
168
  it records the paths a completed `write_file` / `patch` call mutated and
140
169
  `pre_llm_call` renders them on the next turn. A source-code edit names
@@ -225,10 +254,12 @@ CLI/plugin name, not the npm package name.
225
254
  - New installs default to the lead route `gpt-6-astra` / `xhigh` for planning,
226
255
  review, and other lead work, and to `gpt-6-luna` / `max` for helpers and
227
256
  ordinary workers on the global child route. Model diagnostics report these
228
- routes without exposing credential fields. The coding-lead alternative is `gpt-6-sol` /
229
- `xhigh`. Astra and Sol each support `low`, `medium`, `high`, `xhigh`, `max`,
230
- and `ultra`; Sol defaults to `xhigh` when selected as lead. Luna supports
231
- `low`, `medium`, `high`, `xhigh`, and `max`, with no `ultra`. Existing GPT-5.6
257
+ routes without exposing credential fields. The coding-lead alternative is `gpt-6.1-sol` /
258
+ `xhigh`. Astra and `gpt-6.1-sol` each support `low`, `medium`, `high`, `xhigh`,
259
+ `max`, and `ultra`; Sol defaults to `xhigh` when selected as lead. The previous
260
+ generation `gpt-6-sol` stays selectable with the same efforts, so existing
261
+ configs keep working. Luna supports `low`, `medium`, `high`, `xhigh`, and
262
+ `max`, with no `ultra`. Existing GPT-5.6
232
263
  choices remain selectable within their listed bounds: `gpt-5.6-sol` at
233
264
  `high` or `xhigh`, `gpt-5.6-terra` at `high`, `xhigh`, or `max`, and `gpt-5.6-luna`
234
265
  at `high` or `max`; general `gpt-5.6` offers `high`. The live model catalog
@@ -7,6 +7,7 @@ import re
7
7
  from pathlib import Path
8
8
  from typing import Any
9
9
 
10
+ from . import auto_handoff
10
11
  from . import core
11
12
  from . import bounded_work
12
13
  from . import bounded_work_tools
@@ -316,6 +317,24 @@ def _merge_knowledge(
316
317
  return result
317
318
 
318
319
 
320
+ def _auto_handoff_block(kwargs: dict[str, Any]) -> str:
321
+ """The opt-in automatic-handoff directive or reload for this turn, or an empty string.
322
+
323
+ It rides with the post-edit route so the bounded composition keeps it whole,
324
+ and a failure here never costs the turn its other context.
325
+ """
326
+ try:
327
+ return auto_handoff.pre_llm_call(
328
+ session_id=kwargs.get("session_id"),
329
+ user_message=kwargs.get("user_message"),
330
+ conversation_history=kwargs.get("conversation_history"),
331
+ platform=kwargs.get("platform"),
332
+ parent_session_id=kwargs.get("parent_session_id"),
333
+ )
334
+ except Exception: # noqa: BLE001 - advisory only
335
+ return ""
336
+
337
+
319
338
  def _pre_llm_call(**kwargs: Any) -> dict[str, str] | None:
320
339
  """Compose the Litwork directive and the active-litgoal snapshot.
321
340
 
@@ -333,6 +352,9 @@ def _pre_llm_call(**kwargs: Any) -> dict[str, str] | None:
333
352
  kwargs.get("session_id"), kwargs.get("user_message"), kwargs.get("turn_id")
334
353
  )
335
354
  post_edit = core.consume_rules_context(**kwargs)
355
+ auto_handoff_block = _auto_handoff_block(kwargs)
356
+ if auto_handoff_block:
357
+ post_edit = f"{auto_handoff_block}\n\n{post_edit}" if post_edit else auto_handoff_block
336
358
  workspace = kwargs.get("workspace")
337
359
  knowledge_context = knowledge.query(workspace, str(kwargs.get("user_message") or ""))
338
360
  base = core.pre_llm_call(**kwargs)
@@ -593,6 +615,7 @@ def _release_bounded_session(**kwargs: Any) -> None:
593
615
  session_id = raw_session_id if isinstance(raw_session_id, str) else ""
594
616
  bounded_work.release_bounded_session(session_id)
595
617
  jev_hint.release_session(session_id)
618
+ auto_handoff.release_session(session_id)
596
619
  # A finalized/reset session must not leave its rule dedup ledger behind: the
597
620
  # next session reusing the id would see every rule as "already injected".
598
621
  core.release_rules_session(session_id)
@@ -708,8 +731,8 @@ def register(ctx) -> None:
708
731
  ctx.register_command(
709
732
  "lit-handoff",
710
733
  _command_handler(ctx, handoff.command_lit_handoff),
711
- description="Create or update a verified LitHermes continuation handoff",
712
- args_hint="[focus]",
734
+ description="Create or update a verified LitHermes continuation handoff, or set the automatic handoff",
735
+ args_hint="[focus] | auto on <percent> | auto off | auto status",
713
736
  )
714
737
  ctx.register_command(
715
738
  "lit-scientific-visualization",