@qwen-code/channel-weixin 0.27.1 → 0.27.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,MAAM,EAAE,aAKpB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,MAAM,EAAE,aAwBpB,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,25 @@ import { WeixinChannel } from './WeixinAdapter.js';
3
3
  export const plugin = {
4
4
  channelType: 'weixin',
5
5
  displayName: 'WeChat',
6
+ management: {
7
+ fields: [
8
+ // No `baseUrl` here on purpose. `connect()` replaces the configured root
9
+ // with the one stored at login, and both login paths always store one, so
10
+ // an editor field for it would promise an override that can never reach a
11
+ // request. Exposing it needs the adapter's precedence fixed first.
12
+ {
13
+ // The iLink Bot only ever produces direct messages, so the other three
14
+ // policies would configure a mode the adapter can never reach.
15
+ key: 'groupPolicy',
16
+ label: 'Group Policy',
17
+ kind: 'enum',
18
+ required: true,
19
+ default: 'disabled',
20
+ description: 'WeChat iLink Bot is direct-message only',
21
+ options: [{ value: 'disabled', label: 'Disabled' }],
22
+ },
23
+ ],
24
+ },
6
25
  createChannel: (name, config, bridge, options) => new WeixinChannel(name, config, bridge, options),
7
26
  };
8
27
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,CAAC,MAAM,MAAM,GAAkB;IACnC,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,QAAQ;IACrB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAC/C,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;CACnD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,CAAC,MAAM,MAAM,GAAkB;IACnC,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE;QACV,MAAM,EAAE;YACN,yEAAyE;YACzE,0EAA0E;YAC1E,0EAA0E;YAC1E,mEAAmE;YACnE;gBACE,uEAAuE;gBACvE,+DAA+D;gBAC/D,GAAG,EAAE,aAAa;gBAClB,KAAK,EAAE,cAAc;gBACrB,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,yCAAyC;gBACtD,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;aACpD;SACF;KACF;IACD,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAC/C,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;CACnD,CAAC"}
package/dist/login.d.ts CHANGED
@@ -7,13 +7,41 @@ export interface LoginResult {
7
7
  baseUrl?: string;
8
8
  userId?: string;
9
9
  message: string;
10
+ /**
11
+ * Why a disconnected attempt ended. Callers branch on this rather than on
12
+ * `message`, which is user-facing copy. Absent on success.
13
+ */
14
+ reason?: 'expired' | 'timeout' | 'cancelled';
10
15
  }
11
- /** Step 1: Get QR code from server and display in terminal */
12
- export declare function startLogin(apiBaseUrl: string): Promise<string>;
13
- /** Step 2: Poll for scan result */
16
+ /** A minted login QR code: the poll id, plus the URL the operator scans. */
17
+ export interface WeixinQrCode {
18
+ qrcodeId: string;
19
+ qrcodeUrl?: string;
20
+ }
21
+ /**
22
+ * Progress of a running login. `qrcode` fires only when the loop mints a
23
+ * replacement after an expiry — the caller already holds the initial one from
24
+ * `startLogin`. `scanned` fires on every poll that reports a scan, matching the
25
+ * terminal output this flow produced before it was event-driven.
26
+ */
27
+ export type WeixinLoginEvent = ({
28
+ type: 'qrcode';
29
+ } & WeixinQrCode) | {
30
+ type: 'scanned';
31
+ } | {
32
+ type: 'expired';
33
+ };
34
+ /** Step 1: Get QR code from server. */
35
+ export declare function startLogin(apiBaseUrl: string, options?: {
36
+ timeoutMs?: number;
37
+ signal?: AbortSignal;
38
+ }): Promise<WeixinQrCode>;
39
+ /** Step 2: Poll for scan result. */
14
40
  export declare function waitForLogin(params: {
15
41
  qrcodeId: string;
16
42
  apiBaseUrl: string;
17
43
  timeoutMs?: number;
44
+ signal?: AbortSignal;
45
+ onEvent?: (event: WeixinLoginEvent) => void;
18
46
  }): Promise<LoginResult>;
19
47
  //# sourceMappingURL=login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,E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,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC7C,GAAG,OAAO,CAAC,WAAW,CAAC,CA2HvB"}
package/dist/login.js CHANGED
@@ -2,10 +2,23 @@
2
2
  * QR code login flow for WeChat iLink Bot.
3
3
  */
4
4
  import { buildHeaders } from './api.js';
