@f5xc-salesdemos/xcsh 18.40.2 → 18.41.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.
|
|
4
|
+
"version": "18.41.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.
|
|
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.41.1",
|
|
52
|
+
"@f5xc-salesdemos/pi-agent-core": "18.41.1",
|
|
53
|
+
"@f5xc-salesdemos/pi-ai": "18.41.1",
|
|
54
|
+
"@f5xc-salesdemos/pi-natives": "18.41.1",
|
|
55
|
+
"@f5xc-salesdemos/pi-tui": "18.41.1",
|
|
56
|
+
"@f5xc-salesdemos/pi-utils": "18.41.1",
|
|
57
57
|
"@sinclair/typebox": "^0.34",
|
|
58
58
|
"@xterm/headless": "^6.0",
|
|
59
59
|
"ajv": "^8.18",
|
package/src/edit/renderer.ts
CHANGED
|
@@ -457,7 +457,7 @@ export const editToolRenderer = {
|
|
|
457
457
|
return {
|
|
458
458
|
render(width: number) {
|
|
459
459
|
const text = header + getCallPreview(args, rawPath, uiTheme, width);
|
|
460
|
-
return text.split("\n");
|
|
460
|
+
return width > 0 ? text.split("\n").flatMap(line => wrapEditRendererLine(line, width)) : text.split("\n");
|
|
461
461
|
},
|
|
462
462
|
invalidate() {},
|
|
463
463
|
};
|
|
@@ -334,6 +334,8 @@ function renderResourceSpec(
|
|
|
334
334
|
const jsonContent = content?.["application/json"];
|
|
335
335
|
if (jsonContent?.schema) {
|
|
336
336
|
const schema = resolveSchemaRef(jsonContent.schema as Record<string, unknown>, spec);
|
|
337
|
+
const oneOfStr = renderOneOfGroups(schema);
|
|
338
|
+
if (oneOfStr) sections.push(oneOfStr);
|
|
337
339
|
sections.push(renderSchemaAsTable(schema, spec));
|
|
338
340
|
}
|
|
339
341
|
}
|
|
@@ -394,6 +396,48 @@ function resolveSchemaRef(schema: Record<string, unknown>, spec: OpenAPISpec): R
|
|
|
394
396
|
return (resolved as Record<string, unknown>) ?? schema;
|
|
395
397
|
}
|
|
396
398
|
|
|
399
|
+
function formatFieldConstraints(prop: Record<string, unknown>): string {
|
|
400
|
+
const c = prop["x-f5xc-constraints"] as Record<string, unknown> | undefined;
|
|
401
|
+
if (!c) return "";
|
|
402
|
+
const parts: string[] = [];
|
|
403
|
+
if (c.pattern) {
|
|
404
|
+
const p = String(c.pattern);
|
|
405
|
+
parts.push(p.length > 30 ? `pattern: \`${p.slice(0, 30)}…\`` : `pattern: \`${p}\``);
|
|
406
|
+
}
|
|
407
|
+
if (c.maxLength != null) parts.push(`maxLength: ${c.maxLength}`);
|
|
408
|
+
if (c.minLength != null) parts.push(`minLength: ${c.minLength}`);
|
|
409
|
+
if (c.minimum != null) parts.push(`min: ${c.minimum}`);
|
|
410
|
+
if (c.maximum != null) parts.push(`max: ${c.maximum}`);
|
|
411
|
+
if (c.minItems != null) parts.push(`minItems: ${c.minItems}`);
|
|
412
|
+
if (c.maxItems != null) parts.push(`maxItems: ${c.maxItems}`);
|
|
413
|
+
if (c.format) parts.push(`format: ${c.format}`);
|
|
414
|
+
if (Array.isArray(c.enum)) parts.push(`enum: ${(c.enum as string[]).join(", ")}`);
|
|
415
|
+
return parts.join(", ");
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function parseOneOfOptions(val: unknown): string[] {
|
|
419
|
+
if (Array.isArray(val)) return val as string[];
|
|
420
|
+
if (typeof val === "string") {
|
|
421
|
+
try {
|
|
422
|
+
const parsed = JSON.parse(val);
|
|
423
|
+
if (Array.isArray(parsed)) return parsed as string[];
|
|
424
|
+
} catch {}
|
|
425
|
+
}
|
|
426
|
+
return [String(val)];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
function renderOneOfGroups(schema: Record<string, unknown>): string {
|
|
430
|
+
const groups: string[] = [];
|
|
431
|
+
for (const [key, val] of Object.entries(schema)) {
|
|
432
|
+
if (!key.startsWith("x-ves-oneof-field-")) continue;
|
|
433
|
+
const groupName = key.slice("x-ves-oneof-field-".length);
|
|
434
|
+
const options = parseOneOfOptions(val).join(" | ");
|
|
435
|
+
groups.push(`- **${groupName}**: ${options}`);
|
|
436
|
+
}
|
|
437
|
+
if (groups.length === 0) return "";
|
|
438
|
+
return ["**Mutually exclusive — choose one per group:**", ...groups, ""].join("\n");
|
|
439
|
+
}
|
|
440
|
+
|
|
397
441
|
function renderSchemaAsTable(schema: Record<string, unknown>, spec: OpenAPISpec, depth = 0, prefix = ""): string {
|
|
398
442
|
if (depth > SCHEMA_RENDER_MAX_DEPTH) return "";
|
|
399
443
|
|
|
@@ -407,9 +451,11 @@ function renderSchemaAsTable(schema: Record<string, unknown>, spec: OpenAPISpec,
|
|
|
407
451
|
const required = (resolved.required as string[]) ?? [];
|
|
408
452
|
const rows: string[] = [];
|
|
409
453
|
|
|
454
|
+
const oneOfStr = renderOneOfGroups(resolved);
|
|
410
455
|
if (depth === 0) {
|
|
411
|
-
rows.push(
|
|
412
|
-
rows.push("
|
|
456
|
+
if (oneOfStr) rows.push(oneOfStr);
|
|
457
|
+
rows.push("| Field | Type | Required | Constraints | Example | Description |");
|
|
458
|
+
rows.push("|-------|------|----------|-------------|---------|-------------|");
|
|
413
459
|
}
|
|
414
460
|
|
|
415
461
|
for (const [name, prop] of Object.entries(properties)) {
|
|
@@ -418,10 +464,15 @@ function renderSchemaAsTable(schema: Record<string, unknown>, spec: OpenAPISpec,
|
|
|
418
464
|
const type = (fieldProp.type as string) ?? "object";
|
|
419
465
|
const desc = (fieldProp.description as string) ?? "";
|
|
420
466
|
const isRequired = required.includes(name) ? "yes" : "no";
|
|
467
|
+
const constraints = formatFieldConstraints(fieldProp);
|
|
468
|
+
const rawExample = (fieldProp["x-ves-example"] as string) ?? (fieldProp["x-f5xc-example"] as string) ?? "";
|
|
469
|
+
const example = rawExample.length > 40 ? `${rawExample.slice(0, 37)}…` : rawExample;
|
|
421
470
|
|
|
422
|
-
rows.push(`| ${fieldName} | ${type} | ${isRequired} | ${desc} |`);
|
|
471
|
+
rows.push(`| ${fieldName} | ${type} | ${isRequired} | ${constraints} | ${example} | ${desc} |`);
|
|
423
472
|
|
|
424
473
|
if (type === "object" && fieldProp.properties && depth < SCHEMA_RENDER_MAX_DEPTH) {
|
|
474
|
+
const nestedOneOf = renderOneOfGroups(fieldProp);
|
|
475
|
+
if (nestedOneOf) rows.push("", nestedOneOf);
|
|
425
476
|
const nested = renderSchemaAsTable(fieldProp, spec, depth + 1, fieldName);
|
|
426
477
|
const nestedLines = nested.split("\n").filter(l => l.startsWith("|") && !l.startsWith("| Field"));
|
|
427
478
|
rows.push(...nestedLines);
|
|
@@ -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.41.1",
|
|
21
|
+
"commit": "7dc812d262a4be86c13968193803ffe2fb19b91b",
|
|
22
|
+
"shortCommit": "7dc812d",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v18.
|
|
25
|
-
"commitDate": "2026-05-
|
|
26
|
-
"buildDate": "2026-05-
|
|
24
|
+
"tag": "v18.41.1",
|
|
25
|
+
"commitDate": "2026-05-05T15:09:44Z",
|
|
26
|
+
"buildDate": "2026-05-05T15:33:02.304Z",
|
|
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/
|
|
32
|
-
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.
|
|
31
|
+
"commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/7dc812d262a4be86c13968193803ffe2fb19b91b",
|
|
32
|
+
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.41.1"
|
|
33
33
|
};
|