Help agents diagnose Paseo provider problems (#3243)

* feat(skills): add Paseo help and provider diagnostics

Give support agents a topology-aware troubleshooting entry point backed by the deployed documentation index, and expose the daemon provider diagnostic through the CLI so agents can inspect the affected host directly. Agent-launching skills now use configured profiles instead of the removed orchestration preferences.

* test(cli): keep provider diagnostics on real boundaries

Remove the internal client mock and preserve its normalization and host-targeting assertions through the existing isolated-daemon coverage.
This commit is contained in:
Mohamed Boudra
2026-08-12 00:57:33 +02:00
committed by GitHub
parent 5f5c585e68
commit d012b6f071
10 changed files with 239 additions and 78 deletions
@@ -0,0 +1,45 @@
import type { Command } from "commander";
import { connectToDaemon } from "../../utils/client.js";
import type { CommandOptions, OutputSchema, SingleResult } from "../../output/index.js";
export interface ProviderDiagnosticResult {
provider: string;
diagnostic: string;
}
export const providerDiagnosticSchema: OutputSchema<ProviderDiagnosticResult> = {
idField: "provider",
columns: [
{ header: "PROVIDER", field: "provider" },
{ header: "DIAGNOSTIC", field: "diagnostic" },
],
renderHuman(result) {
if (result.type === "single") return result.data.diagnostic;
return result.data.map((entry) => entry.diagnostic).join("\n\n");
},
};
export interface ProviderDiagnosticOptions extends CommandOptions {
host?: string;
}
export async function runDiagnosticCommand(
provider: string,
options: ProviderDiagnosticOptions,
_command: Command,
): Promise<SingleResult<ProviderDiagnosticResult>> {
const client = await connectToDaemon({ host: options.host });
try {
const result = await client.getProviderDiagnostic(provider.trim().toLowerCase());
return {
type: "single",
data: {
provider: result.provider,
diagnostic: result.diagnostic,
},
schema: providerDiagnosticSchema,
};
} finally {
await client.close();
}
}
@@ -1,6 +1,7 @@
import { Command } from "commander";
import { runLsCommand } from "./ls.js";
import { runModelsCommand } from "./models.js";
import { runDiagnosticCommand } from "./diagnostic.js";
import { withOutput } from "../../output/index.js";
import { addJsonAndDaemonHostOptions } from "../../utils/command-options.js";
@@ -19,5 +20,12 @@ export function createProviderCommand(): Command {
.option("--thinking", "Include thinking option IDs for each model"),
).action(withOutput(runModelsCommand));
addJsonAndDaemonHostOptions(
provider
.command("diagnostic")
.description("Show provider installation, environment, and availability diagnostics")
.argument("<provider>", "Provider name"),
).action(withOutput(runDiagnosticCommand));
return provider;
}