@f5-sales-demo/xcsh 21.13.0 → 21.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +8 -8
- package/src/config/auto-config.ts +2 -2
- package/src/config/model-registry.ts +3 -3
- package/src/config/resolve-config-value.ts +2 -1
- package/src/extensibility/extensions/bundled/herdr-reporter.ts +2 -2
- package/src/herdr/client.ts +3 -3
- package/src/internal-urls/build-info.generated.ts +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -36,6 +36,11 @@
|
|
|
36
36
|
|
|
37
37
|
### Fixed
|
|
38
38
|
|
|
39
|
+
- Resolved user-configured environment references by exact case across config values, model
|
|
40
|
+
registry credentials, and LiteLLM YAML while preserving literal, command-backed, and unresolved
|
|
41
|
+
all-caps behavior. Semantically ported from
|
|
42
|
+
[can1357/oh-my-pi#7362](https://github.com/can1357/oh-my-pi/pull/7362)
|
|
43
|
+
([#3711](https://github.com/f5-sales-demo/xcsh/issues/3711)).
|
|
39
44
|
- Hardened provider and compaction boundaries by obfuscating every provider-visible string,
|
|
40
45
|
preserving opaque reasoning, protecting side requests and adversarial summary tags, and restoring
|
|
41
46
|
unconfigured credential-shaped values byte-exact at trusted local tool boundaries. Semantically
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "21.13.
|
|
4
|
+
"version": "21.13.1",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
64
|
-
"@f5-sales-demo/pi-agent-core": "21.13.
|
|
65
|
-
"@f5-sales-demo/pi-ai": "21.13.
|
|
66
|
-
"@f5-sales-demo/pi-natives": "21.13.
|
|
67
|
-
"@f5-sales-demo/pi-resource-management": "21.13.
|
|
68
|
-
"@f5-sales-demo/pi-tui": "21.13.
|
|
69
|
-
"@f5-sales-demo/pi-utils": "21.13.
|
|
70
|
-
"@f5-sales-demo/xcsh-stats": "21.13.
|
|
64
|
+
"@f5-sales-demo/pi-agent-core": "21.13.1",
|
|
65
|
+
"@f5-sales-demo/pi-ai": "21.13.1",
|
|
66
|
+
"@f5-sales-demo/pi-natives": "21.13.1",
|
|
67
|
+
"@f5-sales-demo/pi-resource-management": "21.13.1",
|
|
68
|
+
"@f5-sales-demo/pi-tui": "21.13.1",
|
|
69
|
+
"@f5-sales-demo/pi-utils": "21.13.1",
|
|
70
|
+
"@f5-sales-demo/xcsh-stats": "21.13.1",
|
|
71
71
|
"@mozilla/readability": "^0.6",
|
|
72
72
|
"@sinclair/typebox": "^0.34",
|
|
73
73
|
"@xterm/headless": "^6.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import * as path from "node:path";
|
|
18
|
-
import { $env, isEnoent, logger, readProviderFromModelsYml } from "@f5-sales-demo/pi-utils";
|
|
18
|
+
import { $env, $envExact, isEnoent, logger, readProviderFromModelsYml } from "@f5-sales-demo/pi-utils";
|
|
19
19
|
import { hardenAgentConfigFileSync, writeAgentConfigFileSync } from "./agent-config-file";
|
|
20
20
|
import { DEFAULT_MODEL_ROLE } from "./settings-schema";
|
|
21
21
|
|
|
@@ -143,7 +143,7 @@ export function readLiteLLMConfig(modelsPath: string): LiteLLMConfig | undefined
|
|
|
143
143
|
if (!apiKey) {
|
|
144
144
|
resolvedApiKey = $env.LITELLM_API_KEY;
|
|
145
145
|
} else if (apiKey.kind === "envVar") {
|
|
146
|
-
resolvedApiKey =
|
|
146
|
+
resolvedApiKey = $envExact(apiKey.name) ?? $env.LITELLM_API_KEY;
|
|
147
147
|
} else if (apiKey.kind === "shellSecret") {
|
|
148
148
|
resolvedApiKey = $env.LITELLM_API_KEY;
|
|
149
149
|
} else {
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
unregisterCustomApis,
|
|
29
29
|
unregisterOAuthProviders,
|
|
30
30
|
} from "@f5-sales-demo/pi-ai";
|
|
31
|
-
import { $env, isRecord, logger } from "@f5-sales-demo/pi-utils";
|
|
31
|
+
import { $env, $envExact, isRecord, logger } from "@f5-sales-demo/pi-utils";
|
|
32
32
|
import { type Static, Type } from "@sinclair/typebox";
|
|
33
33
|
import { type ConfigError, ConfigFile } from "../config";
|
|
34
34
|
import { hasLiteLLMEnv, probeAndUpgradeLiteLLMConfig, startupHealthCheck } from "../config/auto-config";
|
|
@@ -475,7 +475,7 @@ type LlamaCppDiscoveredServerMetadata = {
|
|
|
475
475
|
* Checks environment variable first, then treats as literal.
|
|
476
476
|
*/
|
|
477
477
|
export function resolveApiKeyConfig(keyConfig: string): string | undefined {
|
|
478
|
-
const envValue =
|
|
478
|
+
const envValue = $envExact(keyConfig);
|
|
479
479
|
if (envValue) return envValue;
|
|
480
480
|
return keyConfig;
|
|
481
481
|
}
|
|
@@ -488,7 +488,7 @@ const ENV_VAR_NAME_RE = /^[A-Z][A-Z0-9]*(?:_[A-Z][A-Z0-9]*)+$/;
|
|
|
488
488
|
* names to prevent sending literal names like "LITELLM_API_KEY" as Bearer tokens.
|
|
489
489
|
*/
|
|
490
490
|
export function resolveYamlApiKeyConfig(keyConfig: string): string | undefined {
|
|
491
|
-
const envValue =
|
|
491
|
+
const envValue = $envExact(keyConfig);
|
|
492
492
|
if (envValue) return envValue;
|
|
493
493
|
if (ENV_VAR_NAME_RE.test(keyConfig)) return undefined;
|
|
494
494
|
return keyConfig;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { executeShell } from "@f5-sales-demo/pi-natives";
|
|
8
|
+
import { $envExact } from "@f5-sales-demo/pi-utils";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Matches strings that look like environment variable names: ALL_CAPS_WITH_UNDERSCORES.
|
|
@@ -33,7 +34,7 @@ export async function resolveConfigValue(config: string): Promise<string | undef
|
|
|
33
34
|
if (config.startsWith("!")) {
|
|
34
35
|
return await executeCommand(config);
|
|
35
36
|
}
|
|
36
|
-
const envValue =
|
|
37
|
+
const envValue = $envExact(config);
|
|
37
38
|
if (envValue) return envValue;
|
|
38
39
|
// Reject unresolved env var names to prevent sending literal names as API keys.
|
|
39
40
|
// Actual literal API keys (sk-ant-..., UUIDs, etc.) won't match this pattern.
|
|
@@ -10,7 +10,7 @@ import { HerdrClient } from "../../../herdr/client";
|
|
|
10
10
|
* blocked indicator.
|
|
11
11
|
*
|
|
12
12
|
* Transport: herdr injects `HERDR_SOCKET_PATH` into every pane, so state is
|
|
13
|
-
* reported over herdr's protocol-
|
|
13
|
+
* reported over herdr's protocol-19 JSONL socket via the shared `HerdrClient`
|
|
14
14
|
* (see `../../../herdr/client`) — the same client `herdr-terminal` uses. Each
|
|
15
15
|
* request reconnects independently, validates the `ping` protocol version
|
|
16
16
|
* before the first real request, and awaits herdr's typed response before
|
|
@@ -91,7 +91,7 @@ function getHerdrClient(socketPath: string): HerdrClient {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Send one JSON-RPC request to herdr over its protocol-
|
|
94
|
+
* Send one JSON-RPC request to herdr over its protocol-19 socket and await the
|
|
95
95
|
* typed response. Every failure path (transport error, timeout, protocol
|
|
96
96
|
* mismatch) is reported via `onError` without throwing, so a dead or
|
|
97
97
|
* incompatible herdr never disturbs the agent.
|
package/src/herdr/client.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { connect } from "node:net";
|
|
3
3
|
|
|
4
|
-
export const HERDR_PROTOCOL_VERSION =
|
|
4
|
+
export const HERDR_PROTOCOL_VERSION = 19;
|
|
5
5
|
const DEFAULT_TIMEOUT_MS = 5_000;
|
|
6
6
|
const MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
7
7
|
|
|
@@ -19,7 +19,7 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
19
19
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/** Typed, one-request-per-connection client for Herdr's protocol-
|
|
22
|
+
/** Typed, one-request-per-connection client for Herdr's protocol-19 JSONL socket. */
|
|
23
23
|
export class HerdrClient {
|
|
24
24
|
private protocolChecked = false;
|
|
25
25
|
|
|
@@ -103,7 +103,7 @@ export class HerdrClient {
|
|
|
103
103
|
});
|
|
104
104
|
socket.once("end", () => {
|
|
105
105
|
if (settled) return;
|
|
106
|
-
// Protocol
|
|
106
|
+
// Protocol 19 permits the final response to be terminated by EOF. The
|
|
107
107
|
// server normally emits JSONL, but older/current transports may omit the
|
|
108
108
|
// trailing newline when they close a one-shot connection.
|
|
109
109
|
try {
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "21.13.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "21.13.1",
|
|
21
|
+
"commit": "453dbf35d835d58bb787748bbcaad10da15ea4d3",
|
|
22
|
+
"shortCommit": "453dbf3",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v21.13.
|
|
25
|
-
"commitDate": "2026-09-
|
|
26
|
-
"buildDate": "2026-09-
|
|
24
|
+
"tag": "v21.13.1",
|
|
25
|
+
"commitDate": "2026-09-06T12:50:33+00:00",
|
|
26
|
+
"buildDate": "2026-09-06T13:43:28.028Z",
|
|
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.13.
|
|
31
|
+
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/453dbf35d835d58bb787748bbcaad10da15ea4d3",
|
|
32
|
+
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v21.13.1"
|
|
33
33
|
};
|