instar 1.3.1245 → 1.3.1247
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/dashboard/index.html +1 -0
- package/dashboard/subscriptions.js +27 -0
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +4 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +16 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/QuotaPoller.d.ts +12 -0
- package/dist/core/QuotaPoller.d.ts.map +1 -1
- package/dist/core/QuotaPoller.js +25 -2
- package/dist/core/QuotaPoller.js.map +1 -1
- package/dist/core/SubscriptionAccountMetaReplicatedStore.d.ts.map +1 -1
- package/dist/core/SubscriptionAccountMetaReplicatedStore.js +9 -1
- package/dist/core/SubscriptionAccountMetaReplicatedStore.js.map +1 -1
- package/dist/core/SubscriptionPool.d.ts +8 -0
- package/dist/core/SubscriptionPool.d.ts.map +1 -1
- package/dist/core/SubscriptionPool.js.map +1 -1
- package/dist/core/subscriptionEnums.d.ts +1 -1
- package/dist/core/subscriptionEnums.d.ts.map +1 -1
- package/dist/core/subscriptionEnums.js +5 -0
- package/dist/core/subscriptionEnums.js.map +1 -1
- package/dist/core/types.d.ts +5 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/providers/adapters/openai-codex/observability/codexLiveRateLimitReader.d.ts +74 -0
- package/dist/providers/adapters/openai-codex/observability/codexLiveRateLimitReader.d.ts.map +1 -0
- package/dist/providers/adapters/openai-codex/observability/codexLiveRateLimitReader.js +207 -0
- package/dist/providers/adapters/openai-codex/observability/codexLiveRateLimitReader.js.map +1 -0
- package/dist/providers/adapters/openai-codex/observability/codexRateLimitReader.d.ts +23 -2
- package/dist/providers/adapters/openai-codex/observability/codexRateLimitReader.d.ts.map +1 -1
- package/dist/providers/adapters/openai-codex/observability/codexRateLimitReader.js +55 -12
- package/dist/providers/adapters/openai-codex/observability/codexRateLimitReader.js.map +1 -1
- package/dist/scaffold/templates.js +1 -1
- package/dist/server/AgentServer.d.ts +6 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +7 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/routes.d.ts +8 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +19 -4
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/src/scaffold/templates.ts +1 -1
- package/upgrades/1.3.1247.md +84 -0
- package/upgrades/side-effects/codex-live-quota-read.md +141 -0
- package/upgrades/side-effects/codex-quota-entitlement-record.md +149 -0
- package/upgrades/1.3.1245.md +0 -29
package/dashboard/index.html
CHANGED
|
@@ -3729,6 +3729,7 @@
|
|
|
3729
3729
|
.sub-account-meta { font-size:12px; opacity:.6; margin:2px 0 2px; }
|
|
3730
3730
|
.sub-account-email { font-size:12px; opacity:.5; margin:0 0 10px; }
|
|
3731
3731
|
.sub-account-noquota { font-size:12px; opacity:.6; }
|
|
3732
|
+
.sub-account-quota-age { font-size:11px; opacity:.5; margin-top:4px; }
|
|
3732
3733
|
.sub-profile-provision { border:1px solid var(--border,#2a2a2a); border-left:4px solid #16a34a;
|
|
3733
3734
|
border-radius:10px; padding:14px 16px; display:flex; flex-direction:column; gap:10px; }
|
|
3734
3735
|
.sub-profile-title { font-size:16px; font-weight:650; }
|
|
@@ -194,6 +194,23 @@ export function relativeAge(iso, now = Date.now()) {
|
|
|
194
194
|
return `${Math.floor(hr / 24)}d ago`;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Age text for a quota reading that is old enough to mislead, else ''.
|
|
199
|
+
*
|
|
200
|
+
* Codex quota is read from the account's own session log, so it only advances
|
|
201
|
+
* when something actually runs on that account. An idle account keeps serving
|
|
202
|
+
* its last number indefinitely. Below the threshold the age is noise; above it,
|
|
203
|
+
* showing the bar without the age asserts a freshness we do not have.
|
|
204
|
+
*/
|
|
205
|
+
export const STALE_READING_MS = 6 * 60 * 60 * 1000;
|
|
206
|
+
|
|
207
|
+
export function staleReadingAge(iso, now = Date.now()) {
|
|
208
|
+
const t = typeof iso === 'string' ? Date.parse(iso) : NaN;
|
|
209
|
+
if (Number.isNaN(t)) return '';
|
|
210
|
+
if (now - t < STALE_READING_MS) return '';
|
|
211
|
+
return relativeAge(iso, now);
|
|
212
|
+
}
|
|
213
|
+
|
|
197
214
|
// ── DOM helpers (textContent ONLY — never innerHTML) ────────────────────────
|
|
198
215
|
function el(doc, tag, cls, text) {
|
|
199
216
|
const node = doc.createElement(tag);
|
|
@@ -325,6 +342,16 @@ export function renderAccounts(doc, target, accounts, now = Date.now(), inUseAcc
|
|
|
325
342
|
if (q.fiveHour) card.appendChild(quotaBar(doc, '5-hour', q.fiveHour.utilizationPct, q.fiveHour.resetsAt, now));
|
|
326
343
|
if (q.sevenDay) card.appendChild(quotaBar(doc, 'Weekly', q.sevenDay.utilizationPct, q.sevenDay.resetsAt, now));
|
|
327
344
|
if (q.fable) card.appendChild(quotaBar(doc, 'Fable 5', q.fable.utilizationPct, q.fable.resetsAt, now));
|
|
345
|
+
// A codex reading is only as fresh as the account's last completed turn —
|
|
346
|
+
// an idle account can sit on a days-old number. Name the age once it is
|
|
347
|
+
// old enough to mislead, so a stale bar never reads as "right now".
|
|
348
|
+
const age = staleReadingAge(q.measuredAt, now);
|
|
349
|
+
if (age) card.appendChild(el(doc, 'div', 'sub-account-quota-age', `Reading from ${age}`));
|
|
350
|
+
} else if (q && q.noQuotaWindow) {
|
|
351
|
+
// The account answered and reported no usage window at all (an
|
|
352
|
+
// entitlement/credits-only codex account). "yet" would promise a reading
|
|
353
|
+
// that no future poll can produce — name the condition instead.
|
|
354
|
+
card.appendChild(el(doc, 'div', 'sub-account-noquota', 'This account reports no usage window.'));
|
|
328
355
|
} else {
|
|
329
356
|
// Round-11 (security, grok-build spec §6.1): "yet" reads as PENDING, but
|
|
330
357
|
// for a framework with no usage surface at all (grok-build) unknown is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAsGA,OAAO,EAAE,cAAc,EAAwD,MAAM,2BAA2B,CAAC;AAUjH,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AA4BjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAmI7D,OAAO,KAAK,EAAW,oBAAoB,EAAe,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAiFtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AA0ID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAoDD,+EAA+E;AAC/E,wBAAgB,qCAAqC,CACnD,SAAS,EAAE,IAAI,CAAC,OAAO,2BAA2B,EAAE,cAAc,EAAE,QAAQ,CAAC,GAAG,IAAI,EACpF,OAAO,EAAE,MAAM,GACd,IAAI,CAEN;AAsrDD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,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;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -13420,8 +13420,12 @@ export async function startServer(options) {
|
|
|
13420
13420
|
// pool is non-empty (started below); on-demand polling is always available
|
|
13421
13421
|
// via POST /subscription-pool/poll.
|
|
13422
13422
|
const { QuotaPoller } = await import('../core/QuotaPoller.js');
|
|
13423
|
+
const { buildCodexLiveUsageReader } = await import('../providers/adapters/openai-codex/observability/codexLiveRateLimitReader.js');
|
|
13423
13424
|
const quotaPoller = new QuotaPoller({
|
|
13424
13425
|
pool: subscriptionPool,
|
|
13426
|
+
// Zero-spend live codex quota (app-server account/rateLimits/read). ON by
|
|
13427
|
+
// default; `subscriptionPool.codexLiveQuota: false` forces rollout-only.
|
|
13428
|
+
codexLiveUsageReader: buildCodexLiveUsageReader(config.subscriptionPool),
|
|
13425
13429
|
loginObservationSink: subscriptionLoginLedger
|
|
13426
13430
|
? (input) => subscriptionLoginLedger.recordObservation(input)
|
|
13427
13431
|
: undefined,
|