@revenium/openai 1.0.13 → 1.0.15

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 (240) hide show
  1. package/.env.example +10 -15
  2. package/CHANGELOG.md +65 -11
  3. package/CODE_OF_CONDUCT.md +57 -0
  4. package/CONTRIBUTING.md +38 -0
  5. package/README.md +104 -216
  6. package/SECURITY.md +34 -0
  7. package/dist/cjs/core/client/index.js +14 -0
  8. package/dist/cjs/core/client/index.js.map +1 -0
  9. package/dist/cjs/core/client/manager.js +109 -0
  10. package/dist/cjs/core/client/manager.js.map +1 -0
  11. package/dist/cjs/core/config/azure-config.js +5 -17
  12. package/dist/cjs/core/config/azure-config.js.map +1 -1
  13. package/dist/cjs/core/config/index.js +2 -2
  14. package/dist/cjs/core/config/index.js.map +1 -1
  15. package/dist/cjs/core/config/loader.js +34 -14
  16. package/dist/cjs/core/config/loader.js.map +1 -1
  17. package/dist/cjs/core/config/manager.js +11 -5
  18. package/dist/cjs/core/config/manager.js.map +1 -1
  19. package/dist/cjs/core/config/validator.js +3 -45
  20. package/dist/cjs/core/config/validator.js.map +1 -1
  21. package/dist/cjs/core/middleware/index.js +21 -0
  22. package/dist/cjs/core/middleware/index.js.map +1 -0
  23. package/dist/cjs/core/middleware/interfaces.js +454 -0
  24. package/dist/cjs/core/middleware/interfaces.js.map +1 -0
  25. package/dist/cjs/core/middleware/revenium-client.js +152 -0
  26. package/dist/cjs/core/middleware/revenium-client.js.map +1 -0
  27. package/dist/cjs/core/providers/detector.js +45 -23
  28. package/dist/cjs/core/providers/detector.js.map +1 -1
  29. package/dist/cjs/core/providers/index.js +2 -1
  30. package/dist/cjs/core/providers/index.js.map +1 -1
  31. package/dist/cjs/core/tracking/api-client.js +21 -14
  32. package/dist/cjs/core/tracking/api-client.js.map +1 -1
  33. package/dist/cjs/core/tracking/index.js +5 -1
  34. package/dist/cjs/core/tracking/index.js.map +1 -1
  35. package/dist/cjs/core/tracking/payload-builder.js +143 -25
  36. package/dist/cjs/core/tracking/payload-builder.js.map +1 -1
  37. package/dist/cjs/core/tracking/usage-tracker.js +111 -18
  38. package/dist/cjs/core/tracking/usage-tracker.js.map +1 -1
  39. package/dist/cjs/index.js +39 -202
  40. package/dist/cjs/index.js.map +1 -1
  41. package/dist/cjs/types/index.js +0 -8
  42. package/dist/cjs/types/index.js.map +1 -1
  43. package/dist/cjs/types/openai-augmentation.js +0 -49
  44. package/dist/cjs/types/openai-augmentation.js.map +1 -1
  45. package/dist/cjs/utils/constants.js +17 -20
  46. package/dist/cjs/utils/constants.js.map +1 -1
  47. package/dist/cjs/utils/error-handler.js +18 -14
  48. package/dist/cjs/utils/error-handler.js.map +1 -1
  49. package/dist/cjs/utils/metadata-builder.js +17 -16
  50. package/dist/cjs/utils/metadata-builder.js.map +1 -1
  51. package/dist/cjs/utils/provider-detection.js +25 -28
  52. package/dist/cjs/utils/provider-detection.js.map +1 -1
  53. package/dist/cjs/utils/trace-fields.js +115 -0
  54. package/dist/cjs/utils/trace-fields.js.map +1 -0
  55. package/dist/esm/core/client/index.js +6 -0
  56. package/dist/esm/core/client/index.js.map +1 -0
  57. package/dist/esm/core/client/manager.js +102 -0
  58. package/dist/esm/core/client/manager.js.map +1 -0
  59. package/dist/esm/core/config/azure-config.js +6 -18
  60. package/dist/esm/core/config/azure-config.js.map +1 -1
  61. package/dist/esm/core/config/index.js +5 -4
  62. package/dist/esm/core/config/index.js.map +1 -1
  63. package/dist/esm/core/config/loader.js +33 -13
  64. package/dist/esm/core/config/loader.js.map +1 -1
  65. package/dist/esm/core/config/manager.js +13 -7
  66. package/dist/esm/core/config/manager.js.map +1 -1
  67. package/dist/esm/core/config/validator.js +3 -44
  68. package/dist/esm/core/config/validator.js.map +1 -1
  69. package/dist/esm/core/middleware/index.js +8 -0
  70. package/dist/esm/core/middleware/index.js.map +1 -0
  71. package/dist/esm/core/middleware/interfaces.js +442 -0
  72. package/dist/esm/core/middleware/interfaces.js.map +1 -0
  73. package/dist/esm/core/middleware/revenium-client.js +115 -0
  74. package/dist/esm/core/middleware/revenium-client.js.map +1 -0
  75. package/dist/esm/core/providers/detector.js +43 -22
  76. package/dist/esm/core/providers/detector.js.map +1 -1
  77. package/dist/esm/core/providers/index.js +2 -2
  78. package/dist/esm/core/providers/index.js.map +1 -1
  79. package/dist/esm/core/tracking/api-client.js +20 -13
  80. package/dist/esm/core/tracking/api-client.js.map +1 -1
  81. package/dist/esm/core/tracking/index.js +4 -4
  82. package/dist/esm/core/tracking/index.js.map +1 -1
  83. package/dist/esm/core/tracking/payload-builder.js +142 -26
  84. package/dist/esm/core/tracking/payload-builder.js.map +1 -1
  85. package/dist/esm/core/tracking/usage-tracker.js +78 -20
  86. package/dist/esm/core/tracking/usage-tracker.js.map +1 -1
  87. package/dist/esm/index.js +9 -177
  88. package/dist/esm/index.js.map +1 -1
  89. package/dist/esm/types/index.js +2 -10
  90. package/dist/esm/types/index.js.map +1 -1
  91. package/dist/esm/types/openai-augmentation.js +0 -49
  92. package/dist/esm/types/openai-augmentation.js.map +1 -1
  93. package/dist/esm/utils/constants.js +16 -19
  94. package/dist/esm/utils/constants.js.map +1 -1
  95. package/dist/esm/utils/error-handler.js +19 -15
  96. package/dist/esm/utils/error-handler.js.map +1 -1
  97. package/dist/esm/utils/metadata-builder.js +17 -16
  98. package/dist/esm/utils/metadata-builder.js.map +1 -1
  99. package/dist/esm/utils/provider-detection.js +26 -29
  100. package/dist/esm/utils/provider-detection.js.map +1 -1
  101. package/dist/esm/utils/trace-fields.js +100 -0
  102. package/dist/esm/utils/trace-fields.js.map +1 -0
  103. package/dist/types/core/client/index.d.ts +6 -0
  104. package/dist/types/core/client/index.d.ts.map +1 -0
  105. package/dist/types/core/client/manager.d.ts +32 -0
  106. package/dist/types/core/client/manager.d.ts.map +1 -0
  107. package/dist/types/core/config/azure-config.d.ts +2 -2
  108. package/dist/types/core/config/azure-config.d.ts.map +1 -1
  109. package/dist/types/core/config/index.d.ts +4 -4
  110. package/dist/types/core/config/index.d.ts.map +1 -1
  111. package/dist/types/core/config/loader.d.ts +3 -1
  112. package/dist/types/core/config/loader.d.ts.map +1 -1
  113. package/dist/types/core/config/manager.d.ts +1 -1
  114. package/dist/types/core/config/manager.d.ts.map +1 -1
  115. package/dist/types/core/config/validator.d.ts +1 -12
  116. package/dist/types/core/config/validator.d.ts.map +1 -1
  117. package/dist/types/core/middleware/index.d.ts +8 -0
  118. package/dist/types/core/middleware/index.d.ts.map +1 -0
  119. package/dist/types/core/middleware/interfaces.d.ts +104 -0
  120. package/dist/types/core/middleware/interfaces.d.ts.map +1 -0
  121. package/dist/types/core/middleware/revenium-client.d.ts +64 -0
  122. package/dist/types/core/middleware/revenium-client.d.ts.map +1 -0
  123. package/dist/types/core/providers/detector.d.ts +9 -2
  124. package/dist/types/core/providers/detector.d.ts.map +1 -1
  125. package/dist/types/core/providers/index.d.ts +2 -2
  126. package/dist/types/core/providers/index.d.ts.map +1 -1
  127. package/dist/types/core/tracking/api-client.d.ts +1 -1
  128. package/dist/types/core/tracking/api-client.d.ts.map +1 -1
  129. package/dist/types/core/tracking/index.d.ts +4 -4
  130. package/dist/types/core/tracking/index.d.ts.map +1 -1
  131. package/dist/types/core/tracking/payload-builder.d.ts +5 -3
  132. package/dist/types/core/tracking/payload-builder.d.ts.map +1 -1
  133. package/dist/types/core/tracking/usage-tracker.d.ts +4 -2
  134. package/dist/types/core/tracking/usage-tracker.d.ts.map +1 -1
  135. package/dist/types/index.d.ts +11 -135
  136. package/dist/types/index.d.ts.map +1 -1
  137. package/dist/types/types/function-parameters.d.ts +91 -23
  138. package/dist/types/types/function-parameters.d.ts.map +1 -1
  139. package/dist/types/types/index.d.ts +53 -108
  140. package/dist/types/types/index.d.ts.map +1 -1
  141. package/dist/types/types/openai-augmentation.d.ts +4 -138
  142. package/dist/types/types/openai-augmentation.d.ts.map +1 -1
  143. package/dist/types/utils/constants.d.ts +7 -1
  144. package/dist/types/utils/constants.d.ts.map +1 -1
  145. package/dist/types/utils/error-handler.d.ts +2 -2
  146. package/dist/types/utils/error-handler.d.ts.map +1 -1
  147. package/dist/types/utils/metadata-builder.d.ts +2 -2
  148. package/dist/types/utils/metadata-builder.d.ts.map +1 -1
  149. package/dist/types/utils/provider-detection.d.ts +3 -3
  150. package/dist/types/utils/provider-detection.d.ts.map +1 -1
  151. package/dist/types/utils/trace-fields.d.ts +11 -0
  152. package/dist/types/utils/trace-fields.d.ts.map +1 -0
  153. package/examples/README.md +282 -198
  154. package/examples/azure/basic.ts +62 -0
  155. package/examples/azure/responses-basic.ts +45 -0
  156. package/examples/azure/responses-stream.ts +61 -0
  157. package/examples/azure/stream.ts +56 -0
  158. package/examples/getting_started.ts +31 -43
  159. package/examples/openai/basic.ts +45 -0
  160. package/examples/openai/metadata.ts +67 -0
  161. package/examples/openai/responses-basic.ts +44 -0
  162. package/examples/openai/responses-embed.ts +34 -0
  163. package/examples/openai/responses-streaming.ts +63 -0
  164. package/examples/openai/streaming.ts +59 -0
  165. package/package.json +23 -13
  166. package/dist/cjs/core/wrapper/index.js +0 -15
  167. package/dist/cjs/core/wrapper/index.js.map +0 -1
  168. package/dist/cjs/core/wrapper/instance-patcher.js +0 -202
  169. package/dist/cjs/core/wrapper/instance-patcher.js.map +0 -1
  170. package/dist/cjs/core/wrapper/request-handler.js +0 -317
  171. package/dist/cjs/core/wrapper/request-handler.js.map +0 -1
  172. package/dist/cjs/core/wrapper/stream-wrapper.js +0 -82
  173. package/dist/cjs/core/wrapper/stream-wrapper.js.map +0 -1
  174. package/dist/cjs/utils/azure-model-resolver.js +0 -211
  175. package/dist/cjs/utils/azure-model-resolver.js.map +0 -1
  176. package/dist/cjs/utils/request-handler-factory.js +0 -185
  177. package/dist/cjs/utils/request-handler-factory.js.map +0 -1
  178. package/dist/esm/core/wrapper/index.js +0 -9
  179. package/dist/esm/core/wrapper/index.js.map +0 -1
  180. package/dist/esm/core/wrapper/instance-patcher.js +0 -199
  181. package/dist/esm/core/wrapper/instance-patcher.js.map +0 -1
  182. package/dist/esm/core/wrapper/request-handler.js +0 -310
  183. package/dist/esm/core/wrapper/request-handler.js.map +0 -1
  184. package/dist/esm/core/wrapper/stream-wrapper.js +0 -79
  185. package/dist/esm/core/wrapper/stream-wrapper.js.map +0 -1
  186. package/dist/esm/utils/azure-model-resolver.js +0 -204
  187. package/dist/esm/utils/azure-model-resolver.js.map +0 -1
  188. package/dist/esm/utils/request-handler-factory.js +0 -146
  189. package/dist/esm/utils/request-handler-factory.js.map +0 -1
  190. package/dist/types/core/wrapper/index.d.ts +0 -8
  191. package/dist/types/core/wrapper/index.d.ts.map +0 -1
  192. package/dist/types/core/wrapper/instance-patcher.d.ts +0 -33
  193. package/dist/types/core/wrapper/instance-patcher.d.ts.map +0 -1
  194. package/dist/types/core/wrapper/request-handler.d.ts +0 -29
  195. package/dist/types/core/wrapper/request-handler.d.ts.map +0 -1
  196. package/dist/types/core/wrapper/stream-wrapper.d.ts +0 -13
  197. package/dist/types/core/wrapper/stream-wrapper.d.ts.map +0 -1
  198. package/dist/types/utils/azure-model-resolver.d.ts +0 -41
  199. package/dist/types/utils/azure-model-resolver.d.ts.map +0 -1
  200. package/dist/types/utils/request-handler-factory.d.ts +0 -81
  201. package/dist/types/utils/request-handler-factory.d.ts.map +0 -1
  202. package/examples/azure-basic.ts +0 -206
  203. package/examples/azure-responses-basic.ts +0 -233
  204. package/examples/azure-responses-streaming.ts +0 -255
  205. package/examples/azure-streaming.ts +0 -209
  206. package/examples/openai-basic.ts +0 -147
  207. package/examples/openai-function-calling.ts +0 -259
  208. package/examples/openai-responses-basic.ts +0 -212
  209. package/examples/openai-responses-streaming.ts +0 -232
  210. package/examples/openai-streaming.ts +0 -172
  211. package/examples/openai-vision.ts +0 -289
  212. package/src/core/config/azure-config.ts +0 -72
  213. package/src/core/config/index.ts +0 -23
  214. package/src/core/config/loader.ts +0 -66
  215. package/src/core/config/manager.ts +0 -95
  216. package/src/core/config/validator.ts +0 -89
  217. package/src/core/providers/detector.ts +0 -159
  218. package/src/core/providers/index.ts +0 -16
  219. package/src/core/tracking/api-client.ts +0 -78
  220. package/src/core/tracking/index.ts +0 -21
  221. package/src/core/tracking/payload-builder.ts +0 -137
  222. package/src/core/tracking/usage-tracker.ts +0 -189
  223. package/src/core/wrapper/index.ts +0 -9
  224. package/src/core/wrapper/instance-patcher.ts +0 -288
  225. package/src/core/wrapper/request-handler.ts +0 -423
  226. package/src/core/wrapper/stream-wrapper.ts +0 -100
  227. package/src/index.ts +0 -360
  228. package/src/types/function-parameters.ts +0 -251
  229. package/src/types/index.ts +0 -310
  230. package/src/types/openai-augmentation.ts +0 -232
  231. package/src/types/responses-api.ts +0 -308
  232. package/src/utils/azure-model-resolver.ts +0 -220
  233. package/src/utils/constants.ts +0 -21
  234. package/src/utils/error-handler.ts +0 -251
  235. package/src/utils/metadata-builder.ts +0 -228
  236. package/src/utils/provider-detection.ts +0 -257
  237. package/src/utils/request-handler-factory.ts +0 -285
  238. package/src/utils/stop-reason-mapper.ts +0 -78
  239. package/src/utils/type-guards.ts +0 -202
  240. package/src/utils/url-builder.ts +0 -68
