brewcode-cli 1.0.0 → 1.1.0-nightly.20260626.49.1.6fc150e

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.
Files changed (3) hide show
  1. package/dist/cli.mjs +4461 -4722
  2. package/dist/sdk.mjs +230 -100
  3. package/package.json +1 -1
package/dist/sdk.mjs CHANGED
@@ -18263,6 +18263,39 @@ var init_catalogData = __esm(() => {
18263
18263
  supportsJsonMode: true,
18264
18264
  supportsReasoning: true,
18265
18265
  supportsPreciseTokenCount: false
18266
+ },
18267
+ reasoning: {
18268
+ mode: "levels",
18269
+ levels: [
18270
+ "low",
18271
+ "medium",
18272
+ "high",
18273
+ "xhigh"
18274
+ ],
18275
+ defaultLevel: "high",
18276
+ wireFormat: "reasoning_effort"
18277
+ }
18278
+ },
18279
+ {
18280
+ id: "grok-build-0.1",
18281
+ name: "Grok Build 0.1",
18282
+ ownerProviderId: "xai",
18283
+ brandId: "xai",
18284
+ description: "xAI Grok coding model with always-on reasoning",
18285
+ classification: [
18286
+ "chat",
18287
+ "reasoning",
18288
+ "coding"
18289
+ ],
18290
+ contextWindow: 256000,
18291
+ maxOutputTokens: 32768,
18292
+ capabilities: {
18293
+ supportsVision: false,
18294
+ supportsStreaming: true,
18295
+ supportsFunctionCalling: true,
18296
+ supportsJsonMode: true,
18297
+ supportsReasoning: true,
18298
+ supportsPreciseTokenCount: false
18266
18299
  }
18267
18300
  }
18268
18301
  ];
@@ -19256,8 +19289,6 @@ Run /onboard-github to sign in again with your GitHub account.`
19256
19289
  supportsReasoning: true,
19257
19290
  supportsPreciseTokenCount: false
19258
19291
  },
19259
- apiName: "grok-4.3",
19260
- globalModelId: "grok-4.3",
19261
19292
  reasoning: {
19262
19293
  mode: "levels",
19263
19294
  levels: [
@@ -19268,6 +19299,8 @@ Run /onboard-github to sign in again with your GitHub account.`
19268
19299
  defaultLevel: "high",
19269
19300
  wireFormat: "reasoning_effort"
19270
19301
  },
19302
+ apiName: "grok-4.3",
19303
+ globalModelId: "grok-4.3",
19271
19304
  transport: {
19272
19305
  adapter: "openai.compat",
19273
19306
  defaultApiFormat: "chat_completions",
@@ -20552,60 +20585,50 @@ Run /onboard-github to sign in again with your GitHub account.`
20552
20585
  supportsReasoning: true,
20553
20586
  supportsPreciseTokenCount: false
20554
20587
  },
20588
+ reasoning: {
20589
+ mode: "levels",
20590
+ levels: [
20591
+ "low",
20592
+ "medium",
20593
+ "high",
20594
+ "xhigh"
20595
+ ],
20596
+ defaultLevel: "high",
20597
+ wireFormat: "reasoning_effort"
20598
+ },
20555
20599
  apiName: "grok-4.3",
20556
20600
  globalModelId: "grok-4.3",
20557
20601
  routeId: "xai",
20558
20602
  provenance: "declared"
20559
20603
  },
20560
20604
  {
20561
- id: "grok-4",
20562
- name: "Grok 4",
20605
+ id: "grok-build-0.1",
20606
+ name: "Grok Build 0.1",
20563
20607
  ownerProviderId: "xai",
20564
20608
  brandId: "xai",
20609
+ description: "xAI Grok coding model with always-on reasoning",
20565
20610
  classification: [
20566
20611
  "chat",
20567
20612
  "reasoning",
20568
- "vision",
20569
20613
  "coding"
20570
20614
  ],
20571
- contextWindow: 2000000,
20615
+ contextWindow: 256000,
20572
20616
  maxOutputTokens: 32768,
20573
20617
  capabilities: {
20574
- supportsVision: true,
20618
+ supportsVision: false,
20575
20619
  supportsStreaming: true,
20576
20620
  supportsFunctionCalling: true,
20577
20621
  supportsJsonMode: true,
20578
20622
  supportsReasoning: true,
20579
20623
  supportsPreciseTokenCount: false
20580
20624
  },
20581
- apiName: "grok-4",
20582
- globalModelId: "grok-4",
20583
- routeId: "xai",
20584
- provenance: "declared"
20585
- },
20586
- {
20587
- id: "grok-3",
20588
- name: "Grok 3",
20589
- ownerProviderId: "xai",
20590
- brandId: "xai",
20591
- classification: [
20592
- "chat",
20593
- "reasoning",
20594
- "vision",
20595
- "coding"
20596
- ],
20597
- contextWindow: 131072,
20598
- maxOutputTokens: 32768,
20599
- capabilities: {
20600
- supportsVision: true,
20601
- supportsStreaming: true,
20602
- supportsFunctionCalling: true,
20603
- supportsJsonMode: true,
20604
- supportsReasoning: true,
20605
- supportsPreciseTokenCount: false
20625
+ apiName: "grok-build-0.1",
20626
+ globalModelId: "grok-build-0.1",
20627
+ transport: {
20628
+ adapter: "openai.responses",
20629
+ defaultApiFormat: "responses",
20630
+ preferModelDefaultApiFormat: true
20606
20631
  },
20607
- apiName: "grok-3",
20608
- globalModelId: "grok-3",
20609
20632
  routeId: "xai",
20610
20633
  provenance: "declared"
20611
20634
  }
@@ -21716,41 +21739,38 @@ Run /onboard-github to sign in again with your GitHub account.`
21716
21739
  supportsReasoning: true,
21717
21740
  supportsPreciseTokenCount: false
21718
21741
  },
