@f5-sales-demo/xcsh 19.61.2 → 19.61.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/src/browser/ttft-spans.ts +11 -0
- package/src/commands/worker.ts +39 -1
- package/src/config/auto-config.ts +48 -26
- package/src/config/model-registry.ts +13 -0
- package/src/config/settings-schema.ts +9 -1
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/terraform-index.generated.ts +91 -92
- package/src/sdk.ts +27 -3
- package/src/session/agent-session.ts +30 -21
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "19.61.
|
|
4
|
+
"version": "19.61.4",
|
|
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",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@agentclientprotocol/sdk": "0.16.1",
|
|
58
58
|
"@mozilla/readability": "^0.6",
|
|
59
|
-
"@f5-sales-demo/xcsh-stats": "19.61.
|
|
60
|
-
"@f5-sales-demo/pi-agent-core": "19.61.
|
|
61
|
-
"@f5-sales-demo/pi-ai": "19.61.
|
|
62
|
-
"@f5-sales-demo/pi-natives": "19.61.
|
|
63
|
-
"@f5-sales-demo/pi-resource-management": "19.61.
|
|
64
|
-
"@f5-sales-demo/pi-tui": "19.61.
|
|
65
|
-
"@f5-sales-demo/pi-utils": "19.61.
|
|
59
|
+
"@f5-sales-demo/xcsh-stats": "19.61.4",
|
|
60
|
+
"@f5-sales-demo/pi-agent-core": "19.61.4",
|
|
61
|
+
"@f5-sales-demo/pi-ai": "19.61.4",
|
|
62
|
+
"@f5-sales-demo/pi-natives": "19.61.4",
|
|
63
|
+
"@f5-sales-demo/pi-resource-management": "19.61.4",
|
|
64
|
+
"@f5-sales-demo/pi-tui": "19.61.4",
|
|
65
|
+
"@f5-sales-demo/pi-utils": "19.61.4",
|
|
66
66
|
"@sinclair/typebox": "^0.34",
|
|
67
67
|
"@xterm/headless": "^6.0",
|
|
68
68
|
"ajv": "^8.20",
|
|
@@ -28,6 +28,17 @@ export function chatSpans(id: string, entryAt: number, promptAt: number, firstDe
|
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Build the session-build span: the heavy `createAgentSession` step (model
|
|
33
|
+
* registry load, discovery, extension/plugin loading, context bootstrap) that
|
|
34
|
+
* runs between `worker_boot` (ends at bridge-listen) and `chat_handler`. Without
|
|
35
|
+
* this stage the cost is silently absorbed into total ttft_ms, hiding plugin/
|
|
36
|
+
* discovery regressions from the bench and the diagnostics panel.
|
|
37
|
+
*/
|
|
38
|
+
export function sessionBuildSpan(sid: string, cold: boolean, ms: number): SpanFrame {
|
|
39
|
+
return { type: "span", stage: "session_build", ms: clamp(ms), sid, cold };
|
|
40
|
+
}
|
|
41
|
+
|
|
31
42
|
/** Build the per-session cold-start spans, tagged with the session id + authoritative cold. */
|
|
32
43
|
export function coldStartSpans(
|
|
33
44
|
sid: string,
|
package/src/commands/worker.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { ChatHandler } from "../browser/chat-handler";
|
|
|
19
19
|
import { startBridgeServer } from "../browser/extension-bridge";
|
|
20
20
|
import { createExtensionBridgeTools, EXTENSION_AGENT_TOOL_NAMES } from "../browser/extension-bridge-tools";
|
|
21
21
|
import { setSharedBridgeServer } from "../browser/provider";
|
|
22
|
-
import { coldStartSpans, type SpanFrame } from "../browser/ttft-spans";
|
|
22
|
+
import { coldStartSpans, type SpanFrame, sessionBuildSpan } from "../browser/ttft-spans";
|
|
23
23
|
import { initializeWithSettings } from "../discovery";
|
|
24
24
|
import { createAgentSession } from "../sdk";
|
|
25
25
|
import { activateTenantContext } from "../services/session-context-binding";
|
|
@@ -162,11 +162,22 @@ export default class Worker extends Command {
|
|
|
162
162
|
for (const s of coldStartBuffer) bridge.send(s);
|
|
163
163
|
coldStartSent = true;
|
|
164
164
|
};
|
|
165
|
+
// TTFT: the session_build span (createAgentSession seam) is computed after the
|
|
166
|
+
// bridge is listening but possibly before the extension connects — buffer it and
|
|
167
|
+
// flush on connect, same as the cold-start spans.
|
|
168
|
+
let sessionBuildFrame: SpanFrame | null = null;
|
|
169
|
+
let sessionBuildSent = false;
|
|
170
|
+
const flushSessionBuild = (): void => {
|
|
171
|
+
if (sessionBuildSent || !clientConnected || !sessionBuildFrame) return;
|
|
172
|
+
bridge.send(sessionBuildFrame);
|
|
173
|
+
sessionBuildSent = true;
|
|
174
|
+
};
|
|
165
175
|
// onConnected (raw WS open) is the deliberate flush trigger: no hello hook is exposed
|
|
166
176
|
// today, and the bridge's origin check already gates opens to the extension.
|
|
167
177
|
bridge.onConnected(() => {
|
|
168
178
|
clientConnected = true;
|
|
169
179
|
flushColdStart();
|
|
180
|
+
flushSessionBuild();
|
|
170
181
|
});
|
|
171
182
|
|
|
172
183
|
if (coldSpawn && process.env.XCSH_SESSION_ID && Number.isFinite(spawnAtEnv)) {
|
|
@@ -218,6 +229,7 @@ export default class Worker extends Command {
|
|
|
218
229
|
// session:createAgentSession — the heavy step between bridge-ready and
|
|
219
230
|
// session-ready (model registry, tools, context bootstrap). Wrapped as a span
|
|
220
231
|
// (parity with main.ts:892) so PI_TIMING reveals the per-tab session-load split.
|
|
232
|
+
const sessionBuildStart = Date.now();
|
|
221
233
|
const { session } = await logger.time("session:createAgentSession", createAgentSession, {
|
|
222
234
|
cwd,
|
|
223
235
|
hasUI: false,
|
|
@@ -232,6 +244,32 @@ export default class Worker extends Command {
|
|
|
232
244
|
// sets XCSH_BENCH_EXTENSION (absolute path). Inert for normal workers.
|
|
233
245
|
...(process.env.XCSH_BENCH_EXTENSION ? { additionalExtensionPaths: [process.env.XCSH_BENCH_EXTENSION] } : {}),
|
|
234
246
|
});
|
|
247
|
+
// TTFT: emit the session_build stage (createAgentSession seam) as a WS span so the
|
|
248
|
+
// bench and diagnostics panel stop hiding plugin/discovery/registry-load cost inside
|
|
249
|
+
// total ttft_ms. Buffered + flushed on connect (parity with cold-start spans).
|
|
250
|
+
sessionBuildFrame = sessionBuildSpan(
|
|
251
|
+
process.env.XCSH_SESSION_ID ?? "",
|
|
252
|
+
coldSpawn,
|
|
253
|
+
Date.now() - sessionBuildStart,
|
|
254
|
+
);
|
|
255
|
+
flushSessionBuild();
|
|
256
|
+
|
|
257
|
+
// TTFT Phase 3 hermeticity: the bench-instant stand-in provider is registered while
|
|
258
|
+
// createAgentSession loads the bench extension (additionalExtensionPaths), which is
|
|
259
|
+
// AFTER the default-model role is resolved — so the worker would otherwise fall back
|
|
260
|
+
// to a real provider and the benchmark would measure live network TTFT, not xcsh
|
|
261
|
+
// overhead. In bench mode, explicitly select bench-instant now that it is registered.
|
|
262
|
+
// Gated on XCSH_BENCH_EXTENSION → completely inert for a normal `xcsh worker`.
|
|
263
|
+
if (process.env.XCSH_BENCH_EXTENSION) {
|
|
264
|
+
const benchModel = session.modelRegistry.find("bench-instant", "bench-instant");
|
|
265
|
+
if (benchModel) {
|
|
266
|
+
await session.setModel(benchModel);
|
|
267
|
+
} else {
|
|
268
|
+
console.error(
|
|
269
|
+
"[xcsh worker] BENCH ERROR: bench-instant model not registered — benchmark would measure a real provider",
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
235
273
|
|
|
236
274
|
const chatHandler = new ChatHandler(bridge, session);
|
|
237
275
|
chatHandler.attach();
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import * as path from "node:path";
|
|
18
18
|
import { $env, logger, readProviderFromModelsYml } from "@f5-sales-demo/pi-utils";
|
|
19
|
+
import { DEFAULT_MODEL_ROLE } from "./settings-schema";
|
|
19
20
|
|
|
20
21
|
/** Current config schema version. Bump when the generated format changes. */
|
|
21
22
|
export const CURRENT_CONFIG_VERSION = 2;
|
|
@@ -118,47 +119,68 @@ export function readLiteLLMConfig(modelsPath: string): LiteLLMConfig | undefined
|
|
|
118
119
|
return { baseUrl: resolvedBaseUrl, apiKey: resolvedApiKey };
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* The default model role is baked into the binary (settings-schema `modelRoles`
|
|
124
|
+
* default) so a fresh install needs NO config.yml. Re-exported here for the
|
|
125
|
+
* healer and tests; there is a single source of truth in settings-schema.
|
|
126
|
+
*/
|
|
127
|
+
export const DEFAULT_MODEL_ROLE_VALUE = DEFAULT_MODEL_ROLE;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Generate config.yml for the LiteLLM proxy.
|
|
131
|
+
*
|
|
132
|
+
* The default model role is NOT written here — it ships in the binary
|
|
133
|
+
* (settings-schema), so we never persist a model id that can go stale (the
|
|
134
|
+
* failure mode behind the invalid-model / catalog-walk bugs). This only carries
|
|
135
|
+
* settings that differ from the built-in schema defaults.
|
|
136
|
+
*/
|
|
122
137
|
export function generateConfigYml(): string {
|
|
123
138
|
return [
|
|
124
139
|
"# Auto-generated by xcsh for LiteLLM proxy",
|
|
125
|
-
"
|
|
126
|
-
" default: anthropic/claude-opus-4-6",
|
|
127
|
-
"",
|
|
140
|
+
"# The default model role ships in the binary — none is written here.",
|
|
128
141
|
"providers:",
|
|
129
142
|
" image: openai",
|
|
130
143
|
" webSearch: anthropic",
|
|
131
144
|
"",
|
|
132
|
-
"generate_image:",
|
|
133
|
-
" enabled: true",
|
|
134
|
-
"",
|
|
135
|
-
"inspect_image:",
|
|
136
|
-
" enabled: true",
|
|
137
|
-
"",
|
|
138
|
-
"images:",
|
|
139
|
-
" blockImages: false",
|
|
140
|
-
" autoResize: true",
|
|
141
|
-
"",
|
|
142
|
-
"terminal:",
|
|
143
|
-
" showImages: true",
|
|
144
|
-
"",
|
|
145
145
|
].join("\n");
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
149
|
+
* Provider prefixes that are never valid as a persisted runtime default.
|
|
150
|
+
* `bench-instant` is the TTFT benchmark stand-in provider — it only registers
|
|
151
|
+
* when XCSH_BENCH_EXTENSION is set, so a `bench-instant/*` default in a normal
|
|
152
|
+
* worker is unresolvable and drops xcsh into the "first available model"
|
|
153
|
+
* fallback (which can pick a model the F5 proxy can't serve).
|
|
154
|
+
*/
|
|
155
|
+
const UNRESOLVABLE_DEFAULT_PROVIDER_PREFIXES = ["bench-instant/"];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Repair a config.yml whose `modelRoles.default` can never resolve at runtime
|
|
159
|
+
* (e.g. `bench-instant/bench-instant` leaked from a benchmark run) by rewriting
|
|
160
|
+
* it to the binary default. Left unhealed, such a default triggers the
|
|
161
|
+
* catalog-wide fallback that surfaced as the AWS-SSO / invalid-model errors.
|
|
162
|
+
*
|
|
163
|
+
* A config.yml with NO `modelRoles:` needs no healing — the binary provides the
|
|
164
|
+
* default. We deliberately do not add one, to avoid persisting a stale id.
|
|
153
165
|
*/
|
|
154
166
|
export function healConfigYmlModelRoles(configPath: string): void {
|
|
155
167
|
try {
|
|
156
168
|
const content = fs.readFileSync(configPath, "utf-8");
|
|
157
|
-
if (content.includes("modelRoles:")) return; //
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
169
|
+
if (!content.includes("modelRoles:")) return; // binary default applies
|
|
170
|
+
const defaultLine = /^(\s*)default:\s*(\S+)\s*$/m;
|
|
171
|
+
const match = content.match(defaultLine);
|
|
172
|
+
if (match) {
|
|
173
|
+
const [, indent, value] = match;
|
|
174
|
+
if (UNRESOLVABLE_DEFAULT_PROVIDER_PREFIXES.some(prefix => value.startsWith(prefix))) {
|
|
175
|
+
const healed = content.replace(defaultLine, `${indent}default: ${DEFAULT_MODEL_ROLE_VALUE}`);
|
|
176
|
+
fs.writeFileSync(configPath, healed);
|
|
177
|
+
logger.debug("Healed config.yml: replaced unresolvable default modelRole", {
|
|
178
|
+
configPath,
|
|
179
|
+
previous: value,
|
|
180
|
+
replacement: DEFAULT_MODEL_ROLE_VALUE,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
162
184
|
} catch {
|
|
163
185
|
// Best-effort — don't block startup
|
|
164
186
|
}
|
|
@@ -774,6 +774,8 @@ export class ModelRegistry {
|
|
|
774
774
|
#customProviderApiKeys: Map<string, string> = new Map();
|
|
775
775
|
#keylessProviders: Set<string> = new Set();
|
|
776
776
|
#discoverableProviders: DiscoveryProviderConfig[] = [];
|
|
777
|
+
/** Provider ids explicitly configured in models.yml (empty until a config is loaded). */
|
|
778
|
+
#configuredProviderIds: Set<string> = new Set();
|
|
777
779
|
#customModelOverlays: CustomModelOverlay[] = [];
|
|
778
780
|
#providerOverrides: Map<string, ProviderOverride> = new Map();
|
|
779
781
|
#modelOverrides: Map<string, Map<string, ModelOverride>> = new Map();
|
|
@@ -923,6 +925,7 @@ export class ModelRegistry {
|
|
|
923
925
|
this.#configError = configError;
|
|
924
926
|
this.#keylessProviders = keylessProviders;
|
|
925
927
|
this.#discoverableProviders = discoverableProviders;
|
|
928
|
+
this.#configuredProviderIds = configuredProviders;
|
|
926
929
|
this.#customModelOverlays = customModels;
|
|
927
930
|
this.#providerOverrides = overrides;
|
|
928
931
|
this.#modelOverrides = modelOverrides;
|
|
@@ -1993,6 +1996,16 @@ export class ModelRegistry {
|
|
|
1993
1996
|
return this.#models.filter(model => this.#isModelAvailable(model));
|
|
1994
1997
|
}
|
|
1995
1998
|
|
|
1999
|
+
/**
|
|
2000
|
+
* Provider ids explicitly configured in models.yml.
|
|
2001
|
+
* Empty when no config has been loaded (e.g. a fresh install before `/login`).
|
|
2002
|
+
* Used to keep automatic model selection scoped to providers the user has
|
|
2003
|
+
* actually set up, rather than probing the entire bundled catalog.
|
|
2004
|
+
*/
|
|
2005
|
+
getConfiguredProviderIds(): Set<string> {
|
|
2006
|
+
return new Set(this.#configuredProviderIds);
|
|
2007
|
+
}
|
|
2008
|
+
|
|
1996
2009
|
getDiscoverableProviders(): string[] {
|
|
1997
2010
|
const disabledProviders = getDisabledProviderIdsFromSettings();
|
|
1998
2011
|
return this.#discoverableProviders
|
|
@@ -152,6 +152,14 @@ export interface ModelTagsSettings {
|
|
|
152
152
|
const EMPTY_STRING_ARRAY: string[] = [];
|
|
153
153
|
const EMPTY_STRING_RECORD: Record<string, string> = {};
|
|
154
154
|
const DEFAULT_CYCLE_ORDER: string[] = ["smol", "default", "slow"];
|
|
155
|
+
/**
|
|
156
|
+
* Binary-baked default model role. Ships in the binary so a fresh install needs
|
|
157
|
+
* NO `~/.xcsh/agent/config.yml` — `/login` only supplies the (PII) proxy URL + key.
|
|
158
|
+
* The gateway serves the id `claude-opus-4-8`; its catalog entry carries the
|
|
159
|
+
* `context-1m-2025-08-07` beta for 1M context.
|
|
160
|
+
*/
|
|
161
|
+
export const DEFAULT_MODEL_ROLE = "anthropic/claude-opus-4-8";
|
|
162
|
+
const DEFAULT_MODEL_ROLES: Record<string, string> = { default: DEFAULT_MODEL_ROLE };
|
|
155
163
|
const EMPTY_MODEL_TAGS_RECORD: ModelTagsSettings = {};
|
|
156
164
|
export const DEFAULT_BASH_INTERCEPTOR_RULES: BashInterceptorRule[] = [
|
|
157
165
|
{
|
|
@@ -245,7 +253,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
245
253
|
|
|
246
254
|
disabledExtensions: { type: "array", default: EMPTY_STRING_ARRAY },
|
|
247
255
|
|
|
248
|
-
modelRoles: { type: "record", default:
|
|
256
|
+
modelRoles: { type: "record", default: DEFAULT_MODEL_ROLES },
|
|
249
257
|
|
|
250
258
|
modelTags: { type: "record", default: EMPTY_MODEL_TAGS_RECORD },
|
|
251
259
|
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "19.61.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "19.61.4",
|
|
21
|
+
"commit": "8697bc5fee06350b861c8c8bf7bbac1f00f85408",
|
|
22
|
+
"shortCommit": "8697bc5",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v19.61.
|
|
25
|
-
"commitDate": "2026-07-
|
|
26
|
-
"buildDate": "2026-07-
|
|
24
|
+
"tag": "v19.61.4",
|
|
25
|
+
"commitDate": "2026-07-07T16:14:37Z",
|
|
26
|
+
"buildDate": "2026-07-07T16:40:48.327Z",
|
|
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/v19.61.
|
|
31
|
+
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/8697bc5fee06350b861c8c8bf7bbac1f00f85408",
|
|
32
|
+
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v19.61.4"
|
|
33
33
|
};
|
|
@@ -269,9 +269,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
269
269
|
category: "load-balancing",
|
|
270
270
|
description:
|
|
271
271
|
"Advertise_policy object controls how and where a service represented by a given virtual_host object is advertised to consumers. configuration",
|
|
272
|
-
required: ["name", "
|
|
272
|
+
required: ["name", "address", "protocol", "skip_xff_append"],
|
|
273
273
|
minimal_config:
|
|
274
|
-
'resource "xcsh_advertise_policy" "example" {\n name = "example-advertise-policy"\n namespace = "
|
|
274
|
+
'resource "xcsh_advertise_policy" "example" {\n name = "example-advertise-policy"\n namespace = "system"\n\n address = "example-value"\n protocol = "example-value"\n skip_xff_append = true\n}',
|
|
275
275
|
dependencies: {
|
|
276
276
|
requires: [],
|
|
277
277
|
},
|
|
@@ -293,7 +293,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
293
293
|
description: "New Alert Receiver object",
|
|
294
294
|
required: ["name", "namespace", "receiver_choice"],
|
|
295
295
|
minimal_config:
|
|
296
|
-
'resource "xcsh_alert_receiver" "example" {\n name = "example-alert-receiver"\n namespace = "
|
|
296
|
+
'resource "xcsh_alert_receiver" "example" {\n name = "example-alert-receiver"\n namespace = "system"\n}',
|
|
297
297
|
dependencies: {
|
|
298
298
|
requires: [],
|
|
299
299
|
},
|
|
@@ -302,9 +302,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
302
302
|
api_crawler: {
|
|
303
303
|
category: "api-security",
|
|
304
304
|
description: "API Crawler resource",
|
|
305
|
-
required: ["name"
|
|
305
|
+
required: ["name"],
|
|
306
306
|
minimal_config:
|
|
307
|
-
'resource "xcsh_api_crawler" "example" {\n name = "example-api-crawler"\n namespace = "
|
|
307
|
+
'resource "xcsh_api_crawler" "example" {\n name = "example-api-crawler"\n namespace = "system"\n}',
|
|
308
308
|
dependencies: {
|
|
309
309
|
requires: [],
|
|
310
310
|
},
|
|
@@ -315,7 +315,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
315
315
|
description: "API Definition",
|
|
316
316
|
required: ["name", "namespace"],
|
|
317
317
|
minimal_config:
|
|
318
|
-
'resource "xcsh_api_definition" "example" {\n name = "example-api-definition"\n namespace = "
|
|
318
|
+
'resource "xcsh_api_definition" "example" {\n name = "example-api-definition"\n namespace = "system"\n}',
|
|
319
319
|
dependencies: {
|
|
320
320
|
requires: ["namespace"],
|
|
321
321
|
},
|
|
@@ -326,7 +326,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
326
326
|
description: "API discovery creates a new object in the storage backend for metadata.namespace",
|
|
327
327
|
required: ["name", "namespace", "user_defined_api_discovery_policy"],
|
|
328
328
|
minimal_config:
|
|
329
|
-
'resource "xcsh_api_discovery" "example" {\n name = "example-api-discovery"\n namespace = "
|
|
329
|
+
'resource "xcsh_api_discovery" "example" {\n name = "example-api-discovery"\n namespace = "system"\n}',
|
|
330
330
|
dependencies: {
|
|
331
331
|
requires: [],
|
|
332
332
|
},
|
|
@@ -335,9 +335,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
335
335
|
api_testing: {
|
|
336
336
|
category: "api-security",
|
|
337
337
|
description: "API Testing resource",
|
|
338
|
-
required: ["name", "
|
|
338
|
+
required: ["name", "custom_header_value"],
|
|
339
339
|
minimal_config:
|
|
340
|
-
'resource "xcsh_api_testing" "example" {\n name = "example-api-testing"\n namespace = "
|
|
340
|
+
'resource "xcsh_api_testing" "example" {\n name = "example-api-testing"\n namespace = "system"\n\n custom_header_value = "example-value"\n}',
|
|
341
341
|
dependencies: {
|
|
342
342
|
requires: [],
|
|
343
343
|
},
|
|
@@ -356,9 +356,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
356
356
|
app_api_group: {
|
|
357
357
|
category: "api-security",
|
|
358
358
|
description: "App_api_group creates a new object in the storage backend for metadata.namespace",
|
|
359
|
-
required: ["name"
|
|
359
|
+
required: ["name"],
|
|
360
360
|
minimal_config:
|
|
361
|
-
'resource "xcsh_app_api_group" "example" {\n name = "example-app-api-group"\n namespace = "
|
|
361
|
+
'resource "xcsh_app_api_group" "example" {\n name = "example-app-api-group"\n namespace = "system"\n}',
|
|
362
362
|
dependencies: {
|
|
363
363
|
requires: [],
|
|
364
364
|
},
|
|
@@ -378,9 +378,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
378
378
|
app_setting: {
|
|
379
379
|
category: "applications",
|
|
380
380
|
description: "App setting configuration in namespace metadata.namespace",
|
|
381
|
-
required: ["name"
|
|
381
|
+
required: ["name"],
|
|
382
382
|
minimal_config:
|
|
383
|
-
'resource "xcsh_app_setting" "example" {\n name = "example-app-setting"\n namespace = "
|
|
383
|
+
'resource "xcsh_app_setting" "example" {\n name = "example-app-setting"\n namespace = "system"\n}',
|
|
384
384
|
dependencies: {
|
|
385
385
|
requires: [],
|
|
386
386
|
},
|
|
@@ -389,9 +389,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
389
389
|
app_type: {
|
|
390
390
|
category: "applications",
|
|
391
391
|
description: "App type will create the configuration in namespace metadata.namespace",
|
|
392
|
-
required: ["name"
|
|
392
|
+
required: ["name"],
|
|
393
393
|
minimal_config:
|
|
394
|
-
'resource "xcsh_app_type" "example" {\n name = "example-app-type"\n namespace = "
|
|
394
|
+
'resource "xcsh_app_type" "example" {\n name = "example-app-type"\n namespace = "system"\n}',
|
|
395
395
|
dependencies: {
|
|
396
396
|
requires: [],
|
|
397
397
|
},
|
|
@@ -433,9 +433,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
433
433
|
aws_tgw_site: {
|
|
434
434
|
category: "sites",
|
|
435
435
|
description: "Deploying F5 sites connected via AWS Transit Gateway",
|
|
436
|
-
required: ["name"
|
|
436
|
+
required: ["name"],
|
|
437
437
|
minimal_config:
|
|
438
|
-
'resource "xcsh_aws_tgw_site" "example" {\n name = "example-aws-tgw-site"\n namespace = "
|
|
438
|
+
'resource "xcsh_aws_tgw_site" "example" {\n name = "example-aws-tgw-site"\n namespace = "system"\n}',
|
|
439
439
|
dependencies: {
|
|
440
440
|
requires: [],
|
|
441
441
|
},
|
|
@@ -444,9 +444,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
444
444
|
aws_vpc_site: {
|
|
445
445
|
category: "sites",
|
|
446
446
|
description: "Deploying F5 sites within AWS VPC environments",
|
|
447
|
-
required: ["name", "
|
|
447
|
+
required: ["name", "address", "aws_region", "disk_size", "instance_type", "ssh_key"],
|
|
448
448
|
minimal_config:
|
|
449
|
-
'resource "xcsh_aws_vpc_site" "example" {\n name = "example-aws-vpc-site"\n namespace = "
|
|
449
|
+
'resource "xcsh_aws_vpc_site" "example" {\n name = "example-aws-vpc-site"\n namespace = "system"\n\n aws_region = "example-value"\n instance_type = "example-value"\n ssh_key = "example-value"\n address = "example-value"\n disk_size = 1\n}',
|
|
450
450
|
dependencies: {
|
|
451
451
|
requires: [],
|
|
452
452
|
},
|
|
@@ -455,9 +455,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
455
455
|
azure_vnet_site: {
|
|
456
456
|
category: "sites",
|
|
457
457
|
description: "Deploying F5 sites within Azure Virtual Network environments",
|
|
458
|
-
required: ["name", "
|
|
458
|
+
required: ["name", "machine_type", "resource_group", "ssh_key"],
|
|
459
459
|
minimal_config:
|
|
460
|
-
'resource "xcsh_azure_vnet_site" "example" {\n name = "example-Azure-vnet-site"\n namespace = "
|
|
460
|
+
'resource "xcsh_azure_vnet_site" "example" {\n name = "example-Azure-vnet-site"\n namespace = "system"\n\n machine_type = "example-value"\n resource_group = "example-value"\n ssh_key = "example-value"\n}',
|
|
461
461
|
dependencies: {
|
|
462
462
|
requires: [],
|
|
463
463
|
},
|
|
@@ -467,8 +467,8 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
467
467
|
category: "networking",
|
|
468
468
|
description:
|
|
469
469
|
"Bgp object is the configuration for peering with external bgp servers. it is created by users in system namespace. configuration",
|
|
470
|
-
required: ["name"
|
|
471
|
-
minimal_config: 'resource "xcsh_bgp" "example" {\n name = "example-bgp"\n namespace = "
|
|
470
|
+
required: ["name"],
|
|
471
|
+
minimal_config: 'resource "xcsh_bgp" "example" {\n name = "example-bgp"\n namespace = "system"\n}',
|
|
472
472
|
dependencies: {
|
|
473
473
|
requires: [],
|
|
474
474
|
},
|
|
@@ -477,9 +477,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
477
477
|
bgp_asn_set: {
|
|
478
478
|
category: "networking",
|
|
479
479
|
description: "Bgp_asn_set creates a new object in the storage backend for metadata.namespace",
|
|
480
|
-
required: ["name"
|
|
480
|
+
required: ["name"],
|
|
481
481
|
minimal_config:
|
|
482
|
-
'resource "xcsh_bgp_asn_set" "example" {\n name = "example-bgp-asn-set"\n namespace = "
|
|
482
|
+
'resource "xcsh_bgp_asn_set" "example" {\n name = "example-bgp-asn-set"\n namespace = "system"\n\n as_numbers = [1]\n}',
|
|
483
483
|
dependencies: {
|
|
484
484
|
requires: [],
|
|
485
485
|
},
|
|
@@ -588,9 +588,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
588
588
|
cloud_credentials: {
|
|
589
589
|
category: "authentication",
|
|
590
590
|
description: "Api to create cloud_credentials object. configuration",
|
|
591
|
-
required: ["name"
|
|
591
|
+
required: ["name"],
|
|
592
592
|
minimal_config:
|
|
593
|
-
'resource "xcsh_cloud_credentials" "example" {\n name = "example-cloud-credentials"\n namespace = "
|
|
593
|
+
'resource "xcsh_cloud_credentials" "example" {\n name = "example-cloud-credentials"\n namespace = "system"\n}',
|
|
594
594
|
dependencies: {
|
|
595
595
|
requires: [],
|
|
596
596
|
},
|
|
@@ -599,9 +599,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
599
599
|
cloud_elastic_ip: {
|
|
600
600
|
category: "cloud-resources",
|
|
601
601
|
description: "Cloud Elastic IP creates Cloud Elastic IP object Object is attached to a site",
|
|
602
|
-
required: ["name", "
|
|
602
|
+
required: ["name", "item_count"],
|
|
603
603
|
minimal_config:
|
|
604
|
-
'resource "xcsh_cloud_elastic_ip" "example" {\n name = "example-cloud-elastic-ip"\n namespace = "
|
|
604
|
+
'resource "xcsh_cloud_elastic_ip" "example" {\n name = "example-cloud-elastic-ip"\n namespace = "system"\n\n item_count = 1\n}',
|
|
605
605
|
dependencies: {
|
|
606
606
|
requires: [],
|
|
607
607
|
},
|
|
@@ -651,9 +651,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
651
651
|
code_base_integration: {
|
|
652
652
|
category: "integrations",
|
|
653
653
|
description: "Integration details",
|
|
654
|
-
required: ["name"
|
|
654
|
+
required: ["name"],
|
|
655
655
|
minimal_config:
|
|
656
|
-
'resource "xcsh_code_base_integration" "example" {\n name = "example-code-base-integration"\n namespace = "
|
|
656
|
+
'resource "xcsh_code_base_integration" "example" {\n name = "example-code-base-integration"\n namespace = "system"\n}',
|
|
657
657
|
dependencies: {
|
|
658
658
|
requires: [],
|
|
659
659
|
},
|
|
@@ -706,9 +706,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
706
706
|
dc_cluster_group: {
|
|
707
707
|
category: "networking",
|
|
708
708
|
description: "DC Cluster group in given namespace",
|
|
709
|
-
required: ["name"
|
|
709
|
+
required: ["name"],
|
|
710
710
|
minimal_config:
|
|
711
|
-
'resource "xcsh_dc_cluster_group" "example" {\n name = "example-dc-cluster-group"\n namespace = "
|
|
711
|
+
'resource "xcsh_dc_cluster_group" "example" {\n name = "example-dc-cluster-group"\n namespace = "system"\n}',
|
|
712
712
|
dependencies: {
|
|
713
713
|
requires: [],
|
|
714
714
|
},
|
|
@@ -717,9 +717,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
717
717
|
discovery: {
|
|
718
718
|
category: "applications",
|
|
719
719
|
description: "Api to create discovery object for a site or virtual site in system namespace. configuration",
|
|
720
|
-
required: ["name"
|
|
720
|
+
required: ["name"],
|
|
721
721
|
minimal_config:
|
|
722
|
-
'resource "xcsh_discovery" "example" {\n name = "example-discovery"\n namespace = "
|
|
722
|
+
'resource "xcsh_discovery" "example" {\n name = "example-discovery"\n namespace = "system"\n}',
|
|
723
723
|
dependencies: {
|
|
724
724
|
requires: [],
|
|
725
725
|
},
|
|
@@ -740,9 +740,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
740
740
|
dns_domain: {
|
|
741
741
|
category: "dns",
|
|
742
742
|
description: "DNS Domain in a given namespace. If one already exist it will give a error",
|
|
743
|
-
required: ["name", "
|
|
743
|
+
required: ["name", "dnssec_mode"],
|
|
744
744
|
minimal_config:
|
|
745
|
-
'resource "xcsh_dns_domain" "example" {\n name = "example-dns-domain"\n namespace = "
|
|
745
|
+
'resource "xcsh_dns_domain" "example" {\n name = "example-dns-domain"\n namespace = "system"\n\n dnssec_mode = "DNSSEC_DISABLE"\n}',
|
|
746
746
|
dependencies: {
|
|
747
747
|
requires: [],
|
|
748
748
|
},
|
|
@@ -751,9 +751,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
751
751
|
dns_lb_health_check: {
|
|
752
752
|
category: "dns",
|
|
753
753
|
description: "DNS Load Balancer Health Check in a given namespace. If one already exist it will give a error",
|
|
754
|
-
required: ["name"
|
|
754
|
+
required: ["name"],
|
|
755
755
|
minimal_config:
|
|
756
|
-
'resource "xcsh_dns_lb_health_check" "example" {\n name = "example-dns-lb-health-check"\n namespace = "
|
|
756
|
+
'resource "xcsh_dns_lb_health_check" "example" {\n name = "example-dns-lb-health-check"\n namespace = "system"\n}',
|
|
757
757
|
dependencies: {
|
|
758
758
|
requires: [],
|
|
759
759
|
},
|
|
@@ -762,9 +762,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
762
762
|
dns_lb_pool: {
|
|
763
763
|
category: "dns",
|
|
764
764
|
description: "DNS Load Balancer Pool in a given namespace. If one already exist it will give a error",
|
|
765
|
-
required: ["name", "
|
|
765
|
+
required: ["name", "load_balancing_mode"],
|
|
766
766
|
minimal_config:
|
|
767
|
-
'resource "xcsh_dns_lb_pool" "example" {\n name = "example-dns-lb-pool"\n namespace = "
|
|
767
|
+
'resource "xcsh_dns_lb_pool" "example" {\n name = "example-dns-lb-pool"\n namespace = "system"\n\n load_balancing_mode = "ROUND_ROBIN"\n}',
|
|
768
768
|
dependencies: {
|
|
769
769
|
requires: [],
|
|
770
770
|
},
|
|
@@ -795,9 +795,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
795
795
|
dns_zone: {
|
|
796
796
|
category: "dns",
|
|
797
797
|
description: "DNS Zone in a given namespace. If one already exist it will give a error",
|
|
798
|
-
required: ["name"
|
|
798
|
+
required: ["name"],
|
|
799
799
|
minimal_config:
|
|
800
|
-
'resource "xcsh_dns_zone" "example" {\n name = "example-dns-zone"\n namespace = "
|
|
800
|
+
'resource "xcsh_dns_zone" "example" {\n name = "example-dns-zone"\n namespace = "system"\n}',
|
|
801
801
|
dependencies: {
|
|
802
802
|
requires: [],
|
|
803
803
|
},
|
|
@@ -806,9 +806,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
806
806
|
endpoint: {
|
|
807
807
|
category: "load-balancing",
|
|
808
808
|
description: "Endpoint will create the object in the storage backend for namespace metadata.namespace",
|
|
809
|
-
required: ["name", "
|
|
809
|
+
required: ["name", "health_check_port", "port", "protocol"],
|
|
810
810
|
minimal_config:
|
|
811
|
-
'resource "xcsh_endpoint" "example" {\n name = "example-endpoint"\n namespace = "
|
|
811
|
+
'resource "xcsh_endpoint" "example" {\n name = "example-endpoint"\n namespace = "system"\n\n health_check_port = 1\n port = 1\n protocol = "example-value"\n}',
|
|
812
812
|
dependencies: {
|
|
813
813
|
requires: [],
|
|
814
814
|
},
|
|
@@ -851,9 +851,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
851
851
|
fast_acl_rule: {
|
|
852
852
|
category: "security",
|
|
853
853
|
description: "New Fast ACL rule, has specification to match source IP, source port and action to apply",
|
|
854
|
-
required: ["name"
|
|
854
|
+
required: ["name"],
|
|
855
855
|
minimal_config:
|
|
856
|
-
'resource "xcsh_fast_acl_rule" "example" {\n name = "example-fast-acl-rule"\n namespace = "
|
|
856
|
+
'resource "xcsh_fast_acl_rule" "example" {\n name = "example-fast-acl-rule"\n namespace = "system"\n}',
|
|
857
857
|
dependencies: {
|
|
858
858
|
requires: [],
|
|
859
859
|
},
|
|
@@ -875,14 +875,13 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
875
875
|
description: "Fleet will create a fleet object in 'system' namespace of the user",
|
|
876
876
|
required: [
|
|
877
877
|
"name",
|
|
878
|
-
"namespace",
|
|
879
878
|
"enable_default_fleet_config_download",
|
|
880
879
|
"fleet_label",
|
|
881
880
|
"operating_system_version",
|
|
882
881
|
"volterra_software_version",
|
|
883
882
|
],
|
|
884
883
|
minimal_config:
|
|
885
|
-
'resource "xcsh_fleet" "example" {\n name = "example-fleet"\n namespace = "
|
|
884
|
+
'resource "xcsh_fleet" "example" {\n name = "example-fleet"\n namespace = "system"\n\n fleet_label = "example-value"\n enable_default_fleet_config_download = true\n operating_system_version = "example-value"\n volterra_software_version = "example-value"\n}',
|
|
886
885
|
dependencies: {
|
|
887
886
|
requires: [],
|
|
888
887
|
},
|
|
@@ -913,9 +912,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
913
912
|
gcp_vpc_site: {
|
|
914
913
|
category: "sites",
|
|
915
914
|
description: "Deploying F5 sites within Google Cloud VPC environments",
|
|
916
|
-
required: ["name", "
|
|
915
|
+
required: ["name", "address", "disk_size", "gcp_region", "instance_type", "ssh_key"],
|
|
917
916
|
minimal_config:
|
|
918
|
-
'resource "xcsh_gcp_vpc_site" "example" {\n name = "example-gcp-vpc-site"\n namespace = "
|
|
917
|
+
'resource "xcsh_gcp_vpc_site" "example" {\n name = "example-gcp-vpc-site"\n namespace = "system"\n\n gcp_region = "example-value"\n instance_type = "example-value"\n ssh_key = "example-value"\n address = "example-value"\n disk_size = 1\n}',
|
|
919
918
|
dependencies: {
|
|
920
919
|
requires: [],
|
|
921
920
|
},
|
|
@@ -937,7 +936,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
937
936
|
description: "New Global Log Receiver object",
|
|
938
937
|
required: ["name", "namespace", "log_type", "receiver_choice"],
|
|
939
938
|
minimal_config:
|
|
940
|
-
'resource "xcsh_global_log_receiver" "example" {\n name = "example-global-log-receiver"\n namespace = "
|
|
939
|
+
'resource "xcsh_global_log_receiver" "example" {\n name = "example-global-log-receiver"\n namespace = "system"\n}',
|
|
941
940
|
dependencies: {
|
|
942
941
|
requires: [],
|
|
943
942
|
},
|
|
@@ -1039,7 +1038,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1039
1038
|
description: "K8s_cluster will create the object in the storage backend for namespace metadata.namespace",
|
|
1040
1039
|
required: ["name", "namespace"],
|
|
1041
1040
|
minimal_config:
|
|
1042
|
-
'resource "xcsh_k8s_cluster" "example" {\n name = "example-k8s-cluster"\n namespace = "
|
|
1041
|
+
'resource "xcsh_k8s_cluster" "example" {\n name = "example-k8s-cluster"\n namespace = "system"\n}',
|
|
1043
1042
|
dependencies: {
|
|
1044
1043
|
requires: [],
|
|
1045
1044
|
},
|
|
@@ -1048,9 +1047,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1048
1047
|
k8s_cluster_role: {
|
|
1049
1048
|
category: "kubernetes",
|
|
1050
1049
|
description: "K8s_cluster_role will create the object in the storage backend for namespace metadata.namespace",
|
|
1051
|
-
required: ["name"
|
|
1050
|
+
required: ["name"],
|
|
1052
1051
|
minimal_config:
|
|
1053
|
-
'resource "xcsh_k8s_cluster_role" "example" {\n name = "example-k8s-cluster-role"\n namespace = "
|
|
1052
|
+
'resource "xcsh_k8s_cluster_role" "example" {\n name = "example-k8s-cluster-role"\n namespace = "system"\n}',
|
|
1054
1053
|
dependencies: {
|
|
1055
1054
|
requires: [],
|
|
1056
1055
|
},
|
|
@@ -1060,9 +1059,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1060
1059
|
category: "kubernetes",
|
|
1061
1060
|
description:
|
|
1062
1061
|
"K8s_cluster_role_binding will create the object in the storage backend for namespace metadata.namespace",
|
|
1063
|
-
required: ["name"
|
|
1062
|
+
required: ["name"],
|
|
1064
1063
|
minimal_config:
|
|
1065
|
-
'resource "xcsh_k8s_cluster_role_binding" "example" {\n name = "example-k8s-cluster-role-binding"\n namespace = "
|
|
1064
|
+
'resource "xcsh_k8s_cluster_role_binding" "example" {\n name = "example-k8s-cluster-role-binding"\n namespace = "system"\n}',
|
|
1066
1065
|
dependencies: {
|
|
1067
1066
|
requires: [],
|
|
1068
1067
|
},
|
|
@@ -1094,9 +1093,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1094
1093
|
log_receiver: {
|
|
1095
1094
|
category: "monitoring",
|
|
1096
1095
|
description: "New Log Receiver object",
|
|
1097
|
-
required: ["name"
|
|
1096
|
+
required: ["name"],
|
|
1098
1097
|
minimal_config:
|
|
1099
|
-
'resource "xcsh_log_receiver" "example" {\n name = "example-log-receiver"\n namespace = "
|
|
1098
|
+
'resource "xcsh_log_receiver" "example" {\n name = "example-log-receiver"\n namespace = "system"\n}',
|
|
1100
1099
|
dependencies: {
|
|
1101
1100
|
requires: [],
|
|
1102
1101
|
},
|
|
@@ -1140,9 +1139,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1140
1139
|
nat_policy: {
|
|
1141
1140
|
category: "security",
|
|
1142
1141
|
description: "Nat policy create specification configures nat policy with multiple rules,. configuration",
|
|
1143
|
-
required: ["name"
|
|
1142
|
+
required: ["name"],
|
|
1144
1143
|
minimal_config:
|
|
1145
|
-
'resource "xcsh_nat_policy" "example" {\n name = "example-nat-policy"\n namespace = "
|
|
1144
|
+
'resource "xcsh_nat_policy" "example" {\n name = "example-nat-policy"\n namespace = "system"\n}',
|
|
1146
1145
|
dependencies: {
|
|
1147
1146
|
requires: [],
|
|
1148
1147
|
},
|
|
@@ -1151,9 +1150,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1151
1150
|
network_connector: {
|
|
1152
1151
|
category: "networking",
|
|
1153
1152
|
description: "Network connector is created by users in system namespace. configuration",
|
|
1154
|
-
required: ["name"
|
|
1153
|
+
required: ["name"],
|
|
1155
1154
|
minimal_config:
|
|
1156
|
-
'resource "xcsh_network_connector" "example" {\n name = "example-network-connector"\n namespace = "
|
|
1155
|
+
'resource "xcsh_network_connector" "example" {\n name = "example-network-connector"\n namespace = "system"\n}',
|
|
1157
1156
|
dependencies: {
|
|
1158
1157
|
requires: [],
|
|
1159
1158
|
},
|
|
@@ -1164,7 +1163,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1164
1163
|
description: "Network firewall is created by users in system namespace. configuration",
|
|
1165
1164
|
required: ["name", "namespace"],
|
|
1166
1165
|
minimal_config:
|
|
1167
|
-
'resource "xcsh_network_firewall" "example" {\n name = "example-network-firewall"\n namespace = "
|
|
1166
|
+
'resource "xcsh_network_firewall" "example" {\n name = "example-network-firewall"\n namespace = "system"\n}',
|
|
1168
1167
|
dependencies: {
|
|
1169
1168
|
requires: [],
|
|
1170
1169
|
},
|
|
@@ -1174,9 +1173,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1174
1173
|
category: "networking",
|
|
1175
1174
|
description:
|
|
1176
1175
|
"Network interface represents configuration of a network device. it is created by users in system namespace. configuration",
|
|
1177
|
-
required: ["name"
|
|
1176
|
+
required: ["name"],
|
|
1178
1177
|
minimal_config:
|
|
1179
|
-
'resource "xcsh_network_interface" "example" {\n name = "example-network-interface"\n namespace = "
|
|
1178
|
+
'resource "xcsh_network_interface" "example" {\n name = "example-network-interface"\n namespace = "system"\n}',
|
|
1180
1179
|
dependencies: {
|
|
1181
1180
|
requires: [],
|
|
1182
1181
|
},
|
|
@@ -1196,9 +1195,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1196
1195
|
network_policy_rule: {
|
|
1197
1196
|
category: "security",
|
|
1198
1197
|
description: "Network policy rule with configured parameters in specified namespace",
|
|
1199
|
-
required: ["name"
|
|
1198
|
+
required: ["name"],
|
|
1200
1199
|
minimal_config:
|
|
1201
|
-
'resource "xcsh_network_policy_rule" "example" {\n name = "example-network-policy-rule"\n namespace = "
|
|
1200
|
+
'resource "xcsh_network_policy_rule" "example" {\n name = "example-network-policy-rule"\n namespace = "system"\n}',
|
|
1202
1201
|
dependencies: {
|
|
1203
1202
|
requires: [],
|
|
1204
1203
|
},
|
|
@@ -1218,9 +1217,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1218
1217
|
nfv_service: {
|
|
1219
1218
|
category: "networking",
|
|
1220
1219
|
description: "New NFV service with configured parameters",
|
|
1221
|
-
required: ["name"
|
|
1220
|
+
required: ["name"],
|
|
1222
1221
|
minimal_config:
|
|
1223
|
-
'resource "xcsh_nfv_service" "example" {\n name = "example-nfv-service"\n namespace = "
|
|
1222
|
+
'resource "xcsh_nfv_service" "example" {\n name = "example-nfv-service"\n namespace = "system"\n}',
|
|
1224
1223
|
dependencies: {
|
|
1225
1224
|
requires: [],
|
|
1226
1225
|
},
|
|
@@ -1230,9 +1229,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1230
1229
|
category: "networking",
|
|
1231
1230
|
description:
|
|
1232
1231
|
"Api to create nginx service discovery object for a site or virtual site in system namespace. configuration",
|
|
1233
|
-
required: ["name"
|
|
1232
|
+
required: ["name"],
|
|
1234
1233
|
minimal_config:
|
|
1235
|
-
'resource "xcsh_nginx_service_discovery" "example" {\n name = "example-nginx-service-discovery"\n namespace = "
|
|
1234
|
+
'resource "xcsh_nginx_service_discovery" "example" {\n name = "example-nginx-service-discovery"\n namespace = "system"\n}',
|
|
1236
1235
|
dependencies: {
|
|
1237
1236
|
requires: [],
|
|
1238
1237
|
},
|
|
@@ -1279,7 +1278,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1279
1278
|
"Protocol Inspection Specification in a given namespace. If one already exists it will give an error",
|
|
1280
1279
|
required: ["name", "namespace", "enable_disable_compliance_checks", "enable_disable_signatures"],
|
|
1281
1280
|
minimal_config:
|
|
1282
|
-
'resource "xcsh_protocol_inspection" "example" {\n name = "example-protocol-inspection"\n namespace = "
|
|
1281
|
+
'resource "xcsh_protocol_inspection" "example" {\n name = "example-protocol-inspection"\n namespace = "system"\n}',
|
|
1283
1282
|
dependencies: {
|
|
1284
1283
|
requires: [],
|
|
1285
1284
|
},
|
|
@@ -1344,9 +1343,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1344
1343
|
secret_management_access: {
|
|
1345
1344
|
category: "authentication",
|
|
1346
1345
|
description: "Secret_management_access creates a new object in storage backend for metadata.namespace",
|
|
1347
|
-
required: ["name", "
|
|
1346
|
+
required: ["name", "provider_name"],
|
|
1348
1347
|
minimal_config:
|
|
1349
|
-
'resource "xcsh_secret_management_access" "example" {\n name = "example-secret-management-access"\n namespace = "
|
|
1348
|
+
'resource "xcsh_secret_management_access" "example" {\n name = "example-secret-management-access"\n namespace = "system"\n\n provider_name = "example-value"\n}',
|
|
1350
1349
|
dependencies: {
|
|
1351
1350
|
requires: [],
|
|
1352
1351
|
},
|
|
@@ -1355,9 +1354,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1355
1354
|
securemesh_site: {
|
|
1356
1355
|
category: "sites",
|
|
1357
1356
|
description: "Deploying secure mesh edge sites with distributed security capabilities",
|
|
1358
|
-
required: ["name", "
|
|
1357
|
+
required: ["name", "address", "volterra_certified_hw"],
|
|
1359
1358
|
minimal_config:
|
|
1360
|
-
'resource "xcsh_securemesh_site" "example" {\n name = "example-securemesh-site"\n namespace = "
|
|
1359
|
+
'resource "xcsh_securemesh_site" "example" {\n name = "example-securemesh-site"\n namespace = "system"\n\n volterra_certified_hw = "example-value"\n worker_nodes = ["example-value"]\n address = "example-value"\n}',
|
|
1361
1360
|
dependencies: {
|
|
1362
1361
|
requires: [],
|
|
1363
1362
|
},
|
|
@@ -1366,9 +1365,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1366
1365
|
securemesh_site_v2: {
|
|
1367
1366
|
category: "sites",
|
|
1368
1367
|
description: "Deploying secure mesh edge sites with enhanced security and networking features",
|
|
1369
|
-
required: ["name"
|
|
1368
|
+
required: ["name"],
|
|
1370
1369
|
minimal_config:
|
|
1371
|
-
'resource "xcsh_securemesh_site_v2" "example" {\n name = "example-securemesh-site-v2"\n namespace = "
|
|
1370
|
+
'resource "xcsh_securemesh_site_v2" "example" {\n name = "example-securemesh-site-v2"\n namespace = "system"\n}',
|
|
1372
1371
|
dependencies: {
|
|
1373
1372
|
requires: [],
|
|
1374
1373
|
},
|
|
@@ -1421,9 +1420,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1421
1420
|
site: {
|
|
1422
1421
|
category: "sites",
|
|
1423
1422
|
description: "Virtual site object in given namespace",
|
|
1424
|
-
required: ["name", "
|
|
1423
|
+
required: ["name", "site_type"],
|
|
1425
1424
|
minimal_config:
|
|
1426
|
-
'resource "xcsh_site" "example" {\n name = "example-site"\n namespace = "
|
|
1425
|
+
'resource "xcsh_site" "example" {\n name = "example-site"\n namespace = "system"\n\n site_type = "INVALID"\n}',
|
|
1427
1426
|
dependencies: {
|
|
1428
1427
|
requires: [],
|
|
1429
1428
|
},
|
|
@@ -1432,9 +1431,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1432
1431
|
site_mesh_group: {
|
|
1433
1432
|
category: "sites",
|
|
1434
1433
|
description: "Site Mesh Group in system namespace of user",
|
|
1435
|
-
required: ["name"
|
|
1434
|
+
required: ["name"],
|
|
1436
1435
|
minimal_config:
|
|
1437
|
-
'resource "xcsh_site_mesh_group" "example" {\n name = "example-site-mesh-group"\n namespace = "
|
|
1436
|
+
'resource "xcsh_site_mesh_group" "example" {\n name = "example-site-mesh-group"\n namespace = "system"\n}',
|
|
1438
1437
|
dependencies: {
|
|
1439
1438
|
requires: [],
|
|
1440
1439
|
},
|
|
@@ -1483,9 +1482,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1483
1482
|
tenant_configuration: {
|
|
1484
1483
|
category: "organization",
|
|
1485
1484
|
description: "Tenant configuration specification. configuration",
|
|
1486
|
-
required: ["name"
|
|
1485
|
+
required: ["name"],
|
|
1487
1486
|
minimal_config:
|
|
1488
|
-
'resource "xcsh_tenant_configuration" "example" {\n name = "example-tenant-configuration"\n namespace = "
|
|
1487
|
+
'resource "xcsh_tenant_configuration" "example" {\n name = "example-tenant-configuration"\n namespace = "system"\n}',
|
|
1489
1488
|
dependencies: {
|
|
1490
1489
|
requires: [],
|
|
1491
1490
|
},
|
|
@@ -1527,9 +1526,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1527
1526
|
usb_policy: {
|
|
1528
1527
|
category: "security",
|
|
1529
1528
|
description: "New USB policy object",
|
|
1530
|
-
required: ["name"
|
|
1529
|
+
required: ["name"],
|
|
1531
1530
|
minimal_config:
|
|
1532
|
-
'resource "xcsh_usb_policy" "example" {\n name = "example-usb-policy"\n namespace = "
|
|
1531
|
+
'resource "xcsh_usb_policy" "example" {\n name = "example-usb-policy"\n namespace = "system"\n}',
|
|
1533
1532
|
dependencies: {
|
|
1534
1533
|
requires: [],
|
|
1535
1534
|
},
|
|
@@ -1581,9 +1580,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1581
1580
|
virtual_network: {
|
|
1582
1581
|
category: "networking",
|
|
1583
1582
|
description: "Virtual network in given namespace",
|
|
1584
|
-
required: ["name", "
|
|
1583
|
+
required: ["name", "legacy_type"],
|
|
1585
1584
|
minimal_config:
|
|
1586
|
-
'resource "xcsh_virtual_network" "example" {\n name = "example-virtual-network"\n namespace = "
|
|
1585
|
+
'resource "xcsh_virtual_network" "example" {\n name = "example-virtual-network"\n namespace = "system"\n\n legacy_type = "VIRTUAL_NETWORK_SITE_LOCAL"\n}',
|
|
1587
1586
|
dependencies: {
|
|
1588
1587
|
requires: [],
|
|
1589
1588
|
},
|
|
@@ -1594,7 +1593,7 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1594
1593
|
description: "Virtual site object in given namespace",
|
|
1595
1594
|
required: ["name", "namespace", "site_type", "site_selector"],
|
|
1596
1595
|
minimal_config:
|
|
1597
|
-
'resource "xcsh_virtual_site" "example" {\n name = "example-virtual-site"\n namespace = "
|
|
1596
|
+
'resource "xcsh_virtual_site" "example" {\n name = "example-virtual-site"\n namespace = "system"\n\n site_type = "INVALID"\n}',
|
|
1598
1597
|
dependencies: {
|
|
1599
1598
|
requires: [],
|
|
1600
1599
|
},
|
|
@@ -1603,9 +1602,9 @@ export const TERRAFORM_INDEX: TerraformIndex = {
|
|
|
1603
1602
|
voltstack_site: {
|
|
1604
1603
|
category: "sites",
|
|
1605
1604
|
description: "Deploying Volterra stack sites for edge computing",
|
|
1606
|
-
required: ["name", "
|
|
1605
|
+
required: ["name", "address", "volterra_certified_hw"],
|
|
1607
1606
|
minimal_config:
|
|
1608
|
-
'resource "xcsh_voltstack_site" "example" {\n name = "example-voltstack-site"\n namespace = "
|
|
1607
|
+
'resource "xcsh_voltstack_site" "example" {\n name = "example-voltstack-site"\n namespace = "system"\n\n volterra_certified_hw = "example-value"\n worker_nodes = ["example-value"]\n address = "example-value"\n}',
|
|
1609
1608
|
dependencies: {
|
|
1610
1609
|
requires: [],
|
|
1611
1610
|
},
|
package/src/sdk.ts
CHANGED
|
@@ -31,7 +31,13 @@ import { loadCapability } from "./capability";
|
|
|
31
31
|
import { type Rule, ruleCapability } from "./capability/rule";
|
|
32
32
|
import { hasLiteLLMEnv } from "./config/auto-config";
|
|
33
33
|
import { ModelRegistry } from "./config/model-registry";
|
|
34
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
defaultModelPerProvider,
|
|
36
|
+
formatModelString,
|
|
37
|
+
parseModelPattern,
|
|
38
|
+
parseModelString,
|
|
39
|
+
resolveModelRoleValue,
|
|
40
|
+
} from "./config/model-resolver";
|
|
35
41
|
import { loadPromptTemplates as loadPromptTemplatesInternal, type PromptTemplate } from "./config/prompt-templates";
|
|
36
42
|
import { Settings, type SkillsSettings } from "./config/settings";
|
|
37
43
|
import { CursorExecHandlers } from "./cursor";
|
|
@@ -1296,8 +1302,26 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1296
1302
|
// Fall back to first available model with a valid API key.
|
|
1297
1303
|
// Skip fallback if the user explicitly requested a model via --model that wasn't found.
|
|
1298
1304
|
if (!model && !options.modelPattern) {
|
|
1299
|
-
|
|
1300
|
-
|
|
1305
|
+
// Scope automatic selection to providers the user has actually configured
|
|
1306
|
+
// in models.yml. This keeps a stray credential for an unconfigured provider
|
|
1307
|
+
// (e.g. an expired AWS_PROFILE that makes Bedrock look "authenticated") from
|
|
1308
|
+
// ever being selected, and stops us probing the entire bundled catalog. A
|
|
1309
|
+
// fresh install (nothing configured) falls straight through to /login guidance
|
|
1310
|
+
// instead of walking legacy catalog entries the proxy can't serve.
|
|
1311
|
+
const configuredProviders = modelRegistry.getConfiguredProviderIds();
|
|
1312
|
+
const candidates =
|
|
1313
|
+
configuredProviders.size > 0
|
|
1314
|
+
? modelRegistry.getAll().filter(candidate => configuredProviders.has(candidate.provider))
|
|
1315
|
+
: [];
|
|
1316
|
+
// Within a configured provider, prefer its designated default model over raw
|
|
1317
|
+
// catalog order (which begins at legacy ids like claude-3-5-sonnet-20240620).
|
|
1318
|
+
const isProviderDefault = (candidate: Model): boolean =>
|
|
1319
|
+
defaultModelPerProvider[candidate.provider as keyof typeof defaultModelPerProvider] === candidate.id;
|
|
1320
|
+
const orderedCandidates = [
|
|
1321
|
+
...candidates.filter(isProviderDefault),
|
|
1322
|
+
...candidates.filter(candidate => !isProviderDefault(candidate)),
|
|
1323
|
+
];
|
|
1324
|
+
for (const candidate of orderedCandidates) {
|
|
1301
1325
|
if (await hasModelApiKey(candidate)) {
|
|
1302
1326
|
model = candidate;
|
|
1303
1327
|
break;
|
|
@@ -2658,8 +2658,12 @@ export class AgentSession {
|
|
|
2658
2658
|
);
|
|
2659
2659
|
}
|
|
2660
2660
|
|
|
2661
|
-
// Validate API key
|
|
2662
|
-
|
|
2661
|
+
// Validate API key. Capture the guard-narrowed model into a local: TS narrowing
|
|
2662
|
+
// of the `this.model` getter does not persist into the ttftAttr closure below.
|
|
2663
|
+
const model = this.model;
|
|
2664
|
+
const apiKey = await logger.ttftAttr("ttft.getapikey", () =>
|
|
2665
|
+
this.#modelRegistry.getApiKey(model, this.sessionId),
|
|
2666
|
+
);
|
|
2663
2667
|
if (!apiKey) {
|
|
2664
2668
|
throw new Error(
|
|
2665
2669
|
`No API key found for ${this.model.provider}.\n\n` +
|
|
@@ -2674,20 +2678,23 @@ export class AgentSession {
|
|
|
2674
2678
|
}
|
|
2675
2679
|
|
|
2676
2680
|
// Build messages array (session context, eager todo prelude, then active prompt message)
|
|
2677
|
-
const messages: AgentMessage[] =
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2681
|
+
const messages: AgentMessage[] = await logger.ttftAttr("ttft.build-context", async () => {
|
|
2682
|
+
const built: AgentMessage[] = [];
|
|
2683
|
+
const planReferenceMessage = await this.#buildPlanReferenceMessage?.();
|
|
2684
|
+
if (planReferenceMessage) {
|
|
2685
|
+
built.push(planReferenceMessage);
|
|
2686
|
+
}
|
|
2687
|
+
const planModeMessage = await this.#buildPlanModeMessage();
|
|
2688
|
+
if (planModeMessage) {
|
|
2689
|
+
built.push(planModeMessage);
|
|
2690
|
+
}
|
|
2691
|
+
if (options?.prependMessages) {
|
|
2692
|
+
built.push(...options.prependMessages);
|
|
2693
|
+
}
|
|
2689
2694
|
|
|
2690
|
-
|
|
2695
|
+
built.push(message);
|
|
2696
|
+
return built;
|
|
2697
|
+
});
|
|
2691
2698
|
|
|
2692
2699
|
// Early bail-out: if a newer abort/prompt cycle started during setup,
|
|
2693
2700
|
// return before mutating shared state (nextTurn messages, system prompt).
|
|
@@ -2711,12 +2718,12 @@ export class AgentSession {
|
|
|
2711
2718
|
messages.push(...fileMentionMessages);
|
|
2712
2719
|
}
|
|
2713
2720
|
|
|
2714
|
-
// Emit before_agent_start extension event
|
|
2721
|
+
// Emit before_agent_start extension event. Capture the narrowed runner into a
|
|
2722
|
+
// local: the `this.#extensionRunner` guard does not narrow inside the closure.
|
|
2715
2723
|
if (this.#extensionRunner) {
|
|
2716
|
-
const
|
|
2717
|
-
|
|
2718
|
-
options?.images,
|
|
2719
|
-
this.#baseSystemPrompt,
|
|
2724
|
+
const runner = this.#extensionRunner;
|
|
2725
|
+
const result = await logger.ttftAttr("ttft.before-agent-start-hook", () =>
|
|
2726
|
+
runner.emitBeforeAgentStart(expandedText, options?.images, this.#baseSystemPrompt),
|
|
2720
2727
|
);
|
|
2721
2728
|
if (result?.messages) {
|
|
2722
2729
|
const promptAttribution: "user" | "agent" | undefined =
|
|
@@ -2747,7 +2754,9 @@ export class AgentSession {
|
|
|
2747
2754
|
}
|
|
2748
2755
|
|
|
2749
2756
|
const agentPromptOptions = options?.toolChoice ? { toolChoice: options.toolChoice } : undefined;
|
|
2750
|
-
await
|
|
2757
|
+
await logger.ttftAttr("ttft.agent-loop-total", () =>
|
|
2758
|
+
this.#promptAgentWithIdleRetry(messages, agentPromptOptions),
|
|
2759
|
+
);
|
|
2751
2760
|
if (!options?.skipPostPromptRecoveryWait) {
|
|
2752
2761
|
await this.#waitForPostPromptRecovery();
|
|
2753
2762
|
}
|