@f5xc-salesdemos/xcsh 19.38.1 → 19.40.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 +8 -8
- package/src/capability/context-file.ts +3 -4
- package/src/cli/chrome-cli.ts +11 -4
- package/src/commit/agentic/index.ts +1 -1
- package/src/config/settings-schema.ts +0 -1
- package/src/discovery/agents-md.ts +9 -9
- package/src/discovery/builtin.ts +4 -4
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/docs-index.generated.ts +26 -26
- package/src/prompts/agents/init.md +3 -3
- package/src/prompts/system/agent-creation-architect.md +3 -3
- package/src/prompts/system/system-prompt.md +23 -1
- package/src/prompts/tools/xcsh-api.md +5 -2
- package/src/sdk.ts +2 -2
- package/src/system-prompt.ts +4 -4
- package/src/tools/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5xc-salesdemos/xcsh",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.40.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",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@agentclientprotocol/sdk": "0.16.1",
|
|
53
53
|
"@mozilla/readability": "^0.6",
|
|
54
|
-
"@f5xc-salesdemos/xcsh-stats": "19.
|
|
55
|
-
"@f5xc-salesdemos/pi-agent-core": "19.
|
|
56
|
-
"@f5xc-salesdemos/pi-ai": "19.
|
|
57
|
-
"@f5xc-salesdemos/pi-natives": "19.
|
|
58
|
-
"@f5xc-salesdemos/pi-resource-management": "19.
|
|
59
|
-
"@f5xc-salesdemos/pi-tui": "19.
|
|
60
|
-
"@f5xc-salesdemos/pi-utils": "19.
|
|
54
|
+
"@f5xc-salesdemos/xcsh-stats": "19.40.0",
|
|
55
|
+
"@f5xc-salesdemos/pi-agent-core": "19.40.0",
|
|
56
|
+
"@f5xc-salesdemos/pi-ai": "19.40.0",
|
|
57
|
+
"@f5xc-salesdemos/pi-natives": "19.40.0",
|
|
58
|
+
"@f5xc-salesdemos/pi-resource-management": "19.40.0",
|
|
59
|
+
"@f5xc-salesdemos/pi-tui": "19.40.0",
|
|
60
|
+
"@f5xc-salesdemos/pi-utils": "19.40.0",
|
|
61
61
|
"@sinclair/typebox": "^0.34",
|
|
62
62
|
"@xterm/headless": "^6.0",
|
|
63
63
|
"ajv": "^8.20",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Context Files Capability
|
|
3
3
|
*
|
|
4
|
-
* System instruction files (
|
|
5
|
-
* persistent guidance to the agent.
|
|
4
|
+
* System instruction files (XCSH.md) that provide persistent guidance to the agent.
|
|
6
5
|
*/
|
|
7
6
|
import * as path from "node:path";
|
|
8
7
|
import { defineCapability } from ".";
|
|
@@ -27,10 +26,10 @@ export interface ContextFile {
|
|
|
27
26
|
export const contextFileCapability = defineCapability<ContextFile>({
|
|
28
27
|
id: "context-files",
|
|
29
28
|
displayName: "Context Files",
|
|
30
|
-
description: "Persistent instruction files (
|
|
29
|
+
description: "Persistent instruction files (XCSH.md) that guide agent behavior",
|
|
31
30
|
// Deduplicate by scope: one user-level file, and one project-level file per directory depth.
|
|
32
31
|
// Within each depth level, higher-priority providers shadow lower-priority ones.
|
|
33
|
-
// This supports monorepo hierarchies where
|
|
32
|
+
// This supports monorepo hierarchies where XCSH.md exists at multiple ancestor levels.
|
|
34
33
|
// Clamp depth >= 0: files inside config subdirectories of an ancestor (e.g. .xcsh/, .github/)
|
|
35
34
|
// are same-scope as the ancestor itself.
|
|
36
35
|
key: file => (file.level === "user" ? "user" : `project:${Math.max(0, file.depth ?? 0)}`),
|
package/src/cli/chrome-cli.ts
CHANGED
|
@@ -15,7 +15,14 @@ type Settings = { get(key: string): unknown };
|
|
|
15
15
|
|
|
16
16
|
export type ChromeAction = "status" | "relaunch" | "setup";
|
|
17
17
|
|
|
18
|
+
// Unpacked (keyed) build — installed from a GitHub release. The manifest `key`
|
|
19
|
+
// pins this deterministic ID.
|
|
18
20
|
export const EXTENSION_ID = "khlalklompggpfnmeclpligmcbknkemg";
|
|
21
|
+
// Chrome Web Store build — the store assigns this ID (no `key` field).
|
|
22
|
+
export const EXTENSION_ID_CWS = "klajkjdoehjidngligegnpknogmjjhkc";
|
|
23
|
+
// Both are allowed in the native-host manifest so the bridge works regardless of
|
|
24
|
+
// how the user installed the extension.
|
|
25
|
+
export const EXTENSION_IDS = [EXTENSION_ID, EXTENSION_ID_CWS];
|
|
19
26
|
|
|
20
27
|
const NATIVE_HOST_NAME = "com.f5xc.xcsh.chrome_host";
|
|
21
28
|
|
|
@@ -29,7 +36,7 @@ export function writeNativeHostManifest(opts: {
|
|
|
29
36
|
platform?: NodeJS.Platform;
|
|
30
37
|
home?: string;
|
|
31
38
|
xcshBinPath: string;
|
|
32
|
-
|
|
39
|
+
extensionIds: string[];
|
|
33
40
|
write?: (p: string, c: string) => void;
|
|
34
41
|
}): { manifestPath: string } {
|
|
35
42
|
const platform = opts.platform ?? process.platform;
|
|
@@ -43,7 +50,7 @@ export function writeNativeHostManifest(opts: {
|
|
|
43
50
|
path: opts.xcshBinPath,
|
|
44
51
|
args: ["chrome-host"],
|
|
45
52
|
type: "stdio",
|
|
46
|
-
allowed_origins:
|
|
53
|
+
allowed_origins: opts.extensionIds.map(id => `chrome-extension://${id}/`),
|
|
47
54
|
};
|
|
48
55
|
const write =
|
|
49
56
|
opts.write ??
|
|
@@ -77,9 +84,9 @@ export async function runChromeCommand(action: ChromeAction, settings: Settings)
|
|
|
77
84
|
if (action === "setup") {
|
|
78
85
|
const { manifestPath } = writeNativeHostManifest({
|
|
79
86
|
xcshBinPath: process.execPath,
|
|
80
|
-
|
|
87
|
+
extensionIds: EXTENSION_IDS,
|
|
81
88
|
});
|
|
82
|
-
return `Installed native-messaging host manifest at ${manifestPath} (
|
|
89
|
+
return `Installed native-messaging host manifest at ${manifestPath} (extensions ${EXTENSION_IDS.join(", ")}). Load the xcsh Chrome extension, then it can drive your real Chrome.`;
|
|
83
90
|
}
|
|
84
91
|
// relaunch: self-consented rung 3 — force allowRelaunch regardless of the setting.
|
|
85
92
|
const { mode } = await acquirePage({ settings, allowRelaunch: true });
|
|
@@ -79,7 +79,7 @@ export async function runAgenticCommit(args: CommitCommandArgs): Promise<void> {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
process.stdout.write("● Discovering context files...\n");
|
|
82
|
-
const agentsMdFiles = contextFiles.filter(file => file.path.endsWith("
|
|
82
|
+
const agentsMdFiles = contextFiles.filter(file => file.path.endsWith("XCSH.md"));
|
|
83
83
|
if (agentsMdFiles.length > 0) {
|
|
84
84
|
for (const file of agentsMdFiles) {
|
|
85
85
|
process.stdout.write(` └─ ${file.path}\n`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* XCSH.md Provider
|
|
3
3
|
*
|
|
4
|
-
* Discovers standalone
|
|
5
|
-
* This handles
|
|
6
|
-
*
|
|
4
|
+
* Discovers standalone XCSH.md files by walking up from cwd.
|
|
5
|
+
* This handles XCSH.md files that live in the project root (the human-editable
|
|
6
|
+
* agent init file), not in config directories.
|
|
7
7
|
*/
|
|
8
8
|
import * as path from "node:path";
|
|
9
9
|
import { registerProvider } from "../capability";
|
|
@@ -13,20 +13,20 @@ import type { LoadContext, LoadResult } from "../capability/types";
|
|
|
13
13
|
import { calculateDepth, createSourceMeta } from "./helpers";
|
|
14
14
|
|
|
15
15
|
const PROVIDER_ID = "agents-md";
|
|
16
|
-
const DISPLAY_NAME = "
|
|
16
|
+
const DISPLAY_NAME = "XCSH.md";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Load standalone
|
|
19
|
+
* Load standalone XCSH.md files.
|
|
20
20
|
*/
|
|
21
21
|
async function loadAgentsMd(ctx: LoadContext): Promise<LoadResult<ContextFile>> {
|
|
22
22
|
const items: ContextFile[] = [];
|
|
23
23
|
const warnings: string[] = [];
|
|
24
24
|
|
|
25
|
-
// Walk up from cwd looking for
|
|
25
|
+
// Walk up from cwd looking for XCSH.md files
|
|
26
26
|
let current = ctx.cwd;
|
|
27
27
|
|
|
28
28
|
while (true) {
|
|
29
|
-
const candidate = path.join(current, "
|
|
29
|
+
const candidate = path.join(current, "XCSH.md");
|
|
30
30
|
const content = await readFile(candidate);
|
|
31
31
|
|
|
32
32
|
if (content !== null) {
|
|
@@ -61,7 +61,7 @@ async function loadAgentsMd(ctx: LoadContext): Promise<LoadResult<ContextFile>>
|
|
|
61
61
|
registerProvider(contextFileCapability.id, {
|
|
62
62
|
id: PROVIDER_ID,
|
|
63
63
|
displayName: DISPLAY_NAME,
|
|
64
|
-
description: "Standalone
|
|
64
|
+
description: "Standalone XCSH.md files (project-root agent init file)",
|
|
65
65
|
priority: 10,
|
|
66
66
|
load: loadAgentsMd,
|
|
67
67
|
});
|
package/src/discovery/builtin.ts
CHANGED
|
@@ -808,12 +808,12 @@ registerProvider<Settings>(settingsCapability.id, {
|
|
|
808
808
|
load: loadSettings,
|
|
809
809
|
});
|
|
810
810
|
|
|
811
|
-
// Context Files (
|
|
811
|
+
// Context Files (XCSH.md)
|
|
812
812
|
async function loadContextFiles(ctx: LoadContext): Promise<LoadResult<ContextFile>> {
|
|
813
813
|
const items: ContextFile[] = [];
|
|
814
814
|
const warnings: string[] = [];
|
|
815
815
|
|
|
816
|
-
const userPath = path.join(ctx.home, PATHS.userAgent, "
|
|
816
|
+
const userPath = path.join(ctx.home, PATHS.userAgent, "XCSH.md");
|
|
817
817
|
const userContent = await readFile(userPath);
|
|
818
818
|
if (userContent) {
|
|
819
819
|
items.push({
|
|
@@ -826,7 +826,7 @@ async function loadContextFiles(ctx: LoadContext): Promise<LoadResult<ContextFil
|
|
|
826
826
|
|
|
827
827
|
const nearestProjectConfigDir = await findNearestProjectConfigDir(ctx.cwd, ctx.repoRoot);
|
|
828
828
|
if (nearestProjectConfigDir) {
|
|
829
|
-
const projectPath = path.join(nearestProjectConfigDir.dir, "
|
|
829
|
+
const projectPath = path.join(nearestProjectConfigDir.dir, "XCSH.md");
|
|
830
830
|
const projectContent = await readFile(projectPath);
|
|
831
831
|
if (projectContent) {
|
|
832
832
|
items.push({
|
|
@@ -845,7 +845,7 @@ async function loadContextFiles(ctx: LoadContext): Promise<LoadResult<ContextFil
|
|
|
845
845
|
registerProvider<ContextFile>(contextFileCapability.id, {
|
|
846
846
|
id: PROVIDER_ID,
|
|
847
847
|
displayName: DISPLAY_NAME,
|
|
848
|
-
description: "Load
|
|
848
|
+
description: "Load XCSH.md from .xcsh/ directories",
|
|
849
849
|
priority: PRIORITY,
|
|
850
850
|
load: loadContextFiles,
|
|
851
851
|
});
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "19.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "19.40.0",
|
|
21
|
+
"commit": "e25f0c5f25c2bc47d8e50a69b4ad6ac4edc7c3e5",
|
|
22
|
+
"shortCommit": "e25f0c5",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v19.
|
|
25
|
-
"commitDate": "2026-06-
|
|
26
|
-
"buildDate": "2026-06-
|
|
24
|
+
"tag": "v19.40.0",
|
|
25
|
+
"commitDate": "2026-06-22T20:09:25Z",
|
|
26
|
+
"buildDate": "2026-06-22T20:31:47.773Z",
|
|
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/v19.
|
|
31
|
+
"commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/e25f0c5f25c2bc47d8e50a69b4ad6ac4edc7c3e5",
|
|
32
|
+
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v19.40.0"
|
|
33
33
|
};
|