fifony 0.1.36 → 0.1.37

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 (30) hide show
  1. package/app/dist/assets/{CommandPalette-CyyF04a2.js → CommandPalette-jM1LVTly.js} +1 -1
  2. package/app/dist/assets/{KeyboardShortcutsHelp-D71YmyfF.js → KeyboardShortcutsHelp-DuMbbWoK.js} +1 -1
  3. package/app/dist/assets/OnboardingWizard-CRNV-Tiy.js +1 -0
  4. package/app/dist/assets/{analytics.lazy-D8vsSFxh.js → analytics.lazy-BoFSI6cI.js} +1 -1
  5. package/app/dist/assets/index-BWB0OQnx.css +1 -0
  6. package/app/dist/assets/index-ChQVBIk9.js +54 -0
  7. package/app/dist/index.html +2 -2
  8. package/app/dist/service-worker.js +1 -1
  9. package/dist/agent/run-local.js +6 -6
  10. package/dist/{agent-5AEC4SL7.js → agent-B3GQHWDL.js} +7 -7
  11. package/dist/{chunk-OONOOWNC.js → chunk-37N5OFHM.js} +4 -2
  12. package/dist/{chunk-QBAR5JLY.js → chunk-4RUGXGUX.js} +43 -8
  13. package/dist/{chunk-GYVLPWYB.js → chunk-6BUKDXKZ.js} +12 -12
  14. package/dist/{chunk-LUIPCPRO.js → chunk-AZYLLJVZ.js} +44 -12
  15. package/dist/{chunk-O5AEQXUV.js → chunk-T2YJOZ6N.js} +2 -2
  16. package/dist/{chunk-A7BVAGPW.js → chunk-YJHD4BE4.js} +547 -895
  17. package/dist/cli.js +6 -6
  18. package/dist/issue-runner-PNYGUY3S.js +15 -0
  19. package/dist/{issue-state-machine-JCGSR5QP.js → issue-state-machine-NCD3ZFOI.js} +5 -5
  20. package/dist/{issues-2ENRFJHC.js → issues-IW6CFOSR.js} +7 -9
  21. package/dist/mcp/server.js +2 -2
  22. package/dist/{queue-workers-BQLDNMFQ.js → queue-workers-2NJZE6L2.js} +3 -3
  23. package/dist/{scheduler-5XTHGLCA.js → scheduler-YMQ3JZUU.js} +7 -7
  24. package/dist/{store-44KLJAXC.js → store-GZVWNJ6V.js} +7 -7
  25. package/dist/{workspace-U43FRPEB.js → workspace-HJEJZMTO.js} +4 -4
  26. package/package.json +1 -1
  27. package/app/dist/assets/OnboardingWizard-TLlzqU2A.js +0 -1
  28. package/app/dist/assets/index-Ccu8chEN.js +0 -49
  29. package/app/dist/assets/index-rLcPCr9E.css +0 -1
  30. package/dist/issue-runner-VOW7MZEK.js +0 -15
@@ -20,12 +20,12 @@
20
20
  <link rel="icon" href="/assets/icon-32.png" sizes="32x32" type="image/png" />
21
21
  <link rel="icon" href="/assets/icon-16.png" sizes="16x16" type="image/png" />
22
22
  <link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
23
- <script type="module" crossorigin src="/assets/assets/index-Ccu8chEN.js"></script>
23
+ <script type="module" crossorigin src="/assets/assets/index-ChQVBIk9.js"></script>
24
24
  <link rel="modulepreload" crossorigin href="/assets/assets/rolldown-runtime-Dw2cE7zH.js">
25
25
  <link rel="modulepreload" crossorigin href="/assets/assets/api-ChEctgc5.js">
26
26
  <link rel="modulepreload" crossorigin href="/assets/assets/vendor-DkWeBvNl.js">
27
27
  <link rel="modulepreload" crossorigin href="/assets/assets/createLucideIcon-CBw-4t9s.js">
