@f5-sales-demo/xcsh 21.28.1 → 21.29.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.
Files changed (84) hide show
  1. package/README.md +7 -0
  2. package/package.json +9 -8
  3. package/src/commands/manager.ts +5 -5
  4. package/src/commands/remote-control.ts +11 -4
  5. package/src/config/model-catalog.ts +56 -0
  6. package/src/extensibility/extensions/loader.ts +30 -0
  7. package/src/extensibility/extensions/types.ts +2 -0
  8. package/src/index.ts +3 -0
  9. package/src/internal-urls/build-info.generated.ts +8 -8
  10. package/src/internal-urls/docs-index.generated.ts +3 -2
  11. package/src/internal-urls/xcsh-protocol.ts +45 -0
  12. package/src/main.ts +2 -0
  13. package/src/memories/index.ts +17 -5
  14. package/src/modes/components/model-selector.ts +4 -59
  15. package/src/modes/controllers/command-controller.ts +1 -0
  16. package/src/modes/controllers/input-controller.ts +9 -17
  17. package/src/modes/interactive-mode.ts +19 -0
  18. package/src/person-profile/HISTORICAL-AUDIT.md +163 -0
  19. package/src/person-profile/README.md +88 -0
  20. package/src/person-profile/account-collectors.ts +209 -0
  21. package/src/person-profile/builder.ts +69 -0
  22. package/src/person-profile/collectors.ts +367 -0
  23. package/src/person-profile/machine-collectors.ts +400 -0
  24. package/src/person-profile/machine-profile.ts +128 -0
  25. package/src/person-profile/private-store.ts +134 -0
  26. package/src/person-profile/properties.ts +116 -0
  27. package/src/person-profile/salesforce-discovery.ts +162 -0
  28. package/src/person-profile/schema.ts +251 -0
  29. package/src/person-profile/service.ts +435 -0
  30. package/src/prompts/system/person-awareness.md +23 -0
  31. package/src/prompts/system/remote-voice-identity.md +15 -0
  32. package/src/prompts/system/remote-voice-live.md +31 -0
  33. package/src/prompts/system/remote-voice.md +2 -0
  34. package/src/prompts/system/system-prompt.md +4 -0
  35. package/src/prompts/system/title-system.md +8 -2
  36. package/src/prompts/tools/machine-profile.md +1 -0
  37. package/src/prompts/tools/person-profile.md +7 -0
  38. package/src/prompts/tools/xcsh-api.md +5 -0
  39. package/src/prompts/tools/xcsh-context.md +11 -0
  40. package/src/remote-control/ACCEPTANCE.md +100 -0
  41. package/src/remote-control/CONTEXT-WORKFLOW.md +154 -0
  42. package/src/remote-control/IMPLEMENTATION.md +180 -0
  43. package/src/remote-control/LIVE-GUIDANCE.md +116 -0
  44. package/src/remote-control/NOTICE.md +3 -1
  45. package/src/remote-control/PARITY.md +121 -0
  46. package/src/remote-control/bridge.ts +2 -0
  47. package/src/remote-control/context-evaluation.ts +43 -0
  48. package/src/remote-control/control.ts +453 -67
  49. package/src/remote-control/discovery.ts +4 -9
  50. package/src/remote-control/host.ts +199 -25
  51. package/src/remote-control/ipc.ts +2 -2
  52. package/src/remote-control/lifecycle-state.ts +327 -0
  53. package/src/remote-control/managed-sessions.ts +782 -0
  54. package/src/remote-control/managed-worker.ts +179 -0
  55. package/src/remote-control/metadata.ts +40 -4
  56. package/src/remote-control/persona-evaluation.ts +45 -0
  57. package/src/remote-control/relay-lifecycle.ts +136 -0
  58. package/src/remote-control/relay.ts +20 -2
  59. package/src/remote-control/router.ts +421 -21
  60. package/src/remote-control/session.ts +274 -30
  61. package/src/remote-control/startup-manager.ts +85 -0
  62. package/src/remote-control/supervisor.ts +197 -0
  63. package/src/remote-control/thread-identity.ts +22 -0
  64. package/src/remote-control/trace-assembler.ts +182 -0
  65. package/src/remote-control/trace-report.ts +147 -0
  66. package/src/remote-control/trace-runtime.ts +18 -6
  67. package/src/remote-control/trace.ts +1 -0
  68. package/src/remote-control/voice-first-replay.ts +116 -0
  69. package/src/remote-control/voice-persona.ts +147 -29
  70. package/src/remote-control/voice.ts +39 -17
  71. package/src/sdk.ts +53 -3
  72. package/src/services/xcsh-context.ts +46 -9
  73. package/src/session/agent-session.ts +20 -2
  74. package/src/session/agent-storage.ts +4 -1
  75. package/src/session/context-selection-intent.ts +28 -0
  76. package/src/session/session-manager.ts +29 -0
  77. package/src/slash-commands/builtin-registry.ts +51 -5
  78. package/src/system-prompt.ts +3 -0
  79. package/src/tools/index.ts +9 -0
  80. package/src/tools/machine-profile.ts +58 -0
  81. package/src/tools/person-profile.ts +143 -0
  82. package/src/tools/xcsh-api.ts +107 -14
  83. package/src/tools/xcsh-context.ts +94 -0
  84. package/src/utils/title-generator.ts +193 -75
package/README.md CHANGED
@@ -13,4 +13,11 @@ Package-specific references:
13
13
  - [MCP configuration guide](../../docs/mcp-config.md)
14
14
  - [MCP runtime lifecycle](../../docs/mcp-runtime-lifecycle.md)
15
15
  - [MCP server/tool authoring](../../docs/mcp-server-tool-authoring.md)
16
+ - [Remote-control implementation](./src/remote-control/IMPLEMENTATION.md)
17
+ - [Remote-control acceptance](./src/remote-control/ACCEPTANCE.md)
16
18
  - [CONTRIBUTING](../../CONTRIBUTING.md)
19
+
20
+ Remote control is managed explicitly with `xcsh remote-control enable`,
21
+ `restart`, `status`, and `disable`. Linux installations reconcile an owner-only
22
+ systemd user supervisor so enabled sessions recover after login, reboot, or host
23
+ failure; `disable` persists the stopped state.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/xcsh",
4
- "version": "21.28.1",
4
+ "version": "21.29.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",
@@ -42,6 +42,7 @@
42
42
  "test": "bun run generate-build-info && bun scripts/bun-test-guarded.ts --max-concurrency=2",
43
43
  "bench:routing-matrix": "bun scripts/bench-routing-matrix.ts",
44
44
  "bench:copy-selector": "bun scripts/bench-copy-selector.ts",
45
+ "bench:voice-persona": "bun scripts/voice-persona-parity.ts",
45
46
  "fix": "biome check --write --unsafe . && bun run format-prompts && bun run generate-docs-index && bun run generate-api-spec-index && bun run generate-build-info",
