@f5-sales-demo/xcsh 19.51.6 → 19.52.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 +12 -11
- package/scripts/generate-api-spec-index.ts +1 -1
- package/scripts/generate-extension-capabilities.ts +73 -0
- package/src/browser/capabilities.generated.ts +715 -0
- package/src/browser/capabilities.json +686 -0
- package/src/browser/extension-contract.ts +48 -0
- package/src/browser/extension-page-actions.ts +22 -0
- package/src/browser/extension-provider.ts +55 -1
- package/src/browser/page-actions.ts +10 -0
- package/src/browser/presentation-profile.ts +50 -0
- package/src/bun-path.ts +7 -0
- package/src/config/settings-schema.ts +10 -0
- package/src/extensibility/plugins/installer.ts +3 -2
- package/src/extensibility/plugins/manager.ts +4 -3
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/xcsh-protocol.ts +19 -0
- package/src/modes/rpc/rpc-client.ts +2 -1
- package/src/prompts/system/system-prompt.md +10 -0
- package/src/prompts/tools/catalog-workflow-runner.md +1 -1
- package/src/tools/catalog-workflow-runner.ts +57 -25
- package/src/tools/index.ts +2 -0
- package/src/tools/set-presentation-profile.ts +42 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.52.0",
|
|
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",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"xcsh": "src/cli.ts"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "bun run generate-build-info && bun run generate-api-spec-index && bun run generate-branding-index && bun run generate-terraform-index && bun run generate-console-catalog && bun run generate-console-field-metadata && test -f src/internal-urls/api-spec-index.generated.ts && bun --cwd=../stats scripts/generate-client-bundle.ts --generate && bun --cwd=../natives run embed:native && bun build --compile --define PI_COMPILED=true --external mupdf --root ../.. ./src/cli.ts --outfile dist/xcsh && bun --cwd=../natives run embed:native --reset && bun --cwd=../stats scripts/generate-client-bundle.ts --reset",
|
|
34
|
+
"build": "bun run generate-build-info && bun run generate-extension-capabilities && bun run generate-api-spec-index && bun run generate-branding-index && bun run generate-terraform-index && bun run generate-console-catalog && bun run generate-console-field-metadata && test -f src/internal-urls/api-spec-index.generated.ts && bun --cwd=../stats scripts/generate-client-bundle.ts --generate && bun --cwd=../natives run embed:native && bun build --compile --define PI_COMPILED=true --external mupdf --root ../.. ./src/cli.ts --outfile dist/xcsh && bun --cwd=../natives run embed:native --reset && bun --cwd=../stats scripts/generate-client-bundle.ts --reset",
|
|
35
35
|
"check": "biome check . && bun run format-prompts -- --check && bun run check:types",
|
|
36
|
-
"check:types": "bun run generate-build-info && bun run generate-api-spec-index && bun run generate-branding-index && bun run generate-terraform-index && tsgo -p tsconfig.json --noEmit",
|
|
36
|
+
"check:types": "bun run generate-build-info && bun run generate-extension-capabilities && bun run generate-api-spec-index && bun run generate-branding-index && bun run generate-terraform-index && tsgo -p tsconfig.json --noEmit",
|
|
37
37
|
"lint": "biome lint .",
|
|
38
|
-
"test": "bun run generate-build-info && bun run generate-api-spec-index && bun run generate-console-catalog && bun run generate-console-field-metadata && bun test --max-concurrency 4",
|
|
38
|
+
"test": "bun run generate-build-info && bun run generate-extension-capabilities && bun run generate-api-spec-index && bun run generate-console-catalog && bun run generate-console-field-metadata && bun test --max-concurrency 4",
|
|
39
39
|
"fix": "biome check --write --unsafe . && bun run format-prompts && bun run generate-docs-index && bun run generate-api-spec-index && bun run generate-build-info",
|
|
40
40
|
"fmt": "biome format --write . && bun run format-prompts",
|
|
41
41
|
"format-prompts": "bun scripts/format-prompts.ts",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"generate-api-spec-index": "bun scripts/generate-api-spec-index.ts",
|
|
45
45
|
"generate-branding-index": "bun scripts/generate-branding-index.ts",
|
|
46
46
|
"generate-build-info": "bun scripts/generate-build-info.ts",
|
|
47
|
+
"generate-extension-capabilities": "bun scripts/generate-extension-capabilities.ts",
|
|
47
48
|
"generate-terraform-index": "bun scripts/generate-terraform-index.ts",
|
|
48
49
|
"generate-console-catalog": "bun scripts/generate-console-catalog.ts",
|
|
49
50
|
"generate-console-field-metadata": "bun scripts/generate-console-field-metadata.ts",
|
|
@@ -54,13 +55,13 @@
|
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"@agentclientprotocol/sdk": "0.16.1",
|
|
56
57
|
"@mozilla/readability": "^0.6",
|
|
57
|
-
"@f5-sales-demo/xcsh-stats": "19.
|
|
58
|
-
"@f5-sales-demo/pi-agent-core": "19.
|
|
59
|
-
"@f5-sales-demo/pi-ai": "19.
|
|
60
|
-
"@f5-sales-demo/pi-natives": "19.
|
|
61
|
-
"@f5-sales-demo/pi-resource-management": "19.
|
|
62
|
-
"@f5-sales-demo/pi-tui": "19.
|
|
63
|
-
"@f5-sales-demo/pi-utils": "19.
|
|
58
|
+
"@f5-sales-demo/xcsh-stats": "19.52.0",
|
|
59
|
+
"@f5-sales-demo/pi-agent-core": "19.52.0",
|
|
60
|
+
"@f5-sales-demo/pi-ai": "19.52.0",
|
|
61
|
+
"@f5-sales-demo/pi-natives": "19.52.0",
|
|
62
|
+
"@f5-sales-demo/pi-resource-management": "19.52.0",
|
|
63
|
+
"@f5-sales-demo/pi-tui": "19.52.0",
|
|
64
|
+
"@f5-sales-demo/pi-utils": "19.52.0",
|
|
64
65
|
"@sinclair/typebox": "^0.34",
|
|
65
66
|
"@xterm/headless": "^6.0",
|
|
66
67
|
"ajv": "^8.20",
|
|
@@ -150,7 +150,7 @@ async function downloadFromRelease(): Promise<string> {
|
|
|
150
150
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "api-specs-"));
|
|
151
151
|
downloadedTmpDir = tmpDir;
|
|
152
152
|
const tag = process.env.API_SPECS_TAG ?? (await resolveLatestTag());
|
|
153
|
-
const zipName = `
|
|
153
|
+
const zipName = `f5xc-api-specs-${tag}.zip`;
|
|
154
154
|
const downloadUrl = `https://github.com/${REPO}/releases/download/${tag}/${zipName}`;
|
|
155
155
|
|
|
156
156
|
console.log(`Downloading API specs from ${downloadUrl}...`);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generate the typed, baked-in copy of the Chrome extension's capability contract.
|
|
5
|
+
*
|
|
6
|
+
* Source of truth is the extension's `capabilities.json`. When the sibling
|
|
7
|
+
* `xcsh-chrome-extension` repo is checked out (the ecosystem is built together),
|
|
8
|
+
* its freshly-built `capabilities.json` is copied into the vendored location so the
|
|
9
|
+
* two binaries ship the same contract; otherwise the committed vendored copy is
|
|
10
|
+
* used (CI / standalone). The result is emitted as `capabilities.generated.ts` and
|
|
11
|
+
* compiled into the xcsh binary.
|
|
12
|
+
*
|
|
13
|
+
* bun scripts/generate-extension-capabilities.ts
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import * as fs from "node:fs";
|
|
17
|
+
import * as path from "node:path";
|
|
18
|
+
|
|
19
|
+
const here = import.meta.dir; // packages/coding-agent/scripts
|
|
20
|
+
const vendoredPath = path.resolve(here, "../src/browser/capabilities.json");
|
|
21
|
+
const generatedPath = path.resolve(here, "../src/browser/capabilities.generated.ts");
|
|
22
|
+
|
|
23
|
+
// Co-build refresh: prefer the sibling extension's freshly-built contract.
|
|
24
|
+
const siblingPath =
|
|
25
|
+
process.env.XCSH_EXTENSION_CAPABILITIES ?? path.resolve(here, "../../../../xcsh-chrome-extension/capabilities.json");
|
|
26
|
+
if (fs.existsSync(siblingPath) && path.resolve(siblingPath) !== vendoredPath) {
|
|
27
|
+
fs.copyFileSync(siblingPath, vendoredPath);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const manifest = JSON.parse(fs.readFileSync(vendoredPath, "utf8")) as {
|
|
31
|
+
contractVersion: string;
|
|
32
|
+
tools: Array<{ name: string }>;
|
|
33
|
+
};
|
|
34
|
+
const toolNames = manifest.tools.map(t => t.name);
|
|
35
|
+
|
|
36
|
+
const output = [
|
|
37
|
+
"// Auto-generated by scripts/generate-extension-capabilities.ts - DO NOT EDIT",
|
|
38
|
+
"// Source: src/browser/capabilities.json (the Chrome extension's published contract).",
|
|
39
|
+
"",
|
|
40
|
+
"export interface ExtensionToolFlags {",
|
|
41
|
+
"\treadonly readOnly?: boolean;",
|
|
42
|
+
"\treadonly mutates?: boolean;",
|
|
43
|
+
"\treadonly requiresExplainMode?: boolean;",
|
|
44
|
+
"}",
|
|
45
|
+
"",
|
|
46
|
+
"export interface ExtensionToolDef {",
|
|
47
|
+
"\treadonly name: string;",
|
|
48
|
+
"\treadonly summary: string;",
|
|
49
|
+
"\treadonly category: string;",
|
|
50
|
+
"\treadonly params: Record<string, unknown>;",
|
|
51
|
+
"\treadonly flags?: ExtensionToolFlags;",
|
|
52
|
+
"}",
|
|
53
|
+
"",
|
|
54
|
+
"export interface ExtensionCapabilities {",
|
|
55
|
+
"\treadonly version: string;",
|
|
56
|
+
"\treadonly contractVersion: string;",
|
|
57
|
+
"\treadonly protocol: string;",
|
|
58
|
+
"\treadonly tools: readonly ExtensionToolDef[];",
|
|
59
|
+
"\treadonly features: Record<string, unknown>;",
|
|
60
|
+
"}",
|
|
61
|
+
"",
|
|
62
|
+
`export const EXTENSION_CAPABILITIES: ExtensionCapabilities = ${JSON.stringify(manifest, null, "\t")};`,
|
|
63
|
+
"",
|
|
64
|
+
`export const EXTENSION_CONTRACT_VERSION = ${JSON.stringify(manifest.contractVersion)};`,
|
|
65
|
+
"",
|
|
66
|
+
`export const EXTENSION_TOOL_NAMES: readonly string[] = ${JSON.stringify(toolNames)};`,
|
|
67
|
+
"",
|
|
68
|
+
].join("\n");
|
|
69
|
+
|
|
70
|
+
await Bun.write(generatedPath, output);
|
|
71
|
+
console.log(
|
|
72
|
+
`Generated ${path.relative(process.cwd(), generatedPath)} (${toolNames.length} tools, contract ${manifest.contractVersion})`,
|
|
73
|
+
);
|