28
- <link rel="stylesheet" crossorigin href="/assets/assets/index-rLcPCr9E.css">
28
+ <link rel="stylesheet" crossorigin href="/assets/assets/index-BWB0OQnx.css">
29
29
  </head>
30
30
  <body>
31
31
  <div id="root"></div>
@@ -1,4 +1,4 @@
1
- const CACHE_VERSION = "1774267881384";
1
+ const CACHE_VERSION = "1774283198226";
2
2
  const CORE_CACHE = `fifony-core-${CACHE_VERSION}`;
3
3
  const ASSET_CACHE = `fifony-assets-${CACHE_VERSION}`;
4
4
  const APP_SHELL_ROUTES = ["/kanban", "/issues", "/agents", "/settings", "/onboarding"];
@@ -23,10 +23,10 @@ import {
23
23
  startApiServer,
24
24
  syncRuntimeConfigSettings,
25
25
  validateConfig
26
- } from "../chunk-A7BVAGPW.js";
26
+ } from "../chunk-YJHD4BE4.js";
27
27
  import {
28
28
  computeMetrics
29
- } from "../chunk-QBAR5JLY.js";
29
+ } from "../chunk-4RUGXGUX.js";
30
30
  import {
31
31
  detectAvailableProviders,
32
32
  detectDefaultBranch,
@@ -34,20 +34,20 @@ import {
34
34
  getProviderDefaultCommand,
35
35
  resolveDefaultProvider,
36
36
  setSkipSource
37
- } from "../chunk-LUIPCPRO.js";
37
+ } from "../chunk-AZYLLJVZ.js";
38
38
  import {
39
39
  debugBoot,
40
40
  fail,
41
41
  now,
42
42
  parseIntArg
43
- } from "../chunk-O5AEQXUV.js";
43
+ } from "../chunk-T2YJOZ6N.js";
44
44
  import {
45
45
  cleanTerminalWorkspaces,
46
46
  initQueueWorkers,
47
47
  recoverOrphans,
48
48
  recoverState,
49
49
  stopQueueWorkers
50
- } from "../chunk-GYVLPWYB.js";
50
+ } from "../chunk-6BUKDXKZ.js";
51
51
  import {
52
52
  initLogger,
53
53
  logger
@@ -57,7 +57,7 @@ import {
57
57
  PACKAGE_ROOT,
58
58
  STATE_ROOT,
59
59
  TARGET_ROOT
60
- } from "../chunk-OONOOWNC.js";
60
+ } from "../chunk-37N5OFHM.js";
61
61
 
62
62
  // src/boot.ts
63
63
  import { mkdirSync, readFileSync } from "fs";
@@ -15,8 +15,8 @@ import {
15
15
  runIssueOnce,
16
16
  runPlanningJob,
17
17
  tryParseJsonOutput
18
- } from "./chunk-A7BVAGPW.js";
19
- import "./chunk-QBAR5JLY.js";
18
+ } from "./chunk-YJHD4BE4.js";
19
+ import "./chunk-4RUGXGUX.js";
20
20
  import {
21
21
  buildPrompt,
22
22
  buildProviderBasePrompt,
@@ -33,11 +33,11 @@ import {
33
33
  runCommandWithTimeout,
34
34
  runHook,
35
35
  shouldSkipMergePath
36
- } from "./chunk-LUIPCPRO.js";
37
- import "./chunk-O5AEQXUV.js";
38
- import "./chunk-GYVLPWYB.js";
36
+ } from "./chunk-AZYLLJVZ.js";
37
+ import "./chunk-T2YJOZ6N.js";
38
+ import "./chunk-6BUKDXKZ.js";
39
39
  import "./chunk-DVU3CXWA.js";
