axstack 0.59.0 → 0.59.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axstack",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.1",
|
|
4
4
|
"description": "Axstack installer and setup CLI: installs owned chat skills and role data, configures supported harness settings, and checks T3 Code capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -47,8 +47,27 @@ A successful Codex response containing only a seven-day primary window (secondar
|
|
|
47
47
|
absent/null) is authoritative single-window telemetry: the adapter explicitly marks
|
|
48
48
|
session n/a. It does not synthesize session capacity. A plain incomplete snapshot
|
|
49
49
|
without this provenance still holds; weekly is always required. An account needs
|
|
50
|
-
remaining quota in every applicable window.
|
|
51
|
-
|
|
50
|
+
remaining quota in every applicable window.
|
|
51
|
+
|
|
52
|
+
Claude session n/a requires an explicit `five_hour: null`, valid `seven_day` usage
|
|
53
|
+
and future weekly reset, and exactly one active, unscoped `weekly_all` row in
|
|
54
|
+
`limits` with matching percentage and identical reset string. Every limits row
|
|
55
|
+
must be validated weekly metadata: only `weekly_all` and model-scoped
|
|
56
|
+
`weekly_scoped` rows with valid percentages, future weekly resets and boolean
|
|
57
|
+
`is_active` are supported. Scoped rows require a named model and null surface.
|
|
58
|
+
Any session row contradicts n/a, even when `is_active: false`; that flag never
|
|
59
|
+
hides a present session or scoped weekly usage. Unknown/malformed limits,
|
|
60
|
+
non-null legacy `seven_day_opus`/`seven_day_sonnet`, error fields, missing fields
|
|
61
|
+
or null without corroboration hold. No plan name, bootstrap outcome, zero usage
|
|
62
|
+
or fabricated reset establishes n/a. All accounts remain counted; supported scoped
|
|
63
|
+
rows remain in telemetry with existing Opus eligibility checks. Source/account
|
|
64
|
+
freshness and catalog guards still apply.
|
|
65
|
+
This narrowly supported response shape does not establish universal null semantics
|
|
66
|
+
or an account's plan/verification status. Model scope names retain their existing
|
|
67
|
+
meaning; no Fable-to-Opus mapping is inferred.
|
|
68
|
+
|
|
69
|
+
For ordinary Claude session/weekly/scoped Opus and Codex windows, null or absent
|
|
70
|
+
reset timing is valid. The adapter omits the missing
|
|
52
71
|
reset; it never invents a timestamp. Unknown reset timing alone does **not** mean
|
|
53
72
|
unused or not started: the reported used percentage still governs remaining quota,
|
|
54
73
|
same-account eligibility and the primary-pool reserve, including exhaustion at 100% used.
|
|
@@ -24,8 +24,8 @@ function pool(accounts, driver, now) {
|
|
|
24
24
|
if (u?.unavailable || !fresh(u?.checkedAt, now, 300000) || !Array.isArray(u?.windows)) throw Error(`unknown ${driver} telemetry`);
|
|
25
25
|
const windows = ['session', 'weekly'].map((kind) => {
|
|
26
26
|
const found = u.windows.filter((w) => w.kind === kind && !(driver === 'claudeAgent' && w.id?.startsWith('seven_day_')));
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const weeklyOnly = driver === 'codex' ? 'verified Codex weekly-only response' : 'verified Claude weekly-only response';
|
|
28
|
+
if (!found.length && kind === 'session' && u.notApplicable?.session === weeklyOnly) return null;
|
|
29
29
|
if (found.length !== 1) throw Error(`missing or ambiguous ${driver} ${kind} window`);
|
|
30
30
|
const w = found[0];
|
|
31
31
|
if (!Number.isFinite(w.usedPercent) || w.usedPercent < 0 || w.usedPercent > 100
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import { managementKey } from './hub-secret.js';
|
|
2
|
+
|
|
3
|
+
// Null alone is ambiguous. Accept only corroborated weekly metadata, never plan names.
|
|
4
|
+
function claudeWeeklyOnly(usage, now) {
|
|
5
|
+
const weekly = usage.seven_day;
|
|
6
|
+
const percent = (value) => Number.isFinite(value) && value >= 0 && value <= 100;
|
|
7
|
+
const reset = (value) => typeof value === 'string' && Number.isFinite(Date.parse(value))
|
|
8
|
+
&& Date.parse(value) > now && Date.parse(value) - now <= 604800000;
|
|
9
|
+
if (usage.five_hour !== null || Object.hasOwn(usage, 'error') || Object.hasOwn(usage, 'errors')
|
|
10
|
+
|| !percent(weekly?.utilization) || !reset(weekly?.resets_at) || !Array.isArray(usage.limits)
|
|
11
|
+
|| usage.seven_day_opus != null || usage.seven_day_sonnet != null) return false;
|
|
12
|
+
const aggregate = usage.limits.filter((w) => w?.kind === 'weekly_all');
|
|
13
|
+
return aggregate.length === 1 && usage.limits.every((w) => {
|
|
14
|
+
if (!w || w.group !== 'weekly' || typeof w.is_active !== 'boolean' || !percent(w.percent)
|
|
15
|
+
|| !reset(w.resets_at)) return false;
|
|
16
|
+
if (w.kind === 'weekly_all') return w.is_active === true && w.scope === null
|
|
17
|
+
&& w.percent === weekly.utilization && w.resets_at === weekly.resets_at;
|
|
18
|
+
// A session row contradicts absence even when inactive. Unknown limits also hold.
|
|
19
|
+
return w.kind === 'weekly_scoped' && typeof w.scope?.model?.display_name === 'string'
|
|
20
|
+
&& w.scope.model.display_name.trim().length > 0 && w.scope.surface === null;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
2
24
|
// Read-only subset of T3 0.1.3 makeCliproxyApi. Never fetch token files or reset credits.
|
|
3
25
|
async function management(config, path, body) {
|
|
4
26
|
const base = new URL(config.url.endsWith('/') ? config.url : `${config.url}/`);
|
|
@@ -54,10 +76,15 @@ async function accountUsage(config, account, now) {
|
|
|
54
76
|
label: `Weekly · ${w.scope?.model?.display_name ?? ''}`, usedPercent: w.percent, ...(w.resets_at == null ? {} : { resetsAt: w.resets_at }), windowDurationMins: 10080 });
|
|
55
77
|
}
|
|
56
78
|
}
|
|
57
|
-
|
|
58
|
-
|
|
79
|
+
let weeklyOnly;
|
|
80
|
+
if (driver === 'codex' && usage.rate_limit?.primary_window?.limit_window_seconds === 604800
|
|
81
|
+
&& usage.rate_limit.secondary_window == null && windows.length === 1 && windows[0].kind === 'weekly') {
|
|
82
|
+
weeklyOnly = 'verified Codex weekly-only response';
|
|
83
|
+
} else if (driver === 'claudeAgent' && claudeWeeklyOnly(usage, now)) {
|
|
84
|
+
weeklyOnly = 'verified Claude weekly-only response';
|
|
85
|
+
}
|
|
59
86
|
return { ...base, usageLimits: { checkedAt, windows,
|
|
60
|
-
...(weeklyOnly ? { notApplicable: { session:
|
|
87
|
+
...(weeklyOnly ? { notApplicable: { session: weeklyOnly } } : {}) } };
|
|
61
88
|
} catch {
|
|
62
89
|
return { ...base, usageLimits: { checkedAt, windows: [], unavailable: { reason: 'probeFailed' } } };
|
|
63
90
|
}
|