Merge develop into beta (resolve FileChooserPayload conflict)#461
Merged
Conversation
…ion (#445) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…de) (#444) * fix(chat): always pass --model to claude CLI (default claude-sonnet-4-6) The claude CLI was spawned without a --model flag, so it fell back to the CLI default model (Fable 5). When Fable 5 is unavailable the CLI exits with code 1 and chat fails ("claude CLI がコード 1 で終了しました"). - add DEFAULT_CLAUDE_MODEL = 'claude-sonnet-4-6' (distinct from the API-path DEFAULT_ANTHROPIC_MODEL) - buildClaudeArgs always emits `--model <model>`, defaulting to DEFAULT_CLAUDE_MODEL so the CLI never falls back to an unavailable model - thread model through RunClaudeCodeOptions - read serverConfig.claudeCodeConfig.model in chat-executor so a configured model takes precedence (same pattern as allowedTools) - tests added for default and explicit model across all four units Note: model override via the config-sync path (applyProjectConfig / ProjectConfigResponse) and the api-side agent-project-sync mapping is not yet wired up; tracked as a follow-up. Default Sonnet works on all paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(chat): resolve model by priority (config > ANTHROPIC_MODEL env > default) Builds on the previous commit (always pinning --model) by honoring a configured model and the existing ANTHROPIC_MODEL env path. - determine --model by priority: serverConfig.claudeCodeConfig.model > ANTHROPIC_MODEL env > DEFAULT_CLAUDE_MODEL. Omit --model when env is set so the CLI honors ANTHROPIC_MODEL (CLAUDE_CODE#MODEL); fixes the regression where always pinning Sonnet overrode the env model path - propagate model through the config-sync path (ProjectConfigResponse, agent-config-sync applyProjectConfig) so the docker agent actually receives a configured model, not only the /config path - log the resolved model and its source (config/env/default) for observability; include model in refreshChatMode debug log - empty-string/whitespace guards on both config and env model values Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nNotFoundError helpers (#448) VsCodeTunnelWebSocket had 3 identical `this.send({ type: 'error', message: 'Missing sessionId' })` calls and 4 identical `this.send({ type: 'error', sessionId, message: 'Browser session not found' })` calls. Extract these into private helper methods consistent with the existing sendHttpResponse / sendChunkedHttpResponse helpers in the same class.
- Forward browser_mouse_down/move/up to Playwright page.mouse.down/move/up
for text selection and drag-and-drop on the live view canvas
- handleBrowserSetFile applies uploaded file content via
fileChooser.setFiles([{name,mimeType,buffer}]); enforces a 10MB limit and
reports setFiles failures back to the client
- Attach filechooser listeners to popup/new pages (context.on('page')),
including after device emulation recreates the context
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ction feat(browser): support mouse drag and native file upload in live view
…rame capture (#451) Increase JPEG quality from 50 to 70 to improve cursor and text selection visibility. Add 50ms debounced screenshot after keyboard input to deliver immediate frame updates. Elevate focus emulation failure log from debug to warn. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Bumps [@opentelemetry/core](https://github.com/open-telemetry/opentelemetry-js) to 2.8.0 and updates ancestor dependency [@sentry/node](https://github.com/getsentry/sentry-javascript). These dependencies need to be updated together. Updates `@opentelemetry/core` from 2.5.1 to 2.8.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-js/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-js@v2.5.1...v2.8.0) Updates `@sentry/node` from 10.40.0 to 10.58.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](getsentry/sentry-javascript@10.40.0...10.58.0) --- updated-dependencies: - dependency-name: "@opentelemetry/core" dependency-version: 2.8.0 dependency-type: indirect - dependency-name: "@sentry/node" dependency-version: 10.58.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [hono](https://github.com/honojs/hono) from 4.12.23 to 4.12.25. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](honojs/hono@v4.12.23...v4.12.25) --- updated-dependencies: - dependency-name: hono dependency-version: 4.12.25 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](form-data/form-data@v4.0.5...v4.0.6) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…ess runner Run generated Playwright scripts via `playwright test` subprocess instead of the regex-based custom parser. Adds playwright.config.ts and a new playwright-test-runner module that writes scripts to temp files, executes them, and parses the JSON reporter output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(e2e): replace custom script parser with @playwright/test subprocess runner
Bumps [ws](https://github.com/websockets/ws) from 8.20.1 to 8.21.0. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@8.20.1...8.21.0) --- updated-dependencies: - dependency-name: ws dependency-version: 8.21.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…a-4.0.6 chore(deps): bump form-data from 4.0.5 to 4.0.6
…2.25 chore(deps): bump hono from 4.12.23 to 4.12.25
chore(deps): bump ws from 8.20.1 to 8.21.0
…view file chooser Handle browser_set_file uploads from the web client in two ways: - files (base64): decode each into a uniquely-named temp file on the agent host, hand the temp paths to Playwright setFiles, then always clean up. Sanitizes file names, enforces a 10MB total cap, and cancels the chooser on any failure so the remote input is never left pending. - filePaths: resolve workspace-relative paths (e.g. repos/app.ts) from the file explorer against the agent workspace root before setFiles. Absolute paths inside the workspace pass through for backward compatibility. Hardening: wrap handleBrowserSetFile in an outermost try/catch and validate filePaths/files shapes so malformed payloads can no longer throw an unhandled rejection that leaves the remote <input type=file> stuck. Cancel the chooser on every rejection path (symmetric across both branches). Guard against symlink-based workspace escape by canonicalizing each path via fs.realpath and re-validating it against the workspace root. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…l-agent feat(browser): support workspace and local file uploads via the live-view file chooser
* fix(terminal): PTY grace を 60 分デフォルト・環境変数可変に変更 ( (#416) * fix(test): make i18n Intl locale detection test system-locale-independent (#407) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(terminal): PTY grace を 60 分デフォルト・環境変数可変に変更 (#406) - SESSION_GRACE_TIMEOUT_MS を 300 秒 → 3,600,000ms(60 分)に変更(API 側 TERMINAL_SESSION_GRACE_MS と同値運用前提) - AI_SUPPORT_AGENT_TERMINAL_GRACE_MS 環境変数で上書き可能(/^\d+$/ 厳格検証、不正値は stderr 警告の上デフォルト採用) - 起動時に一度だけ評価(反映にはプロセス再起動が必要) - 回帰テスト追加(カバレッジ閾値 95/90/95/95 クリア) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * test: improve coverage for node-paths, log-rotate-command, agent-runner, mcp/server (#410) - node-paths: Add tests for getNodePath() and platform-specific paths → 80%→100% stmts, 50%→100% fn - log-rotate-command: Cover parseSize Infinity overflow, SIGINT/SIGHUP handlers → 94.91%→100% stmts, 81.81%→100% fn - agent-runner: Cover stopWithWatcher via SIGINT signal → 82.35%→85.29% fn - mcp/server: Add catch callback coverage test (require.main block is structural dead code) Remaining uncovered: stream-parser ?? '' fallback (unreachable), server.ts require.main block (read-only in Jest), agent-runner enableTokenWatcher (never activated at call sites) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * test: auto-updater 100% coverage; mcp/server catch callback documented (#411) - auto-updater: Cover Docker exit path (lines 147-153), null-coalescing 'Unknown error' branch (line 108), UPDATE_BUSY_WAIT ternary (line 124), checking guard (line 38) → 93.47%→100% stmts/branches - mcp/server: Replace simulation test with behavior-verification; require.main block confirmed structurally unreachable in Jest (configurable:false, writable:false) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * test(agent): cover re-exported getCliEntryPoint and getNodePath in darwin/linux service specs (#412) Add tests for getCliEntryPoint and getNodePath re-exports in darwin-service and linux-service to achieve 100% function coverage on both files (was 91.3% and 92.59% respectively). Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(terminal): tmux 自動アタッチ — ウィンドウ=tmux セッションの 1:1 対応 (#413) - docker/Dockerfile: Layer 1 に tmux を追加 - terminal-session.ts: isTmuxAvailable() で tmux 存在確認、 shell-wrapper スクリプトで sandbox 制限を tmux 内の全ペインに継承、 ais-<sessionId> 命名で 1 ウィンドウ=1 tmux セッション対応、 killTmuxSession() でウィンドウ close / grace タイムアウト時に tmux セッションを完全削除 - terminal-tmux.spec.ts: 9 テスト追加(tmux 有無・セッション名・kill 動作・フォールバック) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(terminal): isTmuxAvailable を fs.accessSync ベースに変更 (#415) * fix(terminal): isTmuxAvailable を fs.accessSync ベースに変更 Docker コンテナ内の Node.js プロセスは shell init を経由して起動しないため process.env.PATH がインタラクティブシェルの PATH と異なる場合がある。 spawnSync('tmux', ['--version']) がバイナリを見つけられないと誤判定し 「tmux not found」でフォールバックしていた。 標準インストールパス(/usr/bin/tmux 等)を fs.accessSync で直接チェックし、 見つからない場合のみ PATH ベースの spawnSync フォールバックを実行する。 テストも jest.spyOn から jest.mock('fs') ベースに切り替え、 fs.accessSync を正しく制御できるようにした。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(terminal): terminal-session.spec の fs.accessSync をモックして CI 環境の tmux 検出を防ぐ CI (Ubuntu) 環境には /usr/bin/tmux が存在するため、accessSync を モックしないと既存の shell 直接起動テストが tmux 有効状態で実行され 失敗していた。jest.mock('fs') + beforeEach で accessSync を常に ENOENT にする。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): Claude model selection (default Sonnet, config/env overri… (#446) * refactor: extract nowIso() helper to centralize ISO timestamp generation (#445) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): Claude model selection (default Sonnet, config/env override) (#444) * fix(chat): always pass --model to claude CLI (default claude-sonnet-4-6) The claude CLI was spawned without a --model flag, so it fell back to the CLI default model (Fable 5). When Fable 5 is unavailable the CLI exits with code 1 and chat fails ("claude CLI がコード 1 で終了しました"). - add DEFAULT_CLAUDE_MODEL = 'claude-sonnet-4-6' (distinct from the API-path DEFAULT_ANTHROPIC_MODEL) - buildClaudeArgs always emits `--model <model>`, defaulting to DEFAULT_CLAUDE_MODEL so the CLI never falls back to an unavailable model - thread model through RunClaudeCodeOptions - read serverConfig.claudeCodeConfig.model in chat-executor so a configured model takes precedence (same pattern as allowedTools) - tests added for default and explicit model across all four units Note: model override via the config-sync path (applyProjectConfig / ProjectConfigResponse) and the api-side agent-project-sync mapping is not yet wired up; tracked as a follow-up. Default Sonnet works on all paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(chat): resolve model by priority (config > ANTHROPIC_MODEL env > default) Builds on the previous commit (always pinning --model) by honoring a configured model and the existing ANTHROPIC_MODEL env path. - determine --model by priority: serverConfig.claudeCodeConfig.model > ANTHROPIC_MODEL env > DEFAULT_CLAUDE_MODEL. Omit --model when env is set so the CLI honors ANTHROPIC_MODEL (CLAUDE_CODE#MODEL); fixes the regression where always pinning Sonnet overrode the env model path - propagate model through the config-sync path (ProjectConfigResponse, agent-config-sync applyProjectConfig) so the docker agent actually receives a configured model, not only the /config path - log the resolved model and its source (config/env/default) for observability; include model in refreshChatMode debug log - empty-string/whitespace guards on both config and env model values Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(browser): improve live view JPEG quality and add post-keystroke f… (#452) * refactor: extract nowIso() helper to centralize ISO timestamp generation (#445) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(chat): Claude model selection (default Sonnet, config/env override) (#444) * fix(chat): always pass --model to claude CLI (default claude-sonnet-4-6) The claude CLI was spawned without a --model flag, so it fell back to the CLI default model (Fable 5). When Fable 5 is unavailable the CLI exits with code 1 and chat fails ("claude CLI がコード 1 で終了しました"). - add DEFAULT_CLAUDE_MODEL = 'claude-sonnet-4-6' (distinct from the API-path DEFAULT_ANTHROPIC_MODEL) - buildClaudeArgs always emits `--model <model>`, defaulting to DEFAULT_CLAUDE_MODEL so the CLI never falls back to an unavailable model - thread model through RunClaudeCodeOptions - read serverConfig.claudeCodeConfig.model in chat-executor so a configured model takes precedence (same pattern as allowedTools) - tests added for default and explicit model across all four units Note: model override via the config-sync path (applyProjectConfig / ProjectConfigResponse) and the api-side agent-project-sync mapping is not yet wired up; tracked as a follow-up. Default Sonnet works on all paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(chat): resolve model by priority (config > ANTHROPIC_MODEL env > default) Builds on the previous commit (always pinning --model) by honoring a configured model and the existing ANTHROPIC_MODEL env path. - determine --model by priority: serverConfig.claudeCodeConfig.model > ANTHROPIC_MODEL env > DEFAULT_CLAUDE_MODEL. Omit --model when env is set so the CLI honors ANTHROPIC_MODEL (CLAUDE_CODE#MODEL); fixes the regression where always pinning Sonnet overrode the env model path - propagate model through the config-sync path (ProjectConfigResponse, agent-config-sync applyProjectConfig) so the docker agent actually receives a configured model, not only the /config path - log the resolved model and its source (config/env/default) for observability; include model in refreshChatMode debug log - empty-string/whitespace guards on both config and env model values Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(vscode): extract sendMissingSessionIdError/sendBrowserSessionNotFoundError helpers (#448) VsCodeTunnelWebSocket had 3 identical `this.send({ type: 'error', message: 'Missing sessionId' })` calls and 4 identical `this.send({ type: 'error', sessionId, message: 'Browser session not found' })` calls. Extract these into private helper methods consistent with the existing sendHttpResponse / sendChunkedHttpResponse helpers in the same class. * feat(browser): support mouse drag and native file upload in live view - Forward browser_mouse_down/move/up to Playwright page.mouse.down/move/up for text selection and drag-and-drop on the live view canvas - handleBrowserSetFile applies uploaded file content via fileChooser.setFiles([{name,mimeType,buffer}]); enforces a 10MB limit and reports setFiles failures back to the client - Attach filechooser listeners to popup/new pages (context.on('page')), including after device emulation recreates the context Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(browser): improve live view JPEG quality and add post-keystroke frame capture (#451) Increase JPEG quality from 50 to 70 to improve cursor and text selection visibility. Add 50ms debounced screenshot after keyboard input to deliver immediate frame updates. Elevate focus emulation failure log from debug to warn. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(deps): bump @opentelemetry/core and @sentry/node (#450) Bumps [@opentelemetry/core](https://github.com/open-telemetry/opentelemetry-js) to 2.8.0 and updates ancestor dependency [@sentry/node](https://github.com/getsentry/sentry-javascript). These dependencies need to be updated together. Updates `@opentelemetry/core` from 2.5.1 to 2.8.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-js/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-js@v2.5.1...v2.8.0) Updates `@sentry/node` from 10.40.0 to 10.58.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](getsentry/sentry-javascript@10.40.0...10.58.0) --- updated-dependencies: - dependency-name: "@opentelemetry/core" dependency-version: 2.8.0 dependency-type: indirect - dependency-name: "@sentry/node" dependency-version: 10.58.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Resolve conflicts in favour of develop: - FileChooserPayload stays as string[] (temp-dir approach with sanitizeUploadFileName) - vscode-tunnel-websocket uses safeFiles cast and temp dir - Includes @playwright/test dependency from develop Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dependency Update Test Results
This comment was automatically generated by the Dependency Update Test workflow. |
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
developandbetabranchesFileChooserPayloadconflict resolved in favour ofdevelop's implementation (string[]via temp dir withsanitizeUploadFileName()path-traversal defence)@playwright/testdependency,sendMissingSessionIdError/sendBrowserSessionNotFoundErrorhelpers) are includedConflict resolution
All conflicts resolved with
--theirs(develop version):src/mcp/tools/browser/browser-session.ts—FileChooserPayload = string[]src/vscode/vscode-tunnel-websocket.ts— temp dir approach +safeFilescast__tests__/mcp/tools/browser/browser-session.spec.ts— test forstring[]implementation__tests__/vscode/vscode-tunnel-websocket.spec.tspackage-lock.json— includes@playwright/testTest plan
npm run build— passesnpm test -- --coverage— 4338 tests passed, all thresholds met🤖 Generated with Claude Code