feat(model): add sonnet 4.6 canonical selection - #5
Open
artemgetmann wants to merge 10 commits into
Open
Conversation
- what: switched to single-preview message edits, lowered stream throttle defaults, added streaming diagnostics, and added synthetic progressive tail updates for single-block SDK responses. - why: real Claude runs often return one final text block, which looked like no streaming in Telegram even for long replies. - files: src/handlers/streaming.ts, src/session.ts, src/config.ts, .env.example, README.md, CLAUDE.md. - risk: synthetic fallback adds a short post-generation animation delay on long responses and increases edit frequency; tuned via env vars and debug logs for rollback.
- what: integrated Codex SDK session flow, added runtime model switching (/model + /assistant), short Claude model aliases (opus 4.6 / sonnet 4.5), and a new /policy command that reports sandbox/approval/allowed paths. - why: provide full Telegram-side control over assistant/runtime behavior while keeping safety settings inspectable and reducing model command friction. - files: updated src/session.ts, src/config.ts, src/security.ts, src/handlers/commands.ts, src/index.ts, src/handlers/index.ts, src/types.ts, package.json, bun.lock, README.md, and .env.example. - risk: medium; large multi-file behavioral change across routing/safety/runtime config, mitigated with typecheck and targeted runtime probes (model parsing, sandbox behavior, home-dir write checks).
- what: add CLAUDE_REASONING_EFFORT (default high), expose Claude runtime effort in /policy, and implement ALLOWED_PATHS base/extra/remove composition with ~/.codex included in defaults. - why: align runtime behavior with desired Claude-first reasoning and make path access easy to tighten/expand without rewriting full allowlists. - files: .env.example, README.md, src/config.ts, src/handlers/commands.ts, src/session.ts. - risk: higher Claude effort increases latency/token usage by default; ALLOWED_PATHS behavior changed from simple override-only docs to composable controls (ALLOWED_PATHS override remains supported).
- what: add beginner macOS setup, common failure fixes, auth quick choices, and a real assistant workspace example layout. - why: reduce setup failures and make it explicit that AI_WORKING_DIR must be separate from the bot repository. - files: README.md - risk: low; docs-only change with no runtime behavior impact.
…m-bot-upstream-fork # Conflicts: # src/handlers/streaming.ts
- what: default session/restart/temp/audit files to AI_RUNTIME_DIR under AI_WORKING_DIR, create runtime directories at startup, and keep legacy /tmp session-file read fallback. - why: keep assistant context and bot runtime state in one workspace root for simpler setup, migration, and backup. - files: src/config.ts, src/session.ts, README.md, CLAUDE.md, .env.example, .gitignore. - risk: users relying on /tmp file locations may need env overrides; mitigated by backwards-compatible aliases and legacy session loading.
…fety prompt - what: switch default AI_RUNTIME_DIR to <AI_WORKING_DIR>/sessions, include resolved session/runtime/temp paths in SAFETY_PROMPT, and load legacy session history from both .runtime and /tmp. - why: make session state easier to find/manage, ensure the agent knows exact session location, and preserve resume continuity during runtime-dir migration. - files: src/config.ts, src/session.ts, .env.example, README.md. - risk: operators relying on hidden .runtime defaults may observe new default path; mitigated by env overrides and legacy session fallback.
- what: add sonnet 4.6 alias parsing/display support and align canonical model usage text in bot/help docs. - why: keep runtime behavior and user-facing documentation consistent after the latest model change. - files: README.md, src/handlers/commands.ts, src/session.ts. - risk: low; touches model selection mapping/messages, with sonnet 4.5 backward-compat mapping retained.
AKhozya
referenced
this pull request
in AKhozya/claude-telegram-bot
Jul 5, 2026
DAIJIROMATSUOKA
pushed a commit
to DAIJIROMATSUOKA/claude-telegram-bot
that referenced
this pull request
Jul 12, 2026
DAIJIROMATSUOKA
pushed a commit
to DAIJIROMATSUOKA/claude-telegram-bot
that referenced
this pull request
Jul 12, 2026
…-time-right化。MORNING-MASTER②削除7件を、静的import解析(前ticks)と別軸=各ファイルのbasenameをsrc全ts+非ts(json/js/sh/mjs)で全token grepし「動的import()/文字列path/barrel re-export/非ts config参照」まで含めて自ファイル以外の一致ゼロを確認。結果=7件すべて非self参照ゼロ=1894行削除GO。★最大risk#7 media-commands.ts(1132行)=index.tsは名前で一切参照せずbarrel経由もimage-handler.ts(live)を指す=先docの名前衝突ALIVE誤判定を独立に否定。★linuz90#3 council-config.ts=非self 0に加えCOUNCIL.yml不在+node_modules/js-yaml未installの二重死を確認(liveなら即クラッシュ)。★linuz90#5 contact-log.ts唯一hit=inbox-triage.test.ts:382のテスト説明文字列"contact-logged"の部分一致=偽陽性(import/require/from=0)。削除後の必須確認(typecheck→test→git rm個別指定)を朝実装者へ添付。read-only(basename全走査+実在確認)+新規doc1本+log追記の可逆commit(state配下のみ)。src編集/削除/typecheck変更/送信/settings/hook/launchd/gate緩和=ゼロ(実削除は朝DJ判定)。
DAIJIROMATSUOKA
pushed a commit
to DAIJIROMATSUOKA/claude-telegram-bot
that referenced
this pull request
Jul 12, 2026
…装のfirst-time-right化(②削除は前tickで2重verified済so①専任)。MORNING-MASTER①小fix 9件を、静的doc記述と別軸=各fixのlocationを実機srcで直読(grep+sed)し「行番号一致・fix記述一致・バグクラス完全性」まで独立照合。★9件すべて記載locationにコード実在+記述一致=削除/追加GO。★MED級実バグ4件は挙動まで追跡し全てreal確定=linuz90#5 text.ts:200-222 AI Session Bridge分岐がreturn(L221)にstopProcessing()を持たず他4分岐+fallthroughは全て呼ぶ=唯一の_isProcessingリーク/linuz90#6 streaming.ts segment_end editMessageText成功(L257-259)後にlastContent.set漏れ→done footer(L322)がstale読取=末尾巻戻し(streaming編集L203/208は都度set済so非対称)/linuz90#7 callback.ts:88 mt:restore execSync(timeout15s)がasync handler内=bot最大15sフリーズ/linuz90#8 file-handler.ts:69 sips Bun.spawnSyncがevent loopブロック。★バグクラス完全性=startProcessing()呼出は全src3箇所(text.ts:170+document.ts:240,385)を実機確定→document.ts2件はtry/finally構造soリーク不能=#5が唯一の漏れ=churn防止claim正しい。★朝への申し送り1点(soft cross-dependency)=#8の「hot-path exec 3サイトのみ」完全性claimは②削除依存(media-commands.ts:96,299 spawnSyncは削除で消える)+image-handler.ts:90 spawnSyncが①単独完了時に宙に浮く=呼出元live判定を1grepで確認要(live=同fix/dead=②削除待ち)。read-only(grep/sed=書込なし)+新規doc1本(VERIFY-fix-batch-2026-07-09-1945.md)+log追記のみ・可逆commit(state配下のみ)。src編集/削除/typecheck変更/送信/settings/hook/launchd/gate緩和=ゼロ(実装は朝DJ判断)。
DAIJIROMATSUOKA
pushed a commit
to DAIJIROMATSUOKA/claude-telegram-bot
that referenced
this pull request
Jul 12, 2026
…RNING-MASTER ①の linuz90#5(text.ts isProcessingリーク)/linuz90#6(streaming footer巻戻し)/linuz90#7(callback execSync)/linuz90#8(file-handler spawnSync) を working tree直読で機械照合=4件とも記述と一致=朝そのまま実装可。#8のみ実装nuance=Bun.spawn化時 proc.exitCode(async ではnull)→(await proc.exited)判定に書換え必須=単純 spawnSync→spawn 置換だと変換失敗に退行=VERIFY docに明記。read-only+新規doc1本+log追記の可逆commit(state配下のみ)。src編集/送信/削除/gate緩和=ゼロ。
DAIJIROMATSUOKA
pushed a commit
to DAIJIROMATSUOKA/claude-telegram-bot
that referenced
this pull request
Jul 12, 2026
…ER ① の全9件を live code 8ファイル直読で before→after まで確定(#1 council L243/295/336=生replace→()=>関数形/linuz90#2 security L174=includes("rm ")→/\brm\s//linuz90#3 jarvis-memory L420=per-row safe-parse/linuz90#4 snooze L259-269=per-item try-catch+成功実数log/linuz90#5 text L221=stopProcessing()漏れ1行/linuz90#6 streaming L259=lastContent.set漏れ1行(ユーザー可視MED)/linuz90#7 callback L88=execSync同期→execAsync await化(bot15秒フリーズMED・execSync使用はL12importとL88のみと機械確認)/linuz90#8 file-handler L69=spawnSync→spawn+await proc.exited nuance明記/linuz90#9 callback L188=Number.isNaN前置)。各fixに現状行・反転test・完全性根拠を併記。read-only+新規doc1本+log。src編集/送信/削除/gate緩和=ゼロ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sonnet 4.6alias parsing in model selectionsonnet 4.6in model display text/modelusage examples and README docs with latest model optionValidation
Notes
sonnet 4.5alias remains in place