dsh-line-bot 0.10.6 → 0.10.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.10.7
2
+
3
+ - 修正自訂參考音無法上傳:`/api/line-bot/action` 的請求上限從 2MB 提高到 32MB。20MB 音檔轉成 data URL 後約 27MB,先前會在面板顯示「上傳失敗:請求內容過大」。
4
+
1
5
  ## 0.10.6
2
6
 
3
7
  - 連傳訊息:webhook 佇列改成「停手 1.8 秒才開始處理」,每收到新的一則就重新計時;快速連傳的兩三則會一起進同一輪,不會因為第一則回得快就變成兩次獨立回覆。
package/lib/host.mjs CHANGED
@@ -51,7 +51,7 @@ const { createVision } = visionMod
51
51
  const { createTts } = ttsMod
52
52
  const { chunkText, clip, inQuietWindow, jsonFail, jsonOk, maskSecret, readJsonBody, safeArray, sleep, readJsonSafe } = utilMod
53
53
 
54
- export const VERSION = '0.10.6'
54
+ export const VERSION = '0.10.7'
55
55
 
56
56
  // 環境變數提供的 Cloudflare API Token(方便用 shell 注入、不用把 token 寫進設定檔)。
57
57
  // 設定檔裡的 token 優先;兩者都沒有時才用環境變數。
@@ -3179,7 +3179,8 @@ export async function create({ ctx, config: pluginConfig, logger: upstream }) {
3179
3179
  return
3180
3180
  }
3181
3181
  if (req.method === 'POST' && sub === '/action') {
3182
- const body = await readJsonBody(req)
3182
+ // 參考音以 data URL 上傳,20MB 音檔轉成 base64 後約 27MB;預設 2MB 會讓上傳直接失敗。
3183
+ const body = await readJsonBody(req, 32 * 1024 * 1024)
3183
3184
  const result = await runAction(String(body.action || ''), body.payload || {})
3184
3185
  jsonOk(res, { action: body.action, result, status: await buildStatus() })
3185
3186
  return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-line-bot",
3
- "version": "0.10.6",
3
+ "version": "0.10.7",
4
4
  "description": "把 LINE 官方帳號(Messaging API)接進 DeepSeek Harness 的插件:內建 Cloudflare Tunnel、人設選擇(大肥魚或插件自訂)、主動傳訊與完整設定面板。",
5
5
  "type": "module",
6
6
  "main": "index.js",