package/.env.example CHANGED
@@ -1,20 +1,15 @@
1
- # Revenium OpenAI Middleware Configuration
2
- # Copy this file to .env and fill in your actual values
3
-
4
- # Required: Your Revenium API key (starts with hak_)
1
+ # Revenium Configuration (Required)
5
2
  REVENIUM_METERING_API_KEY=hak_your_revenium_api_key_here
3
+ REVENIUM_METERING_BASE_URL=https://api.revenium.ai
6
4
 
7
- # Optional: Revenium API base URL (defaults to https://api.revenium.ai)
8
- #REVENIUM_METERING_BASE_URL=https://api.revenium.ai
5
+ # OpenAI Configuration (Required for OpenAI native API)
6
+ OPENAI_API_KEY=sk-your_openai_api_key_here
9
7
 
10
- # Required: Your OpenAI API key (starts with sk-)
11
- OPENAI_API_KEY=sk_your_openai_api_key_here
8
+ # Azure OpenAI Configuration (Optional - for Azure OpenAI support)
9
+ AZURE_OPENAI_API_KEY=your_azure_openai_api_key
10
+ AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
11
+ AZURE_OPENAI_API_VERSION=your_azure_openai_api_version
12
12
 
13
- # Optional: Azure OpenAI configuration (uncomment if using Azure)
14
- #AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
15
- #AZURE_OPENAI_API_KEY=your-azure-openai-api-key-here
16
- #AZURE_OPENAI_DEPLOYMENT=your-deployment-name-here
17
- #AZURE_OPENAI_API_VERSION=2024-12-01-preview
13
+ # Debug Configuration (Optional)
14
+ REVENIUM_DEBUG=false # Set to true to enable debug logging
18
15
 
