charness 3.5.0 → 3.6.0

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 (146) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/DEVELOPMENT.md +12 -1
  3. package/README.md +16 -1
  4. package/SETUP.md +199 -1
  5. package/dist/adapters/adapterEventRouting.d.ts +2 -2
  6. package/dist/adapters/adapterEventRouting.d.ts.map +1 -1
  7. package/dist/adapters/adapterEventRouting.js +4 -3
  8. package/dist/adapters/adapterEventRouting.js.map +1 -1
  9. package/dist/adapters/claudeJsonStreamAdapter.d.ts +74 -5
  10. package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
  11. package/dist/adapters/claudeJsonStreamAdapter.js +188 -9
  12. package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
  13. package/dist/adapters/createAdapter.d.ts +12 -0
  14. package/dist/adapters/createAdapter.d.ts.map +1 -1
  15. package/dist/adapters/createAdapter.js +38 -2
  16. package/dist/adapters/createAdapter.js.map +1 -1
  17. package/dist/adapters/openCodeAdapter.d.ts +5 -0
  18. package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
  19. package/dist/adapters/openCodeAdapter.js +7 -0
  20. package/dist/adapters/openCodeAdapter.js.map +1 -1
  21. package/dist/bot.d.ts.map +1 -1
  22. package/dist/bot.js +299 -82
  23. package/dist/bot.js.map +1 -1
  24. package/dist/connectors/jira/connector.d.ts +2 -0
  25. package/dist/connectors/jira/connector.d.ts.map +1 -1
  26. package/dist/connectors/jira/connector.js +5 -4
  27. package/dist/connectors/jira/connector.js.map +1 -1
  28. package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
  29. package/dist/connectors/telegram/commands/compaction.js +39 -8
  30. package/dist/connectors/telegram/commands/compaction.js.map +1 -1
  31. package/dist/connectors/telegram/forumTopicCreated.d.ts +20 -0
  32. package/dist/connectors/telegram/forumTopicCreated.d.ts.map +1 -0
  33. package/dist/connectors/telegram/forumTopicCreated.js +16 -0
  34. package/dist/connectors/telegram/forumTopicCreated.js.map +1 -0
  35. package/dist/i18n/de.d.ts.map +1 -1
  36. package/dist/i18n/de.js +14 -0
  37. package/dist/i18n/de.js.map +1 -1
  38. package/dist/i18n/en.d.ts.map +1 -1
  39. package/dist/i18n/en.js +14 -0
  40. package/dist/i18n/en.js.map +1 -1
  41. package/dist/i18n/es.d.ts.map +1 -1
  42. package/dist/i18n/es.js +14 -0
  43. package/dist/i18n/es.js.map +1 -1
  44. package/dist/i18n/fr.d.ts.map +1 -1
  45. package/dist/i18n/fr.js +14 -0
  46. package/dist/i18n/fr.js.map +1 -1
  47. package/dist/i18n/hi.d.ts.map +1 -1
  48. package/dist/i18n/hi.js +14 -0
  49. package/dist/i18n/hi.js.map +1 -1
  50. package/dist/i18n/ja.d.ts.map +1 -1
  51. package/dist/i18n/ja.js +14 -0
  52. package/dist/i18n/ja.js.map +1 -1
  53. package/dist/i18n/ka.d.ts.map +1 -1
  54. package/dist/i18n/ka.js +14 -0
  55. package/dist/i18n/ka.js.map +1 -1
  56. package/dist/i18n/pt.d.ts.map +1 -1
  57. package/dist/i18n/pt.js +14 -0
  58. package/dist/i18n/pt.js.map +1 -1
  59. package/dist/i18n/ru.d.ts.map +1 -1
  60. package/dist/i18n/ru.js +14 -0
  61. package/dist/i18n/ru.js.map +1 -1
  62. package/dist/i18n/uk.d.ts.map +1 -1
  63. package/dist/i18n/uk.js +14 -0
  64. package/dist/i18n/uk.js.map +1 -1
  65. package/dist/i18n/uz.d.ts.map +1 -1
  66. package/dist/i18n/uz.js +14 -0
  67. package/dist/i18n/uz.js.map +1 -1
  68. package/dist/i18n/zh.d.ts.map +1 -1
  69. package/dist/i18n/zh.js +14 -0
  70. package/dist/i18n/zh.js.map +1 -1
  71. package/dist/i18n.d.ts +2 -0
  72. package/dist/i18n.d.ts.map +1 -1
  73. package/dist/i18n.js.map +1 -1
  74. package/dist/rateLimiter.d.ts +6 -0
  75. package/dist/rateLimiter.d.ts.map +1 -1
  76. package/dist/rateLimiter.js +9 -0
  77. package/dist/rateLimiter.js.map +1 -1
  78. package/dist/requests/wakeUpEngine.d.ts +4 -0
  79. package/dist/requests/wakeUpEngine.d.ts.map +1 -1
  80. package/dist/requests/wakeUpEngine.js +3 -3
  81. package/dist/requests/wakeUpEngine.js.map +1 -1
  82. package/dist/requests/wakeUpRules.d.ts +2 -1
  83. package/dist/requests/wakeUpRules.d.ts.map +1 -1
  84. package/dist/requests/wakeUpRules.js +3 -2
  85. package/dist/requests/wakeUpRules.js.map +1 -1
  86. package/dist/scheduler/mcpSurface.js +1 -1
  87. package/dist/selfUpdate/updateMessages.d.ts +1 -1
  88. package/dist/selfUpdate/updateMessages.d.ts.map +1 -1
  89. package/dist/selfUpdate/updateMessages.js.map +1 -1
  90. package/dist/state.d.ts +36 -5
  91. package/dist/state.d.ts.map +1 -1
  92. package/dist/state.js +40 -7
  93. package/dist/state.js.map +1 -1
  94. package/dist/testTimings.d.ts +45 -0
  95. package/dist/testTimings.d.ts.map +1 -0
  96. package/dist/testTimings.js +89 -0
  97. package/dist/testTimings.js.map +1 -0
  98. package/dist/types.d.ts +43 -0
  99. package/dist/types.d.ts.map +1 -1
  100. package/dist/utils/adapterSwitchSessionIds.d.ts +5 -1
  101. package/dist/utils/adapterSwitchSessionIds.d.ts.map +1 -1
  102. package/dist/utils/adapterSwitchSessionIds.js +1 -1
  103. package/dist/utils/adapterSwitchSessionIds.js.map +1 -1
  104. package/dist/utils/adoptedToolList.d.ts +16 -21
  105. package/dist/utils/adoptedToolList.d.ts.map +1 -1
  106. package/dist/utils/adoptedToolList.js +18 -17
  107. package/dist/utils/adoptedToolList.js.map +1 -1
  108. package/dist/utils/claudeScheduledJobs.d.ts +49 -0
  109. package/dist/utils/claudeScheduledJobs.d.ts.map +1 -0
  110. package/dist/utils/claudeScheduledJobs.js +62 -0
  111. package/dist/utils/claudeScheduledJobs.js.map +1 -0
  112. package/dist/utils/claudeStreamJson.d.ts +31 -1
  113. package/dist/utils/claudeStreamJson.d.ts.map +1 -1
  114. package/dist/utils/claudeStreamJson.js +25 -8
  115. package/dist/utils/claudeStreamJson.js.map +1 -1
  116. package/dist/utils/compactOnIdle.d.ts +12 -0
  117. package/dist/utils/compactOnIdle.d.ts.map +1 -1
  118. package/dist/utils/compactOnIdle.js +15 -1
  119. package/dist/utils/compactOnIdle.js.map +1 -1
  120. package/dist/utils/doctorLine.d.ts +13 -0
  121. package/dist/utils/doctorLine.d.ts.map +1 -0
  122. package/dist/utils/doctorLine.js +18 -0
  123. package/dist/utils/doctorLine.js.map +1 -0
  124. package/dist/utils/effortPickerPlan.d.ts +1 -2
  125. package/dist/utils/effortPickerPlan.d.ts.map +1 -1
  126. package/dist/utils/effortPickerPlan.js.map +1 -1
  127. package/dist/utils/jsonStreamHost.d.ts +19 -7
  128. package/dist/utils/jsonStreamHost.d.ts.map +1 -1
  129. package/dist/utils/jsonStreamHost.js +25 -11
  130. package/dist/utils/jsonStreamHost.js.map +1 -1
  131. package/dist/utils/jsonStreamPendingWork.d.ts +44 -0
  132. package/dist/utils/jsonStreamPendingWork.d.ts.map +1 -0
  133. package/dist/utils/jsonStreamPendingWork.js +48 -0
  134. package/dist/utils/jsonStreamPendingWork.js.map +1 -0
  135. package/dist/utils/lostWork.d.ts +117 -0
  136. package/dist/utils/lostWork.d.ts.map +1 -0
  137. package/dist/utils/lostWork.js +187 -0
  138. package/dist/utils/lostWork.js.map +1 -0
  139. package/dist/utils/nativeWindows.d.ts +29 -0
  140. package/dist/utils/nativeWindows.d.ts.map +1 -0
  141. package/dist/utils/nativeWindows.js +50 -0
  142. package/dist/utils/nativeWindows.js.map +1 -0
  143. package/dist/utils/updateScreenPlan.d.ts +1 -1
  144. package/dist/utils/updateScreenPlan.d.ts.map +1 -1
  145. package/dist/utils/updateScreenPlan.js.map +1 -1
  146. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.6.0 — 2026-10-24
