@f5-sales-demo/xcsh 22.4.7 → 22.4.8

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": "22.4.7",
4
+ "version": "22.4.8",
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",
@@ -67,13 +67,13 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@agentclientprotocol/sdk": "1.4.0",
70
- "@f5-sales-demo/pi-agent-core": "22.4.7",
71
- "@f5-sales-demo/pi-ai": "22.4.7",
72
- "@f5-sales-demo/pi-natives": "22.4.7",
73
- "@f5-sales-demo/pi-resource-management": "22.4.7",
74
- "@f5-sales-demo/pi-tui": "22.4.7",
75
- "@f5-sales-demo/pi-utils": "22.4.7",
76
- "@f5-sales-demo/xcsh-stats": "22.4.7",
70
+ "@f5-sales-demo/pi-agent-core": "22.4.8",
71
+ "@f5-sales-demo/pi-ai": "22.4.8",
72
+ "@f5-sales-demo/pi-natives": "22.4.8",
73
+ "@f5-sales-demo/pi-resource-management": "22.4.8",
74
+ "@f5-sales-demo/pi-tui": "22.4.8",
75
+ "@f5-sales-demo/pi-utils": "22.4.8",
76
+ "@f5-sales-demo/xcsh-stats": "22.4.8",
77
77
  "@mozilla/readability": "^0.6",
78
78
  "@resvg/resvg-wasm": "2.6.2",
79
79
  "@sinclair/typebox": "0.34.52",
@@ -8,6 +8,7 @@
8
8
  // - the CLI-Quick-Start renderer (isDisallowedCliCommand / getDeprecatedClis)
9
9
 
10
10
  import { BRANDING_DEPRECATIONS } from "./internal-urls/branding-index.generated";
11
+ import apiCurlGuidance from "./prompts/system/api-curl-guidance.md" with { type: "text" };
11
12
 
12
13
  interface DeprecationEntry {
13
14
  deprecated: Record<string, string>;
@@ -16,22 +17,6 @@ interface DeprecationEntry {
16
17
 
17
18
  const DEPRECATIONS = BRANDING_DEPRECATIONS as unknown as Record<string, DeprecationEntry>;
18
19
 
19
- /** Markers that identify a command as targeting the F5 XC API. */
20
- const XCSH_API_MARKERS = [
21
- "xcsh_api_url",
22
- "xcsh_api_token",
23
- "apitoken",
24
- ".volterra.io",
25
- ".volterra.us",
26
- "console.ves",
27
- "/api/config/",
28
- "/api/data/",
29
- "/api/web/",
30
- "/api/shape/",
31
- "/api/ml/",
32
- "/api/register/",
33
- ];
34
-
35
20
  // xcsh-native guidance substituted wherever a deprecated command would appear.
36
21
  // Intentionally does NOT echo the deprecated tool name — the substitution exists
37
22
  // precisely so that name never reaches the user through this surface.
@@ -50,14 +35,13 @@ export function getDeprecatedClis(): string[] {
50
35
 
51
36
  /**
52
37
  * True if a command must never be surfaced as an instruction: it invokes a
53
- * deprecated CLI (e.g. vesctl), or it is a raw `curl` against the F5 XC API.
38
+ * deprecated CLI (e.g. vesctl). Supported curl examples remain visible.
54
39
  */
55
40
  export function isDisallowedCliCommand(command: string): boolean {
56
41
  const lower = command.trim().toLowerCase();
57
42
  if (!lower) return false;
58
43
  const leadingToken = lower.split(/\s+/)[0] ?? "";
59
44
  if (getDeprecatedClis().includes(leadingToken)) return true;
60
- if (leadingToken === "curl" && XCSH_API_MARKERS.some(marker => lower.includes(marker))) return true;
61
45
  return false;
62
46
  }
63
47
 
@@ -80,8 +64,10 @@ export function renderDeprecationGuardrails(): string {
80
64
  return [
81
65
  "These deprecations are non-negotiable. Full detail lives at `xcsh://branding` and `xcsh://branding/volterra`, but the rules below apply even when that protocol is never consulted.",
82
66
  "",
83
- `- **Never use \`${vesctl}\`.** It is the abandoned, unsupported legacy CLI; \`${xcshCmd}\` is its modern replacement. Never propose, generate, or run \`${vesctl}\`. For F5 XC API calls use the \`xcsh_api\` tool (never raw \`curl\`); for console automation use \`catalog_workflow_runner\`.`,
67
+ `- **Never use \`${vesctl}\`.** It is the abandoned, unsupported legacy CLI; \`${xcshCmd}\` is its modern replacement. Never propose, generate, or run \`${vesctl}\`. For console automation use \`catalog_workflow_runner\`.`,
84
68
  `- **The legacy API docs are deprecated.** Never link or fetch \`${legacyApiUrl}\`; the canonical human-facing API documentation site is \`${enrichedUrl}\`. For your own API work you rarely need either — the enriched OpenAPI specs ship embedded in this binary: use \`xcsh://api-catalog/\` (operations/CRUD) and \`xcsh://api-spec/\` (schemas) per the routing rules above.`,
85
69
  `- **"${deadBrand}" is a retired brand name.** The product is **${currentBrand}**; never write "${deadBrand}" as a product name or recommend ${deadBrand}-labeled tooling. BUT \`volterra_*\` API keys, \`*.volterra.io\`/\`*.volterra.us\` hostnames, and schema identifiers are **required functional identifiers** — use them verbatim, exactly as the API expects. Only the brand name is dead, not the identifiers.`,
70
+ "",
71
+ apiCurlGuidance.trim(),
86
72
  ].join("\n");
87
73
  }