@f5-sales-demo/xcsh 21.11.9 → 21.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "21.
|
|
4
|
+
"version": "21.12.1",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
64
|
-
"@f5-sales-demo/pi-agent-core": "21.
|
|
65
|
-
"@f5-sales-demo/pi-ai": "21.
|
|
66
|
-
"@f5-sales-demo/pi-natives": "21.
|
|
67
|
-
"@f5-sales-demo/pi-resource-management": "21.
|
|
68
|
-
"@f5-sales-demo/pi-tui": "21.
|
|
69
|
-
"@f5-sales-demo/pi-utils": "21.
|
|
70
|
-
"@f5-sales-demo/xcsh-stats": "21.
|
|
64
|
+
"@f5-sales-demo/pi-agent-core": "21.12.1",
|
|
65
|
+
"@f5-sales-demo/pi-ai": "21.12.1",
|
|
66
|
+
"@f5-sales-demo/pi-natives": "21.12.1",
|
|
67
|
+
"@f5-sales-demo/pi-resource-management": "21.12.1",
|
|
68
|
+
"@f5-sales-demo/pi-tui": "21.12.1",
|
|
69
|
+
"@f5-sales-demo/pi-utils": "21.12.1",
|
|
70
|
+
"@f5-sales-demo/xcsh-stats": "21.12.1",
|
|
71
71
|
"@mozilla/readability": "^0.6",
|
|
72
72
|
"@sinclair/typebox": "^0.34",
|
|
73
73
|
"@xterm/headless": "^6.0",
|
|
@@ -56,10 +56,13 @@ const HERDR_AGENT_LABEL = "xcsh";
|
|
|
56
56
|
// herdr keys its official lifecycle-authority and session-resume plumbing on the
|
|
57
57
|
// `herdr:<agent>` source convention, so report as "herdr:xcsh" (not bare "xcsh").
|
|
58
58
|
const HERDR_SOURCE = "herdr:xcsh";
|
|
59
|
+
const PHASE_SOURCE = "xcsh:phase";
|
|
59
60
|
const REPORT_METHOD = "pane.report_agent";
|
|
61
|
+
const METADATA_METHOD = "pane.report_metadata";
|
|
60
62
|
const SESSION_METHOD = "pane.report_agent_session";
|
|
61
63
|
const RELEASE_METHOD = "pane.release_agent";
|
|
62
64
|
const SOCKET_TIMEOUT_MS = 2000;
|
|
65
|
+
const PHASE_LABEL_TTL_MS = 60_000;
|
|
63
66
|
const SETTLED_TURN_RECONCILE_DELAY_MS = 25;
|
|
64
67
|
const PROMPT_BLOCKED_REASONS = {
|
|
65
68
|
select: "selection required",
|
|
@@ -140,6 +143,8 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
140
143
|
// process in a pane always starts above whatever the previous process reached.
|
|
141
144
|
// Matches the pi/omp reporters and stays well inside Number.MAX_SAFE_INTEGER.
|
|
142
145
|
let seq = Date.now() * 1000;
|
|
146
|
+
// Separate monotonic sequence for metadata frames (keyed by source in Herdr).
|
|
147
|
+
let phaseSeq = Date.now() * 1000;
|
|
143
148
|
// Retains the fixed reason while an interactive prompt awaits the user, so an
|
|
144
149
|
// agent_end duplicate cannot erase herdr's stored blocked message.
|
|
145
150
|
let promptBlockedReason: string | undefined;
|
|
@@ -197,6 +202,32 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
197
202
|
seq: seq++,
|
|
198
203
|
});
|
|
199
204
|
|
|
205
|
+
const reportMetadata = (params: Record<string, unknown>): Promise<void> => {
|
|
206
|
+
const socketPath = process.env.HERDR_SOCKET_PATH;
|
|
207
|
+
if (!socketPath) {
|
|
208
|
+
return Promise.resolve();
|
|
209
|
+
}
|
|
210
|
+
const frame = {
|
|
211
|
+
pane_id: paneId,
|
|
212
|
+
source: PHASE_SOURCE,
|
|
213
|
+
applies_to_source: HERDR_SOURCE,
|
|
214
|
+
seq: phaseSeq++,
|
|
215
|
+
...params,
|
|
216
|
+
};
|
|
217
|
+
return enqueue(() => sendToHerdrSocket(socketPath, METADATA_METHOD, frame, onError));
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const setPhaseLabel = (label: string): Promise<void> =>
|
|
221
|
+
reportMetadata({
|
|
222
|
+
state_labels: { working: label },
|
|
223
|
+
ttl_ms: PHASE_LABEL_TTL_MS,
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
const clearPhaseLabel = (): Promise<void> =>
|
|
227
|
+
reportMetadata({
|
|
228
|
+
clear_state_labels: true,
|
|
229
|
+
});
|
|
230
|
+
|
|
200
231
|
// Report the current session's identity so herdr can resume this pane
|
|
201
232
|
// (`xcsh --resume=<session>`) after a server restart. This is sent only over
|
|
202
233
|
// the socket; if herdr did not inject a socket path we skip it (state still
|
|
@@ -295,15 +326,52 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
295
326
|
|
|
296
327
|
// An interactive prompt (permission gate, ask tool, confirm/input) is
|
|
297
328
|
// awaiting the user: that is herdr's "needs attention" (blocked) state.
|
|
298
|
-
pi.on("user_prompt_start", event => {
|
|
329
|
+
pi.on("user_prompt_start", async event => {
|
|
299
330
|
promptBlockedReason = getPromptBlockedReason(event.kind);
|
|
300
331
|
void report("blocked", promptBlockedReason);
|
|
332
|
+
await clearPhaseLabel();
|
|
301
333
|
});
|
|
302
334
|
|
|
303
335
|
pi.on("user_prompt_end", async (_event, ctx) => {
|
|
304
336
|
promptBlockedReason = undefined;
|
|
305
337
|
await report(ctx.isIdle() ? "idle" : "working");
|
|
306
338
|
await reportSession(ctx);
|
|
339
|
+
if (!ctx.isIdle()) {
|
|
340
|
+
await setPhaseLabel("tool");
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
// Transient phase-label metadata (thinking / tool / retry / cleanup):
|
|
345
|
+
pi.on("message_update", async event => {
|
|
346
|
+
if (event.assistantMessageEvent.type === "thinking_start") {
|
|
347
|
+
await setPhaseLabel("thinking");
|
|
348
|
+
} else if (event.assistantMessageEvent.type === "thinking_end") {
|
|
349
|
+
await clearPhaseLabel();
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
pi.on("tool_execution_start", async () => {
|
|
354
|
+
await setPhaseLabel("tool");
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
pi.on("tool_execution_end", async () => {
|
|
358
|
+
await clearPhaseLabel();
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
pi.on("auto_retry_start", async () => {
|
|
362
|
+
await setPhaseLabel("retry");
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
pi.on("auto_retry_end", async () => {
|
|
366
|
+
await clearPhaseLabel();
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
pi.on("auto_compaction_start", async () => {
|
|
370
|
+
await setPhaseLabel("cleanup");
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
pi.on("auto_compaction_end", async () => {
|
|
374
|
+
await clearPhaseLabel();
|
|
307
375
|
});
|
|
308
376
|
|
|
309
377
|
// Relinquish pane authority so herdr stops showing xcsh once we exit.
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "21.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "21.12.1",
|
|
21
|
+
"commit": "e5fd16a2a26cee5ecd17deeb17f1dab844fa32c2",
|
|
22
|
+
"shortCommit": "e5fd16a",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v21.
|
|
25
|
-
"commitDate": "2026-09-
|
|
26
|
-
"buildDate": "2026-09-
|
|
24
|
+
"tag": "v21.12.1",
|
|
25
|
+
"commitDate": "2026-09-06T03:53:19+00:00",
|
|
26
|
+
"buildDate": "2026-09-06T04:44:24.034Z",
|
|
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.
|
|
31
|
+
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/e5fd16a2a26cee5ecd17deeb17f1dab844fa32c2",
|
|
32
|
+
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.12.1"
|
|
33
33
|
};
|
|
@@ -3,66 +3,66 @@
|
|
|
3
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/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
|
|
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- [
|
|
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##
|
|
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##
|
|
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##
|
|
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##
|
|
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##
|
|
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##
|
|
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##
|
|
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 command-line interface (CLI) parses arguments, resolves configuration and providers, creates a session, streams model events, dispatches tools, and renders the resulting entries.\n\n```text\nuser message\n -> cli.ts parse argv, resolve config and providers\n -> session factory create or resume the session\n -> provider stream AssistantMessageEvent deltas\n -> tool dispatch execute, append result, loop\n -> session JSONL append-only record\n -> renderer view of the appended state\n```\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 JSON Lines (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 each gate before you open the pull request:\n\n1. `bun run check` for formatting, linting, and types.\n2. `bun run test` for the package suites.\n3. `python3 scripts/check_docs_quality.py` when an English MDX file changed.\n4. The secret and personally identifiable information (PII) scans.\n5. The repository review gate.\n\nInspect the complete diff, then 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, Model Context Protocol (MCP) server, or software development kit (SDK) application programming interface (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\nRead `packages/coding-agent/src/discovery` for the provider scan and deduplication, and `packages/coding-agent/src/capability` for the normalized capability items.\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- [Storage, blobs, and artifacts](./storage-artifacts/)\n- [Tool runtime](./tool-runtime/)\n- [Provider streaming](./provider-streaming/)\n- [Extension discovery](./extension-discovery/)\n- [Native runtime](./native-runtime/)\n- [Native development](./native-development/)\n- [Terminal user interface (TUI) runtime](./tui-runtime/)\n- [Relationship to upstream pi](./upstream-pi/)\n- [Prompt authoring](./prompt-authoring/)\n- [Build, test, contribute, and release](./build-release/)\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## How do I add or change a native export?\n\nDefine the Rust implementation and Node-application programming interface (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## How do I 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## How do I 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\nChange `crates/pi-natives/src` and `packages/natives` together; a signature that exists on only one side fails at load rather than at build.\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-application programming interface (API) implementations for performance-sensitive work.\n\n## How is an addon selected and validated?\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## How do I 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## Which subsystems does the addon cover?\n\nThe addon covers terminal and pseudo-terminal (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\nRead `packages/natives` for the TypeScript wrappers and loader, and `crates/pi-natives/src` for the Rust implementations.\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## What does the eight-point checklist require?\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## How is the system prompt composed?\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## How do I audit a prompt change?\n\nInspect the final composed prompt for representative capability sets, then run the template, application programming interface (API) spec, deduplication, deprecation, workspace-boundary, start-folder, and absent-plugin tests.\n\nRecord why each new sentence belongs at that layer, and remove a stale alias rather than documenting both paths.\n\nRead `packages/coding-agent/src/prompts` for the composed fragments and their ordering tests.\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```text\nprovider wire events adapter agent loop\n text delta -> text delta -> append to message\n reasoning delta -> reasoning delta -> append to message\n tool start -> buffer call id\n tool arg fragment -> accumulate JSON (no event yet)\n tool arg complete -> tool request -> dispatch tool\n usage -> usage -> account tokens\n error or cancel -> terminal settle (once) -> stop the turn\n```\n\n## How are tool calls normalized incrementally?\n\nTool arguments can arrive as JavaScript Object Notation (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## How does a stream 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\nRead `packages/ai/src/stream.ts` for the normalized event stream and `packages/ai/src/providers` for the per-vendor adapters.\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 JSON Lines (JSONL) preserves the event graph; blob and artifact stores keep bulky data addressable without inflating every session entry.\n\n## How are stored values allocated and resolved?\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 uniform resource locator (URL)-like identifiers. URL handlers validate the scheme and authority before opening the backing object.\n\n## How do resume, fork, and move treat 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## How is filesystem discovery cached?\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\nRead `packages/coding-agent/src/session` for the append-only event graph and `packages/coding-agent/src/discovery` for the scan cache.\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## How do shell and notebook work execute?\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 Multipurpose Internet Mail Extensions (MIME) rendering.\n\n## How are deferred actions resolved?\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 application programming interface (API) to register actions; they must pair cancellation and cleanup with any external resource they create.\n\n## How are commands and task agents discovered?\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\nRead `packages/coding-agent/src/tools/bash.ts` for the shell boundary, `packages/coding-agent/src/tools/notebook.ts` for cell editing, and `packages/coding-agent/src/slash-commands/builtin-registry.ts` for command discovery.\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 terminal user interface (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## How are input and rendering routed?\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## How do I 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\nRead `packages/tui/src` for the component and rendering contracts, and `packages/coding-agent/src/tui` for the session-aware components built on them.\n",
|
|
17
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 <
|
|
19
|
-
"en/automate-extend/headless-protocols.mdx": "---\ntitle: \"Headless modes\"\ndescription: \"Integrate xcsh with scripts through print, JSON, RPC,
|
|
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##
|
|
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
|
|
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\
|
|
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\
|
|
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##
|
|
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, JSON-RPC, agent client protocol, manager, and worker modes.\"\nsidebar:\n order: 1\n label: \"Headless modes\"\n---\n\nHeadless integrations select `json`, `rpc`, or `acp` with `--mode`: a JavaScript Object Notation (JSON) event stream, JSON remote procedure call (RPC), or the agent client protocol (ACP). 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```bash\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 software development kit (SDK) instead?\n\nUse the SDK when the host process needs in-memory session control, tool registration, or provider events. See [SDK automation](./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## How are rules discovered and classified?\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## What determines hook execution order?\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## How do I test the hook boundary?\n\nExercise each of these separately:\n\n1. Discovery, so the module set is the one you expect.\n2. The exact event, with a representative payload.\n3. Mutation ordering, with more than one handler registered.\n4. Cancellation.\n5. A handler that throws.\n\nInterface calls made by hooks require an interactive host, so a headless integration must 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- [Headless modes](./headless-protocols/) drive xcsh from a script over a process boundary.\n- [Software development kit (SDK) automation](./sdk/) embeds sessions in a host application.\n- [Extensions and custom tools](./extensions-custom-tools/) run TypeScript hooks or tools.\n- [Hooks and rules](./hooks-rules/) choose between lifecycle code and declarative guidance.\n- [Skills](./skills/) add discoverable instructions.\n- [Plugins and marketplaces](./plugins-marketplaces/) package installable capabilities.\n- [Model Context Protocol (MCP) quickstart](./mcp-quickstart/) connects one out-of-process server.\n- [MCP configuration](./mcp-configuration/) declares transports, variables, and disabled servers.\n- [MCP runtime and authoring](./mcp-runtime-authoring/) traces connection lifecycle and server contracts.\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\nModel Context Protocol (MCP) 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## Which transport and lifecycle should I declare?\n\nA local server uses a command plus arguments and communicates over stdio. A remote server declares an HTTP-capable uniform resource locator (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## How do I 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## How do I disable a discovered server?\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\nModel Context Protocol (MCP) 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. Confirm it is connected with `/mcp list`, exercise the connection with `/mcp test`, then 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 Model Context Protocol (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```text\nmanager transport server\n resolve configuration\n open one connection -> initialize -> accept\n list capabilities -> tools/list -> tool descriptors\n register bridged tools\n agent loop calls tool -> tools/call (id N) -> result (id N)\n notifications -> (uncorrelated)\n refresh set -> close removed\n shutdown -> close transports -> child process exits\n```\n\n## How does a request move through the runtime?\n\nThe manager resolves configuration, establishes one connection per active server, caches that connection, lists capabilities, and registers bridged tools. JSON-remote procedure call (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## How do reload and teardown work?\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## What makes a tool server compatible?\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 each of these against the same transport declared in `mcp.json`:\n\n1. Initialization.\n2. Tool listing.\n3. One successful call.\n4. Invalid input.\n5. Cancellation.\n6. Reconnect after a dropped transport.\n7. Shutdown.\n\nRead `packages/coding-agent/src/mcp` for the manager, transport selection, and tool bridging.\n",
|
|
25
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 <
|
|
28
|
-
"en/configure-secure/environment-reference.mdx": "---\ntitle: \"Environment variable reference\"\ndescription: \"
|
|
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.
|
|
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 <
|
|
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##
|
|
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 software development kit (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: \"Look up the environment variables that select models, credentials, tenants, execution behavior, storage roots, and diagnostics.\"\nsidebar:\n order: 2\n label: \"Environment variables\"\n---\n\nEnvironment variables carry credentials and process-scoped overrides. Settings files and command flags keep their documented precedence; a similarly named variable is not automatically supported. Provider adapters read their own vendor key names, which the adapter defines rather than this list.\n\n## Which variables configure models, providers, and search?\n\n| Variable | Controls |\n| --- | --- |\n| `PI_SMOL_MODEL` | Default model for the lightweight role, equivalent to `--smol` |\n| `PI_SLOW_MODEL` | Default model for the reasoning role, equivalent to `--slow` |\n| `PI_PLAN_MODEL` | Default model for the planning role, equivalent to `--plan` |\n| `XCSH_LOCALE` | Interface locale, ahead of `PI_LOCALE` and `LANG` |\n\nA flag beats the variable: `--smol` overrides `PI_SMOL_MODEL` for that invocation. Model selection stays a model-registry decision, so a name these variables set must still resolve through `xcsh --list-models <PROVIDER>`.\n\n## Which variables address an F5 Distributed Cloud tenant?\n\n| Variable | Controls |\n| --- | --- |\n| `XCSH_API_URL` | Tenant application programming interface (API) endpoint when no named context is active |\n| `XCSH_API_TOKEN` | Tenant API credential for that endpoint |\n| `XCSH_TENANT` | Tenant identifier reported in context status |\n| `XCSH_CONTEXT_NAME` | Name of the context the session binds to |\n| `XCSH_NAMESPACE` | Namespace applied when a command does not pass `-n` |\n| `F5XC_NAMESPACE` | Namespace source recorded in resource operation records |\n\nTreat every value in this group as a secret. Supply them through the runtime environment or a named context, never through a committed file or a command argument that reaches shell history.\n\n## Which variables configure Python, shell, and tool execution?\n\n| Variable | Controls |\n| --- | --- |\n| `PI_PYTHON_GATEWAY_URL` | Endpoint the Python tool sends code to |\n| `PI_PYTHON_GATEWAY_TOKEN` | Credential for that gateway |\n| `PI_PYTHON_SKIP_CHECK` | Skips the gateway warm-up probe |\n| `PI_SHELL_PREFIX` | Command prefix wrapped around shell tool invocations |\n| `PI_BASH_NO_LOGIN` | Runs the shell without `-l` |\n| `PI_NO_PTY` | Disables pseudo-terminal (PTY) execution, equivalent to `--no-pty` |\n| `PI_EDIT_VARIANT` | Selects the edit tool implementation and rejects an unknown value |\n\nShell execution inherits the launched process environment, subject to the sandbox and command policy. Restrict dependencies, working directory, and credentials at the process boundary rather than in the prompt.\n\n## Which variables configure storage, runtime, and diagnostics?\n\n| Variable | Controls |\n| --- | --- |\n| `PI_CODING_AGENT_DIR` | Primary agent data root, including session storage |\n| `PI_CONFIG_DIR` | Configuration root directory name, `.xcsh` by default |\n| `PI_PACKAGE_DIR` | Packaged asset directory the runtime resolves against |\n| `PI_SESSION_FILE` | Session file a child process attaches to |\n| `PI_NATIVE_VARIANT` | Hardware variant the native addon loader prefers |\n| `PI_CACHE_RETENTION` | Cache retention policy, `short` by default |\n| `PI_NO_TITLE` | Disables title auto-generation, equivalent to `--no-title` |\n| `PI_NOTIFICATIONS` | Desktop notification behavior |\n| `PI_DEBUG_STARTUP` | Startup phase diagnostics |\n| `PI_TIMING` | Phase timing output |\n| `PI_TUI_DEBUG` | Terminal user interface (TUI) rendering diagnostics |\n\nProject configuration stays under `.xcsh/` even when `PI_CODING_AGENT_DIR` moves the user root. Never print a credential-bearing variable into a diagnostic receipt; name the variable and state whether it was set.\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. Inspect [settings precedence and file locations](./settings-files/).\n2. Look up any [environment variable](./environment-reference/) the deployment sets.\n3. Choose a [provider and model route](./providers-routing/).\n4. Apply [secret handling and the filesystem boundary](./secrets-obfuscation/).\n5. Set the [sandbox boundaries](./sandbox-boundaries/) that enforce those decisions.\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 uniform resource locator (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## How do I restrict the exposed tool set?\n\nStart with `--no-tools` or an explicit `--tools` allow-list when a run needs only conversation. Disable Model Context Protocol (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## How do I 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## Where does remote authority differ from local 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
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```
|
|
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
|
|
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 <
|
|
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```
|
|
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```
|
|
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:
|
|
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 <
|
|
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```
|
|
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:
|
|
43
|
-
"en/getting-started/first-manifest.mdx": "---\ntitle: \"Complete your first manifest lifecycle\"\ndescription: \"Validate, compare, apply, inspect, export, and delete
|
|
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:
|
|
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:
|
|
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:
|
|
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```
|
|
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##
|
|
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```
|
|
51
|
-
"en/integrations-deployment/herdr.mdx": "---\ntitle: \"Integrate with Herdr\"\ndescription: \"Understand
|
|
52
|
-
"en/integrations-deployment/index.mdx": "---\ntitle: \"Integrations and deployment\"\ndescription: \"Deploy xcsh in containers and connect
|
|
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.
|
|
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##
|
|
55
|
-
"en/reference-troubleshooting/cli-reference.mdx": "---\ntitle: \"CLI command and flag reference\"\ndescription: \"
|
|
56
|
-
"en/reference-troubleshooting/configuration-schema.mdx": "---\ntitle: \"Configuration schema\"\ndescription: \"
|
|
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 <
|
|
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,
|
|
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
|
|
62
|
-
"en/use-xcsh/execution-modes.mdx": "---\ntitle: \"Terminal CLI\"\ndescription: \"Choose interactive, print, resume, and deterministic subcommand modes
|
|
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
|
|
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```bash\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 application programming interface (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 each of these, without capturing tokens or tenant identifiers:\n\n- The page uniform resource locator (URL).\n- The visible control or result.\n- The browser action taken.\n- The cleanup state afterwards.\n\nRecord only what the transcript shows: an action you did not run is not a documented outcome.\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```bash\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```bash\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```bash\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: 0\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```bash\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 application programming interface (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: 4\n label: \"Connect to F5 Distributed Cloud\"\n---\n\nAn F5 Distributed Cloud context binds an application programming interface (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 terminal user interface (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 one resource manifest.\"\nsidebar:\n order: 5\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. This page walks one resource from local validation to proven deletion, so run it against a lab namespace you are authorized to change.\n\n## How do I check a manifest without credentials?\n\n```bash\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 JavaScript Object Notation (JSON) report before moving to a live context.\n\n## How do I preview the live change?\n\n```bash\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. Read every create, update, and preserve entry before you continue.\n\n## How do I apply and verify the resource?\n\n```bash\nxcsh apply -f manifest.yaml --result-file apply.json\nxcsh get <KIND> <NAME> -n <NAMESPACE> --result-file get.json\n```\n\nCompare the identity and the fields you set in `get.json` against the manifest. A zero exit status records that the request was accepted; only the retrieved object records the resulting state.\n\n## How do I export and remove it?\n\n```bash\nxcsh export <KIND> <NAME> -n <NAMESPACE> -f exported.yaml\nxcsh delete <KIND> <NAME> -n <NAMESPACE> --result-file delete.json\nxcsh get <KIND> <NAME> -n <NAMESPACE>\n```\n\nSanitize server-managed metadata out of `exported.yaml` before you store it. The closing `get` must return the not-found response for that kind; a delete request without the absence check leaves the lifecycle unfinished.\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: 0\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/), which the quickstart requires.\n3. Run the [general quickstart](./quickstart/).\n4. Connect an [F5 Distributed Cloud context](./f5-xc-connection/) when you intend to reach a tenant.\n5. Complete [your first manifest lifecycle](./first-manifest/) against a lab namespace you are authorized to change.\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: 1\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```bash\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```bash\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: 2\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 application programming interface (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```bash\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```bash\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 [software development kit (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, uniform resource locator (URL), and object before an action that changes state. Prefer deterministic F5 Distributed Cloud resource commands whenever they cover the same operation.\n\n## Which Chrome capabilities does xcsh expose?\n\nThe `chrome` command inspects and arranges browser sessions, and `chrome-host` runs the native messaging host that connects the extension to the executable. Page-level interaction is driven by the browser tool inside a session rather than by a subcommand, so scope it with `--tools` in the same way as any other tool.\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```bash\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 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. When the host does not provide it, xcsh terminal operation is unaffected.\n\n## How is the host protocol negotiated?\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## How is a conversation-owned workspace launched?\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## How do I 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 the 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 application programming interfaces (APIs), sideloading, and task-pane lifecycle. A change that crosses the bridge requires 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 binds to one server session at a time.\n\n## Which host steps vary by platform?\n\nRibbon placement, the sideload mechanism, and trust prompts differ across Office on Windows, Office on macOS, and Office on the web. Read the sideload action from `xcsh office --help`, then follow the Microsoft sideloading procedure for the specific host you are targeting.\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## Which behavior should I validate in the terminal?\n\nEditor menus and command palette entries belong to the extension host and change with its release. Reproduce runtime behavior with the command-line interface (CLI) first:\n\n1. Run the same prompt with `xcsh -p` in the workspace directory.\n2. Compare the model, provider, and tool set reported there with the editor session.\n3. Inspect the persisted session file rather than the editor transcript when an exact sequence matters.\n\nA difference between the two points at extension configuration, not at the agent loop.\n",
|
|
55
|
+
"en/reference-troubleshooting/cli-reference.mdx": "---\ntitle: \"CLI command and flag reference\"\ndescription: \"Look up every top-level xcsh command and every global flag a session accepts.\"\nsidebar:\n order: 1\n label: \"CLI command and flag reference\"\n---\n\nThe installed `xcsh <COMMAND> --help` output is the command-line interface (CLI) authority for its release. This page lists the command and flag names that release exposes so you can find one without starting a session.\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`, `shell`, `ssh`, `stats`, `search` |\n| Files and code | `read`, `grep`, `jupyter` |\n| Extensibility | `agents`, `plugin`, `worker`, `manager` |\n| Interfaces | `chrome`, `chrome-host`, `office`, `herdr` |\n| Repository | `commit`, `grievances` |\n| Maintenance | `self-update`, `update --check` |\n\n`search` also answers to `q`. On `update`, `-f` names a resource manifest; an executable force-update uses `--force`.\n\n## Which global flags does a session accept?\n\nThese flags configure an agent launch. They precede the prompt and do not apply to a subcommand.\n\n| Group | Flags |\n| --- | --- |\n| Model | `--model`, `--smol`, `--slow`, `--plan`, `--provider`, `--models`, `--thinking`, `--list-models` |\n| Credentials and context | `--api-key`, `--context` |\n| Prompt | `--system-prompt`, `--append-system-prompt`, `--no-title` |\n| Mode | `--mode` (`text`, `json`, `rpc`, `acp`), `-p`/`--print` |\n| Session | `-c`/`--continue`, `-r`/`--resume`, `--fork`, `--session-dir`, `--no-session`, `--no-memories`, `--export` |\n| Filesystem | `--allow-home`, `--allow-path`, `--no-sandbox` |\n| Capabilities | `--tools`, `--no-tools`, `--no-mcp`, `--no-lsp`, `--no-pty` |\n| Discovery | `-e`/`--extension`, `--hook`, `--plugin-dir`, `--no-extensions`, `--skills`, `--no-skills`, `--no-rules` |\n\n`packages/coding-agent/src/cli/flag-spec.ts` is the single source that renders `--help` and drives the parser, so the two cannot disagree.\n\n## How do I script a command safely?\n\nRun these steps against the pinned executable:\n\n1. Read `xcsh <COMMAND> --help` for the release you pinned.\n2. Write long flags rather than single-character aliases.\n3. Request `--result-file` or `--mode json` wherever the command supports it.\n4. Pass `--allow-path` once per additional directory; it accumulates rather than replacing.\n",
|
|
56
|
+
"en/reference-troubleshooting/configuration-schema.mdx": "---\ntitle: \"Configuration schema\"\ndescription: \"Look up the settings namespaces xcsh validates, and the commands that report effective values.\"\nsidebar:\n order: 3\n label: \"Configuration schema\"\n---\n\n`packages/coding-agent/src/config/settings-schema.ts` defines every recognized settings key with its type, default, and validation. It evolves with the executable, so read the key namespaces here and the values from your own installation.\n\n## Which key namespaces exist?\n\n| Area | Namespaces |\n| --- | --- |\n| Appearance | `theme`, `statusLine`, `display`, `tui`, `terminal`, `images`, `media` |\n| Model and routing | `routing`, `retry`, `thinkingBudgets`, `providers`, `exa` |\n| Interaction | `startup`, `keybindings`, `completion`, `ask`, `stt`, `marketplace` |\n| Context | `context`, `contextPromotion`, `compaction`, `branchSummary`, `memories`, `ttsr` |\n| Editing | `edit`, `read`, `lsp`, `bashInterceptor`, `python` |\n| Tools | `tools`, `todo`, `find`, `grep`, `astGrep`, `astEdit`, `notebook`, `fetch`, `browser`, `web_search`, `calc`, `checkpoint`, `debug`, `inspect_image`, `generate_image`, `renderMermaid`, `bash`, `async`, `mcp` |\n| Tasks and capabilities | `task`, `tasks`, `skills`, `commands` |\n| Security | `secrets`, `sandbox`, `xcsh` |\n| Repository workflows | `commit`, `dev` |\n\nA key is `namespace.name`, as in `compaction.thresholdPercent` or `sandbox.allowRead`. Nested groups extend that form, as in `todo.reminders.max`.\n\n## How do I inspect the effective schema-backed values?\n\n```bash\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. `xcsh config list --json` reports the value after user, project, environment, and command-line precedence is applied. When the two disagree, the schema describes what is legal and the effective output describes what is active.\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 application programming interface (API) errors, then retry a read-only `get` or `diff`.\n\n## A tool or extension fails during startup\n\nStart from the smallest surface, then widen it:\n\n1. Run with `--no-mcp --no-extensions --no-rules`, adding `--no-pty` if the terminal itself is suspect.\n2. Re-enable one subsystem, then repeat the failing command.\n3. Check optional dependencies with `xcsh setup <COMPONENT> --check --json`.\n4. Check 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- [command-line interface (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, Model Context Protocol servers, tools, and session state.\"\nsidebar:\n order: 2\n label: \"Slash command reference\"\n---\n\nSlash commands are interactive terminal user interface (TUI) controls, not shell subcommands. The registry is assembled at startup from built-in commands plus whatever the loaded plugins and extensions register.\n\n## How do I find a command or keybinding?\n\nType `/` in the prompt to list the registry active in the current session, and `/hotkeys` to read the resolved terminal key map. Autocomplete narrows the list as you type, so it reports the current release, mode, and extension set rather than a published snapshot.\n\n## Which subsystems have their own commands?\n\n| Subsystem | Entry point |\n| --- | --- |\n| Models and routing | `/model` |\n| Sessions and history | `/session`, `/resume`, `/tree`, `/branch`, `/fork`, `/compact`, `/export` |\n| F5 Distributed Cloud | `/context`, `/namespace`, `/manifest`, `/validate`, `/diff`, `/apply`, `/get`, `/create`, `/delete` |\n| Capabilities | `/tools`, `/agents`, `/plugin`, `/extensions`, `/mcp` |\n| Session state | `/settings`, `/hotkeys`, `/memory`, `/usage`, `/plan` |\n\n`/context status`, `/mcp list`, and `/plugin list` report the current state of those subsystems without changing anything.\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 JSON Lines (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 Model Context Protocol (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 Multipurpose Internet Mail Extensions (MIME) results, and returns normalized output to the session. Interpreter and kernel configuration are independent of the model provider.\n\nTreat 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 of the command-line interface.\"\nsidebar:\n order: 2\n label: \"Terminal CLI\"\n---\n\nThe command-line interface (CLI) entry point supports an interactive terminal user interface (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- [Terminal command-line interface (CLI) modes](./execution-modes/)\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- [Tree, keyboard map, and theme navigation](./tui-navigation/)\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 user interface (TUI). 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 and prefix a file path with `@` to attach it, as in `@README.md List only the prerequisites`. Autocomplete resolves the path as you type.\n\nThe same attachment syntax works when you start a session from the shell:\n\n```bash\nxcsh @README.md \"List only the prerequisites\"\n```\n\nAttach an image when the chosen model supports vision. Treat every attached file as prompt content and exclude secrets.\n\n## How do I discover controls?\n\nType `/` to list the commands the running build registered, and `/hotkeys` to read the active key map. Those runtime views outrank a copied key list, because extensions and releases change the available controls.\n",
|
|
65
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 <
|
|
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##
|
|
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 terminal user interface (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_FILE>` to create HyperText Markup Language (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 user interface (TUI) keeps the session model separate from its visual tree. Closing a picker or changing a theme alters the view; it does not rewrite the session JSON Lines (JSONL) file.\n\n## How do I 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 interface; it does not delete sibling branches.\n\n## How do I 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 current, because terminal key encodings and extension-provided actions change the available set between builds.\n\n## How do I select and customize a theme?\n\nOpen `/settings` to reach the theme selector, or set the keys directly:\n\n```bash\nxcsh config set theme.dark <THEME_NAME>\nxcsh config set theme.light <THEME_NAME>\nxcsh config set theme.forceSlot auto|dark|light\n```\n\n`theme.dark` and `theme.light` each name one theme, defaulting to `xcsh-dark` and `xcsh-light`, and the terminal's reported background selects between them. Set `theme.forceSlot` to `dark` or `light` where that detection is unreliable, as inside tmux.\n\nTheme 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 check contrast in both the main transcript and modal overlays.\n",
|
|
68
68
|
};
|