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
2 changes: 1 addition & 1 deletion apps/desktop/src/shared/utils/agent-launch-request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("buildPromptAgentLaunchRequest", () => {
agentType: "codex",
terminal: {
command:
'codex -c model_reasoning_effort="high" --dangerously-bypass-approvals-and-sandbox -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true',
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --full-auto',
},
});
});
Expand Down
20 changes: 11 additions & 9 deletions apps/docs/content/docs/terminal-presets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ Presets are parallel by default.

## Quick-Add Templates

Pre-configured presets for popular AI agents:

- **amp** - `amp`
- **claude** - `claude --dangerously-skip-permissions`
- **codex** - Full danger mode with high reasoning effort
- **gemini** - `gemini --yolo`
- **pi** - `pi`
- **cursor-agent** - Cursor AI agent
- **opencode** - Open-source AI coding agent
Pre-configured presets for popular AI agents. Defaults are safe-by-default — agents can read and edit files, but still prompt before running shell commands or touching files outside your workspace. Edit any preset to opt into a more permissive mode.

- **amp** - `amp` (built-in permission rules auto-deny destructive ops)
- **claude** - `claude --permission-mode acceptEdits`
- **codex** - `codex ... --full-auto` (workspace-sandboxed)
- **gemini** - `gemini --approval-mode=auto_edit`
- **copilot** - `copilot --allow-tool=write`
- **cursor-agent** - `cursor-agent` (prompts for every action)
- **mastracode** - Mastra's coding agent (opt-in: auto-approves all actions by default at the CLI; no startup flag to restrict)
- **opencode** - Open-source AI coding agent (opt-in: full file and shell access by default at the CLI; no startup flag to restrict)
- **pi** - Minimal terminal coding harness (opt-in: auto-approves all actions by default at the CLI; no startup flag to restrict)

## Preset Bar

Expand Down
4 changes: 1 addition & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/host-service/src/terminal/env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ describe("buildV2TerminalEnv", () => {
const env = buildV2TerminalEnv(baseParams);
expect(env).toMatchObject({
TERM: "xterm-256color",
TERM_PROGRAM: "Superset",
TERM_PROGRAM: "kitty",
TERM_PROGRAM_VERSION: "2.0.0",
COLORTERM: "truecolor",
PWD: "/tmp/workspace",
Expand All @@ -405,7 +405,7 @@ describe("buildV2TerminalEnv", () => {
SUPERSET_AGENT_HOOK_PORT: "51741",
SUPERSET_AGENT_HOOK_VERSION: "2",
});
expect(env.TERM_PROGRAM).toBe("Superset");
expect(env.TERM_PROGRAM).toBe("kitty");
expect(env.LANG).toContain("UTF-8");
});

Expand Down
6 changes: 5 additions & 1 deletion packages/host-service/src/terminal/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ export function buildV2TerminalEnv(
Object.assign(env, getShellBootstrapEnv({ shell, baseEnv, supersetHomeDir }));

env.TERM = "xterm-256color";
env.TERM_PROGRAM = "Superset";
// claude-code and similar chat TUIs only parse kitty CSI-u (e.g. Shift+Enter
// → \x1b[13;2u) when TERM_PROGRAM ∈ {ghostty, kitty, iTerm.app, WezTerm,
// WarpTerminal}. xterm.js already emits the right bytes — claim kitty so
// they're parsed instead of submitted as plain Enter.
env.TERM_PROGRAM = "kitty";
env.TERM_PROGRAM_VERSION = hostServiceVersion;
env.COLORTERM = "truecolor";
env.COLORFGBG = themeType === "light" ? "0;15" : "15;0";
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/agent-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("buildAgentPromptCommand", () => {
});

expect(command).toContain(
"model_supports_reasoning_summaries=true -- \"$(cat <<'SUPERSET_PROMPT_12345678'",
"model_supports_reasoning_summaries=true --full-auto -- \"$(cat <<'SUPERSET_PROMPT_12345678'",
);
expect(command).toContain("- Only modified file: runtime.ts");
});
Expand All @@ -26,7 +26,7 @@ describe("buildAgentPromptCommand", () => {
});

expect(command).toStartWith(
"claude --dangerously-skip-permissions \"$(cat <<'SUPERSET_PROMPT_abcdefgh'",
"claude --permission-mode acceptEdits \"$(cat <<'SUPERSET_PROMPT_abcdefgh'",
);
});

Expand Down
20 changes: 7 additions & 13 deletions packages/shared/src/builtin-terminal-agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const BUILTIN_TERMINAL_AGENTS = [
label: "Claude",
description:
"Anthropic's coding agent for reading code, editing files, and running terminal workflows.",
command: "claude --dangerously-skip-permissions",
command: "claude --permission-mode acceptEdits",
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
Expand All @@ -80,19 +80,18 @@ export const BUILTIN_TERMINAL_AGENTS = [
description:
"OpenAI's coding agent for reading, modifying, and running code across tasks.",
command:
'codex -c model_reasoning_effort="high" --dangerously-bypass-approvals-and-sandbox -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true',
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --full-auto',
promptCommand:
'codex -c model_reasoning_effort="high" --dangerously-bypass-approvals-and-sandbox -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --',
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --full-auto --',
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
id: "gemini",
label: "Gemini",
description:
"Google's open-source terminal agent for coding, problem-solving, and task work.",
command: "gemini --yolo",
promptCommand: "gemini",
promptCommandSuffix: "--yolo",
command: "gemini --approval-mode=auto_edit",
promptCommand: "gemini --approval-mode=auto_edit",
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
Expand All @@ -101,23 +100,20 @@ export const BUILTIN_TERMINAL_AGENTS = [
description:
"Mastra's coding agent for building, debugging, and shipping code from the terminal.",
command: "mastracode",
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
id: "opencode",
label: "OpenCode",
description: "Open-source coding agent for the terminal, IDE, and desktop.",
command: "opencode",
promptCommand: "opencode --prompt",
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
id: "pi",
label: "Pi",
description:
"Minimal terminal coding harness for flexible coding workflows.",
command: "pi",
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
id: "kimi",
Expand All @@ -134,9 +130,8 @@ export const BUILTIN_TERMINAL_AGENTS = [
label: "Copilot",
description:
"GitHub's coding agent for planning, editing, and building in your repo.",
command: "copilot --allow-all",
promptCommand: "copilot -i --allow-all",
promptCommandSuffix: "--yolo",
command: "copilot --allow-tool=write",
promptCommand: "copilot -i --allow-tool=write",
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
Expand All @@ -145,7 +140,6 @@ export const BUILTIN_TERMINAL_AGENTS = [
description:
"Cursor's coding agent for editing, running, and debugging code in parallel.",
command: "cursor-agent",
promptCommandSuffix: "--yolo",
}),
] as const;

Expand Down
Loading