charness 4.1.1 → 4.2.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.
- package/CHANGELOG.md +29 -0
- package/DEVELOPMENT.md +10 -4
- package/{COMMERCIAL-LICENSE.md → LICENSE-COMMERCIAL.md} +1 -1
- package/MIGRATION_3_TO_4.md +1 -1
- package/README.md +4 -1
- package/SETUP.md +3 -1
- package/agent-plugin/skills/charness-delegate-claude/SKILL.md +1 -0
- package/agent-plugin/skills/charness-orchestration/SKILL.md +1 -0
- package/dist/adapters/adapterNames.d.ts +2 -0
- package/dist/adapters/adapterNames.d.ts.map +1 -1
- package/dist/adapters/adapterNames.js +3 -1
- package/dist/adapters/adapterNames.js.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +14 -0
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +36 -6
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/adapters/openCodeAdapter.d.ts +31 -2
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +84 -8
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/adapters/terminalAdapter.d.ts.map +1 -1
- package/dist/adapters/terminalAdapter.js +2 -1
- package/dist/adapters/terminalAdapter.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +605 -87
- package/dist/bot.js.map +1 -1
- package/dist/cli/claudeProfiles.d.ts +3 -0
- package/dist/cli/claudeProfiles.d.ts.map +1 -1
- package/dist/cli/claudeProfiles.js +8 -0
- package/dist/cli/claudeProfiles.js.map +1 -1
- package/dist/connectors/telegram/commands/botCore.d.ts +5 -2
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts +5 -0
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.js +15 -39
- package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
- package/dist/connectors/telegram/commands/compaction.d.ts +6 -0
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/compaction.js +8 -1
- package/dist/connectors/telegram/commands/compaction.js.map +1 -1
- package/dist/connectors/telegram/commands/questionSetAside.d.ts +111 -0
- package/dist/connectors/telegram/commands/questionSetAside.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/questionSetAside.js +637 -0
- package/dist/connectors/telegram/commands/questionSetAside.js.map +1 -0
- package/dist/connectors/telegram/commands/questionWait.d.ts +21 -0
- package/dist/connectors/telegram/commands/questionWait.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/questionWait.js +109 -0
- package/dist/connectors/telegram/commands/questionWait.js.map +1 -0
- package/dist/connectors/telegram/commands/topicAccess.js +1 -1
- package/dist/connectors/telegram/commands/topicAccess.js.map +1 -1
- package/dist/connectors/telegram/commands/topicCommand.d.ts +0 -2
- package/dist/connectors/telegram/commands/topicCommand.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/topicCommand.js +4 -5
- package/dist/connectors/telegram/commands/topicCommand.js.map +1 -1
- package/dist/connectors/telegram/commands/topicStatus.d.ts +24 -0
- package/dist/connectors/telegram/commands/topicStatus.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/topicStatus.js +148 -0
- package/dist/connectors/telegram/commands/topicStatus.js.map +1 -0
- package/dist/connectors/telegram/firstUpdateBatchNote.d.ts +30 -0
- package/dist/connectors/telegram/firstUpdateBatchNote.d.ts.map +1 -0
- package/dist/connectors/telegram/firstUpdateBatchNote.js +39 -0
- package/dist/connectors/telegram/firstUpdateBatchNote.js.map +1 -0
- package/dist/connectors/telegram/inbound.d.ts +12 -0
- package/dist/connectors/telegram/inbound.d.ts.map +1 -1
- package/dist/connectors/telegram/inbound.js +31 -3
- package/dist/connectors/telegram/inbound.js.map +1 -1
- package/dist/connectors/telegram/topicIndicator.d.ts +86 -0
- package/dist/connectors/telegram/topicIndicator.d.ts.map +1 -0
- package/dist/connectors/telegram/topicIndicator.js +490 -0
- package/dist/connectors/telegram/topicIndicator.js.map +1 -0
- package/dist/connectors/telegram/waitingTopicRenames.d.ts +39 -0
- package/dist/connectors/telegram/waitingTopicRenames.d.ts.map +1 -0
- package/dist/connectors/telegram/waitingTopicRenames.js +48 -0
- package/dist/connectors/telegram/waitingTopicRenames.js.map +1 -0
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +47 -0
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +47 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +47 -0
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +47 -0
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +47 -0
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +47 -0
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +47 -0
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +47 -0
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +47 -0
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +47 -0
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +47 -0
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +47 -0
- package/dist/i18n/zh.js.map +1 -1
- package/dist/instanceSettings.d.ts +19 -1
- package/dist/instanceSettings.d.ts.map +1 -1
- package/dist/instanceSettings.js +35 -2
- package/dist/instanceSettings.js.map +1 -1
- package/dist/openCodeOpenQuestion.d.ts +12 -4
- package/dist/openCodeOpenQuestion.d.ts.map +1 -1
- package/dist/openCodeOpenQuestion.js +16 -7
- package/dist/openCodeOpenQuestion.js.map +1 -1
- package/dist/openCodeQuestionFlow.d.ts +10 -2
- package/dist/openCodeQuestionFlow.d.ts.map +1 -1
- package/dist/openCodeQuestionFlow.js +27 -5
- package/dist/openCodeQuestionFlow.js.map +1 -1
- package/dist/postToSession.d.ts +9 -0
- package/dist/postToSession.d.ts.map +1 -1
- package/dist/postToSession.js +15 -2
- package/dist/postToSession.js.map +1 -1
- package/dist/state.d.ts +98 -6
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +149 -7
- package/dist/state.js.map +1 -1
- package/dist/testTimings.d.ts +10 -2
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +20 -1
- package/dist/testTimings.js.map +1 -1
- package/dist/todos/registry.d.ts +2 -0
- package/dist/todos/registry.d.ts.map +1 -1
- package/dist/todos/registry.js +3 -1
- package/dist/todos/registry.js.map +1 -1
- package/dist/types.d.ts +88 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/claudeCompactHook.d.ts +3 -1
- package/dist/utils/claudeCompactHook.d.ts.map +1 -1
- package/dist/utils/claudeCompactHook.js +3 -1
- package/dist/utils/claudeCompactHook.js.map +1 -1
- package/dist/utils/claudeLimitSwitch.d.ts +1 -1
- package/dist/utils/claudeLimitSwitch.d.ts.map +1 -1
- package/dist/utils/claudeLimitSwitch.js +1 -1
- package/dist/utils/claudeLimitSwitch.js.map +1 -1
- package/dist/utils/claudeProfileSync.d.ts +88 -0
- package/dist/utils/claudeProfileSync.d.ts.map +1 -0
- package/dist/utils/claudeProfileSync.js +198 -0
- package/dist/utils/claudeProfileSync.js.map +1 -0
- package/dist/utils/claudeProfiles.d.ts +101 -6
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +288 -23
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeUsageRefresher.d.ts +8 -1
- package/dist/utils/claudeUsageRefresher.d.ts.map +1 -1
- package/dist/utils/claudeUsageRefresher.js +11 -1
- package/dist/utils/claudeUsageRefresher.js.map +1 -1
- package/dist/utils/cutButtonLabel.d.ts +7 -0
- package/dist/utils/cutButtonLabel.d.ts.map +1 -0
- package/dist/utils/cutButtonLabel.js +17 -0
- package/dist/utils/cutButtonLabel.js.map +1 -0
- package/dist/utils/limitSwitchPlan.d.ts +44 -0
- package/dist/utils/limitSwitchPlan.d.ts.map +1 -0
- package/dist/utils/limitSwitchPlan.js +54 -0
- package/dist/utils/limitSwitchPlan.js.map +1 -0
- package/dist/utils/questionWaitChoices.d.ts +20 -0
- package/dist/utils/questionWaitChoices.d.ts.map +1 -0
- package/dist/utils/questionWaitChoices.js +31 -0
- package/dist/utils/questionWaitChoices.js.map +1 -0
- package/dist/utils/questionWaitPlan.d.ts +166 -0
- package/dist/utils/questionWaitPlan.d.ts.map +1 -0
- package/dist/utils/questionWaitPlan.js +237 -0
- package/dist/utils/questionWaitPlan.js.map +1 -0
- package/dist/utils/replyQuote.d.ts +10 -0
- package/dist/utils/replyQuote.d.ts.map +1 -1
- package/dist/utils/replyQuote.js +18 -7
- package/dist/utils/replyQuote.js.map +1 -1
- package/dist/utils/talkerAccess.d.ts +2 -2
- package/dist/utils/talkerAccess.d.ts.map +1 -1
- package/dist/utils/talkerAccess.js +5 -4
- package/dist/utils/talkerAccess.js.map +1 -1
- package/dist/utils/telegramError.d.ts +6 -0
- package/dist/utils/telegramError.d.ts.map +1 -1
- package/dist/utils/telegramError.js +12 -0
- package/dist/utils/telegramError.js.map +1 -1
- package/dist/utils/topicAccessScreenPlan.d.ts +1 -1
- package/dist/utils/topicAccessScreenPlan.d.ts.map +1 -1
- package/dist/utils/topicAccessScreenPlan.js +3 -7
- package/dist/utils/topicAccessScreenPlan.js.map +1 -1
- package/dist/utils/topicIndicatorPlan.d.ts +143 -0
- package/dist/utils/topicIndicatorPlan.d.ts.map +1 -0
- package/dist/utils/topicIndicatorPlan.js +202 -0
- package/dist/utils/topicIndicatorPlan.js.map +1 -0
- package/dist/utils/topicIndicatorSources.d.ts +40 -0
- package/dist/utils/topicIndicatorSources.d.ts.map +1 -0
- package/dist/utils/topicIndicatorSources.js +31 -0
- package/dist/utils/topicIndicatorSources.js.map +1 -0
- package/dist/utils/topicStatusPlan.d.ts +90 -0
- package/dist/utils/topicStatusPlan.d.ts.map +1 -0
- package/dist/utils/topicStatusPlan.js +160 -0
- package/dist/utils/topicStatusPlan.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 4.2.0 — 2026-11-20
|
|
6
|
+
|
|
7
|
+
**Pull requests to Charness are welcome: by opening one you agree to the new Contributor License Agreement, `CLA.md` — no form to sign.**
|
|
8
|
+
Before, outside pull requests were not accepted. Now `CONTRIBUTING.md`, the pull-request template, the README and the licensing FAQ say that a pull request (or a patch) is accepted under `CLA.md`: you keep the copyright in your contribution, and the licensor may ship it under the Charness License and the paid commercial license. If your work belongs to an employer, please write to charnesshub@gmail.com first; the licensor may ask for a company agreement.
|
|
9
|
+
|
|
10
|
+
**An agent running on a Claude account can no longer plant rules, skills, subagents or hooks in that account's profile folder for every later session on it to follow: the bot now puts the folder back in line right before each launch under it and moves anything planted aside.**
|
|
11
|
+
A profile folder (`DATA_DIR/claude-profiles/<name>/`, handed to Claude Code as `CLAUDE_CONFIG_DIR`) is writable by the user the bot and its agents run as, and Claude Code loads a good deal of it as the user's own configuration — so an agent could replace the `CLAUDE.md` or `settings.json` link with a file of its own, or add `agents/`, `commands/`, `rules/`, `output-styles/`, `workflows/` or `dev-mods/` (mods are loaded again when their session is resumed), and each later session on that account would follow it. Now the entries Claude Code loads as user-level configuration must be links into `~/.claude`: `settings.json`, `skills`, `plugins` and `projects` always, `CLAUDE.md`, `rules`, `agents`, `commands`, `output-styles`, `workflows` and `dev-mods` wherever `~/.claude` has them (so the profile mirrors the default account). Anything else standing there — a real file or directory, a link elsewhere, an entry `~/.claude` has no counterpart of — is moved aside, never deleted, as `<entry>.moved-<UTC time>`, one log line each, and the right link is restored; a real `settings.json` or `CLAUDE.md` an account kept of its own (which the layout used to leave alone) is thus replaced by the shared one, the old file kept beside it. The check runs before every launch under a profile — a topic's session at its start, resume or account switch, the `claude auth` status and sign-in calls, and the account a worker is pointed at (the `claude_profiles` tool and `charness claude-profiles`) — costs a few `stat`s and writes nothing when the folder is right. The account's own state is never touched (login, `.claude.json`, backups, history, todos, caches, `agent-memory/`, what is behind the `projects` link). `.claude.json` also holds the account's MCP servers and is not edited: when it holds MCP servers (or settings-style keys such as `hooks`) the log names them once, so they can be checked. A folder another user owns — an operator locked it — no longer gets a failing `chmod`, and one the bot's user cannot write is not written to: nothing is said when its layout is right, one warning per profile per process when it is not, and the launch goes ahead (a locked folder the bot's user can still write, through its group or an ACL, is repaired like any other). The repair is not a sandbox: the links point into the shared `~/.claude`, which an agent can write on the default account too, and it acts at launch, not inside a running session; for a hard guarantee lock the folder (owned by another user, writable by the account's user only where Claude Code keeps its own state). See `docs/commands.md`, «Several accounts».
|
|
12
|
+
|
|
13
|
+
**An instance that serves only Jira (`CONNECTORS=jira`) now uses every Claude account signed in on its host — and a Jira issue whose agent hits a usage limit moves to the next account by itself, the conversation resumed there.**
|
|
14
|
+
Before, such an instance knew only the account `default` (`~/.claude`): a second one, made the way the bot makes it (a folder under `DATA_DIR/claude-profiles/`) and signed in with `CLAUDE_CONFIG_DIR=<folder> claude auth login`, was ignored — accounts were recorded only by Telegram's `/accounts` — and an issue at its usage limit waited for the reset even with another account free, because the automatic switch ran only for Telegram topics. Now every folder with a valid profile name and no record is adopted at the start and at each usage poll (every 10 minutes): the bot gives it the links back into `~/.claude` it lacks (the transcripts above all, so a conversation can resume under it), records it, asks the CLI who is signed in, and offers it like any account (a folder that is not signed in is listed as signed out and never picked; a profile you removed is not brought back; `default` signed out through `/accounts` stays out). A poll spawns no `claude auth status` for an account whose status is fresh — one hour for a signed-in account, five minutes for a signed-out one, so that a sign-in by hand shows up — and `/accounts` still re-reads everything when it opens. A conversation of any connector at its usage limit now takes the automatic move between Claude accounts by the same rules as a topic — the `/limits_autoswitch` list's Claude entries when it has any, else the soonest weekly reset — resumed under the new account's directory, and the requester hears nothing (the log has the line); an OpenCode entry of the list is a topic's alone. With switching OFF, with no account free or on OpenCode such a conversation waits for the reset as before, and the «Switch to …» offer, the notices and the wait aimed at the account that resets first stay a topic's. In `/accounts`, removing a profile now deletes its folder before its record, so the scan cannot find a record-less folder in between.
|
|
15
|
+
|
|
16
|
+
**A tap on a question's option right after the wait ended no longer answers «No pending question» — it answers the question.**
|
|
17
|
+
Before, when the question wait ended (the agent was told to go on without your answer) and you tapped an option of that question while its message still showed the old buttons — the swap to the set-aside look is paced by the send gate and takes a moment, and a refused edit leaves the old buttons for good — the tap was refused, although the question was still open and answerable. Now the tap answers that question the way a tap on its set-aside buttons does: the toast shows your choice, the message closes with «✅ Answer: …», and the agent gets the late answer. A button of an old question still never answers the question the agent asks next.
|
|
18
|
+
|
|
19
|
+
**The group's topic list now shows what each topic's agent is doing: a mark at the end of the name — ❓ a question waits for you, ❗️ the agent is stuck, ⏳ it works, ✅ it finished, 💤 it sleeps — so you see which topics need you without opening them.**
|
|
20
|
+
Before, the only way to tell was to open every topic (the pinned status inside a topic is invisible from the list). Now the bot writes the mark after your own words (`Deploy ⏳`) — the name only, the icon stays yours — and deletes the «renamed the topic» line each change leaves, so the topic shows no trace. A name has to hold for 20 seconds before it is written and two renames are a minute apart (❓ and your own switches show at once), so the list never flickers; a sleeping topic that wakes for a prompt goes straight to ⏳, and a topic on the per-turn backend keeps its ✅ after a turn until the next one (💤 is only the idle stop). `/topic_status` switches the marks and two counts — `⚙️N` agents at work and `📋N` tasks queued, off by default — per topic or for all topics, and gives your name back at once when a mark is turned off or the topic leaves its folder. The bot writes only to a topic whose own name it knows: it keeps the name a topic was created with as a guess and asks «Is it «Deploy»?» — one tap — and reads your own renames without its marks (a name of yours that ends in one of these marks loses that ending; the picker says so once), and a rename you make while the bot is stopped is learned when it starts again — after a stop of more than a minute too, where the waiting updates are dropped but the renames among them are read first — instead of being overwritten with the old name. It needs the «Manage topics» right (the picker says when it is missing) and the «Delete messages» right to leave no trace.
|
|
21
|
+
|
|
22
|
+
**A question the agent asked and you have not answered no longer keeps it standing still: after a wait you choose — 30 minutes by default — the bot tells the agent to go on without it, the question stays open in the topic, and your answer, however late, still reaches the agent.**
|
|
23
|
+
Before, an agent that asked a question waited for your answer for as long as it took — possibly a whole day, though it had other work: a prompt the bot wrote to it (a heartbeat, a schedule) queued unread behind the question, and the idle mark could not even compact or stop it. Now, when the wait ends, the agent is told in the result of its own question that nobody answered yet, that the question stays open for you and not to ask it again, and to go on with whatever does not depend on it (on Claude Code the question's tool call is denied with that text, on OpenCode the question is replied to with it); nothing is interrupted. In the topic the question keeps its message, buttons and pin and gains one silent line, «⏸ The agent went on without your answer — you can still answer» (on OpenCode, when the server does not take that message the bot tries again, and after the last try says so in the topic and turns the line into «⚠️ The server did not confirm that the agent was told to go on without your answer — if it seems stuck, send it any message…»). A tap on its buttons, or a reply to its message — typed or a voice note, whose transcript is the answer — closes it with «✅ Answer: …», releases the pin and sends the agent one message — the question, your answer and «you went on without it, check that nothing you did meanwhile conflicts» — written to a live session, held behind a start, or waking a sleeping conversation, and ending an armed usage-limit wait first, as a typed message does (a bare number that is not a reply is still an ordinary message; a topic member's reply answers only with an option number or label — their other words are an ordinary message); a call with several questions is answered one at a time. Up to five such questions stay open (a sixth closes the oldest as «❌ Not answered»); they end when you end the conversation (`/new`, `/quit`, `/quitall`, leaving the folder, another conversation or backend you pick), and survive the idle stop, a crash, a restart and an automatic usage-limit switch, where a late answer goes to the conversation that runs then. The idle mark sets a waiting question aside instead of rejecting it, compacting, stopping the process and asking again; an agent that asks the same question again is told it is still open instead of getting a second copy in the topic. A reply is never a pick for a question it was not written to — «2» typed as a reply to a closed question, or to any other message, does not pick an option of the question that waits — but its text still cancels the waiting question like any text. Claude Code (json-stream and per-turn) and OpenCode; the deprecated tmux backend is not covered.
|
|
24
|
+
|
|
25
|
+
**A new `/question_wait` setting chooses how long the agent waits for your answer to its question — «Don't wait», 10 min, 30 min, 1 h or «Wait for my answer» — per topic, with a default in General.**
|
|
26
|
+
In General it sets the default of every topic (kept as `questionWait` in `settings.json`); in a topic it is that topic's own choice, or «As in General» to follow the default again. «Don't wait» sets a question aside the moment it is asked; «Wait for my answer» keeps the old behaviour — the agent stands still, and the idle mark rejects the question, compacts, stops the process and asks it again after the compaction. A tap re-renders the picker in place, and a wait changed while a question is open applies to it at once, counted from the moment it was asked. The screen is worded in all 12 languages.
|
|
27
|
+
|
|
28
|
+
**An option of the agent's question no longer shows twice when the agent gives it a description that only repeats its label.**
|
|
29
|
+
Before, the question message printed each option as its label and, on the next line, its description — so an agent that filled the description with the label itself produced «1. Red» followed by «Red», «2. Blue» followed by «Blue». Now such a description is left out, in the question as posted and as it stays after the answer: a description counts as a repeat when it is the label's words compared trimmed and in any case, with or without trailing punctuation (a full stop, «!», «?», «…», a comma and the like) — «Red», «RED» and «red.» all repeat the label «Red». A description that says anything more stays under its option as before. Claude Code (json-stream and per-turn) and OpenCode; the deprecated tmux backend is not covered.
|
|
30
|
+
|
|
31
|
+
**The commercial license terms are now in `LICENSE-COMMERCIAL.md` (formerly `COMMERCIAL-LICENSE.md`), so the file sorts right next to `LICENSE` in a file list.**
|
|
32
|
+
The wording is unchanged. The package ships the file under the new name, and the links to it in the README, the licensing FAQ and the 3 → 4 migration guide follow; a link to the old file name no longer opens it.
|
|
33
|
+
|
|
5
34
|
## 4.1.1 — 2026-11-17
|
|
6
35
|
|
|
7
36
|
**The pairing line of `/runners` — a secret that lets whoever holds it pair a machine to your host — now comes to you in a private message from the bot, no longer in General, where every member of the group could read it.**
|
package/DEVELOPMENT.md
CHANGED
|
@@ -138,6 +138,12 @@ yarn test # test:unit, then test:flows (node test runner + tsx); build
|
|
|
138
138
|
yarn test:unit # every file but the flows; each file must finish in 2 min
|
|
139
139
|
yarn test:flows # the `*E2e.test.ts` flows, 16 files at a time (they mostly wait
|
|
140
140
|
# on their fakes, not the CPU); each file must finish in 20 min
|
|
141
|
+
# The flows keep unix sockets (the instance's tmux server, a runner's link)
|
|
142
|
+
# under TMPDIR, and Linux allows 107 bytes of path. An instance that would
|
|
143
|
+
# exceed it refuses to start, saying by how many bytes: that holds for the
|
|
144
|
+
# runner-link flows and for the flows that name TMUX_SOCKET_NAME (the Jira
|
|
145
|
+
# ones) once TMPDIR is over about 26 characters; most flows keep tmux's
|
|
146
|
+
# short «default» socket and have room to spare
|
|
141
147
|
yarn runner-lock # after ANY dependency change: rewrite remoteRun/runner-package-lock.json (the
|
|
142
148
|
# lock the runners install from, made from yarn.lock; fetches the sha512
|
|
143
149
|
# hashes of new versions from the registry). A unit test fails until you do
|
|
@@ -186,7 +192,7 @@ below the 10 s floor of `jira.json`, `requestTurnPollMs` — the wake-up engine'
|
|
|
186
192
|
500 ms save debounce, `openCodeServerUpBudgetMs` — the OpenCode server's 60 s of retries, `backgroundHoldMaxMs` — the 6 h the
|
|
187
193
|
agent's own pending work holds a json-stream process, `adoptedTailFirstReadMs` — the 300 ms from the boot's release of an
|
|
188
194
|
adopted json-stream session to the first read of its output, `todoReminderPollMs` and `todoReminderIntervalMs` — the todo
|
|
189
|
-
reminder's 10 s poll and the interval `settings.json` sets, `creditRecheckIntervalMs` and `creditRecheckPollMs` — the 24 h between two rechecks of a used-up API credit and the 30 min poll that finds one due, `scheduleMinFireIntervalMs` — the 5 min minimum between cron fires, `checkStatusIntervalMs` — the 15 min gap between a passing check's status lines, `bindPickerClaimLimit` — how many `/bind` picker claims are kept (a count: 200), `remoteRunLeaseMs`, `remoteRunRunnerPollMs` and `remoteRunProbeDeadlineMs` — the 45 s heartbeat lease, the 10 s poll of the wait for a paired runner and the 20 s deadline of the probe of the runners in `charness remote-run`, `tscWatchCheckIntervalMs` and `tscWatchStaleGraceMs` — the
|
|
195
|
+
reminder's 10 s poll and the interval `settings.json` sets, `creditRecheckIntervalMs` and `creditRecheckPollMs` — the 24 h between two rechecks of a used-up API credit and the 30 min poll that finds one due, `scheduleMinFireIntervalMs` — the 5 min minimum between cron fires, `topicIndicatorSettleMs`, `topicIndicatorMinRenameGapMs`, `topicIndicatorSweepMs` and `topicIndicatorBootWaveDelayMs` — the 20 s a name must hold before it is written to a topic, the 60 s between two renames, the 5-minute sweep and the 5 s the boot's wave waits for the updates that waited, `checkStatusIntervalMs` — the 15 min gap between a passing check's status lines, `bindPickerClaimLimit` — how many `/bind` picker claims are kept (a count: 200), `questionSetAsideWaitMs` — the question wait (up to an hour), after which an unanswered agent question is set aside, `questionSetAsideRetryMs` — the 30 s pause before the bot tries again to set a question aside after the agent's server did not take it, `postBusyPollMs` and `postWaitForIdleMs` — the 5 s poll and the 10 min wait of a prompt the bot delivers (a scheduled one) for a session whose turn is busy, `remoteRunLeaseMs`, `remoteRunRunnerPollMs` and `remoteRunProbeDeadlineMs` — the 45 s heartbeat lease, the 10 s poll of the wait for a paired runner and the 20 s deadline of the probe of the runners in `charness remote-run`, `tscWatchCheckIntervalMs` and `tscWatchStaleGraceMs` — the
|
|
190
196
|
hot supervisor's 30 s check of its `tsc -w` and the minute a source may stay newer than its output; the supervisor reads these last two, the remote-run CLI the three before them (the bot's `/runners` probe reads `remoteRunProbeDeadlineMs` too), the bot the rest).
|
|
191
197
|
It is the ONE test-only timing seam,
|
|
192
198
|
never a setting: unset, every window is the production one; a value may only shorten its window (each key is capped at its
|
|
@@ -266,7 +272,7 @@ publish, no tag, no push, the run is red; the next day's run tries again by itse
|
|
|
266
272
|
know yet). Its version is the package's: `apply` writes it, as `npm version` does, and `verify-delta` lets it differ from
|
|
267
273
|
the tested commit in exactly those two lines. Those two lines sit between lines a dependency change never touches (`"name"`,
|
|
268
274
|
`"lockfileVersion"`, `"dependencies": {`), so a dependency change that lands on `main` during a release merges with it
|
|
269
|
-
(`
|
|
275
|
+
(`releaseCliCommit.test.ts` holds that).
|
|
270
276
|
|
|
271
277
|
- **Tests gate:** the release does not run the suite again when the exact commit already passed. It asks GitHub for the
|
|
272
278
|
`Tests` workflow's runs of that commit's SHA (the newest run of the commit decides): **passed** → go on; **no run at all**
|
|
@@ -285,7 +291,7 @@ publish, no tag, no push, the run is red; the next day's run tries again by itse
|
|
|
285
291
|
major is released only by dispatching the workflow with `bump=major`.
|
|
286
292
|
- **Nothing to release** (green, nothing tagged): no commits since the last tag, `HEAD` already tagged, or no shipped
|
|
287
293
|
path in the net diff from the tag — `src/**/*.ts` outside `src/__tests__` and `src/release`, `stt/gigaam_sidecar.py`,
|
|
288
|
-
`npm-shrinkwrap.json`, `LICENSE`, `COMMERCIAL
|
|
294
|
+
`npm-shrinkwrap.json`, `LICENSE`, `LICENSE-COMMERCIAL.md`, everything under `agent-plugin/`, and `package.json` only when
|
|
289
295
|
`dependencies`, `bin`, `engines`, `files`, `main` or `license` differ. A docs-only or tests-only day, or a change and its
|
|
290
296
|
revert, publishes nothing; README / SETUP changes reach the npm page with the next code release. A change to the license
|
|
291
297
|
texts or the `license` field does count: it is a release (`releasePlan.ts` is the source of truth for both lists).
|
|
@@ -303,7 +309,7 @@ publish, no tag, no push, the run is red; the next day's run tries again by itse
|
|
|
303
309
|
`## Unreleased` is filled with the `feat` / `fix` subjects.
|
|
304
310
|
- **Package check** before anything is published: the tarball holds `package.json`, `dist/cli.js`, `stt/gigaam_sidecar.py`,
|
|
305
311
|
`remoteRun/runner-package-lock.json`, `remoteRun/ensureNode.sh`, `npm-shrinkwrap.json`, the agent plugin's manifest and
|
|
306
|
-
orchestration skill, `CHANGELOG.md`, `README.md`, `LICENSE`, `COMMERCIAL
|
|
312
|
+
orchestration skill, `CHANGELOG.md`, `README.md`, `LICENSE`, `LICENSE-COMMERCIAL.md` (`requiredPackFiles`) and no `src/` or tests, and installed the way a user installs it — `npm install -g`
|
|
307
313
|
from a loopback registry that serves the tarball and marks its shrinkwrap, as the npm registry does (an install of the
|
|
308
314
|
tarball FILE ignores the shrinkwrap), dependencies passed on to the real registry — `charness --version` prints the new
|
|
309
315
|
version and every package sits at the version the shrinkwrap pins (`yarn tsx src/release/cli.ts check-pack`, after
|
|
@@ -32,7 +32,7 @@ These terms are between **Sergei Solo** (licensor; the details of the licensor's
|
|
|
32
32
|
|
|
33
33
|
2.4. Discounts. Only the following discounts apply, and only when the order states them. They reduce the list price in section 2.2 and the total supplier fee in section 17.3, never a $0 fee, and do not apply to a hosting/reseller agreement under section 18 unless it says so.
|
|
34
34
|
|
|
35
|
-
(a) **Mark discount, 20%.** Throughout the Term the licensee displays the "Powered by Charness" mark, in the form and with the link to https://olosegres.github.io/charness the licensor supplies, in the customer-visible interface of a product the group offers (such as its about, credits or footer area) or on the group's public website, reachable without login. For that purpose only, and only during the Term, the licensor grants a non-exclusive, non-transferable, royalty-free permission to display that mark. It is no permission to use Charness in a product, company or domain name, to suggest endorsement, partnership or certification, or to alter the mark.
|
|
35
|
+
(a) **Mark discount, 20%.** Throughout the Term the licensee displays the "Powered by Charness" mark, in the form and with the link to https://olosegres.github.io/charness the licensor supplies, in the customer-visible interface of a product the group offers (such as its about, credits or footer area) or on the group's public website, reachable without login. For that purpose only, and only during the Term, the licensor grants a non-exclusive, non-transferable, royalty-free permission to display that mark. It is no permission to use Charness in a product, company or domain name, to suggest endorsement, partnership or certification, or to alter the mark. This permission is a contractual term, and the display is made under the licensor's permission and for its benefit. The mark is in addition to, never a substitute for, the required copyright and license notices. If the display lapses and is not restored within 30 days after written notice, the mark discount for the remainder of the Term becomes payable, prorated by days, and the permission ends; with both discounts, that is the difference between the price with the prepayment discount alone and the price with both. The licensor may ask the licensee to change or remove the mark at any time; complying keeps the discount for the current Term.
|
|
36
36
|
|
|
37
37
|
(b) **Prepayment discount, 15%.** The licensee pays a 2-year or 3-year Term in full in advance. The price schedule and these terms are fixed for every prepaid Term year. Band selection stays annual: at each Term-year anniversary the latest month-end assessment applies; if it selects a higher band, the licensee pays, for each remaining prepaid Term year, the difference between the discounted prices of the new and the prepaid band. A lower band creates no refund or credit. Acquisition adjustments under section 7.5 apply to every affected prepaid Term year.
|
|
38
38
|
|
package/MIGRATION_3_TO_4.md
CHANGED
|
@@ -45,7 +45,7 @@ The fee is the **higher** of the revenue band and the people band:
|
|
|
45
45
|
pays for the group.
|
|
46
46
|
- Two optional discounts, together 32% off: 20% for showing a "Powered by Charness" mark, 15% for prepaying 2 or 3 years.
|
|
47
47
|
- Buying is by e-mail: charnesshub@gmail.com, see the [commercial page](https://olosegres.github.io/charness/commercial/)
|
|
48
|
-
and the [commercial terms](COMMERCIAL
|
|
48
|
+
and the [commercial terms](LICENSE-COMMERCIAL.md). Full refund within 30 days.
|
|
49
49
|
|
|
50
50
|
More cases, and what counts in R and H: the [licensing FAQ](docs/licensing-faq.md).
|
|
51
51
|
|
package/README.md
CHANGED
|
@@ -99,6 +99,8 @@ The same core serves every surface; each feature links to the commands that driv
|
|
|
99
99
|
| Updates itself | Checks for a new version hourly, installs it when no agent is working, restarts in place (agents keep running) and says in General what changed; npm installs and git checkouts, hot mode and Docker included | [`/update`](docs/commands.md#update), [Updating](SETUP.md#updating) |
|
|
100
100
|
| Restart-safe | Agents run as external processes (tmux, `opencode serve`) that the bot re-adopts after a restart instead of killing them; a prompt sent while a session boots is buffered and replayed | [Restart behaviour](docs/backends.md#restart-behaviour) |
|
|
101
101
|
| Shared todo lists | Every agent publishes a short stand-up list of what it is working on (in work, the queue, done), and the agents of one repository see each other's lists with every prompt, so two of them never fix the same thing unknowingly | [`/todo`](docs/commands.md#todo) |
|
|
102
|
+
| Questions that never block | The agent's question waits for you only as long as you allow (30 min by default, per topic or for all): then the agent is told to go on without it, the question stays open with its buttons and pin, and a late answer — a tap or a reply — still reaches the agent as a new message | [The agent's questions](docs/commands.md#the-agents-questions), [`/question_wait`](docs/commands.md#question_wait) |
|
|
103
|
+
| Topic status at a glance | A mark at the end of each topic's name — ❓ a question waits, ❗️ stuck, ⏳ working, ✅ finished, 💤 asleep, optionally `⚙️N` agents and `📋N` queued tasks — so the topic list shows which topics need you; switched from buttons, per topic or for all, and never touching the icon | [`/topic_status`](docs/commands.md#topic_status) |
|
|
102
104
|
| Compaction | Compact an agent's context by hand, after ~55 min idle, or by the agent's own request | [`/compact`](docs/commands.md#compact), [`/compact_on_idle`](docs/commands.md#compact_on_idle), [`/compact_summary`](docs/commands.md#compact_summary), [`/compact_self_review`](docs/commands.md#compact_self_review) |
|
|
103
105
|
| Tools and skills for agents | Every session the bot starts gets the bot's own MCP tools (schedule, todo, send files) and the manager / delegate skills | [Bot-injected agent tools](docs/backends.md#bot-injected-agent-tools), [`/bot_skills`](docs/commands.md#bot_skills) |
|
|
104
106
|
| Runners for heavy commands | Agents send a test suite, a build or an emulator run to another machine: `charness remote-run` syncs the project, runs the command there and brings back the output, the exit code and the result files you declare, and `remote-run runners` shows every machine's CPU, memory, disk, load and what it can do (Android, iOS, Docker, Playwright). Attach a machine by pasting one line from `/runners` on it — no VPN, no open port, no root on this machine; a machine you reach by plain ssh works too | [`/runners`](docs/commands.md#runners), [docs/remote-run.md](docs/remote-run.md), [SETUP.md](SETUP.md#runners-for-heavy-commands-remote-run) |
|
|
@@ -159,6 +161,7 @@ Full write-up: [Vibe-coding by voice, from my phone](https://dev.to/olosegres/vi
|
|
|
159
161
|
**Charness 4.0 and later is source-available under the [Charness License 1.0.0](LICENSE)** — not open source:
|
|
160
162
|
|
|
161
163
|
- **Free** for personal use and for any organization group with revenue plus funding up to $500,000 and up to 20 people; also for education, charities and public bodies' core work, and a 32-day evaluation.
|
|
162
|
-
- **One annual license per organization group above that** — from $500 to $60,000 by the higher of its revenue band and its people band, with unlimited users, agents and machines and no seats. Buy by e-mail: [commercial page](https://olosegres.github.io/charness/commercial/), [commercial terms](COMMERCIAL
|
|
164
|
+
- **One annual license per organization group above that** — from $500 to $60,000 by the higher of its revenue band and its people band, with unlimited users, agents and machines and no seats. Buy by e-mail: [commercial page](https://olosegres.github.io/charness/commercial/), [commercial terms](LICENSE-COMMERCIAL.md).
|
|
163
165
|
- Every release before 4.0 was published under MIT and stays MIT.
|
|
164
166
|
- Questions and examples: [licensing FAQ](docs/licensing-faq.md); moving from 3.x: [MIGRATION_3_TO_4.md](MIGRATION_3_TO_4.md).
|
|
167
|
+
- Pull requests are welcome: by opening one you agree to the [Contributor License Agreement](CLA.md) — see [CONTRIBUTING.md](CONTRIBUTING.md).
|
package/SETUP.md
CHANGED
|
@@ -641,7 +641,7 @@ be written, the tap that needed it says so and names the path. The file is optio
|
|
|
641
641
|
a hand edit applies to the next session start, no restart.
|
|
642
642
|
|
|
643
643
|
```json
|
|
644
|
-
{ "defaultEffort": "medium", "autoUpdate": "on", "whatsNew": true, "botSkills": "on" }
|
|
644
|
+
{ "defaultEffort": "medium", "autoUpdate": "on", "whatsNew": true, "botSkills": "on", "questionWait": "thirtyMinutes" }
|
|
645
645
|
```
|
|
646
646
|
|
|
647
647
|
| Field | Meaning |
|
|
@@ -650,6 +650,8 @@ a hand edit applies to the next session start, no restart.
|
|
|
650
650
|
| `autoUpdate` | What the instance does about a new charness version: `on` installs it by itself when the bot is idle, `notify` says it is out and offers a button, `off` never looks. Set it from **`/update` in General**, or by hand. Leave it out and `on` applies ([Updating](#updating)) |
|
|
651
651
|
| `whatsNew` | `true` (default): after an update General lists the CHANGELOG entries it brought; `false`: only the «Updated a → b» line. Set from `/update` in General, or by hand |
|
|
652
652
|
| `botSkills` | Whether the skills Charness ships with its agents (`charness-orchestration`, `charness-delivery-loop`, the two delegate skills) and the hint to load the orchestration skill reach them ([Commands](docs/commands.md#skills-the-bot-gives-its-agents)): `"on"` or `"off"`. The default of an instance whose **General** never chose — a Jira-only instance, which has no General, sets it here; `/bot_skills` in General overrides it for the instance once used; leave it out and `on` applies. A running agent keeps its skills until its next start |
|
|
653
|
+
| `questionWait` | How long an agent's unanswered question waits before the agent is told to go on without it ([Commands](docs/commands.md#the-agents-questions)): `"dontWait"`, `"tenMinutes"`, `"thirtyMinutes"`, `"oneHour"` or `"untilAnswered"` (never: the agent stands still until you answer). The default of every topic that has no `/question_wait` choice of its own; **`/question_wait` in General** writes it (a tap), or set it by hand. Leave it out and `thirtyMinutes` applies |
|
|
654
|
+
| `topicStatus` | The marks written at the end of every topic's name ([Commands](docs/commands.md#topic_status)): `{ "asleep": false, "queued": true }` — only the switches you changed from the defaults (the five marks `question`, `stuck`, `working`, `finished`, `asleep` on; the counts `agents`, `queued` off). Set it from **`/topic_status` in General** (a tap writes the file), or by hand; a topic's own set (`/topic_status` in the topic) is kept in `state.json` |
|
|
653
655
|
| `taskAgents` | The cap on tracker task agents ([Jira setup](#jira-setup)): `{ "maxConcurrent": 5 }` — how many conversations of a connected tracker (Jira issues) may work on a hand-over at once, for the whole bot; an issue over it waits in a queue and starts by itself. `0` = no limit, 100 the most. The default of an instance whose **General** never chose — a Jira-only instance, which has no General, sets it here; **`/task_agents` in General** overrides it for the instance once used (a picker, or any number typed after the command). Leave it out and `5` applies |
|
|
654
656
|
| `todo` | The shared todo lists ([Commands](docs/commands.md#shared-todo-lists)): `{ "isEnabled": true, "reminderMinutes": 60 }`. `isEnabled: false` turns the feature off (agents are not offered the tools); `reminderMinutes` is how long an agent may work without updating its list before it is reminded, `0` = never. Set both from **`/todo` in General → Settings**, or by hand — the way for an instance without a General topic (a Jira-only one). Leave it out and on / 60 apply |
|
|
655
657
|
| `runnerHost` | The address paired runners dial to reach this machine's ssh server: `{ "host": "203.0.113.5", "port": 22 }`. **`/runners` in General** asks for it the first time you pair a machine (proposing this machine's public address when it answers with its own ssh key) and keeps it; it can be edited by hand. Leave it out and `/runners` asks again |
|
|
@@ -39,6 +39,7 @@ Unless the user names others:
|
|
|
39
39
|
|
|
40
40
|
## Launch
|
|
41
41
|
|
|
42
|
+
0. Call `claude_profiles` first — never launch or resume a worker without it.
|
|
42
43
|
1. Make a private run directory (an absolute path: a resume starts from the checkout), generate a UUID for the
|
|
43
44
|
session, write the brief into `<run-dir>/brief.md`: the task and its context (the worker does not see this
|
|
44
45
|
conversation), the skills it must load by name, every resource another live process holds, and "report every
|
|
@@ -96,6 +96,7 @@ kill -0 <pid> 2>/dev/null || { echo "worker <pid> exited"; exit 1; }; [ -n "$(fi
|
|
|
96
96
|
- The user keeps the bot's topics muted: your plain text reaches the topic silently. Anything they must notice —
|
|
97
97
|
a blocker, a fork, "ready to push" — ask as a native question (Claude Code: `AskUserQuestion`; OpenCode: its
|
|
98
98
|
question tool); the bot pins it, and the pin notifies. In autonomous mode stop and report instead.
|
|
99
|
+
- A question never stops your work: when the bot sets it aside, go on; the answer comes later as a message.
|
|
99
100
|
- A message headed `[Request <id> · from: …]` is answered through `answer_request` (`progress`, `question`,
|
|
100
101
|
`final`); do not repeat its text as plain text afterwards.
|
|
101
102
|
- The passing-run video of a new e2e test → `send_file_to_user` (H.264 `.mp4`, sent as a video). Several
|
|
@@ -20,6 +20,8 @@ export declare const claudePerTurnAdapterName = "claude-per-turn";
|
|
|
20
20
|
* existing topics on it keep working, but {@link claudeJsonStreamAdapterName} is the recommended backend.
|
|
21
21
|
*/
|
|
22
22
|
export declare const claudeTmuxAdapterName = "claude";
|
|
23
|
+
/** The raw `$SHELL` in tmux (`/terminal`): no agent, so no agent states. */
|
|
24
|
+
export declare const terminalAdapterName = "terminal";
|
|
23
25
|
/** Both backends that run the json-stream host (one process per conversation at a time). */
|
|
24
26
|
export declare function checkIsJsonStreamBackend(name: string): boolean;
|
|
25
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapterNames.d.ts","sourceRoot":"","sources":["../../src/adapters/adapterNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wFAAwF;AACxF,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAEhE,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,4FAA4F;AAC5F,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
|
1
|
+
{"version":3,"file":"adapterNames.d.ts","sourceRoot":"","sources":["../../src/adapters/adapterNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wFAAwF;AACxF,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAEhE,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C,4FAA4F;AAC5F,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* backend.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.claudeTmuxAdapterName = exports.claudePerTurnAdapterName = exports.openCodeAdapterName = exports.claudeJsonStreamAdapterName = void 0;
|
|
9
|
+
exports.terminalAdapterName = exports.claudeTmuxAdapterName = exports.claudePerTurnAdapterName = exports.openCodeAdapterName = exports.claudeJsonStreamAdapterName = void 0;
|
|
10
10
|
exports.checkIsJsonStreamBackend = checkIsJsonStreamBackend;
|
|
11
11
|
exports.checkIsClaudeBackend = checkIsClaudeBackend;
|
|
12
12
|
/** The Claude Code backend driven over `--input-format/--output-format stream-json`. */
|
|
@@ -25,6 +25,8 @@ exports.claudePerTurnAdapterName = 'claude-per-turn';
|
|
|
25
25
|
* existing topics on it keep working, but {@link claudeJsonStreamAdapterName} is the recommended backend.
|
|
26
26
|
*/
|
|
27
27
|
exports.claudeTmuxAdapterName = 'claude';
|
|
28
|
+
/** The raw `$SHELL` in tmux (`/terminal`): no agent, so no agent states. */
|
|
29
|
+
exports.terminalAdapterName = 'terminal';
|
|
28
30
|
/** Both backends that run the json-stream host (one process per conversation at a time). */
|
|
29
31
|
function checkIsJsonStreamBackend(name) {
|
|
30
32
|
return name === exports.claudeJsonStreamAdapterName || name === exports.claudePerTurnAdapterName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapterNames.js","sourceRoot":"","sources":["../../src/adapters/adapterNames.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"adapterNames.js","sourceRoot":"","sources":["../../src/adapters/adapterNames.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA0BH,4DAEC;AAcD,oDAEC;AA1CD,wFAAwF;AAC3E,QAAA,2BAA2B,GAAG,oBAAoB,CAAC;AAEhE,kDAAkD;AACrC,QAAA,mBAAmB,GAAG,UAAU,CAAC;AAE9C;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,iBAAiB,CAAC;AAE1D;;;;GAIG;AACU,QAAA,qBAAqB,GAAG,QAAQ,CAAC;AAE9C,4EAA4E;AAC/D,QAAA,mBAAmB,GAAG,UAAU,CAAC;AAE9C,4FAA4F;AAC5F,SAAgB,wBAAwB,CAAC,IAAY;IACnD,OAAO,IAAI,KAAK,mCAA2B,IAAI,IAAI,KAAK,gCAAwB,CAAC;AACnF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,oBAAoB,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,6BAAqB,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -705,6 +705,20 @@ export declare class ClaudeJsonStreamAdapter extends EventEmitter implements Age
|
|
|
705
705
|
private parseQuestions;
|
|
706
706
|
answerQuestion(key: SessionKey, answers: string[][]): void;
|
|
707
707
|
rejectQuestion(key: SessionKey): void;
|
|
708
|
+
/**
|
|
709
|
+
* @description Set the question `requestId` aside: DENY its `can_use_tool` with `text` as the message. The CLI hands the model
|
|
710
|
+
* a denied tool call's message as the tool's result and the turn goes on — no interrupt, unlike {@link rejectQuestion}'s
|
|
711
|
+
* abandonment (the Agent SDK: «When denying, provide a message explaining why. Claude sees this message and may adjust its
|
|
712
|
+
* approach»). The answers already given travel in `text` itself, so `givenAnswers` is not read here. Does nothing, and says
|
|
713
|
+
* so (`false`), unless `requestId` is the question pending now.
|
|
714
|
+
*/
|
|
715
|
+
setQuestionAside(key: SessionKey, requestId: string, text: string): boolean;
|
|
716
|
+
/**
|
|
717
|
+
* Take the pending question out of the session — its sidecar goes too, so a restart cannot resurface it — and hand it to the
|
|
718
|
+
* caller, who answers, denies or sets aside its `can_use_tool` request. `null` when none is pending (already resolved: a
|
|
719
|
+
* second resolution is a no-op, never a second control_response).
|
|
720
|
+
*/
|
|
721
|
+
private takePendingQuestion;
|
|
708
722
|
private writeControlResponse;
|
|
709
723
|
getSessions(_key: SessionKey, workDir: string): Promise<AgentSession[]>;
|
|
710
724
|
getRecentTurns(_key: SessionKey, workDir: string, sessionId: string, limit: number): Promise<RecentTurn[]>;
|
|
@@ -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;AAEt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AC,aAAa,CAAC;IAc9H,QAAQ,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAOxE;;;;;;;OAOG;IACH,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAKzC,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKvC,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAW1E,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAIzC,gFAAgF;IAChF,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAI5C,yHAAyH;IACzH,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,WAAW;IAK5C;;;;OAIG;IACG,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,wBAAwB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAInE;;;;;;OAMG;YACW,iBAAiB;IAwB/B,yHAAyH;IACzH,yBAAyB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS;IAKrE;;;;;;;;;;;OAWG;IACG,oBAAoB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAoB1H,wGAAwG;IACxG,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,WAAW;CAqBpB"}
|
|
@@ -2062,11 +2062,11 @@ class ClaudeJsonStreamAdapter extends events_1.EventEmitter {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
answerQuestion(key, answers) {
|
|
2064
2064
|
const session = this.sessions.get((0, sessionKey_1.keyToString)(key));
|
|
2065
|
-
if (!session?.isActive
|
|
2065
|
+
if (!session?.isActive)
|
|
2066
|
+
return;
|
|
2067
|
+
const pending = this.takePendingQuestion(session);
|
|
2068
|
+
if (!pending)
|
|
2066
2069
|
return;
|
|
2067
|
-
const pending = session.pendingQuestion;
|
|
2068
|
-
session.pendingQuestion = null;
|
|
2069
|
-
this.clearQuestionSidecar(session);
|
|
2070
2070
|
// The turn resumes now; reset the idle-watchdog clock so the (possibly long)
|
|
2071
2071
|
// wait for the user's answer doesn't instantly trip it before output resumes.
|
|
2072
2072
|
session.lastStdoutActivityAt = Date.now();
|
|
@@ -2081,12 +2081,42 @@ class ClaudeJsonStreamAdapter extends events_1.EventEmitter {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
rejectQuestion(key) {
|
|
2083
2083
|
const session = this.sessions.get((0, sessionKey_1.keyToString)(key));
|
|
2084
|
-
|
|
2084
|
+
const pending = session ? this.takePendingQuestion(session) : null;
|
|
2085
|
+
if (!session || !pending)
|
|
2085
2086
|
return;
|
|
2087
|
+
this.writeControlResponse(session, pending.requestId, (0, claudeStreamJson_1.buildCanUseToolDeny)('User declined to answer the question.', pending.toolUseId));
|
|
2088
|
+
}
|
|
2089
|
+
/**
|
|
2090
|
+
* @description Set the question `requestId` aside: DENY its `can_use_tool` with `text` as the message. The CLI hands the model
|
|
2091
|
+
* a denied tool call's message as the tool's result and the turn goes on — no interrupt, unlike {@link rejectQuestion}'s
|
|
2092
|
+
* abandonment (the Agent SDK: «When denying, provide a message explaining why. Claude sees this message and may adjust its
|
|
2093
|
+
* approach»). The answers already given travel in `text` itself, so `givenAnswers` is not read here. Does nothing, and says
|
|
2094
|
+
* so (`false`), unless `requestId` is the question pending now.
|
|
2095
|
+
*/
|
|
2096
|
+
setQuestionAside(key, requestId, text) {
|
|
2097
|
+
const session = this.sessions.get((0, sessionKey_1.keyToString)(key));
|
|
2098
|
+
if (!session?.isActive || session.pendingQuestion?.requestId !== requestId)
|
|
2099
|
+
return false;
|
|
2100
|
+
const pending = this.takePendingQuestion(session);
|
|
2101
|
+
if (!pending)
|
|
2102
|
+
return false;
|
|
2103
|
+
// The turn resumes now, as after an answer: restart the idle-watchdog clock the wait for the person had run down.
|
|
2104
|
+
session.lastStdoutActivityAt = Date.now();
|
|
2105
|
+
this.writeControlResponse(session, pending.requestId, (0, claudeStreamJson_1.buildCanUseToolDeny)(text, pending.toolUseId));
|
|
2106
|
+
return true;
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Take the pending question out of the session — its sidecar goes too, so a restart cannot resurface it — and hand it to the
|
|
2110
|
+
* caller, who answers, denies or sets aside its `can_use_tool` request. `null` when none is pending (already resolved: a
|
|
2111
|
+
* second resolution is a no-op, never a second control_response).
|
|
2112
|
+
*/
|
|
2113
|
+
takePendingQuestion(session) {
|
|
2086
2114
|
const pending = session.pendingQuestion;
|
|
2115
|
+
if (!pending)
|
|
2116
|
+
return null;
|
|
2087
2117
|
session.pendingQuestion = null;
|
|
2088
2118
|
this.clearQuestionSidecar(session);
|
|
2089
|
-
|
|
2119
|
+
return pending;
|
|
2090
2120
|
}
|
|
2091
2121
|
writeControlResponse(session, requestId, response) {
|
|
2092
2122
|
this.writeStdin(session, { type: 'control_response', response: { subtype: 'success', request_id: requestId, response } });
|