@agentunion/fastaun-browser 0.4.0 → 0.4.1

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/bundle.js CHANGED
@@ -454,7 +454,7 @@ var init_indexeddb_store = __esm({
454
454
  });
455
455
 
456
456
  // src/version.ts
457
- var VERSION = "0.4.0";
457
+ var VERSION = "0.4.1";
458
458
 
459
459
  // src/types.ts
460
460
  var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
@@ -749,7 +749,6 @@ var DEFAULTS = {
749
749
  aunPath: "aun",
750
750
  rootCaPem: null,
751
751
  seedPassword: null,
752
- discoveryPort: null,
753
752
  groupE2ee: true,
754
753
  verifySsl: true,
755
754
  requireForwardSecrecy: true,
@@ -769,7 +768,6 @@ function createConfig(raw) {
769
768
  data.seedPassword ?? data.seed_password ?? data.encryptionSeed ?? data.encryption_seed,
770
769
  DEFAULTS.seedPassword
771
770
  ),
772
- discoveryPort: readOptionalNumber(data.discoveryPort ?? data.discovery_port, DEFAULTS.discoveryPort),
773
771
  groupE2ee: true,
774
772
  // 必备能力,不可配置
775
773
  verifySsl: DEFAULTS.verifySsl,
@@ -9688,6 +9686,9 @@ var AID = class _AID {
9688
9686
  __publicField(this, "certIssuer");
9689
9687
  __publicField(this, "deviceId");
9690
9688
  __publicField(this, "slotId");
9689
+ __publicField(this, "verifySsl");
9690
+ __publicField(this, "rootCaPath");
9691
+ __publicField(this, "debug");
9691
9692
  __publicField(this, "_privateKeyPem");
9692
9693
  __publicField(this, "_certValid");
9693
9694
  __publicField(this, "_privateKeyValid");
@@ -9696,6 +9697,9 @@ var AID = class _AID {
9696
9697
  this.aunPath = params.aunPath;
9697
9698
  this.deviceId = params.deviceId ?? "";
9698
9699
  this.slotId = params.slotId ?? "default";
9700
+ this.verifySsl = params.verifySsl ?? true;
9701
+ this.rootCaPath = params.rootCaPath ?? null;
9702
+ this.debug = params.debug ?? false;
9699
9703
  this.certPem = params.certPem;
9700
9704
  this.publicKey = publicKeyDerB64(params.certPem);
9701
9705
  const meta = parseCertMetadata(params.certPem);
@@ -10007,11 +10011,8 @@ function agentMdHttpScheme(gatewayUrl) {
10007
10011
  const raw = String(gatewayUrl ?? "").trim().toLowerCase();
10008
10012
  return raw.startsWith("ws://") ? "http" : "https";
10009
10013
  }
10010
- function agentMdAuthority(aid, discoveryPort) {
10011
- const host = String(aid ?? "").trim();
10012
- if (!host) return "";
10013
- if (discoveryPort && !host.includes(":")) return `${host}:${discoveryPort}`;
10014
- return host;
10014
+ function agentMdAuthority(aid) {
10015
+ return String(aid ?? "").trim();
10015
10016
  }
10016
10017
  async function fetchWithTimeout(input, init, timeoutMs = AGENT_MD_HTTP_TIMEOUT_MS) {
10017
10018
  const controller = new AbortController();
@@ -10307,12 +10308,6 @@ function normalizeDeliveryModeConfig(raw, opts = {}) {
10307
10308
  affinity_ttl_ms: affinityTtlMs
10308
10309
  };
10309
10310
  }
10310
- function assertClientOptions(value, label) {
10311
- if (value == null) return;
10312
- if (typeof value !== "object" || Array.isArray(value) || value instanceof AID) {
10313
- throw new ValidationError(`${label} must be an options object`);
10314
- }
10315
- }
10316
10311
  function clientOptionsConfig(options) {
10317
10312
  const raw = { ...options ?? {} };
10318
10313
  if (Object.prototype.hasOwnProperty.call(raw, "aid")) {
@@ -10323,7 +10318,7 @@ function clientOptionsConfig(options) {
10323
10318
  return raw;
10324
10319
  }
10325
10320
  var _AUNClient = class _AUNClient {
10326
- constructor(first, second) {
10321
+ constructor(aid) {
10327
10322
  /** SDK 配置模型 */
10328
10323
  __publicField(this, "configModel");
10329
10324
  /** 原始配置字典 */
@@ -10433,21 +10428,14 @@ var _AUNClient = class _AUNClient {
10433
10428
  */
10434
10429
  __publicField(this, "_v2PullInflight", false);
10435
10430
  __publicField(this, "_v2PullPending", false);
10436
- if (typeof first === "string") {
10431
+ const inputAid = aid instanceof AID ? aid : null;
10432
+ if (typeof aid === "string") {
10437
10433
  throw new ValidationError("AUNClient aid must be an AID object, not a string");
10438
10434
  }
10439
- if (typeof second === "boolean") {
10440
- throw new ValidationError("AUNClient debug must be passed as options.debug");
10441
- }
10442
- const inputAid = first instanceof AID ? first : null;
10443
- if (!inputAid && second !== void 0) {
10444
- throw new ValidationError("AUNClient options-only construction accepts a single options object");
10445
- }
10446
- const options = inputAid ? second ?? {} : first ?? {};
10447
- assertClientOptions(options, "AUNClient options");
10435
+ const options = {};
10448
10436
  const rawConfig = clientOptionsConfig(options);
10449
10437
  if (inputAid) rawConfig.aun_path = inputAid.aunPath;
10450
- const _debug = !!options?.debug;
10438
+ const _debug = false;
10451
10439
  this.configModel = createConfig(rawConfig);
10452
10440
  const initAid = inputAid ? inputAid.aid : null;
10453
10441
  this.config = {
@@ -10575,7 +10563,7 @@ var _AUNClient = class _AUNClient {
10575
10563
  gatewayUrl = "";
10576
10564
  }
10577
10565
  }
10578
- const authority = agentMdAuthority(target, this.configModel.discoveryPort);
10566
+ const authority = agentMdAuthority(target);
10579
10567
  return `${agentMdHttpScheme(gatewayUrl)}://${authority}/agent.md`;
10580
10568
  }
10581
10569
  async _ensureAgentMdUploadToken(aid, gatewayUrl) {
@@ -11302,7 +11290,7 @@ var _AUNClient = class _AUNClient {
11302
11290
  throw new StateError("authenticate requires a loaded AID with a valid private key");
11303
11291
  }
11304
11292
  const publicState = this.state;
11305
- if (publicState !== "standby" /* STANDBY */ && publicState !== "authenticated" /* AUTHENTICATED */) {
11293
+ if (publicState !== "standby" /* STANDBY */) {
11306
11294
  throw new StateError(`authenticate not allowed in state ${publicState}`);
11307
11295
  }
11308
11296
  if ("aid" in options || "access_token" in options || "token" in options || "kite_token" in options) {
@@ -11324,15 +11312,25 @@ var _AUNClient = class _AUNClient {
11324
11312
  }
11325
11313
  }
11326
11314
  /** 连接到 Gateway;身份来自构造函数或 loadIdentity(aid),认证由 SDK 内部自动完成。 */
11327
- async connect(options = {}) {
11315
+ async connect(opts) {
11328
11316
  const tStart = Date.now();
11329
- this._clientLog.debug(`connect enter: state=${this._state} aid=${this._aid ?? "-"}`);
11330
- if (arguments.length > 1) {
11331
- throw new ValidationError("connect accepts a single options object");
11317
+ const options = {};
11318
+ if (opts?.auto_reconnect !== void 0) options.auto_reconnect = opts.auto_reconnect;
11319
+ if (opts?.heartbeat_interval !== void 0) options.heartbeat_interval = opts.heartbeat_interval;
11320
+ if (opts?.connect_timeout !== void 0 || opts?.call_timeout !== void 0) {
11321
+ options.timeouts = {
11322
+ ...opts.connect_timeout !== void 0 ? { connect: opts.connect_timeout } : {},
11323
+ ...opts.call_timeout !== void 0 ? { call: opts.call_timeout } : {}
11324
+ };
11332
11325
  }
11333
- if ("aid" in options || "access_token" in options || "token" in options || "kite_token" in options) {
11334
- throw new ValidationError("connect options must not include aid or token fields; load an AID object first");
11326
+ if (opts?.retry_initial_delay !== void 0 || opts?.retry_max_delay !== void 0 || opts?.retry_max_attempts !== void 0) {
11327
+ options.retry = {
11328
+ initial_delay: opts.retry_initial_delay ?? 1,
11329
+ max_delay: opts.retry_max_delay ?? 64,
11330
+ max_attempts: opts.retry_max_attempts ?? 0
11331
+ };
11335
11332
  }
11333
+ this._clientLog.debug(`connect enter: state=${this._state} aid=${this._aid ?? "-"}`);
11336
11334
  const target = this._currentAid?.aid ?? this._aid ?? "";
11337
11335
  if (!target || !this._currentAid?.isPrivateKeyValid()) {
11338
11336
  throw new StateError("connect requires a loaded AID with a valid private key");
@@ -11348,8 +11346,11 @@ var _AUNClient = class _AUNClient {
11348
11346
  this._clientLog.debug(`connect exit (error): elapsed=${Date.now() - tStart}ms err=invalid_state state=${this._state}`);
11349
11347
  throw new StateError(`connect not allowed in state ${publicState}`);
11350
11348
  }
11349
+ if (!this._gatewayUrl) {
11350
+ await this.authenticate();
11351
+ }
11351
11352
  this._state = "connecting";
11352
- const gateway = String(options.gateway ?? this._gatewayUrl ?? await this._resolveGatewayForAid(target)).trim();
11353
+ const gateway = String(this._gatewayUrl ?? "").trim();
11353
11354
  const params = { ...options, gateway };
11354
11355
  const normalized = this._normalizeConnectParams(params);
11355
11356
  this._sessionParams = normalized;
@@ -11397,7 +11398,7 @@ var _AUNClient = class _AUNClient {
11397
11398
  }
11398
11399
  await this._transport.close();
11399
11400
  this._state = "disconnected";
11400
- await this._dispatcher.publish("connection.state", { state: this._publicState(this._state) });
11401
+ await this._dispatcher.publish("state_change", { state: this._publicState(this._state) });
11401
11402
  this._clientLog.debug(`disconnect exit: elapsed=${Date.now() - tStart}ms`);
11402
11403
  }
11403
11404
  /** 关闭连接 */
@@ -11424,7 +11425,7 @@ var _AUNClient = class _AUNClient {
11424
11425
  }
11425
11426
  await this._transport.close();
11426
11427
  this._state = "closed";
11427
- await this._dispatcher.publish("connection.state", { state: this._publicState(this._state) });
11428
+ await this._dispatcher.publish("state_change", { state: this._publicState(this._state) });
11428
11429
  this._resetSeqTrackingState();
11429
11430
  this._clientLog.debug(`close exit: elapsed=${Date.now() - tStart}ms`);
11430
11431
  }
@@ -13148,7 +13149,7 @@ var _AUNClient = class _AUNClient {
13148
13149
  }
13149
13150
  this._state = "connected";
13150
13151
  this._connectedAt = Date.now();
13151
- await this._dispatcher.publish("connection.state", {
13152
+ await this._dispatcher.publish("state_change", {
13152
13153
  state: this._publicState(this._state),
13153
13154
  gateway: gatewayUrl
13154
13155
  });
@@ -13191,7 +13192,7 @@ var _AUNClient = class _AUNClient {
13191
13192
  }
13192
13193
  const dotIdx = target.indexOf(".");
13193
13194
  const issuerDomain = dotIdx >= 0 ? target.slice(dotIdx + 1) : target;
13194
- const portSuffix = this.configModel.discoveryPort ? `:${this.configModel.discoveryPort}` : "";
13195
+ const portSuffix = "";
13195
13196
  const candidates = [
13196
13197
  `https://${target}${portSuffix}/.well-known/aun-gateway`,
13197
13198
  `https://gateway.${issuerDomain}${portSuffix}/.well-known/aun-gateway`
@@ -13594,7 +13595,7 @@ var _AUNClient = class _AUNClient {
13594
13595
  if (this._closing || this._state === "closed") return;
13595
13596
  this._state = "disconnected";
13596
13597
  this._stopBackgroundTasks();
13597
- await this._dispatcher.publish("connection.state", {
13598
+ await this._dispatcher.publish("state_change", {
13598
13599
  state: this._publicState(this._state),
13599
13600
  error
13600
13601
  });
@@ -13617,7 +13618,7 @@ var _AUNClient = class _AUNClient {
13617
13618
  if (disconnectInfo.code !== void 0 && disconnectInfo.code !== null) {
13618
13619
  eventPayload.code = disconnectInfo.code;
13619
13620
  }
13620
- await this._dispatcher.publish("connection.state", eventPayload);
13621
+ await this._dispatcher.publish("state_change", eventPayload);
13621
13622
  return;
13622
13623
  }
13623
13624
  const serverInitiated = closeCode !== void 0 && closeCode !== 1e3 && closeCode !== 1006;
@@ -13647,7 +13648,7 @@ var _AUNClient = class _AUNClient {
13647
13648
  this._nextRetryAt = null;
13648
13649
  this._reconnectActive = false;
13649
13650
  this._reconnectAbort = null;
13650
- await this._dispatcher.publish("connection.state", {
13651
+ await this._dispatcher.publish("state_change", {
13651
13652
  state: this._publicState(this._state),
13652
13653
  attempt: attempt - 1,
13653
13654
  reason: "max_attempts_exhausted"
@@ -13658,7 +13659,7 @@ var _AUNClient = class _AUNClient {
13658
13659
  const sleepMs = reconnectSleepDelaySeconds(delay, maxBaseDelay) * 1e3;
13659
13660
  this._nextRetryAt = new Date(Date.now() + sleepMs);
13660
13661
  this._state = "retry_backoff";
13661
- await this._dispatcher.publish("connection.state", {
13662
+ await this._dispatcher.publish("state_change", {
13662
13663
  state: this._publicState(this._state),
13663
13664
  attempt,
13664
13665
  next_retry_at: this._nextRetryAt.getTime() / 1e3
@@ -13671,7 +13672,7 @@ var _AUNClient = class _AUNClient {
13671
13672
  return;
13672
13673
  }
13673
13674
  this._state = "reconnecting";
13674
- await this._dispatcher.publish("connection.state", {
13675
+ await this._dispatcher.publish("state_change", {
13675
13676
  state: this._publicState(this._state),
13676
13677
  attempt
13677
13678
  });
@@ -13707,7 +13708,7 @@ var _AUNClient = class _AUNClient {
13707
13708
  this._nextRetryAt = null;
13708
13709
  this._reconnectActive = false;
13709
13710
  this._reconnectAbort = null;
13710
- await this._dispatcher.publish("connection.state", {
13711
+ await this._dispatcher.publish("state_change", {
13711
13712
  state: this._publicState(this._state),
13712
13713
  error: formatCaughtError(exc),
13713
13714
  attempt
@@ -16184,10 +16185,9 @@ function gatewayHttpUrl3(gatewayUrl, path) {
16184
16185
  function pkiCertUrl(gatewayUrl, aid) {
16185
16186
  return gatewayHttpUrl3(gatewayUrl, `/pki/cert/${encodeURIComponent(aid)}`);
16186
16187
  }
16187
- function agentMdUrl(aid, gatewayUrl, discoveryPort) {
16188
+ function agentMdUrl(aid, gatewayUrl) {
16188
16189
  const scheme = String(gatewayUrl ?? "").trim().toLowerCase().startsWith("ws://") ? "http" : "https";
16189
- let host = String(aid ?? "").trim();
16190
- if (discoveryPort && !host.includes(":")) host = `${host}:${discoveryPort}`;
16190
+ const host = String(aid ?? "").trim();
16191
16191
  return `${scheme}://${host}/agent.md`;
16192
16192
  }
16193
16193
  async function fetchWithTimeout2(input, init = {}, timeoutMs = 3e4) {
@@ -16213,7 +16213,6 @@ var AIDStore = class {
16213
16213
  __publicField(this, "_crypto");
16214
16214
  __publicField(this, "_discovery");
16215
16215
  __publicField(this, "_verifySsl");
16216
- __publicField(this, "_discoveryPort");
16217
16216
  __publicField(this, "_gatewayCache", /* @__PURE__ */ new Map());
16218
16217
  __publicField(this, "_agentMdCache", /* @__PURE__ */ new Map());
16219
16218
  this.aunPath = String(opts.aunPath ?? "");
@@ -16221,7 +16220,6 @@ var AIDStore = class {
16221
16220
  this.deviceId = opts.deviceId ? normalizeInstanceId(opts.deviceId, "deviceId", { allowEmpty: true }) : getDeviceId();
16222
16221
  this.slotId = normalizeSlotId(opts.slotId);
16223
16222
  this._verifySsl = opts.verifySsl ?? true;
16224
- this._discoveryPort = opts.discoveryPort ?? null;
16225
16223
  this._keystore = new IndexedDBKeyStore({ encryptionSeed: this._encryptionSeed || void 0 });
16226
16224
  this._crypto = new CryptoProvider();
16227
16225
  this._discovery = new GatewayDiscovery();
@@ -16279,7 +16277,10 @@ var AIDStore = class {
16279
16277
  certValid: true,
16280
16278
  privateKeyValid: false,
16281
16279
  deviceId: this.deviceId,
16282
- slotId: this.slotId
16280
+ slotId: this.slotId,
16281
+ verifySsl: this._verifySsl,
16282
+ rootCaPath: null,
16283
+ debug: false
16283
16284
  })
16284
16285
  });
16285
16286
  }
@@ -16307,7 +16308,10 @@ var AIDStore = class {
16307
16308
  certValid: true,
16308
16309
  privateKeyValid: true,
16309
16310
  deviceId: this.deviceId,
16310
- slotId: this.slotId
16311
+ slotId: this.slotId,
16312
+ verifySsl: this._verifySsl,
16313
+ rootCaPath: null,
16314
+ debug: false
16311
16315
  })
16312
16316
  });
16313
16317
  }
@@ -16393,18 +16397,17 @@ var AIDStore = class {
16393
16397
  if (!reloaded.ok) return reloaded;
16394
16398
  peer = reloaded.data.aid;
16395
16399
  }
16396
- const source = { certFromCache, cert_from_cache: certFromCache, agentMdFetched: false, agent_md_fetched: false };
16400
+ const source = { cert_from_cache: certFromCache, agent_md_fetched: false };
16397
16401
  if (skipAgentMd) return resultOk({ aid: peer, source });
16398
- const agentMd = await this.fetchAgentMd(target);
16402
+ const agentMd = await this.fetchAgentMd(target, opts?.timeout);
16399
16403
  if (!agentMd.ok) return agentMd;
16400
- source.agentMdFetched = true;
16401
16404
  source.agent_md_fetched = true;
16402
- return resultOk({ aid: peer, agentMd: agentMd.data, agent_md: agentMd.data, source });
16405
+ return resultOk({ aid: peer, agent_md: agentMd.data, source });
16403
16406
  } catch (exc) {
16404
16407
  return resultErr(NETWORK_ERROR, String(exc), exc);
16405
16408
  }
16406
16409
  }
16407
- async fetchAgentMd(aid) {
16410
+ async fetchAgentMd(aid, timeoutMs = 3e4) {
16408
16411
  const target = String(aid ?? "").trim();
16409
16412
  try {
16410
16413
  const gatewayUrl = await this._resolveGateway(target);
@@ -16412,10 +16415,10 @@ var AIDStore = class {
16412
16415
  const headers = { Accept: "text/markdown" };
16413
16416
  if (cached.etag) headers["If-None-Match"] = cached.etag;
16414
16417
  if (cached.lastModified) headers["If-Modified-Since"] = cached.lastModified;
16415
- const response = await fetchWithTimeout2(agentMdUrl(target, gatewayUrl, this._discoveryPort), {
16418
+ const response = await fetchWithTimeout2(agentMdUrl(target, gatewayUrl), {
16416
16419
  method: "GET",
16417
16420
  headers
16418
- }, 3e4);
16421
+ }, timeoutMs);
16419
16422
  let content = "";
16420
16423
  if (response.status === 304 && cached.content) {
16421
16424
  content = cached.content;
@@ -16447,13 +16450,9 @@ var AIDStore = class {
16447
16450
  aid: target,
16448
16451
  content,
16449
16452
  verification,
16450
- signature,
16451
- certPem: peer.certPem,
16452
16453
  cert_pem: peer.certPem,
16453
16454
  etag,
16454
- lastModified,
16455
- last_modified: lastModified,
16456
- status: response.status
16455
+ last_modified: lastModified
16457
16456
  });
16458
16457
  } catch (exc) {
16459
16458
  return resultErr(NETWORK_ERROR, String(exc), exc);
@@ -16463,7 +16462,7 @@ var AIDStore = class {
16463
16462
  const target = String(aid ?? "").trim();
16464
16463
  try {
16465
16464
  const gatewayUrl = await this._resolveGateway(target);
16466
- const response = await fetchWithTimeout2(agentMdUrl(target, gatewayUrl, this._discoveryPort), {
16465
+ const response = await fetchWithTimeout2(agentMdUrl(target, gatewayUrl), {
16467
16466
  method: "HEAD",
16468
16467
  headers: { Accept: "text/markdown" }
16469
16468
  }, 15e3);
@@ -16482,11 +16481,8 @@ var AIDStore = class {
16482
16481
  aid: target,
16483
16482
  found: true,
16484
16483
  etag,
16485
- lastModified,
16486
16484
  last_modified: lastModified,
16487
- contentLength,
16488
- content_length: contentLength,
16489
- status: response.status
16485
+ content_length: contentLength
16490
16486
  });
16491
16487
  } catch (exc) {
16492
16488
  return resultErr(NETWORK_ERROR, String(exc), exc);
@@ -16513,19 +16509,11 @@ var AIDStore = class {
16513
16509
  const needsUpdate = remoteFound && (!localFound || !!remoteEtag && remoteEtag !== localEtag);
16514
16510
  return resultOk({
16515
16511
  aid: target,
16516
- localFound,
16517
16512
  local_found: localFound,
16518
- remoteFound,
16519
16513
  remote_found: remoteFound,
16520
- localEtag,
16521
16514
  local_etag: localEtag,
16522
- remoteEtag,
16523
16515
  remote_etag: remoteEtag,
16524
- lastModified: String(remote.lastModified ?? remote.last_modified ?? ""),
16525
- last_modified: String(remote.last_modified ?? remote.lastModified ?? ""),
16526
- needsUpdate,
16527
16516
  needs_update: needsUpdate,
16528
- ttlDays,
16529
16517
  ttl_days: ttlDays
16530
16518
  });
16531
16519
  }
@@ -16590,7 +16578,7 @@ var AIDStore = class {
16590
16578
  if (!refreshed.ok) return resultErr(CERT_RENEWAL_FAILED, "renewed certificate reload failed");
16591
16579
  return resultOk({
16592
16580
  renewed: true,
16593
- newFingerprint: refreshed.data.aid.certFingerprint,
16581
+ new_cert_not_after: refreshed.data.aid.certNotAfter,
16594
16582
  new_fingerprint: refreshed.data.aid.certFingerprint
16595
16583
  });
16596
16584
  } catch (exc) {
@@ -16640,7 +16628,7 @@ var AIDStore = class {
16640
16628
  if (!refreshed.ok) return resultErr(REKEY_FAILED, "rekeyed identity reload failed");
16641
16629
  return resultOk({
16642
16630
  rekeyed: true,
16643
- newFingerprint: refreshed.data.aid.certFingerprint,
16631
+ new_cert_not_after: refreshed.data.aid.certNotAfter,
16644
16632
  new_fingerprint: refreshed.data.aid.certFingerprint
16645
16633
  });
16646
16634
  } catch (exc) {
@@ -16658,7 +16646,7 @@ var AIDStore = class {
16658
16646
  this._gatewayCache.set(issuerDomain, persisted);
16659
16647
  return persisted;
16660
16648
  }
16661
- const port = this._discoveryPort ? `:${this._discoveryPort}` : "";
16649
+ const port = "";
16662
16650
  const candidates = [
16663
16651
  `https://${target}${port}/.well-known/aun-gateway`,
16664
16652
  `https://gateway.${issuerDomain}${port}/.well-known/aun-gateway`
package/dist/client.d.ts CHANGED
@@ -3,18 +3,19 @@ import { type EventHandler, type Subscription } from './events.js';
3
3
  import { GatewayDiscovery } from './discovery.js';
4
4
  import { ConnectionState, type RpcParams, type RpcResult } from './types.js';
5
5
  import { AID } from './aid.js';
6
+ export interface ConnectionOptions {
7
+ auto_reconnect?: boolean;
8
+ connect_timeout?: number;
9
+ retry_initial_delay?: number;
10
+ retry_max_delay?: number;
11
+ retry_max_attempts?: number;
12
+ heartbeat_interval?: number;
13
+ call_timeout?: number;
14
+ }
6
15
  export interface AUNClientOptions extends Record<string, unknown> {
7
- aun_path?: string;
8
- aunPath?: string;
9
16
  root_ca_pem?: string;
10
17
  rootCaPem?: string;
11
18
  root_ca_path?: string;
12
- seed_password?: string;
13
- seedPassword?: string;
14
- encryption_seed?: string;
15
- encryptionSeed?: string;
16
- discovery_port?: number;
17
- discoveryPort?: number;
18
19
  verify_ssl?: boolean;
19
20
  verifySSL?: boolean;
20
21
  verifySsl?: boolean;
@@ -141,8 +142,7 @@ export declare class AUNClient {
141
142
  private _logKeystore;
142
143
  private _logDiscovery;
143
144
  private _logEvents;
144
- constructor(options?: AUNClientOptions | null);
145
- constructor(aid: AID, options?: AUNClientOptions | null);
145
+ constructor(aid?: AID);
146
146
  get aid(): string | null;
147
147
  private _setAgentMdRoot;
148
148
  private _resolveAgentMdUrl;
@@ -232,7 +232,7 @@ export declare class AUNClient {
232
232
  /** 仅认证当前身份,获取/刷新 token,但不建立长连接。 */
233
233
  authenticate(options?: RpcParams): Promise<Record<string, unknown>>;
234
234
  /** 连接到 Gateway;身份来自构造函数或 loadIdentity(aid),认证由 SDK 内部自动完成。 */
235
- connect(options?: RpcParams): Promise<void>;
235
+ connect(opts?: ConnectionOptions): Promise<void>;
236
236
  /** 断开连接但保留本地状态,可再次 connect */
237
237
  disconnect(): Promise<void>;
238
238
  /** 关闭连接 */
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAOA,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAsC,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,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