@tinycloud/sdk-core 3.12.0-beta.3 → 3.12.0-beta.4

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/index.d.cts CHANGED
@@ -3882,8 +3882,8 @@ declare function verifyRegistryCacheEntry(subject: string, ownerKey: string, ent
3882
3882
  /**
3883
3883
  * Signed-v2 registry policy for host resolution and space creation (TC-2481).
3884
3884
  * Every routing decision awaits a bounded refresh. A reverified cache younger
3885
- * than one hour can serve transport/timeouts or HTTP 502/503/504 only. Genuine
3886
- * absence and cold outages retain onboarding; invalid or known absent state refuses.
3885
+ * than one hour can serve transport/timeouts or HTTP 502/503/504 only.
3886
+ * Only verified absence permits onboarding; an outage without saved settings refuses.
3887
3887
  *
3888
3888
  * V2 owner keys are chain-independent: EOA records use the exact EIP-55
3889
3889
  * address and did:key records use the exact DID. V1 probes distinguish
@@ -4008,9 +4008,9 @@ interface LookupOwnerRegistryVerdictOptions {
4008
4008
  onRegistryFallback?: (reason: string, code?: RegistryFallbackReason) => void;
4009
4009
  }
4010
4010
  /**
4011
- * {@link resolveOwnerHosts} for policy decisions: a lookup that throws, or no
4012
- * configured registry, becomes {@link RegistryUnavailableError}. An
4013
- * `unavailable` verdict is returned as a verdict.
4011
+ * {@link resolveOwnerHosts} for policy decisions: a lookup that throws, no
4012
+ * configured registry, or cold outage without saved settings becomes
4013
+ * {@link RegistryUnavailableError}. Other `unavailable` verdicts remain verdicts.
4014
4014
  */
4015
4015
  declare function lookupOwnerRegistryVerdict(subject: string, options?: LookupOwnerRegistryVerdictOptions): Promise<RegistryVerdict>;
4016
4016
  /**
package/dist/index.d.ts CHANGED
@@ -3882,8 +3882,8 @@ declare function verifyRegistryCacheEntry(subject: string, ownerKey: string, ent
3882
3882
  /**
3883
3883
  * Signed-v2 registry policy for host resolution and space creation (TC-2481).
3884
3884
  * Every routing decision awaits a bounded refresh. A reverified cache younger
3885
- * than one hour can serve transport/timeouts or HTTP 502/503/504 only. Genuine
3886
- * absence and cold outages retain onboarding; invalid or known absent state refuses.
3885
+ * than one hour can serve transport/timeouts or HTTP 502/503/504 only.
3886
+ * Only verified absence permits onboarding; an outage without saved settings refuses.
3887
3887
  *
3888
3888
  * V2 owner keys are chain-independent: EOA records use the exact EIP-55
3889
3889
  * address and did:key records use the exact DID. V1 probes distinguish
@@ -4008,9 +4008,9 @@ interface LookupOwnerRegistryVerdictOptions {
4008
4008
  onRegistryFallback?: (reason: string, code?: RegistryFallbackReason) => void;
4009
4009
  }
4010
4010
  /**
4011
- * {@link resolveOwnerHosts} for policy decisions: a lookup that throws, or no
4012
- * configured registry, becomes {@link RegistryUnavailableError}. An
4013
- * `unavailable` verdict is returned as a verdict.
4011
+ * {@link resolveOwnerHosts} for policy decisions: a lookup that throws, no
4012
+ * configured registry, or cold outage without saved settings becomes
4013
+ * {@link RegistryUnavailableError}. Other `unavailable` verdicts remain verdicts.
4014
4014
  */
4015
4015
  declare function lookupOwnerRegistryVerdict(subject: string, options?: LookupOwnerRegistryVerdictOptions): Promise<RegistryVerdict>;
4016
4016
  /**
package/dist/index.js CHANGED
@@ -20395,8 +20395,9 @@ async function lookupOwnerRegistryVerdict(subject, options2 = {}) {
20395
20395
  message: "no location registry is configured"
20396
20396
  });
20397
20397
  }
20398
+ let verdict;
20398
20399
  try {
20399
- return await resolveOwnerHosts(subject, {
20400
+ verdict = await resolveOwnerHosts(subject, {
20400
20401
  registryUrl: options2.registryUrl,
20401
20402
  sequenceStore: options2.sequenceStore,
20402
20403
  cacheStore: options2.cacheStore,
@@ -20410,6 +20411,12 @@ async function lookupOwnerRegistryVerdict(subject, options2 = {}) {
20410
20411
  cause: error
20411
20412
  });
20412
20413
  }
20414
+ if (verdict.status === "unregistered" && verdict.offline) {
20415
+ throw Object.assign(new RegistryUnavailableError(subject, void 0, {
20416
+ message: "Couldn't reach your storage settings, and none are saved on this computer yet, so this didn't run. Try again in a few minutes."
20417
+ }), { meta: { reason: "no-saved-settings" } });
20418
+ }
20419
+ return verdict;
20413
20420
  }
20414
20421
  async function resolveRegistryResource(subject, resource, access, options2) {
20415
20422
  const verdict = await lookupOwnerRegistryVerdict(subject, options2);