@goodandready/dsh-model-sync 0.4.4 → 0.4.6

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.
@@ -271,16 +271,19 @@ export function createProviderAdapterRegistry({ resolveCredential, fetchImpl = f
271
271
  register,
272
272
  select(profile, config) {
273
273
  if (profile?.adapterId && explicit.has(profile.adapterId)) return explicit.get(profile.adapterId)
274
- if (config && config.enabled !== false && (config.endpoint || profile?.baseURL)) return declarative(profile, config)
275
- if (canUseGenericAdapter(profile)) return generic
274
+ if (config && config.enabled !== false && config.endpoint) return declarative(profile, config)
276
275
  const descriptor = PROVIDER_ADAPTERS[profile?.provider]
277
- if (!descriptor) return null
278
- return Object.freeze({
279
- id: 'provider:' + profile.provider,
280
- canHandle: () => true,
281
- discover: (current, options = {}) => fetchSpecific(current, { ...descriptor, modelsPath: 'data', fields: {}, capabilityMap: {} }, { resolveCredential, fetchImpl, ...options }),
282
- health: (current, options = {}) => probeSpecific(current, descriptor, { resolveCredential, fetchImpl, ...options }),
283
- })
276
+ if (descriptor) {
277
+ return Object.freeze({
278
+ id: 'provider:' + profile.provider,
279
+ canHandle: () => true,
280
+ discover: (current, options = {}) => fetchSpecific(current, { ...descriptor, modelsPath: 'data', fields: {}, capabilityMap: {} }, { resolveCredential, fetchImpl, ...options }),
281
+ health: (current, options = {}) => probeSpecific(current, descriptor, { resolveCredential, fetchImpl, ...options }),
282
+ })
283
+ }
284
+ if (config && config.enabled !== false && profile?.baseURL) return declarative(profile, config)
285
+ if (canUseGenericAdapter(profile)) return generic
286
+ return null
284
287
  },
285
288
  }
286
289
  return Object.freeze(registry)
package/lib/client.js CHANGED
@@ -525,7 +525,7 @@ window.__ModuleLoader__.load({
525
525
  const [importErr, setImportErr] = React.useState('')
526
526
  const [showImportBox, setShowImportBox] = React.useState(false)
527
527
 
528
- const scope = React.useMemo(() => (ctx && ctx.settingsScope ? ctx.settingsScope.bind({ namespace: NS }) : undefined), [ctx])
528
+ const scope = React.useMemo(() => (ctx && ctx.configForms ? ctx.configForms.get(NS) : undefined), [ctx])
529
529
  const snapshot = React.useSyncExternalStore(
530
530
  React.useMemo(() => (cb) => (scope ? scope.subscribe(cb) : () => {}), [scope]),
531
531
  React.useCallback(() => (scope ? scope.getSnapshot() : { status: 'loading' }), [scope]),
@@ -1290,7 +1290,7 @@ window.__ModuleLoader__.load({
1290
1290
  }
1291
1291
  }
1292
1292
 
1293
- module.exports = { apply, inject: ['slots', 'locale', 'settingsScope'], filterModelsByCapabilities }
1293
+ module.exports = { apply, inject: ['slots', 'locale', 'configForms'], filterModelsByCapabilities }
1294
1294
  return module.exports
1295
1295
  },
1296
1296
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-model-sync",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "Automatic model catalog synchronization for API-key DeepSeek Harness providers.",
5
5
  "keywords": [
6
6
  "deepseek-harness",