19
- # Optional: Enable debug logging
20
- #REVENIUM_DEBUG=true
package/CHANGELOG.md CHANGED
@@ -5,66 +5,120 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.15] - 2025-12-09
9
+
10
+ ### Added
11
+
12
+ - Comprehensive tracing support with 10 new trace visualization fields
13
+ - environment field with fallback chain (REVENIUM_ENVIRONMENT → NODE_ENV → DEPLOYMENT_ENV)
14
+ - operationSubtype field with auto-detection for function_call when tools are present
15
+ - retryNumber field for tracking retry attempts
16
+ - parentTransactionId field for distributed tracing support
17
+ - transactionName field for human-readable operation labels
18
+ - region field with AWS/Azure/GCP environment variable detection and metadata service fallback
19
+ - credentialAlias field for credential identification
20
+ - traceType field with format validation
21
+ - traceName field with length validation and truncation
22
+ - Region detection caching with 1-second timeout for metadata service calls
23
+
24
+ ### Changed
25
+
26
+ - Enhanced trace field validation with format checking and length limits
27
+ - Improved documentation with comprehensive trace field examples
28
+
29
+ ## [1.0.14] - 2025-11-14
30
+
31
+ ### Changed
32
+
33
+ - Updated Node.js requirement from >=16.0.0 to >=18.0.0 (LTS standard)
34
+ - Improved package distribution to exclude source files, include only compiled artifacts
35
+ - Enhanced README with governance file references (Contributing, Code of Conduct, Security)
36
+
37
+ ### Fixed
38
+
39
+ - Updated dashboard URLs from app.revenium.io to app.revenium.ai in examples documentation
40
+
8
41
  ## [1.0.13] - 2025-11-06
