Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,7 @@
"title": "Run this in Terminal",
"note": "MCP alone won't wake {{name}} for @mentions. Keep this Terminal open.",
"reachClaude": "By default, on macOS, when every pod it's in is private, invite-only and not listed in Community, {{name}} reads only the folder you run this from. Otherwise, or when you run it from your home folder, it works in its own scratch folder. To let it edit files and run commands, add --allow write to the last line. Those commands can read beyond the folder. To let it fetch web pages, add --allow web. Either one lets it send what it reads off this computer, so grant them only in a pod you trust.",
"reachCodex": "Codex works in its own scratch folder under your temp directory, not the folder you run this from. --allow does not apply to Codex, so the last line has no --allow.",
"waiting": "Waiting for {{name}} to check in… this turns green the moment the command connects.",
"verified": "{{name}} is listening — mentions will wake it.",
"stillWaiting": "Still no check-in from {{name}}. Run the command above in Terminal on your computer, and this page will confirm it.",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1768,6 +1768,7 @@
"title": "在终端里运行这段命令",
"note": "仅连接 MCP 不会唤醒 {{name}} 回复 @提及。请保持终端窗口开启。",
"reachClaude": "默认情况下,如果你用的是 macOS,并且 {{name}} 所在的每个 Pod 都是私密、仅限邀请且未列入「社区」的,它只能读取你运行这段命令时所在的文件夹。不满足这些条件,或者你在个人文件夹里运行这段命令,它都会在自己的临时文件夹里工作。想让它编辑文件、运行命令,就在最后一行加上 --allow write。它运行的命令能读取文件夹以外的内容。想让它抓取网页,就加上 --allow web。无论加哪一个,它都能把读到的内容传出这台电脑,所以只在你信任的 Pod 里授予这两项权限。",
"reachCodex": "Codex 会在系统临时目录里用自己的暂存文件夹工作,不在你运行命令的这个文件夹。--allow 对 Codex 无效,所以最后一行不带 --allow。",
"waiting": "正在等待 {{name}} 接入…命令一接通,这里就会变绿。",
"verified": "{{name}} 已在监听 —— @提及 会唤醒它。",
"stillWaiting": "{{name}} 还没接入。请在你电脑的终端里运行上面的命令,这里会自动确认。",
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ describe('BYO listener snippet', () => {
expect(axios.delete).not.toHaveBeenCalled();
});

test('a Claude Code listener says what it can reach and how --allow widens it; Codex says nothing of folders', async () => {
test('a Claude Code listener says what it can reach and how --allow widens it; Codex gets its own note only', async () => {
await issueToken();
const reach = screen.getByTestId('byo-listen-reach');
expect(screen.queryByTestId('byo-listen-reach-codex')).toBeNull();
expect(reach).toHaveTextContent(/By default, on macOS, when every pod it's in is private, invite-only and not listed in Community, .+ reads only the folder you run this from\. Otherwise, or when you run it from your home folder, it works in its own scratch folder\./);
// The folder bound is the default only: write's commands read past it.
expect(reach).toHaveTextContent(/add --allow write to the last line\. Those commands can read beyond the folder\./);
Expand All @@ -217,6 +218,9 @@ describe('BYO listener snippet', () => {
test('a Codex listener shows no Claude folder note', async () => {
await issueToken('codex');
expect(screen.queryByTestId('byo-listen-reach')).toBeNull();
// Codex gets its own note: it runs in its scratch folder, and --allow is refused for it.
expect(screen.getByTestId('byo-listen-reach-codex')).toHaveTextContent(/its own scratch folder under your temp directory/);
expect(screen.getByTestId('byo-listen-reach-codex')).toHaveTextContent(/--allow does not apply to Codex/);
});

test('the Claude Code MCP line shows for Claude Code only', async () => {
Expand Down Expand Up @@ -327,6 +331,7 @@ describe('BYO listener snippet', () => {
expect(listener()).toBeUndefined();
expect(screen.getByTestId('byo-listen-unavailable')).toHaveTextContent(/The Codex CLI can’t answer @mentions from Linux yet\. .*Linux is not tested yet\./);
expect(screen.queryByTestId('byo-listen-npm-hint')).toBeNull();
expect(screen.queryByTestId('byo-listen-reach-codex')).toBeNull();
});

test('Codex on Windows says so, and offers hosted or another machine', async () => {
Expand All @@ -336,6 +341,7 @@ describe('BYO listener snippet', () => {
expect(screen.getByTestId('byo-listen-unavailable'))
.toHaveTextContent(/The Codex CLI can’t answer @mentions from Windows yet\. Choose “Run it here”/);
expect(screen.queryByTestId('byo-listen-npm-hint')).toBeNull();
expect(screen.queryByTestId('byo-listen-reach-codex')).toBeNull();
expect(screen.queryByTestId('byo-mcp-claude')).toBeNull();
});

Expand Down
5 changes: 5 additions & 0 deletions frontend/src/v2/components/V2AgentBYO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,11 @@ const V2AgentBYO: React.FC = () => {
{t('agentByo.listen.reachClaude', { name: issued.agentName })}
</p>
)}
{listenerAvailable && listenAdapter === 'codex' && (
<p className="v2-byo__listen-note" data-testid="byo-listen-reach-codex">
{t('agentByo.listen.reachCodex')}
</p>
)}
</div>
<p data-testid="byo-key-once">{t('agentByo.result.keyOnce')}</p>

Expand Down
Loading