40
- import "./chunk-OONOOWNC.js";
40
+ import "./chunk-37N5OFHM.js";
41
41
  export {
42
42
  addTokenUsage,
43
43
  buildPrompt,
@@ -71,4 +71,4 @@ export {
71
71
  shouldSkipMergePath,
72
72
  tryParseJsonOutput
73
73
  };
74
- //# sourceMappingURL=agent-5AEC4SL7.js.map
74
+ //# sourceMappingURL=agent-B3GQHWDL.js.map
@@ -86,6 +86,7 @@ var FAST_BOOT = CLI_ARGS.includes("--fast-boot");
86
86
  var SKIP_SOURCE = FAST_BOOT || CLI_ARGS.includes("--skip-source");
87
87
  var SKIP_SCAN = FAST_BOOT || CLI_ARGS.includes("--skip-scan");
88
88
  var SKIP_RECOVERY = FAST_BOOT || CLI_ARGS.includes("--skip-recovery");
89
+ var QUIET_MODE = CLI_ARGS.includes("--quiet") || CLI_ARGS.includes("--silent");
89
90
 
90
91
  export {
91
92
  PACKAGE_ROOT,
@@ -118,6 +119,7 @@ export {
118
119
  TERMINAL_STATES,
119
120
  COMPLETED_STATES,
120
121
  EXECUTING_STATES,
121
- PERSIST_EVENTS_MAX
122
+ PERSIST_EVENTS_MAX,
123
+ QUIET_MODE
122
124
  };
123
- //# sourceMappingURL=chunk-OONOOWNC.js.map
125
+ //# sourceMappingURL=chunk-37N5OFHM.js.map
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  computeDiffStats,
3
3
  syncIssueDiffStatsToStore
4
- } from "./chunk-LUIPCPRO.js";
4
+ } from "./chunk-AZYLLJVZ.js";
5
5
  import {
6
6
  isoWeek,
7
7
  now
8
- } from "./chunk-O5AEQXUV.js";
8
+ } from "./chunk-T2YJOZ6N.js";
9
9
  import {
10
10
  logger
11
11
  } from "./chunk-DVU3CXWA.js";
12
12
  import {
13
13
  S3DB_ISSUE_RESOURCE,
14
+ TARGET_ROOT,
14
15
  TERMINAL_STATES
15
- } from "./chunk-OONOOWNC.js";
16
+ } from "./chunk-37N5OFHM.js";
16
17
 
17
18
  // src/agents/failure-analyzer.ts
