devez-vibe 1.4.7 → 1.4.8

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/bin/dvz.exe CHANGED
Binary file
@@ -27,6 +27,8 @@ const sessionAliases = new Map();
27
27
  const pendingHostRequests = new Map();
28
28
  const modelCatalogs = new Map();
29
29
  const CLAUDE_MODEL_ORDER = ["fable", "opus", "sonnet", "haiku"];
30
+ const OPUS_48_MODEL = "claude-opus-4-8";
31
+ const CLAUDE_EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
30
32
  let nextHostRequest = 1;
31
33
 
32
34
  class AsyncQueue {
@@ -138,8 +140,34 @@ function capabilityContextWindow(capabilities, ...names) {
138
140
 
139
141
  function modelCapabilities(models, model) {
140
142
  const value = stripClaudeModel(model);
141
- return models.find((candidate) => candidate.value === value || candidate.resolvedModel === value)
143
+ const capabilities = models.find((candidate) =>
144
+ candidate.value === value || candidate.resolvedModel === value)
142
145
  || (!value ? models.find((candidate) => candidate.value === "default") : undefined);
146
+ return value === OPUS_48_MODEL
147
+ ? opus48Capabilities(models, capabilities)
148
+ : capabilities;
149
+ }
150
+
151
+ function opus48Capabilities(models, existing = {}) {
152
+ const opus = models.find((model) => model.value === "opus") || {};
153
+ const opusEfforts = Array.isArray(opus.supportedEffortLevels)
154
+ ? opus.supportedEffortLevels
155
+ : [];
156
+ const existingEfforts = Array.isArray(existing.supportedEffortLevels)
157
+ ? existing.supportedEffortLevels
158
+ : [];
159
+ const supportedEffortLevels = opusEfforts.length
160
+ ? opusEfforts
161
+ : existingEfforts.length ? existingEfforts : CLAUDE_EFFORT_LEVELS;
162
+ return {
163
+ ...opus,
164
+ ...existing,
165
+ value: OPUS_48_MODEL,
166
+ resolvedModel: OPUS_48_MODEL,
167
+ displayName: "Opus 4.8",
168
+ supportsEffort: true,
169
+ supportedEffortLevels,
170
+ };
143
171
  }
144
172
 
145
173
  function supportedEffort(model, requested) {
@@ -190,6 +218,26 @@ function catalogEntry(model, defaultResolvedModel) {
190
218
  };
191
219
  }
192
220
 
221
+ function claudeCatalogEntries(models, defaultResolvedModel) {
222
+ const catalogModels = models.filter((model) => model.value && model.value !== "default");
223
+ const entries = catalogModels.map((model) => catalogEntry(model, defaultResolvedModel));
224
+ const existingIndex = entries.findIndex((entry) =>
225
+ stripClaudeModel(entry.model) === OPUS_48_MODEL
226
+ || stripClaudeModel(entry.id) === OPUS_48_MODEL
227
+ || entry.displayName === "Opus 4.8");
228
+ const existing = existingIndex >= 0 ? catalogModels[existingIndex] : {};
229
+ if (existingIndex >= 0) entries.splice(existingIndex, 1);
230
+ const opus48 = catalogEntry(opus48Capabilities(models, existing), defaultResolvedModel);
231
+ const opus5Index = entries.findIndex((entry) => entry.displayName === "Opus 5");
232
+ const opusIndex = opus5Index >= 0
233
+ ? opus5Index
234
+ : entries.findIndex((entry) => /\bopus\b/i.test(entry.displayName));
235
+ const fableIndex = entries.findIndex((entry) => /\bfable\b/i.test(entry.displayName));
236
+ const insertAfter = opusIndex >= 0 ? opusIndex : fableIndex;
237
+ entries.splice(insertAfter + 1, 0, opus48);
238
+ return entries;
239
+ }
240
+
193
241
  async function loadModelCatalog(params) {
194
242
  const cacheKey = `${params.claudePath || "claude"}\n${params.cwd || process.cwd()}`;
195
243
  if (modelCatalogs.has(cacheKey)) return modelCatalogs.get(cacheKey);
@@ -223,9 +271,7 @@ async function loadModelCatalog(params) {
223
271
  - (rightOrder < 0 ? CLAUDE_MODEL_ORDER.length : rightOrder);
224
272
  });
225
273
  return {
226
- data: models
227
- .filter((model) => model.value && model.value !== "default")
228
- .map((model) => catalogEntry(model, defaultResolvedModel)),
274
+ data: claudeCatalogEntries(models, defaultResolvedModel),
229
275
  };
230
276
  } finally {
231
277
  input.close();
@@ -2753,6 +2799,34 @@ async function runSelfTest() {
2753
2799
  if (windows.join(",") !== "1000000,200000,300000") {
2754
2800
  throw new Error(`Claude context window self-test failed: ${windows.join(",")}`);
2755
2801
  }
2802
+ const catalogModels = [
2803
+ {
2804
+ value: "opus",
2805
+ resolvedModel: "claude-opus-5",
2806
+ displayName: "Opus 5",
2807
+ supportsEffort: true,
2808
+ supportedEffortLevels: ["high", "max"],
2809
+ },
2810
+ { value: "sonnet", resolvedModel: "claude-sonnet-5", displayName: "Sonnet 5" },
2811
+ {
2812
+ value: "claude-opus-4-8",
2813
+ resolvedModel: "claude-opus-4-8",
2814
+ displayName: "Opus 4.8",
2815
+ supportsEffort: false,
2816
+ supportedEffortLevels: [],
2817
+ },
2818
+ ];
2819
+ const catalog = claudeCatalogEntries(catalogModels, "claude-sonnet-5");
2820
+ if (catalog[0]?.displayName !== "Opus 5"
2821
+ || catalog[1]?.displayName !== "Opus 4.8"
2822
+ || catalog[1]?.model !== "claude:claude-opus-4-8"
2823
+ || catalog[1]?.supportedReasoningEfforts?.[1]?.reasoningEffort !== "max"
2824
+ || supportedEffort(
2825
+ modelCapabilities(catalogModels, "claude:claude-opus-4-8"),
2826
+ "max",
2827
+ ) !== "max") {
2828
+ throw new Error(`Claude pinned model self-test failed: ${JSON.stringify(catalog)}`);
2829
+ }
2756
2830
  const notification = taskNotifications({
2757
2831
  origin: { kind: "task-notification" },
2758
2832
  message: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devez-vibe",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "Stable terminal UI for Codex and Claude Agent SDK",
5
5
  "keywords": [
6
6
  "codex",