johns-harness 2026.10.27 → 2026.11.5
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/CHANGELOG.md +32 -0
- package/dist/auth-profiles-5CHn7vq1.js +1 -1
- package/dist/compact-B247y5Qt.js +17 -5
- package/dist/config-koj5M_EO.js +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/image-generate.js +5 -5
- package/dist/model-selection-BGlGpPgM.js +1 -1
- package/dist/model-selection-BU6wl1le.js +1 -1
- package/dist/model-selection-L7RMwsG-.js +1 -1
- package/dist/pi-embedded-C6ITuRXf.js +17 -5
- package/dist/pi-embedded-DoQsYfIY.js +17 -5
- package/dist/plugin-sdk/config-4Fgm-yEH.js +1 -1
- package/dist/plugin-sdk/config-Di-lyCdh.js +1 -1
- package/dist/plugin-sdk/discord.js +1 -1
- package/dist/plugin-sdk/dispatch-BP0viZiL.js +17 -5
- package/dist/plugin-sdk/dispatch-CQsjmw7g.js +17 -5
- package/dist/plugin-sdk/dispatch-Cerq29sy.js +17 -5
- package/dist/plugin-sdk/dispatch-Cndjtt0g.js +17 -5
- package/dist/plugin-sdk/dispatch-UogiJYul.js +17 -5
- package/dist/plugin-sdk/model-auth-CX9cPHdC.js +1 -1
- package/dist/plugin-sdk/model-auth-Ciehz0x5.js +1 -1
- package/dist/plugin-sdk/model-auth-DVyo6JSX.js +1 -1
- package/dist/plugin-sdk/model-auth-kiHYHGrs.js +1 -1
- package/dist/plugin-sdk/model-selection-Dbj4jDYM.js +1 -1
- package/dist/plugin-sdk/reply-DbZnH8-h.js +17 -5
- package/dist/reply-C5LKjXcC.js +17 -5
- package/dist/subscription-usage.js +150 -0
- package/docs/MODELS.md +53 -0
- package/docs/PATCHES.md +24 -1
- package/docs/cli/status.md +9 -0
- package/docs/concepts/usage-tracking.md +33 -1
- package/models/models.json +11 -5
- package/node_modules/@mariozechner/pi-ai/dist/models.generated.js +4 -0
- package/package.json +1 -1
- package/vendor/patched-deps/@mariozechner/pi-ai/dist/models.generated.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.11.5
|
|
4
|
+
|
|
5
|
+
### GPT Image 2.6 Sunburst and Flare
|
|
6
|
+
- Add `gpt-image-2.6-sunburst` and `gpt-image-2.6-flare` on both OpenAI API and Codex subscription. Text/image input, image-only output; dedicated Images generations/edits, never chat. No published context or output-token ceilings: master `null` (N/A), omitted in generated catalogs, never borrowed from a chat model.
|
|
7
|
+
- Official API USD/MTok: text input **$5**, cached text **$1.25**, image input **$8**, cached image **$2**, image output **$30**. Flat catalog input/cache rates describe text, output describes images; image-input rates are in source notes. Subscription cards retain zero marginal API-token costs. No other model card or price changed.
|
|
8
|
+
- `image` / `image-sunburst` now use **subscription 2.6 Sunburst**, with subscription **2.5 Sunburst then GPT Image 2** fallbacks. `image-flare` uses subscription 2.6 Flare. **No paid OpenAI fallback.** Versioned `image-sunburst25` / `image-flare25` preserve 2.5; all original provider IDs and `image2` remain available. Explicit selections never silently change model/provider. Chat defaults, all unrelated aliases, Sonnet 1M and existing Opus caps are unchanged.
|
|
9
|
+
|
|
10
|
+
### Supported surface and evidence
|
|
11
|
+
- Minimal PNG generation and multipart image/mask editing through the existing generic transport. Rendering quality `low/medium/high/xhigh/max/auto`; the guide's cost section explicitly names 2.6 for these options. Planning `complexity` is separate (`low/medium/high`, provider default `high`); harness omits that option. SVG/GIF, markup and explicit complexity are not exposed as harness features.
|
|
12
|
+
- Conservative 2.6 sizes: `1024x1024`, `1536x1024`, `1024x1536`, `auto`. Current official custom-size docs still enumerate 2/2.5, not 2.6: no invented native size bounds. Use the preserved 2.5 aliases for documented custom sizes. Up to 4 inputs/outputs, local input cap 20 MiB, prompt cap 32,000 characters (API supports larger image batch counts).
|
|
13
|
+
- Both exact new IDs returned **HTTP200 PNGs through the repo subscription transport**, one real generation each, requesting `1024x1024` / `low`. Both actually returned **1536x1024** PNGs: provider size deviation, not exact-size compliance. The harness sends the requested size unchanged and does not resize output. Exact subscription host/path guard, redirects disabled, no fallback, memory-only credentials. No paid API inference, auth writes/refresh, global install or gateway restart. API/edit/extended-quality validation is offline, not a live API/edit claim.
|
|
14
|
+
- One-master sync and model checker pass; 21 new offline regressions cover both providers, prices/N/A limits, all 2.6 qualities, conservative sizes, generation/edit wire shapes, mask bytes, aliases, subscription-only fallback and unchanged Claude caps. Release verifier expectations for moved aliases/defaults now derive from the master, not versioned IDs. Verifier **578/578**; full suite **1,313 passed, 0 failed/cancelled, 5 existing skips** (1,318 tests). An initially interrupted run is not counted as release evidence. Full gate results are recorded in the release learning.
|
|
15
|
+
|
|
16
|
+
Official sources checked **2026-11-05** (release announced Nov 4):
|
|
17
|
+
- https://developers.openai.com/api/docs/models/gpt-image-2.6-sunburst
|
|
18
|
+
- https://developers.openai.com/api/docs/models/gpt-image-2.6-flare
|
|
19
|
+
- https://developers.openai.com/api/docs/pricing#image-generation
|
|
20
|
+
- https://developers.openai.com/api/docs/guides/image-generation#gpt-image-26
|
|
21
|
+
- https://developers.openai.com/api/reference/resources/images/methods/generate
|
|
22
|
+
- https://developers.openai.com/api/reference/resources/images/methods/edit
|
|
23
|
+
- https://developers.openai.com/api/docs/changelog
|
|
24
|
+
|
|
25
|
+
Rollback: `npm i -g johns-harness@2026.11.2` (previous npm latest; not executed). No global update/restart is performed by this release. Run `/update` when ready.
|
|
26
|
+
|
|
27
|
+
## 2026.11.2
|
|
28
|
+
|
|
29
|
+
- **Subscription reset times in `/status` and `session_status` (Family 93):** Claude and Codex OAuth profiles now show percent used, absolute reset time with timezone, and a relative countdown. The active provider is first; the other configured subscription stays visible too. Profile selection respects the last-served account, explicit overrides and normal auth order. Paid API fallback diagnostics are unchanged, with no subscription quota attributed to an API-key profile.
|
|
30
|
+
- **Real provider windows, not assumptions:** Anthropic `five_hour`/`seven_day` resets use the endpoint's ISO timestamps. Codex derives the window label from its reported duration, including weekly-primary-only accounts; absent 5h/secondary windows and null resets are not invented. Plan names are not guessed.
|
|
31
|
+
- **Cheap and bounded:** read-only quota endpoints, two-minute account/profile/credential-scoped cache, shared in-flight requests, bounded timeout (including response body), cached redacted errors and `Retry-After`. No model calls, extra usage or paid inference probes.
|
|
32
|
+
- **Verification:** real authenticated usage GETs from native `~/.johnness` returned 200 for both providers; endpoint shapes, timezone/DST, caching, errors, exact patch replay and all twenty status entrypoints are regression-tested. Legacy `~/.openclaw` state is not the active login store.
|
|
33
|
+
- **Upgrade:** run `/update`. Rollback: `npm i -g johns-harness@2026.10.27`. No live gateway restart or global install is part of publication.
|
|
34
|
+
|
|
3
35
|
## 2026.10.27
|
|
4
36
|
|
|
5
37
|
- **GPT-6.1 Terra** (`gpt-6.1-terra`) is available on native OpenAI Responses and the Codex subscription. Native: 1,050,000 context, 922,000 maximum input, 128,000 output; text/image in, text out, June 1, 2026 cutoff. Codex: 500,000 context from the exact official slug (optional max 872,000 is not the default), 128,000 output, zero subscription costs.
|
|
@@ -5161,7 +5161,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
5161
5161
|
grok46: "xai/grok-4.6"
|
|
5162
5162
|
});
|
|
5163
5163
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
5164
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
5164
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
5165
5165
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5166
5166
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5167
5167
|
const DEFAULT_MODEL_COST = {
|
package/dist/compact-B247y5Qt.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// JOHNNESS_PATCH_SUBSCRIPTION_USAGE_93 dist/compact-B247y5Qt.js
|
|
2
|
+
import { loadSubscriptionStatus } from "./subscription-usage.js";
|
|
1
3
|
import { createSubscriptionAuthTracker, formatAuthProfileFallback } from "./anthropic-auth-runtime.js"; // JOHNNESS_PATCH_SUBSCRIPTION_RUNTIME_92
|
|
2
4
|
import { normalizeBillingUsage, readLatestBillingUsage, formatBillingCost } from "./usage-billing.js"; // JOHNNESS_PATCH_USAGE_BILLING_91 dist/compact-B247y5Qt.js
|
|
3
5
|
import { importOptional66 } from "./optional-module.js";
|
|
@@ -36814,13 +36816,18 @@ async function buildStatusReply(params) {
|
|
|
36814
36816
|
const statusAgentDir = resolveAgentDir(cfg, statusAgentId);
|
|
36815
36817
|
const currentUsageProvider = (() => {
|
|
36816
36818
|
try {
|
|
36817
|
-
return resolveUsageProviderId(provider);
|
|
36819
|
+
return resolveUsageProviderId(sessionEntry?.modelProvider || provider);
|
|
36818
36820
|
} catch {
|
|
36819
36821
|
return;
|
|
36820
36822
|
}
|
|
36821
36823
|
})();
|
|
36822
36824
|
let usageLine = null;
|
|
36823
|
-
if (currentUsageProvider)
|
|
36825
|
+
if (currentUsageProvider === "anthropic" || currentUsageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
36826
|
+
provider: currentUsageProvider, cfg, sessionEntry, agentDir: statusAgentDir,
|
|
36827
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
36828
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
36829
|
+
});
|
|
36830
|
+
else if (currentUsageProvider) try {
|
|
36824
36831
|
const usageEntry = (await loadProviderUsageSummary({
|
|
36825
36832
|
timeoutMs: 3500,
|
|
36826
36833
|
providers: [currentUsageProvider],
|
|
@@ -52078,7 +52085,7 @@ function createSessionStatusTool(opts) {
|
|
|
52078
52085
|
return {
|
|
52079
52086
|
label: "Session Status",
|
|
52080
52087
|
name: "session_status",
|
|
52081
|
-
description: "Show a /status-equivalent session status card (usage + time + cost when available). Use for model-use questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
52088
|
+
description: "Show a /status-equivalent session status card (usage + subscription limit reset times + time + cost when available). Use for model-use and subscription reset questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
52082
52089
|
parameters: SessionStatusToolSchema,
|
|
52083
52090
|
execute: async (_toolCallId, args) => {
|
|
52084
52091
|
const params = args;
|
|
@@ -52163,9 +52170,14 @@ function createSessionStatusTool(opts) {
|
|
|
52163
52170
|
}
|
|
52164
52171
|
const agentDir = resolveAgentDir(cfg, agentId);
|
|
52165
52172
|
const providerForCard = resolved.entry.providerOverride?.trim() || configured.provider;
|
|
52166
|
-
const usageProvider = resolveUsageProviderId(providerForCard);
|
|
52173
|
+
const usageProvider = resolveUsageProviderId(resolved.entry.modelProvider || providerForCard);
|
|
52167
52174
|
let usageLine;
|
|
52168
|
-
if (usageProvider)
|
|
52175
|
+
if (usageProvider === "anthropic" || usageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
52176
|
+
provider: usageProvider, cfg, sessionEntry: resolved.entry, agentDir,
|
|
52177
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
52178
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
52179
|
+
});
|
|
52180
|
+
else if (usageProvider) try {
|
|
52169
52181
|
const snapshot = (await loadProviderUsageSummary({
|
|
52170
52182
|
timeoutMs: 3500,
|
|
52171
52183
|
providers: [usageProvider],
|
package/dist/config-koj5M_EO.js
CHANGED
|
@@ -1852,7 +1852,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1852
1852
|
grok46: "xai/grok-4.6"
|
|
1853
1853
|
});
|
|
1854
1854
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1855
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
1855
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
1856
1856
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1857
1857
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1858
1858
|
const DEFAULT_MODEL_COST = {
|
package/dist/daemon-cli.js
CHANGED
|
@@ -5004,7 +5004,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
5004
5004
|
grok46: "xai/grok-4.6"
|
|
5005
5005
|
});
|
|
5006
5006
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
5007
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
5007
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
5008
5008
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5009
5009
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5010
5010
|
const DEFAULT_MODEL_COST = {
|
package/dist/image-generate.js
CHANGED
|
@@ -14,8 +14,8 @@ import path from "node:path";
|
|
|
14
14
|
import { Type } from "@sinclair/typebox";
|
|
15
15
|
|
|
16
16
|
/* JOHNNESS_MODELS_MASTER:BEGIN image runtime (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
17
|
-
export const IMAGE_MODEL_RULES = Object.freeze({"google/gemini-3-pro-image":{"transport":"google","imageSizes":["1K","2K","4K"],"aspectRatios":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"maxImages":14,"mask":false},"google/gemini-3.1-flash-lite-image":{"transport":"google","imageSizes":["1K"],"aspectRatios":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"maxImages":14,"mask":false},"openai/gpt-image-2.5-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai/gpt-image-2.5-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai-codex/gpt-image-2.5-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai-codex/gpt-image-2.5-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"xai/grok-imagine-image-2.0":{"transport":"xai","qualities":["low","medium","auto"],"imageSizes":["1K","2K"],"aspectRatios":["auto","1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20","21:9","5:2"],"maxImages":5,"maxPromptLength":64000,"mask":false}});
|
|
18
|
-
export const IMAGE_GENERATION_DEFAULT = Object.freeze({"primary":"openai-codex/gpt-image-2.
|
|
17
|
+
export const IMAGE_MODEL_RULES = Object.freeze({"google/gemini-3-pro-image":{"transport":"google","imageSizes":["1K","2K","4K"],"aspectRatios":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"maxImages":14,"mask":false},"google/gemini-3.1-flash-lite-image":{"transport":"google","imageSizes":["1K"],"aspectRatios":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"maxImages":14,"mask":false},"openai/gpt-image-2.6-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":false,"maxImages":4,"maxPromptLength":32000,"mask":true},"openai/gpt-image-2.6-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":false,"maxImages":4,"maxPromptLength":32000,"mask":true},"openai/gpt-image-2.5-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai/gpt-image-2.5-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai-codex/gpt-image-2.6-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":false,"maxImages":4,"maxPromptLength":32000,"mask":true},"openai-codex/gpt-image-2.6-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":false,"maxImages":4,"maxPromptLength":32000,"mask":true},"openai-codex/gpt-image-2.5-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai-codex/gpt-image-2.5-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"xai/grok-imagine-image-2.0":{"transport":"xai","qualities":["low","medium","auto"],"imageSizes":["1K","2K"],"aspectRatios":["auto","1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20","21:9","5:2"],"maxImages":5,"maxPromptLength":64000,"mask":false}});
|
|
18
|
+
export const IMAGE_GENERATION_DEFAULT = Object.freeze({"primary":"openai-codex/gpt-image-2.6-sunburst","fallbacks":["openai-codex/gpt-image-2.5-sunburst","openai-codex/gpt-image-2"]});
|
|
19
19
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
20
20
|
export const DEFAULT_IMAGE_GENERATION_MODEL = Object.freeze({
|
|
21
21
|
primary: IMAGE_GENERATION_DEFAULT.primary,
|
|
@@ -63,7 +63,7 @@ const IMAGE_MODEL_ALIAS_TABLE = {
|
|
|
63
63
|
"gpt-image-2": "openai-codex/gpt-image-2",
|
|
64
64
|
};
|
|
65
65
|
/* JOHNNESS_MODELS_MASTER:BEGIN image aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
66
|
-
for (const [alias, ref] of Object.entries({"banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
66
|
+
for (const [alias, ref] of Object.entries({"banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2"})) IMAGE_MODEL_ALIAS_TABLE[alias] = ref;
|
|
67
67
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
68
68
|
export const IMAGE_MODEL_ALIASES = Object.freeze(IMAGE_MODEL_ALIAS_TABLE);
|
|
69
69
|
|
|
@@ -383,7 +383,7 @@ export function createImageGenerateTool(options, deps) {
|
|
|
383
383
|
return {
|
|
384
384
|
label: "Image Generate",
|
|
385
385
|
name: "image_generate",
|
|
386
|
-
description: "Generate or edit images with GPT Image 2.
|
|
386
|
+
description: "Generate or edit PNG images with GPT Image 2.6 (subscription Sunburst default, subscription 2.5 Sunburst then GPT Image 2 fallbacks), xAI Grok Imagine 2.0 (grok-image), Nano Banana 2.1 (nano-banana), Nano Banana Pro (nano-banana-pro) or Lite (nano-banana-lite). Give a prompt; add image (or images, up to 4, up to5 with xAI, or up to14 with Nano Banana) to edit, and an optional mask PNG. Writes image files under the workspace media/generated folder and returns their paths; send them with the message tool.",
|
|
387
387
|
parameters: Type.Object({
|
|
388
388
|
prompt: Type.String({ description: "What to draw or how to change the input image." }),
|
|
389
389
|
image: Type.Optional(Type.String({ description: "Input image path to edit (workspace or allowed local root)." })),
|
|
@@ -391,7 +391,7 @@ export function createImageGenerateTool(options, deps) {
|
|
|
391
391
|
mask: Type.Optional(Type.String({ description: "PNG mask path; transparent areas are edited." })),
|
|
392
392
|
size: Type.Optional(Type.String({ description: "1024x1024, 1536x1024, 1024x1536, auto, or GPT Image2.5 custom size: multiples of16, ratio<=3, edges<=3840, pixels655360..8294400." })),
|
|
393
393
|
count: Type.Optional(Type.Number({ description: "Number of images, 1..4 (default 1)." })),
|
|
394
|
-
quality: Type.Optional(Type.String({ description: "GPT Image2.5: low, medium, high, xhigh, max, auto. Older GPT Image: low/medium/high/auto. xAI: low/medium/auto." })),
|
|
394
|
+
quality: Type.Optional(Type.String({ description: "GPT Image2.6/2.5: low, medium, high, xhigh, max, auto. Rendering quality, not planning complexity. Older GPT Image: low/medium/high/auto. xAI: low/medium/auto." })),
|
|
395
395
|
output: Type.Optional(Type.String({ description: "Output path inside the workspace (default media/generated/gpt-image-<timestamp>.png)." })),
|
|
396
396
|
model: Type.Optional(Type.String({ description: "Override provider/model, for example openai/gpt-image-2, or an alias: nano-banana or banana (Nano Banana 2.1), nano-banana-pro (GA Pro), nano-banana-pro-preview, nano-banana-lite, grok-image, image/image-sunburst (subscription Sunburst), image-flare, image2 (older subscription)." })),
|
|
397
397
|
aspectRatio: Type.Optional(Type.String({ description: "Google/xAI: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, or 21:9; Nano Banana 2.1 also takes 1:4, 4:1, 1:8 and 8:1. Ignored by the GPT Image 2 providers." })),
|
|
@@ -1713,7 +1713,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1713
1713
|
grok46: "xai/grok-4.6"
|
|
1714
1714
|
});
|
|
1715
1715
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1716
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
1716
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
1717
1717
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1718
1718
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1719
1719
|
const DEFAULT_MODEL_COST = {
|
|
@@ -1688,7 +1688,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1688
1688
|
grok46: "xai/grok-4.6"
|
|
1689
1689
|
});
|
|
1690
1690
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1691
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
1691
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
1692
1692
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1693
1693
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1694
1694
|
const DEFAULT_MODEL_COST = {
|
|
@@ -1619,7 +1619,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1619
1619
|
grok46: "xai/grok-4.6"
|
|
1620
1620
|
});
|
|
1621
1621
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1622
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
1622
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
1623
1623
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1624
1624
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1625
1625
|
const DEFAULT_MODEL_COST = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// JOHNNESS_PATCH_SUBSCRIPTION_USAGE_93 dist/pi-embedded-C6ITuRXf.js
|
|
2
|
+
import { loadSubscriptionStatus } from "./subscription-usage.js";
|
|
1
3
|
import { createSubscriptionAuthTracker, formatAuthProfileFallback } from "./anthropic-auth-runtime.js"; // JOHNNESS_PATCH_SUBSCRIPTION_RUNTIME_92
|
|
2
4
|
import { normalizeBillingUsage, readLatestBillingUsage, formatBillingCost } from "./usage-billing.js"; // JOHNNESS_PATCH_USAGE_BILLING_91 dist/pi-embedded-C6ITuRXf.js
|
|
3
5
|
import { importOptional66 } from "./optional-module.js";
|
|
@@ -28827,13 +28829,18 @@ async function buildStatusReply(params) {
|
|
|
28827
28829
|
const statusAgentDir = resolveAgentDir(cfg, statusAgentId);
|
|
28828
28830
|
const currentUsageProvider = (() => {
|
|
28829
28831
|
try {
|
|
28830
|
-
return resolveUsageProviderId(provider);
|
|
28832
|
+
return resolveUsageProviderId(sessionEntry?.modelProvider || provider);
|
|
28831
28833
|
} catch {
|
|
28832
28834
|
return;
|
|
28833
28835
|
}
|
|
28834
28836
|
})();
|
|
28835
28837
|
let usageLine = null;
|
|
28836
|
-
if (currentUsageProvider)
|
|
28838
|
+
if (currentUsageProvider === "anthropic" || currentUsageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
28839
|
+
provider: currentUsageProvider, cfg, sessionEntry, agentDir: statusAgentDir,
|
|
28840
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
28841
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
28842
|
+
});
|
|
28843
|
+
else if (currentUsageProvider) try {
|
|
28837
28844
|
const usageEntry = (await loadProviderUsageSummary({
|
|
28838
28845
|
timeoutMs: 3500,
|
|
28839
28846
|
providers: [currentUsageProvider],
|
|
@@ -45691,7 +45698,7 @@ function createSessionStatusTool(opts) {
|
|
|
45691
45698
|
return {
|
|
45692
45699
|
label: "Session Status",
|
|
45693
45700
|
name: "session_status",
|
|
45694
|
-
description: "Show a /status-equivalent session status card (usage + time + cost when available). Use for model-use questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
45701
|
+
description: "Show a /status-equivalent session status card (usage + subscription limit reset times + time + cost when available). Use for model-use and subscription reset questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
45695
45702
|
parameters: SessionStatusToolSchema,
|
|
45696
45703
|
execute: async (_toolCallId, args) => {
|
|
45697
45704
|
const params = args;
|
|
@@ -45776,9 +45783,14 @@ function createSessionStatusTool(opts) {
|
|
|
45776
45783
|
}
|
|
45777
45784
|
const agentDir = resolveAgentDir(cfg, agentId);
|
|
45778
45785
|
const providerForCard = resolved.entry.providerOverride?.trim() || configured.provider;
|
|
45779
|
-
const usageProvider = resolveUsageProviderId(providerForCard);
|
|
45786
|
+
const usageProvider = resolveUsageProviderId(resolved.entry.modelProvider || providerForCard);
|
|
45780
45787
|
let usageLine;
|
|
45781
|
-
if (usageProvider)
|
|
45788
|
+
if (usageProvider === "anthropic" || usageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
45789
|
+
provider: usageProvider, cfg, sessionEntry: resolved.entry, agentDir,
|
|
45790
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
45791
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
45792
|
+
});
|
|
45793
|
+
else if (usageProvider) try {
|
|
45782
45794
|
const snapshot = (await loadProviderUsageSummary({
|
|
45783
45795
|
timeoutMs: 3500,
|
|
45784
45796
|
providers: [usageProvider],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// JOHNNESS_PATCH_SUBSCRIPTION_USAGE_93 dist/pi-embedded-DoQsYfIY.js
|
|
2
|
+
import { loadSubscriptionStatus } from "./subscription-usage.js";
|
|
1
3
|
import { createSubscriptionAuthTracker, formatAuthProfileFallback } from "./anthropic-auth-runtime.js"; // JOHNNESS_PATCH_SUBSCRIPTION_RUNTIME_92
|
|
2
4
|
import { normalizeBillingUsage, readLatestBillingUsage, formatBillingCost } from "./usage-billing.js"; // JOHNNESS_PATCH_USAGE_BILLING_91 dist/pi-embedded-DoQsYfIY.js
|
|
3
5
|
import { importOptional66 } from "./optional-module.js";
|
|
@@ -28823,13 +28825,18 @@ async function buildStatusReply(params) {
|
|
|
28823
28825
|
const statusAgentDir = resolveAgentDir(cfg, statusAgentId);
|
|
28824
28826
|
const currentUsageProvider = (() => {
|
|
28825
28827
|
try {
|
|
28826
|
-
return resolveUsageProviderId(provider);
|
|
28828
|
+
return resolveUsageProviderId(sessionEntry?.modelProvider || provider);
|
|
28827
28829
|
} catch {
|
|
28828
28830
|
return;
|
|
28829
28831
|
}
|
|
28830
28832
|
})();
|
|
28831
28833
|
let usageLine = null;
|
|
28832
|
-
if (currentUsageProvider)
|
|
28834
|
+
if (currentUsageProvider === "anthropic" || currentUsageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
28835
|
+
provider: currentUsageProvider, cfg, sessionEntry, agentDir: statusAgentDir,
|
|
28836
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
28837
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
28838
|
+
});
|
|
28839
|
+
else if (currentUsageProvider) try {
|
|
28833
28840
|
const usageEntry = (await loadProviderUsageSummary({
|
|
28834
28841
|
timeoutMs: 3500,
|
|
28835
28842
|
providers: [currentUsageProvider],
|
|
@@ -45687,7 +45694,7 @@ function createSessionStatusTool(opts) {
|
|
|
45687
45694
|
return {
|
|
45688
45695
|
label: "Session Status",
|
|
45689
45696
|
name: "session_status",
|
|
45690
|
-
description: "Show a /status-equivalent session status card (usage + time + cost when available). Use for model-use questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
45697
|
+
description: "Show a /status-equivalent session status card (usage + subscription limit reset times + time + cost when available). Use for model-use and subscription reset questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
45691
45698
|
parameters: SessionStatusToolSchema,
|
|
45692
45699
|
execute: async (_toolCallId, args) => {
|
|
45693
45700
|
const params = args;
|
|
@@ -45772,9 +45779,14 @@ function createSessionStatusTool(opts) {
|
|
|
45772
45779
|
}
|
|
45773
45780
|
const agentDir = resolveAgentDir(cfg, agentId);
|
|
45774
45781
|
const providerForCard = resolved.entry.providerOverride?.trim() || configured.provider;
|
|
45775
|
-
const usageProvider = resolveUsageProviderId(providerForCard);
|
|
45782
|
+
const usageProvider = resolveUsageProviderId(resolved.entry.modelProvider || providerForCard);
|
|
45776
45783
|
let usageLine;
|
|
45777
|
-
if (usageProvider)
|
|
45784
|
+
if (usageProvider === "anthropic" || usageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
45785
|
+
provider: usageProvider, cfg, sessionEntry: resolved.entry, agentDir,
|
|
45786
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
45787
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
45788
|
+
});
|
|
45789
|
+
else if (usageProvider) try {
|
|
45778
45790
|
const snapshot = (await loadProviderUsageSummary({
|
|
45779
45791
|
timeoutMs: 3500,
|
|
45780
45792
|
providers: [usageProvider],
|
|
@@ -7109,7 +7109,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
7109
7109
|
grok46: "xai/grok-4.6"
|
|
7110
7110
|
});
|
|
7111
7111
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
7112
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
7112
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
7113
7113
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
7114
7114
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
7115
7115
|
const DEFAULT_MODEL_COST = {
|
|
@@ -8110,7 +8110,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
8110
8110
|
grok46: "xai/grok-4.6"
|
|
8111
8111
|
});
|
|
8112
8112
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
8113
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
8113
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
8114
8114
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
8115
8115
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
8116
8116
|
const DEFAULT_MODEL_COST = {
|
|
@@ -5232,7 +5232,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
5232
5232
|
grok46: "xai/grok-4.6"
|
|
5233
5233
|
});
|
|
5234
5234
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
5235
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.
|
|
5235
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","terra56":"openai-codex/gpt-5.6-terra","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-6.1-terra","grok":"xai/grok-4.7"};
|
|
5236
5236
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5237
5237
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5238
5238
|
const DEFAULT_MODEL_COST = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// JOHNNESS_PATCH_SUBSCRIPTION_USAGE_93 dist/plugin-sdk/dispatch-BP0viZiL.js
|
|
2
|
+
import { loadSubscriptionStatus } from "../subscription-usage.js";
|
|
1
3
|
import { createSubscriptionAuthTracker, formatAuthProfileFallback } from "../anthropic-auth-runtime.js"; // JOHNNESS_PATCH_SUBSCRIPTION_RUNTIME_92
|
|
2
4
|
import { normalizeBillingUsage, readLatestBillingUsage, formatBillingCost } from "../usage-billing.js"; // JOHNNESS_PATCH_USAGE_BILLING_91 dist/plugin-sdk/dispatch-BP0viZiL.js
|
|
3
5
|
import { importOptional66 } from "../optional-module.js";
|
|
@@ -50529,13 +50531,18 @@ async function buildStatusReply(params) {
|
|
|
50529
50531
|
const statusAgentDir = resolveAgentDir(cfg, statusAgentId);
|
|
50530
50532
|
const currentUsageProvider = (() => {
|
|
50531
50533
|
try {
|
|
50532
|
-
return resolveUsageProviderId(provider);
|
|
50534
|
+
return resolveUsageProviderId(sessionEntry?.modelProvider || provider);
|
|
50533
50535
|
} catch {
|
|
50534
50536
|
return;
|
|
50535
50537
|
}
|
|
50536
50538
|
})();
|
|
50537
50539
|
let usageLine = null;
|
|
50538
|
-
if (currentUsageProvider)
|
|
50540
|
+
if (currentUsageProvider === "anthropic" || currentUsageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
50541
|
+
provider: currentUsageProvider, cfg, sessionEntry, agentDir: statusAgentDir,
|
|
50542
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
50543
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
50544
|
+
});
|
|
50545
|
+
else if (currentUsageProvider) try {
|
|
50539
50546
|
const usageEntry = (await loadProviderUsageSummary({
|
|
50540
50547
|
timeoutMs: 3500,
|
|
50541
50548
|
providers: [currentUsageProvider],
|
|
@@ -71076,7 +71083,7 @@ function createSessionStatusTool(opts) {
|
|
|
71076
71083
|
return {
|
|
71077
71084
|
label: "Session Status",
|
|
71078
71085
|
name: "session_status",
|
|
71079
|
-
description: "Show a /status-equivalent session status card (usage + time + cost when available). Use for model-use questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
71086
|
+
description: "Show a /status-equivalent session status card (usage + subscription limit reset times + time + cost when available). Use for model-use and subscription reset questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
71080
71087
|
parameters: SessionStatusToolSchema,
|
|
71081
71088
|
execute: async (_toolCallId, args) => {
|
|
71082
71089
|
const params = args;
|
|
@@ -71161,9 +71168,14 @@ function createSessionStatusTool(opts) {
|
|
|
71161
71168
|
}
|
|
71162
71169
|
const agentDir = resolveAgentDir(cfg, agentId);
|
|
71163
71170
|
const providerForCard = resolved.entry.providerOverride?.trim() || configured.provider;
|
|
71164
|
-
const usageProvider = resolveUsageProviderId(providerForCard);
|
|
71171
|
+
const usageProvider = resolveUsageProviderId(resolved.entry.modelProvider || providerForCard);
|
|
71165
71172
|
let usageLine;
|
|
71166
|
-
if (usageProvider)
|
|
71173
|
+
if (usageProvider === "anthropic" || usageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
71174
|
+
provider: usageProvider, cfg, sessionEntry: resolved.entry, agentDir,
|
|
71175
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
71176
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
71177
|
+
});
|
|
71178
|
+
else if (usageProvider) try {
|
|
71167
71179
|
const snapshot = (await loadProviderUsageSummary({
|
|
71168
71180
|
timeoutMs: 3500,
|
|
71169
71181
|
providers: [usageProvider],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// JOHNNESS_PATCH_SUBSCRIPTION_USAGE_93 dist/plugin-sdk/dispatch-CQsjmw7g.js
|
|
2
|
+
import { loadSubscriptionStatus } from "../subscription-usage.js";
|
|
1
3
|
import { createSubscriptionAuthTracker, formatAuthProfileFallback } from "../anthropic-auth-runtime.js"; // JOHNNESS_PATCH_SUBSCRIPTION_RUNTIME_92
|
|
2
4
|
import { normalizeBillingUsage, readLatestBillingUsage, formatBillingCost } from "../usage-billing.js"; // JOHNNESS_PATCH_USAGE_BILLING_91 dist/plugin-sdk/dispatch-CQsjmw7g.js
|
|
3
5
|
import { importOptional66 } from "../optional-module.js";
|
|
@@ -50529,13 +50531,18 @@ async function buildStatusReply(params) {
|
|
|
50529
50531
|
const statusAgentDir = resolveAgentDir(cfg, statusAgentId);
|
|
50530
50532
|
const currentUsageProvider = (() => {
|
|
50531
50533
|
try {
|
|
50532
|
-
return resolveUsageProviderId(provider);
|
|
50534
|
+
return resolveUsageProviderId(sessionEntry?.modelProvider || provider);
|
|
50533
50535
|
} catch {
|
|
50534
50536
|
return;
|
|
50535
50537
|
}
|
|
50536
50538
|
})();
|
|
50537
50539
|
let usageLine = null;
|
|
50538
|
-
if (currentUsageProvider)
|
|
50540
|
+
if (currentUsageProvider === "anthropic" || currentUsageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
50541
|
+
provider: currentUsageProvider, cfg, sessionEntry, agentDir: statusAgentDir,
|
|
50542
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
50543
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
50544
|
+
});
|
|
50545
|
+
else if (currentUsageProvider) try {
|
|
50539
50546
|
const usageEntry = (await loadProviderUsageSummary({
|
|
50540
50547
|
timeoutMs: 3500,
|
|
50541
50548
|
providers: [currentUsageProvider],
|
|
@@ -71076,7 +71083,7 @@ function createSessionStatusTool(opts) {
|
|
|
71076
71083
|
return {
|
|
71077
71084
|
label: "Session Status",
|
|
71078
71085
|
name: "session_status",
|
|
71079
|
-
description: "Show a /status-equivalent session status card (usage + time + cost when available). Use for model-use questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
71086
|
+
description: "Show a /status-equivalent session status card (usage + subscription limit reset times + time + cost when available). Use for model-use and subscription reset questions (📊 session_status). Optional: set per-session model override (model=default resets overrides).",
|
|
71080
71087
|
parameters: SessionStatusToolSchema,
|
|
71081
71088
|
execute: async (_toolCallId, args) => {
|
|
71082
71089
|
const params = args;
|
|
@@ -71161,9 +71168,14 @@ function createSessionStatusTool(opts) {
|
|
|
71161
71168
|
}
|
|
71162
71169
|
const agentDir = resolveAgentDir(cfg, agentId);
|
|
71163
71170
|
const providerForCard = resolved.entry.providerOverride?.trim() || configured.provider;
|
|
71164
|
-
const usageProvider = resolveUsageProviderId(providerForCard);
|
|
71171
|
+
const usageProvider = resolveUsageProviderId(resolved.entry.modelProvider || providerForCard);
|
|
71165
71172
|
let usageLine;
|
|
71166
|
-
if (usageProvider)
|
|
71173
|
+
if (usageProvider === "anthropic" || usageProvider === "openai-codex") usageLine = await loadSubscriptionStatus({
|
|
71174
|
+
provider: usageProvider, cfg, sessionEntry: resolved.entry, agentDir,
|
|
71175
|
+
timeZone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone),
|
|
71176
|
+
ensureAuthProfileStore, resolveAuthProfileOrder, resolveApiKeyForProfile
|
|
71177
|
+
});
|
|
71178
|
+
else if (usageProvider) try {
|
|
71167
71179
|
const snapshot = (await loadProviderUsageSummary({
|
|
71168
71180
|
timeoutMs: 3500,
|
|
71169
71181
|
providers: [usageProvider],
|