@f5xc-salesdemos/xcsh 18.78.0 → 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.
|
|
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.
|
|
52
|
-
"@f5xc-salesdemos/pi-agent-core": "18.
|
|
53
|
-
"@f5xc-salesdemos/pi-ai": "18.
|
|
54
|
-
"@f5xc-salesdemos/pi-natives": "18.
|
|
55
|
-
"@f5xc-salesdemos/pi-tui": "18.
|
|
56
|
-
"@f5xc-salesdemos/pi-utils": "18.
|
|
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.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "18.79.0",
|
|
21
|
+
"commit": "cc280f31122399fcfa7cde248777d0430b721bc7",
|
|
22
|
+
"shortCommit": "cc280f3",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v18.
|
|
25
|
-
"commitDate": "2026-05-
|
|
26
|
-
"buildDate": "2026-05-
|
|
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/
|
|
32
|
-
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.
|
|
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
|
*/
|
package/src/tools/xcsh-api.ts
CHANGED
|
@@ -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
|