opencode-pollinations-plugin 6.4.3 → 6.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/dist/locales/de.json +16 -1
- package/dist/locales/en.json +16 -1
- package/dist/locales/es.json +16 -1
- package/dist/locales/fr.json +16 -1
- package/dist/locales/it.json +16 -1
- package/dist/locales/zh.json +16 -1
- package/dist/server/commands.js +18 -1
- package/dist/server/quota.js +14 -1
- package/package.json +1 -1
package/dist/locales/de.json
CHANGED
|
@@ -5,7 +5,22 @@
|
|
|
5
5
|
"alias_note": "*(Der Alias `/poll` wird unterstützt und anstelle von `/pollinations` empfohlen!)*",
|
|
6
6
|
"mode_usage": "**Modus & Nutzung**\n- **`/poll mode [modus]`**: Modus ändern (manual, alwaysfree, pro).\n- **`/poll usage [full]`**: Dashboard anzeigen (full = Details).\n- **`/poll fallback <main> [agent]`**: Sicherheitsnetz konfigurieren.",
|
|
7
7
|
"configuration": "**Konfiguration**\n- **`/poll config [schlüssel] [wert]`**:\n - `lang`: en, fr, de, es, it, etc.\n - `status_gui`: none, alert, all\n - `logs_gui`: none, error, verbose\n - `threshold_tier` / `threshold_wallet`: 0-100\n - `status_bar`: true/false\n - `cost_estimator`: true/false (Kosten in Ausgaben anzeigen)\n - `enablePaidTools`: true/false (Wallet-Schutz)\n - `costThreshold`: Limit in Pollen (Standard: 0.15)\n - `costConfirmationRequired`: true/false (Ausgabenbestätigung)",
|
|
8
|
-
"models_pricing": "**Modelle & Preise**\n- **`/poll models [typ]`**: Modelle auflisten (Typ: image, video, audio, text)\n- **`/poll pricing`**: Detaillierte Preistabelle\n- **`/poll infos`**: Erklärungen zu Tiers und Pollen\n- **`/poll quests`**: Deine Quests & einlösbares kostenloses Pollen anzeigen\n\n> 💡 **RMBG-Schlüssel**: Verwende das Tool `rmbg_keys` (funktioniert mit jedem Modell)."
|
|
8
|
+
"models_pricing": "**Modelle & Preise**\n- **`/poll models [typ]`**: Modelle auflisten (Typ: image, video, audio, text)\n- **`/poll pricing`**: Detaillierte Preistabelle\n- **`/poll infos`**: Erklärungen zu Tiers und Pollen\n- **`/poll quests`**: Deine Quests & einlösbares kostenloses Pollen anzeigen\n\n> 💡 **RMBG-Schlüssel**: Verwende das Tool `rmbg_keys` (funktioniert mit jedem Modell).",
|
|
9
|
+
"configuration_intro": "**Konfiguration**\n- **`/poll config [schlüssel] [wert]`**:",
|
|
10
|
+
"config": {
|
|
11
|
+
"lang": "Plugin-Sprache",
|
|
12
|
+
"status_gui": "Toast-Ausführlichkeit",
|
|
13
|
+
"logs_gui": "Log-Ausführlichkeit",
|
|
14
|
+
"threshold_tier": "Free-Tier-Warnschwelle (%)",
|
|
15
|
+
"threshold_wallet": "Wallet-Warnschwelle (%)",
|
|
16
|
+
"status_bar": "Statusleisten-Symbol anzeigen",
|
|
17
|
+
"cost_estimator": "Kostenschätzungen anzeigen",
|
|
18
|
+
"enablePaidTools": "Wallet-Schutz (kostenpflichtige Tools blockieren)",
|
|
19
|
+
"costThreshold": "Kosten-Warnschwelle",
|
|
20
|
+
"costConfirmationRequired": "Bestätigung vor Ausgaben anfordern",
|
|
21
|
+
"refillOverride": "Manueller Quest Pollen Refill",
|
|
22
|
+
"questStashInFreeMode": "Quest-Stash als Free in alwaysfree zählen"
|
|
23
|
+
}
|
|
9
24
|
},
|
|
10
25
|
"config": {
|
|
11
26
|
"title": "## ⚙️ Pollinations Konfiguration (v{version})",
|
package/dist/locales/en.json
CHANGED
|
@@ -5,7 +5,22 @@
|
|
|
5
5
|
"alias_note": "*(The alias `/poll` is supported and recommended instead of `/pollinations` !)*",
|
|
6
6
|
"mode_usage": "**Mode & Usage**\n- **`/poll mode [mode]`**: Change mode (manual, alwaysfree, pro).\n- **`/poll usage [full]`**: Display dashboard (full = details).\n- **`/poll fallback <main> [agent]`**: Configure Safety Net.",
|
|
7
7
|
"configuration": "**Configuration**\n- **`/poll config [key] [value]`**:\n - `lang`: en, fr, etc.\n - `status_gui`: none, alert, all\n - `logs_gui`: none, error, verbose\n - `threshold_tier` / `threshold_wallet`: 0-100\n - `status_bar`: true/false\n - `cost_estimator`: true/false (show cost in outputs)\n - `enablePaidTools`: true/false (wallet protection)\n - `costThreshold`: limit in pollen (default: 0.15)\n - `costConfirmationRequired`: true/false (spend confirmation)",
|
|
8
|
-
"models_pricing": "**Models & Pricing**\n- **`/poll models [type]`**: List models (type: image, video, audio, text)\n- **`/poll pricing`**: Detailed pricing table\n- **`/poll infos`**: Explanations on Tiers and Pollen\n- **`/poll quests`**: View your quests & claimable free Pollen\n\n> 💡 **RMBG keys**: Use the `rmbg_keys` tool (works with any model)."
|
|
8
|
+
"models_pricing": "**Models & Pricing**\n- **`/poll models [type]`**: List models (type: image, video, audio, text)\n- **`/poll pricing`**: Detailed pricing table\n- **`/poll infos`**: Explanations on Tiers and Pollen\n- **`/poll quests`**: View your quests & claimable free Pollen\n\n> 💡 **RMBG keys**: Use the `rmbg_keys` tool (works with any model).",
|
|
9
|
+
"configuration_intro": "**Configuration**\n- **`/poll config [key] [value]`**:",
|
|
10
|
+
"config": {
|
|
11
|
+
"lang": "Plugin language",
|
|
12
|
+
"status_gui": "Status toasts verbosity",
|
|
13
|
+
"logs_gui": "Log verbosity",
|
|
14
|
+
"threshold_tier": "Free tier alert threshold (%)",
|
|
15
|
+
"threshold_wallet": "Wallet alert threshold (%)",
|
|
16
|
+
"status_bar": "Show status bar icon",
|
|
17
|
+
"cost_estimator": "Show cost estimates",
|
|
18
|
+
"enablePaidTools": "Wallet protection (block paid tools)",
|
|
19
|
+
"costThreshold": "Cost alert threshold",
|
|
20
|
+
"costConfirmationRequired": "Ask confirmation before spending",
|
|
21
|
+
"refillOverride": "Manual Quest Pollen refill",
|
|
22
|
+
"questStashInFreeMode": "Count quest stash as free in alwaysfree"
|
|
23
|
+
}
|
|
9
24
|
},
|
|
10
25
|
"config": {
|
|
11
26
|
"title": "## ⚙️ Pollinations Configuration (v{version})",
|
package/dist/locales/es.json
CHANGED
|
@@ -5,7 +5,22 @@
|
|
|
5
5
|
"alias_note": "*(¡Se recomienda usar el alias `/poll` en lugar de `/pollinations`!)*",
|
|
6
6
|
"mode_usage": "**Modo y Uso**\n- **`/poll mode [modo]`**: Cambiar modo (manual, alwaysfree, pro).\n- **`/poll usage [full]`**: Mostrar panel (full = detalles).\n- **`/poll fallback <main> [agente]`**: Configurar red de seguridad.",
|
|
7
7
|
"configuration": "**Configuración**\n- **`/poll config [clave] [valor]`**:\n - `lang`: en, fr, es, de, it, etc.\n - `status_gui`: none, alert, all\n - `logs_gui`: none, error, verbose\n - `threshold_tier` / `threshold_wallet`: 0-100\n - `status_bar`: true/false\n - `cost_estimator`: true/false (mostrar costo en salidas)\n - `enablePaidTools`: true/false (protección de billetera)\n - `costThreshold`: límite en pollen (por defecto: 0.15)\n - `costConfirmationRequired`: true/false (confirmar gasto)",
|
|
8
|
-
"models_pricing": "**Modelos y Precios**\n- **`/poll models [tipo]`**: Listar modelos (tipo: image, video, audio, text)\n- **`/poll pricing`**: Tabla de precios detallada\n- **`/poll infos`**: Explicaciones sobre niveles y Pollen\n- **`/poll quests`**: Ver tus misiones y el Pollen gratis por reclamar\n\n> 💡 **Claves RMBG**: Usa la herramienta `rmbg_keys` (funciona con cualquier modelo)."
|
|
8
|
+
"models_pricing": "**Modelos y Precios**\n- **`/poll models [tipo]`**: Listar modelos (tipo: image, video, audio, text)\n- **`/poll pricing`**: Tabla de precios detallada\n- **`/poll infos`**: Explicaciones sobre niveles y Pollen\n- **`/poll quests`**: Ver tus misiones y el Pollen gratis por reclamar\n\n> 💡 **Claves RMBG**: Usa la herramienta `rmbg_keys` (funciona con cualquier modelo).",
|
|
9
|
+
"configuration_intro": "**Configuración**\n- **`/poll config [clave] [valor]`**:",
|
|
10
|
+
"config": {
|
|
11
|
+
"lang": "Idioma del plugin",
|
|
12
|
+
"status_gui": "Verbosidad de notificaciones",
|
|
13
|
+
"logs_gui": "Verbosidad de logs",
|
|
14
|
+
"threshold_tier": "Umbral de alerta tier gratis (%)",
|
|
15
|
+
"threshold_wallet": "Umbral de alerta wallet (%)",
|
|
16
|
+
"status_bar": "Mostrar icono en barra",
|
|
17
|
+
"cost_estimator": "Mostrar costes estimados",
|
|
18
|
+
"enablePaidTools": "Protección wallet (bloquea herramientas de pago)",
|
|
19
|
+
"costThreshold": "Umbral de alerta de coste",
|
|
20
|
+
"costConfirmationRequired": "Pedir confirmación antes de gastar",
|
|
21
|
+
"refillOverride": "Refill manual de Quest Pollen",
|
|
22
|
+
"questStashInFreeMode": "Contar stash Quest como free en alwaysfree"
|
|
23
|
+
}
|
|
9
24
|
},
|
|
10
25
|
"config": {
|
|
11
26
|
"title": "## ⚙️ Configuración de Pollinations (v{version})",
|
package/dist/locales/fr.json
CHANGED
|
@@ -5,7 +5,22 @@
|
|
|
5
5
|
"alias_note": "*(L'alias `/poll` est géré et recommandé à la place de `/pollinations` !)*",
|
|
6
6
|
"mode_usage": "**Mode & Usage**\n- **`/poll mode [mode]`**: Change le mode (manual, alwaysfree, pro).\n- **`/poll usage [full]`**: Affiche le dashboard (full = détail).\n- **`/poll fallback <main> [agent]`**: Configure le Safety Net.",
|
|
7
7
|
"configuration": "**Configuration**\n- **`/poll config [key] [value]`**:\n - `lang`: en, fr, etc.\n - `status_gui`: none, alert, all\n - `logs_gui`: none, error, verbose\n - `threshold_tier` / `threshold_wallet`: 0-100\n - `status_bar`: true/false\n - `cost_estimator`: true/false (show cost in outputs)\n - `enablePaidTools`: true/false (wallet protection)\n - `costThreshold`: seuil en pollen (défaut: 0.15)\n - `costConfirmationRequired`: true/false (confirmation coût)",
|
|
8
|
-
"models_pricing": "**Modèles & Pricing**\n- **`/poll models [type]`**: Liste des modèles (type: image, video, audio, text)\n- **`/poll pricing`**: Tableau de pricing détaillé\n- **`/poll infos`**: Explications sur les Tiers et le Pollen\n- **`/poll quests`**: Voir vos quêtes & le Pollen gratuit à réclamer\n\n> 💡 **RMBG keys**: Use the `rmbg_keys` tool (works with any model)."
|
|
8
|
+
"models_pricing": "**Modèles & Pricing**\n- **`/poll models [type]`**: Liste des modèles (type: image, video, audio, text)\n- **`/poll pricing`**: Tableau de pricing détaillé\n- **`/poll infos`**: Explications sur les Tiers et le Pollen\n- **`/poll quests`**: Voir vos quêtes & le Pollen gratuit à réclamer\n\n> 💡 **RMBG keys**: Use the `rmbg_keys` tool (works with any model).",
|
|
9
|
+
"configuration_intro": "**Configuration**\n- **`/poll config [clé] [valeur]`**:",
|
|
10
|
+
"config": {
|
|
11
|
+
"lang": "Langue du plugin",
|
|
12
|
+
"status_gui": "Verbosité des toasts",
|
|
13
|
+
"logs_gui": "Verbosité des logs",
|
|
14
|
+
"threshold_tier": "Seuil d'alerte tier gratuit (%)",
|
|
15
|
+
"threshold_wallet": "Seuil d'alerte wallet (%)",
|
|
16
|
+
"status_bar": "Afficher l'icône dans la barre",
|
|
17
|
+
"cost_estimator": "Afficher les coûts estimés",
|
|
18
|
+
"enablePaidTools": "Protection wallet (bloque outils payants)",
|
|
19
|
+
"costThreshold": "Seuil d'alerte coût",
|
|
20
|
+
"costConfirmationRequired": "Demander confirmation avant dépense",
|
|
21
|
+
"refillOverride": "Refill Quest Pollen manuel",
|
|
22
|
+
"questStashInFreeMode": "Compter le stash Quest comme free dans alwaysfree"
|
|
23
|
+
}
|
|
9
24
|
},
|
|
10
25
|
"config": {
|
|
11
26
|
"title": "## ⚙️ Configuration Pollinations (v{version})",
|
package/dist/locales/it.json
CHANGED
|
@@ -5,7 +5,22 @@
|
|
|
5
5
|
"alias_note": "*(L'alias `/poll` è supportato e raccomandato al posto di `/pollinations` !)*",
|
|
6
6
|
"mode_usage": "**Modalità e Uso**\n- **`/poll mode [modo]`**: Cambia la modalità (manual, alwaysfree, pro).\n- **`/poll usage [full]`**: Mostra la dashboard (full = dettagli).\n- **`/poll fallback <main> [agent]`**: Configura la rete di sicurezza.",
|
|
7
7
|
"configuration": "**Configurazione**\n- **`/poll config [chiave] [valore]`**:\n - `lang`: en, fr, de, es, it, etc.\n - `status_gui`: none, alert, all\n - `logs_gui`: none, error, verbose\n - `threshold_tier` / `threshold_wallet`: 0-100\n - `status_bar`: true/false\n - `cost_estimator`: true/false (mostra i costi nell'output)\n - `enablePaidTools`: true/false (protezione del portafoglio)\n - `costThreshold`: limite in pollen (predefinito: 0.15)\n - `costConfirmationRequired`: true/false (conferma di spesa)",
|
|
8
|
-
"models_pricing": "**Modelli e Prezzi**\n- **`/poll models [tipo]`**: Elenca i modelli (tipo: image, video, audio, text)\n- **`/poll pricing`**: Tabella prezzi dettagliata\n- **`/poll infos`**: Spiegazioni su Tiers e Pollen\n- **`/poll quests`**: Visualizza le tue quest e il Pollen gratuito da riscattare\n\n> 💡 **Chiavi RMBG**: Usa lo strumento `rmbg_keys` (funziona con qualsiasi modello)."
|
|
8
|
+
"models_pricing": "**Modelli e Prezzi**\n- **`/poll models [tipo]`**: Elenca i modelli (tipo: image, video, audio, text)\n- **`/poll pricing`**: Tabella prezzi dettagliata\n- **`/poll infos`**: Spiegazioni su Tiers e Pollen\n- **`/poll quests`**: Visualizza le tue quest e il Pollen gratuito da riscattare\n\n> 💡 **Chiavi RMBG**: Usa lo strumento `rmbg_keys` (funziona con qualsiasi modello).",
|
|
9
|
+
"configuration_intro": "**Configurazione**\n- **`/poll config [chiave] [valore]`**:",
|
|
10
|
+
"config": {
|
|
11
|
+
"lang": "Lingua del plugin",
|
|
12
|
+
"status_gui": "Verbosità notifiche",
|
|
13
|
+
"logs_gui": "Verbosità log",
|
|
14
|
+
"threshold_tier": "Soglia di avviso tier gratuito (%)",
|
|
15
|
+
"threshold_wallet": "Soglia di avviso wallet (%)",
|
|
16
|
+
"status_bar": "Mostra icona nella barra",
|
|
17
|
+
"cost_estimator": "Mostra stime dei costi",
|
|
18
|
+
"enablePaidTools": "Protezione wallet (blocca strumenti a pagamento)",
|
|
19
|
+
"costThreshold": "Soglia di avviso costo",
|
|
20
|
+
"costConfirmationRequired": "Chiedi conferma prima di spendere",
|
|
21
|
+
"refillOverride": "Refill manuale Quest Pollen",
|
|
22
|
+
"questStashInFreeMode": "Conta stash Quest come free in alwaysfree"
|
|
23
|
+
}
|
|
9
24
|
},
|
|
10
25
|
"config": {
|
|
11
26
|
"title": "## ⚙️ Configurazione Pollinations (v{version})",
|
package/dist/locales/zh.json
CHANGED
|
@@ -5,7 +5,22 @@
|
|
|
5
5
|
"alias_note": "*(支持并推荐使用别名 `/poll` 代替 `/pollinations`!)*",
|
|
6
6
|
"mode_usage": "**模式与用法**\n- **`/poll mode [模式]`**:切换模式 (manual, alwaysfree, pro)。\n- **`/poll usage [full]`**:显示仪表盘 (full = 详情)。\n- **`/poll fallback <main> [agent]`**:配置安全网。",
|
|
7
7
|
"configuration": "**配置**\n- **`/poll config [键] [值]`**:\n - `lang`:en, fr, es, de, it, zh 等\n - `status_gui`:none, alert, all\n - `logs_gui`:none, error, verbose\n - `threshold_tier` / `threshold_wallet`:0-100\n - `status_bar`:true/false\n - `cost_estimator`:true/false (在输出中显示费用)\n - `enablePaidTools`:true/false (钱包保护)\n - `costThreshold`:Pollen 限额 (默认:0.15)\n - `costConfirmationRequired`:true/false (花费确认)",
|
|
8
|
-
"models_pricing": "**模型与定价**\n- **`/poll models [类型]`**:列出模型 (类型:image, video, audio, text)\n- **`/poll pricing`**:详细定价表\n- **`/poll infos`**:关于等级和 Pollen 的说明\n- **`/poll quests`**:查看你的任务和可领取的免费 Pollen\n\n> 💡 **RMBG 密钥**:使用 `rmbg_keys` 工具 (适用于任何模型)。"
|
|
8
|
+
"models_pricing": "**模型与定价**\n- **`/poll models [类型]`**:列出模型 (类型:image, video, audio, text)\n- **`/poll pricing`**:详细定价表\n- **`/poll infos`**:关于等级和 Pollen 的说明\n- **`/poll quests`**:查看你的任务和可领取的免费 Pollen\n\n> 💡 **RMBG 密钥**:使用 `rmbg_keys` 工具 (适用于任何模型)。",
|
|
9
|
+
"configuration_intro": "**配置**\n- **`/poll config [键] [值]`**:",
|
|
10
|
+
"config": {
|
|
11
|
+
"lang": "插件语言",
|
|
12
|
+
"status_gui": "状态通知详细程度",
|
|
13
|
+
"logs_gui": "日志详细程度",
|
|
14
|
+
"threshold_tier": "免费层级警告阈值 (%)",
|
|
15
|
+
"threshold_wallet": "钱包警告阈值 (%)",
|
|
16
|
+
"status_bar": "显示状态栏图标",
|
|
17
|
+
"cost_estimator": "显示费用估算",
|
|
18
|
+
"enablePaidTools": "钱包保护(阻止付费工具)",
|
|
19
|
+
"costThreshold": "费用警告阈值",
|
|
20
|
+
"costConfirmationRequired": "消费前请求确认",
|
|
21
|
+
"refillOverride": "手动 Quest Pollen 补充",
|
|
22
|
+
"questStashInFreeMode": "在 alwaysfree 中计算 Quest 储备"
|
|
23
|
+
}
|
|
9
24
|
},
|
|
10
25
|
"config": {
|
|
11
26
|
"title": "## ⚙️ Pollinations 配置 (v{version})",
|
package/dist/server/commands.js
CHANGED
|
@@ -776,13 +776,30 @@ ${t('commands.config.table_divider')}
|
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
778
|
function handleHelpCommand() {
|
|
779
|
+
const config = loadConfig();
|
|
780
|
+
const configKeys = [
|
|
781
|
+
{ key: 'lang', values: 'en, fr, es, de, it, zh', i18n: 'commands.help.config.lang' },
|
|
782
|
+
{ key: 'status_gui', values: 'none, alert, all', i18n: 'commands.help.config.status_gui' },
|
|
783
|
+
{ key: 'logs_gui', values: 'none, error, verbose', i18n: 'commands.help.config.logs_gui' },
|
|
784
|
+
{ key: 'threshold_tier', values: '0-100', i18n: 'commands.help.config.threshold_tier' },
|
|
785
|
+
{ key: 'threshold_wallet', values: '0-100', i18n: 'commands.help.config.threshold_wallet' },
|
|
786
|
+
{ key: 'status_bar', values: 'true/false', i18n: 'commands.help.config.status_bar' },
|
|
787
|
+
{ key: 'cost_estimator', values: 'true/false', i18n: 'commands.help.config.cost_estimator' },
|
|
788
|
+
{ key: 'enablePaidTools', values: 'true/false', i18n: 'commands.help.config.enablePaidTools' },
|
|
789
|
+
{ key: 'costThreshold', values: 'number (pollen)', i18n: 'commands.help.config.costThreshold' },
|
|
790
|
+
{ key: 'costConfirmationRequired', values: 'true/false', i18n: 'commands.help.config.costConfirmationRequired' },
|
|
791
|
+
{ key: 'refillOverride', values: '0.01, 0.15, 0.4, 0.8, 10, auto', i18n: 'commands.help.config.refillOverride' },
|
|
792
|
+
{ key: 'questStashInFreeMode', values: 'true/false', i18n: 'commands.help.config.questStashInFreeMode' },
|
|
793
|
+
];
|
|
794
|
+
const configSection = configKeys.map(k => ` - \`${k.key}\`: ${t(k.i18n)} (\`${k.values}\`)`).join('\n');
|
|
779
795
|
const help = `
|
|
780
796
|
${t('commands.help.title')}
|
|
781
797
|
${t('commands.help.alias_note')}
|
|
782
798
|
|
|
783
799
|
${t('commands.help.mode_usage')}
|
|
784
800
|
|
|
785
|
-
${t('commands.help.
|
|
801
|
+
${t('commands.help.configuration_intro')}
|
|
802
|
+
${configSection}
|
|
786
803
|
|
|
787
804
|
${t('commands.help.models_pricing')}
|
|
788
805
|
`.trim();
|
package/dist/server/quota.js
CHANGED
|
@@ -4,6 +4,9 @@ import { loadConfig } from './config.js';
|
|
|
4
4
|
const CACHE_TTL = 30000;
|
|
5
5
|
let cachedQuota = null;
|
|
6
6
|
let lastQuotaFetch = 0;
|
|
7
|
+
const STASH_CACHE_TTL = 5 * 60 * 1000; // 5 min — le stash Quest change rarement
|
|
8
|
+
let cachedStash = null;
|
|
9
|
+
let lastStashFetch = 0;
|
|
7
10
|
const ONE_HOUR_MS = 60 * 60 * 1000;
|
|
8
11
|
const KNOWN_REFILLS = [
|
|
9
12
|
{ pollen: 0, emoji: '👤', label: 'anonymous' },
|
|
@@ -177,11 +180,21 @@ export async function getQuotaStatus(forceRefresh = false) {
|
|
|
177
180
|
const tierNeedsAlert = tierLimit > 0 && tierAlertPercent <= config.thresholds.tier;
|
|
178
181
|
const walletNeedsAlert = cleanWalletBalance > 0 && cleanWalletBalance < (config.thresholds.wallet || 0.5);
|
|
179
182
|
logQuota(`Fetch Success. Allowance: ${allowance}, Paid: ${cleanWalletBalance}, Total: ${totalBalance}`);
|
|
183
|
+
// Fetch quest stash (cached 5 min)
|
|
184
|
+
const nowStash = Date.now();
|
|
185
|
+
if (!cachedStash || (nowStash - lastStashFetch) > STASH_CACHE_TTL) {
|
|
186
|
+
try {
|
|
187
|
+
cachedStash = await fetchQuestStash(config.apiKey);
|
|
188
|
+
lastStashFetch = nowStash;
|
|
189
|
+
}
|
|
190
|
+
catch { /* keep previous */ }
|
|
191
|
+
}
|
|
192
|
+
const questStash = cachedStash?.questStash ?? 0;
|
|
180
193
|
cachedQuota = {
|
|
181
194
|
tierRemaining: cleanTierRemaining,
|
|
182
195
|
tierUsed,
|
|
183
196
|
tierLimit,
|
|
184
|
-
questStash
|
|
197
|
+
questStash,
|
|
185
198
|
walletBalance: cleanWalletBalance,
|
|
186
199
|
nextResetAt: resetInfo.nextReset,
|
|
187
200
|
timeUntilReset: resetInfo.timeUntilReset,
|
package/package.json
CHANGED