@kenkaiiii/gg-boss 4.6.3 → 4.8.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.
@@ -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-74Z6I5V7.js
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);
@@ -69110,10 +69152,14 @@ var ProcessManager = class {
69110
69152
  const child = spawn2("bash", ["-c", command], {
69111
69153
  cwd: cwd2,
69112
69154
  detached: true,
69113
- stdio: ["ignore", fd2, fd2],
69155
+ // stdin is a pipe so callers can drive interactive processes (REPLs,
69156
+ // scaffolders, [Y/n] prompts) via sendInput(); stdout/stderr go to the log.
69157
+ stdio: ["pipe", fd2, fd2],
69114
69158
  env: getSafeToolEnv()
69115
69159
  });
69116
69160
  fs6.closeSync(fd2);
69161
+ child.stdin?.on("error", () => {
69162
+ });
69117
69163
  const pid = child.pid;
69118
69164
  child.unref();
69119
69165
  const proc = {
@@ -69161,6 +69207,40 @@ var ProcessManager = class {
69161
69207
  const isRunning = this.children.has(id2);
69162
69208
  return { id: id2, isRunning, exitCode: proc.exitCode, output };
69163
69209
  }
69210
+ /**
69211
+ * Write input to a running background process's stdin, enabling interactive
69212
+ * control (answer prompts, drive a REPL, feed a scaffolder). By default a
69213
+ * newline is appended (as if the user pressed Enter). Set `eof` to close
69214
+ * stdin afterwards, signalling end-of-input (Ctrl-D) to the program.
69215
+ */
69216
+ async sendInput(id2, input, opts = {}) {
69217
+ const proc = this.processes.get(id2);
69218
+ if (!proc)
69219
+ return `No background process with id "${id2}"`;
69220
+ const child = this.children.get(id2);
69221
+ if (!child || proc.exitCode !== null) {
69222
+ return `Process ${id2} already exited (code ${proc.exitCode})`;
69223
+ }
69224
+ const stdin = child.stdin;
69225
+ if (!stdin || stdin.destroyed || stdin.writableEnded) {
69226
+ return `Process ${id2} is not accepting input (stdin is closed).`;
69227
+ }
69228
+ const enter = opts.enter ?? true;
69229
+ const text = input + (enter ? "\n" : "");
69230
+ try {
69231
+ if (text.length > 0) {
69232
+ await new Promise((resolve2, reject) => {
69233
+ stdin.write(text, (err) => err ? reject(err) : resolve2());
69234
+ });
69235
+ }
69236
+ if (opts.eof)
69237
+ stdin.end();
69238
+ } catch (err) {
69239
+ return `Failed to send input to ${id2}: ${err.message}`;
69240
+ }
69241
+ const summary = opts.eof ? text.length > 0 ? `Sent input and closed stdin (EOF) for ${id2}.` : `Closed stdin (EOF) for ${id2}.` : `Sent input to ${id2}.`;
69242
+ return `${summary} Use task_output with id="${id2}" to read the response.`;
69243
+ }
69164
69244
  async stop(id2) {
69165
69245
  const proc = this.processes.get(id2);
69166
69246
  if (!proc)
@@ -71121,7 +71201,7 @@ var BashParams = external_exports.object({
71121
71201
  function createBashTool(cwd2, processManager, ops = localOperations, planModeRef) {
71122
71202
  return {
71123
71203
  name: "bash",
71124
- description: "Execute a bash command. The shell's working directory is already set to the project root \u2014 don't cd into it redundantly. Use cd only when you need a different directory. Returns exit code and combined stdout/stderr. Commands run in a non-interactive bash shell with TERM=dumb. Long output is truncated (tail kept). Set run_in_background=true for long-running processes (dev servers, watchers). Use task_output/task_stop to interact with background processes.",
71204
+ description: "Execute a bash command. The shell's working directory is already set to the project root \u2014 don't cd into it redundantly. Use cd only when you need a different directory. Returns exit code and combined stdout/stderr. Commands run in a non-interactive bash shell with TERM=dumb. Long output is truncated (tail kept). Set run_in_background=true for long-running OR interactive processes (dev servers, watchers, REPLs, scaffolders, programs that prompt for input). Use task_output to read output, task_send to type input/answer prompts, and task_stop to stop background processes.",
71125
71205
  parameters: BashParams,
71126
71206
  executionMode: "sequential",
71127
71207
  async execute({ command, timeout: timeoutMs, run_in_background }, context) {
@@ -71134,7 +71214,7 @@ function createBashTool(cwd2, processManager, ops = localOperations, planModeRef
71134
71214
  ID: ${result.id}
71135
71215
  PID: ${result.pid}
71136
71216
  Log: ${result.logFile}
71137
- Use task_output with id="${result.id}" to read output.`;
71217
+ Use task_output with id="${result.id}" to read output, task_send to type input/answer prompts, task_stop to stop it.`;
71138
71218
  }
71139
71219
  const effectiveTimeout = timeoutMs ?? DEFAULT_TIMEOUT;
71140
71220
  return new Promise((resolve2) => {
@@ -73062,6 +73142,29 @@ function createTaskStopTool(processManager) {
73062
73142
  };
73063
73143
  }
73064
73144
 
73145
+ // ../ggcoder/dist/tools/task-send.js
73146
+ init_esm_shims();
73147
+ var TaskSendParams = external_exports.object({
73148
+ id: external_exports.string().describe("The background process ID to send input to"),
73149
+ input: external_exports.string().optional().describe("Text to type into the process's stdin (e.g. an answer to a prompt or a REPL line)"),
73150
+ enter: external_exports.boolean().optional().describe("Append a newline (press Enter) after the input. Default true."),
73151
+ eof: external_exports.boolean().optional().describe("Close stdin after sending, signalling end-of-input (Ctrl-D).")
73152
+ });
73153
+ function createTaskSendTool(processManager) {
73154
+ return {
73155
+ name: "task_send",
73156
+ description: "Send input to a running background process (started with run_in_background) to drive it interactively \u2014 answer a [Y/n] or password-style prompt, type into a REPL, or feed a scaffolder's questions. By default the input is followed by Enter. After sending, call task_output to read the process's response. Set eof=true to close stdin (Ctrl-D).",
73157
+ parameters: TaskSendParams,
73158
+ executionMode: "sequential",
73159
+ async execute({ id: id2, input, enter, eof }) {
73160
+ if ((input === void 0 || input === "") && enter === false && !eof) {
73161
+ return "Nothing to send: provide input, or set enter=true to press Enter, or eof=true.";
73162
+ }
73163
+ return processManager.sendInput(id2, input ?? "", { enter, eof });
73164
+ }
73165
+ };
73166
+ }
73167
+
73065
73168
  // ../ggcoder/dist/tools/tasks.js
73066
73169
  init_esm_shims();
73067
73170
 
@@ -73424,6 +73527,7 @@ function createTools(cwd2, opts) {
73424
73527
  createSourcePathTool(cwd2),
73425
73528
  createWebFetchTool(),
73426
73529
  createTaskOutputTool(processManager),
73530
+ createTaskSendTool(processManager),
73427
73531
  createTaskStopTool(processManager),
73428
73532
  createTasksTool(cwd2),
73429
73533
  createScreenshotTool(cwd2)
@@ -114503,4 +114607,4 @@ react/cjs/react-jsx-runtime.development.js:
114503
114607
  * LICENSE file in the root directory of this source tree.
114504
114608
  *)
114505
114609
  */
114506
- //# sourceMappingURL=chunk-EVFGJFHT.js.map
114610
+ //# sourceMappingURL=chunk-JZC6MVWQ.js.map