@goodandready/dsh-subscriptions 0.4.3 → 0.4.5

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/README.md CHANGED
@@ -153,7 +153,7 @@ From the chat, without opening Settings:
153
153
 
154
154
  ## /subscriptions page
155
155
 
156
- A localhost-only summary page at `/subscriptions` lists every account slot,
156
+ A localhost-only summary page at `/dsh-subscriptions/subscriptions` lists every account slot,
157
157
  connection status, usage percent, remaining quota and reset time across all
158
158
  providers. Requests from non-loopback hosts get 403.
159
159
 
package/lib/client.js CHANGED
@@ -5,6 +5,10 @@ window.__ModuleLoader__.load({
5
5
  var exports = module.exports
6
6
  const React = require('react')
7
7
 
8
+ // Модульный переводчик: доступен всем подпискам компонентов и хелперам.
9
+ let t = (key) => key
10
+ const setT = (fn) => { t = fn }
11
+
8
12
  const CSS =
9
13
  // card — same structure as core PluginCard (bash, agent-loop, web-search)
10
14
  '.dsub-card{list-style:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;transition:border-color .16s,background .16s}' +
@@ -538,7 +542,7 @@ function PluginCard(props) {
538
542
  return () => { for (const off of undo) off() }
539
543
  }, 'dsh-subscriptions: словари')
540
544
  // Подписи вне компонента берут переводчик, привязанный к namespace.
541
- const t = ctx.locale.bind(NS)
545
+ setT(ctx.locale.bind(NS))
542
546
  // Штатное место — вкладка «Плагины»: карточка со своим заголовком и
543
547
  // сворачиванием вместо строки в боковом списке. Ключ регистрации обязан
544
548
  // равняться пространству настроек, иначе вкладка молча не покажет слот.
@@ -734,6 +738,7 @@ function PluginCard(props) {
734
738
 
735
739
  exports.inject = ['slots', 'locale', 'sessions']
736
740
  exports.apply = function apply(ctx) {
741
+ setT(ctx.locale.bind(NS))
737
742
  registerSettings(ctx)
738
743
  registerHeaderChip(ctx)
739
744
  registerComposerSwitch(ctx)
package/lib/index.js CHANGED
@@ -871,7 +871,7 @@ export function apply(ctx, config) {
871
871
  // #50: сводная страница /subscriptions (localhost-only).
872
872
  ctx.effect(() => ctx.webServer.register({
873
873
  kind: 'exact',
874
- path: '/subscriptions',
874
+ path: '/dsh-subscriptions/subscriptions',
875
875
  handler: async (req, res) => {
876
876
  if (req.method !== 'GET') {
877
877
  writeJson(res, 405, { ok: false, error: { code: 'method', message: 'GET only' } })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-subscriptions",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Use ChatGPT Codex, Claude, Grok, and Antigravity subscriptions as DeepSeek Harness LLM providers via OAuth.",
5
5
  "license": "MIT",
6
6
  "type": "module",