@dropout-ai/runtime 0.2.8 → 0.2.10

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dropout-ai/runtime",
3
- "version": "0.2.08",
3
+ "version": "0.2.10",
4
4
  "description": "Invisible Node.js runtime for capturing AI interactions.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -77,7 +77,6 @@ function emitSessionEnd(reason) {
77
77
  turn_index: turnIndex,
78
78
  direction: 'meta',
79
79
  turn_role: 'system',
80
- created_at: Date.now(),
81
80
  metadata_flags: {
82
81
  session_end: true,
83
82
  end_reason: reason
@@ -177,9 +176,8 @@ if (typeof GLOBAL_OBJ.fetch === 'function' && !GLOBAL_OBJ.fetch.__dropout_patche
177
176
  const requestEvent = {
178
177
  session_id: GLOBAL_OBJ.__dropout_session_id__,
179
178
  turn_index: activeTurn,
180
- direction: 'request',
179
+ direction: 'user_to_ai',
181
180
  turn_role: 'user',
182
- created_at: Date.now(),
183
181
  provider,
184
182
  model,
185
183
  content_raw: config.privacyMode === 'full' ? pText : null,
@@ -218,9 +216,8 @@ if (typeof GLOBAL_OBJ.fetch === 'function' && !GLOBAL_OBJ.fetch.__dropout_patche
218
216
  const responseEvent = {
219
217
  session_id: GLOBAL_OBJ.__dropout_session_id__,
220
218
  turn_index: activeTurn,
221
- direction: 'response',
219
+ direction: 'ai_to_user',
222
220
  turn_role: 'assistant',
223
- created_at: Date.now(),
224
221
  latency_ms: latency,
225
222
  provider,
226
223
  model,
@@ -277,9 +274,8 @@ async function capture(target, options = {}) {
277
274
  emit({
278
275
  session_id: GLOBAL_OBJ.__dropout_session_id__,
279
276
  turn_index: activeTurn,
280
- direction: 'request',
277
+ direction: 'user_to_ai',
281
278
  turn_role: 'user',
282
- created_at: Date.now(),
283
279
  provider: options.provider || 'manual',
284
280
  model: options.model || 'unknown',
285
281
  content_raw: mode === 'full' ? prompt : null,
@@ -291,9 +287,8 @@ async function capture(target, options = {}) {
291
287
  emit({
292
288
  session_id: GLOBAL_OBJ.__dropout_session_id__,
293
289
  turn_index: activeTurn,
294
- direction: 'response',
290
+ direction: 'ai_to_user',
295
291
  turn_role: 'assistant',
296
- created_at: Date.now(),
297
292
  latency_ms,
298
293
  provider: options.provider || 'manual',
299
294
  model: options.model || 'unknown',