@f5-sales-demo/xcsh 21.11.7 → 21.11.9
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": "21.11.
|
|
4
|
+
"version": "21.11.9",
|
|
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",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
64
|
-
"@f5-sales-demo/pi-agent-core": "21.11.
|
|
65
|
-
"@f5-sales-demo/pi-ai": "21.11.
|
|
66
|
-
"@f5-sales-demo/pi-natives": "21.11.
|
|
67
|
-
"@f5-sales-demo/pi-resource-management": "21.11.
|
|
68
|
-
"@f5-sales-demo/pi-tui": "21.11.
|
|
69
|
-
"@f5-sales-demo/pi-utils": "21.11.
|
|
70
|
-
"@f5-sales-demo/xcsh-stats": "21.11.
|
|
64
|
+
"@f5-sales-demo/pi-agent-core": "21.11.9",
|
|
65
|
+
"@f5-sales-demo/pi-ai": "21.11.9",
|
|
66
|
+
"@f5-sales-demo/pi-natives": "21.11.9",
|
|
67
|
+
"@f5-sales-demo/pi-resource-management": "21.11.9",
|
|
68
|
+
"@f5-sales-demo/pi-tui": "21.11.9",
|
|
69
|
+
"@f5-sales-demo/pi-utils": "21.11.9",
|
|
70
|
+
"@f5-sales-demo/xcsh-stats": "21.11.9",
|
|
71
71
|
"@mozilla/readability": "^0.6",
|
|
72
72
|
"@sinclair/typebox": "^0.34",
|
|
73
73
|
"@xterm/headless": "^6.0",
|
package/src/cli/args.ts
CHANGED
|
@@ -446,7 +446,7 @@ export function getExtraHelpText(): string {
|
|
|
446
446
|
PI_NO_PTY - Disable PTY-based interactive bash execution
|
|
447
447
|
|
|
448
448
|
For complete environment variable reference, see:
|
|
449
|
-
${chalk.dim("docs/environment-
|
|
449
|
+
${chalk.dim("docs/en/configure-secure/environment-reference.mdx")}
|
|
450
450
|
${chalk.bold("Available Tools (default-enabled unless noted):")}
|
|
451
451
|
read - Read file contents
|
|
452
452
|
bash - Execute bash commands
|
|
@@ -60,6 +60,7 @@ const REPORT_METHOD = "pane.report_agent";
|
|
|
60
60
|
const SESSION_METHOD = "pane.report_agent_session";
|
|
61
61
|
const RELEASE_METHOD = "pane.release_agent";
|
|
62
62
|
const SOCKET_TIMEOUT_MS = 2000;
|
|
63
|
+
const SETTLED_TURN_RECONCILE_DELAY_MS = 25;
|
|
63
64
|
const PROMPT_BLOCKED_REASONS = {
|
|
64
65
|
select: "selection required",
|
|
65
66
|
confirm: "confirmation required",
|
|
@@ -145,6 +146,15 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
145
146
|
// Last session ref already delivered, so repeated lifecycle events do not
|
|
146
147
|
// re-send an unchanged ref every turn.
|
|
147
148
|
let lastSessionRefKey: string | undefined;
|
|
149
|
+
// Herdr only anchors a new full-lifecycle authority after the first session
|
|
150
|
+
// reference identifies how the session began. XCSH creates that reference
|
|
151
|
+
// lazily, so retain the startup marker until there is a concrete ref to send.
|
|
152
|
+
let pendingSessionStartSource: "startup" | undefined = "startup";
|
|
153
|
+
// `agent_end` is the primary completion signal. Keep one deferred check from
|
|
154
|
+
// `turn_end` as well: some interactive UI paths render the completed response
|
|
155
|
+
// before their agent-end extension callback has drained. The check consults
|
|
156
|
+
// XCSH's own streaming state, so a tool boundary cannot be mistaken for idle.
|
|
157
|
+
let settledTurnReconcileTimer: ReturnType<typeof setTimeout> | undefined;
|
|
148
158
|
// Serializes frames: herdr compares `seq` across all methods for this source,
|
|
149
159
|
// so frames must reach it in the order they were generated.
|
|
150
160
|
let queue: Promise<void> = Promise.resolve();
|
|
@@ -232,11 +242,29 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
232
242
|
source: HERDR_SOURCE,
|
|
233
243
|
agent: HERDR_AGENT_LABEL,
|
|
234
244
|
seq: seq++,
|
|
245
|
+
...(pendingSessionStartSource === undefined ? {} : { session_start_source: pendingSessionStartSource }),
|
|
235
246
|
...sessionRef,
|
|
236
247
|
};
|
|
248
|
+
pendingSessionStartSource = undefined;
|
|
237
249
|
return enqueue(() => sendToHerdrSocket(socketPath, SESSION_METHOD, frame, onError));
|
|
238
250
|
};
|
|
239
251
|
|
|
252
|
+
const clearSettledTurnReconcile = (): void => {
|
|
253
|
+
if (settledTurnReconcileTimer !== undefined) {
|
|
254
|
+
clearTimeout(settledTurnReconcileTimer);
|
|
255
|
+
settledTurnReconcileTimer = undefined;
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
const scheduleSettledTurnReconcile = (ctx: ExtensionContext): void => {
|
|
260
|
+
if (settledTurnReconcileTimer !== undefined) return;
|
|
261
|
+
settledTurnReconcileTimer = setTimeout(() => {
|
|
262
|
+
settledTurnReconcileTimer = undefined;
|
|
263
|
+
if (promptBlockedReason || !ctx.isIdle()) return;
|
|
264
|
+
void report("idle").then(() => reportSession(ctx));
|
|
265
|
+
}, SETTLED_TURN_RECONCILE_DELAY_MS);
|
|
266
|
+
};
|
|
267
|
+
|
|
240
268
|
// Announce presence and session identity as soon as the session is initialized.
|
|
241
269
|
pi.on("session_start", async (_event, ctx) => {
|
|
242
270
|
await report("idle");
|
|
@@ -246,6 +274,7 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
246
274
|
// Busy while the agent loop is streaming a response. Re-report session identity
|
|
247
275
|
// in case the active session file changed (e.g. after /new, /resume, or /fork).
|
|
248
276
|
pi.on("agent_start", async (_event, ctx) => {
|
|
277
|
+
clearSettledTurnReconcile();
|
|
249
278
|
await report("working");
|
|
250
279
|
await reportSession(ctx);
|
|
251
280
|
});
|
|
@@ -258,6 +287,12 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
258
287
|
await reportSession(ctx);
|
|
259
288
|
});
|
|
260
289
|
|
|
290
|
+
// Reconcile completion after the UI has had a chance to clear its streaming
|
|
291
|
+
// flag. This is deliberately non-blocking so it cannot delay the next turn.
|
|
292
|
+
pi.on("turn_end", (_event, ctx) => {
|
|
293
|
+
scheduleSettledTurnReconcile(ctx);
|
|
294
|
+
});
|
|
295
|
+
|
|
261
296
|
// An interactive prompt (permission gate, ask tool, confirm/input) is
|
|
262
297
|
// awaiting the user: that is herdr's "needs attention" (blocked) state.
|
|
263
298
|
pi.on("user_prompt_start", event => {
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "21.11.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "21.11.9",
|
|
21
|
+
"commit": "20e49669529f750518c58c8317ad68537d492f00",
|
|
22
|
+
"shortCommit": "20e4966",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v21.11.
|
|
25
|
-
"commitDate": "2026-09-
|
|
26
|
-
"buildDate": "2026-09-
|
|
24
|
+
"tag": "v21.11.9",
|
|
25
|
+
"commitDate": "2026-09-05T19:00:06+00:00",
|
|
26
|
+
"buildDate": "2026-09-05T19:45:34.397Z",
|
|
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/
|
|
32
|
-
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.11.
|
|
31
|
+
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/20e49669529f750518c58c8317ad68537d492f00",
|
|
32
|
+
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.11.9"
|
|
33
33
|
};
|
|
@@ -1,80 +1,68 @@
|
|
|
1
1
|
// Auto-generated by scripts/generate-docs-index.ts - DO NOT EDIT
|
|
2
2
|
|
|
3
|
-
export const EMBEDDED_DOC_FILENAMES: readonly string[] = ["en/
|
|
3
|
+
export const EMBEDDED_DOC_FILENAMES: readonly string[] = ["en/architecture-contribution/agent-session-runtime.mdx","en/architecture-contribution/build-release.mdx","en/architecture-contribution/extension-discovery.mdx","en/architecture-contribution/index.mdx","en/architecture-contribution/native-development.mdx","en/architecture-contribution/native-runtime.mdx","en/architecture-contribution/prompt-authoring.mdx","en/architecture-contribution/provider-streaming.mdx","en/architecture-contribution/storage-artifacts.mdx","en/architecture-contribution/tool-runtime.mdx","en/architecture-contribution/tui-runtime.mdx","en/architecture-contribution/upstream-pi.mdx","en/automate-extend/extensions-custom-tools.mdx","en/automate-extend/headless-protocols.mdx","en/automate-extend/hooks-rules.mdx","en/automate-extend/index.mdx","en/automate-extend/mcp-configuration.mdx","en/automate-extend/mcp-quickstart.mdx","en/automate-extend/mcp-runtime-authoring.mdx","en/automate-extend/plugins-marketplaces.mdx","en/automate-extend/sdk.mdx","en/automate-extend/skills.mdx","en/configure-secure/environment-reference.mdx","en/configure-secure/index.mdx","en/configure-secure/providers-routing.mdx","en/configure-secure/sandbox-boundaries.mdx","en/configure-secure/secrets-obfuscation.mdx","en/configure-secure/settings-files.mdx","en/f5-distributed-cloud/api-catalog.mdx","en/f5-distributed-cloud/console-automation.mdx","en/f5-distributed-cloud/contexts-namespaces.mdx","en/f5-distributed-cloud/create-apply-update.mdx","en/f5-distributed-cloud/get-export-delete.mdx","en/f5-distributed-cloud/index.mdx","en/f5-distributed-cloud/manifest-fundamentals.mdx","en/f5-distributed-cloud/validate-diff.mdx","en/getting-started/f5-xc-connection.mdx","en/getting-started/first-manifest.mdx","en/getting-started/index.mdx","en/getting-started/installation.mdx","en/getting-started/model-authentication.mdx","en/getting-started/quickstart.mdx","en/index.mdx","en/integrations-deployment/chrome.mdx","en/integrations-deployment/containers.mdx","en/integrations-deployment/herdr.mdx","en/integrations-deployment/index.mdx","en/integrations-deployment/office.mdx","en/integrations-deployment/vscode.mdx","en/reference-troubleshooting/cli-reference.mdx","en/reference-troubleshooting/configuration-schema.mdx","en/reference-troubleshooting/diagnostics.mdx","en/reference-troubleshooting/index.mdx","en/reference-troubleshooting/slash-keybindings.mdx","en/use-xcsh/agent-loop.mdx","en/use-xcsh/built-in-tools.mdx","en/use-xcsh/execution-modes.mdx","en/use-xcsh/index.mdx","en/use-xcsh/interactive-tui.mdx","en/use-xcsh/planning-agents.mdx","en/use-xcsh/sessions-memory.mdx","en/use-xcsh/tui-navigation.mdx"];
|
|
4
4
|
|
|
5
5
|
export const EMBEDDED_DOCS: Readonly<Record<string, string>> = {
|
|
6
|
-
"en/
|
|
7
|
-
"en/
|
|
8
|
-
"en/
|
|
9
|
-
"en/
|
|
10
|
-
"en/
|
|
11
|
-
"en/
|
|
12
|
-
"en/
|
|
13
|
-
"en/
|
|
14
|
-
"en/
|
|
15
|
-
"en/
|
|
16
|
-
"en/
|
|
17
|
-
"en/architecture-contribution/
|
|
18
|
-
"en/
|
|
19
|
-
"en/
|
|
20
|
-
"en/
|
|
21
|
-
"en/
|
|
22
|
-
"en/
|
|
23
|
-
"en/
|
|
24
|
-
"en/
|
|
25
|
-
"en/
|
|
26
|
-
"en/
|
|
27
|
-
"en/
|
|
28
|
-
"en/configure-secure/
|
|
29
|
-
"en/configure-secure/
|
|
30
|
-
"en/configure-secure/
|
|
31
|
-
"en/configure-secure/sandbox-
|
|
32
|
-
"en/configure-secure/secrets.mdx": "---\ntitle: \"Resolve secrets safely\"\ndescription: \"Reference sensitive values without placing plaintext credentials in prompts, manifests, logs, or commits.\"\nsidebar:\n order:
|
|
33
|
-
"en/configure-secure/settings-
|
|
34
|
-
"en/
|
|
35
|
-
"en/
|
|
36
|
-
"en/
|
|
37
|
-
"en/
|
|
38
|
-
"en/
|
|
39
|
-
"en/
|
|
40
|
-
"en/
|
|
41
|
-
"en/
|
|
42
|
-
"en/
|
|
43
|
-
"en/
|
|
44
|
-
"en/
|
|
45
|
-
"en/
|
|
46
|
-
"en/
|
|
47
|
-
"en/
|
|
48
|
-
"en/
|
|
49
|
-
"en/
|
|
50
|
-
"en/
|
|
51
|
-
"en/
|
|
52
|
-
"en/
|
|
53
|
-
"en/
|
|
54
|
-
"en/
|
|
55
|
-
"en/
|
|
56
|
-
"en/
|
|
57
|
-
"en/
|
|
58
|
-
"en/
|
|
59
|
-
"en/
|
|
60
|
-
"en/
|
|
61
|
-
"en/
|
|
62
|
-
"en/
|
|
63
|
-
"en/
|
|
64
|
-
"en/
|
|
65
|
-
"en/
|
|
66
|
-
"en/
|
|
67
|
-
"en/
|
|
68
|
-
"en/interfaces/vscode.mdx": "---\ntitle: \"VS Code\"\ndescription: \"Use the companion VS Code integration with the same xcsh model and session foundation.\"\nsidebar:\n order: 2\n label: \"VS Code\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nUse the companion VS Code integration with the same xcsh model and session foundation.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Install the published vscode-xcsh extension from its supported distribution channel.\n2. Open the intended workspace before starting a conversation.\n3. Configure provider authentication in xcsh, not in source files.\n4. Use the terminal CLI when validating headless behavior.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Chrome](../chrome/).\n",
|
|
69
|
-
"en/troubleshooting-reference/cli-reference.mdx": "---\ntitle: \"CLI command and flag reference\"\ndescription: \"Review the current top-level commands, global flags, and resource command patterns.\"\nsidebar:\n order: 4\n label: \"CLI command and flag reference\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nReview the current top-level commands, global flags, and resource command patterns.\n\n| Command group | Commands |\n| --- | --- |\n| Resources | `validate`, `diff`, `create`, `apply`, `update`, `get`, `export`, `delete` |\n| Runtime | `config`, `setup`, `sandbox`, `stats`, `search`, `shell` |\n| Extensibility | `agents`, `plugin`, `worker`, `manager` |\n| Interfaces | `chrome`, `office`, `herdr` |\n| Maintenance | `self-update`, `update --check` |\n\nResource file commands accept `-f/--filename`, `-n/--namespace`, `-o/--output`, `-R/--recursive`, and `--result-file` as shown by their individual help. Mutation commands also support `--dry-run`; `update` reserves short `-f` for a manifest, so executable force-update uses `--force`.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Run `xcsh --help` for the installed version.\n2. Run `xcsh <command> --help` before scripting a command.\n3. Prefer long flags in automation.\n4. Capture structured output with `--result-file`, `--json`, or `--mode json` where supported.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Slash command reference](../slash-commands/).\n",
|
|
70
|
-
"en/troubleshooting-reference/configuration-schema.mdx": "---\ntitle: \"Configuration schema\"\ndescription: \"Navigate the schema-backed settings for appearance, models, interaction, context, editing, tools, tasks, providers, and sandboxing.\"\nsidebar:\n order: 8\n label: \"Configuration schema\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nNavigate the schema-backed settings for appearance, models, interaction, context, editing, tools, tasks, providers, and sandboxing.\n\nThe schema groups interactive settings under Appearance, Model, Interaction, Context, Editing, Tools, Tasks, Providers, and Sandbox. Important families include `theme.*`, model roles and provider order, compaction, status-line segments, tool configuration, task concurrency, and `sandbox.allowRead`/`sandbox.allowWrite`.\n\nBecause the schema evolves, generate the exact effective inventory from the installed executable instead of copying an old example wholesale.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Run `xcsh config list --json` for effective values.\n2. Read a value with `xcsh config get <key>`.\n3. Write a supported value with `xcsh config set <key> <value>`.\n4. Use `xcsh config reset <key>` to return to the schema default.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [File locations](../file-locations/).\n",
|
|
71
|
-
"en/troubleshooting-reference/contexts-tools.mdx": "---\ntitle: \"Fix context and tool problems\"\ndescription: \"Separate F5 Distributed Cloud scope errors from MCP, browser, Python, and shell-tool failures.\"\nsidebar:\n order: 3\n label: \"Fix context and tool problems\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nSeparate F5 Distributed Cloud scope errors from MCP, browser, Python, and shell-tool failures.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Check `/context status` and the explicit namespace first.\n2. Use `validate` to rule out local manifest problems.\n3. Check optional components with `xcsh setup <component> --check`.\n4. Disable MCP, extensions, or the PTY one at a time to isolate the failing layer.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [CLI command and flag reference](../cli-reference/).\n",
|
|
72
|
-
"en/troubleshooting-reference/diagnostics.mdx": "---\ntitle: \"Run diagnostics\"\ndescription: \"Collect version, configuration, provider, context, and sandbox evidence without exposing secrets.\"\nsidebar:\n order: 1\n label: \"Run diagnostics\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nCollect version, configuration, provider, context, and sandbox evidence without exposing secrets.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Run `xcsh --version`, `xcsh config path`, and `xcsh sandbox check`.\n2. Use `/model`, `/context status`, `/mcp status`, and `xcsh plugin doctor` for the failing subsystem.\n3. Reproduce with optional discovery disabled.\n4. Share sanitized errors and the smallest reproducer.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Fix installation and provider problems](../installation-providers/).\n",
|
|
73
|
-
"en/troubleshooting-reference/file-locations.mdx": "---\ntitle: \"File locations\"\ndescription: \"Locate user and project settings, sessions, contexts, plugins, agents, skills, tools, hooks, and memories.\"\nsidebar:\n order: 9\n label: \"File locations\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nLocate user and project settings, sessions, contexts, plugins, agents, skills, tools, hooks, and memories.\n\n| Scope | Primary locations |\n| --- | --- |\n| Project | `.xcsh/settings.json`, `.xcsh/mcp.json`, `.xcsh/contexts/`, `.xcsh/skills/`, `.xcsh/agents/`, `.xcsh/extensions/`, `.xcsh/tools/`, `.xcsh/hooks/`, `.xcsh/commands/`, `.xcsh/XCSH.md` |\n| User | `~/.xcsh/agent/` for settings, sessions, memories, agents, and user integrations; `~/.xcsh/plugins/` for installed plugins |\n| Override | `PI_CODING_AGENT_DIR` changes the primary user agent directory |\n\nCompatibility discovery can read selected configurations from pi, Claude, Codex, Gemini, and other tools. Native xcsh paths take precedence; disable unused discovery providers when isolation matters.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Use `xcsh config path` instead of assuming a platform path.\n2. Look under `.xcsh/` for project-local configuration.\n3. Look under `~/.xcsh/agent/` for primary user agent data.\n4. Back up or remove files only after identifying their owner and sensitivity.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Glossary](../glossary/).\n",
|
|
74
|
-
"en/troubleshooting-reference/glossary.mdx": "---\ntitle: \"Glossary\"\ndescription: \"Define the product, model, session, context, manifest, skill, plugin, MCP, and sandbox terms used throughout the site.\"\nsidebar:\n order: 10\n label: \"Glossary\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nDefine the product, model, session, context, manifest, skill, plugin, MCP, and sandbox terms used throughout the site.\n\n- **Agent loop:** repeated model inference, tool execution, and result observation.\n- **Context:** a named F5 Distributed Cloud endpoint, credential, and default namespace.\n- **Manifest:** desired resource data with `kind`, `metadata`, and `spec`.\n- **Session:** persisted conversation and tool-event history.\n- **Skill:** discoverable instructions centered on a `SKILL.md` file.\n- **Plugin:** installable bundle of xcsh capabilities and configuration.\n- **MCP:** Model Context Protocol, used to connect out-of-process tools, resources, and prompts.\n- **Sandbox:** filesystem discovery and access boundary enforced around a session.\n- **Role:** a model-selection slot such as default, smol, slow, or plan.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Use this page when a term is ambiguous.\n2. Follow links from each definition to the operational guide.\n3. Prefer terms emitted by the current CLI and source.\n4. Report terminology drift with the exact page and installed version.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nReturn to the section overview and choose the next task that matches your workflow.\n",
|
|
75
|
-
"en/troubleshooting-reference/index.mdx": "---\ntitle: \"Troubleshooting and reference\"\ndescription: \"Diagnose installations, providers, contexts, and tools, then consult current command and configuration references.\"\nsidebar:\n order: 7\n label: \"Overview\"\n---\n\nimport { Card, CardGrid } from '@astrojs/starlight/components';\n\nDiagnose installations, providers, contexts, and tools, then consult current command and configuration references.\n\n<CardGrid>\n <Card title=\"Run diagnostics\" icon=\"right-arrow\">\n [Collect version, configuration, provider, context, and sandbox evidence without exposing secrets.](./diagnostics/)\n </Card>\n <Card title=\"Fix installation and provider problems\" icon=\"right-arrow\">\n [Resolve missing binaries, native-addon mismatches, authentication failures, and unavailable models.](./installation-providers/)\n </Card>\n <Card title=\"Fix context and tool problems\" icon=\"right-arrow\">\n [Separate F5 Distributed Cloud scope errors from MCP, browser, Python, and shell-tool failures.](./contexts-tools/)\n </Card>\n <Card title=\"CLI command and flag reference\" icon=\"right-arrow\">\n [Review the current top-level commands, global flags, and resource command patterns.](./cli-reference/)\n </Card>\n <Card title=\"Slash command reference\" icon=\"right-arrow\">\n [Find the interactive commands for models, sessions, contexts, resources, plugins, MCP, tools, and UI state.](./slash-commands/)\n </Card>\n <Card title=\"Keybinding reference\" icon=\"right-arrow\">\n [Discover and customize the active terminal key map.](./keybindings/)\n </Card>\n <Card title=\"Tool catalog\" icon=\"right-arrow\">\n [Understand the default read, shell, edit, search, browser, notebook, image, task, todo, and question tools.](./tool-catalog/)\n </Card>\n <Card title=\"Configuration schema\" icon=\"right-arrow\">\n [Navigate the schema-backed settings for appearance, models, interaction, context, editing, tools, tasks, providers, and sandboxing.](./configuration-schema/)\n </Card>\n <Card title=\"File locations\" icon=\"right-arrow\">\n [Locate user and project settings, sessions, contexts, plugins, agents, skills, tools, hooks, and memories.](./file-locations/)\n </Card>\n <Card title=\"Glossary\" icon=\"right-arrow\">\n [Define the product, model, session, context, manifest, skill, plugin, MCP, and sandbox terms used throughout the site.](./glossary/)\n </Card>\n</CardGrid>\n",
|
|
76
|
-
"en/troubleshooting-reference/installation-providers.mdx": "---\ntitle: \"Fix installation and provider problems\"\ndescription: \"Resolve missing binaries, native-addon mismatches, authentication failures, and unavailable models.\"\nsidebar:\n order: 2\n label: \"Fix installation and provider problems\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nResolve missing binaries, native-addon mismatches, authentication failures, and unavailable models.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Confirm the executable selected by the shell and its version.\n2. Reinstall through one supported channel; do not mix package-manager and standalone files.\n3. Verify the provider variable or subscription session without printing its value.\n4. Use a provider-qualified model name and retry a minimal prompt.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Fix context and tool problems](../contexts-tools/).\n",
|
|
77
|
-
"en/troubleshooting-reference/keybindings.mdx": "---\ntitle: \"Keybinding reference\"\ndescription: \"Discover and customize the active terminal key map.\"\nsidebar:\n order: 6\n label: \"Keybinding reference\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nDiscover and customize the active terminal key map.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Run `/hotkeys` in the interactive TUI.\n2. Check terminal-level bindings when a chord never reaches xcsh.\n3. Change only one binding at a time in settings.\n4. Restart and verify editor, navigation, interrupt, and model-cycle actions.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Tool catalog](../tool-catalog/).\n",
|
|
78
|
-
"en/troubleshooting-reference/slash-commands.mdx": "---\ntitle: \"Slash command reference\"\ndescription: \"Find the interactive commands for models, sessions, contexts, resources, plugins, MCP, tools, and UI state.\"\nsidebar:\n order: 5\n label: \"Slash command reference\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nFind the interactive commands for models, sessions, contexts, resources, plugins, MCP, tools, and UI state.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Type `/` for completion in the TUI.\n2. Run `/help` for categorized commands.\n3. Use `/hotkeys` for keyboard bindings.\n4. Treat completion and installed help as authoritative for your version.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Keybinding reference](../keybindings/).\n",
|
|
79
|
-
"en/troubleshooting-reference/tool-catalog.mdx": "---\ntitle: \"Tool catalog\"\ndescription: \"Understand the default read, shell, edit, search, browser, notebook, image, task, todo, and question tools.\"\nsidebar:\n order: 7\n label: \"Tool catalog\"\n---\n\nimport { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';\n\nUnderstand the default read, shell, edit, search, browser, notebook, image, task, todo, and question tools.\n\n## Prerequisites\n\n- A current xcsh release and a shell in the intended working directory.\n- Authorization for any account, tenant, repository, or file the procedure touches.\n- A backup or dry run before an operation that changes or deletes state.\n\n## Procedure\n\n<Steps>\n\n1. Inspect the tool list in `xcsh --help`.\n2. Restrict a run with `--tools` when least privilege matters.\n3. Install optional dependencies before using Python or notebook features.\n4. Remember that MCP and plugins can add tools beyond the built-in catalog.\n\n</Steps>\n\n## Expected result\n\nThe command or interface reports completion in the selected scope. For automation, prefer its structured result instead of parsing decorated terminal output.\n\n## Troubleshooting\n\nConfirm the installed version and resolved configuration first. Retry with optional plugins, MCP servers, or extensions disabled when they could affect the path. Never print tokens while collecting diagnostics.\n\n## Next steps\n\nContinue to [Configuration schema](../configuration-schema/).\n",
|
|
6
|
+
"en/architecture-contribution/agent-session-runtime.mdx": "---\ntitle: \"Agent loop and sessions\"\ndescription: \"Trace a user message through model selection, tool calls, append-only session state, compaction, and rendering.\"\nsidebar:\n order: 1\n label: \"Agent loop and sessions\"\n---\n\nThe CLI parses arguments, resolves configuration and providers, creates a session, streams model events, dispatches tools, and renders the resulting entries.\n\n## How do I trace a behavior?\n\nStart at `packages/coding-agent/src/cli.ts`, follow the session factory and event handlers, then inspect the persisted JSONL rather than relying only on terminal rendering. Provider and tool tests should assert the event sequence that caused the visible result.\n\n## Where does compaction act?\n\nCompaction transforms older conversation context before the next model turn; it does not rewrite the original session evidence. Test both the summary and subsequent message construction.\n",
|
|
7
|
+
"en/architecture-contribution/build-release.mdx": "---\ntitle: \"Build and release xcsh\"\ndescription: \"Set up the monorepo, run TypeScript and Rust checks, and understand signed multi-channel releases.\"\nsidebar:\n order: 11\n label: \"Build and release xcsh\"\n---\n\nThe repository is a Bun workspace with a Rust native layer. Follow `AGENTS.md`, `CONTRIBUTING.md`, and `DEVELOPING.md` before editing.\n\n## How do I prepare a contribution?\n\nCreate a detailed issue, branch from current `origin/main` in an isolated worktree, and run `bun install --frozen-lockfile`. Write a failing focused test for code behavior, implement the smallest fix, then run the package and repository checks.\n\n## Which checks matter before a pull request?\n\nRun `bun run check`, `bun run test`, documentation checks for changed MDX, secret/PII scans, and the repository review gate. Inspect the complete diff and deliver only through a linked pull request.\n\n## How are releases produced?\n\nProtected workflows build and verify binaries, npm packages, Homebrew artifacts, containers, and downstream apt packaging. Contributors do not publish those channels manually.\n",
|
|
8
|
+
"en/architecture-contribution/extension-discovery.mdx": "---\ntitle: \"Extension discovery architecture\"\ndescription: \"Choose between skills, commands, tools, hooks, extensions, plugins, MCP, and SDK embedding.\"\nsidebar:\n order: 5\n label: \"Extension discovery\"\n---\n\nThe TypeScript runtime owns the agent loop, configuration, discovery, protocols, and most tools. The native Rust addon supplies performance-sensitive terminal, filesystem, and platform operations behind typed bindings.\n\n## How are capabilities discovered?\n\nDiscovery providers scan bundled, user, project, plugin, and compatible manifest roots, normalize candidates into capability items, and deduplicate stable identifiers by precedence. Extension entry resolution and dynamic module loading happen only after metadata discovery.\n\nInvalid frontmatter, manifests, or module factories produce diagnostics at their own layer so one bad optional capability does not masquerade as an empty catalog.\n\n## Where should a change go?\n\nPrefer a public extension, skill, plugin, MCP server, or SDK API for optional behavior. Change the native layer only when a measured platform or performance requirement cannot be met in TypeScript.\n\n## How do I validate a boundary change?\n\nRun focused TypeScript tests for the caller and Rust tests for the native implementation, then build the addon and exercise the public command. Do not expose a native detail as a public contract accidentally.\n",
|
|
9
|
+
"en/architecture-contribution/index.mdx": "---\ntitle: \"Architecture and contribution\"\ndescription: \"Understand xcsh internals, its pi lineage, native layer, extension boundaries, and contribution/release process.\"\nsidebar:\n order: 0\n label: \"Overview\"\n---\n\nUse these pages when changing xcsh itself rather than operating it.\n\n## Which implementation boundary matters?\n\n- [Agent loop and sessions](./agent-session-runtime/)\n- [Extension boundaries and native runtime](./extension-discovery/)\n- [Build, test, contribute, and release](./build-release/)\n- [Relationship to upstream pi](./upstream-pi/)\n",
|
|
10
|
+
"en/architecture-contribution/native-development.mdx": "---\ntitle: \"Develop the native layer\"\ndescription: \"Choose native work deliberately, add a binding, build variants, test cancellation, and debug loader failures.\"\nsidebar:\n order: 7\n label: \"Native development\"\n---\n\nPort code to Rust only for measured performance, platform integration, or resource-control needs. Keep orchestration and product policy in TypeScript.\n\n## Add or change a native export\n\nDefine the Rust implementation and Node-API signature, expose it from the Rust package, update TypeScript declarations and wrappers, then extend validation and contract tests. Preserve the JavaScript fallback when the public contract requires one; otherwise fail explicitly when the addon is unavailable.\n\n## Build target variants\n\nThe build pipeline selects target triples and optional hardware variants, compiles release artifacts, and packages names the loader can resolve. Environment flags affect the build target or diagnostics, not the public API. Test the ordinary target plus any variant whose resolution order changed.\n\n## Diagnose loading and cancellation\n\nStart with the resolved candidate list, platform identity, file permissions, and `validateNative` mismatch. For asynchronous work, test cancellation before start, during execution, and after completion; a cancellation token must never resolve the same task twice.\n",
|
|
11
|
+
"en/architecture-contribution/native-runtime.mdx": "---\ntitle: \"Native runtime architecture\"\ndescription: \"Understand TypeScript wrappers, addon loading, Rust Node-API exports, binary selection, and binding validation.\"\nsidebar:\n order: 6\n label: \"Native runtime\"\n---\n\nThe public TypeScript layer owns ergonomic types and fallbacks. The loader selects a platform-specific addon, validates its exports, and exposes Rust Node-API implementations for performance-sensitive work.\n\n## Select and validate an addon\n\nResolution considers operating system, CPU architecture, and supported hardware variants before trying packaged and extracted binary candidates. Embedded binaries are materialized in a controlled cache. `validateNative` checks the runtime surface so a mismatched binary fails near loading instead of at an unrelated call.\n\n## Keep bindings synchronized\n\nModule augmentation describes native exports to TypeScript, wrappers translate public inputs and outputs, and Rust functions implement the Node-API boundary. Synchronous and asynchronous variants must agree on names, data conversions, error shapes, and cancellation. Update all three layers and their contract tests together.\n\n## Map native subsystems\n\nThe addon covers terminal and PTY processes, filesystem scanning and text search, media/system utilities, and cancellable task primitives. Data crossing Node-API must have an explicit encoding and ownership rule; native tasks must release resources on both completion and cancellation.\n",
|
|
12
|
+
"en/architecture-contribution/prompt-authoring.mdx": "---\ntitle: \"Author system prompts\"\ndescription: \"Apply the system-prompt checklist, progressive composition, deduplication, and audit tests.\"\nsidebar:\n order: 10\n label: \"Prompt authoring\"\n---\n\nSystem prompts are executable product policy. Edit the smallest owned prompt fragment and verify the composed result; do not paste a second copy of guidance already supplied by a capability or plugin.\n\n## Apply the eight-point checklist\n\nState role and scope, concrete objectives, available tools, tool-use rules, constraints, output contract, uncertainty behavior, and completion criteria. Use direct instructions with observable conditions. Keep provider-specific details out of shared prompts unless the adapter cannot represent them elsewhere.\n\n## Compose prompts progressively\n\nThe runtime builds the system prompt from the core fragment plus active capabilities, workspace guidance, plan state, memory, and extension contributions. Ordering and deduplication tests protect mandatory boundaries. An absent optional plugin must not remove core safety or file-operation instructions.\n\n## Audit a prompt change\n\nInspect the final composed prompt for representative capability sets. Run template, API-spec, deduplication, deprecation, workspace-boundary, start-folder, and absent-plugin tests. Record why each new sentence belongs at that layer and remove stale aliases rather than documenting both paths.\n",
|
|
13
|
+
"en/architecture-contribution/provider-streaming.mdx": "---\ntitle: \"Provider streaming\"\ndescription: \"Follow provider events through normalized assistant messages, tool JSON accumulation, cancellation, and fallback.\"\nsidebar:\n order: 4\n label: \"Provider streaming\"\n---\n\nProvider adapters translate distinct wire events into one `AssistantMessageEvent` stream consumed by the agent loop. Text deltas, reasoning, tool starts, tool arguments, completion, usage, and errors retain their meaning across adapters.\n\n## Normalize tool calls incrementally\n\nTool arguments can arrive as JSON fragments. The adapter accumulates fragments per call identifier and emits a tool request only after a complete valid value exists. Parse failure remains an error with provider context; silently truncating or inventing arguments would cross the provider boundary.\n\n## Cancel and finish exactly once\n\nCancellation propagates to the active provider request and prevents later deltas from reopening the turn. A terminal success, cancellation, or error settles the stream once. Retry and model fallback happen above normalization so an adapter does not conceal which provider produced an event.\n",
|
|
14
|
+
"en/architecture-contribution/storage-artifacts.mdx": "---\ntitle: \"Storage, blobs, and artifacts\"\ndescription: \"Trace configuration roots, session JSONL, binary blobs, text artifacts, scan caches, and move semantics.\"\nsidebar:\n order: 2\n label: \"Storage and artifacts\"\n---\n\nxcsh separates append-only conversation state from large or generated payloads. Session JSONL preserves the event graph; blob and artifact stores keep bulky data addressable without inflating every session entry.\n\n## Allocate and resolve stored values\n\nStorage helpers choose user or project roots, allocate collision-resistant identifiers, and record names separately from content addresses. Text artifacts remain inspectable; binary blobs are externalized and referenced by URL-like identifiers. URL handlers validate the scheme and authority before opening the backing object.\n\n## Resume, fork, and move state\n\nResume rebuilds context from the selected session leaf. Forking creates a new branch without rewriting the source branch. Moves must update the session reference and its dependent stored values as one operation or leave the original valid; partial copies are not a successful move.\n\n## Cache filesystem discovery\n\nThe scan cache partitions keys by root and discovery options, evicts by freshness policy, and uses a short empty-result recheck so a newly created configuration file is noticed. Mutating code owns invalidation. A new consumer must define its cache key, freshness need, and invalidation points explicitly.\n",
|
|
15
|
+
"en/architecture-contribution/tool-runtime.mdx": "---\ntitle: \"Tool runtime\"\ndescription: \"Trace Bash, notebook, deferred-action, custom-tool, context, and task-agent execution boundaries.\"\nsidebar:\n order: 3\n label: \"Tool runtime\"\n---\n\nThe agent loop sees a common tool contract, but each runtime owns its validation, cancellation, output, and side effects.\n\n## Execute shell and notebook work\n\nThe Bash tool validates the request, launches through the configured shell boundary, streams bounded output, and spills oversized results to an artifact. Notebook editing changes cell structure; kernel execution is a separate Python gateway operation with its own environment and MIME rendering.\n\n## Resolve deferred actions\n\nDeferred actions are pushed onto a last-in, first-out stack and resolved only at the runtime checkpoint that owns them. Custom tools use the host API to register actions; they must pair cancellation and cleanup with any external resource they create.\n\n## Discover commands and task agents\n\nSlash-command templates and agent definitions are discovered from normalized user, project, plugin, and bundled providers. Precedence resolves duplicate identifiers before execution. Argument expansion produces prompt input; it must not bypass tool policy or agent execution guardrails.\n",
|
|
16
|
+
"en/architecture-contribution/tui-runtime.mdx": "---\ntitle: \"TUI runtime\"\ndescription: \"Trace component contracts, differential rendering, terminal input, modal UI, and custom tool renderers.\"\nsidebar:\n order: 8\n label: \"TUI runtime\"\n---\n\nThe TUI renders session and runtime state through components. Components return terminal cells and semantic styles; the renderer computes a differential update instead of repainting unrelated rows.\n\n## Route input and render changes\n\nTerminal decoding turns bytes and escape sequences into key events. Focused overlays receive input before the prompt editor and global actions. State changes schedule a render, layout produces the next frame, and the diff layer emits only changed terminal regions.\n\n## Extend interactive surfaces\n\nExtensions can open a modal through `ctx.ui.custom` only when an interactive UI host exists. Custom tools may provide renderers for calls and results while preserving a plain-text representation for headless clients. A renderer must not become the only copy of durable tool output.\n",
|
|
17
|
+
"en/architecture-contribution/upstream-pi.mdx": "---\ntitle: \"Relationship to pi\"\ndescription: \"Understand what xcsh inherits from pi and where the project deliberately specializes.\"\nsidebar:\n order: 9\n label: \"Relationship to pi\"\n---\n\nxcsh is derived from the open-source pi coding agent and adds F5 Distributed Cloud resource workflows, integrations, packaging, and project-specific governance.\n\n## How do I decide where a fix belongs?\n\nTrace the affected module and compare it with the pinned upstream lineage. A generic agent-loop defect may belong upstream; an xcsh resource command, integration, or packaging change belongs here.\n\n## How do I preserve attribution?\n\nKeep upstream license notices and document imported changes. Avoid copying a patch blindly across diverged modules; port the behavior with tests against the current xcsh architecture.\n",
|
|
18
|
+
"en/automate-extend/extensions-custom-tools.mdx": "---\ntitle: \"Build extensions and custom tools\"\ndescription: \"Add TypeScript behavior, slash commands, providers, or schema-validated tools.\"\nsidebar:\n order: 3\n label: \"Build extensions and custom tools\"\n---\n\nExtensions load TypeScript behavior with `--extension` or `--hook`; project discovery can also load extensions, tools, hooks, commands, and rules under `.xcsh/`.\n\n## How do I test an extension boundary?\n\nLoad one explicit file with `-e <path>` and disable discovery with `--no-extensions`. Confirm its registered command or tool, then test shutdown and error handling.\n\n## Where do hooks and rules belong?\n\nHooks observe or alter lifecycle events; rules add durable instructions. Keep each rule narrow and each hook deterministic. Use `--no-rules` to prove whether a rule changes the result.\n",
|
|
19
|
+
"en/automate-extend/headless-protocols.mdx": "---\ntitle: \"Headless modes\"\ndescription: \"Integrate xcsh with scripts through print, JSON, RPC, ACP, manager, and worker modes.\"\nsidebar:\n order: 1\n label: \"Headless modes\"\n---\n\nHeadless integrations select `json`, `rpc`, or `acp` with `--mode`. Each mode has a different framing contract; consumers must parse that protocol rather than decorated terminal text.\n\n## How do I start with the smallest surface?\n\n```sh\nxcsh --mode json --no-session --no-tools -p \"Return one sentence\"\n```\n\nCapture stdout as protocol data and stderr as diagnostics. Pin the xcsh version in automation and test framing against the exact release.\n\n## When do I use the SDK instead?\n\nUse the SDK when the host process needs in-memory session control, tool registration, or provider events. See [SDK automation](/xcsh/en/automate-extend/sdk/).\n",
|
|
20
|
+
"en/automate-extend/hooks-rules.mdx": "---\ntitle: \"Apply hooks and rules\"\ndescription: \"Choose event-driven mutation or declarative prompt guidance and understand discovery precedence.\"\nsidebar:\n order: 4\n label: \"Hooks and rules\"\n---\n\nRules contribute normalized instructions to the prompt. Hooks execute code at named lifecycle events. Use rules for guidance that does not need side effects; use a hook only when an event must inspect, transform, or reject runtime data.\n\n## Discover and classify rules\n\nRule providers scan project and user roots, parse frontmatter, normalize identifiers, then deduplicate by precedence. Classification separates ordinary rulebook entries, always-apply guidance, and time-to-self-reflect material. The `rule://` handler resolves the final normalized item rather than reading an arbitrary path.\n\n## Order hook execution\n\nA hook module exports handlers for supported events. Discovery determines the module set, and registration order determines sequential mutation when more than one handler sees the same payload. A thrown error follows the event's propagation contract; it is not converted into a successful empty result.\n\n## Test the boundary\n\nExercise discovery, the exact event, mutation ordering, cancellation, and a failing handler. UI calls made by hooks require an interactive host; headless integrations should not assume a modal interface exists.\n",
|
|
21
|
+
"en/automate-extend/index.mdx": "---\ntitle: \"Automate and extend\"\ndescription: \"Add skills, plugins, MCP servers, custom tools, hooks, rules, SDK integrations, and headless workers.\"\nsidebar:\n order: 0\n label: \"Overview\"\n---\n\nExtend xcsh only when a built-in command or tool cannot express the task.\n\n## Which extension mechanism fits?\n\n- [Skills](./skills/) add discoverable instructions.\n- [Plugins](./plugins-marketplaces/) package installable capabilities.\n- [MCP](./mcp-quickstart/) connects out-of-process tools and resources.\n- [Extensions and custom tools](./extensions-custom-tools/) run TypeScript hooks or tools.\n- [SDK automation](./sdk/) embeds sessions or uses JSON/RPC/ACP and worker processes.\n",
|
|
22
|
+
"en/automate-extend/mcp-configuration.mdx": "---\ntitle: \"Configure MCP servers\"\ndescription: \"Declare transports, variables, authentication, and disabled discovered servers in mcp.json.\"\nsidebar:\n order: 8\n label: \"MCP configuration\"\n---\n\nMCP configuration is discovered from user and project roots and normalized before any connection starts. Use `xcsh mcp list` to see the effective server set instead of inferring it from one file.\n\n## Choose a transport and lifecycle\n\nA local server uses a command plus arguments and communicates over stdio. A remote server declares an HTTP-capable URL and the supported transport options. The runtime selects from the declared shape; it does not silently reinterpret a malformed local entry as a remote one.\n\n## Resolve variables without embedding secrets\n\nConfiguration values can reference environment-backed variables. Credential resolution happens before connection establishment, and unresolved required variables fail that server without printing the secret. Keep tokens outside committed `mcp.json` files.\n\n## Disable a discovered server deliberately\n\nAdd its normalized identifier to `disabledServers` when a higher-precedence discovery source should remain visible but inactive. Validate the resulting set with `xcsh mcp list`, then use the MCP management commands to reconnect or reload after a file change.\n",
|
|
23
|
+
"en/automate-extend/mcp-quickstart.mdx": "---\ntitle: \"Connect an MCP server\"\ndescription: \"Add a local stdio or remote HTTP/SSE Model Context Protocol server.\"\nsidebar:\n order: 7\n label: \"Connect an MCP server\"\n---\n\nMCP connects xcsh to out-of-process servers that expose tools, resources, or prompts. Configure only servers you trust to receive the data sent in their calls.\n\n## Where is MCP configured?\n\nUse `.xcsh/mcp.json` for project scope. Keep credentials in referenced environment variables or a secret manager, not in the committed file.\n\n## How do I isolate MCP behavior?\n\nStart with one server, inspect `/mcp status`, and invoke one read-only operation. Run the same prompt with `--no-mcp` to distinguish MCP failure from the model or built-in tools.\n",
|
|
24
|
+
"en/automate-extend/mcp-runtime-authoring.mdx": "---\ntitle: \"Operate and author MCP servers\"\ndescription: \"Trace MCP connection caching, tool bridging, reload, teardown, and server contracts.\"\nsidebar:\n order: 9\n label: \"MCP runtime and authoring\"\n---\n\nxcsh keeps MCP transport concerns below capability discovery. A connected server contributes normalized tools; the agent loop invokes those tools through the same result boundary used for built-in and extension tools.\n\n## Follow a request through the runtime\n\nThe manager resolves configuration, establishes one connection per active server, caches that connection, lists capabilities, and registers bridged tools. JSON-RPC request identifiers correlate replies while notifications flow independently. Transport closure rejects outstanding work and moves the server to a reconnectable failure state.\n\n## Reload and tear down safely\n\nA refresh compares the normalized server set, closes removed or changed connections, and preserves reusable connections. Session shutdown closes transports and child processes. Server implementations must also handle client cancellation and EOF so local processes do not outlive xcsh.\n\n## Author a compatible tool server\n\nPublish stable tool names, JSON Schema input definitions, bounded results, and actionable protocol errors. Keep credentials in the server environment, not tool descriptions. Test initialization, tool listing, one successful call, invalid input, cancellation, reconnect, and shutdown against the same transport declared in `mcp.json`.\n",
|
|
25
|
+
"en/automate-extend/plugins-marketplaces.mdx": "---\ntitle: \"Install plugins and marketplaces\"\ndescription: \"Discover, install, configure, update, and diagnose xcsh plugins.\"\nsidebar:\n order: 6\n label: \"Install plugins and marketplaces\"\n---\n\nA plugin bundles capabilities and configuration. A marketplace is an index of plugins; installing from one still executes code under the user's account.\n\n## How do I inspect before installing?\n\nRun `xcsh plugin discover` or the marketplace action shown by `xcsh plugin --help`. Review the package source, version, requested features, and install scope.\n\n## How do I diagnose a plugin?\n\nUse `xcsh plugin list --json` and `xcsh plugin doctor`. Disable one plugin at a time when isolating startup or discovery failures.\n",
|
|
26
|
+
"en/automate-extend/sdk.mdx": "---\ntitle: \"Embed xcsh with the SDK\"\ndescription: \"Create sessions and tools programmatically through the coding-agent package.\"\nsidebar:\n order: 2\n label: \"Embed xcsh with the SDK\"\n---\n\nThe coding-agent SDK embeds session creation, provider streaming, and tool registration. Use it when a host application needs in-memory control rather than a child-process transcript.\n\n## Which automation boundary should I choose?\n\nUse `--mode json`, `rpc`, or `acp` for a process boundary. Use the SDK for direct TypeScript integration. Use `xcsh worker` for a headless extension bridge and `xcsh manager` for the detached control server that spawns and reaps workers.\n\n## How do I keep the integration testable?\n\nPin the package version, record protocol fixtures, close sessions and workers explicitly, and assert both final messages and tool events. Treat undocumented internal modules as unstable.\n",
|
|
27
|
+
"en/automate-extend/skills.mdx": "---\ntitle: \"Create and load skills\"\ndescription: \"Package task-specific instructions in `SKILL.md` files at user or project scope.\"\nsidebar:\n order: 5\n label: \"Create and load skills\"\n---\n\nA skill is a directory centered on `SKILL.md`. It tells an agent when and how to perform a bounded kind of work; it is not executable proof by itself.\n\n## Where do skills live?\n\nUse project scope under `.xcsh/skills/` for repository-specific instructions and user scope under the xcsh data directory for personal skills. Project instructions should be reviewable with the repository.\n\n## How do I test one?\n\nStart xcsh with `--skills <glob>` to narrow discovery, invoke a prompt that matches the trigger, and inspect the tools and output. Use `--no-skills` to confirm behavior without it.\n",
|
|
28
|
+
"en/configure-secure/environment-reference.mdx": "---\ntitle: \"Environment variable reference\"\ndescription: \"Locate environment-controlled provider, tool, storage, shell, TUI, and diagnostic behavior.\"\nsidebar:\n order: 2\n label: \"Environment variables\"\n---\n\nEnvironment variables carry credentials and process-scoped overrides. Settings and command flags still participate in their documented precedence; a similarly named variable is not automatically supported.\n\n## Models, providers, and search\n\nProvider adapters read their own API keys, base URLs, cloud project or region fields, and proxy settings. Model selection remains a model-registry decision. Web-search variables configure the search backend separately from model credentials.\n\n## Python, shell, and tool execution\n\nPython gateway variables select interpreter and kernel behavior. Shell execution inherits the launched process environment subject to sandbox and command policy. Session and terminal variables describe the current terminal but do not grant filesystem access.\n\n## Storage, runtime, and diagnostics\n\n`PI_CODING_AGENT_DIR` changes the primary agent data root; project configuration remains under `.xcsh/`. Native loader and debug variables affect binary selection and diagnostics. TUI flags affect rendering and terminal integration, while commit-generation controls affect only their named workflow. Never print security-sensitive variables in diagnostic receipts.\n",
|
|
29
|
+
"en/configure-secure/index.mdx": "---\ntitle: \"Configure and secure\"\ndescription: \"Control settings, providers, credentials, networking, secrets, sandboxing, and runtime boundaries.\"\nsidebar:\n order: 0\n label: \"Overview\"\n---\n\nConfiguration controls provider routing, settings precedence, filesystem access, and credential handling.\n\n## What should I configure first?\n\n1. Choose a [provider and model route](./providers-routing/).\n2. Inspect [settings and file locations](./settings-files/).\n3. Apply [secret and filesystem boundaries](./secrets-obfuscation/).\n\nStart with defaults; add project configuration only when collaborators need the same behavior.\n",
|
|
30
|
+
"en/configure-secure/providers-routing.mdx": "---\ntitle: \"Configure providers and model routing\"\ndescription: \"Select models directly or map default, smol, slow, and plan roles.\"\nsidebar:\n order: 3\n label: \"Configure providers and model routing\"\n---\n\nxcsh resolves a requested model against available providers and credentials. A provider-qualified model name is the most explicit route.\n\n## How do I confirm a route?\n\nRun `xcsh --list-models <provider>`, then pass one returned name to `--model`. Environment keys and supported subscription sessions authenticate providers; never store tokens in committed settings.\n\n## Where does LiteLLM fit?\n\nLiteLLM is an optional provider proxy installed or checked with `xcsh setup litellm`. Its base URL and credential belong in the runtime environment. Successful text Responses support does not imply Realtime or audio support; test the exact endpoint your workflow uses.\n",
|
|
31
|
+
"en/configure-secure/sandbox-boundaries.mdx": "---\ntitle: \"Set sandbox boundaries\"\ndescription: \"Constrain filesystem, shell, native, browser, and extension effects at the layer that enforces them.\"\nsidebar:\n order: 5\n label: \"Sandbox boundaries\"\n---\n\nA model instruction is not a sandbox. Enforcement belongs to the tool, host process, container, operating system, or remote service that performs the action.\n\n## Restrict the exposed tool set\n\nStart with `--no-tools` or an explicit `--tools` allow-list when a run needs only conversation. Disable MCP and extensions separately because they can register additional capabilities. Review custom tool and hook code with the same care as any locally executed module.\n\n## Constrain files and processes\n\nFilesystem-aware tools resolve paths against their configured workspace boundary. The Bash runtime applies its sandbox and output limits before returning a result; large output may spill to an artifact instead of remaining inline. Containers add process and filesystem isolation, but mounted credentials and sockets still cross that boundary.\n\n## Separate local and remote authority\n\nBrowser, editor, Office, and remote-service integrations enforce different permission models. Confirm the active host, account, context, namespace, and target immediately before a mutation. A successful read proves connectivity, not authorization for a write.\n",
|
|
32
|
+
"en/configure-secure/secrets-obfuscation.mdx": "---\ntitle: \"Resolve secrets safely\"\ndescription: \"Reference sensitive values without placing plaintext credentials in prompts, manifests, logs, or commits.\"\nsidebar:\n order: 4\n label: \"Resolve secrets safely\"\n---\n\nKeep provider keys and F5 Distributed Cloud contexts outside prompts, session exports, logs, and committed files. Pass secrets through supported environment or protected runtime files.\n\n## How does obfuscation work?\n\nWhen secret obfuscation is enabled, values declared in the protected `secrets.yml` source are resolved at runtime and replaced in observable text before it is retained or rendered. Environment values take their documented precedence over file-backed values.\n\nObfuscation reduces accidental disclosure in supported paths; it is not encryption for a compromised process or an excuse to place secrets in prompts.\n\n## How does the filesystem boundary work?\n\nxcsh discovers a task root and guards access outside it. Add an explicit path with `--allow-path`; use `--allow-home` only when the home directory is intentionally the task root. `--no-sandbox` removes that guard and should be reserved for a controlled diagnostic.\n\n## How do I inspect the boundary?\n\nRun `xcsh sandbox check`, then start a read-only session with the smallest required `--allow-path` set. A sandbox boundary limits file discovery; it does not replace operating-system permissions or tool review.\n",
|
|
33
|
+
"en/configure-secure/settings-files.mdx": "---\ntitle: \"Understand settings precedence\"\ndescription: \"Predict which user, project, environment, and command-line value xcsh resolves.\"\nsidebar:\n order: 1\n label: \"Understand settings precedence\"\n---\n\nProject settings apply to one repository; user settings apply across projects; command flags override both for one invocation. Use `xcsh config list --json` to inspect effective values.\n\n## How is configuration resolved?\n\nDiscovery collects fixed user, project, environment, and command-line sources, normalizes each through the schema-backed configuration wrapper, then resolves values by explicit priority. Capability-specific discovery uses the same roots but owns its own merge and deduplication rules. Native `.xcsh` providers participate through the documented provider interface, not an implicit recursive scan.\n\n## Where are settings stored?\n\nRun `xcsh config path` instead of assuming a platform path. Project data uses `.xcsh/`, including `settings.json`, `mcp.json`, contexts, skills, agents, extensions, tools, hooks, commands, and `XCSH.md`. Primary user data lives under the xcsh agent directory; `PI_CODING_AGENT_DIR` can override that location.\n\n## How do I change one value?\n\n```sh\nxcsh config get <key>\nxcsh config set <key> <value>\nxcsh config reset <key>\n```\n\nUse environment variables for credentials and ephemeral process configuration. Do not copy an entire old settings file when only one key is needed.\n",
|
|
34
|
+
"en/f5-distributed-cloud/api-catalog.mdx": "---\ntitle: \"Understand the API catalog\"\ndescription: \"See how xcsh resolves resource kinds and validation metadata from its packaged F5 Distributed Cloud catalog.\"\nsidebar:\n order: 6\n label: \"Understand the API catalog\"\n---\n\nThe catalog maps a supported `kind` to its API path and schema handling. It is the authority for whether a resource can use deterministic commands.\n\n## How do I choose a supported kind?\n\nUse catalog discovery in the interactive shell, or inspect the generated resource catalog in the matching xcsh source release. Copy the exact `kind` spelling into the manifest.\n\n## What if a kind is absent?\n\nDo not substitute a similar name. Use console automation only when that interface is explicitly supported, or wait for catalog support. An absent kind cannot be made safe by adding arbitrary fields to a manifest.\n",
|
|
35
|
+
"en/f5-distributed-cloud/console-automation.mdx": "---\ntitle: \"Automate the F5 console in Chrome\"\ndescription: \"Connect xcsh to its isolated Chrome profile for browser-assisted console workflows.\"\nsidebar:\n order: 7\n label: \"Automate the F5 console in Chrome\"\n---\n\nConsole automation drives a browser session through xcsh. Use deterministic resource commands when they cover the task; browser state and page structure make console workflows more fragile.\n\n## How do I inspect the Chrome session?\n\nRun `xcsh chrome --help`, then use the supported session inspection or arrangement action shown by the installed version. Keep the browser profile dedicated to authorized lab work.\n\n## What counts as evidence?\n\nRecord the page URL, visible control or result, browser action, and cleanup state without capturing tokens or tenant identifiers. If the interface cannot be exercised, document only source-verified capability and omit procedural success claims.\n",
|
|
36
|
+
"en/f5-distributed-cloud/contexts-namespaces.mdx": "---\ntitle: \"Manage contexts and namespaces\"\ndescription: \"Store named tenant connections, activate the intended context, and scope operations to a namespace.\"\nsidebar:\n order: 1\n label: \"Manage contexts and namespaces\"\n---\n\nA context chooses the tenant endpoint and credential. A namespace chooses the resource scope inside that tenant. They are separate decisions.\n\n## How do I prevent a scope mistake?\n\nLaunch with `xcsh --context <name>` and inspect `/context status`. For automation, pass `-n <namespace>` to the resource command instead of relying on ambient state. Stop if either value is unexpected.\n\n## Where is context data stored?\n\nContext files live under `.xcsh/contexts/` at project scope or the xcsh user data directory. Never commit them: they can contain credentials and tenant identifiers.\n",
|
|
37
|
+
"en/f5-distributed-cloud/create-apply-update.mdx": "---\ntitle: \"Create, apply, and update resources\"\ndescription: \"Choose strict creation, convergent apply, or explicit update for a reviewed manifest.\"\nsidebar:\n order: 4\n label: \"Create, apply, and update resources\"\n---\n\n`create` requires absence, `update` requires an existing resource, and `apply` chooses create or update while preserving already-matching resources.\n\n## Which mutation command fits?\n\n```sh\nxcsh create -f manifest.yaml --dry-run client --result-file create-preview.json\nxcsh update -f manifest.yaml --dry-run client --result-file update-preview.json\nxcsh apply -f manifest.yaml --dry-run client --result-file apply-preview.json\n```\n\nReview the preview, then repeat the same command without `--dry-run client`. Keep `--result-file` so automation can inspect the aggregate operation record.\n\n## How do I verify the mutation?\n\nRun `xcsh get <kind> <name> -n <namespace>` and compare the returned identity and relevant fields with the manifest. Do not treat process exit alone as state verification.\n",
|
|
38
|
+
"en/f5-distributed-cloud/get-export-delete.mdx": "---\ntitle: \"Get, export, and delete resources\"\ndescription: \"Inspect live resources, produce portable manifests, and perform deliberate deletion.\"\nsidebar:\n order: 5\n label: \"Get, export, and delete resources\"\n---\n\nUse `get` to inspect live state, `export` to create a reusable manifest, and `delete` only after verifying the exact identity and namespace.\n\n## How do I retrieve or export one resource?\n\n```sh\nxcsh get <kind> <name> -n <namespace> --result-file get.json\nxcsh export <kind> <name> -n <namespace> -f exported.yaml\n```\n\nSanitize exported server metadata and secrets before storing the file.\n\n## How do I delete and prove absence?\n\n```sh\nxcsh delete <kind> <name> -n <namespace> --dry-run client\nxcsh delete <kind> <name> -n <namespace> --result-file delete.json\nxcsh get <kind> <name> -n <namespace>\n```\n\nThe final `get` must return the documented not-found response for the resource kind. A successful delete request without the absence check is incomplete.\n",
|
|
39
|
+
"en/f5-distributed-cloud/index.mdx": "---\ntitle: \"F5 Distributed Cloud\"\ndescription: \"Manage F5 Distributed Cloud contexts and resources through explicit, reviewable manifest operations.\"\nsidebar:\n order: 3\n label: \"Overview\"\n---\n\nThe resource commands separate local validation, live comparison, mutation, retrieval, and cleanup. Keep those stages separate so a credentialed command is deliberate.\n\n## Which resource task do I need?\n\n- [Choose context and namespace](./contexts-namespaces/) before a live request.\n- [Find a kind in the catalog](./api-catalog/) and build a [manifest](./manifest-fundamentals/).\n- [Validate and diff](./validate-diff/) before [create, apply, or update](./create-apply-update/).\n- [Get, export, or delete](./get-export-delete/) existing resources.\n- Use [console automation](./console-automation/) only for a supported interface task that has no resource-command equivalent.\n",
|
|
40
|
+
"en/f5-distributed-cloud/manifest-fundamentals.mdx": "---\ntitle: \"Write resource manifests\"\ndescription: \"Represent an F5 Distributed Cloud resource with a stable kind, metadata, and specification.\"\nsidebar:\n order: 2\n label: \"Write resource manifests\"\n---\n\nEach manifest describes desired state for one resource. `metadata.name` identifies it, `metadata.namespace` selects its scope when supported, and `spec` contains kind-specific data.\n\n## How should I create a starting manifest?\n\nPrefer `xcsh export <kind> <name> -f exported.yaml` for an existing resource. For a new resource, start from a repository example tied to the current catalog. Remove server-managed fields before reuse.\n\n## How do I keep a directory deterministic?\n\nUse one resource per YAML document, stable names, and explicit namespaces. Run `xcsh validate -f manifests/ -R` so nested files are included intentionally.\n",
|
|
41
|
+
"en/f5-distributed-cloud/validate-diff.mdx": "---\ntitle: \"Validate and diff manifests\"\ndescription: \"Catch local schema errors first, then compare desired state with live state.\"\nsidebar:\n order: 3\n label: \"Validate and diff manifests\"\n---\n\nValidation checks local structure; diff compares that desired state with the live resource. A passing validation does not authorize or predict a live mutation.\n\n## How do I separate local and live checks?\n\n```sh\nxcsh validate -f manifests/ -R --result-file validation.json\nxcsh diff -f manifests/ -R --result-file diff.json\n```\n\nThe first command needs no API credential. Run the second only after confirming the context and namespace. Read every create, update, preserve, and error entry in `diff.json`.\n\n## What blocks the next step?\n\nStop on an unknown kind, duplicate identity, unexpected namespace, destructive difference, or request against the wrong context. Correct the source manifest and rerun both commands.\n",
|
|
42
|
+
"en/getting-started/f5-xc-connection.mdx": "---\ntitle: \"Connect to F5 Distributed Cloud\"\ndescription: \"Create and activate a named F5 Distributed Cloud context, then select a namespace.\"\nsidebar:\n order: 5\n label: \"Connect to F5 Distributed Cloud\"\n---\n\nAn F5 Distributed Cloud context binds an API endpoint, credential, and optional default namespace. Treat the context file as a secret.\n\n## How do I select the intended context?\n\nStart the TUI with `xcsh --context <name>`, then run `/context status`. Confirm the displayed context name and namespace before any live command. Use `-n <namespace>` on a resource command when the manifest must override the context default.\n\n## What is safe to test first?\n\nRun `xcsh validate -f <manifest>` before using network access. Then run `xcsh diff -f <manifest> --result-file diff.json`; inspect the report before choosing a mutation command.\n",
|
|
43
|
+
"en/getting-started/first-manifest.mdx": "---\ntitle: \"Complete your first manifest lifecycle\"\ndescription: \"Validate, compare, apply, inspect, export, and delete a resource manifest.\"\nsidebar:\n order: 6\n label: \"Complete your first manifest lifecycle\"\n---\n\nA manifest names one F5 Distributed Cloud resource with `kind`, `metadata`, and `spec`. Begin from an exported or catalog-backed example for the exact resource kind; do not invent schema fields.\n\n## How do I check a manifest without credentials?\n\n```sh\nxcsh validate -f manifest.yaml --result-file validation.json\n```\n\nValidation reads the file locally and returns a nonzero status for malformed or unsupported input. Review the aggregate JSON report before moving to a live context.\n\n## How do I preview the live change?\n\n```sh\nxcsh diff -f manifest.yaml --result-file diff.json\nxcsh apply -f manifest.yaml --dry-run client --result-file dry-run.json\n```\n\nA diff requires the intended context. A dry run calculates the mutation path without applying it.\n",
|
|
44
|
+
"en/getting-started/index.mdx": "---\ntitle: \"Getting started\"\ndescription: \"Install xcsh, connect a model and an F5 Distributed Cloud tenant, and complete a safe first workflow.\"\nsidebar:\n order: 1\n label: \"Overview\"\n---\n\nUse this section to reach the first useful command without configuring every optional integration.\n\n## What do I need before I begin?\n\nYou need a supported xcsh build and one model provider. F5 Distributed Cloud credentials are needed only for live resource commands; local manifest validation works without them.\n\n## Which path matches my goal?\n\n1. [Install, update, or remove xcsh](./installation/).\n2. [Authenticate a model](./model-authentication/).\n3. Run the [general quickstart](./quickstart/) or connect an [F5 Distributed Cloud context](./f5-xc-connection/).\n4. Use [your first manifest](./first-manifest/) only when you intend to manage F5 Distributed Cloud resources.\n",
|
|
45
|
+
"en/getting-started/installation.mdx": "---\ntitle: \"Install xcsh\"\ndescription: \"Install a verified xcsh release with Homebrew, apt, the installer, npm or Bun, a standalone binary, or a container.\"\nsidebar:\n order: 2\n label: \"Install xcsh\"\n---\n\nChoose one installation channel and keep using that channel for upgrades. Mixing a package-manager installation with a standalone binary makes version diagnosis ambiguous.\n\n## How do I install on Ubuntu or Debian?\n\n```sh\nsudo mkdir -p /etc/apt/keyrings\ncurl -fsSL https://f5-sales-demo.github.io/apt-repo/f5xc-archive-keyring.gpg \\\n | sudo tee /etc/apt/keyrings/f5xc-archive-keyring.gpg >/dev/null\necho \"deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/f5xc-archive-keyring.gpg] https://f5-sales-demo.github.io/apt-repo stable main\" \\\n | sudo tee /etc/apt/sources.list.d/f5xc.list\nsudo apt-get update\nsudo apt-get install xcsh\n```\n\nmacOS users can run `brew install f5-sales-demo/tap/xcsh`. Release binaries and archives are published on [GitHub Releases](https://github.com/f5-sales-demo/xcsh/releases).\n\n## How do I confirm the selected executable?\n\n```sh\ncommand -v xcsh\nxcsh --version\nxcsh --help\n```\n\nThe version must match the channel you selected. Upgrade with that package manager, or run `xcsh update --check` for an executable release installation.\n\n## How do I remove it?\n\nUse the inverse of the installation channel: `sudo apt-get remove xcsh`, `brew uninstall xcsh`, or remove the exact standalone path returned by `command -v`. User settings and sessions remain under the path reported by `xcsh config path`; remove them separately only if you no longer need them.\n",
|
|
46
|
+
"en/getting-started/model-authentication.mdx": "---\ntitle: \"Authenticate a model provider\"\ndescription: \"Configure an API key or supported subscription login without placing credentials in project files.\"\nsidebar:\n order: 4\n label: \"Authenticate a model provider\"\n---\n\nModel credentials belong in the provider-supported environment or subscription login, not in prompts, settings committed to a repository, or command arguments.\n\n## Which authentication method should I choose?\n\nUse a provider API key for service-style automation. Use a supported subscription login for an interactive user session. Run `xcsh --list-models <provider>` after authentication to confirm the credential can enumerate models.\n\n## How do I select a model explicitly?\n\n```sh\nxcsh --model p-openai/gpt-5.2 --no-tools -p \"Summarize README.md\"\n```\n\nReplace the example with a model shown by your installed build. Provider-qualified names avoid an accidental fuzzy match when several providers expose similar model names.\n",
|
|
47
|
+
"en/getting-started/quickstart.mdx": "---\ntitle: \"Quickstart\"\ndescription: \"Start an interactive session, inspect the available model, and validate a manifest without tenant credentials.\"\nsidebar:\n order: 3\n label: \"Quickstart\"\n---\n\nThis quickstart proves the executable, provider selection, and one non-interactive model turn without changing repository or cloud state.\n\n## How do I run a bounded first prompt?\n\n```sh\nxcsh --version\nxcsh --list-models ''\nxcsh --no-session --no-tools -p \"Reply with only: xcsh is ready\"\n```\n\nSelect a provider-qualified model with `--model` if more than one provider is configured. `--no-session` prevents persistence and `--no-tools` prevents tool side effects.\n\n## What should I inspect if the prompt fails?\n\nConfirm the provider credential is available to the process without printing it, then run `xcsh --list-models <provider>`. A missing model points to provider configuration; a missing executable points back to [installation](../installation/).\n",
|
|
48
|
+
"en/index.mdx": "---\ntitle: xcsh\ndescription: Independent open-source agentic shell for terminal work and F5 Distributed Cloud workflows.\ntemplate: splash\neditUrl: false\nhero:\n tagline: An agentic shell for terminal work, extensible automation, and reviewable F5 Distributed Cloud resource workflows.\n image:\n html: '<img src=\"/xcsh/images/xcsh-workflow.svg\" alt=\"Prompt, tools, and F5 Distributed Cloud workflow\" width=\"560\" height=\"360\" />'\n actions:\n - text: Install xcsh\n link: /xcsh/en/getting-started/installation/\n icon: right-arrow\n variant: primary\n - text: Run the quickstart\n link: /xcsh/en/getting-started/quickstart/\n icon: rocket\nsidebar:\n hidden: true\n order: 0\nhead:\n - tag: style\n content: >-\n .hero img { width: min(100%, 35rem); height: auto; filter: drop-shadow(0 1rem 2.5rem color-mix(in srgb, var(--sl-color-accent) 28%, transparent)); }\n .hero h1 { text-wrap: balance; }\n---\n\nxcsh combines an interactive coding agent with deterministic F5 Distributed Cloud resource commands. It is an independent open-source project, not an F5 product.\n\n## Where should I start?\n\n- New installation: [install xcsh](./getting-started/installation/), then run the [quickstart](./getting-started/quickstart/).\n- F5 Distributed Cloud change: select a [context and namespace](./f5-distributed-cloud/contexts-namespaces/), then [validate and diff](./f5-distributed-cloud/validate-diff/).\n- Existing session: review the [interactive shell](./use-xcsh/interactive-tui/) and [session controls](./use-xcsh/sessions-memory/).\n- Automation: choose a [headless mode](./automate-extend/headless-protocols/) or use the [SDK](./automate-extend/sdk/).\n",
|
|
49
|
+
"en/integrations-deployment/chrome.mdx": "---\ntitle: \"Chrome\"\ndescription: \"Use the xcsh Chrome extension and native host with an isolated automation profile.\"\nsidebar:\n order: 3\n label: \"Chrome\"\n---\n\nThe Chrome integration connects xcsh to a browser session for supported console automation. The installed `xcsh chrome --help` output is the command authority.\n\n## What is the safe operating boundary?\n\nUse a dedicated profile and an authorized target. Confirm the visible account, URL, and object before an action that changes state. Prefer deterministic F5 Distributed Cloud resource commands whenever they cover the same operation.\n\n## What is verified here?\n\nThe repository exposes Chrome session inspection and arrangement through the `chrome` command. Interface-specific procedures require a captured browser transcript; this page does not claim an untested click path.\n",
|
|
50
|
+
"en/integrations-deployment/containers.mdx": "---\ntitle: \"Containers\"\ndescription: \"Run the published multi-architecture Alpine image with explicit mounts and credentials.\"\nsidebar:\n order: 4\n label: \"Containers\"\n---\n\nThe published container packages xcsh for process isolation and repeatable deployment. It does not grant cloud credentials or filesystem access by itself.\n\n## How do I verify an image?\n\n```sh\ndocker pull ghcr.io/f5-sales-demo/xcsh:latest\ndocker run --rm ghcr.io/f5-sales-demo/xcsh:latest --version\n```\n\nPin a version tag or digest for automation. Mount only the task directory and inject credentials through the runtime's secret mechanism.\n\n## What must remain outside the image?\n\nKeep user contexts, provider tokens, and writable session data in explicit mounts or secret stores. Do not bake them into a derived layer.\n",
|
|
51
|
+
"en/integrations-deployment/herdr.mdx": "---\ntitle: \"Integrate with Herdr\"\ndescription: \"Understand source-verified Herdr workspace launch, terminal actions, protocol negotiation, and isolation.\"\nsidebar:\n order: 5\n label: \"Herdr\"\n---\n\nHerdr support is optional and host-dependent. This page describes the repository contract only; it does not claim an observed Herdr session.\n\n## Negotiate the host protocol\n\nThe integration checks the available socket protocol and media or graphics capabilities before it requests a workspace. Missing negotiation support leaves ordinary xcsh terminal operation intact.\n\n## Launch a conversation-owned workspace\n\nA workspace is tied to the conversation identity supplied at startup. Terminal-management actions create or address panes within that workspace, and lifecycle reporting stays anchored to the same startup context. Do not reuse an unrelated workspace merely because its socket is reachable.\n\n## Recover from socket failure\n\nConnection and framing failures surface as integration diagnostics. The client must not open an inbound listener as a fallback. Close conversation-owned resources through the supported lifecycle and preserve unrelated Herdr workspaces.\n",
|
|
52
|
+
"en/integrations-deployment/index.mdx": "---\ntitle: \"Integrations and deployment\"\ndescription: \"Deploy xcsh in containers and connect source-verified editor, browser, Office, and Herdr surfaces.\"\nsidebar:\n order: 0\n label: \"Overview\"\n---\n\nChoose an integration by host, authority, and lifecycle boundary.\n\n## Which integration fits?\n\n- [Containers](./containers/) for an isolated packaged runtime.\n- [VS Code](./vscode/), [Chrome](./chrome/), [Office](./office/), or [Herdr](./herdr/) only when that companion surface is installed and the task needs it.\n",
|
|
53
|
+
"en/integrations-deployment/office.mdx": "---\ntitle: \"Microsoft Office task pane\"\ndescription: \"Serve or sideload the embedded task pane for Excel, Word, and PowerPoint.\"\nsidebar:\n order: 2\n label: \"Microsoft Office task pane\"\n---\n\nThe Office pane packages an xcsh sidebar for supported Excel, Word, and PowerPoint hosts. `xcsh office --help` describes the installed serve, print, and sideload actions.\n\n## Who owns the test surface?\n\nPackage tests own pane components, bridge messages, and host-independent state. Office-host integration tests own document APIs, sideloading, and task-pane lifecycle. Changes that cross the bridge require both suites; a passing browser-style component test does not prove Word, Excel, or PowerPoint host behavior.\n\n## What must be running?\n\nThe pane build and its local bridge/server must match the xcsh version used for the session. One active sidebar is bound to one server session at a time.\n\n## What is not asserted here?\n\nHost-specific menu and sideload steps vary by Office platform. Without a recorded host transcript, this page describes the source-verified boundary only and does not promise a particular ribbon path.\n",
|
|
54
|
+
"en/integrations-deployment/vscode.mdx": "---\ntitle: \"VS Code\"\ndescription: \"Use the companion VS Code integration with the same xcsh model and session foundation.\"\nsidebar:\n order: 1\n label: \"VS Code\"\n---\n\nThe companion VS Code extension embeds an xcsh conversation in an editor workspace. Its extension manifest and source repository define the supported commands and distribution channel.\n\n## What carries over from the terminal?\n\nProvider configuration, model selection, session concepts, and workspace file boundaries follow the xcsh runtime. Open the intended workspace before starting a conversation.\n\n## What is not asserted here?\n\nNo editor click sequence is documented without an Extension Development Host transcript. Use the terminal CLI to validate runtime behavior independently of the editor shell.\n",
|
|
55
|
+
"en/reference-troubleshooting/cli-reference.mdx": "---\ntitle: \"CLI command and flag reference\"\ndescription: \"Review the current top-level commands, global flags, and resource command patterns.\"\nsidebar:\n order: 1\n label: \"CLI command and flag reference\"\n---\n\nThe installed help is the command authority for its release.\n\n## Which top-level commands exist?\n\n| Area | Commands |\n| --- | --- |\n| Resources | `validate`, `diff`, `create`, `apply`, `update`, `get`, `export`, `delete` |\n| Runtime | `config`, `setup`, `sandbox`, `stats`, `search`, `shell` |\n| Extensibility | `agents`, `plugin`, `worker`, `manager` |\n| Interfaces | `chrome`, `office`, `herdr` |\n| Maintenance | `self-update`, `update --check` |\n\n## How do I script a command safely?\n\nRun `xcsh <command> --help` against the pinned executable, prefer long flags, and request `--result-file` or JSON where supported. On `update`, `-f` means a resource manifest; executable force-update uses `--force`.\n",
|
|
56
|
+
"en/reference-troubleshooting/configuration-schema.mdx": "---\ntitle: \"Configuration schema\"\ndescription: \"Navigate the schema-backed settings for appearance, models, interaction, context, editing, tools, tasks, providers, and sandboxing.\"\nsidebar:\n order: 3\n label: \"Configuration schema\"\n---\n\nThe schema groups settings for appearance, models, interaction, context, editing, tools, tasks, providers, and sandboxing. It evolves with the executable.\n\n## How do I inspect the effective schema-backed values?\n\n```sh\nxcsh config list --json\nxcsh config get <key>\n```\n\nUse `xcsh config set <key> <value>` only for a key present in the installed schema. Reset one key with `xcsh config reset <key>` rather than copying defaults from another release.\n\n## Which source defines a setting?\n\nThe settings schema and its tests in the matching source release define type, default, and validation. Effective output defines the value after precedence is applied.\n",
|
|
57
|
+
"en/reference-troubleshooting/diagnostics.mdx": "---\ntitle: \"Run diagnostics\"\ndescription: \"Collect version, configuration, provider, context, and sandbox evidence without exposing secrets.\"\nsidebar:\n order: 4\n label: \"Run diagnostics\"\n---\n\nCollect the smallest evidence set that identifies the failing layer. Never print credentials or raw context files.\n\n## The shell cannot find xcsh\n\nRun `command -v xcsh` and `xcsh --version`. If the path belongs to an old installation channel, remove that channel and reinstall once through the intended channel.\n\n## A model is unavailable or authentication fails\n\nRun `xcsh --list-models <provider>`. If no models appear, verify the relevant credential is present without echoing it. Retry with a provider-qualified `--model` name.\n\n## A context or resource command fails\n\nConfirm `/context status` and the explicit namespace. Run `validate` to separate local manifest errors from live API errors, then retry a read-only `get` or `diff`.\n\n## A tool or extension fails during startup\n\nUse `--no-mcp --no-extensions --no-rules` and, if needed, `--no-pty`. Re-enable one subsystem at a time. Check optional dependencies with `xcsh setup <component> --check --json` and plugins with `xcsh plugin doctor`.\n",
|
|
58
|
+
"en/reference-troubleshooting/index.mdx": "---\ntitle: \"Reference and troubleshooting\"\ndescription: \"Diagnose installations, providers, contexts, and tools, then consult current command and configuration references.\"\nsidebar:\n order: 0\n label: \"Overview\"\n---\n\nBegin with the observed symptom and isolate one layer at a time.\n\n## Where do I look?\n\n- [Diagnostics](./diagnostics/) for installation, provider, context, and tool symptoms.\n- [CLI reference](./cli-reference/) for current command shapes.\n- [Slash commands and hotkeys](./slash-keybindings/) for interactive discovery.\n- [Configuration schema](./configuration-schema/) for supported settings.\n\nTerms are defined where they are used; there is no separate glossary.\n",
|
|
59
|
+
"en/reference-troubleshooting/slash-keybindings.mdx": "---\ntitle: \"Slash command reference\"\ndescription: \"Find the interactive commands for models, sessions, contexts, resources, plugins, MCP, tools, and UI state.\"\nsidebar:\n order: 2\n label: \"Slash command reference\"\n---\n\nSlash commands are interactive TUI controls, not shell subcommands. Type `/` to view the registry active in the current session.\n\n## How do I find a command or keybinding?\n\nRun `/help` for categorized commands and `/hotkeys` for the resolved terminal key map. Use `/model`, `/context status`, and `/mcp status` to inspect those subsystems.\n\n## Why can the list differ?\n\nThe installed release, current mode, and loaded extensions can change the registry. Runtime completion is therefore canonical; this page intentionally does not freeze a complete list or key table.\n",
|
|
60
|
+
"en/use-xcsh/agent-loop.mdx": "---\ntitle: \"How xcsh works\"\ndescription: \"Understand how prompts, model turns, tool calls, results, and session entries form the agent loop.\"\nsidebar:\n order: 1\n label: \"How xcsh works\"\n---\n\nA user message enters the selected model. The model may request a tool; xcsh executes the allowed tool, appends its result, and continues until the model produces a final response or the run stops.\n\n## Where is the durable record?\n\nSession JSONL stores messages and tool events. The terminal rendering is a view of that state, not the canonical record. Export or inspect the session when an exact sequence matters.\n\n## Where are side effects introduced?\n\nModel text alone does not change files or external systems. Tools such as shell, edit, browser, and task agents can. Restrict a run with `--tools`, `--no-tools`, `--no-mcp`, or `--no-extensions` when the task needs a smaller boundary.\n",
|
|
61
|
+
"en/use-xcsh/built-in-tools.mdx": "---\ntitle: \"Use built-in tools\"\ndescription: \"Let the agent read, search, edit, execute, inspect images, browse, and delegate within configured boundaries.\"\nsidebar:\n order: 4\n label: \"Use built-in tools\"\n---\n\nBuilt-in tools cover file reading, search, editing, shell execution, images, browser work, notebooks, tasks, todos, and user questions. Optional plugins and MCP servers can add more.\n\n## How does Python execute?\n\nThe Python tool sends code to a managed gateway and kernel, captures text plus supported MIME results, and returns normalized output to the session. Interpreter and kernel configuration are independent of the model provider. Treat the gateway environment as executable code authority: restrict dependencies, working directories, and credentials at the process boundary.\n\n## How do I reduce the tool boundary?\n\nUse `--no-tools` for a text-only turn or `--tools read,grep` for an inspection-only run. Add `--no-mcp` and `--no-extensions` when discovery must not expand the set.\n\n## Which tools require extra care?\n\nShell and edit can change the filesystem; browser can change remote state; task agents can perform several tool calls. Read and grep are normally observational, but can still expose sensitive file contents to the selected model.\n",
|
|
62
|
+
"en/use-xcsh/execution-modes.mdx": "---\ntitle: \"Terminal CLI\"\ndescription: \"Choose interactive, print, resume, and deterministic subcommand modes from a shell.\"\nsidebar:\n order: 2\n label: \"Terminal CLI\"\n---\n\nThe terminal entry point supports an interactive TUI, one-shot print mode, persisted sessions, and deterministic resource subcommands.\n\n## How do the modes differ?\n\n| Need | Invocation |\n| --- | --- |\n| Interactive conversation | `xcsh` |\n| One model turn | `xcsh -p \"prompt\"` |\n| Structured process stream | `xcsh --mode json -p \"prompt\"` |\n| Local manifest check | `xcsh validate -f manifest.yaml` |\n\nUse resource subcommands for manifest lifecycle operations; do not ask a model to imitate them.\n",
|
|
63
|
+
"en/use-xcsh/index.mdx": "---\ntitle: \"Use xcsh\"\ndescription: \"Work with the agent loop, terminal UI, tools, sessions, memory, plans, and specialized agents.\"\nsidebar:\n order: 0\n label: \"Overview\"\n---\n\nThe agentic shell alternates model responses with tool calls and stores those events in a session. Start in the directory that defines the task boundary.\n\n## What should I learn first?\n\n- [How the loop works](./agent-loop/)\n- [Interactive prompts and files](./interactive-tui/)\n- [Built-in tool boundaries](./built-in-tools/)\n- [Sessions, forks, compaction, and memory](./sessions-memory/)\n- [Planning and specialized agents](./planning-agents/)\n",
|
|
64
|
+
"en/use-xcsh/interactive-tui.mdx": "---\ntitle: \"Use the interactive TUI\"\ndescription: \"Navigate the prompt editor, status line, model selector, tool output, and command palette.\"\nsidebar:\n order: 3\n label: \"Use the interactive TUI\"\n---\n\nRun `xcsh` without `--print` to open the terminal interface. Type `/` to discover commands available in the installed build.\n\n## How do I send prompts and local files?\n\nEnter text at the prompt. Prefix a file with `@`, for example:\n\n```sh\nxcsh @README.md \"List only the prerequisites\"\n```\n\nImages can be attached when the chosen model supports vision. Treat every attached file as prompt content and exclude secrets.\n\n## How do I discover controls?\n\nUse `/help` for command groups and `/hotkeys` for the active key map. Those runtime views outrank a copied key list because extensions and releases can change the available controls.\n",
|
|
65
|
+
"en/use-xcsh/planning-agents.mdx": "---\ntitle: \"Plan complex work\"\ndescription: \"Separate exploration and decisions from implementation with xcsh planning controls.\"\nsidebar:\n order: 6\n label: \"Plan complex work\"\n---\n\nPlanning mode separates investigation and decisions from implementation. Use it when a task has multiple files, external side effects, or unresolved product choices.\n\n## What belongs in a decision-complete plan?\n\nState the objective, scope boundaries, exact files or systems, ordered changes, validation, rollback or cleanup, and decisions that still require a person. A list of vague intentions is not executable.\n\n## When should I use a specialized agent?\n\nUse a bounded agent when its definition matches one independent subtask. Export editable bundled definitions with `xcsh agents unpack --project`, review `.xcsh/agents/`, and inspect the agent result before accepting it. The parent session remains responsible for integration and validation.\n",
|
|
66
|
+
"en/use-xcsh/sessions-memory.mdx": "---\ntitle: \"Resume and export sessions\"\ndescription: \"Continue, locate, fork, or export persisted conversations.\"\nsidebar:\n order: 5\n label: \"Resume and export sessions\"\n---\n\nSessions persist conversation and tool events. Use `--continue` for the latest directory session, `--resume` to select one, and `--fork` to create an independent continuation.\n\n## How do I branch or compact a long conversation?\n\nIn the TUI, `/tree` shows the conversation structure, `/branch` or `/fork` creates another path, and `/compact` replaces older context with a summary. Inspect the summary before relying on it.\n\n## How does project memory differ?\n\nMemory holds durable project facts across sessions; a session holds one conversation history. Start with `--no-memories` when stored context must not influence the run. Keep credentials and transient outputs out of memory files.\n\n## How do I export a record?\n\nRun `xcsh --export <session.jsonl>` to create HTML from a session file. Review the export for sensitive content before sharing it.\n",
|
|
67
|
+
"en/use-xcsh/tui-navigation.mdx": "---\ntitle: \"Navigate the TUI\"\ndescription: \"Use the tree, keyboard map, themes, and terminal controls without losing session state.\"\nsidebar:\n order: 7\n label: \"TUI navigation\"\n---\n\nThe interactive terminal keeps the session model separate from its visual tree. Closing a picker or changing a theme alters the view; it does not rewrite session JSONL.\n\n## Open and move through the session tree\n\nUse `/tree` to open the branch navigator. Arrow keys move between visible nodes, `Enter` selects a branch, and `Escape` closes the overlay. A selected historical node changes the active leaf only through the session operation exposed by the UI; it does not delete sibling branches.\n\n## Read the active keyboard map\n\nOpen `/hotkeys` for the bindings registered by the running build. The prompt editor handles text navigation before global shortcuts, while overlays receive keys while focused. Treat the displayed map as authoritative because terminal key encodings and extension-provided actions can change the available set.\n\n## Select and customize a theme\n\nUse `/theme` to choose a bundled or discovered theme. Theme files define semantic tokens rather than terminal escape sequences, so components share colors for text, borders, status, tools, diffs, and diagnostics. Keep custom themes under the configured xcsh data roots and verify contrast in both the main transcript and modal overlays.\n",
|
|
80
68
|
};
|