@f5xc-salesdemos/xcsh 18.77.5 → 18.79.0

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.77.5",
4
+ "version": "18.79.0",
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.77.5",
52
- "@f5xc-salesdemos/pi-agent-core": "18.77.5",
53
- "@f5xc-salesdemos/pi-ai": "18.77.5",
54
- "@f5xc-salesdemos/pi-natives": "18.77.5",
55
- "@f5xc-salesdemos/pi-tui": "18.77.5",
56
- "@f5xc-salesdemos/pi-utils": "18.77.5",
51
+ "@f5xc-salesdemos/xcsh-stats": "18.79.0",
52
+ "@f5xc-salesdemos/pi-agent-core": "18.79.0",
53
+ "@f5xc-salesdemos/pi-ai": "18.79.0",
54
+ "@f5xc-salesdemos/pi-natives": "18.79.0",
55
+ "@f5xc-salesdemos/pi-tui": "18.79.0",
56
+ "@f5xc-salesdemos/pi-utils": "18.79.0",
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.77.5",
21
- "commit": "9d5df6ccedc2df7a8dfd59c21489a8b208804e27",
22
- "shortCommit": "9d5df6c",
20
+ "version": "18.79.0",
21
+ "commit": "cc280f31122399fcfa7cde248777d0430b721bc7",
22
+ "shortCommit": "cc280f3",
23
23
  "branch": "main",
24
- "tag": "v18.77.5",
25
- "commitDate": "2026-05-24T00:50:34Z",
26
- "buildDate": "2026-05-24T01:18:57.755Z",
24
+ "tag": "v18.79.0",
25
+ "commitDate": "2026-05-24T21:32:29Z",
26
+ "buildDate": "2026-05-24T21:50:49.956Z",
27
27
  "dirty": true,
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/9d5df6ccedc2df7a8dfd59c21489a8b208804e27",
32
- "releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.77.5"
31
+ "commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/cc280f31122399fcfa7cde248777d0430b721bc7",
32
+ "releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.79.0"
33
33
  };
@@ -376,6 +376,18 @@ export class RpcClient {
376
376
  return this.#getData<{ models: ModelInfo[] }>(response).models;
377
377
  }
378
378
 
379
+ /**
380
+ * Get integration health status (F5 XC Context, GitLab, GitHub, Salesforce, Azure, AWS, Google Cloud).
381
+ */
382
+ async getIntegrations(): Promise<{
383
+ version: string;
384
+ model: { state: "no_provider" | "connected" | "auth_error"; provider?: string; latencyMs?: number };
385
+ services: Array<{ name: string; state: "connected" | "unauthenticated" | "unavailable"; hint?: string }>;
386
+ }> {
387
+ const response = await this.#send({ type: "get_integrations" });
388
+ return this.#getData(response);
389
+ }
390
+
379
391
  /**
380
392
  * Set thinking level.
381
393
  */
@@ -10,7 +10,7 @@
10
10
  * - Events: AgentSessionEvent objects streamed as they occur
11
11
  * - Extension UI: Extension UI requests are emitted, client responds with extension_ui_response
12
12
  */
