appostle-installer 0.0.16 → 0.0.17

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/appostle.js CHANGED
@@ -37370,6 +37370,7 @@ var Session = class _Session {
37370
37370
  this.getSpeechReadiness = dictation?.getSpeechReadiness;
37371
37371
  this.agentProviderRuntimeSettings = agentProviderRuntimeSettings;
37372
37372
  this.providerOverrides = providerOverrides;
37373
+ this.onAccountLinked = options.onAccountLinked;
37373
37374
  this.abortController = new AbortController();
37374
37375
  this.providerRegistry = buildProviderRegistry(this.sessionLogger, {
37375
37376
  runtimeSettings: this.agentProviderRuntimeSettings,
@@ -38681,9 +38682,20 @@ var Session = class _Session {
38681
38682
  savePersistedConfig(this.appostleHome, nextConfig, log2);
38682
38683
  log2.info(
38683
38684
  { hostId: body.hostId, userId: body.userId, authServerUrl },
38684
- "daemon linked to account \u2014 restart daemon to start allow-list sync"
38685
+ "daemon linked to account \u2014 starting allow-list sync"
38685
38686
  );
38686
38687
  respond({ ok: true, hostId: body.hostId, userId: body.userId });
38688
+ if (this.onAccountLinked) {
38689
+ void this.onAccountLinked({
38690
+ daemonToken: body.daemonToken,
38691
+ serverPubkey: body.serverPubkey,
38692
+ userId: body.userId,
38693
+ hostId: body.hostId,
38694
+ authServerUrl
38695
+ }).catch((err) => {
38696
+ log2.error({ err }, "onAccountLinked callback failed");
38697
+ });
38698
+ }
38687
38699
  } catch (err) {
38688
38700
  const message = err instanceof Error ? err.message : "unknown_error";
38689
38701
  log2.error({ err }, "link_account_request: unexpected error");