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
8 changes: 5 additions & 3 deletions apps/ade-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,18 @@ ade run start web --lane lane-id
ade shell start --lane lane-id -- npm test
ade terminal list --lane lane-id --text
ade terminal resume --terminal session-id --text
ade new chat --mode chat --lane lane-id --provider codex --model openai/gpt-5.5 --reasoning-effort xhigh --no-fast --permissions full-auto --prompt "fix failing tests"
ade new chat --mode cli --lane lane-id --provider codex --model openai/gpt-5.5 --reasoning-effort xhigh --no-fast --permissions full-auto --prompt "fix failing tests"
ade new chat --mode chat --lane lane-id --provider codex --model openai/gpt-5.6-sol --reasoning-effort xhigh --no-fast --permissions full-auto --prompt "fix failing tests"
ade new chat --mode cli --lane lane-id --provider codex --model openai/gpt-5.6-sol --reasoning-effort xhigh --no-fast --permissions full-auto --prompt "fix failing tests"
ade new chat --mode chat --lane auto --lane-name fix-checkout-flow --prompt "fix failing tests"
ade chat list --lane lane-id --include-automation --no-archived --text
ade chat create --lane lane-id --provider codex --model openai/gpt-5.5 --permissions full-auto --print-config --json
ade chat create --lane lane-id --provider codex --model openai/gpt-5.6-sol --permissions full-auto --print-config --json
ade chat create --lane lane-id --provider codex --no-parent # spawned chats default their parent to $ADE_CHAT_SESSION_ID; --parent <session> overrides, --no-parent opts out
ade chat read session-id --limit 20 --text
ade chat message session-id --kind auto --text "status/context"
ade chat steer session-id --text "active-turn context"
ade chat wait session-id --for idle --timeout-ms 600000
ade chat recover session-id --turn turn-id --action nudge # wait | nudge | retry | resume
ade chat models --provider codex --json # model order + supported reasoning tiers
ade code
ade code --embedded
ade tests run --lane lane-id --suite unit --wait
Expand Down
110 changes: 55 additions & 55 deletions apps/ade-cli/package-lock.json

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

2 changes: 1 addition & 1 deletion apps/ade-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@factory/droid-sdk": "^0.2.0",
"@linear/sdk": "^84.0.0",
"@modelcontextprotocol/sdk": "^1.29.0",
"@openai/codex": "0.142.5",
"@openai/codex": "0.144.0",
"@opencode-ai/sdk": "^1.15.5",
"@wize-logic/nodejs-rfb": "^4.2.0",
"@xterm/addon-fit": "^0.11.0",
Expand Down
9 changes: 8 additions & 1 deletion apps/ade-cli/src/adeRpcServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1728,9 +1728,16 @@ describe("adeRpcServer", () => {
expect.objectContaining({
cols: 400,
rows: 200,
startupCommand: expect.stringContaining("codex --no-alt-screen --sandbox workspace-write --ask-for-approval on-request"),
startupCommand: expect.stringContaining("codex --no-alt-screen"),
}),
);
const createCall = fixture.runtime.ptyService.create.mock.calls.at(-1)?.[0];
expect(createCall?.args).toEqual(expect.arrayContaining([
"--sandbox",
"workspace-write",
"--ask-for-approval",
"on-request",
]));
expect(response.structuredContent.startupCommand).not.toContain("--full-auto");
});

