@f5-sales-demo/xcsh 21.32.0 → 21.32.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/xcsh",
4
- "version": "21.32.0",
4
+ "version": "21.32.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",
@@ -63,13 +63,13 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@agentclientprotocol/sdk": "1.4.0",
66
- "@f5-sales-demo/pi-agent-core": "21.32.0",
67
- "@f5-sales-demo/pi-ai": "21.32.0",
68
- "@f5-sales-demo/pi-natives": "21.32.0",
69
- "@f5-sales-demo/pi-resource-management": "21.32.0",
70
- "@f5-sales-demo/pi-tui": "21.32.0",
71
- "@f5-sales-demo/pi-utils": "21.32.0",
72
- "@f5-sales-demo/xcsh-stats": "21.32.0",
66
+ "@f5-sales-demo/pi-agent-core": "21.32.4",
67
+ "@f5-sales-demo/pi-ai": "21.32.4",
68
+ "@f5-sales-demo/pi-natives": "21.32.4",
69
+ "@f5-sales-demo/pi-resource-management": "21.32.4",
70
+ "@f5-sales-demo/pi-tui": "21.32.4",
71
+ "@f5-sales-demo/pi-utils": "21.32.4",
72
+ "@f5-sales-demo/xcsh-stats": "21.32.4",
73
73
  "@mozilla/readability": "^0.6",
74
74
  "@sinclair/typebox": "0.34.52",
75
75
  "@xterm/headless": "^6.0",
@@ -17,17 +17,17 @@ export interface BuildInfo {
17
17
  }
18
18
 
19
19
  export const BUILD_INFO: BuildInfo = {
20
- "version": "21.32.0",
21
- "commit": "318283a955aea8725f8119d68e14db6ea2d8b3e7",
22
- "shortCommit": "318283a",
23
- "branch": "unknown",
24
- "tag": "v21.32.0",
25
- "commitDate": "2026-09-17T18:23:21Z",
26
- "buildDate": "2026-09-17T23:24:55.633Z",
20
+ "version": "21.32.4",
21
+ "commit": "a12d78ad6bb7f1d0aeeabb0f8656f579c8130ba8",
22
+ "shortCommit": "a12d78a",
23
+ "branch": "main",
24
+ "tag": "v21.32.4",
25
+ "commitDate": "2026-09-18T10:32:48+00:00",
26
+ "buildDate": "2026-09-18T11:33:24.618Z",
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/318283a955aea8725f8119d68e14db6ea2d8b3e7",
32
- "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.32.0"
31
+ "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/a12d78ad6bb7f1d0aeeabb0f8656f579c8130ba8",
32
+ "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.32.4"
33
33
  };
@@ -1,14 +1,14 @@
1
1
  // AUTO-GENERATED — do not edit. Run `bun generate-sitecli-index` to regenerate.
2
2
  //
3
- // Source: f5-sales-demo/mcn sitecli/catalog.json, captured from a live Customer Edge.
3
+ // Source: f5-sales-demo/multi-cloud-networking sitecli/catalog.json, captured from a live Customer Edge.
4
4
  // The command surface depends on the node software build, so SITECLI_BUILD records
5
5
  // which build this describes.
6
6
 
7
- export const SITECLI_BUILD = "crt-20250613-3382";
7
+ export const SITECLI_BUILD = "crt-20260201-0179";
8
8
 
9
9
  export const SITECLI_SOURCE = {
10
10
  node: "f5-xc-ce-vm-01",
11
- site: "ar-bgp-eastus01",
11
+ site: "mcn-ce-ha-eastus01",
12
12
  } as const;
13
13
 
