@f5-sales-demo/xcsh 22.2.1 → 22.3.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 +3 -0
- package/package.json +8 -8
- package/src/cli/plugin-cli.ts +17 -7
- package/src/cli/update-recommendation.ts +1 -7
- package/src/internal-urls/api-catalog-qmd-index.generated.ts +2 -2
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/documentation-repository.ts +5 -1
- package/src/internal-urls/documentation-resolve.ts +1 -1
- package/src/internal-urls/documentation-snapshot.ts +28 -1
- package/src/internal-urls/knowledge-classifier.ts +19 -5
- package/src/modes/components/model-selector.ts +148 -40
- package/src/modes/controllers/model-selection.ts +35 -4
- package/src/prompts/rules/llms-search.md +3 -1
- package/src/prompts/system/system-prompt.md +2 -0
- package/src/qmd-smoke.ts +58 -15
package/CHANGELOG.md
CHANGED
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
|
|
43
43
|
### Changed
|
|
44
44
|
|
|
45
|
+
- Allowed explicit `xcsh plugin setup <plugin> --force` runs to refresh dynamic setup plans even
|
|
46
|
+
when the current integration receipt is already ready ([#4516](https://github.com/f5-sales-demo/xcsh/issues/4516)).
|
|
47
|
+
|
|
45
48
|
- Made standalone executable and schema-v2 receipt updates transactional, canonicalized receipt paths,
|
|
46
49
|
removed unused adjacent native payloads from standalone installs, and added published installer
|
|
47
50
|
qualification on Linux, macOS, and Windows ([#4510](https://github.com/f5-sales-demo/xcsh/issues/4510)).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "22.
|
|
4
|
+
"version": "22.3.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",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
70
|
-
"@f5-sales-demo/pi-agent-core": "22.
|
|
71
|
-
"@f5-sales-demo/pi-ai": "22.
|
|
72
|
-
"@f5-sales-demo/pi-natives": "22.
|
|
73
|
-
"@f5-sales-demo/pi-resource-management": "22.
|
|
74
|
-
"@f5-sales-demo/pi-tui": "22.
|
|
75
|
-
"@f5-sales-demo/pi-utils": "22.
|
|
76
|
-
"@f5-sales-demo/xcsh-stats": "22.
|
|
70
|
+
"@f5-sales-demo/pi-agent-core": "22.3.1",
|
|
71
|
+
"@f5-sales-demo/pi-ai": "22.3.1",
|
|
72
|
+
"@f5-sales-demo/pi-natives": "22.3.1",
|
|
73
|
+
"@f5-sales-demo/pi-resource-management": "22.3.1",
|
|
74
|
+
"@f5-sales-demo/pi-tui": "22.3.1",
|
|
75
|
+
"@f5-sales-demo/pi-utils": "22.3.1",
|
|
76
|
+
"@f5-sales-demo/xcsh-stats": "22.3.1",
|
|
77
77
|
"@mozilla/readability": "^0.6",
|
|
78
78
|
"@resvg/resvg-wasm": "2.6.2",
|
|
79
79
|
"@sinclair/typebox": "0.34.52",
|
package/src/cli/plugin-cli.ts
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
executeInstallAuthorizedSetup,
|
|
29
29
|
executeReviewedSetup,
|
|
30
30
|
} from "../integrations/setup";
|
|
31
|
-
import type { IntegrationHandle } from "../integrations/types";
|
|
31
|
+
import type { IntegrationHandle, IntegrationState } from "../integrations/types";
|
|
32
32
|
import { theme } from "../modes/theme/theme";
|
|
33
33
|
import { personProfileService } from "../person-profile/service";
|
|
34
34
|
import { ContextError, ContextService, type XCSHContext } from "../services/xcsh-context";
|
|
@@ -336,11 +336,18 @@ async function handleIntegrationStatus(args: string[], flags: { json?: boolean;
|
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
export
|
|
339
|
+
export function shouldSkipIntegrationSetup(state: IntegrationState, force = false): boolean {
|
|
340
|
+
return state === "ready" && !force;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export async function reviewAndExecuteIntegrationSetup(
|
|
344
|
+
handle: IntegrationHandle<unknown>,
|
|
345
|
+
options: { force?: boolean } = {},
|
|
346
|
+
) {
|
|
340
347
|
const plan = handle.setupPlan;
|
|
341
348
|
if (!plan) throw new Error(`Integration ${handle.id} does not declare setup`);
|
|
342
349
|
const current = await handle.get();
|
|
343
|
-
if (current.state
|
|
350
|
+
if (shouldSkipIntegrationSetup(current.state, options.force)) return current;
|
|
344
351
|
if (plan.guidedAction?.kind === "context_wizard")
|
|
345
352
|
throw new Error(
|
|
346
353
|
`Plugin ${handle.plugin ?? handle.id} setup requires interactive xcsh; run /plugin setup ${handle.plugin ?? handle.id} in the xcsh TUI.`,
|
|
@@ -358,19 +365,22 @@ export async function reviewAndExecuteIntegrationSetup(handle: IntegrationHandle
|
|
|
358
365
|
return result;
|
|
359
366
|
}
|
|
360
367
|
|
|
361
|
-
async function handleIntegrationSetup(
|
|
368
|
+
async function handleIntegrationSetup(
|
|
369
|
+
args: string[],
|
|
370
|
+
flags: { json?: boolean; context?: string; force?: boolean },
|
|
371
|
+
): Promise<void> {
|
|
362
372
|
if (flags.json) throw new CliUsageError("plugin setup is human-only and does not accept --json");
|
|
363
|
-
if (args.length !== 1) throw new Error(`Usage: ${APP_NAME} plugin setup <plugin> [--context <name>]`);
|
|
373
|
+
if (args.length !== 1) throw new Error(`Usage: ${APP_NAME} plugin setup <plugin> [--context <name>] [--force]`);
|
|
364
374
|
if (!process.stdin.isTTY || !process.stdout.isTTY) throw new Error("Plugin setup requires an interactive terminal");
|
|
365
375
|
const handles = await loadIntegrationHandles();
|
|
366
376
|
await withPluginContext(flags.context, async () => {
|
|
367
377
|
const handle = selectSetupIntegration(handles, args[0]);
|
|
368
378
|
const current = await handle.get();
|
|
369
|
-
if (current.state
|
|
379
|
+
if (shouldSkipIntegrationSetup(current.state, flags.force)) {
|
|
370
380
|
process.stdout.write(`${handle.plugin ?? handle.id}: ready (setup is not required)\n`);
|
|
371
381
|
return;
|
|
372
382
|
}
|
|
373
|
-
const result = await reviewAndExecuteIntegrationSetup(handle);
|
|
383
|
+
const result = await reviewAndExecuteIntegrationSetup(handle, { force: flags.force });
|
|
374
384
|
process.stdout.write(
|
|
375
385
|
`${handle.plugin ?? handle.id}: ${result.state}${result.reason ? ` (${result.reason})` : ""}\n`,
|
|
376
386
|
);
|
|
@@ -119,13 +119,7 @@ function receiptIsValid(
|
|
|
119
119
|
return false;
|
|
120
120
|
}
|
|
121
121
|
if (receipt.channel === "standalone") return deps.platform !== "win32";
|
|
122
|
-
|
|
123
|
-
const localAppData = deps.env.LOCALAPPDATA;
|
|
124
|
-
if (!localAppData) return false;
|
|
125
|
-
return (
|
|
126
|
-
comparablePath(resolvedExecPath, deps.platform) ===
|
|
127
|
-
comparablePath(path.win32.join(localAppData, "xcsh", "xcsh.exe"), deps.platform)
|
|
128
|
-
);
|
|
122
|
+
return deps.platform === "win32";
|
|
129
123
|
}
|
|
130
124
|
|
|
131
125
|
async function defaultRun(command: string, args: string[]): Promise<CommandResult> {
|