@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.
@@ -33606,14 +33606,17 @@ async function readPersonalServerData(params) {
33606
33606
 
33607
33607
  // src/protocol/scopes.ts
33608
33608
  var import_zod2 = require("zod");
33609
- var SEGMENT_RE = /^[a-z0-9][a-z0-9_]*$/;
33609
+ var SOURCE_RE = /^[a-z0-9][a-z0-9_]*$/;
33610
+ var TAIL_SEGMENT_RE = /^[a-zA-Z0-9][a-zA-Z0-9_]*$/;
33610
33611
  var ScopeSchema = import_zod2.z.string().refine(
33611
33612
  (scope) => {
33612
33613
  const parts = scope.split(".");
33613
- return parts.length >= 2 && parts.length <= 3 && parts.every((part) => SEGMENT_RE.test(part));
33614
+ if (parts.length < 2 || parts.length > 3) return false;
33615
+ const [source, ...tail] = parts;
33616
+ return SOURCE_RE.test(source) && tail.every((part) => TAIL_SEGMENT_RE.test(part));
33614
33617
  },
33615
33618
  {
33616
- message: "Scope must be {source}.{category}[.{subcategory}] with lowercase alphanumeric segments (may start with a letter or digit)"
33619
+ message: "Scope must be {source}.{category}[.{subcategory}]; source lowercase, tail may keep the historical camelCase form (e.g. spotify.savedTracks)"
33617
33620
  }
33618
33621
  );
33619
33622
  function parseScope(scope) {