@goodandready/dsh-subscriptions 0.7.17 → 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.
@@ -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.17",
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",