6
+
7
+ **If the agent's background work is lost anyway, the agent is told and the topic gets one line.** When a Claude process
8
+ ends with its own work pending — it crashed, it was gone after a restart, `/model`, `/effort` or an account change
9
+ restarted it (cutting off its turn too), or a task nobody heard from for 6 h was let go — the topic gets one plain line
10
+ naming the lost work, and the agent is resumed at once with a short note to check that work and start again what is still
11
+ needed (after a forgotten task, or a second loss within 10 minutes, the note waits for your next message instead). A
12
+ usage-limit switch to another account or backend, or a `/claude_mode` switch, says so in its own reply and the agent's next prompt carries the note; a topic
13
+ that comes back to a backend it left tells that agent too. `/loop` wakeups (`ScheduleWakeup`) now count as pending work
14
+ like `CronCreate` jobs, and the agent's instructions steer anything that must happen later to the bot's own scheduler.
15
+
16
+ **The agent's background work is no longer cut off by an automatic stop.** On the default Claude backend the process
17
+ used to be stopped in the seconds between a background task's end and the agent's turn that reads its result — the
18
+ result was lost and the topic went quiet until you wrote. Now a background command, Monitor or sub-agent the agent
19
+ started, the result it is about to read and a `CronCreate` job it scheduled all keep the process (for up to 6 h after the
20
+ agent's last turn, so a forgotten task does not keep it forever). After a bot update that changed its tools, a running
21
+ agent is no longer stopped early either: it is compacted and stopped at its normal idle mark, and resumes with the new
22
+ tools.
23
+
24
+ **On native Windows the bot now says which features do not work there and points to WSL2.** Claude and `/terminal` need
25
+ tmux, a self-update cannot restart the bot in place, hot mode refuses to start and the local speech engine cannot be
26
+ installed; at a cold start the bot prints one console line, posts one short notice in General (in the chat's language) and
27
+ shows the same line in `/doctor`, with a link to the new SETUP.md section «Windows (WSL2)»: install WSL, the config and
28
+ projects inside Linux, Windows programs from WSL, and a recipe for a PC with no monitor that starts the bot at Windows boot
29
+ without anyone logged in. A `/doctor` warning that has no hint no longer ends in a dangling dash.
30
+
31
+ **An answer tapped on a question the bot re-asked after an idle compaction is no longer lost when the tap lands while
32
+ the agent is being stopped.** The idle stop that follows the re-asked question could finish while the tap was being
33
+ answered; the chosen option was then kept for a session start that never came, and the agent never got it. The answer
34
+ now wakes the conversation as any message does.
35
+
5
36
  ## 3.5.0 — 2026-10-23
6
37
 
7
38
  **You can see what an account billed to API credits has spent.** On the default Claude backend each turn's cost is
package/DEVELOPMENT.md CHANGED
@@ -125,7 +125,8 @@ yarn build # tsc → dist/ (tsconfig.json; src/__tests__ is not emitted)
125
125
  yarn test # test:unit, then test:flows (node test runner + tsx); build
126
126
  # first — some tests exercise the built dist/cli.js
127
127
  yarn test:unit # every file but the flows; each file must finish in 2 min
128
- yarn test:flows # the `*E2e.test.ts` flows; each file must finish in 20 min
128
+ yarn test:flows # the `*E2e.test.ts` flows, 16 files at a time (they mostly wait
129
+ # on their fakes, not the CPU); each file must finish in 20 min
129
130
  yarn hot # hot-reload mode: tsc -w + nodemon on dist/ (also
130
131
  # `charness hot` from anywhere) — a broken edit can't
131
132
  # take the bot down; OpenCode generations stay outside the
@@ -145,6 +146,16 @@ A flow's own time budget is that same limit less a teardown reserve (`getFlowDea
145
146
  `--test-timeout`), so a flow that runs long fails first, at the wait that is late and with charness's output tail,
146
147
  not with the runner's bare timeout. Run one flow directly with `--test-timeout=<ms>`.
147
148
 
149
+ A flow does not wait out the production windows in real time: its env file sets `CHARNESS_TEST_TIMINGS`, a JSON object
150
+ of named overrides (`src/testTimings.ts`: `telegramSendIntervalMs` — the global send pacer's 2 s, `jiraPollIntervalMs` —
151
+ below the 10 s floor of `jira.json`, `requestSweepIntervalMs` and `requestFirstPostRetryDelayMs` — the wake-up engine's
152
+ minutes, `limitProbeDelayMs` — the two-minute probe of an unconfirmed usage limit, `stateSaveDebounceMs` — `state.json`'s
153
+ 500 ms save debounce, `openCodeServerUpBudgetMs` — the OpenCode server's 60 s of retries, `backgroundHoldMaxMs` — the 6 h the
154
+ agent's own pending work holds a json-stream process). It is the ONE test-only timing seam,
155
+ never a setting: unset, every window is the production one; a value may only shorten its window (each key is capped at its
156
+ production value); set, the boot prints `[test-timings] … overrides active`, and
157
+ an unknown key or a bad value stops the start naming it.
158
+
148
159
  The Docker dev loop (never `docker compose restart` — it ignores
149
160
  `depends_on`):
150
161
 
package/README.md CHANGED
@@ -80,6 +80,11 @@ The bot serves two Telegram surfaces:
80
80
 
81
81
  Full setup — Telegram, Jira, environment, updating: [SETUP.md](SETUP.md)
82
82
 
83
+ **Platforms:** Linux, macOS, and Windows via WSL2 — on Windows WSL2 is the recommended and fully supported way
84
+ ([Windows (WSL2)](SETUP.md#windows-wsl2), with a recipe for an always-on PC with no monitor). Native Windows works with
85
+ limits: OpenCode runs, but Claude and `/terminal` need tmux, a self-update cannot restart the bot in place, hot mode refuses
86
+ to start and the local speech engine cannot be installed. A native Windows bot says so at start (console, General, `/doctor`).
87
+
83
88
  ## Reference
84
89
 
85
90
  ### Commands (Telegram)
@@ -174,7 +179,17 @@ backends:
174
179
  output, and it survives bot restarts (the bot re-adopts the process and
175
180
  replays what was produced during the downtime). After ~55 min idle
176
181
  (`AGENT_IDLE_MINUTES`) the process is stopped — right after the idle
177
- compaction when `/compact_on_idle` allows one. The **default**.
182
+ compaction when `/compact_on_idle` allows one — but never while the agent's
183
+ own work is pending: a background command, Monitor or sub-agent it started, a
184
+ finished task's result it is about to read, a `CronCreate` job or a `/loop`
185
+ wakeup it scheduled.
186
+ That work keeps the process for up to 6 h after the agent's last turn, so a
187
+ task nobody hears from does not keep it forever. When that work is lost
188
+ anyway (a crash, a process gone after a restart, a `/model` / `/effort` /
189
+ account restart, a task let go after 6 h), the topic gets one plain line and
190
+ the agent is resumed with a note to check that work again — or, after a
191
+ forgotten task or a second loss within 10 minutes, your next message carries
192
+ the note. The **default**.
178
193
  - **per-turn** (`/claude_mode per-turn`) — the same host, stopped right
179
194
  after every answer. Nothing is lost: the conversation sleeps and your next
180
195
  message resumes it. Needs Claude Code 2.1.287 or newer; the switch is
package/SETUP.md CHANGED
@@ -14,7 +14,8 @@ The bot runs anywhere the agent CLIs run:
14
14
  - **Your own working machine** — the simplest start: launch `charness`
15
15
  from your projects parent folder and your laptop/desktop becomes the
16
16
  backend. The catch: agents are only reachable while the machine is on and
17
- awake.
17
+ awake. On Windows that machine runs Charness inside
18
+ WSL2 — see [Windows (WSL2)](#windows-wsl2).
18
19
  - **A remote server (cloud VPS/VDS or bare metal)** — the more convenient
19
20
  setup: organize your working environment there once (git + your repos,
20
21
  Claude Code / OpenCode, `charness`) and you get an always-on dev box you
@@ -44,6 +45,203 @@ at the old path) and says so; every old name still in use prints one deprecation
44
45
  line. What it does, its limits and the steps by hand:
45
46
  [MIGRATION_RENAME_TO_CHARNESS.md](MIGRATION_RENAME_TO_CHARNESS.md).
46
47
 
48
+ ### Windows (WSL2)
49
+
50
+ **On Windows run Charness inside WSL2** — a real Linux, where everything works. **Native Windows** (`npm install -g charness`
51
+ in PowerShell) stays allowed but is limited: Claude and `/terminal` need tmux, a self-update cannot restart the bot in place
52
+ (no `process.execve`; the bot only says that a new version is out), hot mode refuses to start and the local speech engine's
53
+ installer is POSIX-only. A native Windows bot says so itself: on the console at start, once in General per cold start, and in
54
+ `/doctor`.
55
+
56
+ #### Install WSL and Charness
57
+
58
+ 1. In an **administrator** PowerShell: `wsl --install`, then restart Windows. It needs Windows 10 2004+ or Windows 11 and
59
+ installs Ubuntu; its first launch asks for a Linux user name and password. `wsl --list --verbose` must show `VERSION 2`
60
+ and `wsl --update` brings WSL itself up to date ([Microsoft: install WSL](https://learn.microsoft.com/en-us/windows/wsl/install)).
61
+ 2. Inside Ubuntu (Start menu → Ubuntu, or `wsl` in PowerShell):
62
+
63
+ ```bash
64
+ sudo apt update && sudo apt install -y tmux git curl
65
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash # then open a new Ubuntu window
66
+ nvm install 22 # 22.15+ is what a self-update needs to restart the bot in place (check: node -v)
67
+ npm install -g charness
68
+ ```
69
+
70
+ The bot installs the agents on first use (`/claude`, `/opencode`); to have them up front: `npm install -g @anthropic-ai/claude-code opencode-ai`.
71
+
72
+ #### Config, projects, topics
73
+
74
+ - **Config** is `~/.config/charness/.env` **inside Ubuntu** (not the Windows one) — [Telegram setup](#telegram-setup). Coming from a
75
+ native Windows install: stop that bot first (a token has one long-poller), copy the file and fix every Windows path in it
76
+ (`WORK_ROOT`, `DATA_DIR`, `CLAUDE_BIN`, …):
77
+
78
+ ```bash
79
+ mkdir -p ~/.config/charness && cp /mnt/c/Users/<name>/.config/charness/.env ~/.config/charness/.env
80
+ ```
81
+ - **Projects live in the Linux filesystem** — `~/projects/<repo>`, not under `/mnt/c`. Microsoft: «For the fastest performance
82
+ speed, store your files in the WSL file system» ([Working across file systems](https://learn.microsoft.com/en-us/windows/wsl/filesystems));
83
+ `/mnt/c` is the Windows disk reached through WSL's DrvFs bridge, slower for git and builds. Windows reaches them at
84
+ `\\wsl.localhost\Ubuntu\home\<user>\projects` (type it into Explorer's address bar; `\\wsl$\Ubuntu\…` is the older form),
85
+ and VS Code opens them through its [WSL extension](https://code.visualstudio.com/docs/remote/wsl): `code .` in the project
86
+ folder in Ubuntu. Run the bot from the projects parent: `cd ~/projects && charness`.
87
+ - **Topics start over.** The WSL bot has its own `DATA_DIR`, so it knows none of the old topic bindings: run `/bind <folder>`
88
+ in each topic again (the folder must exist under the WSL `WORK_ROOT`: `git clone` the repository there, or
89
+ `cp -r /mnt/c/Users/<name>/projects/<repo> ~/projects/`). Claude conversations of the native install stay
90
+ in Windows' `%USERPROFILE%\.claude` and cannot be resumed from WSL.
91
+
92
+ #### Windows programs from WSL (interop)
93
+
94
+ Interop is on by default (`[interop] enabled=true` in `/etc/wsl.conf`). A Windows program starts from Ubuntu by name **with its
95
+ extension**, as the active Windows user ([Microsoft: run Windows tools from Linux](https://learn.microsoft.com/en-us/windows/wsl/filesystems#run-windows-tools-from-linux)),
96
+ and `wslpath` — a tool that comes with WSL (`wslpath --help` lists its options) — converts paths between the two worlds:
97
+
98
+ ```bash
99
+ powershell.exe -NoProfile -Command "Get-Date"
100
+ cmd.exe /C dir
101
+ wslpath -w ~/projects/app # WSL path → Windows path, e.g. \\wsl.localhost\Ubuntu\home\…
102
+ wslpath -u 'C:\Users\me' # Windows path → WSL path (/mnt/c/Users/me)
103
+ ```
104
+
105
+ Such a program has the rights of the WSL session, not administrator's. To run one elevated, start it through PowerShell:
106
+ `powershell.exe -Command "Start-Process <program> -Verb RunAs"` — Windows then asks for confirmation (UAC) on the desktop and
107
+ somebody has to click it. That works only when you opened WSL yourself at a logged-in desktop. **On the headless PC below it does not:**
108
+ the distro there is started by a scheduled task, nobody is logged in, there is no desktop to show the prompt on and nobody
109
+ to click it, so an elevated call from the bot fails or hangs. Do not build on elevated Windows programs there; do such a step by
110
+ hand at the PC.
111
+
112
+ #### A PC with no monitor as an always-on server
113
+
114
+ The goal: Windows boots, nobody logs in, the Linux that WSL runs (the *distro*, here Ubuntu) starts, systemd — Linux's service
115
+ manager — starts the bot, and nothing shuts the distro down. Four parts; the Windows half follows Microsoft's documentation (linked), so check a step against the page when your Windows build
116
+ behaves differently.
117
+
118
+ **1. systemd and the bot as a user service (inside Ubuntu).** The current Ubuntu from `wsl --install` has it on by default
119
+ (check with `systemctl status`); any other distro needs `/etc/wsl.conf` — `sudo nano /etc/wsl.conf`:
120
+
121
+ ```ini
122
+ [boot]
123
+ systemd=true
124
+ ```
125
+
126
+ then `wsl --shutdown` in PowerShell and open Ubuntu again. It needs WSL 0.67.6+ (`wsl --version`; `wsl --update`), and Microsoft
127
+ lists the `[boot]` section for Windows 11 and Windows Server 2022 ([systemd in WSL](https://learn.microsoft.com/en-us/windows/wsl/systemd),
128
+ [wsl.conf](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#boot-settings)). Then write `~/.config/systemd/user/charness.service`:
129
+
130
+ ```ini
131
+ [Unit]
132
+ Description=Charness
133
+
134
+ [Service]
135
+ WorkingDirectory=%h/projects
136
+ ExecStart=/bin/bash -c 'source %h/.nvm/nvm.sh && exec charness'
137
+ KillMode=process
138
+ Restart=on-failure
139
+ RestartSec=10
140
+
141
+ [Install]
142
+ WantedBy=default.target
143
+ ```
144
+
145
+ `nvm.sh` puts the nvm Node — and so `charness`, `claude` and `opencode` — on the service's `PATH`, which a service does not
146
+ inherit from your shell. `KillMode=process` is the one [Restart behaviour](README.md#restart-behaviour) asks for: systemd's
147
+ default would kill the agents' tmux and `opencode serve` with the bot, and while systemd marks `process` «not recommended»
148
+ ([systemd.kill](https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html)), leaving them running is exactly
149
+ what lets a bot restart keep its agents. Enable it and let the user manager start without a login:
150
+
151
+ ```bash
152
+ systemctl --user daemon-reload && systemctl --user enable --now charness
153
+ sudo loginctl enable-linger "$USER" # "a user manager is spawned for the user at boot and kept around after logouts"
154
+ journalctl --user -u charness -f # the bot's log
155
+ ```
156
+
157
+ ([loginctl](https://www.freedesktop.org/software/systemd/man/latest/loginctl.html).)
158
+
159
+ **2. Keep the distro running.** systemd services do **not** keep a WSL instance alive: «systemd services will NOT keep your WSL
160
+ instance alive» ([systemd in WSL](https://learn.microsoft.com/en-us/windows/wsl/systemd#how-does-enabling-systemd-affect-wsl-architecture)),
161
+ and an idle distro is shut down (by default 15 s after its last process exits). The documented switches are two idle
162
+ timeouts in `%UserProfile%\.wslconfig` of the Windows account that runs the task below (e.g. `C:\Users\<name>\.wslconfig`) — the
163
+ file does not exist by default, create it:
164
+
165
+ ```ini
166
+ # How long a distro may sit idle before it is shut down, in ms; -1 = never (default 15000)
167
+ [general]
168
+ instanceIdleTimeout=-1
169
+
170
+ # The same for the WSL 2 virtual machine (default 60000); Windows 11 only, leave it out on Windows 10
171
+ [wsl2]
172
+ vmIdleTimeout=-1
173
+ ```
174
+
175
+ Both are needed — the maintainers' answer in [microsoft/WSL#13291](https://github.com/microsoft/WSL/issues/13291) —
176
+ and `instanceIdleTimeout` exists since WSL 2.5.4 ([release notes](https://github.com/microsoft/WSL/releases/tag/2.5.4);
177
+ [wsl-config](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#general-wsl-settings)). Apply with `wsl --shutdown`.
178
+ On an older WSL, `wsl --update` first; failing that, the community workaround is a Windows process that never ends, e.g. the
179
+ task below running `--exec sleep infinity` instead of `/bin/true`, with its time limit removed
180
+ (`New-ScheduledTaskSettingsSet -ExecutionTimeLimit ([TimeSpan]::Zero)`; the default is three days).
181
+
182
+ **3. Start the distro at Windows boot, nobody logged in.** A scheduled task with the *At startup* trigger, registered with
183
+ the account's password (Task Scheduler's «Run whether user is logged on or not»), starts without anyone logged in. Register it
184
+ once from an **administrator** PowerShell, as the Windows account that installed the distro (a WSL distro is registered per
185
+ Windows account). `Get-Credential` asks for that account's **password**: if you sign in to Windows with a Microsoft account
186
+ (an e-mail address), it is that account's password — not the PIN or the fingerprint. Some setups refuse a stored password
187
+ while Settings → Accounts → Sign-in options has «only allow Windows Hello sign-in for Microsoft accounts» switched on; if
188
+ registering or running the task fails with a password error, switch it off and register again.
189
+
190
+ ```powershell
191
+ $cred = Get-Credential "$env:USERDOMAIN\$env:USERNAME"
192
+ $action = New-ScheduledTaskAction -Execute 'C:\Program Files\WSL\wsl.exe' -Argument '--distribution Ubuntu --exec /bin/true'
193
+ $trigger = New-ScheduledTaskTrigger -AtStartup
194
+ $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
195
+ Register-ScheduledTask -TaskName 'Start WSL' -Action $action -Trigger $trigger -Settings $settings `
196
+ -User $cred.UserName -Password $cred.GetNetworkCredential().Password
197
+ ```
198
+
199
+ Use `C:\Program Files\WSL\wsl.exe`, **not** the `wsl.exe` on `PATH` (`C:\Windows\System32`): a task that runs without a
200
+ logged-in user has no desktop session («Session 0»), and Microsoft says only the Program Files copy works there since WSL 2.0.0
201
+ ([microsoft/WSL#9231](https://github.com/microsoft/WSL/issues/9231), still open: the System32 copy waits for a Windows image change). The
202
+ password is stored in the task: when the Windows password changes, register the task again. A task registered with a password
203
+ launches only if the account has the «Log on as a batch job» right, which Administrators have by default
204
+ ([Task Scheduler security contexts](https://learn.microsoft.com/en-us/windows/win32/taskschd/security-contexts-for-running-tasks)).
205
+ Once the distro is up, systemd, the lingering user manager and
206
+ `charness.service` follow by themselves.
207
+
208
+ **4. Never sleep, and make switching on a real boot.** Two things, both required, from an administrator PowerShell
209
+ ([powercfg](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options)):
210
+
211
+ ```powershell
212
+ powercfg /change standby-timeout-ac 0 # never go to sleep on mains power (minutes; 0 = never)
213
+ powercfg /hibernate off # no hibernation — and with it no Fast Startup
214
+ ```
215
+
216
+ (The screen may still turn off.) Why the second line: Windows' *Fast Startup*, on by default when the PC can hibernate,
217
+ makes «Shut down» a hibernation instead of a full shutdown ([Microsoft](https://learn.microsoft.com/en-us/troubleshoot/windows-client/setup-upgrade-and-drivers/updates-not-install-with-fast-startup)),
218
+ so the next power-on is a resume, not a boot — and reports say the *At startup* task of part 3 then does not run
219
+ ([Microsoft Q&A](https://learn.microsoft.com/en-us/answers/questions/3254425/scheduled-at-startup-task-that-worked-in-windows-7)).
220
+ A «Restart» is a real boot either way. With hibernation off, switching the PC on starts the task.
221
+
222
+ **Check:** shut Windows down (not only restart), switch it on again, do **not** log in, and message the bot from your phone —
223
+ it answers. That proves the whole chain. Then log in once: `wsl --list --running` shows Ubuntu and
224
+ `systemctl --user status charness` inside it shows the bot. Reports from WSL 2.0.0 ([microsoft/WSL#9231](https://github.com/microsoft/WSL/issues/9231))
225
+ say that once the same user logged in and ran WSL commands, a distro started this way appeared as *Stopped* or actually
226
+ stopped; this is not confirmed on current WSL. If the bot stops after you log in, run the task again (Task Scheduler → *Run*), and please
227
+ [open an issue](https://github.com/olosegres/charness/issues) with your `wsl --version`.
228
+
229
+ **Known risks.**
230
+
231
+ - A Windows restart, a Windows Update reboot or `wsl --shutdown` ends the agents' processes, like a container restart:
232
+ each conversation resumes with its next message ([Restart behaviour](README.md#restart-behaviour)).
233
+ - **If a Windows program that the bot calls fails, run `wsl --update` in PowerShell first** and try again: the known
234
+ failures below were fixed in newer WSL. The details, for whoever helps you: Windows `.exe` interop from a systemd service
235
+ has failed in some WSL versions. WSL 2.0.5–2.0.13 could not run a Windows program stored in the Linux filesystem from a
236
+ process without a live interop session, a systemd service among them
237
+ ([microsoft/WSL#10812](https://github.com/microsoft/WSL/issues/10812), fixed in 2.0.14); and with `mono` installed its
238
+ `binfmt` handler can take over `.exe` files («File does not contain a valid CIL image»,
239
+ [microsoft/WSL#13000](https://github.com/microsoft/WSL/issues/13000); WSL 2.5.8 added a systemd override that protects WSL's
240
+ interop entry). Workarounds: keep Windows tools on the Windows disk and call them by their `/mnt/c/…` path, and with
241
+ `mono` installed run `sudo update-binfmts --disable cli`.
242
+ - Starting WSL from a scheduled task is the part Microsoft documents least: if the check above fails, run the task by hand
243
+ (Task Scheduler → *Run*) and read its *Last Run Result*.
244
+
47
245
  ### Environment variables
48
246
 
49
247
  These settings apply to every surface. The Telegram ones — the bot token, the group and the DM, voice — are listed
@@ -32,11 +32,11 @@ export declare const foreignKeyEventRoutes: {
32
32
  readonly questionGone: "none";
33
33
  readonly closed: "requestSide";
34
34
  readonly stopped: "requestSide";
35
- readonly suspended: "none";
35
+ readonly suspended: "requestSide";
36
36
  readonly turnEnded: "all";
37
37
  readonly contextCompacted: "all";
38
38
  readonly conversationLost: "requestSide";
39
- readonly started: "none";
39
+ readonly started: "requestSide";
40
40
  readonly error: "requestSide";
41
41
  };
42
42
  /** The events whose foreign-key route is a dedicated request-side handler. */
@@ -1 +1 @@
1
- {"version":3,"file":"adapterEventRouting.d.ts","sourceRoot":"","sources":["../../src/adapters/adapterEventRouting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD;;;;;;;;GAQG;AAEH,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,4OAkBpB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM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AAC,SAAS,gBAAgB,EAC7D,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,MAAM,IAAI,EAGjB,GAAG,aAAa,EAAE,CAAC,SAAS,oBAAoB,GAAG,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,GAClF,IAAI,CAIN"}
@@ -48,15 +48,16 @@ exports.foreignKeyEventRoutes = {
48
48
  // Drop the retry, compaction and preamble state a gone session leaves behind.
49
49
  closed: 'requestSide',
50
50
  stopped: 'requestSide',
51
- // An idle stop keeps the session, its retry and its compaction state: only Telegram frames to clean up.
52
- suspended: 'none',
51
+ // An idle stop keeps the session, its retry and its compaction state; the work a spent hold let go is noted for the agent.
52
+ suspended: 'requestSide',
53
53
  // The per-turn stop (L5) applies to an issue's conversation as to a topic's; the handler posts nothing.
54
54
  turnEnded: 'all',
55
55
  // A completed compaction resets what the conversation was told: its connector sends the whole issue next (C6).
56
56
  contextCompacted: 'all',
57
57
  // A live re-spawn began a new conversation where one was lost: a connector that tracks what it told starts over (C6); only a topic gets the notice.
58
58
  conversationLost: 'requestSide',
59
- started: 'none',
59
+ // A started or adopted process arms its idle countdown (compaction, then the stop) whatever the platform; the banner is a topic's.
60
+ started: 'requestSide',
60
61
  // Logged; there is no topic to post it to.
61
62
  error: 'requestSide',
62
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"adapterEventRouting.js","sourceRoot":"","sources":["../../src/adapters/adapterEventRouting.ts"],"names":[],"mappings":";;;AAoFA,oDAWC;AA9FD,4EAA4E;AAE5E;;;;;;;;GAQG;AAEH,0EAA0E;AAC7D,QAAA,iBAAiB,GAAG;IAC/B,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,kBAAkB;IAClB,kBAAkB;IAClB,OAAO;CACC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
6
  import { type McpHealOutcome } from '../utils/claudeMcpHeal';
7
7
  import { type JsonStreamSessionPaths, type StdoutTailState } from '../utils/jsonStreamHost';
8
8
  import { type SessionLaunchDefaultsReader } from './sessionLaunchDefaults';
9
+ import { type LostWork } from '../utils/lostWork';
10
+ import { type ScheduledJob } from '../utils/claudeScheduledJobs';
9
11
  /** The two lifecycles of the json-stream host (see {@link ClaudeJsonStreamAdapter.lifecycle}). */
10
12
  export type JsonStreamLifecycle = 'idle' | 'perTurn';
11
13
  /** Prefix of the per-turn token accounting line (L-D11); the process-level e2e
@@ -167,11 +169,27 @@ export interface StreamSession {
167
169
  unconsumedInputCount: number;
168
170
  /**
169
171
  * The CLI's live background-task list (`system/background_tasks_changed`,
170
- * re-sent whole on every change): a background Bash / Monitor / sub-agent the
171
- * process is still running between turns. Non-empty = working (L-D2) — a stop
172
- * would kill them. Persisted with the tail offset so an adopt restores it.
172
+ * re-sent whole on every change), id → the description the agent gave it: a
173
+ * background Bash / Monitor / sub-agent the process is still running between
174
+ * turns. Non-empty = working within the hold (L-D2, `utils/jsonStreamPendingWork.ts`)
175
+ * — a stop would kill them. Persisted with the tail offset so an adopt restores it.
173
176
  */
174
- backgroundTaskIds: Set<string>;
177
+ backgroundTasks: Map<string, string>;
178
+ /**
179
+ * When a background task's `task_notification` announced the turn it starts and that
180
+ * turn has not shown yet; `null` otherwise. Counts as working for a short grace: the
181
+ * gap between the task's end and its turn's first output read as idle once.
182
+ */
183
+ notificationTurnPendingSince: number | null;
184
+ /** When the agent's last turn ended (the process start before its first turn): the pending-work hold counts from it. */
185
+ lastTurnEndedAt: number;
186
+ /**
187
+ * The next `result` ends a bot-issued `/compact` turn, not one of the agent's: the compaction settles on its
188
+ * `compact_boundary`, so `compactionInProgress` is already off when that result arrives.
189
+ */
190
+ isCompactionResultPending: boolean;
191
+ /** The session-only `CronCreate` jobs the process holds, oldest first (`utils/claudeScheduledJobs.ts`). */
192
+ scheduledJobs: Map<string, ScheduledJob>;
175
193
  /** The CLI version reported on `system/init` (`claude_code_version`); the
176
194
  * auto-stop gate (L-D10) reads it. `null` until the first init / on an adopt. */
177
195
  claudeCodeVersion: string | null;
@@ -238,8 +256,11 @@ export declare class ClaudeJsonStreamAdapter extends EventEmitter implements Age
238
256
  * conversation at a time whichever lifecycle runs it.
239
257
  */
240
258
  readonly lifecycle: JsonStreamLifecycle;
259
+ /** How long the agent's own pending work holds the process after its last turn (`utils/jsonStreamPendingWork.ts`). */
260
+ private pendingWorkHoldMs;
241
261
  constructor(options?: {
242
262
  lifecycle: JsonStreamLifecycle;
263
+ backgroundHoldMs?: number;
243
264
  });
244
265
  /** Emits incremental text deltas (like the tmux scrape) → the transports
245
266
  * synthesise continuation (`getDmDraftContinuation` / group delta path). */
@@ -255,6 +276,10 @@ export declare class ClaudeJsonStreamAdapter extends EventEmitter implements Age
255
276
  private claudeConfigDirReader;
256
277
  /** The stops in flight — the module-level map shared by both lifecycles' instances (see {@link stopsInFlightByKey}). */
257
278
  private readonly stopsInFlight;
279
+ /** The agent's own pending work each ended process took with it, until the bot takes it ({@link takeLostWork}). */
280
+ private readonly lostWorkByKey;
281
+ /** A test instance's shorter pending-work hold (`createAdapter.registerPendingWorkHoldMs`). */
282
+ setPendingWorkHoldMs(holdMs: number): void;
258
283
  setDisplayPrefsReader(reader: DisplayPrefsReader): void;
259
284
  setSeenWatermarkWriter(writer: SeenWatermarkWriter): void;
260
285
  setJsonStreamTailWriter(writer: JsonStreamTailWriter): void;
@@ -404,8 +429,46 @@ export declare class ClaudeJsonStreamAdapter extends EventEmitter implements Age
404
429
  * flight. An unknown / inactive session is not working.
405
430
  */
406
431
  checkIsWorking(key: SessionKey): boolean;
407
- /** Background tasks, input not yet taken in, a compaction in flight — "working" minus the turn (L-D2). */
432
+ /**
433
+ * The agent's own pending work (background tasks and scheduled jobs within the hold, a finished task's turn on its
434
+ * way), input not yet taken in, a compaction in flight — "working" minus the turn (L-D2).
435
+ */
408
436
  checkHasBackgroundWork(key: SessionKey): boolean;
437
+ /**
438
+ * @description The hold left for the session's background tasks / scheduled jobs (`utils/jsonStreamPendingWork.ts`):
439
+ * `null` without a live session or with nothing pending, `0` once spent. The idle fire re-checks no later than this.
440
+ */
441
+ getPendingWorkHoldRemainingMs(key: SessionKey): number | null;
442
+ /**
443
+ * @description Read what the process wrote since the last tail poll, so the working judgement is current: a stop
444
+ * decides on it, and the poll may lag the process by its backoff.
445
+ */
446
+ refreshWorkingState(key: SessionKey): void;
447
+ /**
448
+ * @description The agent's own pending work the conversation's LAST process took with it when it ended — a crash, a
449
+ * re-spawn, the idle stop after the pending-work hold, a process found gone at the adopt — handed over once (`null`
450
+ * when nothing was lost or it was already taken). The bot tells the agent (`utils/lostWork.ts`).
451
+ */
452
+ takeLostWork(key: SessionKey): LostWork | null;
453
+ /**
454
+ * @description What the LIVE process holds now that would die with it — read by the bot before it stops the
455
+ * process itself for a backend switch (an explicit stop records nothing); `null` when nothing is pending.
456
+ */
457
+ getPendingWork(key: SessionKey): LostWork | null;
458
+ /**
459
+ * Keep what a process that ended by itself (or at the idle stop) held. A turn a crash cut off is not counted: the
460
+ * request core re-posts and wakes an open request (R21); the idle stop never runs mid-turn.
461
+ */
462
+ private recordLostWork;
463
+ /** The pending work of a process: its background tasks, its scheduled jobs, a finished task's turn not yet run, and — when the bot itself cuts it off — the turn under way. */
464
+ private describePendingWork;
465
+ /**
466
+ * The ended process's pending work is handled here (kept for the bot, or released): the record must not carry it,
467
+ * or the next boot would read the conversation's process as one that died with work pending.
468
+ */
469
+ private clearPendingWorkOfEndedProcess;
470
+ private storeLostWork;
471
+ private getPendingWorkInput;
409
472
  /** The CLI version the live process reported on `system/init`, `null` until then (L-D10 gate input). */
410
473
  getClaudeCodeVersion(key: SessionKey): string | null;
411
474
  /** L-D10: only a CLI that reports the background-task list may be stopped automatically. */
@@ -493,6 +556,10 @@ export declare class ClaudeJsonStreamAdapter extends EventEmitter implements Age
493
556
  * WHOLE on every change, so no diffing). The tail-offset persist that follows
494
557
  * this frame's drain carries the new list to `state.json`. */
495
558
  private handleBackgroundTasks;
559
+ /** A background task ended: its own turn is coming — the list empties right after this frame, the turn shows later. */
560
+ private handleTaskNotification;
561
+ /** A turn began (its `init`, the CLI's running state, a scheduled job firing): busy from here; an announced turn has shown. */
562
+ private markTurnStarted;
496
563
  private handleCompactStatus;
497
564
  private handleCompactBoundary;
498
565
  /**
@@ -507,6 +574,8 @@ export declare class ClaudeJsonStreamAdapter extends EventEmitter implements Age
507
574
  private finishReasoning;
508
575
  private handleToolUse;
509
576
  private handleToolResult;
577
+ /** A `CronCreate` / `CronDelete` / `ScheduleWakeup` result changes the session-only jobs the process holds. */
578
+ private trackScheduledJob;
510
579
  private markSubagentActive;
511
580
  private handleSubagentText;
512
581
  private clearSubagent;
@@ -1 +1 @@
1
- {"version":3,"file":"claudeJsonStreamAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/claudeJsonStreamAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,aAAa,EAEb,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD,OAAO,KAAK,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAmBpI,OAAO,EACL,sBAAsB,EAOvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAML,KAAK,cAAc,EAGpB,MAAM,wBAAwB,CAAC;AAchC,OAAO,EA2BL,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;A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