@f5-sales-demo/xcsh 21.37.7 → 21.37.8
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/CHANGELOG.md +3 -0
- package/package.json +8 -8
- package/src/extensibility/extensions/bundled/herdr-reporter.ts +13 -4
- package/src/extensibility/extensions/bundled/native-lifecycle-control.ts +1 -1
- package/src/herdr/client.ts +1 -1
- package/src/herdr/semantic-report.ts +28 -0
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/docs-index.generated.ts +1 -1
- package/src/lifecycle/native-acceptance-driver.ts +12 -14
- package/src/lifecycle/native-acceptance.ts +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
|
|
51
51
|
### Fixed
|
|
52
52
|
|
|
53
|
+
- Added Herdr protocol 26 native-interaction compatibility and bounded idempotent retry for
|
|
54
|
+
ambiguously acknowledged semantic reports without exposing interaction content
|
|
55
|
+
([#4161](https://github.com/f5-sales-demo/xcsh/issues/4161)).
|
|
53
56
|
- Routed MCP and Gemini web-search OAuth refreshes through the shared durable refresh coordinator,
|
|
54
57
|
including proactive refresh and forced retry after authentication failures
|
|
55
58
|
([#3796](https://github.com/f5-sales-demo/xcsh/issues/3796)).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "21.37.
|
|
4
|
+
"version": "21.37.8",
|
|
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",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
67
|
-
"@f5-sales-demo/pi-agent-core": "21.37.
|
|
68
|
-
"@f5-sales-demo/pi-ai": "21.37.
|
|
69
|
-
"@f5-sales-demo/pi-natives": "21.37.
|
|
70
|
-
"@f5-sales-demo/pi-resource-management": "21.37.
|
|
71
|
-
"@f5-sales-demo/pi-tui": "21.37.
|
|
72
|
-
"@f5-sales-demo/pi-utils": "21.37.
|
|
73
|
-
"@f5-sales-demo/xcsh-stats": "21.37.
|
|
67
|
+
"@f5-sales-demo/pi-agent-core": "21.37.8",
|
|
68
|
+
"@f5-sales-demo/pi-ai": "21.37.8",
|
|
69
|
+
"@f5-sales-demo/pi-natives": "21.37.8",
|
|
70
|
+
"@f5-sales-demo/pi-resource-management": "21.37.8",
|
|
71
|
+
"@f5-sales-demo/pi-tui": "21.37.8",
|
|
72
|
+
"@f5-sales-demo/pi-utils": "21.37.8",
|
|
73
|
+
"@f5-sales-demo/xcsh-stats": "21.37.8",
|
|
74
74
|
"@mozilla/readability": "^0.6",
|
|
75
75
|
"@sinclair/typebox": "0.34.52",
|
|
76
76
|
"@tobilu/qmd": "2.8.3",
|
|
@@ -3,6 +3,7 @@ import * as path from "node:path";
|
|
|
3
3
|
import type { AssistantMessage } from "@f5-sales-demo/pi-ai";
|
|
4
4
|
import type { ExtensionAPI, ExtensionContext, UserPromptKind } from "@f5-sales-demo/xcsh";
|
|
5
5
|
import { HerdrClient } from "../../../herdr/client";
|
|
6
|
+
import { HERDR_SEMANTIC_REPORT_TIMEOUT_MS, requestSemanticReport } from "../../../herdr/semantic-report";
|
|
6
7
|
import { finalAnswerText } from "../../../session/final-answer";
|
|
7
8
|
import { requestNativeLifecycleCancellation } from "./native-lifecycle-control";
|
|
8
9
|
|
|
@@ -173,7 +174,7 @@ function nativeCapability(): string | undefined {
|
|
|
173
174
|
|
|
174
175
|
/** Protocol 23 adds a workspace receipt without changing native action semantics. */
|
|
175
176
|
function supportsNativeLifecycle(protocol: number | undefined): boolean {
|
|
176
|
-
return protocol !== undefined && protocol >= 22 && protocol <=
|
|
177
|
+
return protocol !== undefined && protocol >= 22 && protocol <= 26;
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
function persistedTurns(ctx: ExtensionContext): PersistedTurn[] {
|
|
@@ -281,6 +282,7 @@ function decodeNativeActions(result: Record<string, unknown>): NativeActionRecor
|
|
|
281
282
|
// Reused across calls for the life of the extension so `ensureProtocol()`'s
|
|
282
283
|
// `ping` validation happens at most once per socket path, not once per frame.
|
|
283
284
|
let cachedClient: HerdrClient | undefined;
|
|
285
|
+
let cachedSemanticClient: HerdrClient | undefined;
|
|
284
286
|
|
|
285
287
|
function getHerdrClient(socketPath: string): HerdrClient {
|
|
286
288
|
if (!cachedClient || cachedClient.socketPath !== socketPath) {
|
|
@@ -289,6 +291,13 @@ function getHerdrClient(socketPath: string): HerdrClient {
|
|
|
289
291
|
return cachedClient;
|
|
290
292
|
}
|
|
291
293
|
|
|
294
|
+
function getSemanticHerdrClient(socketPath: string): HerdrClient {
|
|
295
|
+
if (!cachedSemanticClient || cachedSemanticClient.socketPath !== socketPath) {
|
|
296
|
+
cachedSemanticClient = new HerdrClient(socketPath, HERDR_SEMANTIC_REPORT_TIMEOUT_MS);
|
|
297
|
+
}
|
|
298
|
+
return cachedSemanticClient;
|
|
299
|
+
}
|
|
300
|
+
|
|
292
301
|
/**
|
|
293
302
|
* Send one JSON-RPC request to Herdr over its negotiated socket and await the
|
|
294
303
|
* typed response. Every failure path (transport error, timeout, protocol
|
|
@@ -472,7 +481,7 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
472
481
|
};
|
|
473
482
|
let delivered = false;
|
|
474
483
|
await enqueue(async () => {
|
|
475
|
-
const client =
|
|
484
|
+
const client = getSemanticHerdrClient(socketPath);
|
|
476
485
|
try {
|
|
477
486
|
await client.ensureSemanticProtocol();
|
|
478
487
|
if (!client.supportsSemanticTracking()) {
|
|
@@ -486,7 +495,7 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
486
495
|
supportsNativeLifecycle(client.protocolVersion) && capability
|
|
487
496
|
? { ...baseFrame, native_capability: capability }
|
|
488
497
|
: baseFrame;
|
|
489
|
-
const response = await client
|
|
498
|
+
const response = await requestSemanticReport(client, TURN_REPORT_METHOD, frame);
|
|
490
499
|
if (supportsNativeLifecycle(client.protocolVersion) && response.type !== "agent_turn") {
|
|
491
500
|
throw new Error("Herdr did not confirm the native turn journal write");
|
|
492
501
|
}
|
|
@@ -685,7 +694,7 @@ export default function herdrReporter(pi: ExtensionAPI): void {
|
|
|
685
694
|
pi.appendEntry(TURN_ENTRY_TYPE, { ...activeSemanticTurn, eventRevision: 0 });
|
|
686
695
|
const registered = await reportSemanticTurn("starting");
|
|
687
696
|
const socketPath = process.env.HERDR_SOCKET_PATH;
|
|
688
|
-
const client = socketPath ?
|
|
697
|
+
const client = socketPath ? getSemanticHerdrClient(socketPath) : undefined;
|
|
689
698
|
nativeActionsEnabled =
|
|
690
699
|
registered && supportsNativeLifecycle(client?.protocolVersion) && nativeCapability() !== undefined;
|
|
691
700
|
if (nativeActionsEnabled) startActionPolling(ctx);
|
|
@@ -10,7 +10,7 @@ let activeManagedCancellation: ((reason: string) => void) | undefined;
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Abort an acceptance prompt at its real ExtensionUIController signal boundary.
|
|
13
|
-
* The protocol-
|
|
13
|
+
* The protocol-26 reporter also aborts the AgentSession through its current
|
|
14
14
|
* ExtensionContext; this hook only owns the interactive prompt that would
|
|
15
15
|
* otherwise remain open while the session cancellation unwinds.
|
|
16
16
|
*/
|
package/src/herdr/client.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { connect } from "node:net";
|
|
3
3
|
|
|
4
4
|
export const HERDR_PROTOCOL_MIN_VERSION = 19;
|
|
5
|
-
export const HERDR_PROTOCOL_MAX_VERSION =
|
|
5
|
+
export const HERDR_PROTOCOL_MAX_VERSION = 26;
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 5_000;
|
|
7
7
|
const MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
8
8
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HerdrProtocolError } from "./client";
|
|
2
|
+
|
|
3
|
+
export const HERDR_SEMANTIC_REPORT_TIMEOUT_MS = 5_000;
|
|
4
|
+
|
|
5
|
+
interface SemanticRequestClient {
|
|
6
|
+
request<T extends Record<string, unknown>>(method: string, params: Record<string, unknown>): Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function isAmbiguousSemanticFailure(error: unknown): boolean {
|
|
10
|
+
return (
|
|
11
|
+
error instanceof HerdrProtocolError &&
|
|
12
|
+
(error.code === "timeout" || error.code === "eof" || error.code === "transport_error")
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Retry one semantically idempotent journal write only when its admission is ambiguous. */
|
|
17
|
+
export async function requestSemanticReport(
|
|
18
|
+
client: SemanticRequestClient,
|
|
19
|
+
method: string,
|
|
20
|
+
params: Record<string, unknown>,
|
|
21
|
+
): Promise<Record<string, unknown>> {
|
|
22
|
+
try {
|
|
23
|
+
return await client.request<Record<string, unknown>>(method, params);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (!isAmbiguousSemanticFailure(error)) throw error;
|
|
26
|
+
return client.request<Record<string, unknown>>(method, params);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "21.37.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "21.37.8",
|
|
21
|
+
"commit": "6e3e66b17c8628f1a790b5bea1ca052ece678ba5",
|
|
22
|
+
"shortCommit": "6e3e66b",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v21.37.
|
|
25
|
-
"commitDate": "2026-09-22T03:
|
|
26
|
-
"buildDate": "2026-09-22T04:
|
|
24
|
+
"tag": "v21.37.8",
|
|
25
|
+
"commitDate": "2026-09-22T03:58:28+00:00",
|
|
26
|
+
"buildDate": "2026-09-22T04:55:31.788Z",
|
|
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.37.
|
|
31
|
+
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/6e3e66b17c8628f1a790b5bea1ca052ece678ba5",
|
|
32
|
+
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.37.8"
|
|
33
33
|
};
|
|
@@ -45,7 +45,7 @@ export const EMBEDDED_DOCS: Readonly<Record<string, string>> = {
|
|
|
45
45
|
"en/index.mdx": "---\ntitle: xcsh\ndescription: Install xcsh, authenticate a model provider, and begin a reviewable terminal or F5 Distributed Cloud workflow.\ntemplate: splash\neditUrl: false\nsidebar:\n hidden: true\n order: 0\nhead:\n - tag: style\n content: |\n main:has(.landing-hero) > .content-panel:first-of-type { padding-block-end: .5rem; }\n main:has(.landing-hero) > .content-panel:first-of-type + .content-panel { border-top: 0; padding-block-start: 0; }\n .landing-hero { display: grid; gap: clamp(2rem, 4vw, 4rem); grid-template-columns: minmax(0, 1fr) minmax(18rem, 35rem); align-items: center; margin-block: .75rem 2rem; }\n .landing-hero__content, .landing-hero__image, .landing-installer, .landing-installer .expressive-code, .landing-command { min-width: 0; }\n h1#_top { max-width: 13ch; margin-block-end: 0; text-wrap: balance; }\n .landing-hero__lede { max-width: 42rem; color: var(--sl-color-gray-2); font-size: var(--sl-text-lg); }\n .landing-installer { margin-block: 0 4rem; padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--sl-color-gray-5); border-radius: .75rem; background: var(--sl-color-bg-nav); }\n .landing-installer h2 { margin: 0; font-size: var(--sl-text-lg); }\n .landing-installer p { margin-block: .5rem 0; }\n .landing-installer pre { max-width: 100%; overflow-x: auto; }\n .landing-installer .expressive-code .ec-line .code { padding-inline-end: 3.5rem; white-space: pre; overflow-wrap: normal; }\n .landing-installer .expressive-code .copy button { opacity: 1; }\n .landing-hero__image { margin: 0; }\n .landing-hero__image img { display: block; width: 100%; height: auto; aspect-ratio: 1442 / 1268; object-fit: contain; filter: drop-shadow(0 1rem 2.5rem color-mix(in srgb, var(--sl-color-accent) 28%, transparent)); }\n .landing-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 1.5rem; }\n .landing-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n details.landing-disclosure { margin-block: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--sl-color-gray-5); border-radius: .5rem; background: var(--sl-color-bg-nav); }\n details.landing-disclosure summary { cursor: pointer; font-weight: 600; }\n :is(.landing-hero, .landing-installer, .landing-grid, .landing-disclosure) :is(a, button, summary):focus-visible { outline: 2px solid var(--sl-color-accent-high); outline-offset: 3px; }\n @media (max-width: 50rem) { .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-block: .5rem 2rem; } .landing-installer { margin-block-end: 3rem; padding: 1rem; } .landing-grid { grid-template-columns: minmax(0, 1fr); } }\n---\n\nimport { Aside, Card, LinkCard, TabItem, Tabs } from '@astrojs/starlight/components';\n\n<section class=\"landing-hero\" aria-labelledby=\"_top\">\n <div class=\"landing-hero__content\">\n <p class=\"landing-hero__lede\">An AI-native terminal assistant for engineering, automation, and reviewable F5 Distributed Cloud workflows.</p>\n <p>xcsh is an independent open-source project derived from pi/pi-mono, specialized for F5 Distributed Cloud workflows; it is not an F5 product.</p>\n </div>\n\n <figure class=\"landing-hero__image\">\n <img src=\"/xcsh/images/xcsh-ghostty-terminal.png\" width=\"1442\" height=\"1268\" alt=\"xcsh running in a Ghostty terminal with the model selector, prompt, and session status visible.\" />\n </figure>\n</section>\n\n<section class=\"landing-installer\" aria-labelledby=\"install-xcsh\">\n\n## Install xcsh\n\n <p>Universal installer for macOS and Linux.</p>\n\n ```bash\n curl -fsSL https://raw.githubusercontent.com/f5-sales-demo/xcsh/main/scripts/install.sh | sh\n ```\n\n <p>It installs the latest prebuilt release into <code>~/.local/bin</code>. Need a managed or platform-specific channel? Compare the <a href=\"#installation-options\">installation options</a>.</p>\n</section>\n\n## What xcsh helps you do\n\n<div class=\"landing-grid landing-capabilities\">\n <Card title=\"Agentic terminal work\" icon=\"terminal\">\n Run interactive or print-mode prompts, inspect files, use tools, and keep durable session history when the task needs it. [Learn the agent loop](/xcsh/en/use-xcsh/agent-loop/).\n </Card>\n <Card title=\"Reviewable F5 Distributed Cloud workflows\" icon=\"document\">\n Discover schemas, validate manifests, and inspect proposed differences before an authorized resource change. [Use resource workflows](/xcsh/en/f5-distributed-cloud/).\n </Card>\n <Card title=\"Extensible automation\" icon=\"puzzle\">\n Add headless workflows, custom tools, skills, plugins, or MCP servers when built-in commands are not enough. [Automate and extend](/xcsh/en/automate-extend/).\n </Card>\n</div>\nThese workflows start with a working executable; choose another channel only when the universal installer is not the right fit.\n\n## Installation options\n\nUse one channel for install and upgrades. Mixing package-manager and standalone installations can leave more than one `xcsh` on `PATH`; the universal installer above is not repeated here.\n\n<Tabs syncKey=\"install-platform\">\n<TabItem label=\"macOS\" icon=\"seti:apple\">\nInstall the signed and notarized macOS archive through the Homebrew cask. The cask preserves the released executable and native addon byte for byte and does not require `sudo`:\n\n```bash\nbrew install --cask f5-sales-demo/tap/xcsh\n```\n\n<details class=\"landing-disclosure\">\n<summary>Upgrade or remove</summary>\n\nUpgrade with `brew upgrade --cask xcsh`. Remove the cask with `brew uninstall --cask xcsh`. These commands preserve configuration, credentials, and sessions under `~/.xcsh`.\n</details>\n\n<Aside type=\"caution\" title=\"Clean break from the historical package cask\">\nBefore installing this cask on a Mac that received an earlier xcsh package,\nuninstall both old Homebrew entries (`brew uninstall --formula xcsh` and\n`brew uninstall --cask xcsh`). Then have MDM forget the `com.f5.xcsh` receipt\nand remove only the package-owned `/usr/local/bin/xcsh` and\n`/Library/Application Support/xcsh` payload. Do not remove `~/.xcsh`. The signed\nand stapled `.pkg` release assets remain available only for direct MDM\ndeployment.\n</Aside>\n</TabItem>\n\n<TabItem label=\"Ubuntu or Debian\" icon=\"seti:ubuntu\">\nThe signed apt repository supports amd64 and arm64 and follows normal system upgrades:\n\n```bash\nsudo install -d -m 0755 /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 && sudo apt-get install xcsh\n```\n\n<details class=\"landing-disclosure\">\n<summary>Upgrade or remove</summary>\n\nUpgrade with `sudo apt-get update && sudo apt-get install --only-upgrade xcsh`. Remove the package with `sudo apt-get remove xcsh`.\n</details>\n</TabItem>\n\n<TabItem label=\"Windows\" icon=\"seti:windows\">\nRun the PowerShell installer, then restart the terminal so its user `PATH` refreshes:\n\n```powershell\nirm https://raw.githubusercontent.com/f5-sales-demo/xcsh/main/scripts/install.ps1 | iex\n```\n\nIt installs `xcsh.exe` and native add-ons to `%LOCALAPPDATA%\\\\xcsh`. **Bash is required for tool-backed sessions.** Install Git for Windows, WSL, Cygwin, or MSYS2; set `shellPath` in `%USERPROFILE%\\\\.xcsh\\\\agent\\\\settings.json` when Bash is elsewhere.\n\n<details class=\"landing-disclosure\">\n<summary>Upgrade or remove</summary>\n\nRe-run the installer to upgrade. To uninstall, remove `%LOCALAPPDATA%\\\\xcsh` and its entry from the user `PATH`.\n</details>\n</TabItem>\n\n<TabItem label=\"Container\" icon=\"seti:docker\">\nDocker and Podman use the same multi-architecture image. Pin a release tag, resolve its digest for deployment, and mount only the workspace and state required by the task:\n\n```bash\ndocker pull ghcr.io/f5-sales-demo/xcsh:vX.Y.Z\ndocker image inspect --format '{{index .RepoDigests 0}}' ghcr.io/f5-sales-demo/xcsh:vX.Y.Z\ndocker run --rm ghcr.io/f5-sales-demo/xcsh@sha256:<digest> --version\n```\n\nPodman accepts the same pull, inspect, and run arguments. Pass provider credentials at runtime through a secret manager or environment file; never bake them into an image layer.\n\n<details class=\"landing-disclosure\">\n<summary>Upgrade or remove</summary>\n\nPull a newer pinned tag to upgrade. Remove an unused image with `docker image rm IMAGE` or `podman image rm IMAGE`.\n</details>\n</TabItem>\n\n<TabItem label=\"Packages and source\" icon=\"seti:config\">\nUse a JavaScript package or a source/ref install when you need a toolchain or an unreleased ref. Source installs require Git and Bun 1.4.2 or newer:\n\n```bash\nbun install --global @f5-sales-demo/xcsh\nnpm install --global @f5-sales-demo/xcsh\ncurl -fsSL https://raw.githubusercontent.com/f5-sales-demo/xcsh/main/scripts/install.sh \\\n | sh -s -- --source --ref vX.Y.Z\n```\n\nThe explicit `--source` and `--ref` arguments select a reproducible source install.\n\n<details class=\"landing-disclosure\">\n<summary>Upgrade or remove</summary>\n\nUpgrade with `bun update --global @f5-sales-demo/xcsh` or `npm update --global @f5-sales-demo/xcsh`. Remove the package with `bun remove --global @f5-sales-demo/xcsh` or `npm uninstall --global @f5-sales-demo/xcsh`; re-run the source command at a new ref to replace that channel.\n</details>\n</TabItem>\n</Tabs>\n\nWhichever installation channel you choose, open xcsh next.\n\n<span id=\"verification\" aria-hidden=\"true\"></span>\n\n## Verify installation\n\n<span id=\"verify-the-active-installation\" aria-hidden=\"true\"></span>\n\nStart the interactive terminal UI:\n\n<div class=\"landing-command\">\n\n```bash\nxcsh\n```\n\n</div>\n\nWhen the xcsh prompt appears, connect a model provider from inside the TUI.\n\n<span id=\"authentication\" aria-hidden=\"true\"></span>\n\n## Authenticate a provider\n\nAt the xcsh prompt, open the provider picker:\n\n<div class=\"landing-command\">\n\n```text\n/login\n```\n\n</div>\n\nChoose a provider and follow its sign-in flow. You can also enter `/login PROVIDER` to open a known provider directly. Keep credentials in the provider-supported environment or subscription login—never in a prompt or committed settings file. See [model authentication](/xcsh/en/getting-started/model-authentication/) for provider-specific options.\n\nAfter sign-in selects a model, stay in the TUI and send a small first prompt.\n\n## Quickstart\n\nAt the xcsh prompt, enter:\n\n<div class=\"landing-command\">\n\n```text\nReply with only: xcsh is ready\n```\n\n</div>\n\nA matching response confirms the installation, provider, and selected model are working together\nwithout granting a tool any file or network side effect. If it fails, verify the active executable\nwith `command -v xcsh`, reopen `/login`, and confirm the selected model is available to that\naccount. Next, learn the [interactive TUI](/xcsh/en/use-xcsh/interactive-tui/) or choose a [context and\nnamespace](/xcsh/en/f5-distributed-cloud/contexts-namespaces/) before an authorized F5 Distributed Cloud\nchange.\n\nFrom here, continue with the documentation path that matches your goal.\n\n<span id=\"exploration\" aria-hidden=\"true\"></span>\n\n## Explore by goal\n\nChoose the goal closest to your next task; each path starts from the verified installation above.\n\n<div class=\"landing-grid landing-explore\">\n <LinkCard title=\"Use xcsh\" icon=\"terminal\" href=\"./use-xcsh/\">Daily terminal use, tools, sessions, plans, and agents.</LinkCard>\n <LinkCard title=\"F5 Distributed Cloud\" icon=\"cloud\" href=\"./f5-distributed-cloud/\">Contexts, manifests, validation, and reviewable resource changes.</LinkCard>\n <LinkCard title=\"Configure and secure\" icon=\"setting\" href=\"./configure-secure/\">Providers, settings, secrets, and sandbox boundaries.</LinkCard>\n <LinkCard title=\"Automate and extend\" icon=\"puzzle\" href=\"./automate-extend/\">Headless modes, extensions, MCP, skills, plugins, and SDKs.</LinkCard>\n <LinkCard title=\"Integrations and deployment\" icon=\"rocket\" href=\"./integrations-deployment/\">Containers plus VS Code, Chrome, Office, and Herdr.</LinkCard>\n <LinkCard title=\"Reference and troubleshooting\" icon=\"information\" href=\"./reference-troubleshooting/\">Diagnostics, command reference, hotkeys, and configuration schema.</LinkCard>\n</div>\n",
|
|
46
46
|
"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\n| Need | Use Chrome integration? | Boundary |\n| --- | --- | --- |\n| Inspect a visible page or perform a supported console-only task | Yes | The browser profile and signed-in session define authority. |\n| Manage a resource with an xcsh catalog command | No | Prefer the typed resource workflow and its diff. |\n| Automate an unsupported site or a third-party account | No | The integration does not expand authorization. |\n\nStart with a read-only inspection and confirm the selected tab, URL, tenant, and browser profile. A click or submitted form can create an external side effect; the transcript must identify that boundary. Close temporary tabs and verify the intended page state after the task.\n",
|
|
47
47
|
"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\"\nhead:\n - tag: style\n content: |\n .sl-markdown-content .expressive-code { max-width: 100%; overflow-x: auto; }\n .sl-markdown-content table { display: block; max-width: 100%; overflow-x: auto; }\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\nPull a versioned image, resolve its immutable digest, and run `xcsh --version` from that digest\nbefore mounting a workspace. The container image supplies the executable, not model or tenant\nauthority. Mount only required paths read-only where possible and inject credentials at runtime\nthrough the platform's secret mechanism. Remove the test container after exit; delete the pinned\nimage only when no deployment still references its digest.\n",
|
|
48
|
-
"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\"\nhead:\n - tag: style\n content: |\n .sl-markdown-content .expressive-code { max-width: 100%; overflow-x: auto; }\n .sl-markdown-content table { display: block; max-width: 100%; overflow-x: auto; }\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\n## What lifecycle state does xcsh publish?\n\nxcsh publishes native turn phases rather than inferring completion from terminal idleness or process\nexit. With Herdr protocol
|
|
48
|
+
"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\"\nhead:\n - tag: style\n content: |\n .sl-markdown-content .expressive-code { max-width: 100%; overflow-x: auto; }\n .sl-markdown-content table { display: block; max-width: 100%; overflow-x: auto; }\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\n## What lifecycle state does xcsh publish?\n\nxcsh publishes native turn phases rather than inferring completion from terminal idleness or process\nexit. With a supported Herdr protocol through 26 and the advertised `agent_turn_journal` capability, a tracked\nexecution publishes a persisted session/turn identity and a bounded semantic result to Herdr's\ndurable journal. The existing 80-character metadata preview remains display-only and is never\ncompletion evidence.\nCommentary, prompt content, tool data, and failed or cancelled partial output are excluded.\n\n### External execution driver contract\n\nThe supported producer is the normal `xcsh` executable launched by Herdr's execution backend; it is not a mock or a no-provider/offline actor. For a journal-tracked invocation, that backend must inject the exact allocated `HERDR_EXECUTION_ID` and decimal safe-integer `HERDR_EXECUTION_GENERATION` into the child environment before it starts `xcsh`.\n\nxcsh never guesses a generation: without both values it retains ordinary pane lifecycle reporting but emits no semantic journal event. A continuation must be launched with its newly allocated generation.\n\nProtocol 26 is the current producer-native contract. Herdr injects a one-time `HERDR_NATIVE_CAPABILITY` into the child. xcsh includes it only in authenticated turn-report and action requests; it is never written to the session journal, logs, diagnostics, or receipts.\nHerdr does not authorize actions until the first `starting` report has been durably journaled and bound to the owned PTY, pane, session, generation, and turn.\n\nEach semantic report has a five-second deadline. xcsh retries exactly once only when timeout,\nEOF, or a transport error leaves admission ambiguous. The retry preserves the method and complete\nsemantic payload and changes only the transport request ID. Either correlated receipt marks the\nevent delivered; protocol, validation, malformed-response, and explicit remote errors are definitive\nand are not retried. Degraded tracking is shown only after both ambiguous attempts fail.\n\nThe producer wire shapes align with [Herdr PR #49](https://github.com/f5-sales-demo/herdr/pull/49) at cancellation-settlement commit `2c838cf545ed06439b4988cedb3e044f1d436264`, starting-replay recovery commit `edd5611cfd7685c0f069f244ceee0ac6c0a0678e`, and native-argv alignment commit `3397302960593a552fb37ceb71053cf99f2619a3`.\nThose commits are an integration contract under independent review, not released-backend evidence.\n\nAfter that registration, xcsh polls `agent.turn.action.get` with the same immutable provenance. A `cancel` action dismisses an active managed UI prompt and calls the real `AgentSession` abort path. xcsh persists the requested action and local safe point before sending the exact `agent.turn.action.ack`; it emits `cancelled` only after Herdr confirms that safe point.\nA lost ACK response is retried with the same action ID and revision, including after reporter restart. A backend `timed_out` action never triggers a late abort. PTY exit alone is not semantic cancellation.\n\nSession shutdown releases pane authority. It does not convert an unfinished turn into a successful completion.\n\n### Producer-native acceptance driver\n\n`xcsh lifecycle --json` prints the version 3 machine-readable producer contract. To execute a source or installed\nproducer check, supply a fresh absolute session directory, a normally configured model, and one scenario:\n\n```bash\nxcsh lifecycle --json \\\n --scenario await-continue \\\n --model openai-codex/gpt-5.6-luna \\\n --session-dir /absolute/fresh/xcsh-lifecycle-session\n```\n\nSupported scenarios are `success`, `failure`, `await-continue`, `cancel`, `managed-cancel`, `managed-working-cancel`, and `reply-loss-replay`. The driver first\nuses the prompt-free JSON session contract to persist one canonical 16-character lowercase hexadecimal session\nheader, then reopens that exact path in an ordinary interactive xcsh child. It generates a random mode-0600 fixture\nfor successful reads. `await-continue` pauses in the real `ExtensionUiController` input surface before the configured\nmodel runs; `cancel` sends SIGINT through `PtySession.interrupt()` and requires xcsh's native `cancelled` transition.\n`managed-cancel` uses a local protocol-26 control fixture to request the action and requires the executable child to\nacknowledge its safe point before its native `cancelled` report. That fixture validates the producer adapter only; it\nis not evidence for Herdr's durable action journal, manager generation replacement, or consumer deduplication.\n`managed-working-cancel` requests the same cooperative action after the real child reports `working`, without opening\nthe acceptance prompt, and verifies cancellation through the active `AgentSession` path.\n\nThe reply-loss scenario owns a temporary local protocol-26 socket that acknowledges ordinary reporter traffic but\ndrops both bounded `agent.turn.report` attempts. xcsh creates and persists the semantic event before transport, runs the\nconfigured provider and `read` tool, then a second xcsh process resumes the exact session path. The scenario passes\nonly when the reporter redelivers the byte-equivalent execution, pane, session, turn, generation, event revision, and\nstate fields. The socket never authors a lifecycle frame or substitutes an offline model.\n\nThe receipt's `evidenceClass` is `source_native_child`. This proves the measured source or executable behavior only;\nthe Control Manager remains responsible for its own admission, authenticated execution binding, generation changes,\nconsumer receipts, and installed-artifact acceptance. The command does not install or release xcsh or Herdr and does\nnot change normal launch defaults.\n\nThe verified contract is:\n\n| Concern | xcsh signal | Herdr disposition |\n| --- | --- | --- |\n| Session start and identity | Persisted native session ID/path | Herdr resume reference plus stable semantic session identity. |\n| Turn start/progress | Persisted UUID and normalized `turn_phase` | `starting`/`working` journal events with producer revision and server revision. |\n| Waiting for input/approval | `awaiting_user` and closed prompt kind | `waiting_input` with fixed safe reason; private prompt content is excluded. |\n| Successful completion | Settlement-aware `idle` after `agent_end` | `completed` with at most 8,000 UTF-8 bytes and a matching SHA-256 digest. |\n| Failure/cancellation | `error` or `cancelled` | Distinct terminal state and bounded safe reason; no partial result. |\n| Managed cancellation | Persisted action receipt, Extension UI signal, and `AgentSession.abort()` | Authenticated `safe_point` precedes and is linked to the native `cancelled` report. |\n| Resume/fork | Session events and persisted custom turn entries | Resume preserves identity; unfinished recovered work becomes `interrupted`; fork has separate session lineage. |\n| Reconnect/order | Serialized queue and persisted event revision | Exact duplicates are idempotent; stale/conflicting revisions fail; terminal state is immutable. |\n| Application exit | `session_shutdown` | Active turn becomes `interrupted`, then pane authority is released; never success. |\n\nThe protocol-26 native-interaction update is tracked by\n[issue #4161](https://github.com/f5-sales-demo/xcsh/issues/4161); its producer lifecycle foundation is\ntracked by [issue #3791](https://github.com/f5-sales-demo/xcsh/issues/3791) and\n[issue #3768](https://github.com/f5-sales-demo/xcsh/issues/3768). The active protocol and lifecycle\nbehavior is described on this page; obsolete delivery checklists are not part of the runtime contract.\n\nHerdr lifecycle reconciliation is tracked by issue #5 in the F5 Herdr fork. Current source already recognizes the exact `(\"herdr:xcsh\", \"xcsh\")` resume pair; deployed build provenance and live resume/fork acceptance remain required before feature acceptance.\n\nTreat the negotiated protocol and the pane lifecycle as separate checks. First confirm that the\nHerdr socket and protocol version are compatible, then launch one conversation-owned workspace and\nobserve its published state through exit. xcsh owns only workspaces it created for that\nconversation; it must not close unrelated panes. After a forced socket failure, reconnect and verify\nthat stale workspace state is reconciled before another launch.\n",
|
|
49
49
|
"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: \"Integrations\"\n---\n\nChoose an integration by host, authority, and lifecycle boundary.\n\n## Which integration fits?\n\n- [Containers](/xcsh/en/integrations-deployment/containers/) for an isolated packaged runtime.\n- [VS Code](/xcsh/en/integrations-deployment/vscode/), [Chrome](/xcsh/en/integrations-deployment/chrome/), [Office](/xcsh/en/integrations-deployment/office/), or [Herdr](/xcsh/en/integrations-deployment/herdr/) only when that companion surface is installed and the task needs it.\n",
|
|
50
50
|
"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: \"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\n| Goal | Recommended surface | Why |\n| --- | --- | --- |\n| Edit or analyze a standalone document | The document workflow | It can render and verify the saved artifact. |\n| Control the open Office task pane | The Office integration | It operates in the signed-in host application. |\n| Run a repeatable batch job | Headless mode or SDK | It avoids UI-dependent focus and selection. |\n\nThe Office host, active document, selection, and signed-in account determine scope. Confirm all four before a write. Save to a test copy, reopen it, and inspect the changed region; closing a dialog is not proof that the document persisted.\n",
|
|
51
51
|
"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\n| Need | Use VS Code? | Alternative |\n| --- | --- | --- |\n| Work with editor selection and workspace context | Yes | The terminal cannot infer the active editor selection. |\n| Reproduce provider, tool, or session behavior | Usually no | Reproduce with the xcsh CLI first. |\n| Run unattended automation | No | Use a headless protocol or the SDK. |\n\nThe extension inherits the VS Code workspace trust and process environment but still uses xcsh provider and tool boundaries. Confirm the workspace root and selected file before applying an edit. Re-run the same prompt in the terminal when isolating whether a failure belongs to xcsh or the editor host.\n",
|
|
@@ -91,7 +91,7 @@ export function currentXcshCommand(args: string[], argv = process.argv, execPath
|
|
|
91
91
|
|
|
92
92
|
async function startReporterTransport(
|
|
93
93
|
directory: string,
|
|
94
|
-
options: {
|
|
94
|
+
options: { loseTurnReplyCount: number; managedCancel: boolean },
|
|
95
95
|
): Promise<ReporterTransport> {
|
|
96
96
|
const socketPath = path.join(directory, `.native-lifecycle-${randomUUID()}.sock`);
|
|
97
97
|
const attempts: TurnAttempt[] = [];
|
|
@@ -105,7 +105,7 @@ async function startReporterTransport(
|
|
|
105
105
|
reject: (error: Error) => void;
|
|
106
106
|
}>();
|
|
107
107
|
let handshakeComplete = false;
|
|
108
|
-
let
|
|
108
|
+
let lostReplyCount = 0;
|
|
109
109
|
let cancellationRequested = false;
|
|
110
110
|
let cancellationAcknowledged = false;
|
|
111
111
|
let registeredTurnId: string | undefined;
|
|
@@ -144,7 +144,7 @@ async function startReporterTransport(
|
|
|
144
144
|
if (request.method === "ping") {
|
|
145
145
|
handshakeComplete = true;
|
|
146
146
|
socket.end(
|
|
147
|
-
`${JSON.stringify({ id: request.id, result: { type: "pong", protocol:
|
|
147
|
+
`${JSON.stringify({ id: request.id, result: { type: "pong", protocol: 26, version: "native-lifecycle", capabilities: { agent_turn_journal: true } } })}\n`,
|
|
148
148
|
);
|
|
149
149
|
continue;
|
|
150
150
|
}
|
|
@@ -158,8 +158,8 @@ async function startReporterTransport(
|
|
|
158
158
|
if (request.params.state === "starting" && typeof request.params.turn_id === "string") {
|
|
159
159
|
registeredTurnId = request.params.turn_id;
|
|
160
160
|
}
|
|
161
|
-
const replyLost = options.
|
|
162
|
-
|
|
161
|
+
const replyLost = lostReplyCount < options.loseTurnReplyCount;
|
|
162
|
+
if (replyLost) lostReplyCount++;
|
|
163
163
|
const attempt = { ordinal: attempts.length + 1, params: request.params, replyLost };
|
|
164
164
|
attempts.push(attempt);
|
|
165
165
|
publish(attempt);
|
|
@@ -167,12 +167,10 @@ async function startReporterTransport(
|
|
|
167
167
|
socket.destroy();
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
170
|
+
socket.end(
|
|
171
|
+
`${JSON.stringify({ id: request.id, result: { type: "agent_turn", turn: {}, admitted: true } })}\n`,
|
|
172
|
+
);
|
|
173
|
+
continue;
|
|
176
174
|
}
|
|
177
175
|
if (options.managedCancel && request.method === "agent.turn.action.get" && isRecord(request.params)) {
|
|
178
176
|
actionAttempts.push({
|
|
@@ -369,7 +367,7 @@ export async function runNativeLifecycleAcceptance(
|
|
|
369
367
|
await fs.mkdir(options.sessionDir, { recursive: true, mode: 0o700 });
|
|
370
368
|
const fixture = await prepareFixture(options);
|
|
371
369
|
const transport = await startReporterTransport(options.sessionDir, {
|
|
372
|
-
|
|
370
|
+
loseTurnReplyCount: options.scenario === "reply-loss-replay" ? 2 : 0,
|
|
373
371
|
managedCancel: options.scenario === "managed-cancel" || options.scenario === "managed-working-cancel",
|
|
374
372
|
});
|
|
375
373
|
const executionId = `xcsh-native-${randomUUID()}`;
|
|
@@ -410,7 +408,7 @@ export async function runNativeLifecycleAcceptance(
|
|
|
410
408
|
const working = await withTimeout(transport.waitFor(stateIs("working")), timeoutMs, "working");
|
|
411
409
|
control.workingOrdinal = working.ordinal;
|
|
412
410
|
transport.requestCancel();
|
|
413
|
-
control.cancellation = "
|
|
411
|
+
control.cancellation = "protocol26_cooperative_working_action";
|
|
414
412
|
}
|
|
415
413
|
|
|
416
414
|
if (
|
|
@@ -430,7 +428,7 @@ export async function runNativeLifecycleAcceptance(
|
|
|
430
428
|
control.cancellation = "pty_process_group_sigint";
|
|
431
429
|
} else {
|
|
432
430
|
transport.requestCancel();
|
|
433
|
-
control.cancellation = "
|
|
431
|
+
control.cancellation = "protocol26_cooperative_action";
|
|
434
432
|
}
|
|
435
433
|
}
|
|
436
434
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { HERDR_PROTOCOL_MAX_VERSION } from "../herdr/client";
|
|
2
|
+
import { HERDR_SEMANTIC_REPORT_TIMEOUT_MS } from "../herdr/semantic-report";
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Stable argv contract for the producer-owned native lifecycle driver.
|
|
3
6
|
*
|
|
@@ -5,7 +8,7 @@
|
|
|
5
8
|
* reporter frames or supply an offline model: callers must provide a normally
|
|
6
9
|
* configured model and inspect the child's JSON stream and session file.
|
|
7
10
|
*/
|
|
8
|
-
export const NATIVE_LIFECYCLE_DRIVER_VERSION =
|
|
11
|
+
export const NATIVE_LIFECYCLE_DRIVER_VERSION = 3;
|
|
9
12
|
export const NATIVE_LIFECYCLE_SCENARIOS = [
|
|
10
13
|
"success",
|
|
11
14
|
"failure",
|
|
@@ -67,13 +70,15 @@ export function nativeLifecycleContract(): Record<string, unknown> {
|
|
|
67
70
|
resume: "--resume <exact-session-path>",
|
|
68
71
|
cancel: "PtySession.interrupt() sends SIGINT to the native child process group",
|
|
69
72
|
managed_cancel:
|
|
70
|
-
"protocol
|
|
73
|
+
"protocol 26 agent.turn.action.get/ack cooperatively aborts the active ExtensionUIController and AgentSession",
|
|
71
74
|
await_user: "--native-lifecycle-control await-user uses the interactive ExtensionUiController",
|
|
72
75
|
continuation: "write the continuation and Enter to the same native PTY",
|
|
73
76
|
replay: "restart --resume <exact-session-path> with the same authenticated binding",
|
|
74
77
|
},
|
|
75
78
|
reporter: {
|
|
76
|
-
protocol:
|
|
79
|
+
protocol: HERDR_PROTOCOL_MAX_VERSION,
|
|
80
|
+
semantic_report_timeout_ms: HERDR_SEMANTIC_REPORT_TIMEOUT_MS,
|
|
81
|
+
ambiguous_retry_limit: 1,
|
|
77
82
|
capability_env: "HERDR_NATIVE_CAPABILITY",
|
|
78
83
|
capability_persistence: "never",
|
|
79
84
|
actions: ["cancel:1:requested", "cancel:1:safe_point", "cancel:1:timed_out"],
|