21742
+ reasoning: {
21743
+ mode: "levels",
21744
+ levels: [
21745
+ "low",
21746
+ "medium",
21747
+ "high",
21748
+ "xhigh"
21749
+ ],
21750
+ defaultLevel: "high",
21751
+ wireFormat: "reasoning_effort"
21752
+ },
21719
21753
  contextWindow: 1e6,
21720
21754
  maxOutputTokens: 32768,
21721
21755
  notes: "xAI Grok 4.3 reasoning model"
21722
21756
  },
21723
21757
  {
21724
- id: "grok-4",
21725
- apiName: "grok-4",
21726
- label: "Grok 4",
21727
- modelDescriptorId: "grok-4",
21728
- capabilities: {
21729
- supportsVision: true,
21730
- supportsStreaming: true,
21731
- supportsFunctionCalling: true,
21732
- supportsJsonMode: true,
21733
- supportsReasoning: true,
21734
- supportsPreciseTokenCount: false
21735
- },
21736
- contextWindow: 2000000,
21737
- maxOutputTokens: 32768
21738
- },
21739
- {
21740
- id: "grok-3",
21741
- apiName: "grok-3",
21742
- label: "Grok 3",
21743
- modelDescriptorId: "grok-3",
21758
+ id: "grok-build-0.1",
21759
+ apiName: "grok-build-0.1",
21760
+ label: "Grok Build 0.1",
21761
+ description: "xAI Grok coding model with always-on reasoning",
21762
+ modelDescriptorId: "grok-build-0.1",
21744
21763
  capabilities: {
21745
- supportsVision: true,
21764
+ supportsVision: false,
21746
21765
  supportsStreaming: true,
21747
21766
  supportsFunctionCalling: true,
21748
21767
  supportsJsonMode: true,
21749
21768
  supportsReasoning: true,
21750
21769
  supportsPreciseTokenCount: false
21751
21770
  },
21752
- contextWindow: 131072,
21753
- maxOutputTokens: 32768
21771
+ contextWindow: 256000,
21772
+ maxOutputTokens: 32768,
21773
+ notes: "xAI Grok coding model with always-on reasoning"
21754
21774
  }
21755
21775
  ]
21756
21776
  },
