@goodandready/dsh-subscriptions 0.7.16 → 0.7.18

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/lib/client.js CHANGED
@@ -1682,7 +1682,7 @@ window.__ModuleLoader__.load({
1682
1682
  h('span', {
1683
1683
  className: 'dsub-badge ' + (hostPing.ok ? 'dsub-badge-ok' : 'dsub-badge-bad')
1684
1684
  }, hostPing.ok
1685
- ? (hostPing.latencyMs != null ? 'Host online (' + hostPing.latencyMs + ' ms)' : t('hostOnline'))
1685
+ ? (hostPing.latencyMs != null ? t('hostOnline') + ' (' + hostPing.latencyMs + ' ms)' : t('hostOnline'))
1686
1686
  : t('hostOffline')
1687
1687
  ),
1688
1688
  h('span', {
@@ -1693,7 +1693,7 @@ window.__ModuleLoader__.load({
1693
1693
  ),
1694
1694
  h('span', {
1695
1695
  className: 'dsub-badge dsub-badge-neutral'
1696
- }, 'Pool: ' + accounts.length + ' accounts'),
1696
+ }, t('subsPoolTitle') + ': ' + accounts.length),
1697
1697
  updater.status && updater.status.updateAvailable
1698
1698
  ? h('span', { className: 'dsub-badge dsub-badge-warn' },
1699
1699
  '⬆ ' + t('updateAvailable') + ' (v' + (updater.status.latestVersion || '') + ')'
@@ -231,6 +231,8 @@ export const Config = z.object({
231
231
  .description('Declarative OpenAI-Responses-compatible providers. See README.'),
232
232
  providerPacks: z.array(z.any()).volatile().default([])
233
233
  .description('#694 Data-only vendor packs registered through the provider SDK.'),
234
+ nativeTools: z.boolean().volatile().default(false)
235
+ .description('#18 Opt-in subscription-native image/x/web/video tools. Off by default because these names shadow builtin tools; enable only when the host does not provide them.'),
234
236
  })
235
237
 
236
238
  export function publicConfig(cfg) {
package/lib/index.js CHANGED
@@ -405,7 +405,7 @@ export function apply(ctx, rawConfig) {
405
405
  ctx.effect(() => registerSubscriptionTools(ctx, {
406
406
  subscriptions,
407
407
  images: () => ctx.subscriptionImages,
408
- }), 'dsh-subscriptions: native tools')
408
+ }, { enabled: live().nativeTools || process.env.DSH_SUBSCRIPTIONS_NATIVE_TOOLS === '1' }), 'dsh-subscriptions: native tools')
409
409
 
410
410
  const pending = new Map()
411
411
 
@@ -57,12 +57,14 @@ async function saveImages(images, exec) {
57
57
  return out
58
58
  }
59
59
 
60
- export function registerSubscriptionTools(ctx, deps) {
60
+ export function registerSubscriptionTools(ctx, deps, options = {}) {
61
+ if (options && options.enabled === false) return () => {}
61
62
  const tools = ctx && ctx.tools
62
63
  if (!tools || typeof tools.register !== 'function') return () => {}
63
64
  const disposers = []
64
65
  const register = (definition) => {
65
66
  try {
67
+ if (typeof tools.get === 'function' && tools.get(definition.name)) return
66
68
  const off = tools.register(definition)
67
69
  if (typeof off === 'function') disposers.push(off)
68
70
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-subscriptions",
3
- "version": "0.7.16",
3
+ "version": "0.7.18",
4
4
  "description": "Use ChatGPT Codex, Claude, Grok, Antigravity, Kimi, GLM, Cursor, Kiro, Copilot, Qwen, ERNIE, Spark, JetBrains, Perplexity, Replit, and Cody subscriptions as DeepSeek Harness LLM providers via OAuth.",
5
5
  "license": "MIT",
6
6
  "type": "module",