@f5xc-salesdemos/xcsh 18.37.0 → 18.37.1

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": "@f5xc-salesdemos/xcsh",
4
- "version": "18.37.0",
4
+ "version": "18.37.1",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/f5xc-salesdemos/xcsh",
7
7
  "author": "Can Boluk",
@@ -48,12 +48,12 @@
48
48
  "dependencies": {
49
49
  "@agentclientprotocol/sdk": "0.16.1",
50
50
  "@mozilla/readability": "^0.6",
51
- "@f5xc-salesdemos/xcsh-stats": "18.37.0",
52
- "@f5xc-salesdemos/pi-agent-core": "18.37.0",
53
- "@f5xc-salesdemos/pi-ai": "18.37.0",
54
- "@f5xc-salesdemos/pi-natives": "18.37.0",
55
- "@f5xc-salesdemos/pi-tui": "18.37.0",
56
- "@f5xc-salesdemos/pi-utils": "18.37.0",
51
+ "@f5xc-salesdemos/xcsh-stats": "18.37.1",
52
+ "@f5xc-salesdemos/pi-agent-core": "18.37.1",
53
+ "@f5xc-salesdemos/pi-ai": "18.37.1",
54
+ "@f5xc-salesdemos/pi-natives": "18.37.1",
55
+ "@f5xc-salesdemos/pi-tui": "18.37.1",
56
+ "@f5xc-salesdemos/pi-utils": "18.37.1",
57
57
  "@sinclair/typebox": "^0.34",
58
58
  "@xterm/headless": "^6.0",
59
59
  "ajv": "^8.18",
@@ -17,17 +17,17 @@ export interface BuildInfo {
17
17
  }
18
18
 
19
19
  export const BUILD_INFO: BuildInfo = {
20
- "version": "18.37.0",
21
- "commit": "b0029e7c03c357e5da1c25e622408964845c0230",
22
- "shortCommit": "b0029e7",
20
+ "version": "18.37.1",
21
+ "commit": "f8fdc560fa88d310e9c7f39ed258471a9a01d892",
22
+ "shortCommit": "f8fdc56",
23
23
  "branch": "main",
24
- "tag": "v18.37.0",
25
- "commitDate": "2026-05-04T07:12:51Z",
26
- "buildDate": "2026-05-04T07:31:37.330Z",
24
+ "tag": "v18.37.1",
25
+ "commitDate": "2026-05-04T14:41:09Z",
26
+ "buildDate": "2026-05-04T15:10:02.388Z",
27
27
  "dirty": false,
28
28
  "prNumber": "",
29
29
  "repoUrl": "https://github.com/f5xc-salesdemos/xcsh",
30
30
  "repoSlug": "f5xc-salesdemos/xcsh",
31
- "commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/b0029e7c03c357e5da1c25e622408964845c0230",
32
- "releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.37.0"
31
+ "commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/f8fdc560fa88d310e9c7f39ed258471a9a01d892",
32
+ "releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.37.1"
33
33
  };
@@ -38,33 +38,41 @@ export class XcshApiTool implements AgentTool<typeof xcshApiSchema, XcshApiToolD
38
38
  readonly description: string;
39
39
  readonly parameters = xcshApiSchema;
40
40
 
41
- #apiBase: string;
42
- #apiToken: string;
43
41
  #contextEnv: ReturnType<typeof createContextEnv>;
44
42
 
45
43
  constructor(session: ToolSession) {
46
44
  this.description = prompt.render(xcshApiDescription);
47
- this.#apiBase = (process.env.F5XC_API_URL ?? "").replace(/\/+$/, "");
48
- this.#apiToken = process.env.F5XC_API_TOKEN ?? "";
49
45
  this.#contextEnv = createContextEnv(session.settings);
50
46
 
51
- if (this.#apiBase && this.#apiToken) {
52
- fetch(`${this.#apiBase}/api/web/namespaces`, {
47
+ const apiBase = this.#resolveApiBase();
48
+ const apiToken = this.#resolveApiToken();
49
+ if (apiBase && apiToken) {
50
+ fetch(`${apiBase}/api/web/namespaces`, {
53
51
  method: "HEAD",
54
- headers: { Authorization: `APIToken ${this.#apiToken}` },
52
+ headers: { Authorization: `APIToken ${apiToken}` },
55
53
  }).catch(() => {});
56
54
  }
57
55
  }
58
56
 
57
+ #resolveApiBase(): string {
58
+ return (process.env.F5XC_API_URL ?? this.#contextEnv.get("F5XC_API_URL") ?? "").replace(/\/+$/, "");
59
+ }
60
+
61
+ #resolveApiToken(): string {
62
+ return process.env.F5XC_API_TOKEN ?? this.#contextEnv.get("F5XC_API_TOKEN") ?? "";
63
+ }
64
+
59
65
  async execute(_toolCallId: string, params: XcshApiParams): Promise<XcshApiResult> {
60
- if (!this.#apiBase) {
66
+ const apiBase = this.#resolveApiBase();
67
+ if (!apiBase) {
61
68
  return {
62
69
  content: [{ type: "text", text: "Error: F5XC_API_URL environment variable is not set." }],
63
70
  isError: true,
64
71
  };
65
72
  }
66
73
 
67
- if (!this.#apiToken) {
74
+ const apiToken = this.#resolveApiToken();
75
+ if (!apiToken) {
68
76
  return {
69
77
  content: [{ type: "text", text: "Error: F5XC_API_TOKEN environment variable is not set." }],
70
78
  isError: true,
@@ -73,10 +81,10 @@ export class XcshApiTool implements AgentTool<typeof xcshApiSchema, XcshApiToolD
73
81
 
74
82
  const resolvedPath = this.#contextEnv.resolvePath(params.path, params.params);
75
83
 
76
- const url = `${this.#apiBase}${resolvedPath}`;
84
+ const url = `${apiBase}${resolvedPath}`;
77
85
  const requestId = crypto.randomUUID();
78
86
  const headers: Record<string, string> = {
79
- Authorization: `APIToken ${this.#apiToken}`,
87
+ Authorization: `APIToken ${apiToken}`,
80
88
  Accept: "application/json",
81
89
  "X-Request-ID": requestId,
82
90
  };