@ran-sh/dsh-crew 1.6.0 → 1.6.2
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/package.json
CHANGED
|
@@ -327,10 +327,21 @@ export const GLOBAL_CONFIG_DEFAULTS = {
|
|
|
327
327
|
model_schedule: undefined,
|
|
328
328
|
};
|
|
329
329
|
|
|
330
|
+
/** Config keys removed with the vision / image-generation bridge. */
|
|
331
|
+
export const REMOVED_MULTIMODAL_KEYS = Object.freeze([
|
|
332
|
+
'vision_enabled', 'imagegen_enabled', 'vision_provider', 'vision_model',
|
|
333
|
+
'imagegen_provider', 'custom_providers',
|
|
334
|
+
]);
|
|
335
|
+
|
|
330
336
|
export function mergeStoredGlobalConfig(stored) {
|
|
331
337
|
if (!stored || typeof stored !== 'object' || Array.isArray(stored)) return { ...GLOBAL_CONFIG_DEFAULTS };
|
|
332
338
|
const has = (key) => Object.prototype.hasOwnProperty.call(stored, key);
|
|
333
339
|
const merged = { ...GLOBAL_CONFIG_DEFAULTS, ...stored };
|
|
340
|
+
// Keys that belonged to the removed vision / image-generation bridge. The
|
|
341
|
+
// merge above keeps unknown stored keys for forward compatibility, so a file
|
|
342
|
+
// written by an older release would otherwise carry them forever. These are
|
|
343
|
+
// known-dead, so drop exactly them and leave every other unknown key alone.
|
|
344
|
+
for (const dead of REMOVED_MULTIMODAL_KEYS) delete merged[dead];
|
|
334
345
|
// Fields introduced by configurable Crew keep the prior release's behavior
|
|
335
346
|
// when an existing file predates them. Only a genuinely fresh config gets
|
|
336
347
|
// the new minimal defaults above.
|
package/src/install/install.mjs
CHANGED
|
@@ -11,7 +11,8 @@ export * from './zcode.mjs';
|
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
12
12
|
import { basename, dirname, join } from 'node:path';
|
|
13
13
|
import { homedir } from 'node:os';
|
|
14
|
-
import * as legacy from './install-legacy.mjs';
|
|
14
|
+
import * as legacy from './install-legacy.mjs';
|
|
15
|
+
import { REMOVED_MULTIMODAL_KEYS } from './install-legacy.mjs';
|
|
15
16
|
import { normalizeModelPriority } from '../model-routing.mjs';
|
|
16
17
|
import { normalizeModelSchedule } from '../model-schedule.mjs';
|
|
17
18
|
import { runtimeActivationMetadata } from '../runtime-controls.mjs';
|
|
@@ -129,6 +130,16 @@ function migrateHubUrl(config, { legacyUrl = CREW_LEGACY_HUB_URL, dedicatedUrl =
|
|
|
129
130
|
export function mergeStoredGlobalConfig(stored) {
|
|
130
131
|
if (!validObject(stored)) return freshConfig();
|
|
131
132
|
|
|
133
|
+
// Drop the keys that belonged to the removed vision / image-generation
|
|
134
|
+
// bridge before either branch below, so a canonical config is cleaned as
|
|
135
|
+
// well as a legacy one. Both branches spread the stored object, and the
|
|
136
|
+
// merge deliberately keeps unknown keys, so without this the dead keys
|
|
137
|
+
// would survive every read. Only these known-dead keys go; a genuinely
|
|
138
|
+
// unknown key from a newer release is still preserved.
|
|
139
|
+
stored = Object.fromEntries(
|
|
140
|
+
Object.entries(stored).filter(([key]) => !REMOVED_MULTIMODAL_KEYS.includes(key)),
|
|
141
|
+
);
|
|
142
|
+
|
|
132
143
|
const version = sourceVersion(stored);
|
|
133
144
|
if (configHasCanonicalAuthority(stored)) {
|
|
134
145
|
const merged = { ...CREW_GLOBAL_CONFIG_DEFAULTS, ...stored };
|
package/src/runtime-identity.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
// included in the identity contract.
|
|
37
37
|
const RUNTIME_ID = randomUUID();
|
|
38
38
|
|
|
39
|
-
export const RUNTIME_VERSION = '1.6.
|
|
39
|
+
export const RUNTIME_VERSION = '1.6.2';
|
|
40
40
|
export const HUB_PROTOCOL_VERSION = 1;
|
|
41
41
|
|
|
42
42
|
export const HUB_CAPABILITIES = Object.freeze([
|