{"version":3,"file":"intelligence-utils.cjs","names":["PlatformRequestError"],"sources":["../../../../../src/v2/runtime/handlers/shared/intelligence-utils.ts"],"sourcesContent":["import { PlatformRequestError } from \"../../intelligence-platform/client\";\n\nexport function isPlatformNotFoundError(error: unknown): boolean {\n  return error instanceof PlatformRequestError && error.status === 404;\n}\n\nconst MAX_ID_LENGTH = 128;\nconst SAFE_ID_PATTERN = /^[\\w.@:=-]+$/;\n\n/**\n * Validates that a string identifier (userId, agentId) is safe to pass through.\n * Returns `true` if valid, `false` otherwise.\n */\nexport function isValidIdentifier(value: unknown): value is string {\n  return (\n    typeof value === \"string\" &&\n    value.length > 0 &&\n    value.length <= MAX_ID_LENGTH &&\n    SAFE_ID_PATTERN.test(value)\n  );\n}\n"],"mappings":";;;;AAEA,SAAgB,wBAAwB,OAAyB;AAC/D,QAAO,iBAAiBA,uCAAwB,MAAM,WAAW;;AAGnE,MAAM,gBAAgB;AACtB,MAAM,kBAAkB;;;;;AAMxB,SAAgB,kBAAkB,OAAiC;AACjE,QACE,OAAO,UAAU,YACjB,MAAM,SAAS,KACf,MAAM,UAAU,iBAChB,gBAAgB,KAAK,MAAM"}