@zeppeli777/tools-doubao 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/index.mjs +7 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -190,7 +190,13 @@ export const DoubaoTools = async (input, options) => {
190
190
  },
191
191
  });
192
192
  const file = writeAccountToConfig(result, "扫码登录");
193
- return { type: "success", accountId: `豆包 · ${result.sessionid.slice(0, 6)}…`, configFile: file };
193
+ // magpie 的 save() 只持久化带 key/refresh 的结果;key = sessionid
194
+ return {
195
+ type: "success",
196
+ accountId: result.userName || (result.userId ? `豆包用户 ${result.userId}` : "豆包账号"),
197
+ key: result.sessionid,
198
+ metadata: { ttwid: result.ttwid || "", passport_csrf_token: result.passport_csrf_token || "", deviceId: result.deviceId || "", webId: result.webId || "", configFile: file },
199
+ };
194
200
  } catch (err) {
195
201
  return { type: "failed", error: `豆包扫码登录失败:${err?.message || err}` };
196
202
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeppeli777/tools-doubao",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Doubao (豆包) image generation relay for Magpie: text-to-image and image-to-image with the user's own Doubao web session (QR-code sign-in), served to every agent via /mcp/magpie/tools",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",