@kw-yeh/vibeflow 4.8.0 → 4.9.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/dist/vibeflow.mjs CHANGED
@@ -621,22 +621,25 @@ function assembleCommand(agent, systemPrompt, prompt, model, effort, opts, workt
621
621
  const combined = [systemPrompt, prompt].filter(Boolean).join("\n\n");
622
622
  const codexEffortFlag = effort ? `-c ${shellQuote(`model_reasoning_effort="${effort}"`)} ` : "";
623
623
  const codexHome = opts?.library ? `CODEX_HOME=${shellQuote(toShellPath(opts.library.codexHome))} ` : "";
624
- const promptArg = combined ? ` ${shellQuote(combined)}` : "";
625
- cmd = `${codexHome}codex ${codexAutoFlag(opts?.autoMode)}${codexEffortFlag}--model ${model}${promptArg}\r`;
624
+ const args = [
625
+ codexAutoFlag(opts?.autoMode).trim(),
626
+ codexEffortFlag.trim(),
627
+ model ? `--model ${model}` : "",
628
+ combined ? shellQuote(combined) : ""
629
+ ].filter(Boolean);
630
+ cmd = `${codexHome}${["codex", ...args].join(" ")}\r`;
626
631
  }
627
632
  if (cmd.length > 2e5) console.warn(`[VibeFlow] launch command is ${cmd.length} bytes \u2014 approaching ARG_MAX`);
628
633
  return cmd;
629
634
  }
630
- function normalizeModel(agent, model) {
631
- return LEGACY_MODEL_FALLBACKS[agent]?.[model] ?? model;
632
- }
633
635
  function taskAgent(task) {
634
636
  const agent = task.agentCli;
635
637
  return agent && agent in AGENT_NAMES ? agent : "claude";
636
638
  }
637
639
  function taskModel(task) {
638
- const agent = taskAgent(task);
639
- return normalizeModel(agent, task.model || DEFAULT_MODELS[agent]);
640
+ const model = task.model?.trim();
641
+ if (!model || RETIRED_MODELS[taskAgent(task)]?.includes(model)) return void 0;
642
+ return model;
640
643
  }
641
644
  function buildAgentCommand(task, systemPrompt, opts, workspacePath) {
642
645
  const agent = taskAgent(task);
@@ -661,7 +664,7 @@ function buildAgentCommand(task, systemPrompt, opts, workspacePath) {
661
664
  workspacePath
662
665
  );
663
666
  }
