aai-lark-bridge 0.2.34 → 0.2.35

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/cli.js CHANGED
@@ -4,7 +4,7 @@ import { Command } from "commander";
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "aai-lark-bridge",
7
- version: "0.2.34",
7
+ version: "0.2.35",
8
8
  description: "Lark AI Native Bridge - Lark\u57FA\u7840\u8BBE\u65BD\u5C42\u548CCLI\u96C6\u6210",
9
9
  type: "module",
10
10
  main: "./dist/index.js",
@@ -7244,12 +7244,10 @@ function createClaudeSeat(opts) {
7244
7244
  if (!c) return { status: await startLogin(openId) };
7245
7245
  const recent = now() - (refreshedAt.get(openId) ?? -Infinity) < REFRESH_COOLDOWN_MS && c.expiresAt - now() >= MIN_AFTER_REFRESH_MS;
7246
7246
  if (c.expiresAt - now() < MIN_TOKEN_LEFT_MS && !recent) {
7247
- const before = c.expiresAt;
7248
7247
  const ok = await opts.cli.refresh(dir).catch(() => false);
7249
7248
  c = readCredentials(dir);
7250
7249
  const left = c ? c.expiresAt - now() : 0;
7251
- const fresh = Boolean(c) && (left >= MIN_TOKEN_LEFT_MS || c.expiresAt > before && left >= MIN_AFTER_REFRESH_MS);
7252
- if (!ok || !c || !fresh) {
7250
+ if (!ok || !c || left < MIN_AFTER_REFRESH_MS) {
7253
7251
  log.warn("user-gateway", "claude.refresh-failed", { sender: tail62(openId), proof, runId });
7254
7252
  return { status: "refresh_failed" };
7255
7253
  }