46
47
  "fmt": "biome format --write . && bun run format-prompts",
47
48
  "format-prompts": "bun scripts/format-prompts.ts",
@@ -62,13 +63,13 @@
62
63
  },
63
64
  "dependencies": {
64
65
  "@agentclientprotocol/sdk": "1.4.0",
65
- "@f5-sales-demo/pi-agent-core": "21.28.1",
66
- "@f5-sales-demo/pi-ai": "21.28.1",
67
- "@f5-sales-demo/pi-natives": "21.28.1",
68
- "@f5-sales-demo/pi-resource-management": "21.28.1",
69
- "@f5-sales-demo/pi-tui": "21.28.1",
70
- "@f5-sales-demo/pi-utils": "21.28.1",
71
- "@f5-sales-demo/xcsh-stats": "21.28.1",
66
+ "@f5-sales-demo/pi-agent-core": "21.29.1",
67
+ "@f5-sales-demo/pi-ai": "21.29.1",
68
+ "@f5-sales-demo/pi-natives": "21.29.1",
69
+ "@f5-sales-demo/pi-resource-management": "21.29.1",
70
+ "@f5-sales-demo/pi-tui": "21.29.1",
71
+ "@f5-sales-demo/pi-utils": "21.29.1",
72
+ "@f5-sales-demo/xcsh-stats": "21.29.1",
72
73
  "@mozilla/readability": "^0.6",
73
74
  "@sinclair/typebox": "0.34.52",
74
75
  "@xterm/headless": "^6.0",
@@ -324,8 +324,8 @@ export default class Manager extends Command {
324
324
  XCSH_WORKER_SPARE: "1",
325
325
  XCSH_SESSION_ID: undefined,
326
326
  XCSH_SESSION_TENANT: undefined,
327
- XCSH_API_URL: undefined,
328
- XCSH_API_TOKEN: undefined,
327
+ XCSH_API_URL: "",
328
+ XCSH_API_TOKEN: "",
329
329
  },
330
330
  ipc(message) {
331
331
  if (!rec || !isWorkerReadyMessage(message)) return;
@@ -495,9 +495,9 @@ export default class Manager extends Command {
495
495
  // Isolate the worker's tenant binding: an ambient XCSH_API_URL in the
496
496
  // manager's env would make sdk.ts skip the XCSH_SESSION_TENANT branch and
497
497
  // bind hello_ack.tenant from the env apiUrl instead. Clear both so the
498
- // spawned tenant key is authoritative (undefined removes the var in Bun).
499
- XCSH_API_URL: undefined,
500
- XCSH_API_TOKEN: undefined,
498
+ // spawned tenant key is authoritative. Empty values also suppress saved .env defaults.
499
+ XCSH_API_URL: "",
500
+ XCSH_API_TOKEN: "",
501
501
  // TTFT Phase 2: relay cold-start timing to the worker (only it has a WS to
502
502
  // the extension). Wall-clock spawn instant + manager_provision ms; COLD=1
503
503
  // marks the authoritative cold spawn.
@@ -1,9 +1,13 @@
1
1
  import { Args, Command, Flags } from "@f5-sales-demo/pi-utils/cli";
2
2
  import { runRemoteControl } from "../remote-control/control";
3
3
  export default class RemoteControl extends Command {
4
- static description = "Native remote interoperability preview: enable, disable, status, pair, clients, revoke";
4
+ static description =
5
+ "Native remote interoperability preview: enable, restart, disable, status, pair, clients, revoke";
5
6
  static args = {
6
- action: Args.string({ required: true, description: "enable | disable | status | pair | clients | revoke" }),
7
+ action: Args.string({
8
+ required: true,
9
+ description: "enable | restart | disable | status | pair | clients | revoke",
10
+ }),
7
11
  clientId: Args.string({ description: "Client identity to revoke (from clients output)" }),
8
12
  };
9
13
  static flags = {
@@ -15,11 +19,14 @@ export default class RemoteControl extends Command {
15
19
  async run(): Promise<void> {
16
20
  const { args, flags } = await this.parse(RemoteControl);
17
21
  if (!args.action) throw new Error("A remote action is required");
18
- if (args.clientId && args.action !== "revoke") throw new Error("A client identity applies only to revoke");
22
+ if (args.clientId && args.action !== "revoke" && args.action !== "worker")
23
+ throw new Error("A client identity applies only to revoke");
19
24
  if (args.action !== "clients" && (flags.cursor != null || flags.limit != null || flags.order != null))
20
25
  throw new Error("Pagination flags apply only to clients");
21
26
  const result = await runRemoteControl(args.action, {
22
- clientId: args.clientId,
27
+ clientId: args.action === "revoke" ? args.clientId : undefined,
28
+ workerSocket: args.action === "worker" ? args.clientId : undefined,
29
+ cwd: args.action === "enable" ? process.cwd() : undefined,
23
30
  cursor: flags.cursor,
24
31
  limit: flags.limit,
25
32
  order: flags.order as "asc" | "desc" | undefined,
@@ -0,0 +1,56 @@
1
+ import type { Model } from "@f5-sales-demo/pi-ai";
2
+
3
+ function compareVersions(left: string, right: string): number {
4
+ const leftParts = left.split(".").map(Number);
5
+ const rightParts = right.split(".").map(Number);
6
+ for (let index = 0; index < Math.max(leftParts.length, rightParts.length); index += 1) {
7
+ const difference = (leftParts[index] ?? 0) - (rightParts[index] ?? 0);
8
+ if (difference !== 0) return difference;
9
+ }
10
+ return 0;
11
+ }
12
+
13
+ /** Keep historical catalogs available while presenting only current user-facing families. */
14
+ const DEFAULT_OPENAI_CODEX_MODEL_IDS = new Set(["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol", "gpt-6-astra"]);
15
+
16
+ /** Shared catalog boundary for the TUI and attached human interfaces. */
17
+ export function filterCurrentBrowserModels(models: readonly Model[]): Model[] {
18
+ const newestGeminiVersion = new Map<string, string>();
19
+ const newestClaudeVersion = new Map<string, string>();
20
+ for (const model of models) {
21
+ if (model.provider.startsWith("google-")) {
22
+ const gemini = model.id.match(/^gemini-(\d+(?:\.\d+)?)-(flash|pro)(?:-|$)/i);
23
+ if (gemini?.[1] && gemini[2]) {
24
+ const key = `${model.provider}:${gemini[2].toLowerCase()}`;
25
+ const previous = newestGeminiVersion.get(key);
26
+ if (!previous || compareVersions(gemini[1], previous) > 0) newestGeminiVersion.set(key, gemini[1]);
27
+ }
28
+ }
29
+ const claude = model.id.match(/^claude-(opus|sonnet|haiku)-(\d+)(?:[.-](\d+))?(?:-|$)/i);
30
+ if (claude?.[1] && claude[2]) {
31
+ const key = `${model.provider}:${claude[1].toLowerCase()}`;
32
+ const version = `${claude[2]}.${claude[3] ?? "0"}`;
33
+ const previous = newestClaudeVersion.get(key);
34
+ if (!previous || compareVersions(version, previous) > 0) newestClaudeVersion.set(key, version);
35
+ }
36
+ }
37
+
38
+ return models.filter(model => {
39
+ const gpt = model.id.match(/^gpt-(\d+(?:\.\d+)?)(?:-|$)/i);
40
+ if (gpt?.[1]) {
41
+ if (compareVersions(gpt[1], "5.6") < 0) return false;
42
+ if (model.provider === "openai-codex") return DEFAULT_OPENAI_CODEX_MODEL_IDS.has(model.id.toLowerCase());
43
+ }
44
+ const claude = model.id.match(/^claude-(opus|sonnet|haiku)-(\d+)(?:[.-](\d+))?(?:-|$)/i);
45
+ if (claude?.[1] && claude[2]) {
46
+ const version = `${claude[2]}.${claude[3] ?? "0"}`;
47
+ return newestClaudeVersion.get(`${model.provider}:${claude[1].toLowerCase()}`) === version;
48
+ }
49
+ if (!model.provider.startsWith("google-")) return true;
50
+ if (!model.id.startsWith("gemini-"))
51
+ return model.provider === "google-antigravity" && /^gpt-oss-/i.test(model.id);
52
+ const match = model.id.match(/^gemini-(\d+(?:\.\d+)?)-(flash|pro)(?:-|$)/i);
53
+ if (!match?.[1] || !match[2]) return false;
54
+ return newestGeminiVersion.get(`${model.provider}:${match[2].toLowerCase()}`) === match[1];
55
+ });
56
+ }
@@ -15,6 +15,7 @@ import { loadCapability } from "../../discovery";
15
15
  import { getExtensionNameFromPath, getPreloadedPluginRoots } from "../../discovery/helpers";
16
16
  import type { ExecOptions } from "../../exec/exec";
17
17
  import { execCommand } from "../../exec/exec";
18
+ import { type ProfileCollector, personProfileService } from "../../person-profile/service";
18
19
  import type { CustomMessage } from "../../session/messages";
19
20
  import { EventBus } from "../../utils/event-bus";
20
21
  import { getAllPluginExtensionPaths } from "../plugins/loader";
@@ -248,6 +249,35 @@ class ConcreteExtensionAPI implements ExtensionAPI, IExtensionRuntime {
248
249
  return this.runtime.setSessionName(name);
249
250
  }
250
251
 
252
+ registerProfileCollector(collector: ProfileCollector): void {
253
+ if (!collector || typeof collector.collect !== "function") throw new Error("Invalid person profile collector");
254
+ personProfileService.registerProfileCollector(
255
+ {
256
+ ...collector,
257
+ async collect(signal) {
258
+ const result = await collector.collect(signal);
259
+ if ("facts" in result) return result;
260
+ // Legacy flat output does not distinguish queried values from heuristic inference.
261
+ // Keep it as candidates; modern collectors can return explicit facts/observations.
262
+ return {
263
+ facts: {},
264
+ observations: Object.entries(result).map(([field, value]) => ({
265
+ field: field as keyof typeof result,
266
+ value,
267
+ source: collector.id,
268
+ kind: "inferred" as const,
269
+ observedAt: new Date().toISOString(),
270
+ })),
271
+ };
272
+ },
273
+ },
274
+ this.extension.resolvedPath,
275
+ );
276
+ }
277
+ unregisterProfileCollector(id: string): boolean {
278
+ return personProfileService.unregisterProfileCollector(id, this.extension.resolvedPath);
279
+ }
280
+
251
281
  registerProvider(name: string, config: import("./types").ProviderConfig): void {
252
282
  this.runtime.pendingProviderRegistrations.push({ name, config, sourceId: this.extension.path });
253
283
  }
@@ -1222,6 +1222,8 @@ export interface ExtensionAPI {
1222
1222
  * });
1223
1223
  */
1224
1224
  registerProvider(name: string, config: ProviderConfig): void;
1225
+ registerProfileCollector(collector: import("../../person-profile/service").ProfileCollector): void;
1226
+ unregisterProfileCollector(id: string): boolean;
1225
1227
 
1226
1228
  /** Shared event bus for extension communication. */
1227
1229
  events: EventBus;
package/src/index.ts CHANGED
@@ -38,6 +38,9 @@ export * from "./modes";
38
38
  export * from "./modes/components";
39
39
  // Theme utilities for custom tools
40
40
  export * from "./modes/theme/theme";
41
+ export type { PersonProfile, UserProfile, UserProfileObservation } from "./person-profile/schema";
42
+ export type { ProfileCollection, ProfileCollector } from "./person-profile/service";
43
+ export { loadProfile, PersonProfileService } from "./person-profile/service";
41
44
  export * from "./routing/classifier";
42
45
  export * from "./routing/coordinator";
43
46
  export * from "./routing/delegation";
@@ -17,17 +17,17 @@ export interface BuildInfo {
17
17
  }
18
18
 
19
19
  export const BUILD_INFO: BuildInfo = {
20
- "version": "21.28.1",
21
- "commit": "41c3dccba0e3969a761af369096d91f50cdf0143",
22
- "shortCommit": "41c3dcc",
20
+ "version": "21.29.1",
21
+ "commit": "de194b2a5cd9240c0e732637e02fc7e705c12b55",
22
+ "shortCommit": "de194b2",
23
23
  "branch": "main",
24
- "tag": "v21.28.1",
25
- "commitDate": "2026-09-13T17:35:05+00:00",
26
- "buildDate": "2026-09-13T18:16:37.787Z",
24
+ "tag": "v21.29.1",
25
+ "commitDate": "2026-09-16T14:32:51+00:00",
26
+ "buildDate": "2026-09-16T15:48:20.165Z",
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/41c3dccba0e3969a761af369096d91f50cdf0143",
32
- "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.28.1"
31
+ "commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/de194b2a5cd9240c0e732637e02fc7e705c12b55",
32
+ "releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.29.1"
33
33
  };
@@ -1,15 +1,16 @@
1
1
  // Auto-generated by scripts/generate-docs-index.ts - DO NOT EDIT
2
2
 
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/herdr-gap-closing-plan.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/tui-style-guide.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"];
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/herdr-gap-closing-plan.mdx","en/architecture-contribution/index.mdx","en/architecture-contribution/native-development.mdx","en/architecture-contribution/native-runtime.mdx","en/architecture-contribution/parallelism-qualification.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/tui-style-guide.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
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
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
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
9
  "en/architecture-contribution/herdr-gap-closing-plan.mdx": "---\ntitle: \"Herdr native signaling gap-closing plan\"\ndescription: \"Plan native xcsh semantic-turn signaling through Herdr to durable Control Manager acceptance without treating process exit as success.\"\nsidebar:\n order: 3\n label: \"Herdr signaling plan\"\n---\n\n**Status: PLAN COMPLETE; xcsh FEATURE INCOMPLETE.** This is an implementation and acceptance plan, not evidence that the feature is implemented, installed, or accepted. Every required work package and closure gate remains open until its stated evidence is attached. Deferring a required item leaves the feature incomplete.\n\n## Current delivery checklist\n\n- [x] Plan reviewed and xcsh issue [#3768](https://github.com/f5-sales-demo/xcsh/issues/3768) created.\n- [x] xcsh protocol 19–20 negotiation, capability gate, persisted turn UUID, semantic producer, and focused unit tests implemented in the review worktree.\n- [x] Herdr tracked execution and semantic-journal source implemented with focused integration coverage and a passing local `just check`.\n- [ ] xcsh and Herdr changes committed, reviewed, CI-green, and merged under each repository's governance.\n- [ ] Reproducible release artifacts identify source SHA, hash, protocol, and capabilities.\n- [ ] Released artifacts installed through the supported update path with rollback recorded.\n- [ ] Control Manager native xcsh consumer and required-child aggregation implemented by its separate owner.\n- [ ] Real Manager-to-Herdr-to-xcsh success/failure/wait/cancel/reconnect/cleanup/restart UAT passes through durable result acknowledgment.\n- [ ] Overall feature accepted. This box cannot be checked by completing this worker or by deferring any required box above.\n\n## What is proven now?\n\n| Area | Evidence | Current conclusion |\n| --- | --- | --- |\n| xcsh producer | The review worktree contains uncommitted reporter changes and 52 previously passing focused tests. | Unit-only partial work. Its 80-character result preview is display metadata, not a durable semantic result. It is not installed or end-to-end tested. |\n| Protocol compatibility | `packages/coding-agent/src/herdr/client.ts` pins protocol 19 and requires exact equality. Installed `/usr/local/bin/herdr` reports `herdr 0.9.4`; `herdr api schema` reports protocol 20. | Current installed reporting is incompatible and can fail silently because reporter errors are nonfatal. Release blocker. |\n| Herdr execution tracking | Installed Herdr exposes native `execution start/get/list/wait/cancel`. Current source persists bounded output, revisions, process states, duplicate admission, and restart loss. | Authoritative process evidence, but process exit is not successful semantic turn completion. |\n| xcsh identity | Sessions persist and support `--continue`, `--resume`, and `--fork`; `TurnPhaseEvent.turnId` is a process-local counter. | Session continuation exists, but turn identity is not stable across restart/reconnect. |\n| Herdr xcsh resume | Current Herdr source accepts `(herdr:xcsh, xcsh)` path/ID references and plans `xcsh --resume=<value>`. | The prior source allow-list gap is closed. Installed-build provenance and live resume/fork remain unproven. |\n| Control Manager | Current source has a durable journal/outbox/direct acknowledgment, generations, and response correlation for existing worker types. | Durable primitives exist, but `WORK_KINDS` lacks xcsh, as do a native xcsh consumer and feature-level required-gate aggregation. |\n| Live acceptance | No workload, install, restart, or activation was performed for this planning task. | End-to-end parity is unproven and the feature remains incomplete. |\n\nThe installed Herdr binary inspected during planning had SHA-256 `c14df84087d3cd28e30c80d652c7fe42b73039497b771d454c9b1b69d36ceda`. A hash identifies that artifact but does not prove its source revision; closure requires reproducible build provenance.\n\n## Which invariants define parity?\n\nThree planes remain separate:\n\n1. **Herdr tracked execution** owns process admission, pane visibility, output drainage, exit/signal, cancellation request, and restart loss. It never translates exit zero, TUI idle, output silence, pane cleanup, or shutdown into semantic success.\n2. **xcsh semantic turns** own start, progress, waiting for input/approval, successful completion with bounded result, failure, cancellation, interruption, and continuation/fork identity.\n3. **Control Manager acceptance** owns durable task state, required-child aggregation, replay, supersession, delivery acknowledgment, and correlation of a visible response with the accepted result.\n\nCanonical identity is `(producer, session_id, turn_id, generation)`. The native persisted xcsh session supplies `session_id`. xcsh creates and persists `turn_id` before the first event and retains it across reconnect. `generation` distinguishes deliberate continuation/retry that supersedes older work. Pane/execution IDs are provenance, not semantic identity.\nManager task association must be validated against server-owned pane/execution context; a free-form client task ID is not trusted alone.\n\nEvents have a monotonic sequence/revision, state, timestamp, and optional bounded safe payload. Exact replay with the same identity, revision, and digest is idempotent; changed content at the same revision conflicts; older revisions cannot regress state. Terminal state is immutable, while a new generation may explicitly supersede it.\nRestart replays persisted events; unrecoverable active work becomes `interrupted`/`lost`, never `completed`.\n\n## What do statuses mean?\n\n| State | UI and Manager meaning | Required evidence |\n| --- | --- | --- |\n| `starting` | Turn identity is durable; work has not begun. | Created once before model/tool work. |\n| `working` | Turn is actively progressing. | May emit rate-limited progress or enter a wait. |\n| `waiting_input` | Human input/approval is required; neither failure nor completion. | Bounded safe reason; resumes to working or terminates by cancel/failure. |\n| `completed` | Native semantic settlement succeeded with a bounded result. | Emitted only after agent-end settlement, never inferred from idle/exit. |\n| `failed` | Semantic turn ended unsuccessfully. | Bounded safe reason; partial output cannot appear as success. |\n| `cancelled` | Requested cancellation reached terminal semantic state. | A cancellation request alone is not terminal evidence. |\n| `interrupted` / `lost` | Outcome cannot be proven. | Never success; requires continuation/retry or operator resolution. |\n| execution `exited` | Host process stopped; output drained or marked incomplete. | Process-only evidence, displayed separately from turn/task outcome. |\n\nUI surfaces show process state, semantic turn state, and feature acceptance independently. Display metadata may mirror safe status but is never an authoritative completion input.\n\n## Which ordered work packages close the gaps?\n\n1. **WP0 — Governed baselines and issue records (each project).** Preserve this worktree, base future implementation on current authoritative branches, and create issue-ready owner records from this plan. Record revisions, artifact identity, schemas, and acceptance criteria. Gate: clean isolated worktrees and approved issue links.\n2. **WP1 — Capability/protocol negotiation (xcsh, Herdr review).** Replace exact protocol 19 with an explicit supported range/set and capability discovery. Support 20 only after schema review; reject unknown versions visibly. Gate semantic calls on capability, not guesses. Dependency: WP0. Tests: supported 19/20 fixtures, old/future/malformed responses, visible failure.\n3. **WP2 — Durable turn identity (xcsh).** Persist a stable turn ID before work; retain it across reconnect/resume; allocate a new turn for a new prompt and distinct lineage for fork; define generations. Dependency: WP0. Tests: persistence, resume, fork, pre-event crash, collision.\n4. **WP3 — Durable semantic-turn contract (Herdr).** Add a supported report/query/wait API and journal for native agent turns. Persist identity, revision, state, bounded result/reason, digest, timestamps, and server-resolved provenance. Enforce idempotency, conflicts, monotonicity, terminal immutability, redaction, retention, replay, and restart loss. Dependencies: WP1/WP2 contract.\n Gate: Herdr tests and published schema/capability.\n5. **WP4 — Complete producer (xcsh).** Wire native lifecycle settlement—not rendering, idle, or shutdown—to WP3. Emit every semantic state with persisted identity. Keep short metadata as presentation only. Surface permanent delivery failure and use bounded ordered retry for transient failure. Dependencies: WP1–WP3. Gate: lifecycle/contract tests including forbidden false-success paths.\n6. **WP5 — Continuation/reconciliation (xcsh and Herdr).** Prove resume by path/ID, fork lineage, continuation after pane/process loss, output-drain ordering, and terminal reconciliation. Bind turns to admitted execution without making exit semantic. Dependencies: WP2–WP4. Gate: cross-process tests and installed provenance for the resume allow-list.\n7. **WP6 — Native xcsh worker and aggregate gates (Control Manager).** Add `xcsh` work kind through native Herdr execution; consume semantic revisions; persist accepted revision/digest; preserve all states; route cancel; continue the same session. Reuse durable journal/outbox/inbox and response correlation. Add required child/checklist gates so missing or deferred requirements keep parents incomplete.\n Do not require a wrapper/control-report workaround. Dependencies: WP3–WP5.\n Gate: mapping, replay, supersession, conflict, acknowledgment, and aggregation tests.\n8. **WP7 — Reproducible staged integration (all owners).** Pin source SHAs, produce versioned artifacts/checksums/schemas, then test in an isolated non-default Herdr environment and disposable Manager database. Dependencies: WP1–WP6. Gate: full matrix below with scrubbed retained evidence.\n9. **WP8 — Controlled activation/live acceptance (operations).** In an authorized maintenance window, verify no active work, install versioned artifacts, verify SHA/version/protocol/capabilities, restart only intended services, and run bounded live UAT. Roll back recorded binaries/config/data snapshot on health, replay, or mapping failure. Dependency: WP7.\n Gate: deployed identity plus live acknowledgment. No activation occurred here.\n\n## What end-to-end tests are required?\n\nEvery scenario traverses **Control Manager request → Herdr tracked execution → xcsh semantic events → Herdr durable turn journal → Manager journal/outbox/direct acknowledgment → correlated Manager response**, asserting semantic and process state separately.\n\n| Scenario | Required assertion |\n| --- | --- |\n| Simple success | Stable identity reaches `completed`; bounded result/digest survive pane cleanup and are acknowledged once. Exit remains separate. |\n| Failure | Native failure reaches `failed`; output or exit zero cannot convert it to success. |\n| Input/approval wait | Wait stays nonterminal through idle, resumes on the same turn, then completes/fails; parent remains incomplete while waiting. |\n| Cancellation | Request, signal, and terminal semantic cancellation are distinct; no completion appears. |\n| Continuation | Same session, new turn/generation; prior result remains queryable and is not redelivered. |\n| Reconnect | Disconnect before acknowledgment causes replay; exact duplicate is idempotent and correlated response arrives once. |\n| Pane cleanup | Cleanup preserves execution, semantic result, Manager journal, and pending acknowledgment. |\n| Component restart | Restart each component at defined cut points; terminal data replays and unrecoverable active work becomes interrupted/lost. Record retention/tombstone limits. |\n| Duplicate/conflict/order | Exact duplicate succeeds idempotently; changed digest at same revision conflicts; stale events cannot regress state; newer generation supersedes without erasing audit. |\n| Resume/fork | Resume path/ID retains session identity; fork has distinct lineage and cannot collide. |\n| Protocol mismatch | Supported capabilities work; unsupported/missing capability fails visibly before tracking is claimed. |\n| Aggregate completion | Only all-required evidence permits acceptance; failed, waiting, missing, or deferred required items keep it incomplete. Optional items do not block/reopen core. |\n\nUnit tests use deterministic clocks, persistence reopen, injected disconnects, and schema fixtures. Integration uses real local binaries with temporary state. Staged UAT uses an isolated Herdr environment before default. Live evidence records artifact hashes, capabilities, execution/session/turn IDs, revisions/digests, acknowledgments, and aggregate status without secrets/full transcripts.\n\n## How is completion gated?\n\n- **Plan deliverable done:** this reviewable plan. This is the only completed stage now.\n- **Implementation ready:** all required owner changes merged at recorded SHAs; no required item open/deferred.\n- **Tested:** unit, integration, durability, and negative tests pass against those SHAs.\n- **Installed:** deployed paths, hashes, schema, and capabilities match tested artifacts.\n- **Live verified:** full live matrix passes through durable acknowledgment, with rollback available.\n- **Overall feature accepted:** every required preceding gate has evidence. Any missing/deferred required item forces `INCOMPLETE`; a worker turn, plan, process, PR, or optimistic checklist cannot override it.\n\nManager computes parent status from required child/gate records, rejects `accepted` when evidence is absent, and reports exact blockers in UI/API. A completed planning worker turn means only that this plan was delivered.\n\nExternal phone rendering/audio-playback receipts are a separate optional enhancement explicitly deferred by the requester. They do not block or reopen accepted core Manager delivery, and cannot substitute for xcsh end-to-end evidence.\n\n## What decisions and risks need review?\n\n- **Recommended:** first-class durable Herdr semantic-turn journal; metadata cannot carry results, ordering, or restart guarantees.\n- **Recommended:** explicit capabilities and supported protocol set/range; accepting every newer version risks schema misinterpretation.\n- **Recommended:** server-bind task identity through execution/pane provenance and correlate Manager generation; do not trust free-form producer identity.\n- **Recommended:** immutable terminal events and new generations for continuation/retry.\n- **Risk:** current Herdr source is a dirty development worktree and installed binary lacks source provenance. Do not promote inspection to deployed evidence.\n- **Risk:** nonfatal reporter errors preserve xcsh use but hide tracking loss. Show degraded tracking and fail Manager acceptance closed.\n- **Risk:** retention/restart timing creates evidence gaps. Persist truncation/completeness/loss markers and block acceptance when evidence is missing.\n- **Risk:** cancellation races completion. Serialize final revision acceptance; audit later conflicts without changing the accepted result.\n",
10
- "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/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- [File-test parallelism qualification](./parallelism-qualification/)\n",
11
11
  "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",
12
12
  "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\n`PowerAssertion.start(options?)` returns an idempotently stoppable session handle. Its\n`PowerAssertionOptions` fields are `reason`, `idle`, `display`, `system`, and `user`; an omitted set\nof mode flags defaults to idle-sleep prevention. The implementation uses IOKit on macOS, login1\nand best-effort ScreenSaver inhibition on Linux, and a dedicated execution-state thread on Windows.\n\nRead `packages/natives` for the TypeScript wrappers and loader, and `crates/pi-natives/src` for the Rust implementations.\n",
13
+ "en/architecture-contribution/parallelism-qualification.mdx": "---\ntitle: \"File-test parallelism qualification\"\ndescription: \"Expand bounded Bun file-test parallelism without leaving workflow and harness contracts out of sync.\"\nsidebar:\n order: 11\n---\n\n## Purpose\n\nUse this guide when qualifying a new bounded Bun file-worker count on the D16\ncandidate runner. A worker count is a contract that crosses the workflow, the\nprofile harness, the TypeScript test launcher, and their tests. Update every\ncontract in one change before dispatching a sample.\n\nUse `<WORKER_COUNT>` below for the proposed count, such as `10`. Keep the\nexperiment name and count paired: `d16-parallel-<WORKER_COUNT>` must always\nmap to `<WORKER_COUNT>`.\n\n## Required changes\n\n| Boundary | File | Required change |\n| --- | --- | --- |\n| Dispatch input | `.github/workflows/compute-benchmark.yml` | Add `d16-parallel-<WORKER_COUNT>` to `workflow_dispatch.inputs.experiment.options`. |\n| Candidate route | `.github/workflows/compute-benchmark.yml` | Add the experiment to the D16 candidate route allowlist. This keeps the D16 image and runner label selected. |\n| Worker mapping | `.github/workflows/compute-benchmark.yml` | Add `d16-parallel-<WORKER_COUNT>) file_workers=<WORKER_COUNT> ;;`. |\n| Setup profile | `scripts/prepare-runner-optimization-toolchain.sh` | Add the experiment to the accepted experiment allowlist. |\n| Workload profile | `scripts/runner-optimization-profile.sh` | Update the usage text, accepted experiment list, accepted worker-count list, exact experiment-to-worker pairing, and serial-only guard. |\n| TypeScript launcher | `scripts/run-ts-tests.ts` | Add the count to `FileWorkers`, the accepted raw values, and the error message. This is the code that converts the count to `--parallel=<WORKER_COUNT>`. |\n| Direct launcher test | `packages/coding-agent/test/scripts/run-ts-tests.test.ts` | Cover the new accepted count and retain rejection coverage for unsupported values. |\n| Workflow contracts | `tests/test_ci_capacity_contract.py` and `packages/coding-agent/test/scripts/arc-runner-workflow-contract.test.ts` | Update exact route assertions so workflow and harness drift fail locally. |\n\nThe performance-qualification evaluator is parameterized by the candidate\nvariant. It does not need a new hardcoded worker count; invoke it with the new\ncandidate variant when evaluating collected artifacts.\n\n### Source and harness must agree\n\nThe qualification workflow checks out the workload source at its frozen source\nrevision and checks out the qualification harness separately at the workflow\nrevision. Some package test scripts import `scripts/run-ts-tests.ts` from the\nfrozen source rather than from the harness. Therefore, a harness-only worker\ncount change is insufficient: a package can reject the count even though the\nharness accepts it.\n\nBefore screening a new count, create a deliberately refrozen source revision\nthat includes the TypeScript launcher and direct-test changes above. Record the\nnew source revision, keep it fixed for every sample in that screen, and collect\na new serial baseline from that same source. Do not compare that screen to a\nbaseline produced from the preceding frozen source revision.\n\n## Bounded implementation pattern\n\nThe following relationships must all be true for a candidate named\n`d16-parallel-<WORKER_COUNT>`:\n\n```text\nworkflow choice\n -> D16 candidate route\n -> file_workers=<WORKER_COUNT>\n -> profile allowlist and exact pair\n -> FileWorkers accepts <WORKER_COUNT>\n -> bun ... --max-concurrency=2 --parallel=<WORKER_COUNT>\n```\n\nDo not add a broad numeric range or an unbounded mode. Each count is explicitly\nqualified so a future change cannot silently alter CI scheduling.\n\n## Preflight before dispatch\n\nRun these checks after all files above are updated and before a candidate\nworkload is dispatched:\n\n```bash\nactionlint .github/workflows/compute-benchmark.yml\nbash -n scripts/runner-optimization-profile.sh scripts/prepare-runner-optimization-toolchain.sh\npython3 -m unittest tests.test_ci_capacity_contract\nbun test packages/coding-agent/test/scripts/run-ts-tests.test.ts\nbun test packages/coding-agent/test/scripts/arc-runner-workflow-contract.test.ts\n```\n\nIf the worktree does not have Bun workspace dependencies, install them with\n`bun install --frozen-lockfile` before treating a TypeScript test startup error\nas a source failure. Do not substitute npm, Yarn, or pnpm.\n\nBefore dispatching, confirm that the candidate ARC pool has zero current and\npending runners. Dispatch one matched sample at a time and record the run ID at\ndispatch.\n\n## Settings that remain fixed during a screen\n\nChanging any of these changes the experiment rather than merely increasing\nfile-test parallelism:\n\n- Keep the frozen source revision and immutable runner image unchanged.\n- Keep the D16 candidate runner class, ARC pool, `min=0`, and `max=1`.\n- Keep `--max-concurrency=2`.\n- Never add Bun `--concurrent`.\n- Keep one candidate workload active at a time.\n- Keep serial production CI at `XCSH_TEST_FILE_WORKERS: \"0\"` until the\n qualification gates pass.\n\n## Failure signatures and the missing contract\n\n| Failure point | Likely missing update |\n| --- | --- |\n| `Validate bounded experiment` exits with code 2 | The workflow experiment is absent from the D16 candidate route allowlist. |\n| `Profile legacy setup or baked verification` prints its usage line | The setup-profile experiment allowlist is missing the candidate. |\n| `Profile workload phases` rejects the worker value | The workload-profile accepted count or exact experiment-to-worker pair is missing. |\n| `run-ts-tests.ts` says the worker count is unsupported | `FileWorkers` and its parsed string allowlist were not updated. |\n| Exact-string workflow contract test fails | Update its expected D16 candidate route only after the workflow route is intentionally changed. |\n\nResolve the missing contract, run the focused preflight again, and then rerun\nonly the failed sample. Do not infer a benchmark result from setup-only runs.\n\n## Promotion boundary\n\nQualification changes only make a candidate runnable. They do not change normal\nCI. Promote a count only after matched artifact evidence demonstrates expected\noutput, no failures, no OOMs or evictions, memory below the defined threshold,\nnon-regressing p95, and the required median TypeScript improvement.\n\nThe production change is intentionally separate:\n\n1. Change `.github/workflows/ci.yml` from `XCSH_TEST_FILE_WORKERS: \"0\"` to\n the chosen qualified value.\n2. Update the serial-default assertion in `tests/test_ci_capacity_contract.py`.\n3. Run the focused contracts and an ordinary CI verification after merge.\n\nIf ordinary CI becomes unstable or regresses unacceptably, restore\n`XCSH_TEST_FILE_WORKERS: \"0\"`.\n",
13
14
  "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",
14
15
  "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",
15
16
  "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",
@@ -25,6 +25,13 @@
25
25
  */
26
26
  import * as path from "node:path";
27
27
  import { logger } from "@f5-sales-demo/pi-utils";
28
+ import {
29
+ MachineProfileSchema,
30
+ type MachineProfileService,
31
+ machineProfileService,
32
+ } from "../person-profile/machine-profile";
33
+ import { PersonProfileSchema } from "../person-profile/schema";
34
+ import { type PersonProfileService, personProfileService } from "../person-profile/service";
28
35
  import type { ContainmentStatus } from "../sandbox/containment";
29
36
  import type { ContextStatus } from "../services/xcsh-context";
30
37
  import type { ActiveModelSnapshot } from "../session/active-model";
@@ -302,6 +309,8 @@ function loadConsoleFieldMetadata(): ConsoleFieldMetadataData {
302
309
  }
303
310
 
304
311
  export interface InternalDocsProtocolOptions {
312
+ personProfileService?: PersonProfileService;
313
+ machineProfileService?: MachineProfileService;
305
314
  readonly resolveBuildInfo?: () => Promise<RuntimeBuildInfo>;
306
315
  readonly getContextStatus?: () => ContextStatus | null;
307
316
  /**
@@ -343,7 +352,11 @@ export class InternalDocsProtocolHandler implements ProtocolHandler {
343
352
  readonly #registryDeps: Partial<RegistryResolverDeps> | undefined;
344
353
  readonly #getPluginRoots: GetPluginRoots | undefined;
345
354
 
355
+ readonly #personProfileService: PersonProfileService;
356
+ readonly #machineProfileService: MachineProfileService;
346
357
  constructor(options: InternalDocsProtocolOptions = {}) {
358
+ this.#personProfileService = options.personProfileService ?? personProfileService;
359
+ this.#machineProfileService = options.machineProfileService ?? machineProfileService;
347
360
  this.#resolveBuildInfo = options.resolveBuildInfo ?? getRuntimeBuildInfo;
348
361
  this.#getContextStatus = options.getContextStatus;
349
362
  this.#getActiveModel = options.getActiveModel;
@@ -433,6 +446,36 @@ export class InternalDocsProtocolHandler implements ProtocolHandler {
433
446
 
434
447
  async resolve(url: InternalUrl): Promise<InternalResource> {
435
448
  const host = url.rawHost || url.hostname;
449
+ if (host === "computer") {
450
+ const pathname = url.rawPathname ?? url.pathname;
451
+ if (new URL(url.href).search || !["", "/", "/schema"].includes(pathname))
452
+ throw new Error("Unsupported machine profile route; use machine_profile refresh");
453
+ const content = JSON.stringify(
454
+ pathname === "/schema" ? MachineProfileSchema : await this.#machineProfileService.get(),
455
+ );
456
+ return {
457
+ url: url.href,
458
+ content,
459
+ contentType: "application/json",
460
+ size: Buffer.byteLength(content),
461
+ sourcePath: "xcsh://computer",
462
+ };
463
+ }
464
+ if (host === "user") {
465
+ const pathname = url.rawPathname ?? url.pathname;
466
+ if (new URL(url.href).search || !["", "/", "/schema"].includes(pathname))
467
+ throw new Error("Unsupported person profile route; use person_profile refresh explicitly");
468
+ const content = JSON.stringify(
469
+ pathname === "/schema" ? PersonProfileSchema : await this.#personProfileService.get(),
470
+ );
471
+ return {
472
+ url: url.href,
473
+ content,
474
+ contentType: "application/json",
475
+ size: Buffer.byteLength(content),
476
+ sourcePath: "xcsh://user",
477
+ };
478
+ }
436
479
 
437
480
  if (host === API_SPEC_HOST) {
438
481
  return this.#getApiSpecResolver().resolve(url);
@@ -523,6 +566,8 @@ export class InternalDocsProtocolHandler implements ProtocolHandler {
523
566
  const terraformEntry = `- [${TERRAFORM_HOST}/](${SCHEME_PREFIX}${TERRAFORM_HOST}/) — F5 XC Terraform provider (${Object.keys(tf.resources).length} resources, v${tf.version})`;
524
567
  const registryEntry = `- [${REGISTRY_HOST}/provider/<namespace>/<type>](${SCHEME_PREFIX}${REGISTRY_HOST}/provider/hashicorp/random) — live Terraform provider and module Registry metadata`;
525
568
  const entries = [
569
+ "- [user](xcsh://user) — local person profile; [schema](xcsh://user/schema)",
570
+ "- [computer](xcsh://computer) — interaction machine profile; [schema](xcsh://computer/schema)",
526
571
  syntheticEntry,
527
572
  changesEntry,
528
573
  sourceEntry,
package/src/main.ts CHANGED
@@ -1025,6 +1025,8 @@ export async function runRootCommand(rawArgs: string[]): Promise<void> {
1025
1025
 
1026
1026
  // YAGNI: skip MCP server discovery (500-3000ms) — not used in our workflow.
1027
1027
  sessionOptions.enableMCP = false;
1028
+ // Trusted process configuration can disable automatic discovery (for isolated CLI tests or embedding).
1029
+ sessionOptions.profileDiscovery = process.env.XCSH_PROFILE_DISCOVERY !== "0";
1028
1030
 
1029
1031
  const { session, setToolUIContext, modelFallbackMessage, lspServers, mcpManager, eventBus } = await logger.time(
1030
1032
  "createAgentSession",
@@ -149,10 +149,25 @@ export function startMemoryStartupTask(options: {
149
149
  export async function buildMemoryToolDeveloperInstructions(
150
150
  agentDir: string,
151
151
  settings: Settings,
152
+ projectCwd = settings.getCwd(),
153
+ ): Promise<string | undefined> {
154
+ const summary = await readMemorySummary(agentDir, settings, projectCwd);
155
+ if (!summary) return undefined;
156
+
157
+ return prompt.render(readPathTemplate, {
158
+ memory_summary: summary,
159
+ });
160
+ }
161
+
162
+ /** Read the same bounded project-memory summary used by the terminal prompt. */
163
+ export async function readMemorySummary(
164
+ agentDir: string,
165
+ settings: Settings,
166
+ projectCwd = settings.getCwd(),
152
167
  ): Promise<string | undefined> {
153
168
  const cfg = loadMemoryConfig(settings);
154
169
  if (!cfg.enabled) return undefined;
155
- const memoryRoot = getMemoryRoot(agentDir, settings.getCwd());
170
+ const memoryRoot = getMemoryRoot(agentDir, projectCwd);
156
171
  const summaryPath = path.join(memoryRoot, "memory_summary.md");
157
172
 
158
173
  let text: string;
@@ -166,10 +181,7 @@ export async function buildMemoryToolDeveloperInstructions(
166
181
  if (!summary) return undefined;
167
182
  const truncated = truncateByApproxTokens(summary, cfg.summaryInjectionTokenLimit);
168
183
  if (!truncated.trim()) return undefined;
169
-
170
- return prompt.render(readPathTemplate, {
171
- memory_summary: truncated,
172
- });
184
+ return truncated;
173
185
  }
174
186
 
175
187
  /**
@@ -11,6 +11,7 @@ import {
11
11
  truncateToWidth,
12
12
  wrapTextWithAnsi,
13
13
  } from "@f5-sales-demo/pi-tui";
14
+ import { filterCurrentBrowserModels } from "../../config/model-catalog";
14
15
  import type {
15
16
  ModelRegistry,
16
17
  ProviderAccessState,
@@ -18,6 +19,9 @@ import type {
18
19
  ProviderDiscoveryStatus,
19
20
  ProviderPickerMetadata,
20
21
  } from "../../config/model-registry";
22
+
23
+ export { filterCurrentBrowserModels } from "../../config/model-catalog";
24
+
21
25
  import { getKnownRoleIds, getRoleInfo, MODEL_ROLE_IDS } from "../../config/model-registry";
22
26
  import { resolveModelRoleValue } from "../../config/model-resolver";
23
27
  import type { Settings } from "../../config/settings";
@@ -170,65 +174,6 @@ function sortModelsByHierarchy(items: ModelItem[], includeProvider: boolean): vo
170
174
  );
171
175
  }
172
176
 
173
- function compareVersions(left: string, right: string): number {
174
- const leftParts = left.split(".").map(Number);
175
- const rightParts = right.split(".").map(Number);
176
- for (let index = 0; index < Math.max(leftParts.length, rightParts.length); index += 1) {
177
- const difference = (leftParts[index] ?? 0) - (rightParts[index] ?? 0);
178
- if (difference !== 0) return difference;
179
- }
180
- return 0;
181
- }
182
-
183
- /** Keep historical catalogs authoritative while presenting only current user-facing families. */
184
- const DEFAULT_OPENAI_CODEX_MODEL_IDS = new Set(["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol", "gpt-6-astra"]);
185
-
186
- export function filterCurrentBrowserModels(models: readonly Model[]): Model[] {
187
- const newestGeminiVersion = new Map<string, string>();
188
- const newestClaudeVersion = new Map<string, string>();
189
- for (const model of models) {
190
- if (model.provider.startsWith("google-")) {
191
- const gemini = model.id.match(/^gemini-(\d+(?:\.\d+)?)-(flash|pro)(?:-|$)/i);
192
- if (gemini?.[1] && gemini[2]) {
193
- const key = `${model.provider}:${gemini[2].toLowerCase()}`;
194
- const previous = newestGeminiVersion.get(key);
195
- if (!previous || compareVersions(gemini[1], previous) > 0) newestGeminiVersion.set(key, gemini[1]);
196
- }
197
- }
198
- const claude = model.id.match(/^claude-(opus|sonnet|haiku)-(\d+)(?:[.-](\d+))?(?:-|$)/i);
199
- if (claude?.[1] && claude[2]) {
200
- const key = `${model.provider}:${claude[1].toLowerCase()}`;
201
- const version = `${claude[2]}.${claude[3] ?? "0"}`;
202
- const previous = newestClaudeVersion.get(key);
203
- if (!previous || compareVersions(version, previous) > 0) newestClaudeVersion.set(key, version);
204
- }
205
- }
206
-
207
- return models.filter(model => {
208
- const gpt = model.id.match(/^gpt-(\d+(?:\.\d+)?)(?:-|$)/i);
209
- if (gpt?.[1]) {
210
- // Older GPT generations are still available through explicit --models scopes,
211
- // but the general browser starts at the current 5.6 family.
212
- if (compareVersions(gpt[1], "5.6") < 0) return false;
213
- if (model.provider === "openai-codex") return DEFAULT_OPENAI_CODEX_MODEL_IDS.has(model.id.toLowerCase());
214
- }
215
- const claude = model.id.match(/^claude-(opus|sonnet|haiku)-(\d+)(?:[.-](\d+))?(?:-|$)/i);
216
- if (claude?.[1] && claude[2]) {
217
- const version = `${claude[2]}.${claude[3] ?? "0"}`;
218
- return newestClaudeVersion.get(`${model.provider}:${claude[1].toLowerCase()}`) === version;
219
- }
220
- if (!model.provider.startsWith("google-")) return true;
221
- if (!model.id.startsWith("gemini-")) {
222
- // Antigravity discovery can expose implementation-only experiment ids
223
- // alongside its supported Gemini, Claude, and GPT-OSS catalog.
224
- return model.provider === "google-antigravity" && /^gpt-oss-/i.test(model.id);
225
- }
226
- const match = model.id.match(/^gemini-(\d+(?:\.\d+)?)-(flash|pro)(?:-|$)/i);
227
- if (!match?.[1] || !match[2]) return false;
228
- return newestGeminiVersion.get(`${model.provider}:${match[2].toLowerCase()}`) === match[1];
229
- });
230
- }
231
-
232
177
  const LOCAL_PROVIDER_IDS = new Set(["ollama", "vllm", "lm-studio", "llama.cpp"]);
233
178
  const LOCAL_PROVIDERS_TAB = "local-providers";
234
179
 
@@ -1587,6 +1587,7 @@ export class CommandController {
1587
1587
  `Session files moved; project refresh failed: ${error instanceof Error ? error.message : String(error)}`,
1588
1588
  );
1589
1589
  }
1590
+ await this.ctx.session.refreshBaseSystemPrompt();
1590
1591
  if (target.getCwd() !== destination) throw new Error("Session directory changed during the move.");
1591
1592
  this.#pendingMoves.delete(identity);
1592
1593
  },