9
42
 
10
43
  ### Added
11
- - configure() function for manual configuration (simpler alias for initializeRevenium)
12
- - Support for COST_LIMIT and COMPLETION_LIMIT stop reasons
44
+
45
+ - Configure() function for manual configuration
46
+ - COST_LIMIT and COMPLETION_LIMIT stop reasons to mapper (per API spec)
13
47
  - Support for all 7 operationType enum values (CHAT, GENERATE, EMBED, CLASSIFY, SUMMARIZE, TRANSLATE, OTHER)
14
48
 
15
49
  ### Changed
50
+
16
51
  - **BREAKING:** responseQualityScore now uses 0.0-1.0 scale (was 0-100) per updated API specification
17
- - API endpoint updated from api.revenium.io to api.revenium.ai (new production domain)
18
- - Improved API compliance with proper enum values and field casing
19
- - Enhanced token counting accuracy for cache operations
52
+ - **API URL:** All references updated from api.revenium.io to api.revenium.ai (new production domain)
53
+ - **API Compliance:** provider value changed from 'OPENAI' to 'OpenAI' (proper casing per spec)
54
+ - **API Compliance:** modelSource changed to 'OPENAI' for direct OpenAI, 'AZURE_OPENAI' for Azure
55
+ - **API Compliance:** middlewareSource changed from 'nodejs' to 'revenium-openai-node' per spec format
56
+ - **API Compliance:** cacheCreationTokenCount now undefined (not 0) when provider doesn't report
57
+ - **API Compliance:** cacheReadTokenCount now uses ?? operator (not ||) to preserve 0 values
58
+ - **API Compliance:** timeToFirstToken now undefined (not hardcoded) until real TTFB tracking implemented
59
+ - Simplified main README from 675 to 386 lines
60
+ - Standardized Azure API versions to 2024-12-01-preview across all files
20
61
  - Email addresses now masked in debug logs for PII protection
