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
- export const ANTIGRAVITY_SENSITIVE_TAGS = ["system-conventions", "system-directive"] as const;
118
-
119
- /** Case-flip Google's fingerprinted system-prompt tags so Cloud Code Assist stops
120
- * masking the request as 429 RESOURCE_EXHAUSTED (omp issue #11809). Content is
121
- * preserved; only the exact-substring fingerprint is defeated. */
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 tag of ANTIGRAVITY_SENSITIVE_TAGS) {
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
  }
@@ -20,7 +20,7 @@ export default function multiSub(pi: ExtensionAPI) {
20
20
  registerSub(pi, entry);
21
21
  }
22
22
 
23
- // Apply same tag-only fingerprint workaround at OMP payload seam.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-multi-auth",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "description": "Multi-account OAuth login for omp (Oh My Pi) -- add and manage multiple accounts per provider from one place.",
6
6
  "keywords": [