@debugbundle/sdk-react-native 3.0.1 → 3.1.0

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/DebugBundleReactNative.podspec +2 -2
  3. package/MIGRATION-3.1.md +116 -0
  4. package/README.md +37 -1
  5. package/android/build.gradle +1 -1
  6. package/android/src/main/java/com/debugbundle/reactnative/DebugBundleReactNativeModule.java +34 -3
  7. package/app.plugin.js +1 -1
  8. package/dist/NativeDebugBundleReactNative.d.ts +1 -0
  9. package/dist/NativeDebugBundleReactNative.d.ts.map +1 -1
  10. package/dist/before-send.d.ts.map +1 -1
  11. package/dist/before-send.js +9 -131
  12. package/dist/canonical-schema.d.ts +15 -0
  13. package/dist/canonical-schema.d.ts.map +1 -0
  14. package/dist/canonical-schema.js +139 -0
  15. package/dist/client-values.d.ts +17 -0
  16. package/dist/client-values.d.ts.map +1 -0
  17. package/dist/client-values.js +185 -0
  18. package/dist/client.d.ts +7 -0
  19. package/dist/client.d.ts.map +1 -1
  20. package/dist/client.js +102 -205
  21. package/dist/diagnostic-budget.d.ts +16 -0
  22. package/dist/diagnostic-budget.d.ts.map +1 -0
  23. package/dist/diagnostic-budget.js +120 -0
  24. package/dist/event-schema-data.d.ts +2 -0
  25. package/dist/event-schema-data.d.ts.map +1 -0
  26. package/dist/event-schema-data.js +49 -0
  27. package/dist/evidence-capabilities.d.ts +5 -0
  28. package/dist/evidence-capabilities.d.ts.map +1 -0
  29. package/dist/evidence-capabilities.js +21 -0
  30. package/dist/evidence-controller.d.ts +24 -0
  31. package/dist/evidence-controller.d.ts.map +1 -0
  32. package/dist/evidence-controller.js +113 -0
  33. package/dist/evidence-types.d.ts +33 -0
  34. package/dist/evidence-types.d.ts.map +1 -0
  35. package/dist/evidence-types.js +1 -0
  36. package/dist/evidence-wire.d.ts +7 -0
  37. package/dist/evidence-wire.d.ts.map +1 -0
  38. package/dist/evidence-wire.js +132 -0
  39. package/dist/exception-evidence.d.ts +25 -0
  40. package/dist/exception-evidence.d.ts.map +1 -0
  41. package/dist/exception-evidence.js +175 -0
  42. package/dist/index.d.ts +6 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +4 -0
  45. package/dist/owned-json.d.ts +11 -0
  46. package/dist/owned-json.d.ts.map +1 -0
  47. package/dist/owned-json.js +85 -0
  48. package/dist/privacy-keys.d.ts +2 -0
  49. package/dist/privacy-keys.d.ts.map +1 -1
  50. package/dist/privacy-keys.js +10 -2
  51. package/dist/privacy-telemetry.js +7 -7
  52. package/dist/privacy-text.d.ts +2 -2
  53. package/dist/privacy-text.d.ts.map +1 -1
  54. package/dist/privacy-text.js +35 -33
  55. package/dist/redaction.d.ts.map +1 -1
  56. package/dist/redaction.js +9 -7
  57. package/dist/safe-error-fields.d.ts +4 -0
  58. package/dist/safe-error-fields.d.ts.map +1 -0
  59. package/dist/safe-error-fields.js +54 -0
  60. package/dist/types.d.ts +21 -6
  61. package/dist/types.d.ts.map +1 -1
  62. package/ios/DebugBundleReactNative.swift +58 -4
  63. package/ios/DebugBundleReactNativeBridge.mm +4 -0
  64. package/package.json +3 -2
  65. package/src/NativeDebugBundleReactNative.ts +1 -0
  66. package/src/before-send.ts +10 -174
  67. package/src/canonical-schema.ts +108 -0
  68. package/src/client-values.ts +196 -0
  69. package/src/client.ts +92 -213
  70. package/src/diagnostic-budget.ts +90 -0
  71. package/src/event-schema-data.ts +49 -0
  72. package/src/evidence-capabilities.ts +19 -0
  73. package/src/evidence-controller.ts +89 -0
  74. package/src/evidence-types.ts +14 -0
  75. package/src/evidence-wire.ts +100 -0
  76. package/src/exception-evidence.ts +112 -0
  77. package/src/index.ts +6 -0
  78. package/src/owned-json.ts +60 -0
  79. package/src/privacy-keys.ts +12 -2
  80. package/src/privacy-telemetry.ts +9 -9
  81. package/src/privacy-text.ts +32 -31
  82. package/src/redaction.ts +8 -7
  83. package/src/safe-error-fields.ts +46 -0
  84. package/src/types.ts +23 -5