21
62
  - All examples updated to use 0.0-1.0 scale for responseQualityScore
22
63
 
23
64
  ### Fixed
24
- - Improved documentation accuracy and removed deprecated configuration options
65
+
66
+ - Removed broken file references from examples documentation
67
+ - Removed non-existent config options from documentation (apiTimeout, failSilent, maxRetries)
68
+ - Removed misleading "custom fields" claim from Features section
25
69
  - config.debug property now properly enables debug logging
26
- - Manual configuration example now includes required patchOpenAIInstance call
27
70
  - Updated OpenAI version requirement to match peer dependency (v5.0.0+)
28
- - Enhanced metadata validation for responseQualityScore scale
29
- - Improved provider detection fallback handling
30
- - Fixed cache token reporting for embeddings API
31
- - reasoningTokenCount now correctly optional based on provider support
71
+ - Removed overpromised time-to-first-token metric claim
72
+ - Removed taskId field from all files (field does not exist in API spec per code review feedback)
73
+ - Added CANCELLED stop reason to mapper for completeness
74
+ - validateMetadata now checks 0.0-1.0 scale for responseQualityScore
75
+ - Fallback provider detection now uses 'OpenAI' not 'OPENAI' (proper casing)
76
+ - Embeddings now send undefined for cache tokens (was incorrectly sending 0)
77
+ - reasoningTokenCount now optional (undefined when not reported, per spec)
32
78
 
