@opendatalabs/vana-sdk 3.8.1 → 3.8.2

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.
@@ -32820,14 +32820,17 @@ async function readPersonalServerData(params) {
32820
32820
 
32821
32821
  // src/protocol/scopes.ts
32822
32822
  import { z as z2 } from "zod";
32823
- var SEGMENT_RE = /^[a-z0-9][a-z0-9_]*$/;
32823
+ var SOURCE_RE = /^[a-z0-9][a-z0-9_]*$/;
32824
+ var TAIL_SEGMENT_RE = /^[a-zA-Z0-9][a-zA-Z0-9_]*$/;
32824
32825
  var ScopeSchema = z2.string().refine(
32825
32826
  (scope) => {
32826
32827
  const parts = scope.split(".");
32827
- return parts.length >= 2 && parts.length <= 3 && parts.every((part) => SEGMENT_RE.test(part));
32828
+ if (parts.length < 2 || parts.length > 3) return false;
32829
+ const [source, ...tail] = parts;
32830
+ return SOURCE_RE.test(source) && tail.every((part) => TAIL_SEGMENT_RE.test(part));
32828
32831
  },
32829
32832
  {
32830
- message: "Scope must be {source}.{category}[.{subcategory}] with lowercase alphanumeric segments (may start with a letter or digit)"
32833
+ message: "Scope must be {source}.{category}[.{subcategory}]; source lowercase, tail may keep the historical camelCase form (e.g. spotify.savedTracks)"
32831
32834
  }
32832
32835
  );
32833
32836
  function parseScope(scope) {