@ai-matrx/agents 0.19.1 → 0.19.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.
package/dist/index.js CHANGED
@@ -861,6 +861,7 @@ import { isNetError as isNetError2 } from "@ai-matrx/data";
861
861
  import { credentialToHeaders } from "@ai-matrx/data";
862
862
 
863
863
  // matrx/org-context.ts
864
+ import { isUuidShape } from "@ai-matrx/kit/uuid";
864
865
  var OrganizationContextError = class extends Error {
865
866
  code;
866
867
  constructor(code, message) {
@@ -869,7 +870,6 @@ var OrganizationContextError = class extends Error {
869
870
  this.code = code;
870
871
  }
871
872
  };
872
- var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
873
873
  function createOrganizationOperation(organizationId) {
874
874
  const organization_id = requireOrganizationContext(organizationId);
875
875
  return Object.freeze({ organization_id });
@@ -891,7 +891,7 @@ function requireOrganizationContext(selectedOrganizationId, overrideOrganization
891
891
  );
892
892
  }
893
893
  const normalized = candidate.trim();
894
- if (!UUID_PATTERN.test(normalized)) {
894
+ if (!isUuidShape(normalized)) {
895
895
  throw new OrganizationContextError(
896
896
  "organization_context_invalid",
897
897
  "The selected organization ID is invalid."