@askalf/dario 5.5.80 → 5.5.82
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/dist/live-fingerprint.d.ts +1 -1
- package/dist/live-fingerprint.js +1 -1
- package/dist/proxy.js +13 -6
- package/package.json +1 -1
|
@@ -496,7 +496,7 @@ export declare function detectDrift(t: TemplateData, installedOverride?: string
|
|
|
496
496
|
*/
|
|
497
497
|
export declare const SUPPORTED_CC_RANGE: {
|
|
498
498
|
readonly min: "1.0.0";
|
|
499
|
-
readonly maxTested: "2.1.
|
|
499
|
+
readonly maxTested: "2.1.251";
|
|
500
500
|
};
|
|
501
501
|
/**
|
|
502
502
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/live-fingerprint.js
CHANGED
|
@@ -1194,7 +1194,7 @@ export function detectDrift(t, installedOverride) {
|
|
|
1194
1194
|
*/
|
|
1195
1195
|
export const SUPPORTED_CC_RANGE = {
|
|
1196
1196
|
min: '1.0.0',
|
|
1197
|
-
maxTested: '2.1.
|
|
1197
|
+
maxTested: '2.1.251',
|
|
1198
1198
|
};
|
|
1199
1199
|
/**
|
|
1200
1200
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/proxy.js
CHANGED
|
@@ -756,16 +756,23 @@ export function sanitizeMessages(body, preserveTags) {
|
|
|
756
756
|
// so keeping it is *more* wire-faithful, not less; for a non-CC client a
|
|
757
757
|
// lone tag as the final turn is the actual prompt, and forwarding it beats
|
|
758
758
|
// a hard 400. Every other position still scrubs exactly as before.
|
|
759
|
+
//
|
|
760
|
+
// This holds even when the tail was ALREADY empty before the scrub
|
|
761
|
+
// (dario#1117, second report). CC's stream-interruption retry appends a
|
|
762
|
+
// user turn with `content: []` as the final message — the shape the
|
|
763
|
+
// genuine-CC rewind in buildCCRequest (dario#1092) exists to recover. The
|
|
764
|
+
// message-level drop above ran first and removed that turn, and an
|
|
765
|
+
// "only restore a tail that had content" condition here let it go, so the
|
|
766
|
+
// template saw a request already ending on the assistant's real reply and
|
|
767
|
+
// upstream answered with the prefill rejection. Restoring an empty tail is
|
|
768
|
+
// never worse than dropping it: on the genuine-CC path #1092 rewinds the
|
|
769
|
+
// pair, and on the general path the upstream names the malformed turn
|
|
770
|
+
// accurately ("content must contain at least one block") — the #1033
|
|
771
|
+
// decision — instead of dario converting it into a misleading prefill 400.
|
|
759
772
|
const tailWasDropped = tail !== undefined && kept[kept.length - 1] !== tail;
|
|
760
|
-
const tailHadContent = Array.isArray(tailContentBeforeScrub)
|
|
761
|
-
? tailContentBeforeScrub.length > 0
|
|
762
|
-
: typeof tailContentBeforeScrub === 'string'
|
|
763
|
-
? tailContentBeforeScrub !== ''
|
|
764
|
-
: tailContentBeforeScrub != null;
|
|
765
773
|
if (tail !== undefined &&
|
|
766
774
|
tailWasDropped &&
|
|
767
775
|
tail.role === 'user' &&
|
|
768
|
-
tailHadContent &&
|
|
769
776
|
kept.length > 0 &&
|
|
770
777
|
kept[kept.length - 1].role === 'assistant') {
|
|
771
778
|
tail.content = tailContentBeforeScrub;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.82",
|
|
4
4
|
"description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|