charness 3.0.0 → 3.1.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/README.md +188 -16
- package/dist/adapters/claudeCliAdapter.d.ts +15 -0
- package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeCliAdapter.js +36 -1
- package/dist/adapters/claudeCliAdapter.js.map +1 -1
- package/dist/adapters/claudeConfigDir.d.ts +40 -0
- package/dist/adapters/claudeConfigDir.d.ts.map +1 -0
- package/dist/adapters/claudeConfigDir.js +3 -0
- package/dist/adapters/claudeConfigDir.js.map +1 -0
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +32 -0
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +89 -8
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/adapters/claudePlatformFlags.d.ts +4 -4
- package/dist/adapters/claudePlatformFlags.js +4 -4
- package/dist/adapters/createAdapter.d.ts +8 -0
- package/dist/adapters/createAdapter.d.ts.map +1 -1
- package/dist/adapters/createAdapter.js +37 -0
- package/dist/adapters/createAdapter.js.map +1 -1
- package/dist/adapters/openCodeAdapter.d.ts +23 -0
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +84 -1
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/agentLogin/agentLogin.d.ts +15 -2
- package/dist/agentLogin/agentLogin.d.ts.map +1 -1
- package/dist/agentLogin/agentLogin.js +53 -16
- package/dist/agentLogin/agentLogin.js.map +1 -1
- package/dist/apiErrorRetry.d.ts +8 -3
- package/dist/apiErrorRetry.d.ts.map +1 -1
- package/dist/apiErrorRetry.js +36 -5
- package/dist/apiErrorRetry.js.map +1 -1
- package/dist/apiRetryKick.d.ts +9 -0
- package/dist/apiRetryKick.d.ts.map +1 -1
- package/dist/apiRetryKick.js +16 -0
- package/dist/apiRetryKick.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +639 -24
- package/dist/bot.js.map +1 -1
- package/dist/cli/claudeProfiles.d.ts +42 -0
- package/dist/cli/claudeProfiles.d.ts.map +1 -0
- package/dist/cli/claudeProfiles.js +106 -0
- package/dist/cli/claudeProfiles.js.map +1 -0
- package/dist/cli.js +10 -0
- package/dist/cli.js.map +1 -1
- package/dist/connectors/jira/adf.d.ts +2 -0
- package/dist/connectors/jira/adf.d.ts.map +1 -1
- package/dist/connectors/jira/adf.js +5 -0
- package/dist/connectors/jira/adf.js.map +1 -1
- package/dist/connectors/jira/answerSink.d.ts +7 -0
- package/dist/connectors/jira/answerSink.d.ts.map +1 -1
- package/dist/connectors/jira/answerSink.js +24 -10
- package/dist/connectors/jira/answerSink.js.map +1 -1
- package/dist/connectors/jira/attachmentTool.d.ts +7 -0
- package/dist/connectors/jira/attachmentTool.d.ts.map +1 -1
- package/dist/connectors/jira/attachmentTool.js +16 -0
- package/dist/connectors/jira/attachmentTool.js.map +1 -1
- package/dist/connectors/jira/client.d.ts +32 -0
- package/dist/connectors/jira/client.d.ts.map +1 -1
- package/dist/connectors/jira/client.js +43 -5
- package/dist/connectors/jira/client.js.map +1 -1
- package/dist/connectors/jira/config.d.ts +3 -16
- package/dist/connectors/jira/config.d.ts.map +1 -1
- package/dist/connectors/jira/config.js +5 -32
- package/dist/connectors/jira/config.js.map +1 -1
- package/dist/connectors/jira/connector.d.ts +3 -0
- package/dist/connectors/jira/connector.d.ts.map +1 -1
- package/dist/connectors/jira/connector.js +70 -15
- package/dist/connectors/jira/connector.js.map +1 -1
- package/dist/connectors/jira/contextLedger.d.ts +1 -0
- package/dist/connectors/jira/contextLedger.d.ts.map +1 -1
- package/dist/connectors/jira/contextLedger.js +2 -0
- package/dist/connectors/jira/contextLedger.js.map +1 -1
- package/dist/connectors/jira/inbound.d.ts +15 -6
- package/dist/connectors/jira/inbound.d.ts.map +1 -1
- package/dist/connectors/jira/inbound.js +37 -22
- package/dist/connectors/jira/inbound.js.map +1 -1
- package/dist/connectors/jira/issueBlocks.d.ts +26 -3
- package/dist/connectors/jira/issueBlocks.d.ts.map +1 -1
- package/dist/connectors/jira/issueBlocks.js +104 -29
- package/dist/connectors/jira/issueBlocks.js.map +1 -1
- package/dist/connectors/jira/issueContext.d.ts +11 -5
- package/dist/connectors/jira/issueContext.d.ts.map +1 -1
- package/dist/connectors/jira/issueContext.js +23 -6
- package/dist/connectors/jira/issueContext.js.map +1 -1
- package/dist/connectors/jira/issueDelta.d.ts +3 -0
- package/dist/connectors/jira/issueDelta.d.ts.map +1 -1
- package/dist/connectors/jira/issueDelta.js +15 -6
- package/dist/connectors/jira/issueDelta.js.map +1 -1
- package/dist/connectors/jira/mediaPlaceholders.d.ts +2 -0
- package/dist/connectors/jira/mediaPlaceholders.d.ts.map +1 -1
- package/dist/connectors/jira/mediaPlaceholders.js +16 -3
- package/dist/connectors/jira/mediaPlaceholders.js.map +1 -1
- package/dist/connectors/jira/prompt.d.ts +2 -0
- package/dist/connectors/jira/prompt.d.ts.map +1 -1
- package/dist/connectors/jira/prompt.js +4 -1
- package/dist/connectors/jira/prompt.js.map +1 -1
- package/dist/connectors/jira/sessionKeyCodec.d.ts +2 -0
- package/dist/connectors/jira/sessionKeyCodec.d.ts.map +1 -1
- package/dist/connectors/jira/sessionKeyCodec.js +5 -0
- package/dist/connectors/jira/sessionKeyCodec.js.map +1 -1
- package/dist/connectors/jira/trigger.d.ts +4 -0
- package/dist/connectors/jira/trigger.d.ts.map +1 -1
- package/dist/connectors/jira/trigger.js +9 -1
- package/dist/connectors/jira/trigger.js.map +1 -1
- package/dist/connectors/jira/triggerLog.d.ts +4 -2
- package/dist/connectors/jira/triggerLog.d.ts.map +1 -1
- package/dist/connectors/jira/triggerLog.js +1 -1
- package/dist/connectors/jira/triggerLog.js.map +1 -1
- package/dist/connectors/jira/trustedGroup.d.ts +54 -0
- package/dist/connectors/jira/trustedGroup.d.ts.map +1 -0
- package/dist/connectors/jira/trustedGroup.js +98 -0
- package/dist/connectors/jira/trustedGroup.js.map +1 -0
- package/dist/connectors/telegram/commands/autoContinueLimits.d.ts +3 -0
- package/dist/connectors/telegram/commands/autoContinueLimits.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/autoContinueLimits.js +15 -45
- package/dist/connectors/telegram/commands/autoContinueLimits.js.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts +58 -0
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/claudeAccounts.js +591 -0
- package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -0
- package/dist/connectors/telegram/commands/fallbackChain.d.ts +49 -0
- package/dist/connectors/telegram/commands/fallbackChain.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/fallbackChain.js +624 -0
- package/dist/connectors/telegram/commands/fallbackChain.js.map +1 -0
- package/dist/connectors/telegram/commands/modelProviders.d.ts +23 -1
- package/dist/connectors/telegram/commands/modelProviders.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/modelProviders.js +131 -6
- package/dist/connectors/telegram/commands/modelProviders.js.map +1 -1
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +137 -9
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +137 -9
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +137 -9
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +137 -9
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +137 -9
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +137 -9
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +137 -9
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +137 -9
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +137 -9
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +137 -9
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +137 -9
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +137 -9
- package/dist/i18n/zh.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts +8 -0
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +42 -2
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/state.d.ts +172 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +298 -0
- package/dist/state.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/autoContinueOnLimit.d.ts +7 -0
- package/dist/utils/autoContinueOnLimit.d.ts.map +1 -1
- package/dist/utils/autoContinueOnLimit.js +10 -0
- package/dist/utils/autoContinueOnLimit.js.map +1 -1
- package/dist/utils/claudeAccountPickerPlan.d.ts +85 -0
- package/dist/utils/claudeAccountPickerPlan.d.ts.map +1 -0
- package/dist/utils/claudeAccountPickerPlan.js +123 -0
- package/dist/utils/claudeAccountPickerPlan.js.map +1 -0
- package/dist/utils/claudeLimitSwitch.d.ts +40 -0
- package/dist/utils/claudeLimitSwitch.d.ts.map +1 -0
- package/dist/utils/claudeLimitSwitch.js +54 -0
- package/dist/utils/claudeLimitSwitch.js.map +1 -0
- package/dist/utils/claudeProfileUsageLines.d.ts +15 -0
- package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -0
- package/dist/utils/claudeProfileUsageLines.js +42 -0
- package/dist/utils/claudeProfileUsageLines.js.map +1 -0
- package/dist/utils/claudeProfiles.d.ts +117 -0
- package/dist/utils/claudeProfiles.d.ts.map +1 -0
- package/dist/utils/claudeProfiles.js +285 -0
- package/dist/utils/claudeProfiles.js.map +1 -0
- package/dist/utils/claudeStreamJson.d.ts +13 -1
- package/dist/utils/claudeStreamJson.d.ts.map +1 -1
- package/dist/utils/claudeStreamJson.js +13 -0
- package/dist/utils/claudeStreamJson.js.map +1 -1
- package/dist/utils/claudeUsage.d.ts +209 -0
- package/dist/utils/claudeUsage.d.ts.map +1 -0
- package/dist/utils/claudeUsage.js +413 -0
- package/dist/utils/claudeUsage.js.map +1 -0
- package/dist/utils/claudeUsageRefresher.d.ts +44 -0
- package/dist/utils/claudeUsageRefresher.d.ts.map +1 -0
- package/dist/utils/claudeUsageRefresher.js +95 -0
- package/dist/utils/claudeUsageRefresher.js.map +1 -0
- package/dist/utils/fallbackBridge.d.ts +32 -0
- package/dist/utils/fallbackBridge.d.ts.map +1 -0
- package/dist/utils/fallbackBridge.js +62 -0
- package/dist/utils/fallbackBridge.js.map +1 -0
- package/dist/utils/fallbackChain.d.ts +299 -0
- package/dist/utils/fallbackChain.d.ts.map +1 -0
- package/dist/utils/fallbackChain.js +542 -0
- package/dist/utils/fallbackChain.js.map +1 -0
- package/dist/utils/jsonStreamHost.d.ts +14 -3
- package/dist/utils/jsonStreamHost.d.ts.map +1 -1
- package/dist/utils/jsonStreamHost.js +26 -5
- package/dist/utils/jsonStreamHost.js.map +1 -1
- package/dist/utils/modelRecentPlan.d.ts +56 -0
- package/dist/utils/modelRecentPlan.d.ts.map +1 -0
- package/dist/utils/modelRecentPlan.js +107 -0
- package/dist/utils/modelRecentPlan.js.map +1 -0
- package/dist/utils/threadStatusReport.d.ts +25 -1
- package/dist/utils/threadStatusReport.d.ts.map +1 -1
- package/dist/utils/threadStatusReport.js +24 -1
- package/dist/utils/threadStatusReport.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ setup, no extra dashboards — direct access to your own **OpenCode** /
|
|
|
34
34
|
- **Time-aware prompts** — `/timestamps on` prepends each forwarded prompt's send time (local-offset ISO), so a days-long session knows what "yesterday" or "2 days ago" means; agent-facing only, per topic
|
|
35
35
|
- **Reply context** — reply to a message in a topic and the quoted text is folded into the prompt the agent receives, so it sees what you point at without re-pasting; works for text, voice and files (a photo, a document, an album…), both agents; a reply TO a photo, file or voice note names it, with the path of the bot's saved copy when it has one
|
|
36
36
|
- **Your timezone** — `/timezone Europe/Moscow` once, and schedules fire at your wall-clock time while the agent is told what time it actually is; no server-clock guessing
|
|
37
|
-
- **Waits out usage limits** — when the agent hits a usage / session limit the bot reads the reset time out of the error (honouring the timezone the provider quotes), waits, then tells the agent to continue by itself and pins the "work resumed" message so a muted topic still notifies you; `/
|
|
37
|
+
- **Waits out usage limits** — when the agent hits a usage / session limit the bot reads the reset time out of the error (honouring the timezone the provider quotes), waits, then tells the agent to continue by itself and pins the "work resumed" message so a muted topic still notifies you; `/limits` turns waiting off per topic or skips a single resume. With a **fallback chain** (`/limits`: other Claude accounts, OpenCode providers and models, in your order of preference) the limit notice offers «🔁 Switch to …» buttons to move the topic to the next entry with room and continue at once — or the bot does it by itself when you turn switching on; across backends the new agent gets a context bridge with the previous one's last turns
|
|
38
38
|
|
|
39
39
|
## Two surfaces: group topics, bot DM, or both
|
|
40
40
|
|
|
@@ -342,9 +342,8 @@ actually start an agent or terminal in the folder.
|
|
|
342
342
|
| `/claude`, `/opencode`, `/oc` | Start agent in this topic's bound folder |
|
|
343
343
|
| `/terminal` | Open a raw `$SHELL` in the bound folder — see [Raw terminal](#raw-terminal-terminal) |
|
|
344
344
|
| `/claude_mode` | Switch this topic's Claude backend (json-stream ⇄ per-turn ⇄ tmux-scrape); bare shows a picker — see [Claude Code backends](#claude-code-backends-claude_mode) |
|
|
345
|
-
| `/model` | Switch model through a two-level picker: providers, then that provider's models (10 per page). Each provider row has a 🙈 to hide it from the picker (bot-wide, persisted; 👁 brings it back) — `/model <provider/model>` still reaches a hidden provider. If OpenCode is waiting on an old provider's retry, the next prompt interrupts that wait and starts with the selected model instead of sitting queued behind it |
|
|
346
|
-
| `/
|
|
347
|
-
| `/disconnect [provider]` | Remove an OpenCode provider's stored credentials; bare shows a picker of active providers. A provider OpenCode enables from an environment variable (e.g. `OPENROUTER_API_KEY`) stays active after this — the reply says so and points at hiding it in `/model` |
|
|
345
|
+
| `/model` | Switch model through a two-level picker: providers, then that provider's models (10 per page). On OpenCode the first row is 🕘 Recently used — a flat list of the models picked before, across providers (bot-wide, most recent first, up to 10), one tap to switch; it appears once something has been picked. Each provider row has a 🙈 to hide it from the picker (bot-wide, persisted; 👁 brings it back) — `/model <provider/model>` still reaches a hidden provider. If OpenCode is waiting on an old provider's retry, the next prompt interrupts that wait and starts with the selected model instead of sitting queued behind it |
|
|
346
|
+
| `/accounts` | Every account the bot works with, on one screen. **Claude accounts** (when you keep several subscriptions signed in): each profile with its email, plan (personal Pro/Max or corporate Team/Enterprise), how many topics use it and its usage windows, ✓ on the active one; tap a profile to switch this topic (a running session is restarted under it, same conversation — at the end of its turn if it is working); in **General** the pick becomes the default for all topics. Per profile: 🔑 signs it in again, 🗑 removes it (after a confirmation; for `default`, which IS `~/.claude`, «remove» signs it out — see below). The usage lines give each window's percentage USED and when it resets as a time from now (`5h 5% 🔄 in 4h · week 20% 🔄 in 5d 8h · Fable 4% 🔄 in 5d 8h`; «🔄 in 2h», «🔄 in 2d 1h», «🔄 in 30m»; Fable only on a plan that has its own weekly window); when the 5h window's reset is unknown the weekly one is shown in its place, and with no reset at all only the percentage. The hint paragraph under the account list says the percentages are used. «➕ Claude account» asks for a name and runs the sign-in. **OpenCode providers**: the connected ones are listed with a «🔌 Disconnect <provider>» button and a 🔑 (connect again) each (the disconnect asks, then removes the stored credentials; a provider OpenCode enables from an environment variable, e.g. `OPENROUTER_API_KEY`, stays active — the reply says so and points at hiding it in `/model`); «➕ OpenCode provider» asks for the provider id and continues with the connect flow (OAuth methods when available, otherwise an API key whose message is deleted from Telegram). What happens when an account hits a usage limit is set in `/limits`. Text forms: `/accounts add <name>`, `/accounts use <name>`, `/accounts login <name>`, `/accounts remove <name>`, `/accounts autoswitch on\|off`. `/account`, `/connect [provider [key]]` and `/disconnect [provider]` still work as hidden aliases (the menu lists only `/accounts`). See [Several accounts](#several-accounts-accounts) |
|
|
348
347
|
| `/effort` | Set reasoning effort (per-thread) via inline buttons. Claude: native `/effort` levels (`low…ultracode`). OpenCode: the current model's variants, applied per-prompt. No env configuration |
|
|
349
348
|
| `/verbosity` | Output-verbosity macro (`minimal\|short\|full`): sets the thinking, tool-results and sub-agent display prefs at once; `/thinking`, `/tool_results`, `/subagent` point-override afterwards. Mixed prefs show as "custom" in the picker. The picker's second row (or `/verbosity stream\|stream_answers\|answers`) sets what the topic SHOWS — "Stream only" (default), "Stream + answers" (the stream plus the agent's pinned answers) or "Answers only" (the pinned answers, no stream; an agent that keeps writing after its final answer is reminded once to send what matters); a switch applies from the next message, and `/status` names the view |
|
|
350
349
|
| `/thinking` | Chain-of-thought display: `full` keeps the reasoning, `short` collapses to "💭 thought for Ns", `minimal` keeps only the live working cue |
|
|
@@ -354,7 +353,7 @@ actually start an agent or terminal in the folder.
|
|
|
354
353
|
| `/rename_session` | Rename the current live session (OpenCode; Claude transcripts have no title) |
|
|
355
354
|
| `/quit`, `/q` | End the session — Claude: graceful double Ctrl+C; OpenCode/terminal: `stopSession`. Releases the persisted session id, so a bot restart won't auto-reattach it (resume later via `/sessions`). A topic whose agent process is gone but whose session is kept (it "sleeps": the next message, file, voice note, `/compact`, `/model` or `/effort` resumes it by itself) is released the same way |
|
|
356
355
|
| `/new`, `/clear_session` | End the current session and start a fresh one (same adapter) |
|
|
357
|
-
| `/status` | This thread's status: agent, bound folder and resolved workdir; a live session also shows the model it is actually running, effort, start time, runtime version and context use (anything the backend cannot report renders as unknown) |
|
|
356
|
+
| `/status` | This thread's status: agent, bound folder, the Claude account it runs on and the resolved workdir; a live session also shows the model it is actually running, effort, start time, runtime version and context use (anything the backend cannot report renders as unknown). On a Claude topic the account is its profile (name · email as in `/accounts`, marked ⛔ while it is at its limit, with a second row for a switch still pending); an OpenCode topic's model already names its provider |
|
|
358
357
|
| `/output` | Last 500 lines of agent output (sent as at most 5 chunks; the overflow is reported as omitted) |
|
|
359
358
|
| `/c`, `/y`, `/n` | Ctrl+C / "y" / "n" |
|
|
360
359
|
| `/enter`, `/up`, `/down`, `/tab` | tmux key passthrough |
|
|
@@ -366,7 +365,7 @@ actually start an agent or terminal in the folder.
|
|
|
366
365
|
| `/compact` | Compact the agent's context — a real, confirmed compaction on OpenCode and on the default (stream) Claude backend; the tmux Claude backend has the literal command forwarded (its TUI compacts); terminal: not supported |
|
|
367
366
|
| `/compact_on_idle` | Toggle auto-compaction after ~55 min idle (Enable/Disable picker; `AGENT_IDLE_MINUTES` sets the window). Per topic; run it in **General** to set the default for all topics. On by default. Each idle compaction posts one short notice; the picker's «Show summary» / «Hide summary» row (the `/compact_summary` switch) adds the agent's full summary after it. Fires at most once per active period (until you write again); if a question was pending it is re-asked with tappable buttons after the compaction. On the json-stream backends the idle mark also STOPS the agent process, compaction or not — the topic sleeps and your next message resumes it (`/status` says so) |
|
|
368
367
|
| `/compact_summary` | Toggle posting the agent's full summary after a compaction — `/compact`, the idle compaction and the agent's own `compact_conversation` (Enable/Disable picker). Per topic; run it in **General** to set the default for all topics. Off by default: a compaction ends in a short line. On OpenCode it also hides the summary OpenCode streams itself |
|
|
369
|
-
| `/
|
|
368
|
+
| `/limits` | Everything about a usage limit on one screen, with a short text: at the top each Claude account's **usage windows** exactly as `/accounts` shows them, under a «Usage (% used)» heading (`default — ⏱ 5h 5% 🔄 in 4h · week 20% 🔄 in 5d 8h · Fable 4% 🔄 in 5d 8h`; a signed-out account is named, one never polled is left out), then what the topic runs on and where its two settings come from. **Fallback models** — an ordered list of Claude accounts (with an optional model) and OpenCode providers with a model, top = preferred, where a topic continues when its agent hits a limit. One full-width button per entry (`1. Claude · work · opus ⛔ 14:00` — limited until, 🔒 not signed in, ❓ no longer offered, 🚫 left out of automatic switching, ✓ where the topic runs); a tap opens that entry in the same message with ⬆️ Up / ⬇️ Down, 🚫 Don't use / ✅ Use (a left-out entry stays usable by hand through `/model` and `/accounts`), 🗑 Remove and ⬅️ Back. Below the list: «➕ Add» (account or provider, then the model), «🔄 Fill from connected» (a draft from what is connected; entries you left out stay left out; asks first when a list exists), «🗑 Clear». The list is ONE instance-wide list and is editable from every topic. **Two settings** decide what a limit does: «🔁 Auto switch» — auto switch to a fallback model (OFF by default: the limit notice carries «🔁 Switch to …» buttons instead) and «⏳ Wait for reset» — wait for the reset and continue (ON by default; while a wait is armed the topic screen also offers «⏭ Skip once»). In General they are the defaults for all topics and each is one button that flips the value. In a regular topic each is one short full-width button showing the effective value (`🔁 Auto switch: ON`; one line of text above the list says where each value comes from — `🔁 as in General · ⏳ set for this topic`); a tap opens the setting in the same message with ON / OFF / «As in General (<the General value>)» — the topic's own choice marked ✓ — and ⬅️ Back, and a choice applies and returns to the screen. Switch ON: the topic moves to the first available entry at once. OFF: buttons on the notice, and if none is pressed the bot waits for the reset (waiting ON); both OFF: it only reports the limit. When every enabled entry, the current one included, is limited, the wait ends at the EARLIEST reset and the topic continues on that entry (the notice names it and the time). Text forms: `/limits rebuild`, `/limits clear`, `/limits switch on\|off\|same`, `/limits wait on\|off\|same`. `/fallback` and `/auto_continue_limits [on\|off]` still work as hidden aliases. See [Usage limits and the fallback models](#usage-limits-and-the-fallback-models-limits) |
|
|
370
369
|
| `/bind` | Bare: current binding + folder picker, with «leave current dir» (the old `/unbind`) and «create new folder» buttons |
|
|
371
370
|
| `/mcp` | List MCP servers active for this thread |
|
|
372
371
|
|
|
@@ -378,7 +377,7 @@ actually start an agent or terminal in the folder.
|
|
|
378
377
|
| `/help` | Context-aware help |
|
|
379
378
|
| `/ls` | List the project subfolders of the folder the bot was launched from |
|
|
380
379
|
| `/list` | List existing topics and their bindings |
|
|
381
|
-
| `/status` | This topic's status; in General — a global view of all topics + active agents. A
|
|
380
|
+
| `/status` | This topic's status; in General — a global view of all topics + active agents. A non-General topic also reports the account it runs on (Claude profile · email, ⛔ at its limit) and the resolved workdir; a live one the model actually running, runtime version and context use (unknown when the backend cannot report it) |
|
|
382
381
|
| `/doctor` | Self-diagnose: admin rights, privacy mode, paths, CLIs |
|
|
383
382
|
| `/version` | Versions: bot, claude, opencode, node, tmux |
|
|
384
383
|
| `/whoami` | Show userId, chatId, threadId, isAllowed, binding |
|
|
@@ -449,6 +448,150 @@ conversation resumes on the other backend. The pick persists per topic
|
|
|
449
448
|
Billing note: the json-stream backends strip `ANTHROPIC_API_KEY` from the
|
|
450
449
|
agent's env, so usage bills to your Claude subscription rather than an API key.
|
|
451
450
|
|
|
451
|
+
### Several accounts (`/accounts`)
|
|
452
|
+
|
|
453
|
+
If you hold more than one Claude subscription (a personal Pro/Max and a
|
|
454
|
+
corporate Team/Enterprise seat, say), the bot keeps each signed in as its own
|
|
455
|
+
**profile** and lets you choose, per topic, which one a Claude session runs on —
|
|
456
|
+
so one account's usage limit does not stop every topic.
|
|
457
|
+
|
|
458
|
+
- The profile `default` is your existing `~/.claude` login; nothing is migrated.
|
|
459
|
+
An added profile is a Claude config directory of its own under
|
|
460
|
+
`DATA_DIR/claude-profiles/<name>/` (the CLI gets it through
|
|
461
|
+
`CLAUDE_CONFIG_DIR`): it holds that account's login, while the transcripts,
|
|
462
|
+
settings, skills, plugins and your user memory are symlinks back into
|
|
463
|
+
`~/.claude` — every account sees the same hooks and skills, and a conversation
|
|
464
|
+
started under one account resumes under another.
|
|
465
|
+
- **Adding an account:** `/accounts` → «➕ Claude account» (or `/accounts add work`) — give it
|
|
466
|
+
a short name, then open the sign-in link the bot posts **in a browser that is
|
|
467
|
+
signed in as that other account** (an incognito window or another browser
|
|
468
|
+
profile keeps your current login out of the way), finish the sign-in and paste
|
|
469
|
+
the code back into the topic. The code message is deleted; the bot confirms
|
|
470
|
+
with the account's email and plan.
|
|
471
|
+
- **Switching:** tap a profile in `/accounts` (or `/accounts use <name>`). A
|
|
472
|
+
running session on the default (stream) backend is restarted under the new
|
|
473
|
+
account with the same conversation — right away when idle, at the end of its
|
|
474
|
+
turn when it is working; a sleeping topic simply resumes under it. The
|
|
475
|
+
tmux-scrape backend is reopened the same way when idle and waits for the next
|
|
476
|
+
start when busy. In the **General** topic the pick is the default for all
|
|
477
|
+
topics; a topic with its own pick keeps it («↩ Follow the default» drops it).
|
|
478
|
+
A profile that is not signed in cannot be picked.
|
|
479
|
+
- **Removing:** «🗑 Remove» deletes the profile's login directory. The profile
|
|
480
|
+
that is currently the instance default cannot be removed (pick another one in
|
|
481
|
+
General first); topics that had picked the removed profile return to the
|
|
482
|
+
default and the confirmation says how many. For `default` (`~/.claude`
|
|
483
|
+
itself) «remove» means **sign out**: after a confirmation that says running
|
|
484
|
+
sessions on it will stop working, only the stored subscription login
|
|
485
|
+
(`claudeAiOauth` in `~/.claude/.credentials.json`; MCP tokens beside it stay)
|
|
486
|
+
is deleted — `projects/`, settings, skills, plugins and memory are never
|
|
487
|
+
touched — and the account is hidden from the list, the recommendation and the
|
|
488
|
+
fallback ranking until it is signed in again (`/accounts login default`).
|
|
489
|
+
- A child `claude` the agent starts inherits the same `CLAUDE_CONFIG_DIR`, so
|
|
490
|
+
it runs on the topic's account too.
|
|
491
|
+
- **Usage per account.** Under each profile `/accounts` shows how much of each
|
|
492
|
+
subscription window is used and when it resets:
|
|
493
|
+
the 5-hour session window, the weekly window (all models) and Fable's own
|
|
494
|
+
weekly window (left out entirely on a plan without one). A line reads
|
|
495
|
+
`5h 5% 🔄 in 4h · week 20% 🔄 in 5d 8h · Fable 4% 🔄 in 5d 8h` — the
|
|
496
|
+
percentage is USED. A reset is shown as a time from
|
|
497
|
+
now (`🔄 in 2d 1h`; the two largest units, minutes only under an hour); an
|
|
498
|
+
unknown 5h reset shows the weekly one, and with no reset at all only the
|
|
499
|
+
percentage is shown. `telegramcode claude-profiles` prints
|
|
500
|
+
the same relative form; its `--json` and the MCP tool keep ISO instants. The bot reads the figures with
|
|
501
|
+
each profile's own login every 10 minutes, when `/accounts` or `/limits` opens and when an
|
|
502
|
+
agent asks; a json-stream session's own rate-limit events keep them current
|
|
503
|
+
between polls. A token the CLI has not renewed yet shows the last figures as
|
|
504
|
+
`(stale)`; a profile whose session was refused on a window is marked
|
|
505
|
+
`⛔ at its limit until …` and is skipped by the recommendation below.
|
|
506
|
+
- **Another account takes over on a limit.** When a topic's account hits a
|
|
507
|
+
usage limit the bot looks at the [fallback chain](#usage-limits-and-the-fallback-models-limits);
|
|
508
|
+
without one it ranks the other signed-in profiles by headroom on the windows
|
|
509
|
+
the topic's model drains (fresh figures, not marked limited). The limit
|
|
510
|
+
notice carries «🔁 Switch to <entry>» buttons, best first: a tap moves the
|
|
511
|
+
topic there (the running session is restarted under the new account with the
|
|
512
|
+
same conversation), drops the wait for the reset and tells the agent to
|
|
513
|
+
continue right away. With **switching** on («🔁 Auto switch to a
|
|
514
|
+
fallback model» in `/limits`, or `/limits switch on`; in General the default for all
|
|
515
|
+
topics) the bot does the same by itself and posts one line — «Usage
|
|
516
|
+
limit on a — this topic switched to b and continues», naming when the
|
|
517
|
+
exhausted account resets. It is OFF by default: moving work between
|
|
518
|
+
subscriptions is your call. The exhausted profile is marked limited until its
|
|
519
|
+
window resets, so it is not picked again before then; the topic is never
|
|
520
|
+
moved back by itself — switch it back by hand when the window resets. When
|
|
521
|
+
nothing can take over the bot waits for the reset as before. An agent that is
|
|
522
|
+
still working switches at the end of its turn (the wait stays armed).
|
|
523
|
+
- **Which account for a child process.** An agent that launches a detached
|
|
524
|
+
`claude` (a worker, a reviewer) asks the bot's `telegramBot` MCP tool
|
|
525
|
+
`claude_profiles` — optionally with the model it will run — and gets every
|
|
526
|
+
profile with its windows plus `recommended`: the signed-in, unlimited profile
|
|
527
|
+
with the most headroom (Fable → Fable's weekly window and the session window;
|
|
528
|
+
any other model → the shared weekly window and the session window). It then
|
|
529
|
+
starts the child with `CLAUDE_CONFIG_DIR=<configDir>` (`null` = the default
|
|
530
|
+
profile: set nothing). The same answer from a shell, for a worker without
|
|
531
|
+
MCP: `telegramcode claude-profiles [--best] [--model <name>] [--json]` —
|
|
532
|
+
`--best` prints just the directory (an empty line for the default), so
|
|
533
|
+
`CLAUDE_CONFIG_DIR="$(telegramcode claude-profiles --best --model fable)"`
|
|
534
|
+
works as is; it reads the bot's cache off `DATA_DIR/state.json`.
|
|
535
|
+
|
|
536
|
+
### Usage limits and the fallback models (`/limits`)
|
|
537
|
+
|
|
538
|
+
When a topic's agent stops on a usage limit — a Claude account window, an
|
|
539
|
+
OpenAI quota through OpenCode, a Google `RESOURCE_EXHAUSTED` — the bot can keep
|
|
540
|
+
the work going somewhere else instead of waiting. `/limits` holds ONE
|
|
541
|
+
instance-wide, ordered list of **fallback models** (where to go), top = preferred:
|
|
542
|
+
|
|
543
|
+
- **Left out of switching.** ✅ / 🚫 on a row includes or excludes that entry from
|
|
544
|
+
automatic switching and from the notice's switch buttons. A connected
|
|
545
|
+
provider (say OpenAI on OpenCode) can stay usable by hand through `/model`
|
|
546
|
+
while the bot never moves a limited topic onto it. With an EMPTY chain the
|
|
547
|
+
bot still ranks the other signed-in Claude accounts by headroom; once the
|
|
548
|
+
chain has entries, only its ✅ entries count — all of them left out means
|
|
549
|
+
no switch, the wait stands.
|
|
550
|
+
- **Entries.** A Claude account profile (`/accounts`) with an optional model
|
|
551
|
+
(`fable`, `opus`, `sonnet`, `haiku`; «keep the topic's model» otherwise), or
|
|
552
|
+
an OpenCode provider with a model (`openai/gpt-5`, `google/gemini-2.5-pro`,
|
|
553
|
+
…). Only what is actually connected is offered: the signed-in profiles, and
|
|
554
|
+
the providers the OpenCode server is authenticated for (its live catalog).
|
|
555
|
+
- **Drafting.** «🔄 Fill from connected» (or `/limits rebuild`) writes a draft from what
|
|
556
|
+
is signed in: the Claude accounts in their `/accounts` order (keeping the
|
|
557
|
+
topic's model), then the OpenCode models topics picked recently, then every
|
|
558
|
+
other provider's strongest model; an account or provider you had left out of
|
|
559
|
+
switching (🚫) stays left out. Tap an entry to move it (⬆️ Up / ⬇️ Down),
|
|
560
|
+
include or leave it out, or remove it; add with «➕ Add» (pick the account or
|
|
561
|
+
provider, then the model). Editing works from **every** topic (it is one
|
|
562
|
+
instance-wide list); a topic also sees ✓ on the entry it runs on now.
|
|
563
|
+
- **On a limit** the bot marks the exhausted entry limited until its window
|
|
564
|
+
resets (the reset the error names, else the account's session window, else
|
|
565
|
+
an hour), skips entries that are limited, not signed in or no longer offered,
|
|
566
|
+
and takes the first remaining one. A topic whose account or model was picked
|
|
567
|
+
by hand (`/accounts`, `/model`) is left alone until it hits its own limit —
|
|
568
|
+
then the chain decides, from the top. The «🔁 Auto switch»
|
|
569
|
+
setting (auto switch to a fallback model) applies: OFF (the default) puts «🔁 Switch to …» buttons on the
|
|
570
|
+
limit notice, ON switches by itself. No entry available → the wait
|
|
571
|
+
(when «⏳ Wait for reset» is ON) — **for the entry that
|
|
572
|
+
comes back first**: when every enabled entry, the topic's current one
|
|
573
|
+
included, is limited, the armed wait is re-aimed at the entry whose limit
|
|
574
|
+
resets EARLIEST (the notice says which model the topic will continue on and
|
|
575
|
+
when, also with auto switch OFF). The target rides in the persisted retry
|
|
576
|
+
record, so a restart keeps it; when the timer fires the topic is moved there
|
|
577
|
+
first (a context bridge across backends), then the usual continue prompt
|
|
578
|
+
follows. If the current entry resets first (or within a minute of the first),
|
|
579
|
+
nothing changes.
|
|
580
|
+
- **Within a backend** the conversation is kept: Claude account → account keeps
|
|
581
|
+
the transcript (`--resume` under the other account), OpenCode provider →
|
|
582
|
+
provider keeps the session and changes the model. **Across backends**
|
|
583
|
+
(Claude ↔ OpenCode) the topic's agent changes: the old session is stopped
|
|
584
|
+
and its id parked, the new one is started (or resumed, when the topic ran on
|
|
585
|
+
that backend before) and its first prompt is a **context bridge** — why it
|
|
586
|
+
takes over, the previous agent's last turns verbatim, and the instruction to
|
|
587
|
+
check the project state (git status / diff / log) before carrying on and to
|
|
588
|
+
report in one short message what the task is, what is done and what remains.
|
|
589
|
+
A later `/claude` or `/opencode` returns to the parked conversation; `/new`
|
|
590
|
+
and `/quit` release it as usual.
|
|
591
|
+
- The topic is **never moved back by itself** when the exhausted entry resets
|
|
592
|
+
— the switch notice names the reset time; switch back by hand (`/accounts`,
|
|
593
|
+
`/model`, `/claude`, `/opencode`).
|
|
594
|
+
|
|
452
595
|
## Scheduler (`/schedule`)
|
|
453
596
|
|
|
454
597
|
A topic can have scheduled prompts: at fire time the bot posts the prompt
|
|
@@ -677,8 +820,9 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
677
820
|
reads the issue's text as information, never as instructions.
|
|
678
821
|
- **The agent gets the whole issue.** Every request's prompt carries the issue's fields, the full description,
|
|
679
822
|
its sub-tasks or an epic's children, links and remote links, an attachment list and ALL comments (oldest
|
|
680
|
-
first, restricted ones marked)
|
|
681
|
-
|
|
823
|
+
first, restricted ones marked) — with a trusted group, minus what outsiders wrote (see below). A screenshot
|
|
824
|
+
or video pasted into the description or a comment shows up as a placeholder where it sat, naming its
|
|
825
|
+
attachment. Nothing is cut: a comment over 10 000 characters, or any text
|
|
682
826
|
that would not fit the prompt, is written whole to a file in the conversation's folder under `DATA_DIR/files`
|
|
683
827
|
and the prompt says where. A later hand-over to the same conversation carries only what changed since the
|
|
684
828
|
agent's last prompt (new and edited comments, deleted ones named, the rest listed as unchanged); a fresh
|
|
@@ -690,11 +834,22 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
690
834
|
already finished the first, a short pointer to that answer).
|
|
691
835
|
- **Budget.** An issue handed over more than `runBudgetPer24h` times in 24 hours is handed back with a notice
|
|
692
836
|
and opens no request.
|
|
837
|
+
- **Who can steer it.** With `trustedGroup` (see Setup) only the members of ONE Jira group, the AI account and
|
|
838
|
+
Jira's apps and automations count. A hand-over by anyone else — another person, a service-desk customer —
|
|
839
|
+
opens no request: one notice on the issue names the group and the issue goes back to that person. Text
|
|
840
|
+
written or edited by anyone else (a comment, the description, the summary, labels and extra fields, a
|
|
841
|
+
file's name and content) is replaced in the prompt by a `[withheld: …]` marker, so the agent knows there
|
|
842
|
+
is something and can ask its requester. Without `trustedGroup` everyone who can edit or comment steers the
|
|
843
|
+
agent, and the instance logs one line saying so.
|
|
693
844
|
|
|
694
845
|
### Setup
|
|
695
846
|
|
|
696
847
|
1. Create a Jira account for the AI (its API token is the instance's only secret) and note its account id.
|
|
697
|
-
2.
|
|
848
|
+
2. Recommended: create or choose a Jira group of the people whose words may steer the AI (for example
|
|
849
|
+
`ai-trusted`), and give the AI account the *Browse users and groups* global permission so that it can read
|
|
850
|
+
the group. Then the agent reads only the text and files of its members and of Jira's apps and automations,
|
|
851
|
+
and only their hand-overs start it.
|
|
852
|
+
3. An instance of its own: a `DATA_DIR`, a `WORK_ROOT` with one folder per project, a private tmux server, and
|
|
698
853
|
an env file that is the ONLY configuration it reads:
|
|
699
854
|
|
|
700
855
|
```bash
|
|
@@ -707,7 +862,7 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
707
862
|
JIRA_AI_API_TOKEN=... # referenced by jira.json below, never written there
|
|
708
863
|
```
|
|
709
864
|
|
|
710
|
-
|
|
865
|
+
4. `DATA_DIR/jira.json` — the allowlist, the trusted group and the credentials (`${VAR}` expands from the env file; an unknown
|
|
711
866
|
key is an error):
|
|
712
867
|
|
|
713
868
|
```json
|
|
@@ -719,6 +874,7 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
719
874
|
"projects": {
|
|
720
875
|
"PROJ": { "folder": "proj", "triggerStatuses": ["In Progress"], "extraFields": ["customfield_10042"] }
|
|
721
876
|
},
|
|
877
|
+
"trustedGroup": "ai-trusted",
|
|
722
878
|
"pollIntervalSeconds": 90,
|
|
723
879
|
"runBudgetPer24h": 5,
|
|
724
880
|
"model": "opus",
|
|
@@ -726,9 +882,23 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
726
882
|
}
|
|
727
883
|
```
|
|
728
884
|
|
|
885
|
+
`trustedGroup` (optional, but without it everyone who can edit or comment steers the agent) is the group's
|
|
886
|
+
NAME — one group per instance; a team with several trust circles runs a second instance. The instance
|
|
887
|
+
resolves it to the group's id at start, so renaming the group while it runs keeps working, and reads its
|
|
888
|
+
members again whenever its last read is older than 5 minutes: a removed member loses the AI's trust within
|
|
889
|
+
that time. List only projects where only your team can write, and where no automation acts on text or
|
|
890
|
+
actions from outside it — an e-mail handler, a portal form, a copy from another project, a rule that
|
|
891
|
+
hands an issue to the AI when someone outside the team acts: an app's or automation's text and hand-over
|
|
892
|
+
are trusted, so such a rule brings that outside text, or that person's hand-over, to the agent. Nor list a
|
|
893
|
+
project where anyone outside the team holds the *Edit all comments* permission: Jira Cloud keeps no history
|
|
894
|
+
of a comment's edits, so a comment is judged by its author and its LAST editor only — an outsider's edit of a
|
|
895
|
+
member's comment, followed by a member's own edit, reads as trusted.
|
|
896
|
+
|
|
729
897
|
`projects` maps each served project key to its folder under `WORK_ROOT` and the status names in which an
|
|
730
|
-
assigned issue is a request;
|
|
731
|
-
|
|
898
|
+
assigned issue is a request; the agent loads that folder's project memory (`CLAUDE.md`, `.claude/`, … in it
|
|
899
|
+
and in every parent) like any Claude Code session, while your user-level Claude setup stays out of its
|
|
900
|
+
sessions — except that for a folder under HOME that walk reads `~/.claude/CLAUDE.md` back in.
|
|
901
|
+
`pollIntervalSeconds` is 10–600 (default 90);
|
|
732
902
|
`runBudgetPer24h` defaults to 5; `model` and `effort` set the sessions' Claude model and reasoning effort
|
|
733
903
|
(optional; absent → `opus` and `high`, either key overrides only its own default). `extraFields` (optional,
|
|
734
904
|
none by default) names fields by id (`customfield_…`, or a system one like `duedate`) the agent should see next to the standard
|
|
@@ -737,7 +907,7 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
737
907
|
idles) or `claude-per-turn` (stopped after every answer); either way the issue's conversation sleeps between
|
|
738
908
|
requests and the next request resumes it.
|
|
739
909
|
|
|
740
|
-
|
|
910
|
+
5. Start it with a clean environment, so nothing of the calling shell reaches it:
|
|
741
911
|
|
|
742
912
|
```bash
|
|
743
913
|
scripts/run-isolated.sh /path/to/jira-instance.env
|
|
@@ -745,7 +915,8 @@ a person assigns an issue to the AI account (in a trigger status)
|
|
|
745
915
|
|
|
746
916
|
The start refuses a missing `ENV_FILE`, `TMUX_SOCKET_NAME` or `jira.json`, an `OPENCODE_URL` on the default
|
|
747
917
|
port, a `TELEGRAM_BOT_TOKEN` or any `ATLASSIAN_*` variable when Telegram is off, a token that belongs to
|
|
748
|
-
another account, an unknown project or status,
|
|
918
|
+
another account, an unknown project or status, a `trustedGroup` the site does not have or the AI account
|
|
919
|
+
may not read, and a `DATA_DIR` holding another surface's state. An unreachable Jira does not refuse the start —
|
|
749
920
|
polling backs off and resumes.
|
|
750
921
|
|
|
751
922
|
The agent sessions of a Jira instance run without the user-level Claude settings, hooks and skills, with the
|
|
@@ -769,7 +940,8 @@ agent even when two clients use the same JSON-RPC request id. It exposes:
|
|
|
769
940
|
- `schedule_create` / `schedule_list` / `schedule_cancel` — the agent-side
|
|
770
941
|
scheduling API behind `/schedule`;
|
|
771
942
|
- `jira_get_attachment` — Jira conversations only: saves the original of one attachment of the conversation's
|
|
772
|
-
own issue (any size) and returns its path, so the agent can read an image or run `ffmpeg` on a video
|
|
943
|
+
own issue (any size) and returns its path, so the agent can read an image or run `ffmpeg` on a video (with a
|
|
944
|
+
trusted group, only a file uploaded by a trusted account);
|
|
773
945
|
- `compact_conversation` — lets the agent compact its OWN session when you ask it
|
|
774
946
|
to in plain words ("compact our conversation"). It arms the compaction and
|
|
775
947
|
returns immediately; the bot runs the real compaction the moment the current
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import type { AgentAdapter, AgentRuntimeInfo, AgentSession, ClaudeSurveyOption, DisplayPrefsReader, ReattachRecap, RecentTurn, ResumeSessionOptions, SeenWatermark, SeenWatermarkWriter, SendInputOptions, ThreadLocaleReader } from '../types';
|
|
3
3
|
import type { SessionKey } from '../sessionKey';
|
|
4
|
+
import type { ClaudeConfigDirReader } from './claudeConfigDir';
|
|
4
5
|
import { type ToolResultKind } from '../utils/claudeScrapeShapes';
|
|
5
6
|
import { type SerialQueue } from '../utils/serialQueue';
|
|
6
7
|
import { tmuxAsync } from '../utils/tmuxExec';
|
|
@@ -22,6 +23,8 @@ export interface ClaudeSession {
|
|
|
22
23
|
sessionName: string;
|
|
23
24
|
/** UUID we pass via `--session-id` (or, on resume, via `--resume`). */
|
|
24
25
|
claudeSessionId: string;
|
|
26
|
+
/** The `CLAUDE_CONFIG_DIR` the pane's claude runs with (its account profile); `null` = the default profile. */
|
|
27
|
+
configDir: string | null;
|
|
25
28
|
queue: SerialQueue;
|
|
26
29
|
pollTimer: NodeJS.Timeout | null;
|
|
27
30
|
lastContent: string;
|
|
@@ -274,6 +277,12 @@ declare function parseTmuxSessionName(name: string): SessionKey | null;
|
|
|
274
277
|
* in that shell. Rejecting up front keeps the surface tight.
|
|
275
278
|
*/
|
|
276
279
|
export declare function checkIsValidUuid(s: string): boolean;
|
|
280
|
+
/**
|
|
281
|
+
* @description The `env CLAUDE_CONFIG_DIR=<dir>` argv prefix of a pane whose
|
|
282
|
+
* conversation uses a non-default account profile; empty for the default
|
|
283
|
+
* (`utils/claudeProfiles.ts`). Quoted with the rest of the argv by the caller.
|
|
284
|
+
*/
|
|
285
|
+
export declare function buildConfigDirEnvPrefix(configDir: string | null): string[];
|
|
277
286
|
/**
|
|
278
287
|
* @description Pure parser — pulls a `--session-id <uuid>` value out of a
|
|
279
288
|
* claude command line. Lives outside the adapter class so it can be
|
|
@@ -929,6 +938,12 @@ export declare class ClaudeCliAdapter extends EventEmitter implements AgentAdapt
|
|
|
929
938
|
* wired → reads fall back to all-fields-`minimal`.
|
|
930
939
|
*/
|
|
931
940
|
private displayPrefsReader;
|
|
941
|
+
private claudeConfigDirReader;
|
|
942
|
+
setClaudeConfigDirReader(reader: ClaudeConfigDirReader): void;
|
|
943
|
+
/** The config directory the conversation's next pane must start with (its account profile). */
|
|
944
|
+
private resolveConfigDir;
|
|
945
|
+
/** The `CLAUDE_CONFIG_DIR` the live pane runs with (`null` = default profile); `undefined` without a live session. */
|
|
946
|
+
getSessionClaudeConfigDir(key: SessionKey): string | null | undefined;
|
|
932
947
|
/** @description Inject the per-thread display-prefs reader (see the field's JSDoc). */
|
|
933
948
|
setDisplayPrefsReader(reader: DisplayPrefsReader): void;
|
|
934
949
|
/** Per-thread locale reader, injected at boot via `createAdapter.registerThreadLocaleReader`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeCliAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/claudeCliAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKtC,OAAO,KAAK,EACV,YAAY,EAEZ,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAElB,aAAa,EACb,UAAU,EAEV,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAYhD,OAAO,EAgBL,KAAK,cAAc,EACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAK3E,OAAO,EACL,SAAS,EAMV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAS3E,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,4BAA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= exports.getNewPaneContent = exports.cleanOutput = exp
|
|
|
37
37
|
exports.loadEffortPrefs = loadEffortPrefs;
|
|
38
38
|
exports.saveEffortPref = saveEffortPref;
|
|
39
39
|
exports.checkIsValidUuid = checkIsValidUuid;
|
|
40
|
+
exports.buildConfigDirEnvPrefix = buildConfigDirEnvPrefix;
|
|
40
41
|
exports.parseClaudeSessionIdFromCommand = parseClaudeSessionIdFromCommand;
|
|
41
42
|
exports.checkIsStatusOutput = checkIsStatusOutput;
|
|
42
43
|
exports.extractClaudeQuestion = extractClaudeQuestion;
|
|
@@ -90,6 +91,7 @@ const threadContextPreamble_1 = require("../threadContextPreamble");
|
|
|
90
91
|
const claudeSessionTitle_1 = require("../utils/claudeSessionTitle");
|
|
91
92
|
const resolveBinary_1 = require("../utils/resolveBinary");
|
|
92
93
|
const claudeAuthLogin_1 = require("../utils/claudeAuthLogin");
|
|
94
|
+
const claudeProfiles_1 = require("../utils/claudeProfiles");
|
|
93
95
|
const claudeScrapeShapes_1 = require("../utils/claudeScrapeShapes");
|
|
94
96
|
const progressLine_1 = require("../progressLine");
|
|
95
97
|
const serialQueue_1 = require("../utils/serialQueue");
|
|
@@ -253,6 +255,14 @@ function parseTmuxSessionName(name) {
|
|
|
253
255
|
function checkIsValidUuid(s) {
|
|
254
256
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s);
|
|
255
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* @description The `env CLAUDE_CONFIG_DIR=<dir>` argv prefix of a pane whose
|
|
260
|
+
* conversation uses a non-default account profile; empty for the default
|
|
261
|
+
* (`utils/claudeProfiles.ts`). Quoted with the rest of the argv by the caller.
|
|
262
|
+
*/
|
|
263
|
+
function buildConfigDirEnvPrefix(configDir) {
|
|
264
|
+
return configDir === null ? [] : ['env', `${claudeProfiles_1.claudeConfigDirVariableName}=${configDir}`];
|
|
265
|
+
}
|
|
256
266
|
/**
|
|
257
267
|
* @description Pure parser — pulls a `--session-id <uuid>` value out of a
|
|
258
268
|
* claude command line. Lives outside the adapter class so it can be
|
|
@@ -2495,6 +2505,19 @@ class ClaudeCliAdapter extends events_1.EventEmitter {
|
|
|
2495
2505
|
* wired → reads fall back to all-fields-`minimal`.
|
|
2496
2506
|
*/
|
|
2497
2507
|
displayPrefsReader = null;
|
|
2508
|
+
claudeConfigDirReader = null;
|
|
2509
|
+
setClaudeConfigDirReader(reader) {
|
|
2510
|
+
this.claudeConfigDirReader = reader;
|
|
2511
|
+
}
|
|
2512
|
+
/** The config directory the conversation's next pane must start with (its account profile). */
|
|
2513
|
+
resolveConfigDir(key) {
|
|
2514
|
+
return this.claudeConfigDirReader?.(key) ?? null;
|
|
2515
|
+
}
|
|
2516
|
+
/** The `CLAUDE_CONFIG_DIR` the live pane runs with (`null` = default profile); `undefined` without a live session. */
|
|
2517
|
+
getSessionClaudeConfigDir(key) {
|
|
2518
|
+
const session = this.sessions.get((0, sessionKey_1.keyToString)(key));
|
|
2519
|
+
return session?.isActive ? session.configDir : undefined;
|
|
2520
|
+
}
|
|
2498
2521
|
/** @description Inject the per-thread display-prefs reader (see the field's JSDoc). */
|
|
2499
2522
|
setDisplayPrefsReader(reader) {
|
|
2500
2523
|
this.displayPrefsReader = reader;
|
|
@@ -2844,7 +2867,11 @@ class ClaudeCliAdapter extends events_1.EventEmitter {
|
|
|
2844
2867
|
// The `--settings` file carries the PreCompact hook that gives an
|
|
2845
2868
|
// overflow-triggered compaction the bot's summary guidance.
|
|
2846
2869
|
const mcpFlagsArr = await (0, mcpConfig_1.prepareMcpFlags)({ key, dataDir: (0, state_1.resolveDataDir)() });
|
|
2870
|
+
const configDir = this.resolveConfigDir(key);
|
|
2847
2871
|
const claudeArgv = [
|
|
2872
|
+
// A non-default account profile: `env CLAUDE_CONFIG_DIR=<dir>` in front (the pane's shell
|
|
2873
|
+
// runs it, so a child claude the agent starts inherits the same account).
|
|
2874
|
+
...buildConfigDirEnvPrefix(configDir),
|
|
2848
2875
|
claudePath,
|
|
2849
2876
|
// Followed by an option on purpose: `--disallowedTools` takes several values.
|
|
2850
2877
|
...(0, claudePlatformFlags_1.getClaudePlatformFlags)(key),
|
|
@@ -2877,6 +2904,7 @@ class ClaudeCliAdapter extends events_1.EventEmitter {
|
|
|
2877
2904
|
workDir,
|
|
2878
2905
|
sessionName,
|
|
2879
2906
|
claudeSessionId,
|
|
2907
|
+
configDir,
|
|
2880
2908
|
isActive: true,
|
|
2881
2909
|
handledAutoEnter: false,
|
|
2882
2910
|
handledAutoAccept: false,
|
|
@@ -3439,7 +3467,9 @@ class ClaudeCliAdapter extends events_1.EventEmitter {
|
|
|
3439
3467
|
// fresh one would (plan §19). Argv-style shell-quoting mirrors
|
|
3440
3468
|
// `startSession` (audit S1).
|
|
3441
3469
|
const mcpFlagsArr = await (0, mcpConfig_1.prepareMcpFlags)({ key, dataDir: (0, state_1.resolveDataDir)() });
|
|
3470
|
+
const configDir = this.resolveConfigDir(key);
|
|
3442
3471
|
const claudeArgv = [
|
|
3472
|
+
...buildConfigDirEnvPrefix(configDir),
|
|
3443
3473
|
claudePath,
|
|
3444
3474
|
// Followed by an option on purpose: `--disallowedTools` takes several values.
|
|
3445
3475
|
...(0, claudePlatformFlags_1.getClaudePlatformFlags)(key),
|
|
@@ -3463,6 +3493,7 @@ class ClaudeCliAdapter extends events_1.EventEmitter {
|
|
|
3463
3493
|
workDir,
|
|
3464
3494
|
sessionName,
|
|
3465
3495
|
claudeSessionId: sessionId,
|
|
3496
|
+
configDir,
|
|
3466
3497
|
isActive: true,
|
|
3467
3498
|
handledAutoEnter: false,
|
|
3468
3499
|
handledAutoAccept: false,
|
|
@@ -3602,12 +3633,16 @@ class ClaudeCliAdapter extends events_1.EventEmitter {
|
|
|
3602
3633
|
console.log(`[Claude] adopt: already tracking ${k}, skipping`);
|
|
3603
3634
|
return true;
|
|
3604
3635
|
}
|
|
3605
|
-
|
|
3636
|
+
// The account the surviving pane runs on is in its own start command; the bot compares it with the topic's pick.
|
|
3637
|
+
const startCommand = await (0, tmuxExec_1.tmuxAsync)('display-message', '-p', '-t', (0, tmuxExec_1.getTmuxPaneTarget)(sessionName), '#{pane_start_command}');
|
|
3638
|
+
const configDir = (0, claudeProfiles_1.parseClaudeConfigDirFromCommand)(startCommand ?? '');
|
|
3639
|
+
console.log(`[Claude] adopt: re-attaching to ${sessionName} in ${workDir} (configDir=${configDir ?? 'default'})`);
|
|
3606
3640
|
const session = this.createSession({
|
|
3607
3641
|
key,
|
|
3608
3642
|
workDir,
|
|
3609
3643
|
sessionName,
|
|
3610
3644
|
claudeSessionId,
|
|
3645
|
+
configDir,
|
|
3611
3646
|
isActive: true,
|
|
3612
3647
|
handledAutoEnter: true, // don't try to auto-Enter on a session that's already past startup
|
|
3613
3648
|
handledAutoAccept: true, // same — bypass-permissions was accepted on the original launch
|