@@ -0,0 +1,49 @@
1
+ // Generated by scripts/sync-evidence-fixtures.ts. Do not edit by hand.
2
+ // Plain contract data keeps the native JS runtime independent of schema-library versions.
3
+ export const eventSchemaData = JSON.parse([
4
+ "{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"diagnostic_context\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{",
5
+ "\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"kind\":{\"type\":\"string\",\"const\":\"recovery\"},\"failure_ref\":{\"type\":\"string\",\"format\":\"uuid\"},\"scope\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"page\"},\"page_id\":{\"type\":\"string\",\"format\":\"uuid\"}},\"required\":[\"kind\",\"page_id\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"operation\"},\"operation_id\":{\"type\":\"string\",\"format\":\"uuid\"}},\"required\":[\"kind\",\"operation_id\"],\"additionalProperties\":false}]},\"attempt_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"state\":{\"type\":\"string\",\"enum\":[\"attempt_started\",\"attempt_completed\",\"attempt_failed\",\"recovery_observed\",\"failure_persisted\"]},\"operation\":{\"type\":\"string\",\"maxLength\":64},\"status_code\":{\"type\":\"integer\",\"minimum\":100,\"maximum\":599},\"duration_ms\":{\"type\":\"number\",\"minimum\":0}},\"required\":[\"vers",
6
+ "ion\",\"kind\",\"failure_ref\",\"scope\",\"attempt_id\",\"state\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"kind\":{\"type\":\"string\",\"const\":\"resource_observation\"},\"failure_ref\":{\"type\":\"string\",\"format\":\"uuid\"},\"scope\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"page\"},\"page_id\":{\"type\":\"string\",\"format\":\"uuid\"}},\"required\":[\"kind\",\"page_id\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"operation\"},\"operation_id\":{\"type\":\"string\",\"format\":\"uuid\"}},\"required\":[\"kind\",\"operation_id\"],\"additionalProperties\":false}]},\"source_event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"observations\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"items\":{\"minItems\":1,\"maxItems\":5,\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"timing\"},\"observed_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"source_url\":{\"anyOf\":[{\"type\":\"string\",\"maxLeng",
7
+ "th\":2048},{\"type\":\"null\"}]},\"availability\":{\"type\":\"string\",\"enum\":[\"observed\",\"unsupported\",\"no_match\",\"withheld\",\"ambiguous\",\"unknown\"]},\"response_status\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":100,\"maximum\":599},{\"type\":\"null\"}]},\"duration_ms\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"transfer_size_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]}},\"required\":[\"kind\",\"observed_at\",\"source_url\",\"availability\",\"response_status\",\"duration_ms\",\"transfer_size_bytes\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"csp\"},\"observed_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"source_url\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":2048},{\"type\":\"null\"}]},\"effective_directive\":{\"type\":\"string\",\"pattern\":\"^[a-z-]{1,64}$\"},\"disposition\":{\"type\":\"string\",\"enum\":[\"enforce\",\"report\"]},\"document_status_code\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":100,\"maximum\":599},{\"type\":\"null\"}]}},\"required\":[\"kind\",\"observed_at\",\"source",
8
+ "_url\",\"effective_directive\",\"disposition\",\"document_status_code\"],\"additionalProperties\":false}]}}},\"required\":[\"version\",\"items\"],\"additionalProperties\":false}},\"required\":[\"version\",\"kind\",\"failure_ref\",\"scope\",\"source_event_id\",\"observations\"],\"additionalProperties\":false}]}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"backend_exception\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{",
9
+ "\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\",\"minLength\":1},\"stack\":{\"type\":\"string\",\"minLength\":1},\"handled\":{\"type\":\"boolean\"},\"request\":{\"type\":\"object\",\"properties\":{\"method\":{\"type\":\"string\",\"minLength\":1},\"path\":{\"type\":\"string\",\"minLength\":1},\"query\":{\"type\":\"object\",\"additionalProperties\":{}},\"headers\":{\"type\":\"object\",\"additionalProperties\":{}},\"body\":{\"anyOf\":[{},{\"type\":\"null\"}]}},\"required\":[\"method\",\"path\",\"query\",\"headers\"],\"additionalProperties\":false},\"response\":{\"type\":",
10
+ "\"object\",\"properties\":{\"status_code\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"headers\":{\"type\":\"object\",\"additionalProperties\":{}},\"body\":{}},\"required\":[\"status_code\"],\"additionalProperties\":false},\"runtime\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"string\",\"minLength\":1},\"platform\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"arch\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"pid\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"cwd\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"uptime_sec\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"hostname\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"thread_id\":{\"type\":[\"string\",\"number\",\"null\"]},\"framework_version\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"memory\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"rss\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"heap_total\":{\"anyOf\":[{\"type\":\"number\",\"min",
11
+ "imum\":0},{\"type\":\"null\"}]},\"heap_used\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"external\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"peak\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]}},\"required\":[\"rss\",\"heap_total\",\"heap_used\",\"external\",\"peak\"],\"additionalProperties\":false},{\"type\":\"null\"}]},\"framework_extras\":{\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":{}},{\"type\":\"null\"}]}},\"required\":[\"version\"],\"additionalProperties\":false},\"probe_data\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"string\",\"minLength\":1},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"timestamp\":{\"type\":\"string\",\"format\":\"date-time\"},\"activation_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]}},\"required\":[\"label\",\"data\",\"timestamp\",\"activation_id\"],\"additionalProperties\":false}}},\"required\":[\"version\",\"items\"],\"additionalProperties\":false},\"exception_evidence\":{",
12
+ "\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"runtime\":{\"type\":\"string\",\"enum\":[\"node\",\"browser\",\"python\",\"php\",\"jvm\",\"go\",\"ruby\",\"dotnet\",\"android\",\"swift\",\"react_native\",\"unknown\"]},\"root_id\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":7},\"nodes\":{\"minItems\":1,\"maxItems\":8,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":7},\"name\":{\"type\":\"string\",\"maxLength\":256},\"message\":{\"type\":\"string\",\"maxLength\":2048},\"stack\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":16384},{\"type\":\"null\"}]},\"trace_origin\":{\"type\":\"string\",\"enum\":[\"throw\",\"native_fatal\",\"capture\",\"runtime_reported\",\"unavailable\",\"unknown\"]},\"parsing_status\":{\"type\":\"string\",\"enum\":[\"parsed\",\"partial\",\"unparsed\",\"unavailable\",\"truncated\"]},\"frames\":{\"maxItems\":32,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"function\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":256},{\"type\":\"null\"}]},\"file\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":2048},{\"type\":\"null\"}]},\"line\":{\"anyOf\":[{\"type\":\"inte",
13
+ "ger\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"column\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"classification\":{\"type\":\"string\",\"enum\":[\"application\",\"framework\",\"sdk\",\"unknown\"]}},\"required\":[\"function\",\"file\",\"line\",\"column\",\"classification\"],\"additionalProperties\":false}},\"relationships\":{\"maxItems\":5,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"enum\":[\"cause\",\"context\",\"aggregate\",\"suppressed\"]},\"target_id\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":7}},\"required\":[\"kind\",\"target_id\"],\"additionalProperties\":false}}},\"required\":[\"id\",\"name\",\"message\",\"stack\",\"trace_origin\",\"parsing_status\",\"frames\",\"relationships\"],\"additionalProperties\":false}},\"truncated\":{\"type\":\"boolean\"},\"unavailable_reason\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"unknown\",\"unsupported\",\"unsafe\",\"budget_exceeded\"]},{\"type\":\"null\"}]}},\"required\":[\"version\",\"runtime\",\"root_id\",\"nodes\",\"truncated\",\"unavailable_reason\"],\"additionalPropertie",
14
+ "s\":false},\"execution\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"kind\":{\"type\":\"string\",\"enum\":[\"request\",\"command\",\"job\",\"unknown\"]},\"name\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":128},{\"type\":\"null\"}]},\"elapsed_ms\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"limit_ms\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]}},\"required\":[\"version\",\"kind\",\"name\",\"elapsed_ms\",\"limit_ms\"],\"additionalProperties\":false}},\"required\":[\"name\",\"message\",\"stack\",\"handled\",\"request\",\"response\",\"runtime\"],\"additionalProperties\":false}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"request_event\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_",
15
+ "name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"method\":{\"type\":\"string\",\"minLength\":1},\"path\":{\"type\":\"string\",\"minLength\":1},\"query\":{\"type\":\"object\",\"additionalProperties\":{}},\"headers\":{\"type\":\"object\",\"additionalProperties\":{}},\"body\":{\"anyOf\":[{},{\"type\"",
16
+ ":\"null\"}]},\"response_status\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"duration_ms\":{\"type\":\"number\",\"minimum\":0},\"route_template\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"response_headers\":{\"type\":\"object\",\"additionalProperties\":{}},\"response_body\":{}},\"required\":[\"method\",\"path\",\"query\",\"headers\",\"response_status\",\"duration_ms\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"method\":{\"type\":\"string\",\"minLength\":1},\"path\":{\"type\":\"string\",\"minLength\":1},\"query\":{\"type\":\"object\",\"additionalProperties\":{}},\"headers\":{\"type\":\"object\",\"additionalProperties\":{}},\"body\":{\"anyOf\":[{},{\"type\":\"null\"}]},\"response_status\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"duration_ms\":{\"type\":\"number\",\"minimum\":0},\"route_template\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"response_headers\":{\"type\":\"object\",\"additionalProperties\":{}},\"response_body\":{},\"device\":{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"typ",
17
+ "e\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"version\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"name\",\"version\"],\"additionalProperties\":false},\"device_type\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":",
18
+ "\"null\"}]},\"app_version\":{\"type\":[\"string\",\"null\"]},\"build_number\":{\"type\":[\"string\",\"null\"]},\"release_channel\":{\"type\":[\"string\",\"null\"]},\"api_level\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"manufacturer\":{\"type\":[\"string\",\"null\"]},\"model\":{\"type\":[\"string\",\"null\"]},\"timezone\":{\"type\":[\"string\",\"null\"]},\"battery_level\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"battery_charging\":{\"type\":[\"boolean\",\"null\"]},\"free_disk_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"free_memory_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"jailbroken\":{\"type\":[\"boolean\",\"null\"]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\",\"language\",\"connection_type\",\"color_scheme_preference\"],\"additionalProperties\":false}},\"required\":[\"method\",\"path\",\"query\",\"headers\",\"response_status\",\"duration_ms\",\"device\"],\"additionalProperties\":f",
19
+ "alse}]}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"log_event\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"",
20
+ "type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\",\"minLength\":1},\"attributes\":{\"type\":\"object\",\"additionalProperties\":{}}},\"required\":[\"level\",\"message\",\"attributes\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\",\"minLength\":1},\"attributes\":{\"type\":\"object\",\"additionalProperties\":{}},\"device\":{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"version\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"name\",\"version\"],\"additionalProperties\":false},\"device_type\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"min",
21
+ "imum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":\"null\"}]},\"app_version\":{\"type\":[\"string\",\"null\"]},\"build_number\":{\"type\":[\"string\",\"null\"]},\"release_channel\":{\"type\":[\"string\",\"null\"]},\"api_level\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"manufacturer\":{\"type\":[\"string\",\"null\"]},\"model\":{\"type\":[\"string\",\"nu",
22
+ "ll\"]},\"timezone\":{\"type\":[\"string\",\"null\"]},\"battery_level\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"battery_charging\":{\"type\":[\"boolean\",\"null\"]},\"free_disk_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"free_memory_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"jailbroken\":{\"type\":[\"boolean\",\"null\"]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\",\"language\",\"connection_type\",\"color_scheme_preference\"],\"additionalProperties\":false}},\"required\":[\"level\",\"message\",\"attributes\",\"device\"],\"additionalProperties\":false}]}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"frontend_breadcrumb\"},\"pro",
23
+ "ject_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"breadcrumb_type\":{\"type\":\"string\",\"enum\":[\"route_change\",\"click\",\"form_submit\",\"console_",
24
+ "log\",\"network_request\"]},\"route\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"data\":{\"type\":\"object\",\"additionalProperties\":{}}},\"required\":[\"breadcrumb_type\",\"data\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"breadcrumb_type\":{\"type\":\"string\",\"minLength\":1},\"route\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"device\":{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"version\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"name\",\"version\"],\"additionalProperties\":false},\"device_type\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":",
25
+ "{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":\"null\"}]},\"app_version\":{\"type\":[\"string\",\"null\"]},\"build_number\":{\"type\":[\"string\",\"null\"]},\"release_channel\":{\"type\":[\"string\",\"null\"]},\"api_level\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"manufacturer\":{\"type\":[\"string\",\"null\"]},\"model\":{\"type\":[\"string\",\"null\"]},\"timezone\":{\"type\":[\"string\",\"null\"]},\"battery_level\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"battery_charging\":{\"type\":[\"boolean\",\"null\"]},\"free_disk_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"mi",
26
+ "nimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"free_memory_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"jailbroken\":{\"type\":[\"boolean\",\"null\"]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\",\"language\",\"connection_type\",\"color_scheme_preference\"],\"additionalProperties\":false}},\"required\":[\"breadcrumb_type\",\"data\",\"device\"],\"additionalProperties\":false}]}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"frontend_exception\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"t",
27
+ "ype\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\",\"minLength\":1},\"stack\":{\"type\":\"string\",\"minLength\":1},\"route\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"browser\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"version\":{\"type\":\"string\",\"minLength\":1}},\"require",
28
+ "d\":[\"name\",\"version\"],\"additionalProperties\":false},\"breadcrumbs\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"breadcrumb_type\":{\"type\":\"string\",\"enum\":[\"route_change\",\"click\",\"form_submit\",\"console_log\",\"network_request\"]},\"route\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"ts\":{\"type\":\"string\",\"format\":\"date-time\"}},\"required\":[\"breadcrumb_type\",\"data\",\"ts\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"breadcrumb_type\":{\"type\":\"string\",\"minLength\":1},\"route\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"ts\":{\"type\":\"string\",\"format\":\"date-time\"}},\"required\":[\"breadcrumb_type\",\"data\",\"ts\"],\"additionalProperties\":false}]}},\"device\":{\"anyOf\":[{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"version\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"",
29
+ "name\",\"version\"],\"additionalProperties\":false},\"device_type\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":\"null\"}]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\"",
30
+ ",\"language\",\"connection_type\",\"color_scheme_preference\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"version\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"name\",\"version\"],\"additionalProperties\":false},\"device_type\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type",
31
+ "\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":\"null\"}]},\"app_version\":{\"type\":[\"string\",\"null\"]},\"build_number\":{\"type\":[\"string\",\"null\"]},\"release_channel\":{\"type\":[\"string\",\"null\"]},\"api_level\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"manufacturer\":{\"type\":[\"string\",\"null\"]},\"model\":{\"type\":[\"string\",\"null\"]},\"timezone\":{\"type\":[\"string\",\"null\"]},\"battery_level\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"battery_charging\":{\"type\":[\"boolean\",\"null\"]},\"free_disk_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"free_memory_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"jailbroken\":{\"type\":[\"boolean\",\"null\"]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\",\"language\",\"connection_type\",\"c",
32
+ "olor_scheme_preference\"],\"additionalProperties\":false}]},{\"type\":\"null\"}]},\"browser_event\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"enum\":[\"window_error\",\"resource_error\"]},\"message\":{\"type\":[\"string\",\"null\"]},\"file_name\":{\"type\":[\"string\",\"null\"]},\"line_number\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"column_number\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"target\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"tag_name\":{\"type\":[\"string\",\"null\"]},\"source_url\":{\"type\":[\"string\",\"null\"]},\"attributes\":{\"type\":\"object\",\"properties\":{\"rel\":{\"type\":\"string\"},\"as\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"},\"media\":{\"type\":\"string\"},\"cross_origin\":{\"type\":\"string\"},\"async\":{\"type\":\"boolean\"},\"defer\":{\"type\":\"boolean\"},\"integrity_present\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"required\":[\"tag_name\",\"source_url\"],\"additionalProperties\":false},{\"type\":\"null\"}]},\"page\":{\"type\":\"object\",\"properties\":{\"url\":{",
33
+ "\"type\":[\"string\",\"null\"]},\"referrer\":{\"type\":[\"string\",\"null\"]},\"ready_state\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"loading\",\"interactive\",\"complete\"]},{\"type\":\"null\"}]},\"visibility_state\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"visible\",\"hidden\",\"prerender\",\"unloaded\"]},{\"type\":\"null\"}]}},\"required\":[\"url\",\"referrer\",\"ready_state\",\"visibility_state\"],\"additionalProperties\":false},\"opaque\":{\"type\":\"boolean\"}},\"required\":[\"kind\",\"message\",\"file_name\",\"line_number\",\"column_number\",\"target\",\"opaque\"],\"additionalProperties\":false},\"rejection_reason\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"enum\":[\"error\",\"string\",\"object\",\"null\",\"undefined\",\"unknown\"]},\"name\":{\"type\":\"string\",\"minLength\":1},\"message\":{\"type\":\"string\",\"minLength\":1},\"preview\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"kind\"],\"additionalProperties\":false},\"dom_context\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"mode\":{\"type\":\"string\",\"const\":\"lightweight\"},\"html_excerpt\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"mode\",\"html_excerpt\"]",
34
+ ",\"additionalProperties\":false},{\"type\":\"null\"}]},\"probe_data\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"string\",\"minLength\":1},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"timestamp\":{\"type\":\"string\",\"format\":\"date-time\"},\"activation_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]}},\"required\":[\"label\",\"data\",\"timestamp\",\"activation_id\"],\"additionalProperties\":false}}},\"required\":[\"version\",\"items\"],\"additionalProperties\":false},\"exception_evidence\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"runtime\":{\"type\":\"string\",\"enum\":[\"node\",\"browser\",\"python\",\"php\",\"jvm\",\"go\",\"ruby\",\"dotnet\",\"android\",\"swift\",\"react_native\",\"unknown\"]},\"root_id\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":7},\"nodes\":{\"minItems\":1,\"maxItems\":8,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":7},\"name\":{\"type\":\"string\",\"maxLength\":256},",
35
+ "\"message\":{\"type\":\"string\",\"maxLength\":2048},\"stack\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":16384},{\"type\":\"null\"}]},\"trace_origin\":{\"type\":\"string\",\"enum\":[\"throw\",\"native_fatal\",\"capture\",\"runtime_reported\",\"unavailable\",\"unknown\"]},\"parsing_status\":{\"type\":\"string\",\"enum\":[\"parsed\",\"partial\",\"unparsed\",\"unavailable\",\"truncated\"]},\"frames\":{\"maxItems\":32,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"function\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":256},{\"type\":\"null\"}]},\"file\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":2048},{\"type\":\"null\"}]},\"line\":{\"anyOf\":[{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"column\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"classification\":{\"type\":\"string\",\"enum\":[\"application\",\"framework\",\"sdk\",\"unknown\"]}},\"required\":[\"function\",\"file\",\"line\",\"column\",\"classification\"],\"additionalProperties\":false}},\"relationships\":{\"maxItems\":5,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"kind",
36
+ "\":{\"type\":\"string\",\"enum\":[\"cause\",\"context\",\"aggregate\",\"suppressed\"]},\"target_id\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":7}},\"required\":[\"kind\",\"target_id\"],\"additionalProperties\":false}}},\"required\":[\"id\",\"name\",\"message\",\"stack\",\"trace_origin\",\"parsing_status\",\"frames\",\"relationships\"],\"additionalProperties\":false}},\"truncated\":{\"type\":\"boolean\"},\"unavailable_reason\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"unknown\",\"unsupported\",\"unsafe\",\"budget_exceeded\"]},{\"type\":\"null\"}]}},\"required\":[\"version\",\"runtime\",\"root_id\",\"nodes\",\"truncated\",\"unavailable_reason\"],\"additionalProperties\":false},\"resource_observations\":{\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"items\":{\"minItems\":1,\"maxItems\":5,\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"timing\"},\"observed_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"source_url\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":2048},{\"type\":\"null\"}]},\"availability\":{\"type\":\"string\",\"enum\":[\"observed\",\"unsupported\",",
37
+ "\"no_match\",\"withheld\",\"ambiguous\",\"unknown\"]},\"response_status\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":100,\"maximum\":599},{\"type\":\"null\"}]},\"duration_ms\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"transfer_size_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]}},\"required\":[\"kind\",\"observed_at\",\"source_url\",\"availability\",\"response_status\",\"duration_ms\",\"transfer_size_bytes\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"csp\"},\"observed_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"source_url\":{\"anyOf\":[{\"type\":\"string\",\"maxLength\":2048},{\"type\":\"null\"}]},\"effective_directive\":{\"type\":\"string\",\"pattern\":\"^[a-z-]{1,64}$\"},\"disposition\":{\"type\":\"string\",\"enum\":[\"enforce\",\"report\"]},\"document_status_code\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":100,\"maximum\":599},{\"type\":\"null\"}]}},\"required\":[\"kind\",\"observed_at\",\"source_url\",\"effective_directive\",\"disposition\",\"document_status_code\"],\"additionalProperties\":fals",
38
+ "e}]}}},\"required\":[\"version\",\"items\"],\"additionalProperties\":false}},\"required\":[\"name\",\"message\",\"stack\"],\"additionalProperties\":false}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"deploy_metadata\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"",
39
+ "type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"type\":\"object\",\"properties\":{\"commit_sha\":{\"type\":\"string\",\"minLength\":1},\"version\":{\"type\":\"string\",\"minLength\":1},\"branch\":{\"type\":\"string\",\"minLength\":1},\"environment\":{\"type\":\"string\",\"minLength\":1},\"deployed_at\":{\"type\":\"string\",\"format\":\"date-time\"}},\"required\":[\"commit_sha\",\"version\",\"branch\",\"environment\",\"deployed_at\"],\"additionalProperties\":false}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"error_suppressed\"",
40
+ "},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"string\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"fingerprint\":{\"type\":\"string\",\"minLength\":1},\"suppressed_count\":{\"type\":\"integer\",",
41
+ "\"minimum\":0,\"maximum\":9007199254740991},\"window_seconds\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"first_seen\":{\"type\":\"string\",\"format\":\"date-time\"},\"last_seen\":{\"type\":\"string\",\"format\":\"date-time\"},\"reason\":{\"type\":\"string\",\"const\":\"queue_pressure\"},\"level\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"fingerprint\",\"suppressed_count\",\"window_seconds\",\"first_seen\",\"last_seen\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"fingerprint\":{\"type\":\"string\",\"minLength\":1},\"suppressed_count\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"window_seconds\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"first_seen\":{\"type\":\"string\",\"format\":\"date-time\"},\"last_seen\":{\"type\":\"string\",\"format\":\"date-time\"},\"reason\":{\"type\":\"string\",\"const\":\"queue_pressure\"},\"level\":{\"type\":\"string\",\"minLength\":1},\"device\":{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"ve",
42
+ "rsion\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"name\",\"version\"],\"additionalProperties\":false},\"device_type\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":\"null\"}]},\"app_version\":{\"type\":[\"string\",\"null\"]},\"build_numbe",
43
+ "r\":{\"type\":[\"string\",\"null\"]},\"release_channel\":{\"type\":[\"string\",\"null\"]},\"api_level\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"manufacturer\":{\"type\":[\"string\",\"null\"]},\"model\":{\"type\":[\"string\",\"null\"]},\"timezone\":{\"type\":[\"string\",\"null\"]},\"battery_level\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"battery_charging\":{\"type\":[\"boolean\",\"null\"]},\"free_disk_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"free_memory_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"jailbroken\":{\"type\":[\"boolean\",\"null\"]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\",\"language\",\"connection_type\",\"color_scheme_preference\"],\"additionalProperties\":false}},\"required\":[\"fingerprint\",\"suppressed_count\",\"window_seconds\",\"first_seen\",\"last_seen\",\"device\"],\"additionalProperties\":false}]}},\"required\":[\"schema_version\",\"event_id\",\"even",
44
+ "t_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"schema_version\":{\"type\":\"string\",\"minLength\":1},\"event_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"event_type\":{\"type\":\"string\",\"const\":\"probe_event\"},\"project_token\":{\"type\":\"string\",\"minLength\":1},\"project_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"sdk_name\":{\"type\":\"string\",\"minLength\":1},\"sdk_version\":{\"type\":\"string\",\"minLength\":1},\"service\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"runtime\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"framework\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"environment\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"name\",\"environment\"],\"additionalProperties\":false},\"occurred_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"correlation\":{\"type\":\"object\",\"properties\":{\"request_id\":{\"type\":[\"string\",\"null\"]},\"trace_id\":{\"type\":[\"string\",\"null\"]},\"session_id\":{\"type\":[\"stri",
45
+ "ng\",\"null\"]},\"user_id_hash\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false},\"context\":{\"type\":\"object\",\"additionalProperties\":{}},\"payload\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"string\",\"minLength\":1},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"activation_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"probe_label_pattern\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"label\",\"data\",\"activation_id\",\"probe_label_pattern\"],\"additionalProperties\":false},{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"string\",\"minLength\":1},\"data\":{\"type\":\"object\",\"additionalProperties\":{}},\"activation_id\":{\"anyOf\":[{\"type\":\"string\",\"format\":\"uuid\"},{\"type\":\"null\"}]},\"probe_label_pattern\":{\"type\":\"string\",\"minLength\":1},\"device\":{\"type\":\"object\",\"properties\":{\"user_agent\":{\"type\":[\"string\",\"null\"]},\"os\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"version\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"name\",\"version\"],\"additionalProperties\":false},\"device_typ",
46
+ "e\":{\"type\":\"string\",\"enum\":[\"desktop\",\"mobile\",\"tablet\",\"unknown\"]},\"screen\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"viewport\":{\"type\":\"object\",\"properties\":{\"width\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"height\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"width\",\"height\"],\"additionalProperties\":false},\"device_pixel_ratio\":{\"anyOf\":[{\"type\":\"number\",\"exclusiveMinimum\":0},{\"type\":\"null\"}]},\"touch_capable\":{\"type\":[\"boolean\",\"null\"]},\"language\":{\"type\":[\"string\",\"null\"]},\"connection_type\":{\"type\":[\"string\",\"null\"]},\"color_scheme_preference\":{\"anyOf\":[{\"type\":\"string\",\"enum\":[\"light\",\"dark\",\"no-preference\"]},{\"type\":\"null\"}]},\"app_version\":{\"type\":[\"string\",\"null\"]},\"build_number\":{\"type\":[\"string\",\"null\"]},\"release_channel\":{\"type\":[\"string\",\"null\"]},\"api_level\":{\"anyOf\":[{\"type\":\"",
47
+ "integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"manufacturer\":{\"type\":[\"string\",\"null\"]},\"model\":{\"type\":[\"string\",\"null\"]},\"timezone\":{\"type\":[\"string\",\"null\"]},\"battery_level\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0},{\"type\":\"null\"}]},\"battery_charging\":{\"type\":[\"boolean\",\"null\"]},\"free_disk_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"free_memory_bytes\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"jailbroken\":{\"type\":[\"boolean\",\"null\"]}},\"required\":[\"user_agent\",\"os\",\"device_type\",\"screen\",\"viewport\",\"device_pixel_ratio\",\"touch_capable\",\"language\",\"connection_type\",\"color_scheme_preference\"],\"additionalProperties\":false}},\"required\":[\"label\",\"data\",\"activation_id\",\"probe_label_pattern\",\"device\"],\"additionalProperties\":false}]}},\"required\":[\"schema_version\",\"event_id\",\"event_type\",\"sdk_name\",\"sdk_version\",\"service\",\"occurred_at\",\"payload\"],\"additionalProperties\":false}],\"$id\":\"https://debugbundle.co",
48
+ "m/schemas/event-envelope.json\",\"$comment\":\"Generated by scripts/sync-evidence-fixtures.ts from EventEnvelopeSchema. Do not edit by hand.\"}"
49
+ ].join(""));
@@ -0,0 +1,5 @@
1
+ import type { EvidenceCapabilities, EvidenceFeature } from "./evidence-types.js";
2
+ export declare const EVIDENCE_FEATURES: EvidenceFeature[];
3
+ export declare function normalizeCapabilities(value: unknown): EvidenceCapabilities;
4
+ export declare function intersectCapabilities(hops: unknown[]): EvidenceCapabilities;
5
+ //# sourceMappingURL=evidence-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-capabilities.d.ts","sourceRoot":"","sources":["../src/evidence-capabilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEjF,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAAmG,CAAC;AACnJ,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAQ1E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,oBAAoB,CAI3E"}
@@ -0,0 +1,21 @@
1
+ import { ownJSON, jsonObject } from "./owned-json.js";
2
+ export const EVIDENCE_FEATURES = ["exception_evidence_v1", "resource_observations_v1", "recovery_v1", "evidence_provenance_v1"];
3
+ export function normalizeCapabilities(value) {
4
+ try {
5
+ const descriptor = jsonObject(ownJSON(value));
6
+ if (!descriptor || Object.keys(descriptor).length !== 2 || descriptor.version !== 1 || !Array.isArray(descriptor.features) ||
7
+ descriptor.features.length > 4 || new Set(descriptor.features).size !== descriptor.features.length ||
8
+ descriptor.features.some(item => !EVIDENCE_FEATURES.includes(item)))
9
+ return { version: 1, features: [] };
10
+ return { version: 1, features: EVIDENCE_FEATURES.filter(feature => descriptor.features.includes(feature)) };
11
+ }
12
+ catch {
13
+ return { version: 1, features: [] };
14
+ }
15
+ }
16
+ export function intersectCapabilities(hops) {
17
+ if (!hops.length || hops.length > 8)
18
+ return { version: 1, features: [] };
19
+ const descriptors = hops.map(normalizeCapabilities);
20
+ return { version: 1, features: EVIDENCE_FEATURES.filter(feature => descriptors.every(hop => hop.features.includes(feature))) };
21
+ }
@@ -0,0 +1,24 @@
1
+ import type { DebugBundleEventEnvelope, ResolvedDebugBundleConfig, NativeDebugBundleState } from "./types.js";
2
+ import type { EvidenceCapabilities, EvidenceFeature, OperationScope, RecoveryObservation } from "./evidence-types.js";
3
+ import { MobileDiagnosticBudget } from "./diagnostic-budget.js";
4
+ export declare class MobileEvidenceController {
5
+ private config;
6
+ readonly budget: MobileDiagnosticBudget;
7
+ private current;
8
+ private ended;
9
+ constructor(config: ResolvedDebugBundleConfig);
10
+ close(): void;
11
+ private active;
12
+ begin(): OperationScope;
13
+ private scope;
14
+ capabilities(state: NativeDebugBundleState, canonicalBridge: boolean): EvidenceCapabilities;
15
+ supports(feature: EvidenceFeature, state: NativeDebugBundleState, bridge: boolean): boolean;
16
+ context(source: Record<string, unknown>, state: NativeDebugBundleState, bridge: boolean): Record<string, unknown>;
17
+ recovery(observation: RecoveryObservation): {
18
+ payload: Record<string, unknown>;
19
+ correlation: DebugBundleEventEnvelope["correlation"];
20
+ } | null;
21
+ filter(original: DebugBundleEventEnvelope, state: NativeDebugBundleState, bridge: boolean): DebugBundleEventEnvelope | null;
22
+ }
23
+ export declare function fitMobileEvent(original: DebugBundleEventEnvelope, maximum?: number): DebugBundleEventEnvelope | null;
24
+ //# sourceMappingURL=evidence-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-controller.d.ts","sourceRoot":"","sources":["../src/evidence-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC9G,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAiB,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAErI,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,qBAAa,wBAAwB;IAIvB,OAAO,CAAC,MAAM;IAH1B,QAAQ,CAAC,MAAM,yBAAgC;IAC/C,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,KAAK,CAAS;gBACF,MAAM,EAAE,yBAAyB;IACrD,KAAK,IAAI,IAAI;IACb,OAAO,CAAC,MAAM;IAKd,KAAK,IAAI,cAAc;IAWvB,OAAO,CAAC,KAAK;IACb,YAAY,CAAC,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,OAAO,GAAG,oBAAoB;IAS3F,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO;IAG3F,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAYjH,QAAQ,CAAC,WAAW,EAAE,mBAAmB,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,WAAW,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAA;KAAE,GAAG,IAAI;IAa7I,MAAM,CAAC,QAAQ,EAAE,wBAAwB,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,OAAO,GAAG,wBAAwB,GAAG,IAAI;CAW5H;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,wBAAwB,EAAE,OAAO,SAAS,GAAG,wBAAwB,GAAG,IAAI,CAMpH"}
@@ -0,0 +1,113 @@
1
+ import { intersectCapabilities, normalizeCapabilities } from "./evidence-capabilities.js";
2
+ import { MobileDiagnosticBudget } from "./diagnostic-budget.js";
3
+ import { evidenceReference, evidenceScope, freshReference } from "./evidence-wire.js";
4
+ import { ownJSON, jsonObject, utf8Bytes } from "./owned-json.js";
5
+ import { generateId } from "./client-values.js";
6
+ export class MobileEvidenceController {
7
+ config;
8
+ budget = new MobileDiagnosticBudget();
9
+ current = null;
10
+ ended = false;
11
+ constructor(config) {
12
+ this.config = config;
13
+ }
14
+ close() { this.ended = true; this.current = null; this.budget.clear(); }
15
+ active(lease) {
16
+ let depth = 0;
17
+ for (let item = lease; item; item = item.parent)
18
+ if (item.ended || ++depth > 32 || this.ended)
19
+ return false;
20
+ return lease !== null && !this.ended;
21
+ }
22
+ begin() {
23
+ let depth = 0;
24
+ for (let item = this.current; item; item = item.parent)
25
+ depth++;
26
+ const lease = { id: generateId(), ended: this.ended || depth >= 32, parent: this.current };
27
+ if (!lease.ended)
28
+ this.current = lease;
29
+ const evidenceScope = { kind: "operation", operation_id: lease.id };
30
+ return { operationId: lease.id, evidenceScope, close: () => {
31
+ lease.ended = true;
32
+ if (this.current === lease)
33
+ this.current = this.active(lease.parent) ? lease.parent : null;
34
+ } };
35
+ }
36
+ scope() { return this.active(this.current) ? { kind: "operation", operation_id: this.current.id } : null; }
37
+ capabilities(state, canonicalBridge) {
38
+ // A JS pin cannot assert that an old native binary preserves fields it never implemented.
39
+ if (!canonicalBridge || this.ended)
40
+ return { version: 1, features: [] };
41
+ const native = normalizeCapabilities(state.evidenceCapabilities);
42
+ const proof = this.config.evidenceCapabilities ? intersectCapabilities([native, this.config.evidenceCapabilities]) : native;
43
+ return { version: 1, features: proof.features.filter(feature => feature !== "exception_evidence_v1" || this.config.captureExceptionEvidence).filter(feature => feature !== "recovery_v1" || this.config.captureRecoveryObservations) };
44
+ }
45
+ supports(feature, state, bridge) {
46
+ return this.capabilities(state, bridge).features.includes(feature);
47
+ }
48
+ context(source, state, bridge) {
49
+ if (!this.supports("recovery_v1", state, bridge) && !this.supports("resource_observations_v1", state, bridge))
50
+ return source;
51
+ try {
52
+ const failure = Object.getOwnPropertyDescriptor(source, "failureRef"), explicit = Object.getOwnPropertyDescriptor(source, "evidenceScope");
53
+ if (!failure || !("value" in failure) || !freshReference(failure.value))
54
+ return source;
55
+ const scope = explicit && "value" in explicit ? ownJSON(explicit.value) : this.scope();
56
+ if (!evidenceScope(scope))
57
+ return source;
58
+ const result = { ...source, evidence_reference: { version: 1, failure_ref: failure.value, scope } };
59
+ delete result.failureRef;
60
+ delete result.evidenceScope;
61
+ return result;
62
+ }
63
+ catch {
64
+ return source;
65
+ }
66
+ }
67
+ recovery(observation) {
68
+ try {
69
+ const input = jsonObject(ownJSON(observation));
70
+ if (!input)
71
+ return null;
72
+ const scope = input.evidenceScope ?? this.scope();
73
+ if (!freshReference(input.failureRef) || !freshReference(input.attemptId) || !evidenceScope(scope))
74
+ return null;
75
+ const payload = { version: 1, kind: "recovery", failure_ref: input.failureRef,
76
+ scope, attempt_id: input.attemptId, state: input.state };
77
+ for (const [local, wire] of [["operation", "operation"], ["statusCode", "status_code"], ["durationMs", "duration_ms"]]) {
78
+ if (input[local] !== undefined)
79
+ payload[wire] = input[local];
80
+ }
81
+ return { payload, correlation: input.correlation };
82
+ }
83
+ catch {
84
+ return null;
85
+ }
86
+ }
87
+ filter(original, state, bridge) {
88
+ const proof = this.capabilities(state, bridge).features;
89
+ if (original.event_type === "diagnostic_context") {
90
+ return proof.includes(original.payload.kind === "recovery" ? "recovery_v1" : "resource_observations_v1") ? original : null;
91
+ }
92
+ const event = { ...original, payload: { ...original.payload }, ...(original.context ? { context: { ...original.context } } : {}) };
93
+ if (!proof.includes("exception_evidence_v1")) {
94
+ delete event.payload.exception_evidence;
95
+ delete event.payload.execution;
96
+ }
97
+ if (!proof.includes("resource_observations_v1"))
98
+ delete event.payload.resource_observations;
99
+ if (!proof.includes("recovery_v1") && !proof.includes("resource_observations_v1") && evidenceReference(event.context?.evidence_reference))
100
+ delete event.context.evidence_reference;
101
+ return event;
102
+ }
103
+ }
104
+ export function fitMobileEvent(original, maximum = 65_536) {
105
+ if (utf8Bytes(JSON.stringify(original)) <= maximum)
106
+ return original;
107
+ const event = { ...original, payload: { ...original.payload }, ...(original.context ? { context: { ...original.context } } : {}) };
108
+ for (const field of ["exception_evidence", "execution", "resource_observations"])
109
+ delete event.payload[field];
110
+ if (evidenceReference(event.context?.evidence_reference))
111
+ delete event.context.evidence_reference;
112
+ return utf8Bytes(JSON.stringify(event)) <= maximum ? event : null;
113
+ }
@@ -0,0 +1,33 @@
1
+ export type EvidenceFeature = "exception_evidence_v1" | "resource_observations_v1" | "recovery_v1" | "evidence_provenance_v1";
2
+ export interface EvidenceCapabilities {
3
+ version: 1;
4
+ features: EvidenceFeature[];
5
+ }
6
+ export type EvidenceScope = {
7
+ kind: "operation";
8
+ operation_id: string;
9
+ } | {
10
+ kind: "page";
11
+ page_id: string;
12
+ };
13
+ export interface OperationScope {
14
+ readonly operationId: string;
15
+ readonly evidenceScope: EvidenceScope;
16
+ close(): void;
17
+ }
18
+ export interface RecoveryObservation {
19
+ failureRef: string;
20
+ evidenceScope?: EvidenceScope;
21
+ attemptId: string;
22
+ state: "attempt_started" | "attempt_completed" | "attempt_failed" | "recovery_observed" | "failure_persisted";
23
+ operation?: string;
24
+ statusCode?: number;
25
+ durationMs?: number;
26
+ correlation?: {
27
+ request_id?: string | null;
28
+ trace_id?: string | null;
29
+ session_id?: string | null;
30
+ user_id_hash?: string | null;
31
+ };
32
+ }
33
+ //# sourceMappingURL=evidence-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-types.d.ts","sourceRoot":"","sources":["../src/evidence-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,uBAAuB,GAAG,0BAA0B,GAAG,aAAa,GAAG,wBAAwB,CAAC;AAC9H,MAAM,WAAW,oBAAoB;IAAG,OAAO,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE;AACjF,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5G,MAAM,WAAW,cAAc;IAAG,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAAC,KAAK,IAAI,IAAI,CAAA;CAAE;AACtH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;IAC9G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAClI"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type OwnedJSON } from "./owned-json.js";
2
+ export declare function freshReference(value: unknown): value is string;
3
+ export declare function evidenceScope(value: unknown): boolean;
4
+ export declare function evidenceReference(value: unknown): boolean;
5
+ /** Semantic refinements accompany the generated schema, as in every native SDK. */
6
+ export declare function canonicalEvent(value: OwnedJSON): boolean;
7
+ //# sourceMappingURL=evidence-wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-wire.d.ts","sourceRoot":"","sources":["../src/evidence-wire.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExE,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE9D;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKrD;AACD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGzD;AAmDD,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAgCxD"}
@@ -0,0 +1,132 @@
1
+ import { canonicalShape } from "./canonical-schema.js";
2
+ import { jsonObject, utf8Bytes } from "./owned-json.js";
3
+ export function freshReference(value) {
4
+ return typeof value === "string" && /^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i.test(value);
5
+ }
6
+ export function evidenceScope(value) {
7
+ const scope = jsonObject(value);
8
+ if (!scope || !["operation", "page"].includes(String(scope.kind)))
9
+ return false;
10
+ const key = scope.kind === "page" ? "page_id" : "operation_id";
11
+ return Object.keys(scope).length === 2 && freshReference(scope[key]);
12
+ }
13
+ export function evidenceReference(value) {
14
+ const ref = jsonObject(value);
15
+ return ref !== null && Object.keys(ref).length === 3 && ref.version === 1 && freshReference(ref.failure_ref) && evidenceScope(ref.scope);
16
+ }
17
+ const fits = (value, maximum) => value === null ||
18
+ typeof value === "string" && value.length <= maximum && utf8Bytes(value) <= maximum;
19
+ const size = (value) => utf8Bytes(JSON.stringify(value));
20
+ function graph(value) {
21
+ const graph = jsonObject(value);
22
+ const nodes = graph.nodes;
23
+ const edges = new Map();
24
+ for (const node of nodes) {
25
+ const id = node.id;
26
+ if (edges.has(id) || !fits(node.name, 256) || !fits(node.message, 2048) || !fits(node.stack, 16_384))
27
+ return false;
28
+ for (const frame of node.frames)
29
+ if (!fits(frame.function, 256) || !fits(frame.file, 2048))
30
+ return false;
31
+ edges.set(id, node.relationships);
32
+ }
33
+ for (const children of edges.values()) {
34
+ const seen = new Set();
35
+ let causes = 0;
36
+ for (const child of children) {
37
+ const identity = `${child.kind}:${child.target_id}`;
38
+ if (!edges.has(child.target_id) || seen.has(identity))
39
+ return false;
40
+ seen.add(identity);
41
+ if (child.kind === "cause" || child.kind === "context")
42
+ causes++;
43
+ }
44
+ if (causes > 1)
45
+ return false;
46
+ }
47
+ const active = new Set(), reached = new Set();
48
+ const visit = (id, depth) => {
49
+ if (depth > 4 || active.has(id) || !edges.has(id))
50
+ return false;
51
+ active.add(id);
52
+ reached.add(id);
53
+ for (const child of edges.get(id))
54
+ if (!visit(child.target_id, depth + 1))
55
+ return false;
56
+ active.delete(id);
57
+ return true;
58
+ };
59
+ return visit(graph.root_id, 0) && reached.size === nodes.length && size(value) <= 32_768;
60
+ }
61
+ function resourceURL(value) {
62
+ if (!value || utf8Bytes(value) > 2048 || /[\u0000-\u0020\u007f\\?#]/.test(value) || value.startsWith("//"))
63
+ return false;
64
+ if (value.startsWith("/"))
65
+ return true;
66
+ if (!/^https?:\/\//i.test(value))
67
+ return false;
68
+ try {
69
+ const url = new URL(value);
70
+ return !!url.hostname && !url.username && !url.password;
71
+ }
72
+ catch {
73
+ return false;
74
+ }
75
+ }
76
+ function resources(value) {
77
+ const entries = jsonObject(value).items;
78
+ for (const entry of entries) {
79
+ if (entry.kind === "csp" && (typeof entry.effective_directive !== "string" ||
80
+ !/^[a-z-]{1,64}$/.test(entry.effective_directive)))
81
+ return false;
82
+ if (entry.source_url !== null && !resourceURL(entry.source_url))
83
+ return false;
84
+ }
85
+ return size(value) <= 32_768;
86
+ }
87
+ /** Semantic refinements accompany the generated schema, as in every native SDK. */
88
+ export function canonicalEvent(value) {
89
+ if (!canonicalShape(value))
90
+ return false;
91
+ const event = jsonObject(value), payload = jsonObject(event.payload);
92
+ const type = event.event_type;
93
+ if (type === "frontend_exception") {
94
+ const mobile = ["@debugbundle/sdk-swift", "@debugbundle/sdk-android", "@debugbundle/sdk-react-native"].includes(event.sdk_name);
95
+ if (!jsonObject(payload[mobile ? "device" : "browser"]))
96
+ return false;
97
+ }
98
+ if (type === "diagnostic_context") {
99
+ if (!freshReference(payload.failure_ref) || !evidenceScope(payload.scope))
100
+ return false;
101
+ if (payload.kind === "recovery") {
102
+ if (!freshReference(payload.attempt_id) || payload.operation !== undefined && !fits(payload.operation, 64))
103
+ return false;
104
+ }
105
+ else if (!resources(payload.observations))
106
+ return false;
107
+ if (jsonObject(payload.scope)?.kind === "page") {
108
+ const session = jsonObject(event.correlation)?.session_id;
109
+ if (typeof session !== "string" || !session.trim())
110
+ return false;
111
+ }
112
+ return true;
113
+ }
114
+ const additions = {};
115
+ for (const field of ["exception_evidence", "execution", "resource_observations"]) {
116
+ const item = payload[field];
117
+ if (item === undefined)
118
+ continue;
119
+ if (!(type === "backend_exception" && field !== "resource_observations" || type === "frontend_exception" && field !== "execution"))
120
+ return false;
121
+ if (field === "exception_evidence" && !graph(item) || field === "execution" && !fits(jsonObject(item)?.name, 128) ||
122
+ field === "resource_observations" && !resources(item))
123
+ return false;
124
+ additions[field] = item;
125
+ }
126
+ if (!Object.keys(additions).length)
127
+ return true;
128
+ const ref = jsonObject(event.context)?.evidence_reference;
129
+ if (evidenceReference(ref))
130
+ additions.evidence_reference = ref;
131
+ return size(additions) <= 32_768;
132
+ }