Expand Down
5 changes: 5 additions & 0 deletions apps/ade-cli/src/adeRpcServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import { JsonRpcError, JsonRpcErrorCode, type JsonRpcHandler, type JsonRpcReques
import { normalizeAdeRuntimeRole } from "./runtimeRoles";
import { getSharedModelPickerStore } from "./services/modelPickerStore";
import { resolveLaneCreateRemoteBase } from "./services/laneCreateRemoteBase";
import { resolveCodexComputerUseMcpConfig } from "../../desktop/src/main/utils/codexComputerUse";

// Cross-surface (desktop + TUI + iOS) model picker favorites & recents.
// Backed by the per-project cr-sqlite CRR DB (runtime.db) so the three surfaces
Expand Down Expand Up @@ -3516,6 +3517,9 @@ async function runTool(args: {
const ptyService = runtime.ptyService;
const preassignedSessionId = provider === "claude" ? randomUUID() : undefined;
const laneWorktreePath = resolveLaneWorktreePath(runtime, laneId);
const codexComputerUse = provider === "codex"
? await resolveCodexComputerUseMcpConfig()
: null;

const launchFields: Partial<TrackedCliLaunchCommand> = (() => {
if (provider === "shell") {
Expand All @@ -3535,6 +3539,7 @@ async function runTool(args: {
fastMode,
initialPrompt: initialInput,
laneWorktreePath,
...(provider === "codex" ? { codexComputerUse } : {}),
});
})();

Expand Down
78 changes: 78 additions & 0 deletions apps/ade-cli/src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,76 @@ describe("ADE CLI", () => {
});
});

it.each([
["wait", "wait"],
["nudge", "steer"],
["retry", "interrupt_retry_same_thread"],
["resume", "restart_resume_thread"],
] as const)("maps chat recovery action %s to %s", (cliAction, action) => {
const executePlan = expectExecutePlan(buildCliPlan([
"chat",
"recover",
"chat-1",
"--turn",
"turn-1",
"--action",
cliAction,
]));

expect(executePlan.label).toBe("chat recover");
expect(executePlan.steps[0]?.params).toMatchObject({
arguments: {
domain: "chat",
action: "recoverCodexTurn",
args: {
sessionId: "chat-1",
turnId: "turn-1",
action,
},
},
});
});

it("rejects incomplete or unknown chat recovery requests", () => {
expect(() => buildCliPlan([
"chat", "recover", "chat-1", "--action", "wait",
])).toThrow(/turnId/);
expect(() => buildCliPlan([
"chat", "recover", "chat-1", "--turn", "turn-1", "--action", "replace",
])).toThrow(/wait, nudge, retry, or resume/);
});

it("filters the typed chat model inventory by provider", () => {
const executePlan = expectExecutePlan(buildCliPlan([
"chat",
"models",
"--provider",
"codex",
]));

expect(executePlan.label).toBe("chat models");
expect(executePlan.steps[0]?.params).toMatchObject({
arguments: {
domain: "chat",
action: "getAvailableModels",
args: { provider: "codex" },
},
});
});

it("requests the complete typed chat model inventory when provider is omitted", () => {
const executePlan = expectExecutePlan(buildCliPlan(["chat", "models"]));

expect(executePlan.label).toBe("chat models");
expect(executePlan.steps[0]?.params).toMatchObject({
arguments: {
domain: "chat",
action: "getAvailableModels",
args: {},
},
});
});

it("builds chat message with an explicit routing kind", () => {
const executePlan = expectExecutePlan(buildCliPlan([
"chat",
Expand Down Expand Up @@ -3874,9 +3944,17 @@ describe("ADE CLI", () => {
expect(chatHelp.text).toContain("ade chat message <session>");
expect(chatHelp.text).toContain("ade chat steer <session>");
expect(chatHelp.text).toContain("ade chat wait <session>");
expect(chatHelp.text).toContain("ade chat recover <session>");
expect(chatHelp.text).toContain("ade chat models --provider codex");
expect(chatHelp.text).toContain("ade chat read <session>");
expect(chatHelp.text).toContain("ade new chat --mode cli");

const chatRecoveryHelp = buildCliPlan(["help", "chat", "recover"]);
expect(chatRecoveryHelp.kind).toBe("help");
if (chatRecoveryHelp.kind !== "help") return;
expect(chatRecoveryHelp.text).toContain("same actions as the desktop");
expect(chatRecoveryHelp.text).toContain("--action resume");

const agentSpawnHelp = buildCliPlan(["agent", "spawn", "--help"]);
expect(agentSpawnHelp.kind).toBe("help");
if (agentSpawnHelp.kind !== "help") return;
Expand Down
Loading
Loading