Adapt Paseo Agent to rebased main

Main replaced AgentClient.listModels/listModes with a single required
fetchCatalog(); migrate PaseoAgentClient to it. Regenerate the lockfile so
the @earendil-works/pi-* deps are present (rebase conflicts took main's
lockfile at each step).
This commit is contained in:
Mohamed Boudra
2026-07-02 08:39:06 +02:00
parent 96067da1d3
commit 341af162b0
2 changed files with 18 additions and 11 deletions
@@ -208,7 +208,11 @@ describe("PaseoAgentClient", () => {
it("lists only configured models, never Pi disk/default models", async () => {
const client = new PaseoAgentClient({ logger: createTestLogger(), config: makeConfig() });
const models = await client.listModels({ cwd: process.cwd(), force: false });
const { models } = await client.fetchCatalog({
scope: "workspace",
cwd: process.cwd(),
force: false,
});
expect(models.map((m) => m.id)).toEqual(["openrouter-main/test-model"]);
expect(models[0]?.isDefault).toBe(true);
});
@@ -358,7 +362,12 @@ Profile prompt.
});
const client = new PaseoAgentClient({ logger: createTestLogger(), config, paseoHome });
await expect(client.listModes({ cwd: process.cwd(), force: false })).resolves.toEqual([
const { modes } = await client.fetchCatalog({
scope: "workspace",
cwd: process.cwd(),
force: false,
});
expect(modes).toEqual([
{ id: "builder", label: "Builder" },
{ id: "reviewer", label: "reviewer" },
]);
@@ -10,7 +10,6 @@ import {
type AgentClient,
type AgentLaunchContext,
type AgentMode,
type AgentModelDefinition,
type AgentPermissionRequest,
type AgentPermissionResponse,
type AgentPersistenceHandle,
@@ -22,8 +21,8 @@ import {
type AgentSessionConfig,
type AgentSlashCommand,
type AgentStreamEvent,
type ListModesOptions,
type ListModelsOptions,
type FetchCatalogOptions,
type ProviderCatalog,
} from "../../agent-sdk-types.js";
import { appendOrReplaceGrowingAssistantMessage, runProviderTurn } from "../provider-runner.js";
import {
@@ -604,12 +603,11 @@ export class PaseoAgentClient implements AgentClient {
throw new Error("Paseo Agent does not support session resume in this prototype");
}
async listModels(_options: ListModelsOptions): Promise<AgentModelDefinition[]> {
return listPaseoAgentModels(this.config);
}
async listModes(_options: ListModesOptions): Promise<AgentMode[]> {
return this.loadAvailableAgentModes();
async fetchCatalog(_options: FetchCatalogOptions): Promise<ProviderCatalog> {
return {
models: listPaseoAgentModels(this.config),
modes: await this.loadAvailableAgentModes(),
};
}
async isAvailable(): Promise<boolean> {