Add provider/model selection for schedules and workspace fetch debug logging

- Unify resolveProviderAndModel across CLI and server, supporting
  provider/model syntax (e.g. codex/gpt-5.4) for agent runs and schedules
- Add --provider flag to schedule create CLI and both MCP schedule tools
- Add structured debug logging to workspace fetch hydrate, sidebar
  refresh, and real-time update paths
- Update orchestrate skill references
This commit is contained in:
Mohamed Boudra
2026-04-14 14:42:10 +07:00
parent 202fa3e8f3
commit dd6a396dbf
17 changed files with 1209 additions and 161 deletions
@@ -23,6 +23,11 @@ try {
const createdJson = JSON.parse(created.stdout);
assert.strictEqual(createdJson.name, "review-prs");
assert.strictEqual(createdJson.cadence, "every:5m");
assert(
typeof createdJson.target === "string" &&
(createdJson.target.startsWith("agent:") || createdJson.target === "new-agent:claude"),
created.stdout,
);
const listed = await ctx.paseo(["schedule", "ls", "--json"]);
assert.strictEqual(listed.exitCode, 0, listed.stderr);
@@ -53,6 +58,61 @@ try {
console.log("schedule commands work\n");
}
{
console.log("Test 1b: schedule create accepts provider/model syntax for new-agent runs");
const created = await ctx.paseo(
[
"schedule",
"create",
"Refactor the API layer",
"--every",
"10m",
"--provider",
"codex/gpt-5.4",
"--json",
],
{ timeout: 30000 },
);
assert.strictEqual(created.exitCode, 0, created.stderr);
const createdJson = JSON.parse(created.stdout);
assert.strictEqual(createdJson.target, "new-agent:codex/gpt-5.4");
const inspected = await ctx.paseo(["schedule", "inspect", createdJson.id, "--json"]);
assert.strictEqual(inspected.exitCode, 0, inspected.stderr);
const inspectedJson = JSON.parse(inspected.stdout);
assert.strictEqual(inspectedJson.target.config.provider, "codex");
assert.strictEqual(inspectedJson.target.config.model, "gpt-5.4");
const deleted = await ctx.paseo(["schedule", "delete", createdJson.id, "--json"]);
assert.strictEqual(deleted.exitCode, 0, deleted.stderr);
console.log("schedule provider/model syntax works\n");
}
{
console.log("Test 1c: schedule create rejects provider with self target");
const result = await ctx.paseo(
[
"schedule",
"create",
"Conflicting schedule",
"--every",
"5m",
"--target",
"self",
"--provider",
"codex/gpt-5.4",
],
{ timeout: 30000 },
);
assert.notStrictEqual(result.exitCode, 0, "should fail for self target with provider");
const output = result.stdout + result.stderr;
assert(
output.includes("--provider can only be used with a new-agent target"),
"should explain provider target mismatch",
);
console.log("schedule rejects provider with self target\n");
}
{
console.log("Test 2: loop run/ls/inspect/logs/stop work");
const run = await ctx.paseo(