@f5-sales-demo/xcsh 23.3.3 → 23.4.0
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 +2 -0
- package/package.json +8 -8
- package/src/extensibility/custom-tools/types.ts +5 -0
- package/src/extensibility/extensions/types.ts +3 -0
- package/src/index.ts +6 -0
- package/src/integrations/setup.ts +8 -2
- package/src/internal-urls/api-catalog-index.generated.ts +25301 -25301
- package/src/internal-urls/api-catalog-qmd-index.generated.ts +2 -2
- package/src/internal-urls/api-catalog-resolve.ts +4 -0
- package/src/internal-urls/api-spec-index.generated.ts +1 -1
- package/src/internal-urls/api-spec-resolve.ts +7 -1
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/immutable-selection.ts +178 -0
- package/src/internal-urls/public-citation-destinations.generated.ts +1 -1
- package/src/internal-urls/terraform-documentation-assets.generated.ts +24 -24
- package/src/internal-urls/terraform-index.generated.ts +1 -1
- package/src/internal-urls/terraform-provider-pin.generated.ts +1 -1
- package/src/modes/components/plugin-lifecycle.ts +31 -0
- package/src/modes/components/plugin-view.ts +167 -0
- package/src/modes/components/tool-execution.ts +117 -164
- package/src/modes/interactive-mode.ts +3 -3
- package/src/modes/types.ts +2 -2
- package/src/modes/utils/ui-helpers.ts +16 -5
- package/src/prompts/tools/xcsh-api.md +2 -0
- package/src/slash-commands/builtin-registry.ts +67 -68
- package/src/tools/xcsh-api-renderer.ts +16 -0
- package/src/tools/xcsh-api-replacement.ts +524 -0
- package/src/tools/xcsh-api.ts +61 -0
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
|
+
- Added data-only plugin presentation descriptors, shared wrapped tables for tool and Markdown output, complete expanded fallback results, and themed plugin lifecycle messages with readable setup commands ([#4871](https://github.com/f5-sales-demo/xcsh/issues/4871)).
|
|
16
|
+
|
|
15
17
|
- Added shared host-aware software setup with live management probes, reviewed package-manager routes, checksum-verified per-user archives, and asynchronous CLI/TUI setup preparation ([#4598](https://github.com/f5-sales-demo/xcsh/issues/4598)).
|
|
16
18
|
|
|
17
19
|
- Refreshed generated internal LiteLLM configuration with seven current GPT-6/Claude models,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "23.
|
|
4
|
+
"version": "23.4.0",
|
|
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",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
71
|
-
"@f5-sales-demo/pi-agent-core": "23.
|
|
72
|
-
"@f5-sales-demo/pi-ai": "23.
|
|
73
|
-
"@f5-sales-demo/pi-natives": "23.
|
|
74
|
-
"@f5-sales-demo/pi-resource-management": "23.
|
|
75
|
-
"@f5-sales-demo/pi-tui": "23.
|
|
76
|
-
"@f5-sales-demo/pi-utils": "23.
|
|
77
|
-
"@f5-sales-demo/xcsh-stats": "23.
|
|
71
|
+
"@f5-sales-demo/pi-agent-core": "23.4.0",
|
|
72
|
+
"@f5-sales-demo/pi-ai": "23.4.0",
|
|
73
|
+
"@f5-sales-demo/pi-natives": "23.4.0",
|
|
74
|
+
"@f5-sales-demo/pi-resource-management": "23.4.0",
|
|
75
|
+
"@f5-sales-demo/pi-tui": "23.4.0",
|
|
76
|
+
"@f5-sales-demo/pi-utils": "23.4.0",
|
|
77
|
+
"@f5-sales-demo/xcsh-stats": "23.4.0",
|
|
78
78
|
"@mozilla/readability": "^0.6",
|
|
79
79
|
"@resvg/resvg-wasm": "2.6.2",
|
|
80
80
|
"@sinclair/typebox": "0.34.52",
|
|
@@ -206,6 +206,11 @@ export interface CustomTool<TParams extends TSchema = TSchema, TDetails = any> {
|
|
|
206
206
|
/** Called on session lifecycle events - use to reconstruct state or cleanup resources */
|
|
207
207
|
onSession?: (event: CustomToolSessionEvent, ctx: CustomToolContext) => void | Promise<void>;
|
|
208
208
|
/** Custom rendering for tool call display - return a Component */
|
|
209
|
+
presentation?: import("@f5-sales-demo/pi-agent-core").PluginPresentation<
|
|
210
|
+
Static<TParams>,
|
|
211
|
+
CustomToolResult<TDetails>
|
|
212
|
+
>;
|
|
213
|
+
|
|
209
214
|
renderCall?: (args: Static<TParams>, options: RenderResultOptions, theme: Theme) => Component;
|
|
210
215
|
|
|
211
216
|
/** Custom rendering for tool result display - return a Component */
|
|
@@ -342,6 +342,9 @@ export interface ToolDefinition<TParams extends TSchema = TSchema, TDetails = un
|
|
|
342
342
|
/** Called on session lifecycle events - use to reconstruct state or cleanup resources */
|
|
343
343
|
onSession?: (event: ToolSessionEvent, ctx: ExtensionContext) => void | Promise<void>;
|
|
344
344
|
|
|
345
|
+
/** Optional data-only presentation; plugins need no runtime renderer imports. */
|
|
346
|
+
presentation?: import("@f5-sales-demo/pi-agent-core").PluginPresentation<Static<TParams>, AgentToolResult<TDetails>>;
|
|
347
|
+
|
|
345
348
|
/** Custom rendering for tool call display */
|
|
346
349
|
renderCall?: (args: Static<TParams>, options: ToolRenderResultOptions, theme: Theme) => Component;
|
|
347
350
|
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,12 @@ import { HookEditorComponent, HookInputComponent, HookSelectorComponent } from "
|
|
|
3
3
|
|
|
4
4
|
// Core session management
|
|
5
5
|
|
|
6
|
+
export type {
|
|
7
|
+
PluginPresentation,
|
|
8
|
+
PluginPresentationOptions,
|
|
9
|
+
PluginSection,
|
|
10
|
+
PluginView,
|
|
11
|
+
} from "@f5-sales-demo/pi-agent-core";
|
|
6
12
|
// TypeBox helper for string enums (convenience for custom tools)
|
|
7
13
|
// Re-export from pi-ai which uses the correct enum-based schema format
|
|
8
14
|
export { StringEnum } from "@f5-sales-demo/pi-ai";
|
|
@@ -58,6 +58,11 @@ export function describeInstallSetupOutcome(
|
|
|
58
58
|
return `${summary}\nnext: ${nextAction}`;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/** Display exact argv as a copyable POSIX command; execution still uses the original array. */
|
|
62
|
+
export function formatSetupCommand(argv: readonly string[]): string {
|
|
63
|
+
return argv.map(arg => (/^[A-Za-z0-9_@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll("'", "'\\''")}'`)).join(" ");
|
|
64
|
+
}
|
|
65
|
+
|
|
61
66
|
export function describeSetupPlan(handle: IntegrationHandle<unknown>): string {
|
|
62
67
|
const plan = handle.setupPlan;
|
|
63
68
|
if (!plan) return `${handle.name}: no setup is declared.`;
|
|
@@ -74,10 +79,11 @@ export function describeSetupPlan(handle: IntegrationHandle<unknown>): string {
|
|
|
74
79
|
lines.push(
|
|
75
80
|
"Commands:",
|
|
76
81
|
...plan.steps.map(
|
|
77
|
-
step =>
|
|
82
|
+
step =>
|
|
83
|
+
` ${step.kind}: ${step.archive ? JSON.stringify(step.archive, null, 2) : formatSetupCommand(step.argv)} (timeout ${step.timeoutMs}ms)`,
|
|
78
84
|
),
|
|
79
85
|
"Verification:",
|
|
80
|
-
...plan.verification.map(step => ` ${
|
|
86
|
+
...plan.verification.map(step => ` ${formatSetupCommand(step.argv)} (timeout ${step.timeoutMs}ms)`),
|
|
81
87
|
);
|
|
82
88
|
}
|
|
83
89
|
return lines.join("\n");
|