@hilbras/omnihilbras 1.11.3 → 1.12.1

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.
@@ -35,7 +35,7 @@ export const CLINE_OAUTH = {
35
35
  };
36
36
  const defaultRefreshSkewMs = 60_000;
37
37
  /** Reported to Cline as this client's version. */
38
- const omnihilbrasVersion = '1.11.3';
38
+ const omnihilbrasVersion = '1.12.1';
39
39
  /** Cline only accepts WorkOS JWTs with an explicit prefix. */
40
40
  export function toClineAccessToken(token) {
41
41
  const trimmed = token.trim();
@@ -0,0 +1,46 @@
1
+ import type { Model } from '../types.js';
2
+ import type { HttpTransport } from '../transport.js';
3
+ export declare const qwenWebProviderId = "qwen-web";
4
+ /** Reads a pasted cookie header, or a lone `name=value`, into a plain object. */
5
+ export declare function parseQwenCookieHeader(raw: string): Record<string, string>;
6
+ export type QwenProbeResult = {
7
+ /** Whether the credential authorises anything at all. */
8
+ authenticated: boolean;
9
+ /** Whether a turn was served. The TMD gate refuses with HTTP 200, so this is read from the body. */
10
+ turnServed: boolean;
11
+ /** The provider's own words about the turn. Never replaced with a summary. */
12
+ detail: string;
13
+ /** What the auth origin said. A guest is refused here first, and a bad credential shows up here. */
14
+ authDetail: string;
15
+ /** The models Qwen serves, which are readable by guests and so are always available. */
16
+ models: string[];
17
+ };
18
+ /**
19
+ * Asks Qwen three questions and reports all three answers.
20
+ *
21
+ * Deliberately a *probe* rather than a connect. The whole reason this exists is that one question
22
+ * — does the bot-protection gate apply to an authenticated request? — cannot be answered without
23
+ * a signed-in account, and guessing wrong in either direction is bad: claiming it works would
24
+ * ship a card that cannot answer, and refusing to try would be refusing on the strength of a
25
+ * measurement nobody made. So it asks, and it says what came back.
26
+ */
27
+ export declare function probeQwenWeb(cookieHeader: string, transport: HttpTransport, signal?: AbortSignal, options?: {
28
+ timeoutMs?: number;
29
+ }): Promise<QwenProbeResult>;
30
+ /**
31
+ * The provider's own refusal, read out of a **200** response.
32
+ *
33
+ * Qwen signals every refusal in the body and never in the status code, on both origins. A check
34
+ * that trusted the status would report a guest cookie as a working credential.
35
+ */
36
+ /**
37
+ * The catalog, read from the live `GET /api/v2/models/` rather than written from memory.
38
+ *
39
+ * I first wrote ten plausible ids — `qwen3.7-flash`, `qwen3.7-coder-plus`, `qwen3.7-vl-plus` and
40
+ * so on. The endpoint answers **three**, and running the probe against the live site is what
41
+ * showed it. Guessing a catalog is the same fault as guessing a capability: the card would have
42
+ * advertised models that do not exist and offered turns guaranteed to fail, with nothing on the
43
+ * page to say why. Qwen publishes no context length on this endpoint, so none is claimed.
44
+ */
45
+ export declare const QWEN_WEB_MODELS: Model[];
46
+ //# sourceMappingURL=qwen-web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qwen-web.d.ts","sourceRoot":"","sources":["../../src/adapters/qwen-web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA+CrD,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAM5C,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8BzE;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,yDAAyD;IACzD,aAAa,EAAE,OAAO,CAAC;IACvB,oGAAoG;IACpG,UAAU,EAAE,OAAO,CAAC;IACpB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,oGAAoG;IACpG,UAAU,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA4BF;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,aAAa,EACxB,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACnC,OAAO,CAAC,eAAe,CAAC,CAyF1B;AAED;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,EAIlC,CAAC"}
@@ -0,0 +1,222 @@
1
+ import { ProviderError } from '../errors.js';
2
+ /**
3
+ * Qwen Web, through the credential a signed-in chat.qwen.ai session holds.
4
+ *
5
+ * ## What is measured, and what is not
6
+ *
7
+ * Everything here was established against the live site, not assumed. The shape of the blocker
8
+ * is unusual enough to be worth stating plainly:
9
+ *
10
+ * - `GET https://auth.qwen.ai/api/v2/auths/refresh` answers **401 Unauthorized** for a guest, and
11
+ * no auth cookie is set on any host. Qwen's auth is on a *different origin* from its chat app,
12
+ * so there is nothing for an unauthenticated client to present.
13
+ * - `POST https://chat.qwen.ai/api/v2/chat/completions` answers **HTTP 200** with a refusal in
14
+ * the body: `{"ret":["FAIL_SYS_USER_VALIDATE","RGV587_ERROR::SM::…"],"data":{"url":"…/_____tmd_____/punish?…"}}`.
15
+ * The status code says success. A client that checks only the status sees a working provider.
16
+ * - That `_____tmd_____/punish` URL is **not a clearance flow**: requesting it returns 200,
17
+ * renders "Please connect them in order", sets no cookie, and the retry is refused with a
18
+ * freshly minted challenge. It is a human puzzle, so a client cannot satisfy it.
19
+ * - `GET /api/v2/models/` *does* answer for a guest, which is why the model catalog is real while
20
+ * the provider cannot serve a turn.
21
+ *
22
+ * So the open question is one that cannot be answered without a signed-in account: **does the
23
+ * TMD gate apply to an authenticated request?** Everything else about the request is known and
24
+ * written down here, so the moment a credential exists the only thing left to learn is that one
25
+ * answer — and `probeQwenWeb` reports it rather than guessing.
26
+ */
27
+ const QWEN_ORIGIN = 'https://chat.qwen.ai';
28
+ const QWEN_AUTH_ORIGIN = 'https://auth.qwen.ai';
29
+ const TURN_PATH = '/api/v2/chat/completions';
30
+ const AUTH_PATH = '/api/v2/auths/';
31
+ /** The Qwen web client's own fingerprint. Qwen's gateway is picky about being itself. */
32
+ const FINGERPRINT_HEADERS = {
33
+ accept: 'application/json',
34
+ 'accept-language': 'en-US,en;q=0.9',
35
+ origin: QWEN_ORIGIN,
36
+ referer: `${QWEN_ORIGIN}/`,
37
+ 'sec-ch-ua': '"Chromium";v="151", "Not(A:Brand";v="8"',
38
+ 'sec-ch-ua-mobile': '?0',
39
+ 'sec-ch-ua-platform': '"Linux"',
40
+ 'sec-fetch-dest': 'empty',
41
+ 'sec-fetch-mode': 'cors',
42
+ 'sec-fetch-site': 'same-origin',
43
+ };
44
+ export const qwenWebProviderId = 'qwen-web';
45
+ /** The browser's own user agent, sent verbatim so the client cannot be told apart from the app. */
46
+ const BROWSER_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.7922.34 Safari/537.36';
47
+ /** Reads a pasted cookie header, or a lone `name=value`, into a plain object. */
48
+ export function parseQwenCookieHeader(raw) {
49
+ const trimmed = raw.trim();
50
+ if (!trimmed) {
51
+ throw new ProviderError('INVALID_REQUEST', 'Paste the Cookie header from auth.qwen.ai.', {
52
+ providerId: qwenWebProviderId,
53
+ publicMessage: 'Paste the Cookie header from auth.qwen.ai.',
54
+ });
55
+ }
56
+ // A pasted request line is the commonest mistake and reads as a nonsense credential.
57
+ if (/^(GET|POST|PUT|HEAD|OPTIONS)\s+\//i.test(trimmed)) {
58
+ throw new ProviderError('INVALID_REQUEST', 'That is a request line, not a cookie. Copy the value of the Cookie header only.', {
59
+ providerId: qwenWebProviderId,
60
+ publicMessage: 'That is a request line, not a cookie. Copy the value of the Cookie header only.',
61
+ });
62
+ }
63
+ const out = {};
64
+ for (const part of trimmed.split(';')) {
65
+ const at = part.indexOf('=');
66
+ if (at <= 0)
67
+ continue;
68
+ const name = part.slice(0, at).trim();
69
+ const value = part.slice(at + 1).trim();
70
+ if (name && value)
71
+ out[name] = value;
72
+ }
73
+ if (Object.keys(out).length === 0) {
74
+ throw new ProviderError('INVALID_REQUEST', 'That does not look like a cookie header — it has no name=value pairs in it.', {
75
+ providerId: qwenWebProviderId,
76
+ publicMessage: 'That does not look like a cookie header — it has no name=value pairs in it.',
77
+ });
78
+ }
79
+ return out;
80
+ }
81
+ /**
82
+ * The provider's own refusal, read out of a **200** response.
83
+ *
84
+ * Qwen signals every refusal in the body and never in the status code, on both origins. A check
85
+ * that trusted the status would report a guest cookie as a working credential.
86
+ */
87
+ function readRefusal(payload) {
88
+ if (!payload || typeof payload !== 'object')
89
+ return undefined;
90
+ const record = payload;
91
+ if (record.success !== false)
92
+ return undefined;
93
+ const code = record.data?.code;
94
+ const details = record.data?.details;
95
+ return [typeof code === 'string' ? code : undefined, typeof details === 'string' ? details : undefined]
96
+ .filter(Boolean)
97
+ .join(' — ') || 'refused';
98
+ }
99
+ function readModels(payload) {
100
+ if (!payload || typeof payload !== 'object')
101
+ return [];
102
+ const data = payload.data;
103
+ const rows = Array.isArray(data) ? data : Array.isArray(data?.data) ? (data.data) : [];
104
+ return rows
105
+ .map((row) => (row && typeof row === 'object' ? String(row.id ?? '') : ''))
106
+ .filter(Boolean);
107
+ }
108
+ /**
109
+ * Asks Qwen three questions and reports all three answers.
110
+ *
111
+ * Deliberately a *probe* rather than a connect. The whole reason this exists is that one question
112
+ * — does the bot-protection gate apply to an authenticated request? — cannot be answered without
113
+ * a signed-in account, and guessing wrong in either direction is bad: claiming it works would
114
+ * ship a card that cannot answer, and refusing to try would be refusing on the strength of a
115
+ * measurement nobody made. So it asks, and it says what came back.
116
+ */
117
+ export async function probeQwenWeb(cookieHeader, transport, signal, options = {}) {
118
+ const cookies = parseQwenCookieHeader(cookieHeader);
119
+ const cookie = Object.entries(cookies).map(([name, value]) => `${name}=${value}`).join('; ');
120
+ const headers = (extra = {}) => ({
121
+ ...FINGERPRINT_HEADERS,
122
+ cookie,
123
+ 'user-agent': BROWSER_USER_AGENT,
124
+ ...extra,
125
+ });
126
+ /**
127
+ * A budget for the whole probe, because the alternative is a spinner that never resolves.
128
+ *
129
+ * Not the network — the three requests together take about a second. It is that a caller
130
+ * waiting on a promise it cannot see into will sit there indefinitely if anything stalls, and
131
+ * "Ask Qwen" with no outcome is indistinguishable from a broken button. On expiry the answers
132
+ * gathered so far are returned rather than discarded: a slow auth origin with a fast refusal on
133
+ * the turn is still a useful answer, and throwing it away would be its own kind of dishonesty.
134
+ */
135
+ const timeoutMs = options.timeoutMs ?? 20_000;
136
+ const controller = new AbortController();
137
+ const onAbort = () => controller.abort();
138
+ if (signal)
139
+ signal.addEventListener('abort', onAbort, { once: true });
140
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
141
+ timer.unref?.();
142
+ const ask = async (url, init) => {
143
+ try {
144
+ const response = await transport.request({
145
+ method: init.method,
146
+ url,
147
+ headers: init.headers,
148
+ providerId: qwenWebProviderId,
149
+ ...(init.body ? { body: init.body } : {}),
150
+ signal: controller.signal,
151
+ });
152
+ return { status: response.status, data: response.data, error: undefined };
153
+ }
154
+ catch (error) {
155
+ // A refusal is an answer here, not a failure to report around. The transport throws on a
156
+ // non-2xx and the message carries the status, which is exactly the evidence wanted.
157
+ return { status: 0, data: undefined, error: error instanceof Error ? error.message : String(error) };
158
+ }
159
+ };
160
+ try {
161
+ /**
162
+ * All three at once, and the turn last only because it needs a model id.
163
+ *
164
+ * Sequential requests cost three round trips to a host on another continent. The models
165
+ * catalog is the only dependency between them, and it does not need the turn's answer — so
166
+ * the turn is fired as soon as the catalog lands and the two never wait on each other.
167
+ */
168
+ const authPromise = ask(`${QWEN_AUTH_ORIGIN}${AUTH_PATH}`, { method: 'GET', headers: headers() });
169
+ const catalogPromise = ask(`${QWEN_ORIGIN}/api/v2/models/`, { method: 'GET', headers: headers() });
170
+ const [auth, catalog] = await Promise.all([authPromise, catalogPromise]);
171
+ const models = readModels(catalog.data);
172
+ const turn = await ask(`${QWEN_ORIGIN}${TURN_PATH}`, {
173
+ method: 'POST',
174
+ headers: headers({ 'content-type': 'application/json' }),
175
+ body: JSON.stringify({ model: models[0] ?? 'qwen3.7-plus', messages: [{ role: 'user', content: 'hi' }], stream: false }),
176
+ });
177
+ // 1. The auth origin. A guest is refused here first, so this separates "no credential" from
178
+ // "the credential is not the problem".
179
+ //
180
+ // Read from the **body**, not the status. `auth.qwen.ai` answers a guest with **HTTP 200**
181
+ // and `{"success":false,"data":{"code":"Unauthorized"}}` — the status code is a lie and the
182
+ // transport, correctly, does not throw. Trusting the status is what made a guest cookie
183
+ // report as `authenticated: true`.
184
+ const authRefused = readRefusal(auth.data) ?? (auth.error ? auth.error : undefined);
185
+ const authenticated = auth.error === undefined && !authRefused;
186
+ const authDetail = authRefused ?? `HTTP ${auth.status}`;
187
+ // 2. The turn — the question that actually matters, and the one the refusal answers.
188
+ const ret = Array.isArray(turn.data?.ret) ? (turn.data.ret) : [];
189
+ const turnRefusal = readRefusal(turn.data);
190
+ const turnServed = turn.error === undefined && ret.length === 0 && !turnRefusal;
191
+ const detail = turn.error
192
+ ?? (ret.length > 0 ? `Qwen refused the turn: ${ret.join(', ')}` : undefined)
193
+ ?? turnRefusal
194
+ ?? `Qwen answered HTTP ${turn.status}.`;
195
+ return { authenticated, turnServed, detail, authDetail, models };
196
+ }
197
+ finally {
198
+ clearTimeout(timer);
199
+ signal?.removeEventListener('abort', onAbort);
200
+ }
201
+ }
202
+ /**
203
+ * The provider's own refusal, read out of a **200** response.
204
+ *
205
+ * Qwen signals every refusal in the body and never in the status code, on both origins. A check
206
+ * that trusted the status would report a guest cookie as a working credential.
207
+ */
208
+ /**
209
+ * The catalog, read from the live `GET /api/v2/models/` rather than written from memory.
210
+ *
211
+ * I first wrote ten plausible ids — `qwen3.7-flash`, `qwen3.7-coder-plus`, `qwen3.7-vl-plus` and
212
+ * so on. The endpoint answers **three**, and running the probe against the live site is what
213
+ * showed it. Guessing a catalog is the same fault as guessing a capability: the card would have
214
+ * advertised models that do not exist and offered turns guaranteed to fail, with nothing on the
215
+ * page to say why. Qwen publishes no context length on this endpoint, so none is claimed.
216
+ */
217
+ export const QWEN_WEB_MODELS = [
218
+ { id: 'qwen3.7-plus', providerId: qwenWebProviderId },
219
+ { id: 'qwen3.8-max', providerId: qwenWebProviderId },
220
+ { id: 'qwen3.8-omni-flash', providerId: qwenWebProviderId },
221
+ ];
222
+ //# sourceMappingURL=qwen-web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qwen-web.js","sourceRoot":"","sources":["../../src/adapters/qwen-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAChD,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAC7C,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAEnC,yFAAyF;AACzF,MAAM,mBAAmB,GAAG;IAC1B,MAAM,EAAE,kBAAkB;IAC1B,iBAAiB,EAAE,gBAAgB;IACnC,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,GAAG,WAAW,GAAG;IAC1B,WAAW,EAAE,yCAAyC;IACtD,kBAAkB,EAAE,IAAI;IACxB,oBAAoB,EAAE,SAAS;IAC/B,gBAAgB,EAAE,OAAO;IACzB,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,aAAa;CACvB,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C,mGAAmG;AACnG,MAAM,kBAAkB,GACtB,2GAA2G,CAAC;AAE9G,iFAAiF;AACjF,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,aAAa,CAAC,iBAAiB,EAAE,4CAA4C,EAAE;YACvF,UAAU,EAAE,iBAAiB;YAC7B,aAAa,EAAE,4CAA4C;SAC5D,CAAC,CAAC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C;QACT,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;AACH,CAAC;AAED;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAY;IACtC,EAAE,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE;IACrD,EAAE,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE;IACpD,EAAE,EAAE,EAAE,oBAAoB,EAAE,UAAU,EAAE,iBAAiB,EAAE;CAC5D,CAAC"}
package/dist/index.d.ts CHANGED
@@ -18,5 +18,6 @@ export * from './adapters/kiro.js';
18
18
  export * from './adapters/chatgpt-web.js';
19
19
  export * from './adapters/deepseek-pow.js';
20
20
  export * from './adapters/deepseek-web.js';
21
+ export * from './adapters/qwen-web.js';
21
22
  export * from './url.js';
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -18,5 +18,6 @@ export * from './adapters/kiro.js';
18
18
  export * from './adapters/chatgpt-web.js';
19
19
  export * from './adapters/deepseek-pow.js';
20
20
  export * from './adapters/deepseek-web.js';
21
+ export * from './adapters/qwen-web.js';
21
22
  export * from './url.js';
22
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hilbras/omnihilbras",
3
- "version": "1.11.3",
3
+ "version": "1.12.1",
4
4
  "description": "Typed provider SDK for the OmniHilbras gateway: normalized chat, streaming, model listing, and capability contracts for OpenAI, Anthropic, Gemini, and OpenAI-compatible providers.",
5
5
  "license": "MIT",
6
6
  "author": "Hilbras",