@@ -26816,8 +26836,41 @@ Run /onboard-github to sign in again with your GitHub account.`
26816
26836
  supportsReasoning: true,
26817
26837
  supportsPreciseTokenCount: false
26818
26838
  },
26839
+ reasoning: {
26840
+ mode: "levels",
26841
+ levels: [
26842
+ "low",
26843
+ "medium",
26844
+ "high",
26845
+ "xhigh"
26846
+ ],
26847
+ defaultLevel: "high",
26848
+ wireFormat: "reasoning_effort"
26849
+ },
26819
26850
  contextWindow: 1e6,
26820
26851
  maxOutputTokens: 32768
26852
+ },
26853
+ {
26854
+ id: "grok-build-0.1",
26855
+ label: "Grok Build 0.1",
26856
+ brandId: "xai",
26857
+ vendorId: "xai",
26858
+ classification: [
26859
+ "chat",
26860
+ "reasoning",
26861
+ "coding"
26862
+ ],
26863
+ defaultModel: "grok-build-0.1",
26864
+ capabilities: {
26865
+ supportsVision: false,
26866
+ supportsStreaming: true,
26867
+ supportsFunctionCalling: true,
26868
+ supportsJsonMode: true,
26869
+ supportsReasoning: true,
26870
+ supportsPreciseTokenCount: false
26871
+ },
26872
+ contextWindow: 256000,
26873
+ maxOutputTokens: 32768
26821
26874
  }
26822
26875
  ]
26823
26876
  ];
@@ -45480,7 +45533,7 @@ function getAttributionHeader(fingerprint) {
45480
45533
  if (!isAttributionHeaderEnabled()) {
45481
45534
  return "";
45482
45535
  }
45483
- const version = `${"1.0.0"}.${fingerprint}`;
45536
+ const version = `${"1.1.0-nightly.20260626.49.1.6fc150e"}.${fingerprint}`;
45484
45537
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
45485
45538
  const cch = "";
45486
45539
  const workload = getWorkload();
@@ -123336,11 +123389,16 @@ var exports_cuaDriverMcp = {};
123336
123389
  __export(exports_cuaDriverMcp, {
123337
123390
  resolveCuaDriverCommand: () => resolveCuaDriverCommand,
123338
123391
  isCuaDriverSupported: () => isCuaDriverSupported,
123392
+ isCuaDriverMissingError: () => isCuaDriverMissingError,
123339
123393
  isCuaDriverAvailable: () => isCuaDriverAvailable,
123340
123394
  getCuaDriverMcpConfigForPlatform: () => getCuaDriverMcpConfigForPlatform,
123341
123395
  getCuaDriverMcpConfig: () => getCuaDriverMcpConfig,
123396
+ addCuaDriverInstallHelp: () => addCuaDriverInstallHelp,
123397
+ CUA_DRIVER_PERMISSIONS_COMMAND: () => CUA_DRIVER_PERMISSIONS_COMMAND,
123342
123398
  CUA_DRIVER_MCP_USAGE_INSTRUCTIONS: () => CUA_DRIVER_MCP_USAGE_INSTRUCTIONS,
123343
123399
  CUA_DRIVER_MCP_SERVER_NAME: () => CUA_DRIVER_MCP_SERVER_NAME,
123400
+ CUA_DRIVER_INSTALL_HELP: () => CUA_DRIVER_INSTALL_HELP,
123401
+ CUA_DRIVER_INSTALL_COMMAND: () => CUA_DRIVER_INSTALL_COMMAND,
123344
123402
  CUA_DRIVER_APP_BINARY: () => CUA_DRIVER_APP_BINARY
123345
123403
  });
123346
123404
  import { existsSync as existsSync6 } from "fs";
@@ -123352,6 +123410,18 @@ function isCuaDriverSupported(platform2 = process.platform) {
123352
123410
  async function isCuaDriverAvailable() {
123353
123411
  return isCuaDriverSupported();
123354
123412
  }
123413
+ function isCuaDriverMissingError(message) {
123414
+ const normalized = message.toLowerCase();
123415
+ return normalized.includes("enoent") || normalized.includes("not found") || normalized.includes("no such file or directory") || normalized.includes("command not found");
123416
+ }
123417
+ function addCuaDriverInstallHelp(error40) {
123418
+ if (!isCuaDriverMissingError(error40)) {
123419
+ return error40;
123420
+ }
123421
+ return `${error40}
123422
+
123423
+ ${CUA_DRIVER_INSTALL_HELP}`;
123424
+ }
123355
123425
  function resolveCuaDriverCommand({
123356
123426
  exists = existsSync6,
123357
123427
  homeDir = homedir12()
@@ -123381,12 +123451,16 @@ function getCuaDriverMcpConfigForPlatform(platform2 = process.platform, command
123381
123451
  async function getCuaDriverMcpConfig() {
123382
123452
  return getCuaDriverMcpConfigForPlatform();
123383
123453
  }
123384
- var CUA_DRIVER_MCP_SERVER_NAME = "cua-driver", CUA_DRIVER_APP_BINARY = "/Applications/CuaDriver.app/Contents/MacOS/cua-driver", CUA_DRIVER_MCP_USAGE_INSTRUCTIONS = `BrewCode computer-use reliability rules for cua-driver:
123454
+ var CUA_DRIVER_MCP_SERVER_NAME = "cua-driver", CUA_DRIVER_APP_BINARY = "/Applications/CuaDriver.app/Contents/MacOS/cua-driver", CUA_DRIVER_INSTALL_COMMAND = '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/cua-driver/scripts/install.sh)"', CUA_DRIVER_PERMISSIONS_COMMAND = "cua-driver permissions grant", CUA_DRIVER_MCP_USAGE_INSTRUCTIONS = `BrewCode computer-use reliability rules for cua-driver:
123385
123455
  - Treat state-changing UI tools (click, double_click, right_click, drag, type_text, press_key, hotkey, scroll, set_value, bring_to_front, launch_app, kill_app) as attempted actions, not proof of completion.
123386
123456
  - After every state-changing UI action, verify the result with get_window_state, list_windows, get_accessibility_tree, or another read-only observation before telling the user the task is complete.
123387
123457
  - Element indices are snapshot-scoped: refresh get_window_state after UI changes before reusing element_index values.
123388
- - If verification does not show the intended UI state, say what failed and try a corrected action; do not report success just because a tool call returned without error.`;
123389
- var init_cuaDriverMcp = () => {};
123458
+ - If verification does not show the intended UI state, say what failed and try a corrected action; do not report success just because a tool call returned without error.`, CUA_DRIVER_INSTALL_HELP;
123459
+ var init_cuaDriverMcp = __esm(() => {
123460
+ CUA_DRIVER_INSTALL_HELP = `Install cua-driver, then grant macOS permissions:
123461
+ ${CUA_DRIVER_INSTALL_COMMAND}
123462
+ ${CUA_DRIVER_PERMISSIONS_COMMAND}`;
123463
+ });
123390
123464
 
123391
123465
  // src/services/analytics/metadata.ts
123392
123466
  import { extname as extname2 } from "path";
@@ -123584,7 +123658,7 @@ var init_metadata = __esm(() => {
123584
123658
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
123585
123659
  WHITESPACE_REGEX = /\s+/;
123586
123660
  getVersionBase = memoize_default(() => {
123587
- const match = "1.0.0".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
123661
+ const match = "1.1.0-nightly.20260626.49.1.6fc150e".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
123588
123662
  return match ? match[0] : undefined;
123589
123663
  });
123590
123664
  buildEnvContext = memoize_default(async () => {
@@ -123624,9 +123698,9 @@ var init_metadata = __esm(() => {
123624
123698
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
123625
123699
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
123626
123700
  isClaudeAiAuth: isClaudeAISubscriber(),
123627
- version: "1.0.0",
123701
+ version: "1.1.0-nightly.20260626.49.1.6fc150e",
123628
123702
  versionBase: getVersionBase(),
123629
- buildTime: "2026-06-26T16:20:16.643Z",
123703
+ buildTime: "2026-06-26T23:45:27.034Z",
123630
123704
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
123631
123705
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
123632
123706
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -131949,6 +132023,12 @@ function modelSupportsWireEffort(model, context2) {
131949
132023
  return modelSupportsShimReasoningEffort(model, undefined, undefined, context2);
131950
132024
  }
131951
132025
  function resolveOpenAIShimReasoningRequestPlan(options) {
132026
+ if (options.reasoningControl?.source === "capability" && options.reasoningControl.supportsReasoning === true && options.reasoningControl.controllable === false) {
132027
+ return {
132028
+ wireFormat: options.reasoningControl.wireFormat,
132029
+ source: "none"
132030
+ };
132031
+ }
131952
132032
  const metadataWireFormat = options.reasoningControl?.source === "metadata" ? options.reasoningControl.wireFormat : undefined;
131953
132033
  if (metadataWireFormat && !metadataWireFormatSupportsEffort(metadataWireFormat)) {
131954
132034
  return {
@@ -132231,7 +132311,7 @@ var init_effort = __esm(() => {
132231
132311
 
132232
132312
  // src/utils/userAgent.ts
132233
132313
  function getVersionedUserAgent(product) {
132234
- return `${product}/${"1.0.0"}`;
132314
+ return `${product}/${"1.1.0-nightly.20260626.49.1.6fc150e"}`;
132235
132315
  }
132236
132316
  function getClaudeCodeUserAgent() {
132237
132317
  return getVersionedUserAgent("brewcode-cli");
@@ -140744,27 +140824,27 @@ var init_limits = __esm(() => {
140744
140824
  });
140745
140825
 
140746
140826
  // sdk-missing-stub:./UI.js
140747
- var noop97 = () => null, renderGroupedAgentToolUse, renderToolResultMessage, renderToolUseErrorMessage, renderToolUseMessage, renderToolUseProgressMessage, renderToolUseRejectedMessage, renderToolUseTag, userFacingName, userFacingNameBackgroundColor, getToolUseSummary, renderCreateResultMessage, renderCreateToolUseMessage, renderListResultMessage, renderListToolUseMessage, renderDeleteResultMessage, renderDeleteToolUseMessage, BackgroundHint, renderToolUseQueuedMessage, isResultTruncated;
140827
+ var noop97 = () => null, renderToolResultMessage, renderToolUseMessage, getToolUseSummary, renderToolUseErrorMessage, renderToolUseRejectedMessage, renderGroupedAgentToolUse, renderToolUseProgressMessage, renderToolUseTag, userFacingName, userFacingNameBackgroundColor, BackgroundHint, renderToolUseQueuedMessage, isResultTruncated, renderDeleteResultMessage, renderDeleteToolUseMessage, renderListResultMessage, renderListToolUseMessage, renderCreateResultMessage, renderCreateToolUseMessage;
140748
140828
  var init_UI = __esm(() => {
140749
- renderGroupedAgentToolUse = noop97;
140750
140829
  renderToolResultMessage = noop97;
140751
- renderToolUseErrorMessage = noop97;
140752
140830
  renderToolUseMessage = noop97;
140753
- renderToolUseProgressMessage = noop97;
140831
+ getToolUseSummary = noop97;
140832
+ renderToolUseErrorMessage = noop97;
140754
140833
  renderToolUseRejectedMessage = noop97;
140834
+ renderGroupedAgentToolUse = noop97;
140835
+ renderToolUseProgressMessage = noop97;
140755
140836
  renderToolUseTag = noop97;
140756
140837
  userFacingName = noop97;
140757
140838
  userFacingNameBackgroundColor = noop97;
140758
- getToolUseSummary = noop97;
140759
- renderCreateResultMessage = noop97;
140760
- renderCreateToolUseMessage = noop97;
140761
- renderListResultMessage = noop97;
140762
- renderListToolUseMessage = noop97;
140763
- renderDeleteResultMessage = noop97;
140764
- renderDeleteToolUseMessage = noop97;
140765
140839
  BackgroundHint = noop97;
140766
140840
  renderToolUseQueuedMessage = noop97;
140767
140841
  isResultTruncated = noop97;
140842
+ renderDeleteResultMessage = noop97;
140843
+ renderDeleteToolUseMessage = noop97;
140844
+ renderListResultMessage = noop97;
140845
+ renderListToolUseMessage = noop97;
140846
+ renderCreateResultMessage = noop97;
140847
+ renderCreateToolUseMessage = noop97;
140768
140848
  });
140769
140849
 
140770
140850
  // src/tools/FileReadTool/FileReadTool.ts
@@ -167794,7 +167874,7 @@ function computeFingerprint(messageText, version2) {
167794
167874
  }
167795
167875
  function computeFingerprintFromMessages(messages) {
167796
167876
  const firstMessageText = extractFirstMessageText(messages);
167797
- return computeFingerprint(firstMessageText, "1.0.0");
167877
+ return computeFingerprint(firstMessageText, "1.1.0-nightly.20260626.49.1.6fc150e");
167798
167878
  }
167799
167879
  var FINGERPRINT_SALT = "59cf53e54c78";
167800
167880
  var init_fingerprint = () => {};
@@ -167836,7 +167916,7 @@ async function sideQuery(opts) {
167836
167916
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
167837
167917
  }
167838
167918
  const messageText = extractFirstUserMessageText(messages);
167839
- const fingerprint = computeFingerprint(messageText, "1.0.0");
167919
+ const fingerprint = computeFingerprint(messageText, "1.1.0-nightly.20260626.49.1.6fc150e");
167840
167920
  const attributionHeader = getAttributionHeader(fingerprint);
167841
167921
  const systemBlocks = [
167842
167922
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -169082,7 +169162,7 @@ var init_client2 = __esm(() => {
169082
169162
  const client = new Client({
169083
169163
  name: "claude-code",
169084
169164
  title: "BrewCode",
169085
- version: "1.0.0",
169165
+ version: "1.1.0-nightly.20260626.49.1.6fc150e",
169086
169166
  description: "BrewCode — coding-agent CLI for any LLM provider",
169087
169167
  websiteUrl: PRODUCT_URL
169088
169168
  }, {
@@ -169465,8 +169545,9 @@ var init_client2 = __esm(() => {
169465
169545
  transportType: serverRef.type ?? "stdio",
169466
169546
  ...mcpBaseUrlAnalytics(serverRef)
169467
169547
  });
169468
- logMCPDebug(name, `Connection failed after ${connectionDurationMs}ms: ${errorMessage(error40)}`);
169469
- logMCPError(name, `Connection failed: ${errorMessage(error40)}`);
169548
+ const rawErrorMessage = errorMessage(error40);
169549
+ logMCPDebug(name, `Connection failed after ${connectionDurationMs}ms: ${rawErrorMessage}`);
169550
+ logMCPError(name, `Connection failed: ${rawErrorMessage}`);
169470
169551
  if (inProcessServer) {
169471
169552
  inProcessServer.close().catch(() => {});
169472
169553
  }
@@ -169474,7 +169555,7 @@ var init_client2 = __esm(() => {
169474
169555
  name,
169475
169556
  type: "failed",
169476
169557
  config: serverRef,
169477
- error: errorMessage(error40)
169558
+ error: rawErrorMessage
169478
169559
  };
169479
169560
  }
169480
169561
  }, getServerCacheKey);
@@ -184033,6 +184114,32 @@ function extractPartialResult(messages) {
184033
184114
  }
184034
184115
  return;
184035
184116
  }
184117
+ function getStreamTextDelta(message) {
184118
+ const event = message.event;
184119
+ if (event.type !== "content_block_delta")
184120
+ return;
184121
+ const delta = event.delta;
184122
+ return delta.type === "text_delta" && typeof delta.text === "string" ? delta.text : undefined;
184123
+ }
184124
+ function appendAgentStreamingText(taskId, text, rootSetAppState) {
184125
+ if (!text)
184126
+ return;
184127
+ rootSetAppState((prev) => {
184128
+ const task = prev.tasks[taskId];
184129
+ if (!isLocalAgentTask(task) || !task.retain)
184130
+ return prev;
184131
+ return {
184132
+ ...prev,
184133
+ tasks: {
184134
+ ...prev.tasks,
184135
+ [taskId]: {
184136
+ ...task,
184137
+ streamingText: `${task.streamingText ?? ""}${text}`
184138
+ }
184139
+ }
184140
+ };
184141
+ });
184142
+ }
184036
184143
  async function runAsyncAgentLifecycle({
184037
184144
  taskId,
184038
184145
  abortController,
@@ -184054,7 +184161,10 @@ async function runAsyncAgentLifecycle({
184054
184161
  const { stop } = startAgentSummarization(taskId, asAgentId(taskId), params, rootSetAppState);
184055
184162
  stopSummarization = stop;
184056
184163
  } : undefined;
184057
- for await (const message of makeStream(onCacheSafeParams)) {
184164
+ const onStreamEvent = (message) => {
184165
+ appendAgentStreamingText(taskId, getStreamTextDelta(message), rootSetAppState);
184166
+ };
184167
+ for await (const message of makeStream(onCacheSafeParams, onStreamEvent)) {
184058
184168
  agentMessages.push(message);
184059
184169
  rootSetAppState((prev) => {
184060
184170
  const t = prev.tasks[taskId];
@@ -184065,7 +184175,11 @@ async function runAsyncAgentLifecycle({
184065
184175
  ...prev,
184066
184176
  tasks: {
184067
184177
  ...prev.tasks,
184068
- [taskId]: { ...t, messages: [...base2, message] }
184178
+ [taskId]: {
184179
+ ...t,
184180
+ messages: [...base2, message],
184181
+ streamingText: message.type === "assistant" ? undefined : t.streamingText
184182
+ }
184069
184183
  }
184070
184184
  };
184071
184185
  });
@@ -188561,11 +188675,14 @@ async function* runAgent({
188561
188675
  querySource,
188562
188676
  maxTurns: maxTurns ?? agentDefinition.maxTurns
188563
188677
  })) {
188564
- onQueryProgress?.();
188678
+ onQueryProgress?.(message);
188565
188679
  if (message.type === "stream_event" && message.event.type === "message_start" && message.ttftMs != null) {
188566
188680
  toolUseContext.pushApiMetricsEntry?.(message.ttftMs);
188567
188681
  continue;
188568
188682
  }
188683
+ if (message.type === "stream_event") {
188684
+ continue;
188685
+ }
188569
188686
  if (message.type === "attachment") {
188570
188687
  if (message.attachment.type === "max_turns_reached") {
188571
188688
  logForDebugging(`[Agent
@@ -196061,14 +196178,19 @@ var init_AgentTool = __esm(() => {
196061
196178
  runWithAgentContext(asyncAgentContext, () => wrapWithCwd(() => runAsyncAgentLifecycle({
196062
196179
  taskId: agentBackgroundTask.agentId,
196063
196180
  abortController: agentBackgroundTask.abortController,
196064
- makeStream: (onCacheSafeParams) => runAgent({
196181
+ makeStream: (onCacheSafeParams, onStreamEvent) => runAgent({
196065
196182
  ...runAgentParams,
196066
196183
  override: {
196067
196184
  ...runAgentParams.override,
196068
196185
  agentId: asAgentId(agentBackgroundTask.agentId),
196069
196186
  abortController: agentBackgroundTask.abortController
196070
196187
  },
196071
- onCacheSafeParams
196188
+ onCacheSafeParams,
196189
+ onQueryProgress: (message) => {
196190
+ if (message.type === "stream_event") {
196191
+ onStreamEvent?.(message);
196192
+ }
196193
+ }
196072
196194
  }),
196073
196195
  metadata,
196074
196196
  description,
@@ -235537,7 +235659,7 @@ function getEnterWorktreeToolPrompt() {
235537
235659
 
235538
235660
  ## Behavior
235539
235661
 
235540
- - In a git repository: creates a new git worktree inside \`.claude/worktrees/\` with a new branch based on HEAD
235662
+ - In a git repository: creates a new git worktree inside \`.brewcode/worktrees/\` with a new branch based on HEAD
235541
235663
  - Outside a git repository: delegates to WorktreeCreate/WorktreeRemove hooks for VCS-agnostic isolation
235542
235664
  - Switches the session's working directory to the new worktree
235543
235665
  - Use ExitWorktree to leave the worktree mid-session (keep or remove). On session exit, if still in the worktree, the user will be prompted to keep or remove it
@@ -237903,14 +238025,19 @@ async function resumeAgentBackground({
237903
238025
  runWithAgentContext(asyncAgentContext, () => wrapWithCwd(() => runAsyncAgentLifecycle({
237904
238026
  taskId: agentBackgroundTask.agentId,
237905
238027
  abortController: agentBackgroundTask.abortController,
237906
- makeStream: (onCacheSafeParams) => runAgent({
238028
+ makeStream: (onCacheSafeParams, onStreamEvent) => runAgent({
237907
238029
  ...runAgentParams,
237908
238030
  override: {
237909
238031
  ...runAgentParams.override,
237910
238032
  agentId: asAgentId(agentBackgroundTask.agentId),
237911
238033
  abortController: agentBackgroundTask.abortController
237912
238034
  },
237913
- onCacheSafeParams
238035
+ onCacheSafeParams,
238036
+ onQueryProgress: (message) => {
238037
+ if (message.type === "stream_event") {
238038
+ onStreamEvent?.(message);
238039
+ }
238040
+ }
237914
238041
  }),
237915
238042
  metadata,
237916
238043
  description: uiDescription,
@@ -242857,7 +242984,7 @@ function getAnthropicEnvMetadata() {
242857
242984
  function getBuildAgeMinutes() {
242858
242985
  if (false)
242859
242986
  ;
242860
- const buildTime = new Date("2026-06-26T16:20:16.643Z").getTime();
242987
+ const buildTime = new Date("2026-06-26T23:45:27.034Z").getTime();
242861
242988
  if (isNaN(buildTime))
242862
242989
  return;
242863
242990
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -244790,7 +244917,8 @@ function killAsyncAgent(taskId, setAppState) {
244790
244917
  evictAfter: task.retain ? undefined : Date.now() + PANEL_GRACE_MS,
244791
244918
  abortController: undefined,
244792
244919
  unregisterCleanup: undefined,
244793
- selectedAgent: undefined
244920
+ selectedAgent: undefined,
244921
+ streamingText: undefined
244794
244922
  };
244795
244923
  });
244796
244924
  if (killed) {
@@ -244867,7 +244995,8 @@ function completeAgentTask(result, setAppState) {
244867
244995
  evictAfter: task.retain ? undefined : Date.now() + PANEL_GRACE_MS,
244868
244996
  abortController: undefined,
244869
244997
  unregisterCleanup: undefined,
244870
- selectedAgent: undefined
244998
+ selectedAgent: undefined,
244999
+ streamingText: undefined
244871
245000
  };
244872
245001
  });
244873
245002
  evictTaskOutput(taskId);
@@ -244886,7 +245015,8 @@ function failAgentTask(taskId, error40, setAppState) {
244886
245015
  evictAfter: task.retain ? undefined : Date.now() + PANEL_GRACE_MS,
244887
245016
  abortController: undefined,
244888
245017
  unregisterCleanup: undefined,
244889
- selectedAgent: undefined
245018
+ selectedAgent: undefined,
245019
+ streamingText: undefined
244890
245020
  };
244891
245021
  });
244892
245022
  evictTaskOutput(taskId);
@@ -276305,7 +276435,7 @@ var init_sessionStorage = __esm(() => {
276305
276435
  init_settings2();
276306
276436
  init_slowOperations();
276307
276437
  init_uuid();
276308
- VERSION3 = typeof MACRO !== "undefined" ? "1.0.0" : "unknown";
276438
+ VERSION3 = typeof MACRO !== "undefined" ? "1.1.0-nightly.20260626.49.1.6fc150e" : "unknown";
276309
276439
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
276310
276440
  SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
276311
276441
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -276868,7 +276998,7 @@ function isDangerousFilePathToAutoEdit(path13) {
276868
276998
  if (normalizedSegment !== normalizeCaseForComparison(dir)) {
276869
276999
  continue;
276870
277000
  }
276871
- if (dir === ".claude") {
277001
+ if (dir === ".brewcode") {
276872
277002
  const nextSegment = pathSegments[i3 + 1];
276873
277003
  if (nextSegment && normalizeCaseForComparison(nextSegment) === "worktrees") {
276874
277004
  break;
@@ -277600,7 +277730,7 @@ var init_filesystem = __esm(() => {
277600
277730
  });
277601
277731
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
277602
277732
  const nonce = randomBytes7(16).toString("hex");
277603
- return join79(getClaudeTempDir(), "bundled-skills", "1.0.0", nonce);
277733
+ return join79(getClaudeTempDir(), "bundled-skills", "1.1.0-nightly.20260626.49.1.6fc150e", nonce);
277604
277734
  });
277605
277735
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
277606
277736
  });
@@ -283009,7 +283139,7 @@ async function withGitWorktreeMutationLock(repoRoot, fn) {
283009
283139
  }
283010
283140
  }
283011
283141
  function worktreesDir(repoRoot) {
283012
- return join82(repoRoot, ".claude", "worktrees");
283142
+ return join82(repoRoot, ".brewcode", "worktrees");
283013
283143
  }
283014
283144
  function flattenSlug(slug) {
283015
283145
  return slug.replaceAll("/", "+");
@@ -293618,7 +293748,7 @@ function buildSystemInitMessage(inputs) {
293618
293748
  slash_commands: inputs.commands.filter((c7) => c7.userInvocable !== false).map((c7) => c7.name),
293619
293749
  apiKeySource: getAnthropicApiKeyWithSource().source,
293620
293750
  betas: getSdkBetas(),
293621
- claude_code_version: "1.0.0",
293751
+ claude_code_version: "1.1.0-nightly.20260626.49.1.6fc150e",
293622
293752
  output_style: outputStyle,
293623
293753
  agents: inputs.agents.map((agent2) => agent2.agentType),
293624
293754
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -297259,4 +297389,4 @@ export {
297259
297389
  AbortError
297260
297390
  };
297261
297391
 
297262
- //# debugId=BB7C1654813E008564756E2164756E21
297392
+ //# debugId=36D04A84049A578A64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brewcode-cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-nightly.20260626.49.1.6fc150e",
4
4
  "description": "BrewCode command-line interface.",
5
5
  "type": "module",
6
6
  "main": "dist/cli.mjs",