5
- /** Step 1: Get QR code from server and display in terminal */
6
- export async function startLogin(apiBaseUrl) {
5
+ /**
6
+ * A mint that hangs must not outlive the caller's interest: the daemon holds a
7
+ * flow slot and an open request for its whole duration, so an unanswered mint
8
+ * would wedge the cap. The poll below already bounds each request; this is the
9
+ * same bound for the mint.
10
+ */
11
+ const QR_MINT_TIMEOUT_MS = 30_000;
12
+ /** Step 1: Get QR code from server. */
13
+ export async function startLogin(apiBaseUrl, options = {}) {
14
+ // Symmetric with `waitForLogin`'s timeoutMs: the caller that owns the
15
+ // deadline decides, and the default bounds the daemon's slot holding. The
16
+ // caller's signal is composed in rather than replacing the bound, so a
17
+ // cancel reaches this request too and a hung mint still cannot wedge a slot.
18
+ const bound = AbortSignal.timeout(options.timeoutMs ?? QR_MINT_TIMEOUT_MS);
7
19
  const resp = await fetch(`${apiBaseUrl}/ilink/bot/get_bot_qrcode?bot_type=3`, {
8
20
  headers: buildHeaders(),
21
+ signal: options.signal ? AbortSignal.any([options.signal, bound]) : bound,
9
22
  });
10
23
  if (!resp.ok) {
11
24
  throw new Error(`Failed to get QR code: HTTP ${resp.status}`);
@@ -14,30 +27,46 @@ export async function startLogin(apiBaseUrl) {
14
27
  if (!data.qrcode) {
15
28
  throw new Error('No qrcode in response');
16
29
  }
17
- if (data.qrcode_img_content) {
18
- process.stderr.write(`QR code URL: ${data.qrcode_img_content}\nScan this URL with WeChat.\n`);
19
- }
20
- process.stderr.write('Scan the QR code with WeChat to connect.\n');
21
- return data.qrcode;
30
+ return { qrcodeId: data.qrcode, qrcodeUrl: data.qrcode_img_content };
22
31
  }
23
- /** Step 2: Poll for scan result */
32
+ /** Step 2: Poll for scan result. */
24
33
  export async function waitForLogin(params) {
25
- const { apiBaseUrl, timeoutMs = 480000 } = params;
34
+ const { apiBaseUrl, timeoutMs = 480000, signal, onEvent } = params;
26
35
  let currentQrcodeId = params.qrcodeId;
27
36
  const deadline = Date.now() + timeoutMs;
28
37
  let retryCount = 0;
29
38
  while (Date.now() < deadline) {
39
+ if (signal?.aborted) {
40
+ return {
41
+ connected: false,
42
+ message: 'Login cancelled.',
43
+ reason: 'cancelled',
44
+ };
45
+ }
30
46
  try {
31
47
  const controller = new AbortController();
32
48
  const timeout = setTimeout(() => controller.abort(), 60000);
33
- const resp = await fetch(`${apiBaseUrl}/ilink/bot/get_qrcode_status?qrcode=${encodeURIComponent(currentQrcodeId)}`, {
34
- headers: buildHeaders(),
35
- signal: controller.signal,
36
- });
37
- clearTimeout(timeout);
38
- if (!resp.ok)
39
- throw new Error(`HTTP ${resp.status}`);
40
- const data = (await resp.json());
49
+ const onAbort = () => controller.abort();
50
+ signal?.addEventListener('abort', onAbort, { once: true });
51
+ // `fetch` resolves when the headers arrive, so the listener and the
52
+ // timeout must stay armed through the body read too. Detaching them
53
+ // here would leave an upstream that sends headers and then stalls both
54
+ // uncancellable and unbounded — cancel, revoke and shutdown would all
55
+ // return while the request stayed open.
56
+ let data;
57
+ try {
58
+ const resp = await fetch(`${apiBaseUrl}/ilink/bot/get_qrcode_status?qrcode=${encodeURIComponent(currentQrcodeId)}`, {
59
+ headers: buildHeaders(),
60
+ signal: controller.signal,
61
+ });
62
+ if (!resp.ok)
63
+ throw new Error(`HTTP ${resp.status}`);
64
+ data = (await resp.json());
65
+ }
66
+ finally {
67
+ clearTimeout(timeout);
68
+ signal?.removeEventListener('abort', onAbort);
69
+ }
41
70
  switch (data.status) {
42
71
  case 'confirmed':
43
72
  return {
@@ -48,7 +77,7 @@ export async function waitForLogin(params) {
48
77
  message: 'Connected to WeChat successfully!',
49
78
  };
50
79
  case 'scaned':
51
- process.stderr.write('QR code scanned, waiting for confirmation...\n');
80
+ onEvent?.({ type: 'scanned' });
52
81
  break;
53
82
  case 'expired':
54
83
  retryCount++;
@@ -56,23 +85,60 @@ export async function waitForLogin(params) {
56
85
  return {
57
86
  connected: false,
58
87
  message: 'QR code expired after maximum retries.',
88
+ reason: 'expired',
59
89
  };
60
90
  }
61
- process.stderr.write('QR code expired, refreshing...\n');
62
- currentQrcodeId = await startLogin(apiBaseUrl);
91
+ onEvent?.({ type: 'expired' });
92
+ {
93
+ const refreshed = await startLogin(apiBaseUrl, { signal });
94
+ // A refresh that yields no scannable URL is not a replacement:
95
+ // publishing it would overwrite a view with one that has nothing
96
+ // to scan and no link to open. Keep the expired id instead, so the
97
+ // next poll spends another retry and the budget — not a dead view —
98
+ // decides when to stop.
99
+ if (refreshed.qrcodeUrl) {
100
+ currentQrcodeId = refreshed.qrcodeId;
101
+ onEvent?.({ type: 'qrcode', ...refreshed });
102
+ }
103
+ }
63
104
  break;
64
105
  default:
65
106
  break;
66
107
  }
67
108
  }
68
109
  catch (err) {
69
- if (err instanceof Error && err.name === 'AbortError') {
110
+ // Two names for the same outcome. The poll's bound is a plain
111
+ // AbortController, so it rejects with AbortError; the mint's bound is
112
+ // `AbortSignal.timeout`, which rejects with TimeoutError. Retrying only
113
+ // the first turned one stalled refresh into a failed login with most of
114
+ // the budget unspent. The retry budget still bounds this: the next poll
115
+ // reports `expired` again and spends another retry.
116
+ if (err instanceof Error &&
117
+ (err.name === 'AbortError' || err.name === 'TimeoutError')) {
70
118
  continue;
71
119
  }
72
120
  throw err;
73
121
  }
74
- await new Promise((r) => setTimeout(r, 1000));
122
+ // An abort during the idle second must settle the loop now, not after the
123
+ // full sleep — a cancelled daemon flow would otherwise keep a timer alive.
124
+ // Both exits detach the listener: a 480 s loop otherwise accumulates one
125
+ // listener per tick on the caller's signal.
126
+ await new Promise((resolve) => {
127
+ if (signal?.aborted) {
128
+ resolve();
129
+ return;
130
+ }
131
+ const onAbort = () => {
132
+ clearTimeout(timer);
133
+ resolve();
134
+ };
135
+ const timer = setTimeout(() => {
136
+ signal?.removeEventListener('abort', onAbort);
137
+ resolve();
138
+ }, 1000);
139
+ signal?.addEventListener('abort', onAbort, { once: true });
140
+ });
75
141
  }
76
- return { connected: false, message: 'Login timed out.' };
142
+ return { connected: false, message: 'Login timed out.', reason: 'timeout' };
77
143
  }
78
144
  //# sourceMappingURL=login.js.map
package/dist/login.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAUxC,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,UAAkB;IACjD,MAAM,IAAI,GAAG,MAAM,KAAK,CACtB,GAAG,UAAU,sCAAsC,EACnD;QACE,OAAO,EAAE,YAAY,EAAE;KACxB,CACF,CAAC;IACF,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAG9B,CAAC;IAEF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,gBAAgB,IAAI,CAAC,kBAAkB,gCAAgC,CACxE,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACnE,OA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O,EAAE,CAAC;gBACV,OAAO;YACT,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,EAAE;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC;YACF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC5B,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBAC9C,OAAO,EAAE,CAAC;YACZ,CAAC,EAAE,IAAI,CAAC,CAAC;YACT,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC9E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/channel-weixin",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
4
4
  "description": "WeChat (Weixin) channel adapter for Qwen Code",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@qwen-code/channel-base": "0.27.1"
31
+ "@qwen-code/channel-base": "0.27.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "typescript": "^5.0.0"