From 96009ad61a8c9dd29c9fcb8104c7111acedbb146 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:08:39 -0700 Subject: [PATCH 1/7] feat(connect): 'Work in my repo' choice for a confined workspace seat (TASK-705) Adds a Connect-page choice that adds the folder step to the listener command and offers the existing write/web opt-ins. Only the confined workspace trust is reachable: no skip-permissions or unconfined path. Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/i18n/locales/en.json | 9 ++- frontend/src/i18n/locales/zh-CN.json | 9 ++- .../V2AgentBYOListenSnippet.test.tsx | 43 ++++++++++++++ frontend/src/v2/components/V2AgentBYO.tsx | 56 ++++++++++++++++++- 4 files changed, 114 insertions(+), 3 deletions(-) diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index d0388f1422..3e25c2b9ec 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1750,7 +1750,14 @@ "unavailableClaudeLinux": "On Linux, Claude Code answers @mentions only in an invite-only pod, and this one isn’t. Its owner can switch it to Invite-only under “Who can join” in pod settings. Or connect Claude Code from your own sessions with the command below, or choose “Run it here” for a hosted agent.", "unavailableClaude": "Claude Code can’t answer @mentions from {{os}} yet: Commonly runs it in a sandbox, and on {{os}} that sandbox can’t run it. Connect Claude Code from your own sessions with the command below, or choose “Run it here” for a hosted agent.", "unavailableCodex": "The Codex CLI can’t answer @mentions from {{os}} yet. Choose “Run it here” for a hosted agent, or run the command on a Mac. Linux is not tested yet.", - "useDifferentRunner": "Use a different adapter" + "useDifferentRunner": "Use a different adapter", + "repo": { + "label": "Work in my repo", + "hint": "Runs in the folder you start it from, confined to that folder, in a pod that is private and invite-only. It can read the folder and nothing else on this computer.", + "write": "Let it edit files and run commands (--allow write)", + "web": "Let it fetch web pages (--allow web)", + "folder": "Either one lets it send what it reads off this computer, so grant them only in a pod you trust. Run the command from your project's folder, not your home folder." + } }, "mode": { "label": "Where should it run?", diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index f5ea3e5fe2..af39f4dd2a 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -1809,7 +1809,14 @@ "unavailableClaude": "Claude Code 在 {{os}} 上暂时不能回复 @提及:Commonly 要把它放进沙箱里运行,而 Commonly 用的沙箱在 {{os}} 上还做不到。你可以用下面的命令把 Commonly 的工具接进自己的 Claude Code 会话,或者选择“在这里运行”,改用托管智能体。", "unavailableCodex": "Codex CLI 在 {{os}} 上暂时不能回复 @提及。你可以选择“在这里运行”,改用托管智能体;也可以换到 Mac 机器上运行这条命令(Linux 尚未测试)。", "toolCodex": "Codex CLI", - "useDifferentRunner": "换一种适配器" + "useDifferentRunner": "换一种适配器", + "repo": { + "label": "在我的仓库里工作", + "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹,并且 Pod 必须是私密且仅限邀请的。它能读取这个文件夹,读不到这台电脑上的其他内容。", + "write": "允许它编辑文件、运行命令(--allow write)", + "web": "允许它抓取网页(--allow web)", + "folder": "无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。请在项目文件夹里运行命令,别在个人文件夹里。" + } }, "mode": { "label": "在哪里运行?", diff --git a/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx b/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx index 39e0126864..e0e1f01420 100644 --- a/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx +++ b/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx @@ -432,3 +432,46 @@ describe('BYO listener snippet', () => { }); }); }); + +// TASK-705: "Work in my repo" only ever adds a folder step and the two existing +// opt-ins to the same command. It has no path that skips the sandbox. +describe('BYO listener: Work in my repo', () => { + const PRIVATE_POD = { joinPolicy: 'invite-only', publicRead: false, communityListed: false }; + const MAC_UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)'; + const runLine = () => Array.from(document.querySelectorAll('.v2-byo__pre')) + .map((el) => el.textContent || '') + .find((txt) => /commonly agent run /.test(txt)); + + beforeEach(() => { + Object.defineProperty(window.navigator, 'userAgent', { value: MAC_UA, configurable: true }); + }); + + test('off by default: the command is unchanged and carries no --allow', async () => { + await issueToken(undefined, PRIVATE_POD); + expect(screen.getByTestId('byo-repo-toggle')).not.toBeChecked(); + expect(runLine()).not.toMatch(/--allow|cd ~/); + }); + + test('choosing it adds the folder step, and write/web add only their own --allow', async () => { + await issueToken(undefined, PRIVATE_POD); + fireEvent.click(screen.getByTestId('byo-repo-toggle')); + expect(runLine()).toMatch(/\ncd ~\/path\/to\/your-repo\ncommonly agent run \S+ --adapter claude$/); + fireEvent.click(screen.getByTestId('byo-repo-write')); + expect(runLine()).toMatch(/--adapter claude --allow write$/); + fireEvent.click(screen.getByTestId('byo-repo-web')); + expect(runLine()).toMatch(/--adapter claude --allow write,web$/); + expect(runLine()).not.toMatch(/dangerously|skip-permissions/); + }); + + test('not offered in a pod that is not confirmed private', async () => { + await issueToken(undefined, { joinPolicy: 'open', publicRead: false, communityListed: false }); + expect(screen.queryByTestId('byo-repo-choice')).toBeNull(); + expect(runLine()).not.toMatch(/--allow/); + }); + + test('not offered for Codex, where --allow does not apply', async () => { + await issueToken('codex', PRIVATE_POD); + expect(screen.queryByTestId('byo-repo-choice')).toBeNull(); + expect(runLine()).not.toMatch(/--allow/); + }); +}); diff --git a/frontend/src/v2/components/V2AgentBYO.tsx b/frontend/src/v2/components/V2AgentBYO.tsx index 8ea9548960..9a5e292a97 100644 --- a/frontend/src/v2/components/V2AgentBYO.tsx +++ b/frontend/src/v2/components/V2AgentBYO.tsx @@ -232,6 +232,23 @@ const V2AgentBYO: React.FC = () => { listenAdapter, pods.find((p) => p._id === (issued?.podId || podId)), ); + // TASK-705: "Work in my repo". The CLI already confines a seat to the folder it + // starts in when every pod is confirmed private (workspace trust: Seatbelt on + // a Mac, bwrap on Linux). This choice makes that explicit and carries the two + // opt-ins. There is no unconfined path: write and web only ever ride on + // `--allow`, and the CLI refuses them for a folder it will not confine. + const [workInRepo, setWorkInRepo] = useState(false); + const [allowWrite, setAllowWrite] = useState(false); + const [allowWeb, setAllowWeb] = useState(false); + const repoPod = pods.find((p) => p._id === (issued?.podId || podId)); + const repoChoiceAvailable = listenAdapter === 'claude' + && setupOs !== 'windows' + && podIsConfirmedPrivate(repoPod); + const repoActive = workInRepo && repoChoiceAvailable; + const allowFlag = repoActive + ? [allowWrite && 'write', allowWeb && 'web'].filter(Boolean).join(',') + : ''; + // Live listening verification (#887 class, second half). #888 made the // listening step legible; this makes it CHECKABLE — the page polls the // kernel until THIS agent's runtime token authenticates for the first time @@ -1061,7 +1078,7 @@ const V2AgentBYO: React.FC = () => { // EINVALIDTAGNAME "#" and installs nothing (ux-lead on #2104). The command // names itself; the body above the box says where to run it. const listenSnippet = issued - ? `${CLI_INSTALL_COMMAND}\nexport COMMONLY_API_URL=${apiUrl}\nexport COMMONLY_AGENT_TOKEN=${issued.token}\ncommonly agent run ${issued.agentName} --adapter ${listenAdapter}` + ? `${CLI_INSTALL_COMMAND}\nexport COMMONLY_API_URL=${apiUrl}\nexport COMMONLY_AGENT_TOKEN=${issued.token}\n${repoActive ? 'cd ~/path/to/your-repo\n' : ''}commonly agent run ${issued.agentName} --adapter ${listenAdapter}${allowFlag ? ` --allow ${allowFlag}` : ''}` : ''; const cursorSnippet = issued @@ -1684,6 +1701,43 @@ const V2AgentBYO: React.FC = () => { {t(setupOs === 'linux' ? 'agentByo.listen.reachClaudeLinux' : 'agentByo.listen.reachClaude', { name: issued.agentName })}

)} + {listenerAvailable && repoChoiceAvailable && ( +
+ +

{t('agentByo.listen.repo.hint')}

+ {workInRepo && ( + <> + + +

{t('agentByo.listen.repo.folder')}

+ + )} +
+ )} {listenerAvailable && listenAdapter === 'codex' && (

{t('agentByo.listen.reachCodex')} From a223dbbf782c9118c52cc78319ab1044937b2961 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:09:51 -0700 Subject: [PATCH 2/7] fix(connect): a failed cd stops the repo listener command (TASK-705) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx | 2 +- frontend/src/v2/components/V2AgentBYO.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx b/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx index e0e1f01420..a3364786ed 100644 --- a/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx +++ b/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx @@ -455,7 +455,7 @@ describe('BYO listener: Work in my repo', () => { test('choosing it adds the folder step, and write/web add only their own --allow', async () => { await issueToken(undefined, PRIVATE_POD); fireEvent.click(screen.getByTestId('byo-repo-toggle')); - expect(runLine()).toMatch(/\ncd ~\/path\/to\/your-repo\ncommonly agent run \S+ --adapter claude$/); + expect(runLine()).toMatch(/\ncd ~\/path\/to\/your-repo && commonly agent run \S+ --adapter claude$/); fireEvent.click(screen.getByTestId('byo-repo-write')); expect(runLine()).toMatch(/--adapter claude --allow write$/); fireEvent.click(screen.getByTestId('byo-repo-web')); diff --git a/frontend/src/v2/components/V2AgentBYO.tsx b/frontend/src/v2/components/V2AgentBYO.tsx index 9a5e292a97..c0904a9f62 100644 --- a/frontend/src/v2/components/V2AgentBYO.tsx +++ b/frontend/src/v2/components/V2AgentBYO.tsx @@ -1078,7 +1078,7 @@ const V2AgentBYO: React.FC = () => { // EINVALIDTAGNAME "#" and installs nothing (ux-lead on #2104). The command // names itself; the body above the box says where to run it. const listenSnippet = issued - ? `${CLI_INSTALL_COMMAND}\nexport COMMONLY_API_URL=${apiUrl}\nexport COMMONLY_AGENT_TOKEN=${issued.token}\n${repoActive ? 'cd ~/path/to/your-repo\n' : ''}commonly agent run ${issued.agentName} --adapter ${listenAdapter}${allowFlag ? ` --allow ${allowFlag}` : ''}` + ? `${CLI_INSTALL_COMMAND}\nexport COMMONLY_API_URL=${apiUrl}\nexport COMMONLY_AGENT_TOKEN=${issued.token}\n${repoActive ? 'cd ~/path/to/your-repo && ' : ''}commonly agent run ${issued.agentName} --adapter ${listenAdapter}${allowFlag ? ` --allow ${allowFlag}` : ''}` : ''; const cursorSnippet = issued From 050ea5f77356cf3fd97cca2c5a3a745b40cfe18f Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:11:45 -0700 Subject: [PATCH 3/7] =?UTF-8?q?fix(connect):=20zh-CN=20repo=20hint=20uses?= =?UTF-8?q?=20the=20glossary=20term=20=E9=82=80=E8=AF=B7=E5=88=B6=20(TASK-?= =?UTF-8?q?705)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/i18n/locales/zh-CN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index af39f4dd2a..32770d3a3b 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -1812,7 +1812,7 @@ "useDifferentRunner": "换一种适配器", "repo": { "label": "在我的仓库里工作", - "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹,并且 Pod 必须是私密且仅限邀请的。它能读取这个文件夹,读不到这台电脑上的其他内容。", + "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹,并且 Pod 必须是私密的邀请制 Pod。它能读取这个文件夹,读不到这台电脑上的其他内容。", "write": "允许它编辑文件、运行命令(--allow write)", "web": "允许它抓取网页(--allow web)", "folder": "无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。请在项目文件夹里运行命令,别在个人文件夹里。" From 45b2f811881b21a1fbf935e169aad0ab61d9d95d Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:31:56 -0700 Subject: [PATCH 4/7] fix(connect): repo choice resets per install, drops the cd placeholder, and says saved grants persist (TASK-705) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/i18n/locales/en.json | 5 +++-- frontend/src/i18n/locales/zh-CN.json | 5 +++-- .../src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx | 9 +++++---- frontend/src/v2/components/V2AgentBYO.tsx | 7 ++++++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 3e25c2b9ec..5ec8ae887f 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1753,10 +1753,11 @@ "useDifferentRunner": "Use a different adapter", "repo": { "label": "Work in my repo", - "hint": "Runs in the folder you start it from, confined to that folder, in a pod that is private and invite-only. It can read the folder and nothing else on this computer.", + "hint": "Runs in the folder you start it from, confined to that folder. Every pod this agent is in must be private and invite-only; if one is not, it starts in its own scratch folder instead and says why. It can read the folder and nothing else on this computer.", "write": "Let it edit files and run commands (--allow write)", "web": "Let it fetch web pages (--allow web)", - "folder": "Either one lets it send what it reads off this computer, so grant them only in a pod you trust. Run the command from your project's folder, not your home folder." + "folder": "Open your terminal in your project's folder (not your home folder) before you paste the command. Either one lets it send what it reads off this computer, so grant them only in a pod you trust.", + "saved": "Write and web are saved when the agent first starts, and unticking a box here does not remove them later. To change them: commonly agent detach --force, then run it again with the new choice." } }, "mode": { diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index 32770d3a3b..c6ac1bbc51 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -1812,10 +1812,11 @@ "useDifferentRunner": "换一种适配器", "repo": { "label": "在我的仓库里工作", - "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹,并且 Pod 必须是私密的邀请制 Pod。它能读取这个文件夹,读不到这台电脑上的其他内容。", + "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹。这个智能体所在的每个 Pod 都必须是私密的邀请制 Pod;只要有一个不是,它就改在自己的暂存文件夹里运行,并说明原因。它能读取这个文件夹,读不到这台电脑上的其他内容。", "write": "允许它编辑文件、运行命令(--allow write)", "web": "允许它抓取网页(--allow web)", - "folder": "无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。请在项目文件夹里运行命令,别在个人文件夹里。" + "folder": "粘贴命令之前,先在终端里打开你的项目文件夹(别在个人文件夹里)。无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。", + "saved": "写入和联网权限在智能体第一次启动时保存,之后在这里取消勾选并不会移除它们。要修改:先运行 commonly agent detach --force,再用新的选择重新运行。" } }, "mode": { diff --git a/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx b/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx index a3364786ed..dae9d81d8d 100644 --- a/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx +++ b/frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx @@ -449,18 +449,19 @@ describe('BYO listener: Work in my repo', () => { test('off by default: the command is unchanged and carries no --allow', async () => { await issueToken(undefined, PRIVATE_POD); expect(screen.getByTestId('byo-repo-toggle')).not.toBeChecked(); - expect(runLine()).not.toMatch(/--allow|cd ~/); + expect(runLine()).not.toMatch(/--allow|cd /); }); - test('choosing it adds the folder step, and write/web add only their own --allow', async () => { + test('choosing it adds no cd step (the note says to run from the project folder), and write/web add only their own --allow', async () => { await issueToken(undefined, PRIVATE_POD); fireEvent.click(screen.getByTestId('byo-repo-toggle')); - expect(runLine()).toMatch(/\ncd ~\/path\/to\/your-repo && commonly agent run \S+ --adapter claude$/); + expect(runLine()).toMatch(/commonly agent run \S+ --adapter claude$/); fireEvent.click(screen.getByTestId('byo-repo-write')); expect(runLine()).toMatch(/--adapter claude --allow write$/); fireEvent.click(screen.getByTestId('byo-repo-web')); expect(runLine()).toMatch(/--adapter claude --allow write,web$/); - expect(runLine()).not.toMatch(/dangerously|skip-permissions/); + expect(runLine()).not.toMatch(/dangerously|skip-permissions|cd /); + expect(screen.getByTestId('byo-repo-saved-note')).toHaveTextContent(/detach/); }); test('not offered in a pod that is not confirmed private', async () => { diff --git a/frontend/src/v2/components/V2AgentBYO.tsx b/frontend/src/v2/components/V2AgentBYO.tsx index c0904a9f62..e9d52eb4d8 100644 --- a/frontend/src/v2/components/V2AgentBYO.tsx +++ b/frontend/src/v2/components/V2AgentBYO.tsx @@ -240,6 +240,10 @@ const V2AgentBYO: React.FC = () => { const [workInRepo, setWorkInRepo] = useState(false); const [allowWrite, setAllowWrite] = useState(false); const [allowWeb, setAllowWeb] = useState(false); + // Each seat is its own opt-in: starting another install clears all three. + useEffect(() => { + if (!issued) { setWorkInRepo(false); setAllowWrite(false); setAllowWeb(false); } + }, [issued]); const repoPod = pods.find((p) => p._id === (issued?.podId || podId)); const repoChoiceAvailable = listenAdapter === 'claude' && setupOs !== 'windows' @@ -1078,7 +1082,7 @@ const V2AgentBYO: React.FC = () => { // EINVALIDTAGNAME "#" and installs nothing (ux-lead on #2104). The command // names itself; the body above the box says where to run it. const listenSnippet = issued - ? `${CLI_INSTALL_COMMAND}\nexport COMMONLY_API_URL=${apiUrl}\nexport COMMONLY_AGENT_TOKEN=${issued.token}\n${repoActive ? 'cd ~/path/to/your-repo && ' : ''}commonly agent run ${issued.agentName} --adapter ${listenAdapter}${allowFlag ? ` --allow ${allowFlag}` : ''}` + ? `${CLI_INSTALL_COMMAND}\nexport COMMONLY_API_URL=${apiUrl}\nexport COMMONLY_AGENT_TOKEN=${issued.token}\ncommonly agent run ${issued.agentName} --adapter ${listenAdapter}${allowFlag ? ` --allow ${allowFlag}` : ''}` : ''; const cursorSnippet = issued @@ -1734,6 +1738,7 @@ const V2AgentBYO: React.FC = () => { {' '}{t('agentByo.listen.repo.web')}

{t('agentByo.listen.repo.folder')}

+

{t('agentByo.listen.repo.saved')}

)} From 5597c46a279871645aeaebeb91fd05b1fc9183ee Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:32:45 -0700 Subject: [PATCH 5/7] fix(connect): repo hint says a non-private pod refuses when an option is ticked; reset keyed on the token (TASK-705) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/i18n/locales/en.json | 2 +- frontend/src/i18n/locales/zh-CN.json | 2 +- frontend/src/v2/components/V2AgentBYO.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 5ec8ae887f..9219926ba9 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1753,7 +1753,7 @@ "useDifferentRunner": "Use a different adapter", "repo": { "label": "Work in my repo", - "hint": "Runs in the folder you start it from, confined to that folder. Every pod this agent is in must be private and invite-only; if one is not, it starts in its own scratch folder instead and says why. It can read the folder and nothing else on this computer.", + "hint": "Runs in the folder you start it from, confined to that folder. Every pod this agent is in must be private and invite-only; if one is not, it will not read your folder. It uses its own scratch folder, or refuses to start if you ticked an option below. It can read the folder and nothing else on this computer.", "write": "Let it edit files and run commands (--allow write)", "web": "Let it fetch web pages (--allow web)", "folder": "Open your terminal in your project's folder (not your home folder) before you paste the command. Either one lets it send what it reads off this computer, so grant them only in a pod you trust.", diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index c6ac1bbc51..be4b59713e 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -1812,7 +1812,7 @@ "useDifferentRunner": "换一种适配器", "repo": { "label": "在我的仓库里工作", - "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹。这个智能体所在的每个 Pod 都必须是私密的邀请制 Pod;只要有一个不是,它就改在自己的暂存文件夹里运行,并说明原因。它能读取这个文件夹,读不到这台电脑上的其他内容。", + "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹。这个智能体所在的每个 Pod 都必须是私密的邀请制 Pod;只要有一个不是,它就不会读取你的文件夹,而是改在自己的暂存文件夹里运行;如果你勾选了下面的选项,它会拒绝启动。它能读取这个文件夹,读不到这台电脑上的其他内容。", "write": "允许它编辑文件、运行命令(--allow write)", "web": "允许它抓取网页(--allow web)", "folder": "粘贴命令之前,先在终端里打开你的项目文件夹(别在个人文件夹里)。无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。", diff --git a/frontend/src/v2/components/V2AgentBYO.tsx b/frontend/src/v2/components/V2AgentBYO.tsx index e9d52eb4d8..a2a7ea5fde 100644 --- a/frontend/src/v2/components/V2AgentBYO.tsx +++ b/frontend/src/v2/components/V2AgentBYO.tsx @@ -242,8 +242,8 @@ const V2AgentBYO: React.FC = () => { const [allowWeb, setAllowWeb] = useState(false); // Each seat is its own opt-in: starting another install clears all three. useEffect(() => { - if (!issued) { setWorkInRepo(false); setAllowWrite(false); setAllowWeb(false); } - }, [issued]); + setWorkInRepo(false); setAllowWrite(false); setAllowWeb(false); + }, [issued?.token]); const repoPod = pods.find((p) => p._id === (issued?.podId || podId)); const repoChoiceAvailable = listenAdapter === 'claude' && setupOs !== 'windows' From 6596b4c5d803d0cab4922f4c2d55ca88881aa39b Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:42:18 -0700 Subject: [PATCH 6/7] fix(connect): the saved-grants note says to stop the running listener first (TASK-705) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/i18n/locales/en.json | 2 +- frontend/src/i18n/locales/zh-CN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 9219926ba9..285473ad8e 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1757,7 +1757,7 @@ "write": "Let it edit files and run commands (--allow write)", "web": "Let it fetch web pages (--allow web)", "folder": "Open your terminal in your project's folder (not your home folder) before you paste the command. Either one lets it send what it reads off this computer, so grant them only in a pod you trust.", - "saved": "Write and web are saved when the agent first starts, and unticking a box here does not remove them later. To change them: commonly agent detach --force, then run it again with the new choice." + "saved": "Write and web are saved when the agent first starts, and unticking a box here does not remove them later. Stop the running listener first. Then change them with: commonly agent detach --force, followed by a new run with the new choice." } }, "mode": { diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index be4b59713e..f35b83e1b7 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -1816,7 +1816,7 @@ "write": "允许它编辑文件、运行命令(--allow write)", "web": "允许它抓取网页(--allow web)", "folder": "粘贴命令之前,先在终端里打开你的项目文件夹(别在个人文件夹里)。无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。", - "saved": "写入和联网权限在智能体第一次启动时保存,之后在这里取消勾选并不会移除它们。要修改:先运行 commonly agent detach --force,再用新的选择重新运行。" + "saved": "写入和联网权限在智能体第一次启动时保存,之后在这里取消勾选并不会移除它们。修改前请先停止正在运行的监听器。然后运行 commonly agent detach --force,再用新的选择重新运行。" } }, "mode": { From 2baa923bd846e83ef35e3f9720dc15041b762bb0 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:55:19 -0700 Subject: [PATCH 7/7] fix(connect): the repo hint says the folder-only read holds without write (TASK-705) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- frontend/src/i18n/locales/en.json | 2 +- frontend/src/i18n/locales/zh-CN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 285473ad8e..b737bdd29f 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1753,7 +1753,7 @@ "useDifferentRunner": "Use a different adapter", "repo": { "label": "Work in my repo", - "hint": "Runs in the folder you start it from, confined to that folder. Every pod this agent is in must be private and invite-only; if one is not, it will not read your folder. It uses its own scratch folder, or refuses to start if you ticked an option below. It can read the folder and nothing else on this computer.", + "hint": "Runs in the folder you start it from, confined to that folder. Every pod this agent is in must be private and invite-only; if one is not, it will not read your folder. It uses its own scratch folder, or refuses to start if you ticked an option below. Without write, it reads only that folder and nothing else on this computer. With write, the commands it runs can read beyond the folder.", "write": "Let it edit files and run commands (--allow write)", "web": "Let it fetch web pages (--allow web)", "folder": "Open your terminal in your project's folder (not your home folder) before you paste the command. Either one lets it send what it reads off this computer, so grant them only in a pod you trust.", diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index f35b83e1b7..2e03dcb507 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -1812,7 +1812,7 @@ "useDifferentRunner": "换一种适配器", "repo": { "label": "在我的仓库里工作", - "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹。这个智能体所在的每个 Pod 都必须是私密的邀请制 Pod;只要有一个不是,它就不会读取你的文件夹,而是改在自己的暂存文件夹里运行;如果你勾选了下面的选项,它会拒绝启动。它能读取这个文件夹,读不到这台电脑上的其他内容。", + "hint": "在你启动它的那个文件夹里运行,只能访问这个文件夹。这个智能体所在的每个 Pod 都必须是私密的邀请制 Pod;只要有一个不是,它就不会读取你的文件夹,而是改在自己的暂存文件夹里运行;如果你勾选了下面的选项,它会拒绝启动。不勾选写入时,它只读取这个文件夹,读不到这台电脑上的其他内容。勾选写入后,它运行的命令能读取文件夹以外的内容。", "write": "允许它编辑文件、运行命令(--allow write)", "web": "允许它抓取网页(--allow web)", "folder": "粘贴命令之前,先在终端里打开你的项目文件夹(别在个人文件夹里)。无论选哪一项,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予。",