18
19
  function extractFilePaths(output) {
@@ -310,11 +311,23 @@ function markAllEventsDirty(ids) {
310
311
 
311
312
  // src/persistence/plugins/issue-state-machine.ts
312
313
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
314
+ import { execSync } from "child_process";
313
315
  import { join } from "path";
314
316
  var fsmEventEmitter = null;
315
317
  function setFsmEventEmitter(emitter) {
316
318
  fsmEventEmitter = emitter;
317
319
  }
320
+ function autoRevertTestSquash(issue) {
321
+ if (!issue.testApplied) return;
322
+ try {
323
+ execSync("git reset --hard HEAD", { cwd: TARGET_ROOT, stdio: "pipe", timeout: 15e3 });
324
+ execSync("git clean -fd", { cwd: TARGET_ROOT, stdio: "pipe", timeout: 15e3 });
325
+ logger.info({ issueId: issue.id }, "[FSM] Auto-reverted test squash from TARGET_ROOT");
326
+ } catch (err) {
327
+ logger.warn({ err: String(err), issueId: issue.id }, "[FSM] Failed to auto-revert test squash");
328
+ }
329
+ issue.testApplied = false;
330
+ }
318
331
  function emitFsmEvent(issueId, kind, message) {
319
332
  if (fsmEventEmitter) {
320
333
  try {
@@ -324,7 +337,7 @@ function emitFsmEvent(issueId, kind, message) {
324
337
  }
325
338
  }
326
339
  async function lazyEnqueue(issue, job) {
327
- const { enqueue } = await import("./queue-workers-BQLDNMFQ.js");
340
+ const { enqueue } = await import("./queue-workers-2NJZE6L2.js");
328
341
  return enqueue(issue, job);
329
342
  }
330
343
  var ISSUE_STATE_MACHINE_ID = "issue-lifecycle";
@@ -370,6 +383,7 @@ var issueStateMachineConfig = {
370
383
  },
371
384
  Running: {
372
385
  on: { REVIEW: "Reviewing", REQUEUE: "Queued", BLOCK: "Blocked" },
386
+ entry: "onEnterRunning",
373
387
  guards: { BLOCK: "requireBlockReason" },
374
388
  triggers: [{
375
389
  type: "cron",
@@ -429,6 +443,7 @@ var issueStateMachineConfig = {
429
443
  onEnterPlanning: async (context, _event, _machine) => {
430
444
  const issue = resolveIssue(context);
431
445
  if (issue) {
446
+ autoRevertTestSquash(issue);
432
447
  issue.planningStatus = "idle";
433
448
  issue.planningError = void 0;
434
449
  issue.nextRetryAt = void 0;
@@ -446,9 +461,26 @@ var issueStateMachineConfig = {
446
461
  emitFsmEvent(issue.id, "state", `Plan ready \u2014 ${issue.identifier} awaiting approval.`);
447
462
  }
448
463
  },
449
- onEnterQueued: async (context, _event, _machine) => {
464
+ onEnterRunning: async (context, _event, _machine) => {
465
+ const issue = resolveIssue(context);
466
+ if (issue) {
467
+ emitFsmEvent(issue.id, "state", `${issue.identifier} is running.`);
468
+ lazyEnqueue(issue, "execute").catch(() => {
469
+ });
470
+ }
471
+ },
472
+ onEnterQueued: async (context, event, _machine) => {
450
473
  const issue = resolveIssue(context);
451
474
  if (issue) {
475
+ autoRevertTestSquash(issue);
476
+ if (event === "REQUEUE") {
477
+ const feedback = typeof context.note === "string" ? context.note : void 0;
478
+ if (feedback) issue.lastError = feedback;
479
+ issue.lastFailedPhase = "review";
480
+ issue.attempts = (issue.attempts ?? 0) + 1;
481
+ } else if (event === "UNBLOCK") {
482
+ issue.attempts = (issue.attempts ?? 0) + 1;
483
+ }
452
484
  if (issue.attempts > 0 && issue.lastError) {
453
485
  let fullOutput = "";
454
486
  let outputFile;
@@ -578,12 +610,15 @@ var issueStateMachineConfig = {
578
610
  const issue = resolveIssue(context);
579
611
  const ts = (/* @__PURE__ */ new Date()).toISOString();
580
612
  const week = isoWeek();
613
+ const reason = typeof context.reason === "string" ? context.reason : typeof context.note === "string" ? context.note : void 0;
581
614
  if (issue) {
615
+ autoRevertTestSquash(issue);
582
616
  issue.completedAt = ts;
583
617
  issue.terminalWeek = week;
584
618
  issue.nextRetryAt = void 0;
585
- issue.lastError = void 0;
586
- emitFsmEvent(issue.id, "state", `${issue.identifier} cancelled.`);
619
+ issue.lastError = reason || void 0;
620
+ issue.cancelledReason = reason || issue.cancelledReason;
621
+ emitFsmEvent(issue.id, "state", `${issue.identifier} cancelled${reason ? `: ${reason.slice(0, 100)}` : ""}.`);
587
622
  }
588
623
  const res = issueResource(machine);
589
624
  if (res) {
@@ -835,4 +870,4 @@ export {
835
870
  canTransitionIssue,
836
871
  visualizeStateMachine
837
872
  };
838
- //# sourceMappingURL=chunk-QBAR5JLY.js.map
873
+ //# sourceMappingURL=chunk-4RUGXGUX.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DVU3CXWA.js";
4
4
  import {
5
5
  TERMINAL_STATES
6
- } from "./chunk-OONOOWNC.js";
6
+ } from "./chunk-37N5OFHM.js";
7
7
 
8
8
  // src/persistence/plugins/queue-workers.ts
9
9
  var PHASE_ORDER = { review: 0, execute: 1, plan: 2 };
@@ -26,7 +26,7 @@ async function initQueueWorkers(state) {
26
26
  }, 3e4);
27
27
  persistInterval = setInterval(() => {
28
28
  if (!active || !runtimeState) return;
29
- import("./store-44KLJAXC.js").then(
29
+ import("./store-GZVWNJ6V.js").then(
30
30
  ({ persistState }) => persistState(runtimeState).catch(() => {
31
31
  })
32
32
  ).catch(() => {
@@ -116,11 +116,11 @@ function sortQueue() {
116
116
  }
117
117
  async function dispatchPlan(issue) {
118
118
  logger.info({ issueId: issue.id, identifier: issue.identifier }, "[Queue] Dispatching plan job");
119
- const { runPlanningJob } = await import("./issue-runner-VOW7MZEK.js");
119
+ const { runPlanningJob } = await import("./issue-runner-PNYGUY3S.js");
120
120
  await runPlanningJob(runtimeState, issue);
121
121
  }
122
122
  async function dispatchExecute(issue) {
123
- const { runIssueOnce } = await import("./issue-runner-VOW7MZEK.js");
123
+ const { runIssueOnce } = await import("./issue-runner-PNYGUY3S.js");
124
124
  while (active && runtimeState) {
125
125
  const current = getCurrentIssue(issue.id);
126
126
  if (!current || current.state !== "Queued" && current.state !== "Running") break;
@@ -130,12 +130,12 @@ async function dispatchExecute(issue) {
130
130
  }
131
131
  async function dispatchReview(issue) {
132
132
  logger.info({ issueId: issue.id, identifier: issue.identifier }, "[Queue] Dispatching review job");
133
- const { runIssueOnce } = await import("./issue-runner-VOW7MZEK.js");
133
+ const { runIssueOnce } = await import("./issue-runner-PNYGUY3S.js");
134
134
  await runIssueOnce(runtimeState, issue, running);
135
135
  }
136
136
  async function checkStaleIssues() {
137
137
  if (!runtimeState) return;
138
- const { ensureNotStale } = await import("./scheduler-5XTHGLCA.js");
138
+ const { ensureNotStale } = await import("./scheduler-YMQ3JZUU.js");
139
139
  await ensureNotStale(runtimeState, runtimeState.config.staleInProgressTimeoutMs);
140
140
  }
141
141
  var draining = false;
@@ -186,7 +186,7 @@ async function enqueue(issue, job) {
186
186
  async function recoverState() {
187
187
  if (!runtimeState) return;
188
188
  try {
189
- const { getIssueStateMachinePlugin, ISSUE_STATE_MACHINE_ID } = await import("./issue-state-machine-JCGSR5QP.js");
189
+ const { getIssueStateMachinePlugin, ISSUE_STATE_MACHINE_ID } = await import("./issue-state-machine-NCD3ZFOI.js");
190
190
  const fsmPlugin = getIssueStateMachinePlugin();
191
191
  if (fsmPlugin?.getState) {
192
192
  for (const issue of runtimeState.issues) {
@@ -218,9 +218,9 @@ async function recoverState() {
218
218
  }
219
219
  async function recoverOrphans() {
220
220
  if (!runtimeState) return;
221
- const { isAgentStillRunning, cleanStalePidFile } = await import("./agent-5AEC4SL7.js");
222
- const { executeTransition } = await import("./issue-state-machine-JCGSR5QP.js");
223
- const { addEvent } = await import("./issues-2ENRFJHC.js");
221
+ const { isAgentStillRunning, cleanStalePidFile } = await import("./agent-B3GQHWDL.js");
222
+ const { executeTransition } = await import("./issue-state-machine-NCD3ZFOI.js");
223
+ const { addEvent } = await import("./issues-IW6CFOSR.js");
224
224
  const candidates = runtimeState.issues.filter((i) => i.state === "Running" || i.state === "Queued");
225
225
  logger.debug({ count: candidates.length }, "[Queue] Checking for orphaned agent processes");
226
226
  for (const issue of candidates) {
@@ -258,7 +258,7 @@ function cleanTerminalWorkspaces() {
258
258
  logger.info({ count: terminals.length }, "[Queue] Scheduling terminal workspace cleanup in background");
259
259
  const state = runtimeState;
260
260
  setImmediate(async () => {
261
- const { cleanWorkspace } = await import("./agent-5AEC4SL7.js");
261
+ const { cleanWorkspace } = await import("./agent-B3GQHWDL.js");
262
262
  for (const issue of terminals) {
263
263
  try {
264
264
  await cleanWorkspace(issue.id, issue, state);
@@ -292,4 +292,4 @@ export {
292
292
  cleanTerminalWorkspaces,
293
293
  getQueueStats
294
294
  };
295
- //# sourceMappingURL=chunk-GYVLPWYB.js.map
295
+ //# sourceMappingURL=chunk-6BUKDXKZ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  idToSafePath,
4
4
  now,
5
5
  renderPrompt
6
- } from "./chunk-O5AEQXUV.js";
6
+ } from "./chunk-T2YJOZ6N.js";
7
7
  import {
8
8
  logger
9
9
  } from "./chunk-DVU3CXWA.js";
@@ -12,7 +12,7 @@ import {
12
12
  SOURCE_ROOT,
13
13
  TARGET_ROOT,
14
14
  WORKSPACE_ROOT
15
- } from "./chunk-OONOOWNC.js";
15
+ } from "./chunk-37N5OFHM.js";
16
16
 
17
17
  // src/domains/workspace.ts
18
18
  import {
@@ -1324,12 +1324,6 @@ function normalizeAgentProvider(value) {
1324
1324
  if (!normalized) return "codex";
1325
1325
  return normalized;
1326
1326
  }
1327
- function resolveAgentCommand(provider, explicitCommand, codexCommand, claudeCommand, reasoningEffort) {
1328
- if (explicitCommand.trim()) return explicitCommand.trim();
1329
- if (provider === "claude" && claudeCommand.trim()) return claudeCommand.trim();
1330
- if (provider === "codex" && codexCommand.trim()) return codexCommand.trim();
1331
- return getProviderDefaultCommand(provider, reasoningEffort);
1332
- }
1333
1327
  function resolveEffort(role, issueEffort, globalEffort) {
1334
1328
  const roleKey = role;
1335
1329
  if (issueEffort?.[roleKey]) return issueEffort[roleKey];
@@ -1891,7 +1885,17 @@ function getGitRepoStatus(dir) {
1891
1885
  return false;
1892
1886
  }
1893
1887
  })();
1894
- return { isGit: true, hasCommits, branch };
1888
+ let isClean = true;
1889
+ let untrackedCount = 0;
1890
+ if (hasCommits) {
1891
+ try {
1892
+ const porcelain = execSync("git status --porcelain", { cwd: dir, encoding: "utf8", timeout: 5e3 }).trim();
1893
+ isClean = porcelain.length === 0;
1894
+ untrackedCount = porcelain.split("\n").filter((l) => l.startsWith("??")).length;
1895
+ } catch {
1896
+ }
1897
+ }
1898
+ return { isGit: true, hasCommits, branch, isClean, untrackedCount };
1895
1899
  }
1896
1900
  function gitRequirementMessage(action) {
1897
1901
  return `fifony requires a git repository with at least one commit to ${action}. Initialize git in this project and create an initial commit, or use the onboarding Setup step.`;
@@ -1942,6 +1946,34 @@ function detectDefaultBranch(dir) {
1942
1946
  return "main";
1943
1947
  }
1944
1948
  }
1949
+ var CLI_CONFIG_DIRS = [".claude", ".codex", ".gemini"];
1950
+ var CLI_CONFIG_FILES = ["CLAUDE.md"];
1951
+ function copyCliConfigDirs(sourceRoot, worktreePath) {
1952
+ for (const dir of CLI_CONFIG_DIRS) {
1953
+ const src = join7(sourceRoot, dir);
1954
+ const dst = join7(worktreePath, dir);
1955
+ if (existsSync7(src) && statSync(src).isDirectory() && !existsSync7(dst)) {
1956
+ try {
1957
+ execSync(`cp -R "${src}" "${dst}"`, { stdio: "pipe", timeout: 1e4 });
1958
+ logger.debug({ dir, worktreePath }, "[Workspace] Copied CLI config dir to worktree");
1959
+ } catch (err) {
1960
+ logger.warn({ err: String(err), dir }, "[Workspace] Failed to copy CLI config dir");
1961
+ }
1962
+ }
1963
+ }
1964
+ for (const file of CLI_CONFIG_FILES) {
1965
+ const src = join7(sourceRoot, file);
1966
+ const dst = join7(worktreePath, file);
1967
+ if (existsSync7(src) && !existsSync7(dst)) {
1968
+ try {
1969
+ execSync(`cp "${src}" "${dst}"`, { stdio: "pipe", timeout: 5e3 });
1970
+ logger.debug({ file, worktreePath }, "[Workspace] Copied CLI config file to worktree");
1971
+ } catch (err) {
1972
+ logger.warn({ err: String(err), file }, "[Workspace] Failed to copy CLI config file");
1973
+ }
1974
+ }
1975
+ }
1976
+ }
1945
1977
  async function createGitWorktree(issue, worktreePath, baseBranch) {
1946
1978
  let headCommitAtStart = "";
1947
1979
  const resolvedBaseBranch = baseBranch ?? detectDefaultBranch(TARGET_ROOT);
@@ -1967,6 +1999,7 @@ async function createGitWorktree(issue, worktreePath, baseBranch) {
1967
1999
  issue.baseBranch = resolvedBaseBranch;
1968
2000
  issue.headCommitAtStart = headCommitAtStart;
1969
2001
  issue.worktreePath = worktreePath;
2002
+ copyCliConfigDirs(TARGET_ROOT, worktreePath);
1970
2003
  logger.debug({ issueId: issue.id, branchName, baseBranch: resolvedBaseBranch, worktreePath }, "[Agent] Git worktree created");
1971
2004
  }
1972
2005
  async function prepareWorkspace(issue, state, defaultBranch) {
@@ -2085,7 +2118,7 @@ function parseDiffStats(issue, raw) {
2085
2118
  }
2086
2119
  async function syncIssueDiffStatsToStore(issue) {
2087
2120
  if (!issue?.id) return;
2088
- const { getIssueStateResource } = await import("./store-44KLJAXC.js");
2121
+ const { getIssueStateResource } = await import("./store-GZVWNJ6V.js");
2089
2122
  const issueResource = getIssueStateResource();
2090
2123
  if (!issueResource) return;
2091
2124
  const toNumber = (value) => {
@@ -2314,7 +2347,6 @@ export {
2314
2347
  ADAPTERS,
2315
2348
  discoverModels,
2316
2349
  normalizeAgentProvider,
2317
- resolveAgentCommand,
2318
2350
  getProviderDefaultCommand,
2319
2351
  detectAvailableProviders,
2320
2352
  readCodexConfig,
@@ -2349,4 +2381,4 @@ export {
2349
2381
  hydrateIssuePathsFromWorkspace,
2350
2382
  writeVersionedArtifacts
2351
2383
  };
2352
- //# sourceMappingURL=chunk-LUIPCPRO.js.map
2384
+ //# sourceMappingURL=chunk-AZYLLJVZ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ALLOWED_STATES,
3
3
  DEBUG_BOOT
4
- } from "./chunk-OONOOWNC.js";
4
+ } from "./chunk-37N5OFHM.js";
5
5
 
6
6
  // src/concerns/helpers.ts
7
7
  import { env } from "process";
@@ -308,4 +308,4 @@ export {
308
308
  repairTruncatedJson,
309
309
  renderPrompt
310
310
  };
311
- //# sourceMappingURL=chunk-O5AEQXUV.js.map
311
+ //# sourceMappingURL=chunk-T2YJOZ6N.js.map