13
- import { $env, readJsonl, Snowflake } from "@f5xc-salesdemos/pi-utils";
13
+ import { $env, getProjectDir, readJsonl, Snowflake, VERSION } from "@f5xc-salesdemos/pi-utils";
14
14
  import type {
15
15
  ExtensionUIContext,
16
16
  ExtensionUIDialogOptions,
@@ -18,6 +18,22 @@ import type {
18
18
  } from "../../extensibility/extensions";
19
19
  import { type Theme, theme } from "../../modes/theme/theme";
20
20
  import type { AgentSession } from "../../session/agent-session";
21
+ import {
22
+ checkAwsStatus,
23
+ checkAzureStatus,
24
+ checkGcloudStatus,
25
+ checkGitHubStatus,
26
+ checkGitLabStatus,
27
+ checkSalesforceStatus,
28
+ mapAwsStatus,
29
+ mapAzureStatus,
30
+ mapContextStatus,
31
+ mapGcloudStatus,
32
+ mapGitHubStatus,
33
+ mapGitLabStatus,
34
+ mapSalesforceStatus,
35
+ runWelcomeChecks,
36
+ } from "../components/welcome-checks";
21
37
  import { isRpcHostToolResult, isRpcHostToolUpdate, RpcHostToolBridge } from "./host-tools";
22
38
  import type {
23
39
  RpcCommand,
@@ -143,7 +159,7 @@ export function requestRpcEditor(
143
159
  */
144
160
  export async function runRpcMode(session: AgentSession): Promise<never> {
145
161
  // Signal to RPC clients that the server is ready to accept commands
146
- process.stdout.write(`${JSON.stringify({ type: "ready" })}\n`);
162
+ process.stdout.write(`${JSON.stringify({ type: "ready", version: VERSION })}\n`);
147
163
  const output = (obj: RpcResponse | RpcExtensionUIRequest | object) => {
148
164
  process.stdout.write(`${JSON.stringify(obj)}\n`);
149
165
  };
@@ -610,6 +626,39 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
610
626
  return success(id, "set_host_tools", { toolNames: tools.map(tool => tool.name) });
611
627
  }
612
628
 
629
+ case "get_integrations": {
630
+ const cwd = getProjectDir();
631
+ const [welcomeResult, gitlabStatus, salesforceStatus, githubStatus, azureStatus, awsStatus, gcloudStatus] =
632
+ await Promise.all([
633
+ runWelcomeChecks(session.model, session.modelRegistry.authStorage),
634
+ checkGitLabStatus(cwd).catch(() => undefined),
635
+ checkSalesforceStatus(cwd).catch(() => undefined),
636
+ checkGitHubStatus().catch(() => undefined),
637
+ checkAzureStatus().catch(() => undefined),
638
+ checkAwsStatus().catch(() => undefined),
639
+ checkGcloudStatus().catch(() => undefined),
640
+ ]);
641
+
642
+ const services =
643
+ welcomeResult.model.state === "connected"
644
+ ? [
645
+ mapContextStatus(welcomeResult.context ?? { state: "no_context" }),
646
+ mapGitLabStatus(gitlabStatus),
647
+ mapGitHubStatus(githubStatus),
648
+ mapSalesforceStatus(salesforceStatus),
649
+ mapAzureStatus(azureStatus),
650
+ mapAwsStatus(awsStatus),
651
+ mapGcloudStatus(gcloudStatus),
652
+ ]
653
+ : [];
654
+
655
+ return success(id, "get_integrations", {
656
+ version: VERSION,
657
+ model: welcomeResult.model,
658
+ services,
659
+ });
660
+ }
661
+
613
662
  // =================================================================
614
663
  // Model
615
664
  // =================================================================
@@ -28,6 +28,7 @@ export type RpcCommand =
28
28
  | { id?: string; type: "get_state" }
29
29
  | { id?: string; type: "set_todos"; phases: TodoPhase[] }
30
30
  | { id?: string; type: "set_host_tools"; tools: RpcHostToolDefinition[] }
31
+ | { id?: string; type: "get_integrations" }
31
32
 
32
33
  // Model
33
34
  | { id?: string; type: "set_model"; provider: string; modelId: string }
@@ -109,6 +110,17 @@ export type RpcResponse =
109
110
  | { id?: string; type: "response"; command: "get_state"; success: true; data: RpcSessionState }
110
111
  | { id?: string; type: "response"; command: "set_todos"; success: true; data: { todoPhases: TodoPhase[] } }
111
112
  | { id?: string; type: "response"; command: "set_host_tools"; success: true; data: { toolNames: string[] } }
113
+ | {
114
+ id?: string;
115
+ type: "response";
116
+ command: "get_integrations";
117
+ success: true;
118
+ data: {
119
+ version: string;
120
+ model: { state: "no_provider" | "connected" | "auth_error"; provider?: string; latencyMs?: number };
121
+ services: Array<{ name: string; state: "connected" | "unauthenticated" | "unavailable"; hint?: string }>;
122
+ };
123
+ }
112
124
 
113
125
  // Model
114
126
  | {
@@ -6,6 +6,55 @@ import xcshApiDescription from "../prompts/tools/xcsh-api.md" with { type: "text
6
6
  import { type ContextEnv, createContextEnv } from "../services/context-env";
7
7
  import type { ToolSession } from ".";
8
8
 
9
+ // ── Spec-driven namespace filtering ────────────────────────────────
10
+ // Replaces hardcoded startsWith("ves-io")/startsWith("system")/startsWith("shared")
11
+ // with data-driven classification aligned to x-f5xc-namespace-profile extension.
12
+
13
+ type NamespaceType = "system" | "shared" | "default" | "custom";
14
+
15
+ function namespaceTypeOf(namespaceName: string): NamespaceType {
16
+ if (namespaceName === "system") return "system";
17
+ if (namespaceName === "shared") return "shared";
18
+ if (namespaceName === "default") return "default";
19
+ if (namespaceName.startsWith("ves-io-")) return "system";
20
+ return "custom";
21
+ }
22
+
23
+ /**
24
+ * Default allowed namespace types for multi-namespace batch queries.
25
+ * Matches the default_profile.constraint.allowed from namespace_profile.yaml.
26
+ * When a batch spans multiple resource types we cannot use a single resource's
27
+ * namespace profile, so this safe default excludes system namespaces.
28
+ */
29
+ const DEFAULT_ALLOWED_NS_TYPES: ReadonlySet<NamespaceType> = new Set<NamespaceType>(["custom", "default", "shared"]);
30
+
31
+ /**
32
+ * Look up allowed namespace types from the embedded API spec data.
33
+ * Returns the namespace profile constraint if the spec has x-f5xc-namespace-profile,
34
+ * otherwise returns the default allowed types.
35
+ */
36
+ function loadAllowedNamespaceTypes(domain?: string): ReadonlySet<NamespaceType> {
37
+ if (!domain) return DEFAULT_ALLOWED_NS_TYPES;
38
+ try {
39
+ const mod = require("../internal-urls/api-spec-index.generated") as {
40
+ API_SPEC_DATA?: Readonly<
41
+ Record<
42
+ string,
43
+ { info?: { "x-f5xc-namespace-profile"?: { constraint?: { allowed?: string[] } } }; [k: string]: unknown }
44
+ >
45
+ >;
46
+ };
47
+ const spec = mod.API_SPEC_DATA?.[domain];
48
+ const allowed = spec?.info?.["x-f5xc-namespace-profile"]?.constraint?.allowed;
49
+ if (Array.isArray(allowed) && allowed.length > 0) {
50
+ return new Set(allowed as NamespaceType[]);
51
+ }
52
+ } catch {
53
+ // Spec data unavailable — use default
54
+ }
55
+ return DEFAULT_ALLOWED_NS_TYPES;
56
+ }
57
+
9
58
  const xcshApiSchema = Type.Object({
10
59
  method: Type.Union(
11
60
  [Type.Literal("GET"), Type.Literal("POST"), Type.Literal("PUT"), Type.Literal("PATCH"), Type.Literal("DELETE")],
@@ -170,7 +219,11 @@ export class XcshApiTool implements AgentTool<typeof xcshApiSchema, XcshApiToolD
170
219
  const fetchSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
171
220
  const startMs = performance.now();
172
221
 
173
- // Discover all accessible namespaces
222
+ // Discover all accessible namespaces, filtered by spec-driven namespace profile.
223
+ // Multi-resource batch queries use DEFAULT_ALLOWED_NS_TYPES (custom, default, shared)
224
+ // which excludes system namespaces. When x-f5xc-namespace-profile is present in
225
+ // enriched specs, loadAllowedNamespaceTypes() will use the spec's constraint.
226
+ const allowedTypes = loadAllowedNamespaceTypes();
174
227
  let allNs: string[] = [];
175
228
  try {
176
229
  const nsResp = await fetch(`${apiBase}/api/web/namespaces`, {
@@ -182,13 +235,7 @@ export class XcshApiTool implements AgentTool<typeof xcshApiSchema, XcshApiToolD
182
235
  const nsData = (await nsResp.json()) as { items?: Array<Record<string, unknown>> };
183
236
  allNs = (nsData.items ?? [])
184
237
  .map(item => (typeof item.name === "string" ? item.name : null))
185
- .filter(
186
- (name): name is string =>
187
- name !== null &&
188
- !name.startsWith("ves-io") &&
189
- !name.startsWith("system") &&
190
- !name.startsWith("shared"),
191
- );
238
+ .filter((name): name is string => name !== null && allowedTypes.has(namespaceTypeOf(name)));
192
239
  }
193
240
  } catch {
194
241
  // Fall back to default namespace only