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
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('Scout onboarding knowledge', () => {
expect(prompt).toMatch(/DeepSeek Harness \(dsh\) through its attach guide, walked on macOS with other OSs unverified/);
expect(prompt).not.toMatch(/On Linux \(WSL included\), Codex only/);
expect(prompt).toMatch(/For Claude Code on Linux, WSL or Windows, do not propose a connect card/);
expect(prompt).toMatch(/commonly_offer_hosted_agent, or say they can use the pod from their own Claude Code sessions/);
expect(prompt).toMatch(/commonly_offer_hosted_agent, and also say they can use the pod from their own Claude Code sessions/);
expect(prompt).not.toMatch(/Windows is not verified yet/);
});

Expand All @@ -141,6 +141,50 @@ describe('Scout onboarding knowledge', () => {
expect(prompt).toMatch(/and the MCP line/);
});

// Stranger journey 2026-10-20..26: after "Claude Code" and "macOS" in the
// person's own words, Scout typed the Terminal steps out in 6 of 46 runs and
// the card never came.
test('proposes the connect card once the tool and a supported OS are known, however the person arrived', () => {
expect(prompt).toMatch(/Once they have named Claude Code or Codex and an OS on that list, propose the card in that same reply/);
expect(prompt).toMatch(/then propose the connect card when the card rule below allows it/);
expect(prompt).toMatch(/propose the card in that same reply, whether they came from the welcome button or asked in their own words/);
expect(prompt).toMatch(/Do not type out the Terminal steps, and do not ask whether they want it set up, in its place/);
});

// Rhea on #2765: the prompt is the only guard before the card, so the pairs
// it may go out for are listed, not inferred.
test('proposes the card only for Claude Code on macOS and Codex on macOS, Linux or WSL', () => {
expect(prompt).toMatch(/The card may go out for exactly these pairs: Claude Code on macOS; Codex on macOS, Linux or WSL\./);
expect(prompt).toMatch(/Any other OS, such as native Windows, ChromeOS, iPad or iPhone, Android or FreeBSD, gets a text answer and no card/);
['ChromeOS', 'iPad', 'Android'].forEach((os) => expect(prompt).toContain(os));
});

test('asks about Codex in ChatGPT, and takes a plain "Codex" as the CLI', () => {
expect(prompt).toMatch(/A plain "Codex" answers that question and counts as the CLI/);
expect(prompt).toMatch(/When they say Codex together with ChatGPT, the web, the cloud or an app, as in "I use Codex in ChatGPT", ask whether they run the Codex CLI in a terminal, with no card in that reply/);
});

test('does not take the Claude app or ChatGPT for the command-line tool', () => {
expect(prompt).toMatch(/the Claude app \(desktop or phone\) and claude\.ai are not Claude Code, and the ChatGPT app, chatgpt\.com and Codex in ChatGPT are not the Codex CLI/);
expect(prompt).toMatch(/When they say "Claude" or "ChatGPT" without saying which, ask whether they run Claude Code or the Codex CLI in a terminal, and propose no card until they say they do/);
expect(prompt).toMatch(/A bare "Claude" or "ChatGPT" never settles it, on macOS too, and even when you had asked "Claude Code or Codex": ask that one question first, with no card in that reply/);
expect(prompt).toMatch(/Before you propose the card, check their own messages, not yours: one of them must say "Claude Code" or "Codex"\. If none does, ask instead/);
expect(prompt).toMatch(/If they only use the app, there is nothing of theirs to connect: offer "Run it here"/);
});

// The answer matches what the Connect page itself offers on that OS
// (agentByo.listen.unavailableClaude / unavailableCodex).
test('never proposes the card for a tool or OS it cannot set up, and offers what the Connect page does', () => {
expect(prompt).toMatch(/For any other tool, or an OS where it does not run yet, never propose the card; answer in text\. OpenCode, Hermes and DeepSeek Harness have their own paths above: point them there\. Say plainly that it does not run there yet only for a tool with no path above, or an OS its path does not cover\./);
// CodeRabbit on #2765: the no-card rule must not deny tools that do connect.
expect(prompt).not.toMatch(/For any other tool, or an OS where it does not run yet, never propose the card; answer in text and say plainly that it does not run there yet/);
expect(prompt).toMatch(/For Claude Code on Linux, WSL or Windows, do not propose a connect card: offer "Run it here" with commonly_offer_hosted_agent, and also say they can use the pod from their own Claude Code sessions with the MCP command on the connect page \(on Windows the page gives it as two PowerShell lines\)/);
expect(prompt).toMatch(/For Codex on native Windows, do not propose a connect card either: offer "Run it here", or running Codex on a Mac or Linux machine/);
const en = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../../../frontend/src/i18n/locales/en.json'), 'utf8'));
expect(en.agentByo.listen.unavailableClaude).toMatch(/Connect Claude Code from your own sessions with the command below, or choose “Run it here”/);
expect(en.agentByo.listen.unavailableCodex).toMatch(/Choose “Run it here” for a hosted agent, or run the command on a Mac or Linux machine/);
});

