fix(ext): browser_subagent Allow 버튼 RPC 매핑 수정 — runExtensionCode payload 적용 (v0.5.1)
This commit is contained in:
@@ -47,6 +47,12 @@
|
||||
- **주의**: JS에서 **string/number는 프리미티브라 참조 전달 불가** — 객체 속성을 공유하려면 getter 함수나 객체 래퍼 사용 필수
|
||||
- **Vikunja**: #411, #410
|
||||
|
||||
### [2026-03-19] browser_subagent RPC 매핑 — 잘못된 interactionPayload
|
||||
- **증상**: 서브 에이전트의 "Allow" (execute JavaScript on localhost) 버튼이 자동 승인되지 않음
|
||||
- **원인**: `step-probe.ts`에서 `browser_subagent` toolName이 분류 없이 raw toolName으로 전달 → `approval-handler.ts`의 RPC 매핑에서 `runExtensionCode`가 아닌 default `runCommand` payload로 전송됨
|
||||
- **해결** (v0.5.1): `step-probe.ts`에 `browser_subagent`/`open_browser_url` 분류 추가 + `approval-handler.ts` L384에 `browser_subagent` 조건 추가
|
||||
- **주의**: 새 tool type 추가 시 반드시 step-probe 분류 + approval-handler RPC 매핑 + observer-script PATS 3곳 모두 확인
|
||||
|
||||
---
|
||||
|
||||
> [!NOTE]
|
||||
|
||||
@@ -17,10 +17,8 @@ ACTIVE_TIMEOUT_SECONDS=300
|
||||
# Watcher Settings
|
||||
DEBOUNCE_SECONDS=2
|
||||
|
||||
# Bot mode: 'local' (default, file-based) or 'gateway' (서버 Docker)
|
||||
# Bot mode: 'local' (default, file-based) or 'gateway' (서버 Docker + WS Hub)
|
||||
BOT_MODE=local
|
||||
# Remote bridge URL (only used when BOT_MODE=remote)
|
||||
REMOTE_BRIDGE_URL=
|
||||
|
||||
# Gateway API Key (보안)
|
||||
# 서버와 Collector에 동일한 키를 설정하세요
|
||||
|
||||
5
docs/devlog/2026-03-19.md
Normal file
5
docs/devlog/2026-03-19.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# 2026-03-19 Devlog
|
||||
|
||||
| # | 시간 | 작업 | 커밋 | 상태 |
|
||||
|---|------|------|------|------|
|
||||
| 1 | 07:30 | v0.5.0 이후 이슈 조사 — 외부 네트워크(서버 정상 확인) + Allow 버튼 RPC 수정 | `` | ✅ |
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "gravity-bridge",
|
||||
"displayName": "Gravity Bridge",
|
||||
"description": "Antigravity ↔ Discord 브리지 연동 확장",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"publisher": "variet",
|
||||
"engines": {
|
||||
"vscode": "^1.100.0"
|
||||
|
||||
@@ -381,7 +381,7 @@ export async function tryApprovalStrategies(approved: boolean, sessionId: string
|
||||
interactionPayload = { readUrlContent: { confirm: true } };
|
||||
} else if (typeLower.includes('mcp')) {
|
||||
interactionPayload = { mcpTool: { confirm: true } };
|
||||
} else if (typeLower.includes('invoke_subagent') || typeLower.includes('extension_code')) {
|
||||
} else if (typeLower.includes('invoke_subagent') || typeLower.includes('extension_code') || typeLower.includes('browser_subagent')) {
|
||||
interactionPayload = { runExtensionCode: { confirm: true } };
|
||||
} else if (typeLower.includes('file_permission')) {
|
||||
const scope = typeLower.includes('conversation') ? 2 : 1;
|
||||
|
||||
@@ -480,7 +480,8 @@ function setupMonitor() {
|
||||
description: `Step #${actualIndex} (${(oStep.type || '').replace('CORTEX_STEP_TYPE_', '')})`,
|
||||
step_type: ['view_file', 'list_dir', 'find_by_name', 'read_file', 'grep_search'].includes(toolName) ? 'file_permission'
|
||||
: ['write_to_file', 'replace_file_content', 'multi_replace_file_content'].includes(toolName) ? 'code_edit'
|
||||
: toolName,
|
||||
: ['browser_subagent', 'open_browser_url'].includes(toolName) ? 'browser_subagent'
|
||||
: toolName,
|
||||
step_index: actualIndex,
|
||||
source: 'step_probe_offset',
|
||||
});
|
||||
@@ -546,7 +547,8 @@ function setupMonitor() {
|
||||
description,
|
||||
step_type: ['view_file', 'list_dir', 'find_by_name', 'read_file', 'grep_search'].includes(toolName) ? 'file_permission'
|
||||
: ['write_to_file', 'replace_file_content', 'multi_replace_file_content'].includes(toolName) ? 'code_edit'
|
||||
: toolName,
|
||||
: ['browser_subagent', 'open_browser_url'].includes(toolName) ? 'browser_subagent'
|
||||
: toolName,
|
||||
step_index: si,
|
||||
source: 'step_probe',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user