14
14
  export const SITECLI_COMMANDS = {
@@ -18,6 +18,12 @@ export const SITECLI_COMMANDS = {
18
18
  transport: "exec-user",
19
19
  mutating: false,
20
20
  },
21
+ "collect-database-stats": {
22
+ category: "System Troubleshooting",
23
+ tier: "ExecUser",
24
+ transport: "exec-user",
25
+ mutating: false,
26
+ },
21
27
  "crictl-images": {
22
28
  category: "System Troubleshooting",
23
29
  tier: "ExecUser",
@@ -176,6 +182,12 @@ export const SITECLI_COMMANDS = {
176
182
  transport: "exec-user",
177
183
  mutating: false,
178
184
  },
185
+ "iptables-lv": {
186
+ category: "Network Troubleshooting",
187
+ tier: "ExecUser",
188
+ transport: "exec-user",
189
+ mutating: false,
190
+ },
179
191
  journalctl: {
180
192
  category: "System Troubleshooting",
181
193
  tier: "ExecUser",
@@ -183,6 +195,24 @@ export const SITECLI_COMMANDS = {
183
195
  mutating: false,
184
196
  example: "-u vpm -n 200",
185
197
  },
198
+ "marker-exists-crio": {
199
+ category: "System Troubleshooting",
200
+ tier: "Exec",
201
+ transport: "exec",
202
+ mutating: true,
203
+ },
204
+ "marker-exists-kubelet": {
205
+ category: "System Troubleshooting",
206
+ tier: "Exec",
207
+ transport: "exec",
208
+ mutating: true,
209
+ },
210
+ "marker-exists-NetworkManager": {
211
+ category: "System Troubleshooting",
212
+ tier: "Exec",
213
+ transport: "exec",
214
+ mutating: true,
215
+ },
186
216
  netstat: {
187
217
  category: "Network Troubleshooting",
188
218
  tier: "ExecUser",
@@ -227,6 +257,30 @@ export const SITECLI_COMMANDS = {
227
257
  transport: "exec-user",
228
258
  mutating: false,
229
259
  },
260
+ "systemctl-restart-crio": {
261
+ category: "System Troubleshooting",
262
+ tier: "Exec",
263
+ transport: "exec",
264
+ mutating: true,
265
+ },
266
+ "systemctl-restart-kubelet": {
267
+ category: "System Troubleshooting",
268
+ tier: "Exec",
269
+ transport: "exec",
270
+ mutating: true,
271
+ },
272
+ "systemctl-restart-NetworkManager": {
273
+ category: "System Troubleshooting",
274
+ tier: "Exec",
275
+ transport: "exec",
276
+ mutating: true,
277
+ },
278
+ "systemctl-start-crio-prune": {
279
+ category: "System Troubleshooting",
280
+ tier: "Exec",
281
+ transport: "exec",
282
+ mutating: true,
283
+ },
230
284
  vif: {
231
285
  category: "Network Troubleshooting",
232
286
  tier: "ExecUser",
@@ -6,6 +6,11 @@ import { promisify } from "node:util";
6
6
 
7
7
  const execFileAsync = promisify(execFile);
8
8
  const PROCESS_KINDS = ["supervisor", "host"] as const;
9
+ const executableDigestCache = new Map<
10
+ string,
11
+ { dev: number; ino: number; size: number; mtimeMs: number; ctimeMs: number; digest: string }
12
+ >();
13
+ const executableDigestInFlight = new Map<string, Promise<string>>();
9
14
  export type ProcessKind = (typeof PROCESS_KINDS)[number];
10
15
 
11
16
  export interface ProcessIdentity {
@@ -186,9 +191,40 @@ async function processStartTime(pid: number): Promise<string> {
186
191
  }
187
192
 
188
193
  async function sha256File(path: string): Promise<string> {
189
- return createHash("sha256")
190
- .update(await readFile(path))
191
- .digest("hex");
194
+ const metadata = await stat(path);
195
+ const cached = executableDigestCache.get(path);
196
+ if (
197
+ cached &&
198
+ cached.dev === metadata.dev &&
199
+ cached.ino === metadata.ino &&
200
+ cached.size === metadata.size &&
201
+ cached.mtimeMs === metadata.mtimeMs &&
202
+ cached.ctimeMs === metadata.ctimeMs
203
+ )
204
+ return cached.digest;
205
+ const key = `${path}:${metadata.dev}:${metadata.ino}:${metadata.size}:${metadata.mtimeMs}:${metadata.ctimeMs}`;
206
+ const pending = executableDigestInFlight.get(key);
207
+ if (pending) return pending;
208
+ const digest = (async () => {
209
+ const value = createHash("sha256")
210
+ .update(await readFile(path))
211
+ .digest("hex");
212
+ executableDigestCache.set(path, {
213
+ dev: metadata.dev,
214
+ ino: metadata.ino,
215
+ size: metadata.size,
216
+ mtimeMs: metadata.mtimeMs,
217
+ ctimeMs: metadata.ctimeMs,
218
+ digest: value,
219
+ });
220
+ return value;
221
+ })();
222
+ executableDigestInFlight.set(key, digest);
223
+ try {
224
+ return await digest;
225
+ } finally {
226
+ executableDigestInFlight.delete(key);
227
+ }
192
228
  }
193
229
 
194
230
  export async function inspectProcess(pid: number, generation: number): Promise<ProcessIdentity | undefined> {
@@ -29,13 +29,29 @@ async function atomicText(path: string, content: string): Promise<void> {
29
29
  await chmod(path, 0o600);
30
30
  }
31
31
 
32
- async function systemctl(args: string[]): Promise<{ code: number; stdout: string }> {
32
+ const SYSTEMCTL_TIMEOUT_MS = 1_000;
33
+
34
+ export async function runSystemctlUser(
35
+ args: string[],
36
+ command = "systemctl",
37
+ ): Promise<{ code: number; stdout: string }> {
33
38
  return new Promise(resolve => {
34
- const child = spawn("systemctl", ["--user", ...args], { stdio: ["ignore", "pipe", "ignore"] });
39
+ const child = spawn(command, ["--user", ...args], { stdio: ["ignore", "pipe", "ignore"] });
35
40
  let stdout = "";
41
+ let settled = false;
42
+ const finish = (result: { code: number; stdout: string }) => {
43
+ if (settled) return;
44
+ settled = true;
45
+ clearTimeout(timeout);
46
+ resolve(result);
47
+ };
36
48
  child.stdout.on("data", chunk => (stdout += String(chunk)));
37
- child.once("error", () => resolve({ code: 127, stdout: "" }));
38
- child.once("close", code => resolve({ code: code ?? 1, stdout: stdout.trim() }));
49
+ child.once("error", () => finish({ code: 127, stdout: "" }));
50
+ child.once("close", code => finish({ code: code ?? 1, stdout: stdout.trim() }));
51
+ const timeout = setTimeout(() => {
52
+ child.kill("SIGTERM");
53
+ finish({ code: 124, stdout: stdout.trim() });
54
+ }, SYSTEMCTL_TIMEOUT_MS);
39
55
  });
40
56
  }
41
57
 
@@ -45,7 +61,7 @@ export class SystemdUserManager {
45
61
  configHome: string,
46
62
  private readonly executablePath: string,
47
63
  private readonly sourceArguments: string[] = [],
48
- private readonly run: (args: string[]) => Promise<{ code: number; stdout: string }> = systemctl,
64
+ private readonly run: (args: string[]) => Promise<{ code: number; stdout: string }> = runSystemctlUser,
49
65
  ) {
50
66
  this.unitPath = join(configHome, "systemd", "user", REMOTE_CONTROL_SERVICE);
51
67
  }