// Stranger journey 2026-10-26: Scout wrote the Terminal steps and asked
// "Want me to open that page?" instead of proposing, and no card came.
test('proposes the connect card once it knows the tool and OS, without asking first', () => {
Expand Down
48 changes: 43 additions & 5 deletions backend/config/native-agents/scout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const scoutApp = {
+ `"${SCOUT_STARTS[0].label}" and "${SCOUT_STARTS[1].label}". For `
+ `"${SCOUT_STARTS[0].label}", find out which tool they run `
+ '(Claude Code or Codex) and their operating system, one question per turn, '
+ 'then propose the connect card; in that first reply, also say in one short '
+ 'then propose the connect card when the card rule below allows it; in that first reply, also say in one short '
+ 'clause that if they would rather install nothing, Commonly can run one here. '
+ `For "${SCOUT_STARTS[1].label}", ask what the project is if `
+ 'they have not said, then propose create_pod with a short name for it. '
Expand Down Expand Up @@ -148,9 +148,12 @@ export const scoutApp = {
+ 'other OSs unverified. On native Windows, Claude Code and Codex are not '
+ 'supported; Codex inside WSL counts as Linux. For '
+ 'Claude Code on Linux, WSL or Windows, do not propose a connect card: offer '
+ '"Run it here" with commonly_offer_hosted_agent, or say they can use the pod '
+ '"Run it here" with commonly_offer_hosted_agent, and also say they can use the pod '
+ 'from their own Claude Code sessions with the MCP command on the connect '
+ 'page. Say plainly why: it does not run there yet.\n'
+ 'page (on Windows the page gives it as two PowerShell lines). For Codex on '
+ 'native Windows, do not propose a connect card either: offer "Run it here", '
+ 'or running Codex on a Mac or Linux machine. Say plainly why: it does not '
+ 'run there yet.\n'
// A new person asked (2026-10-17) for Claude, GPT and Gemini in one group
// chat and was told there was no way to bring GPT in. Codex runs GPT.
// Gemini has no verified path yet: the Bring your own page does not offer
Expand Down Expand Up @@ -189,8 +192,43 @@ export const scoutApp = {
+ '- Hiring a ready-made agent from the catalog ("Hire an agent") needs an '
+ 'invitation code during beta ("Have an invitation code?" on the Agents '
+ 'page). That is separate from "Run it here", which is open to everyone.\n'
+ '- You can SET UP their own agent for them: when the user wants their local '
+ 'agent in the workspace, commonly_propose_action with actionType '
// Stranger journey, 2026-10-20..26: 6 of 46 runs got the Terminal steps
// typed out (or `agent init`) after "macOS" instead of a card, because the
// question arrived in the person's own words, not from the welcome button.
// Rhea on #2765: the OS list and the app-vs-CLI check are spelled out, since
// nothing after the card checks either (approvalActionService checks name
// and adapter only).
+ '- You can SET UP their own agent for them, and the connect card is the '
+ 'answer whenever it can work. The card may go out for exactly these pairs: '
+ 'Claude Code on macOS; Codex on macOS, Linux or WSL. Any other OS, such as '
+ 'native Windows, ChromeOS, iPad or iPhone, Android or FreeBSD, gets a text '
+ 'answer and no card. The tool must be the command-line one they run in a '
+ 'terminal: the Claude app (desktop or phone) and claude.ai are not Claude '
+ 'Code, and the ChatGPT app, chatgpt.com and Codex in ChatGPT are not the '
+ 'Codex CLI. When they '
+ 'say "Claude" or "ChatGPT" without saying which, ask whether they run Claude '
+ 'Code or the Codex CLI in a terminal, and propose no card until they say '
+ 'they do. A bare "Claude" or "ChatGPT" never settles it, on macOS too, and '
+ 'even when you had asked "Claude Code or Codex": ask that one question '
+ 'first, with no card in that reply. A plain "Codex" answers that question '
+ 'and counts as the CLI. When they say Codex together with ChatGPT, the '
+ 'web, the cloud or an app, as in "I use Codex in ChatGPT", ask whether '
+ 'they run the Codex CLI in a terminal, with no card in that reply. '
+ 'Before you propose the card, check '
+ 'their own messages, not yours: one of them must say "Claude Code" or '
+ '"Codex". If none does, ask instead. If they only use the app, there is '
+ 'nothing of theirs to connect: offer "Run it here". Once they have named '
+ 'Claude Code or Codex and an OS on that list, '
+ 'propose the card in that same reply, whether '
+ 'they came from the welcome button or asked in their own words. Do not '
+ 'type out the Terminal steps, and do not ask whether they want it set up, '
+ 'in its place: the card opens the page with the command filled in. For '
+ 'any other tool, or an OS where it does not run yet, never propose the '
+ 'card; answer in text. OpenCode, Hermes and DeepSeek Harness have their '
+ 'own paths above: point them there. Say plainly that it does not run '
+ 'there yet only for a tool with no path above, or an OS its path does '
+ 'not cover. '
+ 'The card is commonly_propose_action with actionType '
+ 'connect_local_agent, a short lowercase name made from THEIR username and '
+ 'what they run, e.g. "sams-claude" or "lee-codex", and adapter "claude" or '
+ '"codex" for what they run, so the page opens on that command. Never a '
Expand Down
Loading