@kenkaiiii/gg-boss 4.7.0 → 4.8.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.
|
@@ -63187,10 +63187,25 @@ function formatResetTime(resetsAt) {
|
|
|
63187
63187
|
minute: "2-digit"
|
|
63188
63188
|
});
|
|
63189
63189
|
}
|
|
63190
|
+
function isMythosAccessError(message) {
|
|
63191
|
+
const lower = message.toLowerCase();
|
|
63192
|
+
return lower.includes("mythos") && (lower.includes("not_found") || lower.includes("not found") || lower.includes("no access"));
|
|
63193
|
+
}
|
|
63190
63194
|
function formatError2(err) {
|
|
63191
63195
|
if (err instanceof ProviderError) {
|
|
63192
63196
|
const name = providerDisplayName(err.provider);
|
|
63193
63197
|
const cleanMessage = cleanProviderMessage(err.message);
|
|
63198
|
+
if (isMythosAccessError(cleanMessage)) {
|
|
63199
|
+
return {
|
|
63200
|
+
headline: "Claude Mythos 5 is invitation-only.",
|
|
63201
|
+
source: "provider",
|
|
63202
|
+
message: "Your Anthropic account isn't approved for Project Glasswing, so the API reports the model as not found.",
|
|
63203
|
+
provider: err.provider,
|
|
63204
|
+
statusCode: err.statusCode,
|
|
63205
|
+
...err.requestId ? { requestId: err.requestId } : {},
|
|
63206
|
+
guidance: "Request access via your Anthropic account team (see platform.claude.com/docs/en/about-claude/models/overview), or switch to claude-fable-5 with /model \u2014 same underlying model, generally available."
|
|
63207
|
+
};
|
|
63208
|
+
}
|
|
63194
63209
|
if (isUsageLimitError(err)) {
|
|
63195
63210
|
const resetClause = err.resetsAt ? ` It resets at ${formatResetTime(err.resetsAt)}.` : "";
|
|
63196
63211
|
return {
|
|
@@ -63816,7 +63831,7 @@ function toAnthropicToolChoice(choice) {
|
|
|
63816
63831
|
return { type: "tool", name: choice.name };
|
|
63817
63832
|
}
|
|
63818
63833
|
function isAdaptiveThinkingModel(model) {
|
|
63819
|
-
return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6/.test(model);
|
|
63834
|
+
return /opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-4[-.]6|fable-5|mythos-5/.test(model);
|
|
63820
63835
|
}
|
|
63821
63836
|
function toAnthropicThinking(level, maxTokens, model) {
|
|
63822
63837
|
if (isAdaptiveThinkingModel(model)) {
|
|
@@ -67433,10 +67448,37 @@ var Agent = class {
|
|
|
67433
67448
|
}
|
|
67434
67449
|
};
|
|
67435
67450
|
|
|
67436
|
-
// ../gg-core/dist/chunk-
|
|
67451
|
+
// ../gg-core/dist/chunk-227IRQAU.js
|
|
67437
67452
|
init_esm_shims();
|
|
67438
67453
|
var MODELS = [
|
|
67439
67454
|
// ── Anthropic ──────────────────────────────────────────
|
|
67455
|
+
{
|
|
67456
|
+
id: "claude-fable-5",
|
|
67457
|
+
name: "Claude Fable 5",
|
|
67458
|
+
provider: "anthropic",
|
|
67459
|
+
contextWindow: 1e6,
|
|
67460
|
+
maxOutputTokens: 128e3,
|
|
67461
|
+
supportsThinking: true,
|
|
67462
|
+
supportsImages: true,
|
|
67463
|
+
supportsVideo: false,
|
|
67464
|
+
costTier: "high",
|
|
67465
|
+
maxThinkingLevel: "max"
|
|
67466
|
+
},
|
|
67467
|
+
{
|
|
67468
|
+
// Mythos-class model offered through Project Glasswing (limited
|
|
67469
|
+
// availability, invitation-only). Same underlying model as Fable 5 with
|
|
67470
|
+
// some safeguards lifted; kept here so approved accounts can select it.
|
|
67471
|
+
id: "claude-mythos-5",
|
|
67472
|
+
name: "Claude Mythos 5",
|
|
67473
|
+
provider: "anthropic",
|
|
67474
|
+
contextWindow: 1e6,
|
|
67475
|
+
maxOutputTokens: 128e3,
|
|
67476
|
+
supportsThinking: true,
|
|
67477
|
+
supportsImages: true,
|
|
67478
|
+
supportsVideo: false,
|
|
67479
|
+
costTier: "high",
|
|
67480
|
+
maxThinkingLevel: "max"
|
|
67481
|
+
},
|
|
67440
67482
|
{
|
|
67441
67483
|
id: "claude-opus-4-8",
|
|
67442
67484
|
name: "Claude Opus 4.8",
|
|
@@ -67798,7 +67840,7 @@ function isAnthropicOpus48Or47Model(provider, model) {
|
|
|
67798
67840
|
return provider === "anthropic" && /opus-4-8|opus-4-7/.test(model);
|
|
67799
67841
|
}
|
|
67800
67842
|
function isAnthropicAdaptiveModel(provider, model) {
|
|
67801
|
-
return provider === "anthropic" && /opus-4-8|opus-4-7|opus-4-6|sonnet-4-6/.test(model);
|
|
67843
|
+
return provider === "anthropic" && /opus-4-8|opus-4-7|opus-4-6|sonnet-4-6|fable-5|mythos-5/.test(model);
|
|
67802
67844
|
}
|
|
67803
67845
|
function getSupportedThinkingLevels(provider, model) {
|
|
67804
67846
|
const maxLevel = getMaxThinkingLevel(model);
|
|
@@ -74688,7 +74730,9 @@ var SettingsSchema = external_exports.object({
|
|
|
74688
74730
|
]).default("auto"),
|
|
74689
74731
|
showTokenUsage: external_exports.boolean().default(true),
|
|
74690
74732
|
idealReviewEnabled: external_exports.boolean().default(true),
|
|
74691
|
-
enabledTools: external_exports.array(external_exports.string()).optional()
|
|
74733
|
+
enabledTools: external_exports.array(external_exports.string()).optional(),
|
|
74734
|
+
/** Delete session transcripts older than this many days at startup. 0 disables pruning. */
|
|
74735
|
+
sessionRetentionDays: external_exports.number().int().min(0).default(30)
|
|
74692
74736
|
});
|
|
74693
74737
|
var DEFAULT_SETTINGS = {
|
|
74694
74738
|
autoCompact: true,
|
|
@@ -74698,7 +74742,8 @@ var DEFAULT_SETTINGS = {
|
|
|
74698
74742
|
thinkingEnabled: false,
|
|
74699
74743
|
theme: "auto",
|
|
74700
74744
|
showTokenUsage: true,
|
|
74701
|
-
idealReviewEnabled: true
|
|
74745
|
+
idealReviewEnabled: true,
|
|
74746
|
+
sessionRetentionDays: 30
|
|
74702
74747
|
};
|
|
74703
74748
|
var SettingsManager = class {
|
|
74704
74749
|
settings = { ...DEFAULT_SETTINGS };
|
|
@@ -74750,9 +74795,29 @@ function encodeCwd(cwd2) {
|
|
|
74750
74795
|
}
|
|
74751
74796
|
var SessionManager = class _SessionManager {
|
|
74752
74797
|
sessionsDir;
|
|
74798
|
+
warnedPersistCodes = /* @__PURE__ */ new Set();
|
|
74799
|
+
/** Called once per error code when session persistence fails (e.g. ENOSPC). */
|
|
74800
|
+
onPersistError;
|
|
74753
74801
|
constructor(sessionsDir) {
|
|
74754
74802
|
this.sessionsDir = sessionsDir;
|
|
74755
74803
|
}
|
|
74804
|
+
/**
|
|
74805
|
+
* Session persistence must never crash a live session. Disk-full (ENOSPC),
|
|
74806
|
+
* permission, or quota errors during transcript writes are reported once
|
|
74807
|
+
* per error code and otherwise swallowed — the in-memory session keeps going.
|
|
74808
|
+
*/
|
|
74809
|
+
handlePersistError(error51, op) {
|
|
74810
|
+
const err = error51;
|
|
74811
|
+
const code = err?.code ?? "UNKNOWN";
|
|
74812
|
+
if (this.warnedPersistCodes.has(code))
|
|
74813
|
+
return;
|
|
74814
|
+
this.warnedPersistCodes.add(code);
|
|
74815
|
+
log("WARN", "session", `Session persistence failed (${op}); continuing without saving`, {
|
|
74816
|
+
code,
|
|
74817
|
+
message: err?.message ?? String(error51)
|
|
74818
|
+
});
|
|
74819
|
+
this.onPersistError?.(err);
|
|
74820
|
+
}
|
|
74756
74821
|
dirForCwd(cwd2) {
|
|
74757
74822
|
return path27.join(this.sessionsDir, encodeCwd(cwd2));
|
|
74758
74823
|
}
|
|
@@ -74881,10 +74946,76 @@ var SessionManager = class _SessionManager {
|
|
|
74881
74946
|
const sessions = await this.list(cwd2);
|
|
74882
74947
|
return sessions.find((session) => session.id === sessionId2)?.path ?? null;
|
|
74883
74948
|
}
|
|
74949
|
+
/**
|
|
74950
|
+
* Delete session files older than `maxAgeDays` across ALL project dirs.
|
|
74951
|
+
* Age is judged by file mtime, so a session that's still being appended to
|
|
74952
|
+
* is never considered old. Best-effort: per-file errors are skipped so a
|
|
74953
|
+
* locked or vanished file can't break startup. Empty project dirs left
|
|
74954
|
+
* behind are removed. Returns what was freed for logging.
|
|
74955
|
+
*/
|
|
74956
|
+
async pruneOldSessions(options) {
|
|
74957
|
+
const result = { deletedFiles: 0, freedBytes: 0 };
|
|
74958
|
+
if (options.maxAgeDays <= 0)
|
|
74959
|
+
return result;
|
|
74960
|
+
const cutoffMs = Date.now() - options.maxAgeDays * 864e5;
|
|
74961
|
+
const keep = new Set((options.keepPaths ?? []).map((p) => path27.resolve(p)));
|
|
74962
|
+
let cwdDirs;
|
|
74963
|
+
try {
|
|
74964
|
+
cwdDirs = await fs23.readdir(this.sessionsDir);
|
|
74965
|
+
} catch {
|
|
74966
|
+
return result;
|
|
74967
|
+
}
|
|
74968
|
+
for (const dirName of cwdDirs) {
|
|
74969
|
+
const dir = path27.join(this.sessionsDir, dirName);
|
|
74970
|
+
let files;
|
|
74971
|
+
try {
|
|
74972
|
+
const stat = await fs23.stat(dir);
|
|
74973
|
+
if (!stat.isDirectory())
|
|
74974
|
+
continue;
|
|
74975
|
+
files = await fs23.readdir(dir);
|
|
74976
|
+
} catch {
|
|
74977
|
+
continue;
|
|
74978
|
+
}
|
|
74979
|
+
let remaining = files.length;
|
|
74980
|
+
for (const file2 of files) {
|
|
74981
|
+
if (!file2.endsWith(".jsonl"))
|
|
74982
|
+
continue;
|
|
74983
|
+
const filePath = path27.join(dir, file2);
|
|
74984
|
+
if (keep.has(path27.resolve(filePath)))
|
|
74985
|
+
continue;
|
|
74986
|
+
try {
|
|
74987
|
+
const stat = await fs23.stat(filePath);
|
|
74988
|
+
if (stat.mtimeMs >= cutoffMs)
|
|
74989
|
+
continue;
|
|
74990
|
+
await fs23.unlink(filePath);
|
|
74991
|
+
result.deletedFiles += 1;
|
|
74992
|
+
result.freedBytes += stat.size;
|
|
74993
|
+
remaining -= 1;
|
|
74994
|
+
} catch {
|
|
74995
|
+
}
|
|
74996
|
+
}
|
|
74997
|
+
if (remaining === 0) {
|
|
74998
|
+
await fs23.rmdir(dir).catch(() => {
|
|
74999
|
+
});
|
|
75000
|
+
}
|
|
75001
|
+
}
|
|
75002
|
+
return result;
|
|
75003
|
+
}
|
|
74884
75004
|
async appendEntry(sessionPath, entry) {
|
|
74885
|
-
|
|
75005
|
+
try {
|
|
75006
|
+
await fs23.appendFile(sessionPath, JSON.stringify(entry) + "\n", "utf-8");
|
|
75007
|
+
} catch (error51) {
|
|
75008
|
+
this.handlePersistError(error51, "appendEntry");
|
|
75009
|
+
}
|
|
74886
75010
|
}
|
|
74887
75011
|
async updateLeaf(sessionPath, leafId) {
|
|
75012
|
+
try {
|
|
75013
|
+
await this.updateLeafUnsafe(sessionPath, leafId);
|
|
75014
|
+
} catch (error51) {
|
|
75015
|
+
this.handlePersistError(error51, "updateLeaf");
|
|
75016
|
+
}
|
|
75017
|
+
}
|
|
75018
|
+
async updateLeafUnsafe(sessionPath, leafId) {
|
|
74888
75019
|
const fd2 = await fs23.open(sessionPath, "r+");
|
|
74889
75020
|
try {
|
|
74890
75021
|
const buf = Buffer.alloc(4096);
|
|
@@ -114565,4 +114696,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
114565
114696
|
* LICENSE file in the root directory of this source tree.
|
|
114566
114697
|
*)
|
|
114567
114698
|
*/
|
|
114568
|
-
//# sourceMappingURL=chunk-
|
|
114699
|
+
//# sourceMappingURL=chunk-HRWFW5HH.js.map
|