@f5-sales-demo/xcsh 19.100.0 → 19.100.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": "@f5-sales-demo/xcsh",
4
- "version": "19.100.0",
4
+ "version": "19.100.1",
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",
@@ -57,13 +57,13 @@
57
57
  "dependencies": {
58
58
  "@agentclientprotocol/sdk": "1.3.0",
59
59
  "@mozilla/readability": "^0.6",
60
- "@f5-sales-demo/xcsh-stats": "19.100.0",
61
- "@f5-sales-demo/pi-agent-core": "19.100.0",
62
- "@f5-sales-demo/pi-ai": "19.100.0",
63
- "@f5-sales-demo/pi-natives": "19.100.0",
64
- "@f5-sales-demo/pi-resource-management": "19.100.0",
65
- "@f5-sales-demo/pi-tui": "19.100.0",
66
- "@f5-sales-demo/pi-utils": "19.100.0",
60
+ "@f5-sales-demo/xcsh-stats": "19.100.1",
61
+ "@f5-sales-demo/pi-agent-core": "19.100.1",
62
+ "@f5-sales-demo/pi-ai": "19.100.1",
63
+ "@f5-sales-demo/pi-natives": "19.100.1",
64
+ "@f5-sales-demo/pi-resource-management": "19.100.1",
65
+ "@f5-sales-demo/pi-tui": "19.100.1",
66
+ "@f5-sales-demo/pi-utils": "19.100.1",
67
67
  "@sinclair/typebox": "^0.34",
68
68
  "@xterm/headless": "^6.0",
69
69
  "ajv": "^8.20",
@@ -222,6 +222,16 @@ export function renderAboutDoc(
222
222
  "at /_llms-txt/{topic}.txt, per-page content at /{slug}.md, plus",
223
223
  "llms-small.txt (compact) and llms-full.txt (complete).",
224
224
  "",
225
+ "Every one of those exists per language as well: {locale}/llms.txt,",
226
+ "{locale}/llms-small.txt, {locale}/llms-full.txt, the tiered sets at",
227
+ "/_llms-txt/{locale}/{topic}.txt, and per-page content at /{locale}/{slug}.md.",
228
+ "The root llms.txt lists the languages under `## Translations`. When the user",
229
+ "is working in a language, read that language's set rather than translating the",
230
+ "default locale's — it is already written in their language. Locale segments",
231
+ "are slugs, not BCP-47 tags (pt-br, zh-cn, zh-tw). The default locale's",
232
+ "complete and abridged documents stay at the repo root, so its",
233
+ "{locale}/llms-full.txt is intentionally absent.",
234
+ "",
225
235
  "## Lineage",
226
236
  "",
227
237
  "xcsh is a fork of [badlogic/pi-mono](https://github.com/badlogic/pi-mono).",
@@ -17,17 +17,17 @@ export interface BuildInfo {
17
17
  }
18
18
 
19
19
  export const BUILD_INFO: BuildInfo = {
20
- "version": "19.100.0",
21
- "commit": "77f25e303dc3b1fa200117333808b1ed95a6927d",
22
- "shortCommit": "77f25e3",
20
+ "version": "19.100.1",
21
+ "commit": "ab1af6daf7fdebc0fd0a193bdae578f0e9395eab",
22
+ "shortCommit": "ab1af6d",
23
23
  "branch": "main",
24
- "tag": "v19.100.0",
25
- "commitDate": "2026-07-28T22:16:47Z",
26
- "buildDate": "2026-07-28T22:49:07.531Z",
24
+ "tag": "v19.100.1",
25
+ "commitDate": "2026-07-29T00:48:34Z",
26
+ "buildDate": "2026-07-29T01:14:16.102Z",
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/77f25e303dc3b1fa200117333808b1ed95a6927d",
32
- "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v19.100.0"
31
+ "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/ab1af6daf7fdebc0fd0a193bdae578f0e9395eab",
32
+ "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v19.100.1"
33
33
  };
@@ -15,6 +15,7 @@ import { renderStatusLine } from "../tui";
15
15
  import { CachedOutputBlock } from "../tui/output-block";
16
16
  import { formatDimensionNote, resizeImage } from "../utils/image-resize";
17
17
  import { ensureTool } from "../utils/tools-manager";
18
+ import { buildLlmEndpointCandidates } from "../web/llms-endpoints";
18
19
  import { extractWithParallel, findParallelApiKey, getParallelExtractContent } from "../web/parallel";
19
20
  import { specialHandlers } from "../web/scrapers";
20
21
  import type { RenderResult } from "../web/scrapers/types";
@@ -97,32 +98,6 @@ function hasCommand(cmd: string): boolean {
97
98
  return Boolean($which(cmd));
98
99
  }
99
100
 
100
- /**
101
- * Build llms.txt candidates scoped to the requested URL
102
- */
103
- function buildLlmEndpointCandidates(url: string): string[] {
104
- try {
105
- const parsed = new URL(url);
106
- if (parsed.pathname === "/") {
107
- return [`${parsed.origin}/.well-known/llms.txt`, `${parsed.origin}/llms.txt`, `${parsed.origin}/llms.md`];
108
- }
109
-
110
- const trimmedPath = parsed.pathname.replace(/\/+$/, "");
111
- const segments = trimmedPath.split("/").filter(Boolean);
112
- const scopeDepth = parsed.pathname.endsWith("/") ? segments.length : Math.max(segments.length - 1, 1);
113
- const endpoints: string[] = [];
114
-
115
- for (let depth = scopeDepth; depth >= 1; depth--) {
116
- const scope = `/${segments.slice(0, depth).join("/")}/`;
117
- endpoints.push(`${parsed.origin}${scope}llms.txt`, `${parsed.origin}${scope}llms.md`);
118
- }
119
-
120
- return endpoints;
121
- } catch {
122
- return [];
123
- }
124
- }
125
-
126
101
  /**
127
102
  * Normalize URL (add scheme if missing)
128
103
  */
@@ -0,0 +1,41 @@
1
+ /**
2
+ * llms.txt endpoint discovery.
3
+ *
4
+ * Kept free of native and network imports so the scope walk can be unit tested
5
+ * on its own: it is the only thing that decides whether a request for a
6
+ * translated page reaches that language's llms.txt index or silently falls back
7
+ * to the default locale's.
8
+ */
9
+
10
+ /**
11
+ * Build llms.txt candidates scoped to the requested URL, deepest scope first.
12
+ *
13
+ * The federated product docs publish an index per language at
14
+ * `<locale>/llms.txt` alongside the one at the repo root, so walking outwards
15
+ * from the deepest path scope is what lets a request for `/mcn/ja/demo/` find
16
+ * the Japanese index before falling back to `/mcn/llms.txt`. Reversing the walk,
17
+ * or capping it at the repository segment, would send every non-default-locale
18
+ * request back to default-locale context.
19
+ */
20
+ export function buildLlmEndpointCandidates(url: string): string[] {
21
+ try {
22
+ const parsed = new URL(url);
23
+ if (parsed.pathname === "/") {
24
+ return [`${parsed.origin}/.well-known/llms.txt`, `${parsed.origin}/llms.txt`, `${parsed.origin}/llms.md`];
25
+ }
26
+
27
+ const trimmedPath = parsed.pathname.replace(/\/+$/, "");
28
+ const segments = trimmedPath.split("/").filter(Boolean);
29
+ const scopeDepth = parsed.pathname.endsWith("/") ? segments.length : Math.max(segments.length - 1, 1);
30
+ const endpoints: string[] = [];
31
+
32
+ for (let depth = scopeDepth; depth >= 1; depth--) {
33
+ const scope = `/${segments.slice(0, depth).join("/")}/`;
34
+ endpoints.push(`${parsed.origin}${scope}llms.txt`, `${parsed.origin}${scope}llms.md`);
35
+ }
36
+
37
+ return endpoints;
38
+ } catch {
39
+ return [];
40
+ }
41
+ }