@opencow-ai/opencow-agent-sdk 0.4.15 → 0.4.17

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/dist/client.js CHANGED
@@ -26189,7 +26189,6 @@ var init_envVars = __esm(() => {
26189
26189
  MEMORY_EXTRA_GUIDELINES: envVar("OPENCOW_MEMORY_EXTRA_GUIDELINES", "CLAUDE_COWORK_MEMORY_EXTRA_GUIDELINES"),
26190
26190
  MEMORY_PATH_OVERRIDE: envVar("OPENCOW_MEMORY_PATH_OVERRIDE", "CLAUDE_COWORK_MEMORY_PATH_OVERRIDE"),
26191
26191
  DEBUG_INPUT: envVar("OPENCOW_DEBUG_INPUT"),
26192
- DISABLE_CO_AUTHORED_BY: envVar("OPENCOW_DISABLE_CO_AUTHORED_BY"),
26193
26192
  DISABLE_EARLY_INPUT: envVar("OPENCOW_DISABLE_EARLY_INPUT"),
26194
26193
  ENABLE_EXTENDED_KEYS: envVar("OPENCOW_ENABLE_EXTENDED_KEYS"),
26195
26194
  USE_READABLE_STDIN: envVar("OPENCOW_USE_READABLE_STDIN")
@@ -44651,8 +44650,6 @@ function hasPrefix(src, prefix, at, end) {
44651
44650
  return end - at >= prefix.length && src.compare(prefix, 0, prefix.length, at, at + prefix.length) === 0;
44652
44651
  }
44653
44652
  function processStraddle(s, chunk, bytesRead) {
44654
- s.straddleSnapCarryLen = 0;
44655
- s.straddleSnapTailEnd = 0;
44656
44653
  if (s.carryLen === 0)
44657
44654
  return 0;
44658
44655
  const cb = s.carryBuf;
@@ -44660,11 +44657,7 @@ function processStraddle(s, chunk, bytesRead) {
44660
44657
  if (firstNl === -1 || firstNl >= bytesRead)
44661
44658
  return 0;
44662
44659
  const tailEnd = firstNl + 1;
44663
- if (hasPrefix(cb, ATTR_SNAP_PREFIX, 0, s.carryLen)) {
44664
- s.straddleSnapCarryLen = s.carryLen;
44665
- s.straddleSnapTailEnd = tailEnd;
44666
- s.lastSnapSrc = null;
44667
- } else if (s.carryLen < ATTR_SNAP_PREFIX.length) {
44660
+ if (hasPrefix(cb, ATTR_SNAP_PREFIX, 0, s.carryLen)) {} else if (s.carryLen < ATTR_SNAP_PREFIX.length) {
44668
44661
  return 0;
44669
44662
  } else {
44670
44663
  if (hasPrefix(cb, SYSTEM_PREFIX, 0, s.carryLen)) {
@@ -44675,7 +44668,6 @@ function processStraddle(s, chunk, bytesRead) {
44675
44668
  s.out.len = 0;
44676
44669
  s.boundaryStartOffset = s.bufFileOff;
44677
44670
  s.hasPreservedSegment = false;
44678
- s.lastSnapSrc = null;
44679
44671
  }
44680
44672
  }
44681
44673
  sinkWrite(s.out, cb, 0, s.carryLen);
@@ -44689,8 +44681,6 @@ function scanChunkLines(s, buf, boundaryMarker) {
44689
44681
  let boundaryAt = buf.indexOf(boundaryMarker);
44690
44682
  let runStart = 0;
44691
44683
  let lineStart = 0;
44692
- let lastSnapStart = -1;
44693
- let lastSnapEnd = -1;
44694
44684
  let nl = buf.indexOf(LF2);
44695
44685
  while (nl !== -1) {
44696
44686
  const lineEnd = nl + 1;
@@ -44699,8 +44689,6 @@ function scanChunkLines(s, buf, boundaryMarker) {
44699
44689
  }
44700
44690
  if (hasPrefix(buf, ATTR_SNAP_PREFIX, lineStart, lineEnd)) {
44701
44691
  sinkWrite(s.out, buf, runStart, lineStart);
44702
- lastSnapStart = lineStart;
44703
- lastSnapEnd = lineEnd;
44704
44692
  runStart = lineEnd;
44705
44693
  } else if (boundaryAt >= lineStart && boundaryAt < Math.min(lineStart + BOUNDARY_SEARCH_BOUND, lineEnd)) {
44706
44694
  const hit = parseBoundaryLine(buf.toString("utf-8", lineStart, nl));
@@ -44710,9 +44698,6 @@ function scanChunkLines(s, buf, boundaryMarker) {
44710
44698
  s.out.len = 0;
44711
44699
  s.boundaryStartOffset = s.bufFileOff + lineStart;
44712
44700
  s.hasPreservedSegment = false;
44713
- s.lastSnapSrc = null;
44714
- lastSnapStart = -1;
44715
- s.straddleSnapCarryLen = 0;
44716
44701
  runStart = lineStart;
44717
44702
  }
44718
44703
  boundaryAt = buf.indexOf(boundaryMarker, boundaryAt + boundaryMarker.length);
@@ -44721,25 +44706,7 @@ function scanChunkLines(s, buf, boundaryMarker) {
44721
44706
  nl = buf.indexOf(LF2, lineStart);
44722
44707
  }
44723
44708
  sinkWrite(s.out, buf, runStart, lineStart);
44724
- return { lastSnapStart, lastSnapEnd, trailStart: lineStart };
44725
- }
44726
- function captureSnap(s, buf, chunk, lastSnapStart, lastSnapEnd) {
44727
- if (lastSnapStart !== -1) {
44728
- s.lastSnapLen = lastSnapEnd - lastSnapStart;
44729
- if (s.lastSnapBuf === undefined || s.lastSnapLen > s.lastSnapBuf.length) {
44730
- s.lastSnapBuf = Buffer.allocUnsafe(s.lastSnapLen);
44731
- }
44732
- buf.copy(s.lastSnapBuf, 0, lastSnapStart, lastSnapEnd);
44733
- s.lastSnapSrc = s.lastSnapBuf;
44734
- } else if (s.straddleSnapCarryLen > 0) {
44735
- s.lastSnapLen = s.straddleSnapCarryLen + s.straddleSnapTailEnd;
44736
- if (s.lastSnapBuf === undefined || s.lastSnapLen > s.lastSnapBuf.length) {
44737
- s.lastSnapBuf = Buffer.allocUnsafe(s.lastSnapLen);
44738
- }
44739
- s.carryBuf.copy(s.lastSnapBuf, 0, 0, s.straddleSnapCarryLen);
44740
- chunk.copy(s.lastSnapBuf, s.straddleSnapCarryLen, 0, s.straddleSnapTailEnd);
44741
- s.lastSnapSrc = s.lastSnapBuf;
44742
- }
44709
+ return { trailStart: lineStart };
44743
44710
  }
44744
44711
  function captureCarry(s, buf, trailStart) {
44745
44712
  s.carryLen = buf.length - trailStart;
@@ -44753,19 +44720,10 @@ function captureCarry(s, buf, trailStart) {
44753
44720
  function finalizeOutput(s) {
44754
44721
  if (s.carryLen > 0) {
44755
44722
  const cb = s.carryBuf;
44756
- if (hasPrefix(cb, ATTR_SNAP_PREFIX, 0, s.carryLen)) {
44757
- s.lastSnapSrc = cb;
44758
- s.lastSnapLen = s.carryLen;
44759
- } else {
44723
+ if (!hasPrefix(cb, ATTR_SNAP_PREFIX, 0, s.carryLen)) {
44760
44724
  sinkWrite(s.out, cb, 0, s.carryLen);
44761
44725
  }
44762
44726
  }
44763
- if (s.lastSnapSrc) {
44764
- if (s.out.len > 0 && s.out.buf[s.out.len - 1] !== LF2) {
44765
- sinkWrite(s.out, LF_BYTE, 0, 1);
44766
- }
44767
- sinkWrite(s.out, s.lastSnapSrc, 0, s.lastSnapLen);
44768
- }
44769
44727
  }
44770
44728
  async function readTranscriptForLoad(filePath, fileSize) {
44771
44729
  const boundaryMarker = compactBoundaryMarker();
@@ -44774,18 +44732,13 @@ async function readTranscriptForLoad(filePath, fileSize) {
44774
44732
  out: {
44775
44733
  buf: Buffer.allocUnsafe(Math.min(fileSize, 8 * 1024 * 1024)),
44776
44734
  len: 0,
44777
- cap: fileSize + 1
44735
+ cap: fileSize
44778
44736
  },
44779
44737
  boundaryStartOffset: 0,
44780
44738
  hasPreservedSegment: false,
44781
- lastSnapSrc: null,
44782
- lastSnapLen: 0,
44783
- lastSnapBuf: undefined,
44784
44739
  bufFileOff: 0,
44785
44740
  carryLen: 0,
44786
- carryBuf: undefined,
44787
- straddleSnapCarryLen: 0,
44788
- straddleSnapTailEnd: 0
44741
+ carryBuf: undefined
44789
44742
  };
44790
44743
  const chunk = Buffer.allocUnsafe(CHUNK_SIZE);
44791
44744
  const fd = await fsOpen(filePath, "r");
@@ -44807,7 +44760,6 @@ async function readTranscriptForLoad(filePath, fileSize) {
44807
44760
  buf = chunk.subarray(chunkOff, bytesRead);
44808
44761
  }
44809
44762
  const r = scanChunkLines(s, buf, boundaryMarker);
44810
- captureSnap(s, buf, chunk, r.lastSnapStart, r.lastSnapEnd);
44811
44763
  captureCarry(s, buf, r.trailStart);
44812
44764
  s.bufFileOff += r.trailStart;
44813
44765
  }
@@ -44821,7 +44773,7 @@ async function readTranscriptForLoad(filePath, fileSize) {
44821
44773
  hasPreservedSegment: s.hasPreservedSegment
44822
44774
  };
44823
44775
  }
44824
- var LITE_READ_BUF_SIZE = 65536, MAX_SANITIZED_LENGTH = 200, TRANSCRIPT_READ_CHUNK_SIZE, SKIP_PRECOMPACT_THRESHOLD, _compactBoundaryMarker, ATTR_SNAP_PREFIX, SYSTEM_PREFIX, LF2 = 10, LF_BYTE, BOUNDARY_SEARCH_BOUND = 256;
44776
+ var LITE_READ_BUF_SIZE = 65536, MAX_SANITIZED_LENGTH = 200, TRANSCRIPT_READ_CHUNK_SIZE, SKIP_PRECOMPACT_THRESHOLD, _compactBoundaryMarker, ATTR_SNAP_PREFIX, SYSTEM_PREFIX, LF2 = 10, BOUNDARY_SEARCH_BOUND = 256;
44825
44777
  var init_sessionStoragePortable = __esm(() => {
44826
44778
  init_state2();
44827
44779
  init_getWorktreePathsPortable();
@@ -44829,7 +44781,6 @@ var init_sessionStoragePortable = __esm(() => {
44829
44781
  SKIP_PRECOMPACT_THRESHOLD = 5 * 1024 * 1024;
44830
44782
  ATTR_SNAP_PREFIX = Buffer.from('{"type":"attribution-snapshot"');
44831
44783
  SYSTEM_PREFIX = Buffer.from('{"type":"system"');
44832
- LF_BYTE = Buffer.from([LF2]);
44833
44784
  });
44834
44785
 
44835
44786
  // src/lib/path.ts
@@ -46062,21 +46013,6 @@ async function readWorktreeHeadSha(worktreePath) {
46062
46013
  }
46063
46014
  return head.sha;
46064
46015
  }
46065
- async function getRemoteUrlForDir(cwd) {
46066
- const gitDir = await resolveGitDir(cwd);
46067
- if (!gitDir) {
46068
- return null;
46069
- }
46070
- const url2 = await parseGitConfigValue(gitDir, "remote", "origin", "url");
46071
- if (url2) {
46072
- return url2;
46073
- }
46074
- const commonDir = await getCommonDir(gitDir);
46075
- if (commonDir && commonDir !== gitDir) {
46076
- return parseGitConfigValue(commonDir, "remote", "origin", "url");
46077
- }
46078
- return null;
46079
- }
46080
46016
  var resolveGitDirCache, WATCH_INTERVAL_MS = 1000, gitWatcher;
46081
46017
  var init_gitFilesystem = __esm(() => {
46082
46018
  init_state();
@@ -63886,11 +63822,6 @@ var init_types5 = __esm(() => {
63886
63822
  respectGitignore: exports_external2.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). " + "Note: .ignore files are always respected."),
63887
63823
  cleanupPeriodDays: exports_external2.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),
63888
63824
  env: EnvironmentVariablesSchema().optional().describe("Environment variables to set for Claude Code sessions"),
63889
- attribution: exports_external2.object({
63890
- commit: exports_external2.string().optional().describe("Attribution text for git commits, including any trailers. " + "Empty string hides attribution."),
63891
- pr: exports_external2.string().optional().describe("Attribution text for pull request descriptions. " + "Empty string hides attribution.")
63892
- }).optional().describe("Customize attribution text for commits and PRs. " + "Each field defaults to the standard Claude Code attribution if not set."),
63893
- includeCoAuthoredBy: exports_external2.boolean().optional().describe("Deprecated: Use attribution instead. " + "Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),
63894
63825
  includeGitInstructions: exports_external2.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),
63895
63826
  permissions: PermissionsSchema().optional().describe("Tool usage permissions configuration"),
63896
63827
  model: exports_external2.string().optional().describe("Override the default model used by Claude Code"),
@@ -64093,7 +64024,7 @@ var init_validationTips = __esm(() => {
64093
64024
  {
64094
64025
  matches: (ctx) => ctx.code === "invalid_type" && ctx.expected === "boolean",
64095
64026
  tip: {
64096
- suggestion: 'Use true or false without quotes. Example: "includeCoAuthoredBy": true'
64027
+ suggestion: 'Use true or false without quotes. Example: "includeGitInstructions": true'
64097
64028
  }
64098
64029
  },
64099
64030
  {
@@ -69436,13 +69367,6 @@ function renderModelName(model) {
69436
69367
  }
69437
69368
  return model;
69438
69369
  }
69439
- function getPublicModelName(model) {
69440
- const publicName = getPublicModelDisplayName(model);
69441
- if (publicName) {
69442
- return `Claude ${publicName}`;
69443
- }
69444
- return `Claude (${model})`;
69445
- }
69446
69370
  function parseUserSpecifiedModel(modelInput) {
69447
69371
  const modelInputTrimmed = modelInput.trim();
69448
69372
  const normalizedModel = modelInputTrimmed.toLowerCase();
@@ -108847,7 +108771,6 @@ __export(exports_sessionStorage, {
108847
108771
  recordContextCollapseSnapshot: () => recordContextCollapseSnapshot,
108848
108772
  recordContextCollapseCommit: () => recordContextCollapseCommit,
108849
108773
  recordContentReplacement: () => recordContentReplacement,
108850
- recordAttributionSnapshot: () => recordAttributionSnapshot,
108851
108774
  readRemoteAgentMetadata: () => readRemoteAgentMetadata,
108852
108775
  readAgentMetadata: () => readAgentMetadata,
108853
108776
  reAppendSessionMetadata: () => reAppendSessionMetadata,
@@ -109509,11 +109432,6 @@ class Project {
109509
109432
  await this.appendEntry(queueOp);
109510
109433
  });
109511
109434
  }
109512
- async insertAttributionSnapshot(snapshot) {
109513
- return this.trackWrite(async () => {
109514
- await this.appendEntry(snapshot);
109515
- });
109516
- }
109517
109435
  async insertContentReplacement(replacements2, agentId) {
109518
109436
  return this.trackWrite(async () => {
109519
109437
  const entry = {
@@ -109569,8 +109487,6 @@ class Project {
109569
109487
  this.enqueueWrite(sessionFile, entry);
109570
109488
  } else if (entry.type === "file-history-snapshot") {
109571
109489
  this.enqueueWrite(sessionFile, entry);
109572
- } else if (entry.type === "attribution-snapshot") {
109573
- this.enqueueWrite(sessionFile, entry);
109574
109490
  } else if (entry.type === "speculation-accept") {
109575
109491
  this.enqueueWrite(sessionFile, entry);
109576
109492
  } else if (entry.type === "mode") {
@@ -109713,9 +109629,6 @@ async function removeTranscriptMessage(targetUuid) {
109713
109629
  async function recordFileHistorySnapshot(messageId, snapshot, isSnapshotUpdate) {
109714
109630
  await getProject().insertFileHistorySnapshot(messageId, snapshot, isSnapshotUpdate);
109715
109631
  }
109716
- async function recordAttributionSnapshot(snapshot) {
109717
- await getProject().insertAttributionSnapshot(snapshot);
109718
- }
109719
109632
  async function recordContentReplacement(replacements2, agentId) {
109720
109633
  await getProject().insertContentReplacement(replacements2, agentId);
109721
109634
  }
@@ -110391,9 +110304,6 @@ function buildFileHistorySnapshotChain(fileHistorySnapshots, conversation) {
110391
110304
  }
110392
110305
  return snapshots;
110393
110306
  }
110394
- function buildAttributionSnapshotChain(attributionSnapshots, _conversation) {
110395
- return Array.from(attributionSnapshots.values());
110396
- }
110397
110307
  async function loadTranscriptFromFile(filePath) {
110398
110308
  if (filePath.endsWith(".jsonl")) {
110399
110309
  const {
@@ -110402,7 +110312,6 @@ async function loadTranscriptFromFile(filePath) {
110402
110312
  customTitles,
110403
110313
  tags,
110404
110314
  fileHistorySnapshots,
110405
- attributionSnapshots,
110406
110315
  contextCollapseCommits,
110407
110316
  contextCollapseSnapshot,
110408
110317
  leafUuids,
@@ -110422,7 +110331,7 @@ async function loadTranscriptFromFile(filePath) {
110422
110331
  const tag = tags.get(leafMessage.sessionId);
110423
110332
  const sessionId = leafMessage.sessionId;
110424
110333
  return {
110425
- ...convertToLogOption(transcript, 0, summary, customTitle, buildFileHistorySnapshotChain(fileHistorySnapshots, transcript), tag, filePath, buildAttributionSnapshotChain(attributionSnapshots, transcript), undefined, contentReplacements.get(sessionId) ?? []),
110334
+ ...convertToLogOption(transcript, 0, summary, customTitle, buildFileHistorySnapshotChain(fileHistorySnapshots, transcript), tag, filePath, undefined, contentReplacements.get(sessionId) ?? []),
110426
110335
  contextCollapseCommits: contextCollapseCommits.filter((e) => e.sessionId === sessionId),
110427
110336
  contextCollapseSnapshot: contextCollapseSnapshot?.sessionId === sessionId ? contextCollapseSnapshot : undefined,
110428
110337
  worktreeSession: worktreeStates.has(sessionId) ? worktreeStates.get(sessionId) : undefined
@@ -110494,7 +110403,7 @@ function countVisibleMessages(transcript) {
110494
110403
  }
110495
110404
  return count3;
110496
110405
  }
110497
- function convertToLogOption(transcript, value = 0, summary, customTitle, fileHistorySnapshots, tag, fullPath, attributionSnapshots, agentSetting, contentReplacements) {
110406
+ function convertToLogOption(transcript, value = 0, summary, customTitle, fileHistorySnapshots, tag, fullPath, agentSetting, contentReplacements) {
110498
110407
  const lastMessage = transcript.at(-1);
110499
110408
  const firstMessage = transcript[0];
110500
110409
  const firstPrompt = extractFirstPrompt(transcript);
@@ -110518,7 +110427,6 @@ function convertToLogOption(transcript, value = 0, summary, customTitle, fileHis
110518
110427
  customTitle,
110519
110428
  tag,
110520
110429
  fileHistorySnapshots,
110521
- attributionSnapshots,
110522
110430
  contentReplacements,
110523
110431
  gitBranch: lastMessage.gitBranch,
110524
110432
  projectPath: firstMessage.cwd
@@ -110781,7 +110689,6 @@ async function loadFullLog(log) {
110781
110689
  modes,
110782
110690
  worktreeStates,
110783
110691
  fileHistorySnapshots,
110784
- attributionSnapshots,
110785
110692
  contentReplacements,
110786
110693
  contextCollapseCommits,
110787
110694
  contextCollapseSnapshot,
@@ -110817,7 +110724,6 @@ async function loadFullLog(log) {
110817
110724
  teamName: transcript[0]?.teamName ?? log.teamName,
110818
110725
  leafUuid: mostRecentLeaf?.uuid ?? log.leafUuid,
110819
110726
  fileHistorySnapshots: buildFileHistorySnapshotChain(fileHistorySnapshots, transcript),
110820
- attributionSnapshots: buildAttributionSnapshotChain(attributionSnapshots, transcript),
110821
110727
  contentReplacements: sessionId ? contentReplacements.get(sessionId) ?? [] : log.contentReplacements,
110822
110728
  contextCollapseCommits: sessionId ? contextCollapseCommits.filter((e) => e.sessionId === sessionId) : undefined,
110823
110729
  contextCollapseSnapshot: sessionId && contextCollapseSnapshot?.sessionId === sessionId ? contextCollapseSnapshot : undefined
@@ -111070,7 +110976,6 @@ async function loadTranscriptFile(filePath, opts) {
111070
110976
  const modes = new Map;
111071
110977
  const worktreeStates = new Map;
111072
110978
  const fileHistorySnapshots = new Map;
111073
- const attributionSnapshots = new Map;
111074
110979
  const contentReplacements = new Map;
111075
110980
  const agentContentReplacements = new Map;
111076
110981
  const contextCollapseCommits = [];
@@ -111157,8 +111062,6 @@ async function loadTranscriptFile(filePath, opts) {
111157
111062
  prRepositories.set(entry.sessionId, entry.prRepository);
111158
111063
  } else if (entry.type === "file-history-snapshot") {
111159
111064
  fileHistorySnapshots.set(entry.messageId, entry);
111160
- } else if (entry.type === "attribution-snapshot") {
111161
- attributionSnapshots.set(entry.messageId, entry);
111162
111065
  } else if (entry.type === "content-replacement") {
111163
111066
  if (entry.agentId) {
111164
111067
  const existing = agentContentReplacements.get(entry.agentId) ?? [];
@@ -111248,7 +111151,6 @@ async function loadTranscriptFile(filePath, opts) {
111248
111151
  modes,
111249
111152
  worktreeStates,
111250
111153
  fileHistorySnapshots,
111251
- attributionSnapshots,
111252
111154
  contentReplacements,
111253
111155
  agentContentReplacements,
111254
111156
  contextCollapseCommits,
@@ -111276,7 +111178,6 @@ async function getLastSessionLog(sessionId) {
111276
111178
  agentSettings,
111277
111179
  worktreeStates,
111278
111180
  fileHistorySnapshots,
111279
- attributionSnapshots,
111280
111181
  contentReplacements,
111281
111182
  contextCollapseCommits,
111282
111183
  contextCollapseSnapshot
@@ -111295,7 +111196,7 @@ async function getLastSessionLog(sessionId) {
111295
111196
  const tag = tags.get(lastMessage.sessionId);
111296
111197
  const agentSetting = agentSettings.get(sessionId);
111297
111198
  return {
111298
- ...convertToLogOption(transcript, 0, summary, customTitle, buildFileHistorySnapshotChain(fileHistorySnapshots, transcript), tag, getTranscriptPathForSession(sessionId), buildAttributionSnapshotChain(attributionSnapshots, transcript), agentSetting, contentReplacements.get(sessionId) ?? []),
111199
+ ...convertToLogOption(transcript, 0, summary, customTitle, buildFileHistorySnapshotChain(fileHistorySnapshots, transcript), tag, getTranscriptPathForSession(sessionId), agentSetting, contentReplacements.get(sessionId) ?? []),
111299
111200
  worktreeSession: worktreeStates.get(sessionId),
111300
111201
  contextCollapseCommits: contextCollapseCommits.filter((e) => e.sessionId === sessionId),
111301
111202
  contextCollapseSnapshot: contextCollapseSnapshot?.sessionId === sessionId ? contextCollapseSnapshot : undefined
@@ -111639,7 +111540,6 @@ async function loadAllLogsFromSessionFile(sessionFile, projectPathOverride) {
111639
111540
  prRepositories,
111640
111541
  modes,
111641
111542
  fileHistorySnapshots,
111642
- attributionSnapshots,
111643
111543
  contentReplacements,
111644
111544
  leafUuids
111645
111545
  } = await loadTranscriptFile(sessionFile, { keepAllLeaves: true });
@@ -111696,7 +111596,6 @@ async function loadAllLogsFromSessionFile(sessionFile, projectPathOverride) {
111696
111596
  gitBranch: leafMessage.gitBranch,
111697
111597
  projectPath: projectPathOverride ?? firstMessage.cwd,
111698
111598
  fileHistorySnapshots: buildFileHistorySnapshotChain(fileHistorySnapshots, chain),
111699
- attributionSnapshots: buildAttributionSnapshotChain(attributionSnapshots, chain),
111700
111599
  contentReplacements: contentReplacements.get(sessionId) ?? []
111701
111600
  });
111702
111601
  }
@@ -233510,173 +233409,6 @@ var init_promptSuggestion = __esm(() => {
233510
233409
  };
233511
233410
  });
233512
233411
 
233513
- // src/capabilities/generatedFiles.ts
233514
- var EXCLUDED_FILENAMES, EXCLUDED_EXTENSIONS;
233515
- var init_generatedFiles = __esm(() => {
233516
- EXCLUDED_FILENAMES = new Set([
233517
- "package-lock.json",
233518
- "yarn.lock",
233519
- "pnpm-lock.yaml",
233520
- "bun.lockb",
233521
- "bun.lock",
233522
- "composer.lock",
233523
- "gemfile.lock",
233524
- "cargo.lock",
233525
- "poetry.lock",
233526
- "pipfile.lock",
233527
- "shrinkwrap.json",
233528
- "npm-shrinkwrap.json"
233529
- ]);
233530
- EXCLUDED_EXTENSIONS = new Set([
233531
- ".lock",
233532
- ".min.js",
233533
- ".min.css",
233534
- ".min.html",
233535
- ".bundle.js",
233536
- ".bundle.css",
233537
- ".generated.ts",
233538
- ".generated.js",
233539
- ".d.ts"
233540
- ]);
233541
- });
233542
-
233543
- // src/lib/sequential.ts
233544
- function sequential(fn) {
233545
- const queue2 = [];
233546
- let processing = false;
233547
- async function processQueue() {
233548
- if (processing)
233549
- return;
233550
- if (queue2.length === 0)
233551
- return;
233552
- processing = true;
233553
- while (queue2.length > 0) {
233554
- const { args, resolve: resolve15, reject: reject2, context: context3 } = queue2.shift();
233555
- try {
233556
- const result = await fn.apply(context3, args);
233557
- resolve15(result);
233558
- } catch (error41) {
233559
- reject2(error41);
233560
- }
233561
- }
233562
- processing = false;
233563
- if (queue2.length > 0) {
233564
- processQueue();
233565
- }
233566
- }
233567
- return function(...args) {
233568
- return new Promise((resolve15, reject2) => {
233569
- queue2.push({ args, resolve: resolve15, reject: reject2, context: this });
233570
- processQueue();
233571
- });
233572
- };
233573
- }
233574
-
233575
- // src/session/commitAttribution.ts
233576
- function getAttributionRepoRoot() {
233577
- const cwd = getCwd3();
233578
- return findGitRoot(cwd) ?? getOriginalCwd();
233579
- }
233580
- function getRepoClassCached() {
233581
- return repoClassCache.get(getAttributionRepoRoot()) ?? null;
233582
- }
233583
- function isInternalModelRepoCached() {
233584
- return getRepoClassCached() === "internal";
233585
- }
233586
- function getClientSurface() {
233587
- return resolveEnvVar("ENTRYPOINT") ?? "cli";
233588
- }
233589
- function createEmptyAttributionState() {
233590
- return {
233591
- fileStates: new Map,
233592
- sessionBaselines: new Map,
233593
- surface: getClientSurface(),
233594
- startingHeadSha: null,
233595
- promptCount: 0,
233596
- promptCountAtLastCommit: 0,
233597
- permissionPromptCount: 0,
233598
- permissionPromptCountAtLastCommit: 0,
233599
- escapeCount: 0,
233600
- escapeCountAtLastCommit: 0
233601
- };
233602
- }
233603
- var INTERNAL_MODEL_REPOS, repoClassCache, isInternalModelRepo;
233604
- var init_commitAttribution = __esm(() => {
233605
- init_state();
233606
- init_cwd2();
233607
- init_debug();
233608
- init_execFileNoThrow();
233609
- init_fsOperations();
233610
- init_generatedFiles();
233611
- init_gitFilesystem();
233612
- init_git();
233613
- init_log2();
233614
- init_model();
233615
- init_state2();
233616
- INTERNAL_MODEL_REPOS = [
233617
- "github.com:anthropics/claude-cli-internal",
233618
- "github.com/anthropics/claude-cli-internal",
233619
- "github.com:anthropics/anthropic",
233620
- "github.com/anthropics/anthropic",
233621
- "github.com:anthropics/apps",
233622
- "github.com/anthropics/apps",
233623
- "github.com:anthropics/casino",
233624
- "github.com/anthropics/casino",
233625
- "github.com:anthropics/dbt",
233626
- "github.com/anthropics/dbt",
233627
- "github.com:anthropics/dotfiles",
233628
- "github.com/anthropics/dotfiles",
233629
- "github.com:anthropics/terraform-config",
233630
- "github.com/anthropics/terraform-config",
233631
- "github.com:anthropics/hex-export",
233632
- "github.com/anthropics/hex-export",
233633
- "github.com:anthropics/feedback-v2",
233634
- "github.com/anthropics/feedback-v2",
233635
- "github.com:anthropics/labs",
233636
- "github.com/anthropics/labs",
233637
- "github.com:anthropics/argo-rollouts",
233638
- "github.com/anthropics/argo-rollouts",
233639
- "github.com:anthropics/starling-configs",
233640
- "github.com/anthropics/starling-configs",
233641
- "github.com:anthropics/ts-tools",
233642
- "github.com/anthropics/ts-tools",
233643
- "github.com:anthropics/ts-capsules",
233644
- "github.com/anthropics/ts-capsules",
233645
- "github.com:anthropics/feldspar-testing",
233646
- "github.com/anthropics/feldspar-testing",
233647
- "github.com:anthropics/trellis",
233648
- "github.com/anthropics/trellis",
233649
- "github.com:anthropics/claude-for-hiring",
233650
- "github.com/anthropics/claude-for-hiring",
233651
- "github.com:anthropics/forge-web",
233652
- "github.com/anthropics/forge-web",
233653
- "github.com:anthropics/infra-manifests",
233654
- "github.com/anthropics/infra-manifests",
233655
- "github.com:anthropics/mycro_manifests",
233656
- "github.com/anthropics/mycro_manifests",
233657
- "github.com:anthropics/mycro_configs",
233658
- "github.com/anthropics/mycro_configs",
233659
- "github.com:anthropics/mobile-apps",
233660
- "github.com/anthropics/mobile-apps"
233661
- ];
233662
- repoClassCache = new Map;
233663
- isInternalModelRepo = sequential(async () => {
233664
- const cwd = getAttributionRepoRoot();
233665
- const cached2 = repoClassCache.get(cwd);
233666
- if (cached2 !== undefined) {
233667
- return cached2 === "internal";
233668
- }
233669
- const remoteUrl = await getRemoteUrlForDir(cwd);
233670
- if (!remoteUrl) {
233671
- repoClassCache.set(cwd, "none");
233672
- return false;
233673
- }
233674
- const isInternal = INTERNAL_MODEL_REPOS.some((repo) => remoteUrl.includes(repo));
233675
- repoClassCache.set(cwd, isInternal ? "internal" : "external");
233676
- return isInternal;
233677
- });
233678
- });
233679
-
233680
233412
  // src/state/AppStateStore.ts
233681
233413
  function getDefaultAppState() {
233682
233414
  const teammateUtils = (init_teammate(), __toCommonJS(exports_teammate));
@@ -233724,7 +233456,6 @@ function getDefaultAppState() {
233724
233456
  trackedFiles: new Set,
233725
233457
  snapshotSequence: 0
233726
233458
  },
233727
- attribution: createEmptyAttributionState(),
233728
233459
  mcp: {
233729
233460
  clients: [],
233730
233461
  tools: [],
@@ -233787,7 +233518,6 @@ var IDLE_SPECULATION_STATE;
233787
233518
  var init_AppStateStore = __esm(() => {
233788
233519
  init_promptSuggestion();
233789
233520
  init_Tool();
233790
- init_commitAttribution();
233791
233521
  init_settings2();
233792
233522
  init_thinking();
233793
233523
  IDLE_SPECULATION_STATE = { status: "idle" };
@@ -254794,7 +254524,7 @@ var init_GlobTool = __esm(() => {
254794
254524
  } = lazyUI("Glob"));
254795
254525
  inputSchema9 = lazySchema(() => exports_external2.strictObject({
254796
254526
  pattern: exports_external2.preprocess((value) => typeof value === "string" && value.trim().length === 0 ? undefined : value, exports_external2.string().default(DEFAULT_GLOB_PATTERN).describe('The glob pattern to match files against. Defaults to "*" when omitted.')),
254797
- path: exports_external2.string().optional().describe('The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.')
254527
+ path: exports_external2.string().optional().describe("Optional directory path to search. Omit this field to use the current working directory.")
254798
254528
  }));
254799
254529
  outputSchema8 = lazySchema(() => exports_external2.object({
254800
254530
  durationMs: exports_external2.number().describe("Time taken to execute the search in milliseconds"),
@@ -254943,6 +254673,18 @@ var init_semanticNumber = __esm(() => {
254943
254673
  });
254944
254674
 
254945
254675
  // src/capabilities/tools/GrepTool/GrepTool.ts
254676
+ function grepBoolean(inner) {
254677
+ return exports_external2.preprocess((value) => {
254678
+ if (typeof value === "string") {
254679
+ const normalized = value.trim().toLowerCase();
254680
+ if (normalized === "true")
254681
+ return true;
254682
+ if (normalized === "false")
254683
+ return false;
254684
+ }
254685
+ return value;
254686
+ }, inner);
254687
+ }
254946
254688
  function applyHeadLimit(items, limit, offset = 0) {
254947
254689
  if (limit === 0) {
254948
254690
  return { items: items.slice(offset), appliedLimit: undefined };
@@ -254976,7 +254718,6 @@ var init_GrepTool = __esm(() => {
254976
254718
  init_shellRuleMatching();
254977
254719
  init_orphanedPluginFilter();
254978
254720
  init_ripgrep();
254979
- init_semanticBoolean();
254980
254721
  init_semanticNumber();
254981
254722
  init_stringUtils();
254982
254723
  init_prompt4();
@@ -254989,19 +254730,19 @@ var init_GrepTool = __esm(() => {
254989
254730
  } = lazyUI("Grep"));
254990
254731
  inputSchema10 = lazySchema(() => exports_external2.strictObject({
254991
254732
  pattern: exports_external2.preprocess((value) => typeof value === "string" && value.trim().length === 0 ? undefined : value, exports_external2.string().default(DEFAULT_GREP_PATTERN).describe('The regular expression pattern to search for in file contents. Defaults to "." (match any non-empty line) when omitted.')),
254992
- path: exports_external2.string().optional().describe("File or directory to search in (rg PATH). Defaults to current working directory."),
254993
- glob: exports_external2.string().optional().describe('Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") - maps to rg --glob'),
254994
- output_mode: exports_external2.enum(["content", "files_with_matches", "count"]).optional().describe('Output mode: "content" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), "files_with_matches" shows file paths (supports head_limit), "count" shows match counts (supports head_limit). Defaults to "files_with_matches".'),
254995
- "-B": semanticNumber(exports_external2.number().optional()).describe('Number of lines to show before each match (rg -B). Requires output_mode: "content", ignored otherwise.'),
254996
- "-A": semanticNumber(exports_external2.number().optional()).describe('Number of lines to show after each match (rg -A). Requires output_mode: "content", ignored otherwise.'),
254997
- "-C": semanticNumber(exports_external2.number().optional()).describe("Alias for context."),
254998
- context: semanticNumber(exports_external2.number().optional()).describe('Number of lines to show before and after each match (rg -C). Requires output_mode: "content", ignored otherwise.'),
254999
- "-n": semanticBoolean(exports_external2.boolean().optional()).describe('Show line numbers in output (rg -n). Requires output_mode: "content", ignored otherwise. Defaults to true.'),
255000
- "-i": semanticBoolean(exports_external2.boolean().optional()).describe("Case insensitive search (rg -i)"),
255001
- type: exports_external2.string().optional().describe("File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types."),
255002
- head_limit: semanticNumber(exports_external2.number().optional()).describe('Limit output to first N lines/entries, equivalent to "| head -N". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 250 when unspecified. Pass 0 for unlimited (use sparingly — large result sets waste context).'),
255003
- offset: semanticNumber(exports_external2.number().optional()).describe('Skip first N lines/entries before applying head_limit, equivalent to "| tail -n +N | head -N". Works across all output modes. Defaults to 0.'),
255004
- multiline: semanticBoolean(exports_external2.boolean().optional()).describe("Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.")
254733
+ path: exports_external2.string().optional().describe("File or directory path to search. Defaults to current working directory."),
254734
+ glob: exports_external2.string().optional().describe('Glob pattern to filter searched files (e.g. "*.js", "*.{ts,tsx}").'),
254735
+ output_mode: exports_external2.enum(["content", "files_with_matches", "count"]).optional().describe('Output mode: "content" shows matching lines (supports context line fields, the -n boolean field, and head_limit), "files_with_matches" shows file paths (supports head_limit), "count" shows match counts (supports head_limit). Defaults to "files_with_matches".'),
254736
+ "-B": semanticNumber(exports_external2.number().optional()).describe('JSON number field: lines to show before each match. Requires output_mode: "content", ignored otherwise.'),
254737
+ "-A": semanticNumber(exports_external2.number().optional()).describe('JSON number field: lines to show after each match. Requires output_mode: "content", ignored otherwise.'),
254738
+ "-C": semanticNumber(exports_external2.number().optional()).describe("JSON number field: lines to show before and after each match. Alias for context."),
254739
+ context: semanticNumber(exports_external2.number().optional()).describe('JSON number field: lines to show before and after each match. Requires output_mode: "content", ignored otherwise.'),
254740
+ "-n": grepBoolean(exports_external2.boolean().optional()).describe('JSON boolean field that controls whether output includes line numbers. Requires output_mode: "content", ignored otherwise. Defaults to true.'),
254741
+ "-i": grepBoolean(exports_external2.boolean().optional()).describe("JSON boolean field that enables case-insensitive search."),
254742
+ type: exports_external2.string().optional().describe("File type filter. Common values: js, py, rust, go, java, etc. More efficient than glob for standard file types."),
254743
+ head_limit: semanticNumber(exports_external2.number().optional()).describe("JSON number field limiting returned lines or entries. Works across all output modes: content limits output lines, files_with_matches limits file paths, count limits count entries. Defaults to 250 when unspecified. Pass 0 for unlimited, sparingly."),
254744
+ offset: semanticNumber(exports_external2.number().optional()).describe("JSON number field skipping the first N returned lines or entries before applying head_limit. Works across all output modes. Defaults to 0."),
254745
+ multiline: grepBoolean(exports_external2.boolean().optional()).describe("JSON boolean field that enables multiline mode where . matches newlines and patterns can span lines. Default: false.")
255005
254746
  }));
255006
254747
  VCS_DIRECTORIES_TO_EXCLUDE = [
255007
254748
  ".git",
@@ -256210,7 +255951,6 @@ async function createBashShellProvider(shellPath, options2) {
256210
255951
  const normalizedCommand = rewriteWindowsNullRedirect(command);
256211
255952
  const addStdinRedirect = shouldAddStdinRedirect(normalizedCommand);
256212
255953
  let quotedCommand = quoteShellCommand(normalizedCommand, addStdinRedirect);
256213
- if (false) {}
256214
255954
  if (normalizedCommand.includes("|") && addStdinRedirect) {
256215
255955
  quotedCommand = rearrangePipeCommand(normalizedCommand);
256216
255956
  }
@@ -256882,9 +256622,7 @@ var init_NotebookEditTool = __esm(() => {
256882
256622
  language: exports_external2.string().describe("The programming language of the notebook"),
256883
256623
  edit_mode: exports_external2.string().describe("The edit mode that was used"),
256884
256624
  error: exports_external2.string().optional().describe("Error message if the operation failed"),
256885
- notebook_path: exports_external2.string().describe("The path to the notebook file"),
256886
- original_file: exports_external2.string().describe("The original notebook content before modification"),
256887
- updated_file: exports_external2.string().describe("The updated notebook content after modification")
256625
+ notebook_path: exports_external2.string().describe("The path to the notebook file")
256888
256626
  }));
256889
256627
  NotebookEditTool = buildToolRuntime({
256890
256628
  name: NOTEBOOK_EDIT_TOOL_NAME2,
@@ -257080,9 +256818,7 @@ var init_NotebookEditTool = __esm(() => {
257080
256818
  edit_mode: "replace",
257081
256819
  error: "Notebook is not valid JSON.",
257082
256820
  cell_id,
257083
- notebook_path: fullPath,
257084
- original_file: "",
257085
- updated_file: ""
256821
+ notebook_path: fullPath
257086
256822
  }
257087
256823
  };
257088
256824
  }
@@ -257166,9 +256902,7 @@ var init_NotebookEditTool = __esm(() => {
257166
256902
  edit_mode: edit_mode ?? "replace",
257167
256903
  cell_id: new_cell_id || undefined,
257168
256904
  error: "",
257169
- notebook_path: fullPath,
257170
- original_file: content,
257171
- updated_file: updatedContent
256905
+ notebook_path: fullPath
257172
256906
  };
257173
256907
  return {
257174
256908
  data
@@ -257182,9 +256916,7 @@ var init_NotebookEditTool = __esm(() => {
257182
256916
  edit_mode: "replace",
257183
256917
  error: error41.message,
257184
256918
  cell_id,
257185
- notebook_path: fullPath,
257186
- original_file: "",
257187
- updated_file: ""
256919
+ notebook_path: fullPath
257188
256920
  };
257189
256921
  return {
257190
256922
  data: data2
@@ -257197,9 +256929,7 @@ var init_NotebookEditTool = __esm(() => {
257197
256929
  edit_mode: "replace",
257198
256930
  error: "Unknown error occurred while editing notebook",
257199
256931
  cell_id,
257200
- notebook_path: fullPath,
257201
- original_file: "",
257202
- updated_file: ""
256932
+ notebook_path: fullPath
257203
256933
  };
257204
256934
  return {
257205
256935
  data
@@ -258512,85 +258242,6 @@ var init_commandSemantics = __esm(() => {
258512
258242
  ]);
258513
258243
  });
258514
258244
 
258515
- // src/session/sessionFileAccessHooks.ts
258516
- var init_sessionFileAccessHooks = __esm(() => {
258517
- init_state();
258518
- init_types9();
258519
- init_FileReadTool();
258520
- init_FileWriteTool();
258521
- init_GlobTool();
258522
- init_GrepTool();
258523
- init_memoryFileDetection();
258524
- init_agentContext();
258525
- });
258526
-
258527
- // src/lib/undercover.ts
258528
- function isUndercover() {
258529
- return false;
258530
- }
258531
- function getUndercoverInstructions() {
258532
- return "";
258533
- }
258534
-
258535
- // src/session/attribution.ts
258536
- function getAttributionTexts() {
258537
- if (process.env.USER_TYPE === "ant" && isUndercover()) {
258538
- return { commit: "", pr: "" };
258539
- }
258540
- if (getClientType() === "remote") {
258541
- const remoteSessionId = resolveEnvVar("REMOTE_SESSION_ID");
258542
- if (remoteSessionId) {
258543
- const ingressUrl = process.env.SESSION_INGRESS_URL;
258544
- if (!isRemoteSessionLocal(remoteSessionId, ingressUrl)) {
258545
- const sessionUrl = getRemoteSessionUrl(remoteSessionId, ingressUrl);
258546
- return { commit: sessionUrl, pr: sessionUrl };
258547
- }
258548
- }
258549
- return { commit: "", pr: "" };
258550
- }
258551
- const model = getMainLoopModel();
258552
- const isKnownPublicModel = getPublicModelDisplayName(model) !== null;
258553
- const modelName = isInternalModelRepoCached() || isKnownPublicModel ? getPublicModelName(model) : "Claude Opus 4.6";
258554
- const defaultAttribution = "\uD83E\uDD16 Generated with [OpenCow](https://github.com/Gitlawb/opencow)";
258555
- const coAuthorDomain = isFamily(getProvider(), "firstParty") ? "anthropic.com" : "opencow.dev";
258556
- const defaultCommit = isEnvTruthy(resolveEnvVar("DISABLE_CO_AUTHORED_BY")) ? "" : `Co-Authored-By: ${modelName} <noreply@${coAuthorDomain}>`;
258557
- const settings = getInitialSettings();
258558
- if (settings.attribution) {
258559
- return {
258560
- commit: settings.attribution.commit ?? defaultCommit,
258561
- pr: settings.attribution.pr ?? defaultAttribution
258562
- };
258563
- }
258564
- if (settings.includeCoAuthoredBy === false) {
258565
- return { commit: "", pr: "" };
258566
- }
258567
- return { commit: defaultCommit, pr: defaultAttribution };
258568
- }
258569
- var MEMORY_ACCESS_TOOL_NAMES;
258570
- var init_attribution = __esm(() => {
258571
- init_state();
258572
- init_envUtils();
258573
- init_xml();
258574
- init_commitAttribution();
258575
- init_debug();
258576
- init_json();
258577
- init_log2();
258578
- init_state2();
258579
- init_model();
258580
- init_sessionFileAccessHooks();
258581
- init_sessionStorage();
258582
- init_sessionStoragePortable();
258583
- init_settings2();
258584
- init_fsOperations();
258585
- MEMORY_ACCESS_TOOL_NAMES = new Set([
258586
- FILE_READ_TOOL_NAME,
258587
- GREP_TOOL_NAME,
258588
- GLOB_TOOL_NAME,
258589
- FILE_EDIT_TOOL_NAME,
258590
- FILE_WRITE_TOOL_NAME
258591
- ]);
258592
- });
258593
-
258594
258245
  // src/lib/timeouts.ts
258595
258246
  function getDefaultBashTimeoutMs(env4 = process.env) {
258596
258247
  const envValue = env4.BASH_DEFAULT_TIMEOUT_MS;
@@ -258614,6 +258265,14 @@ function getMaxBashTimeoutMs(env4 = process.env) {
258614
258265
  }
258615
258266
  var DEFAULT_TIMEOUT_MS = 120000, MAX_TIMEOUT_MS = 600000;
258616
258267
 
258268
+ // src/lib/undercover.ts
258269
+ function isUndercover() {
258270
+ return false;
258271
+ }
258272
+ function getUndercoverInstructions() {
258273
+ return "";
258274
+ }
258275
+
258617
258276
  // src/capabilities/tools/BashTool/prompt.ts
258618
258277
  function getDefaultTimeoutMs() {
258619
258278
  return getDefaultBashTimeoutMs();
@@ -258651,7 +258310,6 @@ Use the gh command via the Bash tool for other GitHub-related tasks including wo
258651
258310
  # Other common operations
258652
258311
  - View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments`;
258653
258312
  }
258654
- const { commit: commitAttribution, pr: prAttribution } = getAttributionTexts();
258655
258313
  return `# Committing changes with git
258656
258314
 
258657
258315
  Only create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:
@@ -258678,8 +258336,7 @@ Git Safety Protocol:
258678
258336
  - Ensure it accurately reflects the changes and their purpose
258679
258337
  3. Run the following commands in parallel:
258680
258338
  - Add relevant untracked files to the staging area.
258681
- - Create the commit with a message${commitAttribution ? ` ending with:
258682
- ${commitAttribution}` : "."}
258339
+ - Create the commit with a message.
258683
258340
  - Run git status after the commit completes to verify success.
258684
258341
  Note: git status depends on the commit completing, so run it sequentially after the commit.
258685
258342
  4. If the commit fails due to pre-commit hook: fix the issue and create a NEW commit
@@ -258694,9 +258351,7 @@ Important notes:
258694
258351
  - In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:
258695
258352
  <example>
258696
258353
  git commit -m "$(cat <<'EOF'
258697
- Commit message here.${commitAttribution ? `
258698
-
258699
- ${commitAttribution}` : ""}
258354
+ Commit message here.
258700
258355
  EOF
258701
258356
  )"
258702
258357
  </example>
@@ -258724,9 +258379,7 @@ gh pr create --title "the pr title" --body "$(cat <<'EOF'
258724
258379
  <1-3 bullet points>
258725
258380
 
258726
258381
  ## Test plan
258727
- [Bulleted markdown checklist of TODOs for testing the pull request...]${prAttribution ? `
258728
-
258729
- ${prAttribution}` : ""}
258382
+ [Bulleted markdown checklist of TODOs for testing the pull request...]
258730
258383
  EOF
258731
258384
  )"
258732
258385
  </example>
@@ -258900,7 +258553,6 @@ function getSimplePrompt() {
258900
258553
  }
258901
258554
  var init_prompt9 = __esm(() => {
258902
258555
  init_prompts2();
258903
- init_attribution();
258904
258556
  init_embeddedTools();
258905
258557
  init_envUtils();
258906
258558
  init_gitSettings();
@@ -282893,7 +282545,7 @@ function getAnthropicEnvMetadata() {
282893
282545
  function getBuildAgeMinutes() {
282894
282546
  if (false)
282895
282547
  ;
282896
- const buildTime = new Date("2026-07-07T09:41:37.769Z").getTime();
282548
+ const buildTime = new Date("2026-07-13T03:43:07.519Z").getTime();
282897
282549
  if (isNaN(buildTime))
282898
282550
  return;
282899
282551
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -283414,7 +283066,6 @@ function createSubagentContext(parentContext, overrides) {
283414
283066
  setResponseLength: overrides?.shareSetResponseLength ? parentContext.setResponseLength : () => {},
283415
283067
  pushApiMetricsEntry: overrides?.shareSetResponseLength ? parentContext.pushApiMetricsEntry : undefined,
283416
283068
  updateFileHistoryState: () => {},
283417
- updateAttributionState: parentContext.updateAttributionState,
283418
283069
  addNotification: undefined,
283419
283070
  setToolJSX: undefined,
283420
283071
  setStreamMode: undefined,
@@ -284753,7 +284404,6 @@ function runPostCompactCleanup(querySource) {
284753
284404
  clearClassifierApprovals();
284754
284405
  _clearSpeculativeChecks?.();
284755
284406
  clearBetaTracingState();
284756
- if (false) {}
284757
284407
  clearSessionMessagesCache();
284758
284408
  }
284759
284409
  var _clearSpeculativeChecks = null;
@@ -290524,8 +290174,7 @@ async function* executeHooks({
290524
290174
  } else {
290525
290175
  const batchStartTime2 = Date.now();
290526
290176
  const context4 = toolUseContext ? {
290527
- getAppState: toolUseContext.getAppState,
290528
- updateAttributionState: toolUseContext.updateAttributionState
290177
+ getAppState: toolUseContext.getAppState
290529
290178
  } : undefined;
290530
290179
  for (const [i3, { hook }] of matchingHooks.entries()) {
290531
290180
  if (hook.type === "callback") {
@@ -292239,8 +291888,7 @@ async function executeHookCallback({
292239
291888
  toolUseContext
292240
291889
  }) {
292241
291890
  const context4 = toolUseContext ? {
292242
- getAppState: toolUseContext.getAppState,
292243
- updateAttributionState: toolUseContext.updateAttributionState
291891
+ getAppState: toolUseContext.getAppState
292244
291892
  } : undefined;
292245
291893
  const json2 = await hook.callback(hookInput, toolUseID, signal, hookIndex, context4);
292246
291894
  if (isAsyncHookJSONOutput(json2)) {
@@ -300392,14 +300040,6 @@ class QueryEngine {
300392
300040
  return { ...prev, fileHistory: updated };
300393
300041
  });
300394
300042
  },
300395
- updateAttributionState: (updater) => {
300396
- setAppState((prev) => {
300397
- const updated = updater(prev.attribution);
300398
- if (updated === prev.attribution)
300399
- return prev;
300400
- return { ...prev, attribution: updated };
300401
- });
300402
- },
300403
300043
  setSDKStatus,
300404
300044
  onToolInvoke,
300405
300045
  uploadMedia
@@ -300491,7 +300131,6 @@ class QueryEngine {
300491
300131
  setInProgressToolUseIDs: () => {},
300492
300132
  setResponseLength: () => {},
300493
300133
  updateFileHistoryState: processUserInputContext.updateFileHistoryState,
300494
- updateAttributionState: processUserInputContext.updateAttributionState,
300495
300134
  setSDKStatus,
300496
300135
  uploadMedia
300497
300136
  };
@@ -336383,4 +336022,4 @@ export {
336383
336022
  AbortError2 as AbortError
336384
336023
  };
336385
336024
 
336386
- //# debugId=7503E4A2FEE6F7C164756E2164756E21
336025
+ //# debugId=C33C25BCB6B3C08C64756E2164756E21