omp-multi-auth 1.0.3 → 1.0.4
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.
|
@@ -114,17 +114,22 @@ export const SUB_TRANSPORT_CONFIG: Record<string, { builtinApi: Api | ((modelId:
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
117
|
+
const ANTIGRAVITY_ZWSP = "\u200B";
|
|
118
|
+
|
|
119
|
+
/** Substrings that make up Cloud Code Assist's system-prompt abuse fingerprint
|
|
120
|
+
* (omp #11699, #12655). The live trigger is the `<conventions>` tag plus the
|
|
121
|
+
* `RFC 2119: ...` sentence; breaking any one component defeats it. */
|
|
122
|
+
export const ANTIGRAVITY_FINGERPRINTS = ["RFC 2119", "<conventions>", "</conventions>"] as const;
|
|
123
|
+
|
|
124
|
+
/** Break Cloud Code Assist's system-prompt fingerprint so it stops masking
|
|
125
|
+
* requests as 429 RESOURCE_EXHAUSTED (omp #11699, #12655). A zero-width space is
|
|
126
|
+
* inserted into each flagged substring: invisible to the model, but it breaks
|
|
127
|
+
* the contiguous literal the upstream WAF matches. Idempotent — a second pass
|
|
128
|
+
* finds no intact substring. Content is otherwise preserved. */
|
|
122
129
|
export function defeatAntigravityFingerprint(text: string): string {
|
|
123
130
|
let out = text;
|
|
124
|
-
for (const
|
|
125
|
-
out = out
|
|
126
|
-
.split(`<${tag}>`).join(`<${tag.toUpperCase()}>`)
|
|
127
|
-
.split(`</${tag}>`).join(`</${tag.toUpperCase()}>`);
|
|
131
|
+
for (const s of ANTIGRAVITY_FINGERPRINTS) {
|
|
132
|
+
out = out.split(s).join(s[0] + ANTIGRAVITY_ZWSP + s.slice(1));
|
|
128
133
|
}
|
|
129
134
|
return out;
|
|
130
135
|
}
|
package/extensions/multi-auth.ts
CHANGED
|
@@ -20,7 +20,7 @@ export default function multiSub(pi: ExtensionAPI) {
|
|
|
20
20
|
registerSub(pi, entry);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
//
|
|
23
|
+
// Break Cloud Code Assist's system-prompt fingerprint at the OMP payload seam (base provider).
|
|
24
24
|
pi.on("before_provider_request", (event, ctx) => {
|
|
25
25
|
if (ctx.model?.provider === "google-antigravity") {
|
|
26
26
|
return rewriteAntigravitySystemInstruction(event.payload);
|
package/package.json
CHANGED