33
79
  ## [1.0.12] - 2025-10-30
34
80
 
35
81
  ### Changed
82
+
36
83
  - Improved documentation structure and Getting Started tutorial
37
84
  - Enhanced package distribution to include TypeScript source files
38
85
 
39
86
  ### Fixed
87
+
40
88
  - Repository configuration updates
41
89
 
42
90
  ## [1.0.11] - 2025-10-21
43
91
 
44
92
  ### Added
93
+
45
94
  - Examples now included in npm package
46
95
  - Comprehensive examples documentation
47
96
 
48
97
  ### Changed
98
+
49
99
  - Updated API endpoint configuration
50
100
  - Improved documentation structure
51
101
 
52
102
  ## [1.0.10] - 2025-10-17
53
103
 
54
104
  ### Added
105
+
55
106
  - Support for OpenAI Responses API
56
107
 
57
108
  ### Changed
109
+
58
110
  - Enhanced documentation and examples
59
111
 
60
112
  ## [1.0.9] - 2025-10-16
61
113
 
62
114
  ### Changed
115
+
63
116
  - Bug fixes and stability improvements
64
117
 
65
118
  ## [1.0.8] - 2025-10-15
66
119
 
67
120
  ### Added
121
+
68
122
  - Initial release with OpenAI usage tracking
