@f5-sales-demo/xcsh 20.2.3 → 20.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [20.2.4] - 2026-08-02
6
+
7
+ ### Fixed
8
+
9
+ - Preserved command exit status while evaluating assignment-only shell commands so canonical captures such as `rc=$?` retain failures ([#2837](https://github.com/f5-sales-demo/xcsh/issues/2837))
10
+
5
11
  ## [20.2.3] - 2026-08-02
6
12
 
7
13
  ### Fixed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/xcsh",
4
- "version": "20.2.3",
4
+ "version": "20.2.4",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/f5-sales-demo/xcsh",
7
7
  "author": "Can Boluk",
@@ -57,13 +57,13 @@
57
57
  "dependencies": {
58
58
  "@agentclientprotocol/sdk": "1.3.0",
59
59
  "@mozilla/readability": "^0.6",
60
- "@f5-sales-demo/xcsh-stats": "20.2.3",
61
- "@f5-sales-demo/pi-agent-core": "20.2.3",
62
- "@f5-sales-demo/pi-ai": "20.2.3",
63
- "@f5-sales-demo/pi-natives": "20.2.3",
64
- "@f5-sales-demo/pi-resource-management": "20.2.3",
65
- "@f5-sales-demo/pi-tui": "20.2.3",
66
- "@f5-sales-demo/pi-utils": "20.2.3",
60
+ "@f5-sales-demo/xcsh-stats": "20.2.4",
61
+ "@f5-sales-demo/pi-agent-core": "20.2.4",
62
+ "@f5-sales-demo/pi-ai": "20.2.4",
63
+ "@f5-sales-demo/pi-natives": "20.2.4",
64
+ "@f5-sales-demo/pi-resource-management": "20.2.4",
65
+ "@f5-sales-demo/pi-tui": "20.2.4",
66
+ "@f5-sales-demo/pi-utils": "20.2.4",
67
67
  "@sinclair/typebox": "^0.34",
68
68
  "@xterm/headless": "^6.0",
69
69
  "ajv": "^8.20",
@@ -120,11 +120,9 @@ export async function executeBash(command: string, options?: BashExecutorOptions
120
120
  const CWD_SENTINEL_END = ":__XCSH_CWD_END__";
121
121
  // Exit-code capture sentinel — the persistent shell's own exit code reflects
122
122
  // the trailing printf (always 0), so the user command's actual exit status
123
- // must be captured in-band. `$?` is referenced directly as a printf argument
124
- // (see finalCommand below) because a variable-assignment capture like
125
- // `_x=$?` resets `$?` to 0 in brush-core before the RHS is evaluated. Without
126
- // this sentinel, subprocess failures like `false`, `ls /nonexistent`, or
127
- // `(exit 3)` silently report success.
123
+ // must be captured in-band before another command replaces it. Without this
124
+ // sentinel, subprocess failures like `false`, `ls /nonexistent`, or `(exit 3)`
125
+ // silently report success.
128
126
  const EXIT_SENTINEL_START = "__XCSH_EXIT__:";
129
127
  const EXIT_SENTINEL_END = ":__XCSH_EXIT_END__";
130
128
 
@@ -167,12 +165,9 @@ export async function executeBash(command: string, options?: BashExecutorOptions
167
165
  }
168
166
 
169
167
  // Append CWD + exit-code sentinels only for persistent shell sessions.
170
- // `$?` must be referenced DIRECTLY in the printf arguments — using a
171
- // variable assignment like `_x=$?` first resets `$?` to 0 in brush-core
172
- // before the RHS is evaluated, defeating the capture. The persistent
173
- // shell's winner.exitCode always reflects the printf's return (0), so
174
- // the EXIT sentinel is the authoritative source for the user command's
175
- // actual exit status.
168
+ // The persistent shell's winner.exitCode reflects the trailing printf's
169
+ // return (0), so the EXIT sentinel is the authoritative source for the user
170
+ // command's actual exit status.
176
171
  const finalCommand = shellSession
177
172
  ? `${prefixedCommand}\nprintf '${CWD_SENTINEL_START}%s${CWD_SENTINEL_END}\\n${EXIT_SENTINEL_START}%s${EXIT_SENTINEL_END}\\n' "$PWD" "$?"`
178
173
  : prefixedCommand;
@@ -17,17 +17,17 @@ export interface BuildInfo {
17
17
  }
18
18
 
19
19
  export const BUILD_INFO: BuildInfo = {
20
- "version": "20.2.3",
21
- "commit": "7f2e292bf69f563ff32c24c4faa787538aaab420",
22
- "shortCommit": "7f2e292",
20
+ "version": "20.2.4",
21
+ "commit": "b47f63ed7ea202dbcc870fbbcc39c20f17814143",
22
+ "shortCommit": "b47f63e",
23
23
  "branch": "main",
24
- "tag": "v20.2.3",
25
- "commitDate": "2026-08-02T03:00:43Z",
26
- "buildDate": "2026-08-02T03:26:38.179Z",
24
+ "tag": "v20.2.4",
25
+ "commitDate": "2026-08-02T04:49:38Z",
26
+ "buildDate": "2026-08-02T05:15:27.513Z",
27
27
  "dirty": true,
28
28
  "prNumber": "",
29
29
  "repoUrl": "https://github.com/f5-sales-demo/xcsh",
30
30
  "repoSlug": "f5-sales-demo/xcsh",
31
- "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/7f2e292bf69f563ff32c24c4faa787538aaab420",
32
- "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v20.2.3"
31
+ "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/b47f63ed7ea202dbcc870fbbcc39c20f17814143",
32
+ "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v20.2.4"
33
33
  };