@dropout-ai/runtime 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +7 -9
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
const crypto = require('crypto');
|
|
9
9
|
|
|
10
10
|
// --- CONFIGURATION ---
|
|
11
|
-
// Public ingestion endpoint (No keys required)
|
|
12
11
|
const SUPABASE_FUNCTION_URL = "https://hipughmjlwmwjxzyxfzs.supabase.co/functions/v1/capture-sealed";
|
|
13
12
|
|
|
14
13
|
// --- Identity & State ---
|
|
@@ -49,13 +48,10 @@ function emit(payload) {
|
|
|
49
48
|
method: 'POST',
|
|
50
49
|
headers: {
|
|
51
50
|
'Content-Type': 'application/json'
|
|
52
|
-
// No Authorization header needed since Enforce JWT is OFF
|
|
53
51
|
},
|
|
54
52
|
body: JSON.stringify(payload),
|
|
55
53
|
keepalive: true
|
|
56
|
-
}).catch(() => {
|
|
57
|
-
// Silent fail (Fire & Forget) to ensure no impact on host app
|
|
58
|
-
});
|
|
54
|
+
}).catch(() => { });
|
|
59
55
|
}, 0);
|
|
60
56
|
}
|
|
61
57
|
|
|
@@ -179,7 +175,8 @@ if (typeof GLOBAL_OBJ.fetch === 'function' && !GLOBAL_OBJ.fetch.__dropout_patche
|
|
|
179
175
|
turn_role: 'user',
|
|
180
176
|
provider,
|
|
181
177
|
model,
|
|
182
|
-
|
|
178
|
+
// FIX: Renamed 'content_raw' to 'content' to match Supabase expectations
|
|
179
|
+
content: config.privacyMode === 'full' ? pText : null,
|
|
183
180
|
content_hash: pHash,
|
|
184
181
|
metadata_flags: {
|
|
185
182
|
retry_like: isRetry ? 1 : 0
|
|
@@ -220,7 +217,8 @@ if (typeof GLOBAL_OBJ.fetch === 'function' && !GLOBAL_OBJ.fetch.__dropout_patche
|
|
|
220
217
|
latency_ms: latency,
|
|
221
218
|
provider,
|
|
222
219
|
model,
|
|
223
|
-
|
|
220
|
+
// FIX: Renamed 'content_raw' to 'content'
|
|
221
|
+
content: config.privacyMode === 'full' ? oText : null,
|
|
224
222
|
content_hash: oHash,
|
|
225
223
|
metadata_flags: {
|
|
226
224
|
non_adaptive_response: isNonAdaptive ? 1 : 0,
|
|
@@ -277,7 +275,7 @@ async function capture(target, options = {}) {
|
|
|
277
275
|
turn_role: 'user',
|
|
278
276
|
provider: options.provider || 'manual',
|
|
279
277
|
model: options.model || 'unknown',
|
|
280
|
-
|
|
278
|
+
content: mode === 'full' ? prompt : null, // FIX: content_raw -> content
|
|
281
279
|
content_hash: pHash,
|
|
282
280
|
metadata_flags: { retry_like: pHash === lastPromptHash ? 1 : 0 }
|
|
283
281
|
});
|
|
@@ -291,7 +289,7 @@ async function capture(target, options = {}) {
|
|
|
291
289
|
latency_ms,
|
|
292
290
|
provider: options.provider || 'manual',
|
|
293
291
|
model: options.model || 'unknown',
|
|
294
|
-
|
|
292
|
+
content: mode === 'full' ? output : null, // FIX: content_raw -> content
|
|
295
293
|
content_hash: oHash,
|
|
296
294
|
metadata_flags: { non_adaptive_response: oHash === lastResponseHash ? 1 : 0, turn_boundary_confirmed: 1 }
|
|
297
295
|
});
|