@opendatalabs/vana-sdk 3.8.1 → 3.8.3

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.
@@ -33447,14 +33447,17 @@ async function readPersonalServerData(params) {
33447
33447
 
33448
33448
  // src/protocol/scopes.ts
33449
33449
  import { z as z2 } from "zod";
33450
- var SEGMENT_RE = /^[a-z0-9][a-z0-9_]*$/;
33450
+ var SOURCE_RE = /^[a-z0-9][a-z0-9_]*$/;
33451
+ var TAIL_SEGMENT_RE = /^[a-zA-Z0-9][a-zA-Z0-9_]*$/;
33451
33452
  var ScopeSchema = z2.string().refine(
33452
33453
  (scope) => {
33453
33454
  const parts = scope.split(".");
33454
- return parts.length >= 2 && parts.length <= 3 && parts.every((part) => SEGMENT_RE.test(part));
33455
+ if (parts.length < 2 || parts.length > 3) return false;
33456
+ const [source, ...tail] = parts;
33457
+ return SOURCE_RE.test(source) && tail.every((part) => TAIL_SEGMENT_RE.test(part));
33455
33458
  },
33456
33459
  {
33457
- message: "Scope must be {source}.{category}[.{subcategory}] with lowercase alphanumeric segments (may start with a letter or digit)"
33460
+ message: "Scope must be {source}.{category}[.{subcategory}]; source lowercase, tail may keep the historical camelCase form (e.g. spotify.savedTracks)"
33458
33461
  }
33459
33462
  );
33460
33463
  function parseScope(scope) {