backend-manager 5.0.130 → 5.0.132
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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/manager/libraries/openai.js +13 -27
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
# [5.0.131] - 2026-03-11
|
|
18
|
+
### Changed
|
|
19
|
+
- Analytics config restructured: consolidated `googleAnalytics`, `meta`, and `tiktok` under unified `analytics.providers` namespace with `google`, `meta`, and `tiktok` keys
|
|
20
|
+
- Google Analytics secret moved from config (`googleAnalytics.secret`) to env var (`GOOGLE_ANALYTICS_SECRET`)
|
|
21
|
+
- Meta pixel ID read from `analytics.providers.meta.id` instead of `meta.pixelId`
|
|
22
|
+
- TikTok pixel code read from `analytics.providers.tiktok.id` instead of `tiktok.pixelCode`
|
|
23
|
+
- Flattened `owner` field from `{ uid: string }` to plain UID string in feedback docs, notifications, and `getDocumentWithOwnerUser()` default path
|
|
24
|
+
- Moved `created` timestamp inside `metadata` object in feedback documents
|
|
25
|
+
- Added `GOOGLE_ANALYTICS_SECRET`, `META_ACCESS_TOKEN`, `TIKTOK_ACCESS_TOKEN` to `.env` template
|
|
26
|
+
- Bumped version to 5.0.131
|
|
27
|
+
|
|
17
28
|
# [5.0.129] - 2026-03-11
|
|
18
29
|
### Added
|
|
19
30
|
- Usage proxy system: `setUser()` to bill usage to a different user, `addMirror()`/`setMirrors()` to write usage to additional Firestore docs in parallel
|
package/package.json
CHANGED
|
@@ -590,37 +590,23 @@ function formatHistory(options, prompt, message, _log) {
|
|
|
590
590
|
attachments: options.message.attachments,
|
|
591
591
|
});
|
|
592
592
|
|
|
593
|
-
//
|
|
594
|
-
history.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
const originalContent = m.content;
|
|
603
|
-
const originalAttachments = m.attachments;
|
|
604
|
-
|
|
605
|
-
// Set properties
|
|
606
|
-
m.role = m.role || 'developer';
|
|
607
|
-
m.content = formatMessageContent(originalContent, originalAttachments, _log, 'responses', m.role);
|
|
608
|
-
m.attachments = [];
|
|
593
|
+
// Format history into new objects (avoid mutating originals which may be persisted by the caller)
|
|
594
|
+
const formatted = history.map((m) => {
|
|
595
|
+
const role = m.role || 'developer';
|
|
596
|
+
const content = typeof m.content === 'string' ? m.content.trim() : String(m.content || '');
|
|
597
|
+
|
|
598
|
+
const result = {
|
|
599
|
+
role: role,
|
|
600
|
+
content: formatMessageContent(content, m.attachments, _log, 'responses', role),
|
|
601
|
+
};
|
|
609
602
|
|
|
610
|
-
//
|
|
611
|
-
|
|
612
|
-
if (!['role', 'content'].includes(key)) {
|
|
613
|
-
delete m[key];
|
|
614
|
-
}
|
|
615
|
-
});
|
|
616
|
-
})
|
|
603
|
+
// Log
|
|
604
|
+
_log('Message', result.role, result.content);
|
|
617
605
|
|
|
618
|
-
|
|
619
|
-
history.forEach((m) => {
|
|
620
|
-
_log('Message', m.role, m.content);
|
|
606
|
+
return result;
|
|
621
607
|
});
|
|
622
608
|
|
|
623
|
-
return
|
|
609
|
+
return formatted;
|
|
624
610
|
}
|
|
625
611
|
|
|
626
612
|
function attemptRequest(options, self, prompt, message, user, moderation, attempt, assistant, resolve, reject, _log) {
|