mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Switch to double quotes and reformat codebase with Biome
This commit is contained in:
@@ -1,43 +1,50 @@
|
||||
import { createE2ETestContext } from '../helpers/test-daemon.ts'
|
||||
import { createE2ETestContext } from "../helpers/test-daemon.ts";
|
||||
|
||||
const schema = JSON.stringify({
|
||||
type: 'object',
|
||||
properties: { summary: { type: 'string' } },
|
||||
required: ['summary'],
|
||||
type: "object",
|
||||
properties: { summary: { type: "string" } },
|
||||
required: ["summary"],
|
||||
additionalProperties: false,
|
||||
})
|
||||
});
|
||||
|
||||
async function main() {
|
||||
const ctx = await createE2ETestContext({ timeout: 180000 })
|
||||
const ctx = await createE2ETestContext({ timeout: 180000 });
|
||||
try {
|
||||
const run = await ctx.paseo([
|
||||
'run',
|
||||
'--provider','opencode',
|
||||
'--mode','default',
|
||||
'--model','opencode/kimi-k2.5-free',
|
||||
'--output-schema', schema,
|
||||
'Return valid JSON with a short summary for provider opencode.'
|
||||
], { timeout: 180000 })
|
||||
console.log('RUN EXIT', run.exitCode)
|
||||
console.log('RUN STDOUT\n' + run.stdout)
|
||||
console.log('RUN STDERR\n' + run.stderr)
|
||||
const run = await ctx.paseo(
|
||||
[
|
||||
"run",
|
||||
"--provider",
|
||||
"opencode",
|
||||
"--mode",
|
||||
"default",
|
||||
"--model",
|
||||
"opencode/kimi-k2.5-free",
|
||||
"--output-schema",
|
||||
schema,
|
||||
"Return valid JSON with a short summary for provider opencode.",
|
||||
],
|
||||
{ timeout: 180000 },
|
||||
);
|
||||
console.log("RUN EXIT", run.exitCode);
|
||||
console.log("RUN STDOUT\n" + run.stdout);
|
||||
console.log("RUN STDERR\n" + run.stderr);
|
||||
|
||||
const ls = await ctx.paseo(['ls','--json'])
|
||||
console.log('LS\n' + ls.stdout)
|
||||
const agents = JSON.parse(ls.stdout)
|
||||
const agentId = agents[0]?.id
|
||||
const ls = await ctx.paseo(["ls", "--json"]);
|
||||
console.log("LS\n" + ls.stdout);
|
||||
const agents = JSON.parse(ls.stdout);
|
||||
const agentId = agents[0]?.id;
|
||||
if (agentId) {
|
||||
const inspect = await ctx.paseo(['inspect', agentId])
|
||||
console.log('INSPECT\n' + inspect.stdout)
|
||||
const logs = await ctx.paseo(['logs','--tail','100', agentId], { timeout: 30000 })
|
||||
console.log('LOGS\n' + logs.stdout)
|
||||
const inspect = await ctx.paseo(["inspect", agentId]);
|
||||
console.log("INSPECT\n" + inspect.stdout);
|
||||
const logs = await ctx.paseo(["logs", "--tail", "100", agentId], { timeout: 30000 });
|
||||
console.log("LOGS\n" + logs.stdout);
|
||||
}
|
||||
} finally {
|
||||
await ctx.stop()
|
||||
await ctx.stop();
|
||||
}
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(error)
|
||||
process.exitCode = 1
|
||||
})
|
||||
console.error(error);
|
||||
process.exitCode = 1;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user