664
- var ARTIFACTS_DIR_SUFFIX, SCRATCH_DIR_NAME, ARTIFACTS_FALLBACK_DIR, AUTO_PERMISSION_MODE, SUBAGENTS_DIR2, PROGRESS_EVENTS_DIR, TODO_TOOLS, AGENT_NAMES, DEFAULT_MODELS, LEGACY_MODEL_FALLBACKS;
667
+ var ARTIFACTS_DIR_SUFFIX, SCRATCH_DIR_NAME, ARTIFACTS_FALLBACK_DIR, AUTO_PERMISSION_MODE, SUBAGENTS_DIR2, PROGRESS_EVENTS_DIR, TODO_TOOLS, AGENT_NAMES, RETIRED_MODELS;
665
668
  var init_launch = __esm({
666
669
  "packages/core/src/launch.ts"() {
667
670
  "use strict";
@@ -676,15 +679,8 @@ var init_launch = __esm({
676
679
  claude: "Claude Code",
677
680
  codex: "Codex CLI"
678
681
  };
679
- DEFAULT_MODELS = {
680
- claude: "sonnet",
681
- codex: "gpt-5.5"
682
- };
683
- LEGACY_MODEL_FALLBACKS = {
684
- codex: {
685
- "gpt-5-codex": "gpt-5.5",
686
- "gpt-5": "gpt-5.5"
687
- }
682
+ RETIRED_MODELS = {
683
+ codex: ["gpt-5-codex", "gpt-5"]
688
684
  };
689
685
  }
690
686
  });
@@ -790,6 +786,9 @@ var init_attachments = __esm({
790
786
  });
791
787
 
792
788
  // packages/core/src/effort.ts
789
+ function modelFor(models, modelId) {
790
+ return modelId ? models?.find((m) => m.id === modelId) : models?.find((m) => m.isDefault);
791
+ }
793
792
  function isAgentEffort(value) {
794
793
  return typeof value === "string" && AGENT_EFFORTS.includes(value);
795
794
  }
@@ -1174,8 +1173,7 @@ function modelOptions(ctx, agentCli, current) {
1174
1173
  return options;
1175
1174
  }
1176
1175
  function effortOptions(ctx, agentCli, model) {
1177
- const id = taskModel({ agentCli, model });
1178
- return selectableEfforts(ctx.models[agentCli]?.find((m) => m.id === id));
1176
+ return selectableEfforts(modelFor(ctx.models[agentCli], taskModel({ agentCli, model })));
1179
1177
  }
1180
1178
  function fitEffort(ctx, s) {
1181
1179
  const effort = clampEffort(s.effort, effortOptions(ctx, s.agentCli, s.model)) ?? s.effort;
@@ -1417,7 +1415,8 @@ function FormView({ api, ctx, initial, initialFocus, initialMessage, pristine, o
1417
1415
  case "model": {
1418
1416
  if (modelOptions(ctx, s.agentCli, s.model).length <= 1) return "\u7121\u6CD5\u53D6\u5F97 model list\uFF0C\u5C07\u4F7F\u7528\u9810\u8A2D model";
1419
1417
  const listed = ctx.models[s.agentCli]?.find((m) => m.id === s.model);
1420
- return `\u2039 ${s.model ? listed?.label ?? s.model : "\u4F7F\u7528\u9810\u8A2D model"} \u203A`;
1418
+ const fallback = ctx.models[s.agentCli]?.find((m) => m.isDefault)?.label;
1419
+ return `\u2039 ${s.model ? listed?.label ?? s.model : fallback ? `\u4F7F\u7528\u9810\u8A2D model\uFF08${fallback}\uFF09` : "\u4F7F\u7528\u9810\u8A2D model"} \u203A`;
1421
1420
  }
1422
1421
  case "submit":
1423
1422
  return busy ?? (s.mode === "new" ? "\uFF3B \u5EFA\u7ACB\u4EFB\u52D9 \uFF3D" : "\uFF3B \u5132\u5B58\u8B8A\u66F4 \uFF3D");
@@ -3058,16 +3057,17 @@ async function listPrs(run3, repo, filter) {
3058
3057
  return rows.map((r) => toPr(r, repo));
3059
3058
  }
3060
3059
  async function fetchRepoItems(run3, repo) {
3061
- const [assignedIssues, authoredIssues, assignedPrs, authoredPrs, reviewPrs] = await Promise.all([
3060
+ const [assignedIssues, authoredIssues, assignedPrs, authoredPrs, reviewPrs, reviewedPrs] = await Promise.all([
3062
3061
  listIssues(run3, repo, ["--assignee", "@me"]),
3063
3062
  listIssues(run3, repo, ["--author", "@me"]),
3064
3063
  listPrs(run3, repo, ["--assignee", "@me"]),
3065
3064
  listPrs(run3, repo, ["--author", "@me"]),
3066
- listPrs(run3, repo, ["--search", "review-requested:@me"])
3065
+ listPrs(run3, repo, ["--search", "review-requested:@me"]),
3066
+ listPrs(run3, repo, ["--search", "reviewed-by:@me"])
3067
3067
  ]);
3068
3068
  return {
3069
3069
  issues: mergeItems([assignedIssues, authoredIssues]),
3070
- prs: mergeItems([assignedPrs, authoredPrs, reviewPrs])
3070
+ prs: mergeItems([assignedPrs, authoredPrs, reviewPrs, reviewedPrs])
3071
3071
  };
3072
3072
  }
3073
3073
  async function fetchPrIndex(run3, repo) {
@@ -4210,7 +4210,7 @@ var AGENT_CLIS = [
4210
4210
  bin: "claude",
4211
4211
  name: "Claude Code",
4212
4212
  models: [
4213
- { id: "sonnet", label: "Sonnet\uFF08\u5E73\u8861\u30FB\u9810\u8A2D\uFF09" },
4213
+ { id: "sonnet", label: "Sonnet\uFF08\u5E73\u8861\uFF09" },
4214
4214
  { id: "haiku", label: "Haiku\uFF08\u8F15\u91CF\uFF09" },
4215
4215
  { id: "opus", label: "Opus\uFF08\u6700\u5F37\uFF09" }
4216
4216
  ]
@@ -4220,7 +4220,7 @@ var AGENT_CLIS = [
4220
4220
  bin: "codex",
4221
4221
  name: "Codex CLI",
4222
4222
  models: [
4223
- { id: "gpt-5.5", label: "GPT-5.5\uFF08\u9810\u8A2D\uFF09" },
4223
+ { id: "gpt-5.5", label: "GPT-5.5" },
4224
4224
  { id: "gpt-5.4", label: "GPT-5.4" },
4225
4225
  { id: "gpt-5.4-mini", label: "GPT-5.4 Mini" }
4226
4226
  ]
@@ -5267,6 +5267,9 @@ function parseClaudeInitialize(message) {
5267
5267
  if (outer?.subtype === "error") throw new Error(`claude refused the handshake: ${String(outer.error ?? "unknown error")}`);
5268
5268
  const body = outer && isRecord(outer.response) ? outer.response : null;
5269
5269
  if (!body || !Array.isArray(body.models)) throw new Error("claude handshake has no models array");
5270
+ const defaultEntry = body.models.find((e) => isRecord(e) && e.value === "default");
5271
+ const defaultResolved = isRecord(defaultEntry) && typeof defaultEntry.resolvedModel === "string" ? defaultEntry.resolvedModel : void 0;
5272
+ let defaultMarked = false;
5270
5273
  const seen = /* @__PURE__ */ new Set();
5271
5274
  const models = [];
5272
5275
  for (const entry of body.models) {
@@ -5277,7 +5280,9 @@ function parseClaudeInitialize(message) {
5277
5280
  const label = typeof entry.displayName === "string" && entry.displayName.trim() ? entry.displayName.trim() : id;
5278
5281
  const description = typeof entry.description === "string" && entry.description.trim() ? entry.description.trim() : void 0;
5279
5282
  const levels = entry.supportsEffort === true && Array.isArray(entry.supportedEffortLevels) ? entry.supportedEffortLevels.filter(isAgentEffort) : [];
5280
- models.push({ id, label, ...description ? { description } : {}, efforts: levels });
5283
+ const isDefault = !defaultMarked && defaultResolved !== void 0 && entry.resolvedModel === defaultResolved;
5284
+ if (isDefault) defaultMarked = true;
5285
+ models.push({ id, label, ...description ? { description } : {}, efforts: levels, ...isDefault ? { isDefault } : {} });
5281
5286
  }
5282
5287
  if (models.length === 0) throw new Error("claude handshake lists no selectable models");
5283
5288
  return models;
@@ -5338,7 +5343,13 @@ function parseCodexModelPage(result) {
5338
5343
  const label = typeof entry.displayName === "string" && entry.displayName.trim() ? entry.displayName.trim() : id;
5339
5344
  const description = typeof entry.description === "string" && entry.description.trim() ? entry.description.trim() : void 0;
5340
5345
  const efforts = Array.isArray(entry.supportedReasoningEfforts) ? entry.supportedReasoningEfforts.map((e) => isRecord2(e) ? e.reasoningEffort : void 0).filter(isAgentEffort) : void 0;
5341
- models.push({ id, label, ...description ? { description } : {}, ...efforts ? { efforts } : {} });
5346
+ models.push({
5347
+ id,
5348
+ label,
5349
+ ...description ? { description } : {},
5350
+ ...efforts ? { efforts } : {},
5351
+ ...entry.isDefault === true ? { isDefault: true } : {}
5352
+ });
5342
5353
  }
5343
5354
  const nextCursor = typeof result.nextCursor === "string" && result.nextCursor ? result.nextCursor : null;
5344
5355
  return { models, nextCursor };
@@ -5385,6 +5396,7 @@ async function fetchCodexModels(clientVersion, open = openCodex) {
5385
5396
  }
5386
5397
 
5387
5398
  // packages/core/src/agent-models.ts
5399
+ init_effort();
5388
5400
  function builtinModels(id) {
5389
5401
  return (AGENT_CLIS.find((a) => a.id === id) ?? AGENT_CLIS[0]).models;
5390
5402
  }
@@ -5470,7 +5482,7 @@ function createModelCatalog(opts) {
5470
5482
  for (const agent of AGENT_CLIS) void refresh(agent.id);
5471
5483
  },
5472
5484
  findModel(id, modelId) {
5473
- return settled.get(id)?.models.find((model) => model.id === modelId);
5485
+ return modelFor(settled.get(id)?.models, modelId);
5474
5486
  }
5475
5487
  };
5476
5488
  }
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><link rel="icon" href="/favicon.ico" sizes="any" data-next-head=""/><link rel="icon" href="/logo.svg" type="image/svg+xml" data-next-head=""/><link rel="apple-touch-icon" href="/apple-touch-icon.png" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/0e63f58e447f85ed.css" as="style"/><link rel="stylesheet" href="/_next/static/css/0e63f58e447f85ed.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-c8aa5df0425f6b7b.js" defer=""></script><script src="/_next/static/chunks/framework-b92a367cf1ad4bf7.js" defer=""></script><script src="/_next/static/chunks/main-ec7fd4c371d06729.js" defer=""></script><script src="/_next/static/chunks/pages/_app-496c474d7f14dd07.js" defer=""></script><script src="/_next/static/chunks/pages/_error-8f65b0f8749f42d2.js" defer=""></script><script src="/_next/static/MCpYTSYna3Ll-2lXwbETR/_buildManifest.js" defer=""></script><script src="/_next/static/MCpYTSYna3Ll-2lXwbETR/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"MCpYTSYna3Ll-2lXwbETR","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><link rel="icon" href="/favicon.ico" sizes="any" data-next-head=""/><link rel="icon" href="/logo.svg" type="image/svg+xml" data-next-head=""/><link rel="apple-touch-icon" href="/apple-touch-icon.png" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/c1491b2feaf90c67.css" as="style"/><link rel="stylesheet" href="/_next/static/css/c1491b2feaf90c67.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-c8aa5df0425f6b7b.js" defer=""></script><script src="/_next/static/chunks/framework-b92a367cf1ad4bf7.js" defer=""></script><script src="/_next/static/chunks/main-ec7fd4c371d06729.js" defer=""></script><script src="/_next/static/chunks/pages/_app-496c474d7f14dd07.js" defer=""></script><script src="/_next/static/chunks/pages/_error-8f65b0f8749f42d2.js" defer=""></script><script src="/_next/static/zd9N4vIppSGgwT--n88P6/_buildManifest.js" defer=""></script><script src="/_next/static/zd9N4vIppSGgwT--n88P6/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"zd9N4vIppSGgwT--n88P6","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
package/dist/web/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><link rel="icon" href="/favicon.ico" sizes="any" data-next-head=""/><link rel="icon" href="/logo.svg" type="image/svg+xml" data-next-head=""/><link rel="apple-touch-icon" href="/apple-touch-icon.png" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/0e63f58e447f85ed.css" as="style"/><link rel="stylesheet" href="/_next/static/css/0e63f58e447f85ed.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-c8aa5df0425f6b7b.js" defer=""></script><script src="/_next/static/chunks/framework-b92a367cf1ad4bf7.js" defer=""></script><script src="/_next/static/chunks/main-ec7fd4c371d06729.js" defer=""></script><script src="/_next/static/chunks/pages/_app-496c474d7f14dd07.js" defer=""></script><script src="/_next/static/chunks/pages/_error-8f65b0f8749f42d2.js" defer=""></script><script src="/_next/static/MCpYTSYna3Ll-2lXwbETR/_buildManifest.js" defer=""></script><script src="/_next/static/MCpYTSYna3Ll-2lXwbETR/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"MCpYTSYna3Ll-2lXwbETR","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><link rel="icon" href="/favicon.ico" sizes="any" data-next-head=""/><link rel="icon" href="/logo.svg" type="image/svg+xml" data-next-head=""/><link rel="apple-touch-icon" href="/apple-touch-icon.png" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/c1491b2feaf90c67.css" as="style"/><link rel="stylesheet" href="/_next/static/css/c1491b2feaf90c67.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-c8aa5df0425f6b7b.js" defer=""></script><script src="/_next/static/chunks/framework-b92a367cf1ad4bf7.js" defer=""></script><script src="/_next/static/chunks/main-ec7fd4c371d06729.js" defer=""></script><script src="/_next/static/chunks/pages/_app-496c474d7f14dd07.js" defer=""></script><script src="/_next/static/chunks/pages/_error-8f65b0f8749f42d2.js" defer=""></script><script src="/_next/static/zd9N4vIppSGgwT--n88P6/_buildManifest.js" defer=""></script><script src="/_next/static/zd9N4vIppSGgwT--n88P6/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"zd9N4vIppSGgwT--n88P6","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>