69
123
  - Support for streaming responses and function calling
70
124
  - Azure OpenAI support
@@ -0,0 +1,57 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+ We as members, contributors, and leaders pledge to make participation in our
5
+ community a harassment-free experience for everyone, regardless of age, body
6
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
7
+ identity and expression, level of experience, education, socio-economic status,
8
+ nationality, personal appearance, race, caste, color, religion, or sexual
9
+ identity and orientation.
10
+
11
+ We pledge to act and interact in ways that contribute to an open, welcoming,
12
+ diverse, inclusive, and healthy community.
13
+
14
+ ## Our Standards
15
+ Examples of behavior that contributes to a positive environment include:
16
+ - Demonstrating empathy and kindness toward other people
17
+ - Being respectful of differing opinions, viewpoints, and experiences
18
+ - Giving and gracefully accepting constructive feedback
19
+ - Accepting responsibility and apologizing to those affected by mistakes
20
+ - Focusing on what is best for the community
21
+
22
+ Examples of unacceptable behavior include:
23
+ - The use of sexualized language or imagery, and sexual attention or advances
24
+ - Trolling, insulting or derogatory comments, and personal or political attacks
25
+ - Public or private harassment
26
+ - Publishing others' private information without explicit permission
27
+ - Other conduct which could reasonably be considered inappropriate
28
+
29
+ ## Enforcement Responsibilities
30
+ Community leaders are responsible for clarifying and enforcing our standards of
31
+ acceptable behavior and will take appropriate and fair corrective action.
32
+
33
+ ## Scope
34
+ This Code of Conduct applies within all community spaces, and also applies when
35
+ an individual is officially representing the project in public spaces.
36
+
37
+ ## Enforcement
38
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
39
+ reported by contacting the project team at **support@revenium.io**.
40
+ All complaints will be reviewed and investigated promptly and fairly.
41
+
42
+ The project team is obligated to respect the privacy and security of the
43
+ reporter of any incident.
44
+
45
+ ## Enforcement Guidelines
46
+ Community leaders will follow these guidelines in determining the consequences:
47
+ 1. **Correction** – Private, written warning.
48
+ 2. **Warning** – Clear and public warning of violation.
49
+ 3. **Temporary Ban** – Temporary ban from community interaction.
50
+ 4. **Permanent Ban** – Permanent removal from community interaction.
51
+
52
+ ## Attribution
53
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
54
+ version 2.1, available at
55
+ <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
56
+
57
+ [homepage]: https://www.contributor-covenant.org
@@ -0,0 +1,38 @@
1
+ # Contributing
2
+
3
+ Thank you for your interest in contributing to this project!
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repository and create a feature branch
8
+ 2. Make your changes following existing code patterns
9
+ 3. Test your changes
10
+ 4. Submit a pull request with a clear description
11
+
12
+ ## What to Contribute
13
+
14
+ - Bug fixes and improvements
15
+ - Documentation updates
16
+ - Test coverage improvements
17
+ - Performance optimizations
18
+
19
+ ## Guidelines
20
+
21
+ - Follow the existing code style
22
+ - Include tests for new functionality when applicable
23
+ - Update documentation if needed
24
+ - Keep changes focused and atomic
25
+
26
+ ## Questions?
27
+
28
+ - Check existing issues first
29
+ - For bugs: Create an issue with reproduction steps
30
+ - For questions: Email support@revenium.io
31
+
32
+ ## Security
33
+
34
+ For security vulnerabilities, please follow our [Security Policy](https://github.com/revenium/revenium-middleware-openai-node/blob/HEAD/SECURITY.md) - do not create public issues.
35
+
36
+ ## License
37
+
38
+ By contributing, you agree your contributions will be licensed under the same license as this project.