-
Notifications
You must be signed in to change notification settings - Fork 2
ADE-32: Update codex app server to bring new codex features #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4bf86b1
87061e1
11898ea
ee7e5c3
69a17e7
c176e63
7714b8d
ec32272
890526c
3c28890
fb71d18
7c078f2
080b848
5b4b18b
8514701
bec160f
8ed3592
7ffdf29
27ec8e5
ae7d400
236177c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,10 +173,13 @@ type ReadinessCheck = { | |
|
|
||
| declare const __ADE_VERSION__: string | undefined; | ||
|
|
||
| const BUNDLED_VERSION = | ||
| typeof __ADE_VERSION__ === "string" ? __ADE_VERSION__.trim() : ""; | ||
| const ENV_VERSION = process.env.ADE_CLI_VERSION?.trim() ?? ""; | ||
| const VERSION = | ||
| typeof __ADE_VERSION__ === "string" && __ADE_VERSION__.trim() | ||
| ? __ADE_VERSION__ | ||
| : process.env.ADE_CLI_VERSION?.trim() || "0.0.0"; | ||
| BUNDLED_VERSION && BUNDLED_VERSION !== "0.0.0" | ||
| ? BUNDLED_VERSION | ||
| : ENV_VERSION || BUNDLED_VERSION || "0.0.0"; | ||
| const PROTOCOL_VERSION = "2025-06-18"; | ||
| const SOURCE_FALLBACK_ENV = "ADE_CLI_SOURCE_FALLBACK_ACTIVE"; | ||
| const CLI_ENTRY_PATH = | ||
|
|
@@ -5099,6 +5102,10 @@ function buildChatPlan(args: string[]): CliPlan { | |
| : standardRequested | ||
| ? false | ||
| : undefined; | ||
| // `--print` opts the session's app-server initialize handshake into | ||
| // print-mode (suppresses delta notification streams). Must be set at create | ||
| // time because the handshake runs once when the runtime starts. | ||
| const createRuntimeMode = readFlag(args, ["--print"]) ? "print" : undefined; | ||
| return { | ||
| kind: "execute", | ||
| label: "chat create", | ||
|
|
@@ -5124,12 +5131,28 @@ function buildChatPlan(args: string[]): CliPlan { | |
| title: readValue(args, ["--title"]), | ||
| surface: readValue(args, ["--surface"]) ?? "work", | ||
| ...(codexFastMode !== undefined ? { codexFastMode } : {}), | ||
| ...(createRuntimeMode ? { runtimeMode: createRuntimeMode } : {}), | ||
| }), | ||
| ), | ||
| ], | ||
| }; | ||
| } | ||
| if (sub === "send") | ||
| if (sub === "send") { | ||
| const imageUrl = readValue(args, ["--image-url"]); | ||
| // `--print` is honored at session create time only — the app-server | ||
| // initialize handshake runs once per session, so setting it per-message | ||
| // would be a silent no-op. Reject explicitly so users move it to | ||
| // `ade chat create --print`. | ||
| const hasPrintFlag = args.some((token) => token === "--print" || token.startsWith("--print=")); | ||
| if (hasPrintFlag) { | ||
| throw new CliUsageError( | ||
| "--print must be set at session creation time. Use `ade chat create --print ...`.", | ||
| ); | ||
| } | ||
| const sendText = requireValue( | ||
| readValue(args, ["--text", "--message"]) ?? args.join(" "), | ||
| "message text", | ||
| ); | ||
| return { | ||
| kind: "execute", | ||
| label: "chat send", | ||
|
|
@@ -5140,14 +5163,13 @@ function buildChatPlan(args: string[]): CliPlan { | |
| "sendMessage", | ||
| withSession({ | ||
| sessionId: requireValue(sessionId, "sessionId"), | ||
| text: requireValue( | ||
| readValue(args, ["--text", "--message"]) ?? args.join(" "), | ||
| "message text", | ||
| ), | ||
| text: sendText, | ||
| ...(imageUrl ? { attachments: [{ type: "image-url", url: imageUrl, path: imageUrl }] } : {}), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image-URL attachment sets
|
||
| }), | ||
| ), | ||
| ], | ||
| }; | ||
| } | ||
| if (sub === "interrupt") | ||
| return { | ||
| kind: "execute", | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readFlagmisses--print=valueon chat createLow Severity
The
chat createpath usesreadFlag(args, ["--print"])which only matches the exact bare token"--print". Thechat sendpath detects both"--print"and"--print=<value>"viaargs.some(token => token === "--print" || token.startsWith("--print="))and rejects with a message directing users tochat create --print. A user who originally wrote--print=trueonsendwould naturally try the same syntax oncreate, where it silently becomes a no-op — the unconsumed token leaks intocollectGenericObjectArgsinstead of enabling print mode.Additional Locations (1)
apps/ade-cli/src/cli.ts#L5145-L5146Reviewed by Cursor Bugbot for commit 236177c. Configure here.