@openlimiter/connectors 0.4.0 → 1.2.0
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/antigravity.d.ts +6 -5
- package/dist/antigravity.d.ts.map +1 -1
- package/dist/antigravity.js +27 -25
- package/dist/antigravity.js.map +1 -1
- package/dist/claude.d.ts +59 -20
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +452 -53
- package/dist/claude.js.map +1 -1
- package/dist/codex.d.ts +3 -20
- package/dist/codex.d.ts.map +1 -1
- package/dist/codex.js +72 -18
- package/dist/codex.js.map +1 -1
- package/dist/contract-gate.d.ts +56 -0
- package/dist/contract-gate.d.ts.map +1 -0
- package/dist/contract-gate.js +100 -0
- package/dist/contract-gate.js.map +1 -0
- package/dist/fixtures.d.ts +19 -0
- package/dist/fixtures.d.ts.map +1 -1
- package/dist/fixtures.js +213 -34
- package/dist/fixtures.js.map +1 -1
- package/dist/gemini-cli.d.ts +13 -0
- package/dist/gemini-cli.d.ts.map +1 -0
- package/dist/gemini-cli.js +86 -0
- package/dist/gemini-cli.js.map +1 -0
- package/dist/grok.d.ts +13 -0
- package/dist/grok.d.ts.map +1 -0
- package/dist/grok.js +143 -0
- package/dist/grok.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/kimi.d.ts +13 -0
- package/dist/kimi.d.ts.map +1 -0
- package/dist/kimi.js +141 -0
- package/dist/kimi.js.map +1 -0
- package/dist/manual.d.ts +3 -1
- package/dist/manual.d.ts.map +1 -1
- package/dist/manual.js +6 -3
- package/dist/manual.js.map +1 -1
- package/dist/opencode.d.ts +47 -7
- package/dist/opencode.d.ts.map +1 -1
- package/dist/opencode.js +203 -67
- package/dist/opencode.js.map +1 -1
- package/dist/openrouter.d.ts +3 -1
- package/dist/openrouter.d.ts.map +1 -1
- package/dist/openrouter.js +6 -3
- package/dist/openrouter.js.map +1 -1
- package/dist/shared.d.ts +17 -1
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +24 -0
- package/dist/shared.js.map +1 -1
- package/package.json +4 -3
package/dist/opencode.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// This interface is UNOFFICIAL and may break.
|
|
2
|
+
import { connectionStatus } from "@openlimiter/core";
|
|
1
3
|
import { durationSecondsFromWords, instantAfter, rawMeter, shortExpiry } from "./shared.js";
|
|
2
4
|
/**
|
|
3
5
|
* The OpenCode usage reader, and the least trustworthy one in the product.
|
|
@@ -26,11 +28,23 @@ export const opencodeLabels = {
|
|
|
26
28
|
verification: "UNVERIFIED"
|
|
27
29
|
};
|
|
28
30
|
export const opencodeHonesty = "UNVERIFIED_AUTHENTICATED_SCRAPE_HIGH_RISK";
|
|
31
|
+
/**
|
|
32
|
+
* BETA, and stated rather than implied.
|
|
33
|
+
*
|
|
34
|
+
* Every other reader in this package reads an interface: documented, private,
|
|
35
|
+
* or declared in a vendor's own client source, but an interface. This one reads
|
|
36
|
+
* a page that was designed for a person's eyes, whose wording nobody promised
|
|
37
|
+
* and which has already been renamed once underneath it. That is a different
|
|
38
|
+
* class of thing, and a surface that shows it beside the others has to be able
|
|
39
|
+
* to say so.
|
|
40
|
+
*/
|
|
41
|
+
export const opencodeMaturity = "beta";
|
|
29
42
|
export const opencodeInput = {
|
|
30
43
|
kind: "authenticated_page_payload",
|
|
31
44
|
pathTemplate: "{browserSession}/usage",
|
|
32
45
|
readMode: "read_only",
|
|
33
|
-
honesty: opencodeHonesty
|
|
46
|
+
honesty: opencodeHonesty,
|
|
47
|
+
maturity: opencodeMaturity
|
|
34
48
|
};
|
|
35
49
|
/**
|
|
36
50
|
* What this reader reads: text, not JSON.
|
|
@@ -93,15 +107,45 @@ function tagsIn(html, from, to) {
|
|
|
93
107
|
*/
|
|
94
108
|
export const OPENCODE_MAX_PAGE_CHARS = 1_048_576;
|
|
95
109
|
/**
|
|
96
|
-
* The
|
|
110
|
+
* The cadences the workspace page renders, and how each one is recognised.
|
|
97
111
|
*
|
|
98
|
-
*
|
|
112
|
+
* This used to be three exact phrases, all three required, and the page renamed
|
|
113
|
+
* them. Three exact strings is the most brittle possible way to read a document
|
|
114
|
+
* whose wording nobody promised us, and the failure was total: one renamed
|
|
115
|
+
* heading and the whole reader went dark on a page still rendering all three
|
|
116
|
+
* figures.
|
|
117
|
+
*
|
|
118
|
+
* So a cadence is now recognised by the WORD that names it, case insensitively,
|
|
119
|
+
* with the wordings seen so far and the obvious neighbours of each. Structure
|
|
120
|
+
* still does the real work: a match only produces a reading if it sits in a
|
|
121
|
+
* container that holds a percentage and names no other cadence, which is the
|
|
122
|
+
* guard that stops a heading from borrowing the figure beside it.
|
|
99
123
|
*/
|
|
100
124
|
export const OPENCODE_WINDOWS = [
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
125
|
+
{
|
|
126
|
+
meter: "FIVE_HOUR",
|
|
127
|
+
seconds: 18_000,
|
|
128
|
+
pattern: /\b(?:rolling|session|5[\s-]*hour|five[\s-]*hour)\b/giu
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
meter: "SEVEN_DAY",
|
|
132
|
+
seconds: 604_800,
|
|
133
|
+
pattern: /\b(?:weekly|week|7[\s-]*day|seven[\s-]*day)\b/giu
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
meter: "MONTHLY",
|
|
137
|
+
seconds: 2_592_000,
|
|
138
|
+
pattern: /\b(?:monthly|month|30[\s-]*day|thirty[\s-]*day)\b/giu
|
|
139
|
+
}
|
|
104
140
|
];
|
|
141
|
+
/**
|
|
142
|
+
* What a logged out workspace page says instead of a meter.
|
|
143
|
+
*
|
|
144
|
+
* Read only to tell a person WHICH thing went wrong. A page this reader cannot
|
|
145
|
+
* read is either a layout change or a session that ended, and those need
|
|
146
|
+
* different sentences: one is ours to fix and the other is one click.
|
|
147
|
+
*/
|
|
148
|
+
const SIGNED_OUT = /\b(?:sign[\s-]?in|sign[\s-]?up|log[\s-]?in|create an account)\b/iu;
|
|
105
149
|
/**
|
|
106
150
|
* Markup and hydration comments, removed so text can be matched.
|
|
107
151
|
*
|
|
@@ -112,16 +156,24 @@ export const OPENCODE_WINDOWS = [
|
|
|
112
156
|
* still the worst kind of missing. Verified against the live page 2026-08-03.
|
|
113
157
|
*/
|
|
114
158
|
const MARKUP = /<!--[\s\S]*?-->|<[^>]*>/gu;
|
|
115
|
-
/**
|
|
116
|
-
|
|
159
|
+
/**
|
|
160
|
+
* A percentage as the page prints it.
|
|
161
|
+
*
|
|
162
|
+
* The decimal part is optional because the page has printed both "92%" and
|
|
163
|
+
* "92.4%", and a reader that only knows whole numbers reads the second as 92
|
|
164
|
+
* or as nothing at all depending on where the match lands. The number pattern
|
|
165
|
+
* is what this reader trusts; the wording around it is not.
|
|
166
|
+
*/
|
|
167
|
+
const PERCENT = /(\d{1,3}(?:\.\d{1,2})?)\s*%/u;
|
|
117
168
|
/**
|
|
118
169
|
* A countdown as the page prints it.
|
|
119
170
|
*
|
|
120
|
-
* Anchored on the
|
|
121
|
-
*
|
|
122
|
-
*
|
|
171
|
+
* Anchored on the verb rather than one exact phrase, because "Resets in",
|
|
172
|
+
* "Renews in" and "Refreshes in" all name the same thing and the page has used
|
|
173
|
+
* more than one. It still consumes only consecutive number and unit pairs, so
|
|
174
|
+
* it cannot wander into the next window's duration if a boundary ever moves.
|
|
123
175
|
*/
|
|
124
|
-
const RESETS_IN =
|
|
176
|
+
const RESETS_IN = /\b(?:resets?|renews?|refreshes|refresh)\b(?:\s+in)?[:\s]\s*((?:\d{1,6}\s*(?:day|hour|minute|second)s?\s*)+)/iu;
|
|
125
177
|
function flatten(fragment) {
|
|
126
178
|
return fragment.replace(MARKUP, " ").split(/\s+/u).filter(Boolean).join(" ");
|
|
127
179
|
}
|
|
@@ -206,7 +258,7 @@ function windowRegion(html, labelAt, otherLabels) {
|
|
|
206
258
|
if (element === null)
|
|
207
259
|
return null;
|
|
208
260
|
const segment = flatten(html.slice(element.from, element.to));
|
|
209
|
-
if (otherLabels.some((
|
|
261
|
+
if (otherLabels.some((pattern) => matches(pattern, segment)))
|
|
210
262
|
return null;
|
|
211
263
|
if (PERCENT.test(segment))
|
|
212
264
|
return segment;
|
|
@@ -216,106 +268,190 @@ function windowRegion(html, labelAt, otherLabels) {
|
|
|
216
268
|
return null;
|
|
217
269
|
}
|
|
218
270
|
/**
|
|
219
|
-
*
|
|
271
|
+
* Whether a position sits inside a tag rather than in text a person reads.
|
|
220
272
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
273
|
+
* A cadence word in `class="monthly-card"` is markup, not a heading, and
|
|
274
|
+
* treating it as one would put a label in a place the reader then has to
|
|
275
|
+
* resolve a container for. Cheap and exact enough: the last angle bracket
|
|
276
|
+
* before the position decides.
|
|
224
277
|
*/
|
|
225
|
-
function
|
|
226
|
-
|
|
278
|
+
function insideTag(html, at) {
|
|
279
|
+
return html.lastIndexOf("<", at) > html.lastIndexOf(">", at);
|
|
280
|
+
}
|
|
281
|
+
/** Whether a pattern matches, without carrying lastIndex between calls. */
|
|
282
|
+
function matches(pattern, text) {
|
|
283
|
+
pattern.lastIndex = 0;
|
|
284
|
+
return pattern.test(text);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Where each cadence is named on the page, when it is named exactly once.
|
|
288
|
+
*
|
|
289
|
+
* A cadence named nowhere is a window this page is not rendering. A cadence
|
|
290
|
+
* named twice is two candidate containers and no way to know which one is the
|
|
291
|
+
* meter, so it is ambiguous. Both cost that cadence and nothing else: losing
|
|
292
|
+
* one bar is a smaller failure than drawing a bar with somebody else's number
|
|
293
|
+
* in it, and losing all three because one heading was renamed, which is what
|
|
294
|
+
* this reader used to do, is the largest failure of the three.
|
|
295
|
+
*/
|
|
296
|
+
function findLabels(html) {
|
|
297
|
+
const hits = [];
|
|
227
298
|
for (const window of OPENCODE_WINDOWS) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
299
|
+
window.pattern.lastIndex = 0;
|
|
300
|
+
const positions = [];
|
|
301
|
+
for (const match of html.matchAll(window.pattern)) {
|
|
302
|
+
const at = match.index ?? -1;
|
|
303
|
+
if (at < 0 || insideTag(html, at))
|
|
304
|
+
continue;
|
|
305
|
+
positions.push(at);
|
|
306
|
+
/* Two is already ambiguous, so there is no reason to scan a large page
|
|
307
|
+
looking for a third. */
|
|
308
|
+
if (positions.length > 1)
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
if (positions.length !== 1)
|
|
312
|
+
continue;
|
|
313
|
+
hits.push({
|
|
314
|
+
at: positions[0] ?? 0,
|
|
315
|
+
meter: window.meter,
|
|
316
|
+
seconds: window.seconds,
|
|
317
|
+
others: OPENCODE_WINDOWS
|
|
318
|
+
.filter((other) => other.meter !== window.meter)
|
|
319
|
+
.map((other) => other.pattern)
|
|
320
|
+
});
|
|
236
321
|
}
|
|
237
|
-
|
|
322
|
+
return hits.sort((left, right) => left.at - right.at);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Every window this page states, or null when it states none this reader can
|
|
326
|
+
* believe.
|
|
327
|
+
*
|
|
328
|
+
* Each window's figure is read out of its own CONTAINER and nowhere else, so a
|
|
329
|
+
* percentage can only ever be attributed to the block that rendered it. A
|
|
330
|
+
* window whose container cannot be resolved, or holds no percentage, or holds
|
|
331
|
+
* an impossible one, is dropped alone: the page is a rendered document rather
|
|
332
|
+
* than a contract, and one block changing shape is not a reason to discard the
|
|
333
|
+
* blocks that did not.
|
|
334
|
+
*/
|
|
335
|
+
function parseWindows(html, now) {
|
|
238
336
|
const windows = [];
|
|
239
|
-
for (const
|
|
240
|
-
|
|
241
|
-
* The readable region is this window's own CONTAINER, and nothing past it.
|
|
242
|
-
*
|
|
243
|
-
* A character count was not enough, and the way it failed is worth stating:
|
|
244
|
-
* "the first percentage within two thousand characters after the label"
|
|
245
|
-
* still reaches a footer whenever the window's own percentage is absent, so
|
|
246
|
-
* a page that stopped rendering one meter would report an unrelated figure
|
|
247
|
-
* as that meter. Outside the container is outside, at any distance.
|
|
248
|
-
*/
|
|
249
|
-
const segment = windowRegion(html, start.at, found.filter((entry) => entry.label !== start.label).map((entry) => entry.label));
|
|
337
|
+
for (const hit of findLabels(html)) {
|
|
338
|
+
const segment = windowRegion(html, hit.at, hit.others);
|
|
250
339
|
if (segment === null)
|
|
251
|
-
|
|
340
|
+
continue;
|
|
252
341
|
const percentMatch = PERCENT.exec(segment);
|
|
253
342
|
if (percentMatch === null)
|
|
254
|
-
|
|
255
|
-
const percent = Number.
|
|
343
|
+
continue;
|
|
344
|
+
const percent = Number.parseFloat(percentMatch[1] ?? "");
|
|
256
345
|
if (!Number.isFinite(percent) || percent < 0 || percent > 100)
|
|
257
|
-
|
|
346
|
+
continue;
|
|
258
347
|
/* The countdown is optional, because the page omits it on a window that has
|
|
259
348
|
no reset pending. A missing countdown costs the countdown and nothing
|
|
260
349
|
else: the percentage beside it was still rendered by the provider. */
|
|
261
350
|
const resetMatch = RESETS_IN.exec(segment);
|
|
262
351
|
const seconds = resetMatch === null ? null : durationSecondsFromWords(resetMatch[1] ?? "");
|
|
263
352
|
windows.push({
|
|
353
|
+
meter: hit.meter,
|
|
264
354
|
percent,
|
|
265
|
-
seconds:
|
|
355
|
+
seconds: hit.seconds,
|
|
266
356
|
resetAt: seconds === null ? null : instantAfter(now, seconds)
|
|
267
357
|
});
|
|
268
358
|
}
|
|
269
|
-
return windows;
|
|
359
|
+
return windows.length === 0 ? null : windows;
|
|
270
360
|
}
|
|
271
361
|
/**
|
|
272
|
-
*
|
|
362
|
+
* Every provider window, including the monthly quota.
|
|
273
363
|
*
|
|
274
|
-
* The
|
|
275
|
-
*
|
|
364
|
+
* The shared policy still derives the binding window by choosing the highest
|
|
365
|
+
* percentage. Keeping the three source windows lets every surface state which
|
|
366
|
+
* cadence a number belongs to instead of hiding the monthly value inside one
|
|
367
|
+
* synthetic primary meter.
|
|
276
368
|
*/
|
|
277
369
|
export function parseOpencodePayload(payload, now) {
|
|
278
370
|
if (typeof payload !== "string")
|
|
279
371
|
return null;
|
|
280
372
|
if (payload.length === 0 || payload.length > OPENCODE_MAX_PAGE_CHARS)
|
|
281
373
|
return null;
|
|
282
|
-
|
|
374
|
+
/*
|
|
375
|
+
* Fail soft, and mean it. This is the only reader in the package pointed at a
|
|
376
|
+
* rendered document rather than an interface, so it is the only one where an
|
|
377
|
+
* unforeseen shape can reach code that was not written for it. A thrown error
|
|
378
|
+
* here would take down whatever was collecting, which would turn one changed
|
|
379
|
+
* page into a broken product, so the whole scan answers null instead and the
|
|
380
|
+
* connection below says what a person should do about it.
|
|
381
|
+
*/
|
|
382
|
+
let windows = null;
|
|
383
|
+
try {
|
|
384
|
+
windows = parseWindows(payload, now);
|
|
385
|
+
}
|
|
386
|
+
catch {
|
|
387
|
+
return null;
|
|
388
|
+
}
|
|
283
389
|
if (windows === null || windows.length === 0)
|
|
284
390
|
return null;
|
|
285
391
|
const expiresAt = shortExpiry(now);
|
|
286
392
|
if (expiresAt === null)
|
|
287
393
|
return null;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
394
|
+
return windows.map((window) => rawMeter({
|
|
395
|
+
provider: "OPENCODE",
|
|
396
|
+
meter: window.meter,
|
|
397
|
+
value: window.percent,
|
|
398
|
+
window: { kind: "rolling", durationSeconds: window.seconds },
|
|
399
|
+
resetAt: window.resetAt,
|
|
400
|
+
source: "authenticated_page",
|
|
401
|
+
precision: "estimated",
|
|
402
|
+
observedAt: now,
|
|
403
|
+
expiresAt,
|
|
404
|
+
labels: opencodeLabels
|
|
405
|
+
}));
|
|
406
|
+
}
|
|
407
|
+
/** The local application that owns this browser session. */
|
|
408
|
+
export const OPENCODE_TOOL = "OpenCode";
|
|
409
|
+
/**
|
|
410
|
+
* The connection this reader reports, which is not the generic one.
|
|
411
|
+
*
|
|
412
|
+
* A page it cannot read has two very different causes, and they need two
|
|
413
|
+
* different sentences. A logged out workspace renders a sign in form, and the
|
|
414
|
+
* fix is one click in a window the person already has open. Anything else is a
|
|
415
|
+
* layout this build no longer understands, which is ours to fix, and the honest
|
|
416
|
+
* instruction is to reconnect and tell us if it keeps happening. Neither one
|
|
417
|
+
* throws, and neither one is silence.
|
|
418
|
+
*/
|
|
419
|
+
export function opencodeConnection(parsed, payload) {
|
|
420
|
+
/*
|
|
421
|
+
* The signed out marker is read BEFORE the parse result, and the order is the
|
|
422
|
+
* whole point. A page asking somebody to sign in is a page whose numbers are
|
|
423
|
+
* leftovers, and this reader can still find a percentage in leftovers, so
|
|
424
|
+
* asking "did it parse" first reports a live looking meter behind an account
|
|
425
|
+
* nobody is signed into. That is the exact claim this product exists to stop.
|
|
426
|
+
*/
|
|
427
|
+
if (typeof payload === "string" && SIGNED_OUT.test(payload)) {
|
|
428
|
+
return connectionStatus("AUTH_EXPIRED", "token_expired", OPENCODE_TOOL);
|
|
429
|
+
}
|
|
430
|
+
if (parsed)
|
|
431
|
+
return connectionStatus("CONNECTED", null, OPENCODE_TOOL);
|
|
432
|
+
/* Nothing arrived at all, which is a session that has not been opened yet
|
|
433
|
+
rather than a fault. Anything that DID arrive and could not be read is a
|
|
434
|
+
fault, whatever type it turned out to be. */
|
|
435
|
+
if (payload === undefined || payload === null) {
|
|
436
|
+
return connectionStatus("DETECTED", "tool_not_running", OPENCODE_TOOL);
|
|
292
437
|
}
|
|
293
|
-
return
|
|
294
|
-
provider: "OPENCODE",
|
|
295
|
-
meter: "PRIMARY",
|
|
296
|
-
value: binding.percent,
|
|
297
|
-
window: { kind: "rolling", durationSeconds: binding.seconds },
|
|
298
|
-
resetAt: binding.resetAt,
|
|
299
|
-
source: "authenticated_page",
|
|
300
|
-
precision: "estimated",
|
|
301
|
-
observedAt: now,
|
|
302
|
-
expiresAt,
|
|
303
|
-
labels: opencodeLabels
|
|
304
|
-
})];
|
|
438
|
+
return connectionStatus("ERROR", "shape_mismatch", OPENCODE_TOOL);
|
|
305
439
|
}
|
|
306
440
|
export const opencodeConnector = {
|
|
307
441
|
id: "opencode",
|
|
308
442
|
displayName: "OpenCode",
|
|
309
443
|
encoding: "text",
|
|
444
|
+
maturity: opencodeMaturity,
|
|
310
445
|
labels: opencodeLabels,
|
|
311
446
|
detect(environment) {
|
|
312
447
|
return environment["OPENCODE_SESSION_PRESENT"] === "1";
|
|
313
448
|
},
|
|
314
449
|
async read(context) {
|
|
315
450
|
const meters = parseOpencodePayload(context.payload, context.now);
|
|
451
|
+
const connection = opencodeConnection(meters !== null, context.payload);
|
|
316
452
|
return meters === null
|
|
317
|
-
? { ok: false, reason: "unknown" }
|
|
318
|
-
: { ok: true, meters };
|
|
453
|
+
? { ok: false, reason: "unknown", connection }
|
|
454
|
+
: { ok: true, meters, connection };
|
|
319
455
|
}
|
|
320
456
|
};
|
|
321
457
|
//# sourceMappingURL=opencode.js.map
|
package/dist/opencode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../src/opencode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../src/opencode.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAUrD,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,gBAAgB,EAAE,iBAAiB;IACnC,mBAAmB,EAAE,sBAAsB;IAC3C,cAAc,EAAE,MAAM;IACtB,YAAY,EAAE,YAAY;CACQ,CAAC;AAErC,MAAM,CAAC,MAAM,eAAe,GAAG,2CAAoD,CAAC;AAEpF;;;;;;;;;GASG;AACH,MAAM,CAAC,M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,KAAK,IAAI;YACpB,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE;YAC9C,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IACvC,CAAC;CACF,CAAC"}
|
package/dist/openrouter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConnectorContract, RawMeter } from "@openlimiter/core";
|
|
1
|
+
import type { ConnectionTool, ConnectorContract, RawMeter } from "@openlimiter/core";
|
|
2
2
|
export declare const openrouterLabels: {
|
|
3
3
|
readonly credentialOrigin: "user-key";
|
|
4
4
|
readonly dataInterfaceStatus: "documented-api";
|
|
@@ -13,5 +13,7 @@ export declare const openrouterCredential: {
|
|
|
13
13
|
readonly readMode: "read_only";
|
|
14
14
|
};
|
|
15
15
|
export declare function parseOpenrouterPayload(payload: unknown, now: string): RawMeter[] | null;
|
|
16
|
+
/** No local application owns this key, so no instruction names one. */
|
|
17
|
+
export declare const OPENROUTER_TOOL: ConnectionTool;
|
|
16
18
|
export declare const openrouterConnector: ConnectorContract;
|
|
17
19
|
//# sourceMappingURL=openrouter.d.ts.map
|
package/dist/openrouter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter.d.ts","sourceRoot":"","sources":["../src/openrouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAGjB,QAAQ,EACT,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"openrouter.d.ts","sourceRoot":"","sources":["../src/openrouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAGjB,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAS3B,eAAO,MAAM,gBAAgB;;;;;CAKO,CAAC;AAErC,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAEX,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,EAAE,GAAG,IAAI,CAmCvF;AAED,uEAAuE;AACvE,eAAO,MAAM,eAAe,EAAE,cAAqB,CAAC;AAEpD,eAAO,MAAM,mBAAmB,EAAE,iBAmBjC,CAAC"}
|
package/dist/openrouter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { boundedNumber, rawMeter, record, shortExpiry } from "./shared.js";
|
|
1
|
+
import { boundedNumber, connectorConnection, rawMeter, record, shortExpiry } from "./shared.js";
|
|
2
2
|
export const openrouterLabels = {
|
|
3
3
|
credentialOrigin: "user-key",
|
|
4
4
|
dataInterfaceStatus: "documented-api",
|
|
@@ -48,6 +48,8 @@ export function parseOpenrouterPayload(payload, now) {
|
|
|
48
48
|
amounts: { usedAmount: usage, limitAmount: credits, currency: "USD" }
|
|
49
49
|
})];
|
|
50
50
|
}
|
|
51
|
+
/** No local application owns this key, so no instruction names one. */
|
|
52
|
+
export const OPENROUTER_TOOL = null;
|
|
51
53
|
export const openrouterConnector = {
|
|
52
54
|
id: "openrouter",
|
|
53
55
|
encoding: "json",
|
|
@@ -58,9 +60,10 @@ export const openrouterConnector = {
|
|
|
58
60
|
},
|
|
59
61
|
async read(context) {
|
|
60
62
|
const meters = parseOpenrouterPayload(context.payload, context.now);
|
|
63
|
+
const connection = connectorConnection(meters !== null, context.payload, OPENROUTER_TOOL);
|
|
61
64
|
return meters === null
|
|
62
|
-
? { ok: false, reason: "unknown" }
|
|
63
|
-
: { ok: true, meters };
|
|
65
|
+
? { ok: false, reason: "unknown", connection }
|
|
66
|
+
: { ok: true, meters, connection };
|
|
64
67
|
}
|
|
65
68
|
};
|
|
66
69
|
//# sourceMappingURL=openrouter.js.map
|
package/dist/openrouter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter.js","sourceRoot":"","sources":["../src/openrouter.ts"],"names":[],"mappings":"
|
|
1
|
+
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
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import type { ConnectorLabels, ProviderCode, RawMeter, SnapshotAmounts, SnapshotPrecision, SnapshotSource, SnapshotWindow } from "@openlimiter/core";
|
|
1
|
+
import type { ConnectionStatus, ConnectionTool, ConnectorLabels, ProviderCode, RawMeter, SnapshotAmounts, SnapshotPrecision, SnapshotSource, SnapshotWindow } from "@openlimiter/core";
|
|
2
|
+
/**
|
|
3
|
+
* The connection lifecycle a reader reports beside its meters.
|
|
4
|
+
*
|
|
5
|
+
* Three outcomes, and the difference between the last two is the whole reason
|
|
6
|
+
* this exists. Nothing arrived at all is a tool that has not run yet, which is
|
|
7
|
+
* a person's next step and not a fault. Something arrived and this build could
|
|
8
|
+
* not read it is a FAULT, and it is ours rather than the provider's, which is
|
|
9
|
+
* exactly the failure the Claude statusline contract mismatch was: a healthy
|
|
10
|
+
* account, a well formed payload, and a parser that answered null in silence.
|
|
11
|
+
*
|
|
12
|
+
* `tool` names the local application that owns the credential, so an
|
|
13
|
+
* instruction can say which window to open. It is never a value a payload
|
|
14
|
+
* supplied, and no instruction it produces is something this app does by
|
|
15
|
+
* itself: OpenLimiter reads tokens and refreshes none of them.
|
|
16
|
+
*/
|
|
17
|
+
export declare function connectorConnection(parsed: boolean, payload: unknown, tool: ConnectionTool): ConnectionStatus;
|
|
2
18
|
export declare function record(value: unknown): Record<string, unknown> | null;
|
|
3
19
|
export declare function boundedNumber(value: unknown, maximum?: number): number | null;
|
|
4
20
|
export declare function futureInstant(value: unknown, now: string): string | null;
|
package/dist/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,eAAe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AAUD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAapE;AAED,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKxE;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,eAAe,CAAC;IACxB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B,GAAG,QAAQ,CAGX"}
|
package/dist/shared.js
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
import { connectionStatus } from "@openlimiter/core";
|
|
2
|
+
/**
|
|
3
|
+
* The connection lifecycle a reader reports beside its meters.
|
|
4
|
+
*
|
|
5
|
+
* Three outcomes, and the difference between the last two is the whole reason
|
|
6
|
+
* this exists. Nothing arrived at all is a tool that has not run yet, which is
|
|
7
|
+
* a person's next step and not a fault. Something arrived and this build could
|
|
8
|
+
* not read it is a FAULT, and it is ours rather than the provider's, which is
|
|
9
|
+
* exactly the failure the Claude statusline contract mismatch was: a healthy
|
|
10
|
+
* account, a well formed payload, and a parser that answered null in silence.
|
|
11
|
+
*
|
|
12
|
+
* `tool` names the local application that owns the credential, so an
|
|
13
|
+
* instruction can say which window to open. It is never a value a payload
|
|
14
|
+
* supplied, and no instruction it produces is something this app does by
|
|
15
|
+
* itself: OpenLimiter reads tokens and refreshes none of them.
|
|
16
|
+
*/
|
|
17
|
+
export function connectorConnection(parsed, payload, tool) {
|
|
18
|
+
if (parsed)
|
|
19
|
+
return connectionStatus("CONNECTED", null, tool);
|
|
20
|
+
if (payload === undefined || payload === null) {
|
|
21
|
+
return connectionStatus("DETECTED", "tool_not_running", tool);
|
|
22
|
+
}
|
|
23
|
+
return connectionStatus("ERROR", "shape_mismatch", tool);
|
|
24
|
+
}
|
|
1
25
|
export function record(value) {
|
|
2
26
|
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
3
27
|
? value
|
package/dist/shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAarD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAe,EACf,OAAgB,EAChB,IAAoB;IAEpB,IAAI,MAAM;QAAE,OAAO,gBAAgB,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7D,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,CAAC,CAAC,KAAgC;QAClC,CAAC,CAA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AAG,KAAK,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAmBxB;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;AACjF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openlimiter/connectors",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Provider connectors that collect quota and usage data for OpenLimiter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"NOTICE"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@openlimiter/core": "
|
|
22
|
+
"@openlimiter/core": "1.2.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"node": ">=24"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
|
-
"access": "public"
|
|
48
|
+
"access": "public",
|
|
49
|
+
"provenance": true
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
51
52
|
"build": "tsc -p tsconfig.json",
|