@runfusion/fusion 0.70.0 → 0.70.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/bin.js +68 -41
  2. package/dist/client/.vite/manifest.json +249 -249
  3. package/dist/client/assets/{AgentDetailView-UcyGK_vC.js → AgentDetailView-BHnJqo2r.js} +1 -1
  4. package/dist/client/assets/{AgentPermissionPolicyEditor-DVcgvRjw.js → AgentPermissionPolicyEditor-CLnVN1V8.js} +1 -1
  5. package/dist/client/assets/{AgentsView-BE-HTsa2.js → AgentsView-C2mpl-F-.js} +3 -3
  6. package/dist/client/assets/{ChatView-ChA7lPMm.js → ChatView-DO5uqh7X.js} +1 -1
  7. package/dist/client/assets/{CommandCenter-B_6bfWsl.js → CommandCenter-D4_mJL1B.js} +1 -1
  8. package/dist/client/assets/{DevServerView-B9D8g_ut.js → DevServerView-Cmwv4QOO.js} +1 -1
  9. package/dist/client/assets/{DirectoryPicker-D6EbSzd1.js → DirectoryPicker-DLuDx_eK.js} +1 -1
  10. package/dist/client/assets/{DocumentsView-DRfEB1Lf.js → DocumentsView-CBifAhxj.js} +1 -1
  11. package/dist/client/assets/{EvalsView-BlMBpGr-.js → EvalsView-BjlDIWu3.js} +1 -1
  12. package/dist/client/assets/{ExperimentalAgentOnboardingModal-DB_bRWMS.js → ExperimentalAgentOnboardingModal-CrTPfgfP.js} +1 -1
  13. package/dist/client/assets/{GoalsView-C5s1QHy6.js → GoalsView-udCtfe8K.js} +1 -1
  14. package/dist/client/assets/{InsightsView-0Gyc7f0s.js → InsightsView-6kIswvAp.js} +1 -1
  15. package/dist/client/assets/{MemoryView-iCNmMJJS.js → MemoryView-BVHIG2Cw.js} +1 -1
  16. package/dist/client/assets/{PiExtensionsManager-DeOI2FkF.js → PiExtensionsManager-Q88P1dg_.js} +1 -1
  17. package/dist/client/assets/{PluginManager-DhPlSlzY.js → PluginManager-lE99At6D.js} +1 -1
  18. package/dist/client/assets/{PullRequestView-DUvemdMr.js → PullRequestView-BOKSbrgG.js} +1 -1
  19. package/dist/client/assets/{ResearchView-B0VUmdp-.js → ResearchView-X8nkEU65.js} +1 -1
  20. package/dist/client/assets/{SecretsView-JSCYGBv7.js → SecretsView-BDj6wR01.js} +1 -1
  21. package/dist/client/assets/{SessionTerminal-DHyiQAjY.js → SessionTerminal-CoePyx-a.js} +1 -1
  22. package/dist/client/assets/{SettingsModal-DBmFSHcS.js → SettingsModal-BoQyi1uT.js} +3 -3
  23. package/dist/client/assets/{SettingsModal-CAAE8x4y.js → SettingsModal-CECrEryw.js} +1 -1
  24. package/dist/client/assets/{SettingsTextareaRow-Bepf8u_T.js → SettingsTextareaRow-DV_0_v_J.js} +1 -1
  25. package/dist/client/assets/{SetupWizardModal-DBougliS.js → SetupWizardModal-B482Mabf.js} +2 -2
  26. package/dist/client/assets/{SkillsView-Do_RCxwg.js → SkillsView-Cp7jNXEV.js} +1 -1
  27. package/dist/client/assets/{ThemeDropdown-BZL3YFeV.js → ThemeDropdown-ChrT7lhT.js} +1 -1
  28. package/dist/client/assets/{TodoView-DUttsF_y.js → TodoView-HZw9-AQI.js} +1 -1
  29. package/dist/client/assets/{WorkflowNodeEditor-5V-ag8di.js → WorkflowNodeEditor-DeV9dfn3.js} +1 -1
  30. package/dist/client/assets/app-BLTqCjPk.js +13 -0
  31. package/dist/client/assets/app-BwKqEIVs.js +13 -0
  32. package/dist/client/assets/app-Bx4Tg9WL.js +13 -0
  33. package/dist/client/assets/app-bX7Aarj6.js +13 -0
  34. package/dist/client/assets/app-gasJpw6T.js +13 -0
  35. package/dist/client/assets/{architectureDiagram-3BPJPVTR-Btn4zvDG.js → architectureDiagram-3BPJPVTR-tnFguX8z.js} +1 -1
  36. package/dist/client/assets/{blockDiagram-GPEHLZMM-BD9pvlM8.js → blockDiagram-GPEHLZMM-BKPZ6LQx.js} +1 -1
  37. package/dist/client/assets/{c4Diagram-AAUBKEIU-DoKUglr6.js → c4Diagram-AAUBKEIU-DSObk7BW.js} +1 -1
  38. package/dist/client/assets/channel-BU3NN8kT.js +1 -0
  39. package/dist/client/assets/{chunk-2J33WTMH-CcrYik1W.js → chunk-2J33WTMH-CnJlEes6.js} +1 -1
  40. package/dist/client/assets/{chunk-4BX2VUAB-DPBkmhox.js → chunk-4BX2VUAB-s6CMovw_.js} +1 -1
  41. package/dist/client/assets/{chunk-55IACEB6-BKgW-ZME.js → chunk-55IACEB6-NEIqJT7j.js} +1 -1
  42. package/dist/client/assets/{chunk-727SXJPM-BwHZ89kV.js → chunk-727SXJPM-C1CQZVzb.js} +1 -1
  43. package/dist/client/assets/{chunk-AQP2D5EJ-D9u2wbjN.js → chunk-AQP2D5EJ-6gMoMdGb.js} +1 -1
  44. package/dist/client/assets/{chunk-FMBD7UC4-CnCKrO3d.js → chunk-FMBD7UC4-DmPr6Fr6.js} +1 -1
  45. package/dist/client/assets/{chunk-ND2GUHAM-C9U4i51P.js → chunk-ND2GUHAM-DdT6_Vir.js} +1 -1
  46. package/dist/client/assets/{chunk-QZHKN3VN-CfPCe-_9.js → chunk-QZHKN3VN-X6wAiHwG.js} +1 -1
  47. package/dist/client/assets/classDiagram-4FO5ZUOK-CCnXAfXJ.js +1 -0
  48. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CCnXAfXJ.js +1 -0
  49. package/dist/client/assets/{cose-bilkent-S5V4N54A-DtwCEQs8.js → cose-bilkent-S5V4N54A-DiYJ_SGs.js} +1 -1
  50. package/dist/client/assets/{dagre-BM42HDAG-7af6SNqt.js → dagre-BM42HDAG-DbK9iSU6.js} +1 -1
  51. package/dist/client/assets/{dashboard-view-BedVE0Ih.js → dashboard-view-BuYhP1Cp.js} +1 -1
  52. package/dist/client/assets/{dashboard-view-DxJ37rW2.js → dashboard-view-C3f_CnQ1.js} +1 -1
  53. package/dist/client/assets/{dashboard-view-CVo9Y-Mr.js → dashboard-view-CUyQsgCx.js} +1 -1
  54. package/dist/client/assets/{diagram-2AECGRRQ-POCtmGz8.js → diagram-2AECGRRQ-DzRxhbFR.js} +1 -1
  55. package/dist/client/assets/{diagram-5GNKFQAL-i5K8mqYD.js → diagram-5GNKFQAL-CTMHqhQS.js} +1 -1
  56. package/dist/client/assets/{diagram-KO2AKTUF-Sn06yZUj.js → diagram-KO2AKTUF-BuzYjBIv.js} +1 -1
  57. package/dist/client/assets/{diagram-LMA3HP47-C2fWgirp.js → diagram-LMA3HP47-DNo7IO4h.js} +1 -1
  58. package/dist/client/assets/{diagram-OG6HWLK6-Bt2bFUl9.js → diagram-OG6HWLK6-BDCorOru.js} +1 -1
  59. package/dist/client/assets/{erDiagram-TEJ5UH35-BghBGlaT.js → erDiagram-TEJ5UH35-Cz0hE7uE.js} +1 -1
  60. package/dist/client/assets/{flowDiagram-I6XJVG4X-wSa-kKJr.js → flowDiagram-I6XJVG4X-Kb2I0MOg.js} +1 -1
  61. package/dist/client/assets/{folder-open-DNSbtgHO.js → folder-open-LzyyHcib.js} +1 -1
  62. package/dist/client/assets/{ganttDiagram-6RSMTGT7-DWBQrRfD.js → ganttDiagram-6RSMTGT7--M8kpndX.js} +1 -1
  63. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-DF3OeXPN.js → gitGraphDiagram-PVQCEYII-BvyviZo2.js} +1 -1
  64. package/dist/client/assets/{index-E8N-nvEr.js → index-BH5aIwaM.js} +285 -285
  65. package/dist/client/assets/index-Co20nJU4.css +1 -0
  66. package/dist/client/assets/{infoDiagram-5YYISTIA--C0rwWUk.js → infoDiagram-5YYISTIA-Bgm5nKut.js} +1 -1
  67. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DbOOTJuV.js → ishikawaDiagram-YF4QCWOH-DWW_Prtm.js} +1 -1
  68. package/dist/client/assets/{journeyDiagram-JHISSGLW-B-9JjpPp.js → journeyDiagram-JHISSGLW-BOfifstC.js} +1 -1
  69. package/dist/client/assets/{kanban-definition-UN3LZRKU-qZZGQNnO.js → kanban-definition-UN3LZRKU-V8JEMLyb.js} +1 -1
  70. package/dist/client/assets/{mermaid.core-CeXW1p4f.js → mermaid.core-DDpO_pvZ.js} +4 -4
  71. package/dist/client/assets/{mindmap-definition-RKZ34NQL-BXRCpP2x.js → mindmap-definition-RKZ34NQL-BLI9JHhu.js} +1 -1
  72. package/dist/client/assets/{pieDiagram-4H26LBE5-47zFHuRm.js → pieDiagram-4H26LBE5-BL5eUgb4.js} +1 -1
  73. package/dist/client/assets/{puzzle-BNhvAyID.js → puzzle-BOqqcjsU.js} +1 -1
  74. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-DUKmccO0.js → quadrantDiagram-W4KKPZXB-CtvzPtau.js} +1 -1
  75. package/dist/client/assets/{requirementDiagram-4Y6WPE33-BOJ_6eOW.js → requirementDiagram-4Y6WPE33-Co2--lq9.js} +1 -1
  76. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BHUv0akC.js → sankeyDiagram-5OEKKPKP-DaAXgU9Y.js} +1 -1
  77. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-1EV1Z4wU.js → sequenceDiagram-3UESZ5HK-zdmQqra5.js} +1 -1
  78. package/dist/client/assets/{shield-alert-fp6442hB.js → shield-alert-DfIgeeR0.js} +1 -1
  79. package/dist/client/assets/{standing-instructions-template-BuvHfp3C.js → standing-instructions-template-B5GKUe8V.js} +1 -1
  80. package/dist/client/assets/{stateDiagram-AJRCARHV-gl5trnu3.js → stateDiagram-AJRCARHV-CXK0Nj1C.js} +1 -1
  81. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-BZTcdF3O.js → stateDiagram-v2-BHNVJYJU-BDtUdqu0.js} +1 -1
  82. package/dist/client/assets/{timeline-definition-PNZ67QCA-tWTH8fak.js → timeline-definition-PNZ67QCA-C2VA4hrS.js} +1 -1
  83. package/dist/client/assets/{upload-Qz1855iO.js → upload-DVSzPAp1.js} +1 -1
  84. package/dist/client/assets/{users-BQK7rz20.js → users-Bi9t1Jl7.js} +1 -1
  85. package/dist/client/assets/{vennDiagram-CIIHVFJN-CFYaMPIr.js → vennDiagram-CIIHVFJN-3r5bGzbL.js} +1 -1
  86. package/dist/client/assets/{wardley-L42UT6IY-L-s3D5go.js → wardley-L42UT6IY-B8CM4294.js} +1 -1
  87. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Bnr2mimd.js → wardleyDiagram-YWT4CUSO-nzJ6haZ4.js} +1 -1
  88. package/dist/client/assets/{xychartDiagram-2RQKCTM6-Bkx54Q3q.js → xychartDiagram-2RQKCTM6-CWUTnMyY.js} +1 -1
  89. package/dist/client/index.html +2 -2
  90. package/dist/client/version.json +1 -1
  91. package/dist/extension.js +38 -32
  92. package/package.json +1 -1
  93. package/dist/client/assets/app-B3aUA71e.js +0 -13
  94. package/dist/client/assets/app-CKMMlwBM.js +0 -13
  95. package/dist/client/assets/app-CM_EbIz5.js +0 -13
  96. package/dist/client/assets/app-D5nFfAtx.js +0 -13
  97. package/dist/client/assets/app-DSo_fHWv.js +0 -13
  98. package/dist/client/assets/channel-DgUBVYLb.js +0 -1
  99. package/dist/client/assets/classDiagram-4FO5ZUOK-zHoYgXgS.js +0 -1
  100. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-zHoYgXgS.js +0 -1
  101. package/dist/client/assets/index-Bxrp0IKg.css +0 -1
package/dist/bin.js CHANGED
@@ -174063,7 +174063,6 @@ async function resolveActivePrEntity(store, task) {
174063
174063
  return store.getActivePrEntityBySource("branch-group", groupId);
174064
174064
  }
174065
174065
  function buildRespondCallback(getStore3, ops, audit, pluginRunner) {
174066
- const gitOps = makePrResponseGitOps(ops.getCwd);
174067
174066
  return async ({ entity }) => {
174068
174067
  const store = getStore3();
174069
174068
  const fullStore = store;
@@ -174076,8 +174075,17 @@ function buildRespondCallback(getStore3, ops, audit, pluginRunner) {
174076
174075
  return { value: "disagreed-only" };
174077
174076
  }
174078
174077
  const taskId = ops.getTaskId(entity);
174079
- const cwd = ops.getCwd(entity);
174080
- const runAgent = makePrResponseAgentRunner(settings, taskId, cwd, fullStore, pluginRunner);
174078
+ const hasGetTask = typeof fullStore.getTask === "function";
174079
+ const respondTask = hasGetTask ? await fullStore.getTask(taskId) : null;
174080
+ const cwd = respondTask?.worktree || ops.getCwd(entity);
174081
+ const gitOps = makePrResponseGitOps(() => cwd);
174082
+ const runAgent = makePrResponseAgentRunner(
174083
+ settings,
174084
+ taskId,
174085
+ cwd,
174086
+ hasGetTask ? fullStore : void 0,
174087
+ pluginRunner
174088
+ );
174081
174089
  const result = await runPrResponseRun({
174082
174090
  entity,
174083
174091
  store,
@@ -191383,18 +191391,14 @@ var init_unlinked_missions_advisory_reporter = __esm({
191383
191391
  }
191384
191392
  async report() {
191385
191393
  try {
191386
- const resolvedMissionStore = this.store.getMissionStore();
191387
- if (!(resolvedMissionStore instanceof MissionStore)) {
191388
- return { alerted: false, reason: "mission-store-async-unsupported" };
191389
- }
191390
- const missionStore = resolvedMissionStore;
191391
- const missions2 = missionStore.listMissions();
191394
+ const missionStore = this.store.getMissionStore();
191395
+ const missions2 = await missionStore.listMissions();
191392
191396
  const unlinkedActiveMissions = [];
191393
191397
  for (const mission of missions2) {
191394
191398
  if (mission.status !== "active") {
191395
191399
  continue;
191396
191400
  }
191397
- if (missionStore.listGoalIdsForMission(mission.id).length > 0) {
191401
+ if ((await missionStore.listGoalIdsForMission(mission.id)).length > 0) {
191398
191402
  continue;
191399
191403
  }
191400
191404
  unlinkedActiveMissions.push(mission);
@@ -242773,13 +242777,17 @@ var init_mission_execution_loop = __esm({
242773
242777
  * dispatch of the validation result.
242774
242778
  */
242775
242779
  async runFeatureValidation(feature) {
242776
- let assertions = await this.missionStore.listAssertionsForFeature(feature.id);
242777
- if (assertions.length === 0) {
242778
- loopLog.log(`Feature ${feature.id} has no linked assertions; lazily ensuring store-managed assertion linkage`);
242779
- assertions = await this.missionStore.ensureFeatureAssertionLinked(feature.id);
242780
- }
242781
242780
  this.activeValidations.add(feature.id);
242782
242781
  try {
242782
+ let assertions = await this.missionStore.listAssertionsForFeature(feature.id);
242783
+ if (assertions.length === 0) {
242784
+ loopLog.log(`Feature ${feature.id} has no linked assertions; lazily ensuring store-managed assertion linkage`);
242785
+ assertions = await this.missionStore.ensureFeatureAssertionLinked(feature.id);
242786
+ }
242787
+ if (assertions.length === 0) {
242788
+ await this.handleValidationPass(feature.id, void 0, "No assertions linked to feature");
242789
+ return;
242790
+ }
242783
242791
  loopLog.log(`Running internal validation for feature ${feature.id} \u2014 no board task created (policy: docs/missions.md)`);
242784
242792
  const run2 = feature.taskId ? await this.missionStore.startValidatorRun(feature.id, "task_completion", feature.taskId) : await this.missionStore.startValidatorRun(feature.id, "task_completion");
242785
242793
  loopLog.log(`Started validator run ${run2.id} for feature ${feature.id}`);
@@ -261229,6 +261237,7 @@ var init_project_engine = __esm({
261229
261237
  if (this.started) {
261230
261238
  return;
261231
261239
  }
261240
+ this.shuttingDown = false;
261232
261241
  await this.runtime.start();
261233
261242
  await deliverPostgresMigrationNoticeIfNeeded({
261234
261243
  messageStore: this.runtime.getMessageStore(),
@@ -261290,9 +261299,7 @@ var init_project_engine = __esm({
261290
261299
  // through the FN-7520 façade for each real observation the monitor
261291
261300
  // records, using the real TaskStore. Best-effort — never throws (the
261292
261301
  // monitor already swallows callback errors around `onObservation`).
261293
- onObservation: (observation) => {
261294
- this.emitOverseerObservationDeduped(store, observation);
261295
- }
261302
+ onObservation: (observation) => this.emitOverseerObservationDeduped(store, observation)
261296
261303
  });
261297
261304
  this.plannerRecoveryController = new PlannerRecoveryController({
261298
261305
  snapshotProvider: this.plannerOverseer,
@@ -261663,7 +261670,6 @@ ${detail}`);
261663
261670
  }
261664
261671
  await this.runtime.stop();
261665
261672
  this.started = false;
261666
- this.shuttingDown = false;
261667
261673
  runtimeLog.log(`ProjectEngine stopped for ${this.config.projectId}`);
261668
261674
  }
261669
261675
  // ── Public accessors ──
@@ -261902,9 +261908,9 @@ ${detail}`);
261902
261908
  * try/catch-degrade-to-no-op contract every FN-7512/FN-7513/FN-7514
261903
261909
  * handler already follows).
261904
261910
  */
261905
- emitOverseerInterventionSafe(fn2) {
261911
+ async emitOverseerInterventionSafe(fn2) {
261906
261912
  try {
261907
- fn2();
261913
+ await fn2();
261908
261914
  } catch (err) {
261909
261915
  runtimeLog.warn(`Failed to emit overseer intervention: ${err instanceof Error ? err.message : String(err)}`);
261910
261916
  }
@@ -261918,7 +261924,7 @@ ${detail}`);
261918
261924
  * `(stage, signal)` pair emits. Best-effort: any store/façade failure is
261919
261925
  * swallowed so it never breaks `PlannerOverseerMonitor#observeTask`/the poll.
261920
261926
  */
261921
- emitOverseerObservationDeduped(store, observation) {
261927
+ async emitOverseerObservationDeduped(store, observation) {
261922
261928
  try {
261923
261929
  const dedupKey = `${observation.stage}:${observation.signal}`;
261924
261930
  const last = this.plannerObservationEmitDedup.get(observation.taskId);
@@ -261926,7 +261932,7 @@ ${detail}`);
261926
261932
  return;
261927
261933
  }
261928
261934
  this.plannerObservationEmitDedup.set(observation.taskId, dedupKey);
261929
- emitOverseerObservation({
261935
+ await emitOverseerObservation({
261930
261936
  store,
261931
261937
  taskId: observation.taskId,
261932
261938
  stage: observation.stage,
@@ -261949,14 +261955,14 @@ ${detail}`);
261949
261955
  * clears the dedup entry and may escalate again in a future exhaustion).
261950
261956
  * Best-effort; never throws out of the poll.
261951
261957
  */
261952
- emitOverseerEscalationDeduped(store, taskId, decision) {
261958
+ async emitOverseerEscalationDeduped(store, taskId, decision) {
261953
261959
  if (!decision.watchedStage) return;
261954
261960
  const dedupKey = `${taskId}::${decision.watchedStage}`;
261955
261961
  if (this.plannerEscalationEmitDedup.has(dedupKey)) {
261956
261962
  return;
261957
261963
  }
261958
261964
  this.plannerEscalationEmitDedup.add(dedupKey);
261959
- this.emitOverseerInterventionSafe(
261965
+ await this.emitOverseerInterventionSafe(
261960
261966
  () => emitOverseerEscalation({
261961
261967
  store,
261962
261968
  taskId,
@@ -261993,7 +261999,7 @@ ${detail}`);
261993
261999
  injectGuidance: async (task, decision) => {
261994
262000
  const text2 = `[planner-oversight] ${decision.reason}`;
261995
262001
  await store.addSteeringComment(task.id, text2, "agent");
261996
- this.emitOverseerInterventionSafe(
262002
+ await this.emitOverseerInterventionSafe(
261997
262003
  () => emitOverseerSteering({
261998
262004
  store,
261999
262005
  taskId: task.id,
@@ -262006,7 +262012,7 @@ ${detail}`);
262006
262012
  },
262007
262013
  retryStep: async (task, decision) => {
262008
262014
  await store.moveTask(task.id, "todo", { preserveProgress: true, moveSource: "engine" });
262009
- this.emitOverseerInterventionSafe(
262015
+ await this.emitOverseerInterventionSafe(
262010
262016
  () => emitOverseerRetry({
262011
262017
  store,
262012
262018
  taskId: task.id,
@@ -262022,7 +262028,7 @@ ${detail}`);
262022
262028
  const sourceRef = decision.sourceLinks[0]?.ref;
262023
262029
  const text2 = sourceRef ? `[planner-oversight] targeted-fix requested: ${decision.reason} (source: ${sourceRef})` : `[planner-oversight] targeted-fix requested: ${decision.reason}`;
262024
262030
  await store.addSteeringComment(task.id, text2, "agent");
262025
- this.emitOverseerInterventionSafe(
262031
+ await this.emitOverseerInterventionSafe(
262026
262032
  () => emitOverseerRecoveryAttempt({
262027
262033
  store,
262028
262034
  taskId: task.id,
@@ -262055,7 +262061,7 @@ ${detail}`);
262055
262061
  requestConfirmation: async (task, request3) => {
262056
262062
  const text2 = `[planner-oversight] merge checkpoint (${request3.sideEffectClass}): ${request3.reason}`;
262057
262063
  await store.addSteeringComment(task.id, text2, "agent");
262058
- this.emitOverseerInterventionSafe(
262064
+ await this.emitOverseerInterventionSafe(
262059
262065
  () => emitOverseerConfirmation({
262060
262066
  store,
262061
262067
  taskId: task.id,
@@ -262072,7 +262078,7 @@ ${detail}`);
262072
262078
  // the timeline shows both the request and its resolution. Never touches
262073
262079
  // the approve/deny execution path itself.
262074
262080
  onConfirmationResolved: async (taskId, request3, resolution) => {
262075
- this.emitOverseerInterventionSafe(
262081
+ await this.emitOverseerInterventionSafe(
262076
262082
  () => emitOverseerConfirmation({
262077
262083
  store,
262078
262084
  taskId,
@@ -262719,7 +262725,7 @@ ${detail}`);
262719
262725
  });
262720
262726
  }
262721
262727
  internalEnqueueMerge(taskId) {
262722
- if (this.shuttingDown) return false;
262728
+ if (this.shuttingDown || !this.started) return false;
262723
262729
  if (this.mergeActive.has(taskId)) {
262724
262730
  const isActuallyLive = this.mergeQueue.includes(taskId) || this.activeMergeTaskId === taskId;
262725
262731
  if (!isActuallyLive) {
@@ -262891,7 +262897,7 @@ ${detail}`);
262891
262897
  if (level === "autonomous" && this.plannerRecoveryController) {
262892
262898
  const decision = await this.plannerRecoveryController.tick(task, { settings: engineSettings });
262893
262899
  if (decision?.exhausted && decision.watchedStage) {
262894
- this.emitOverseerEscalationDeduped(store, task.id, decision);
262900
+ await this.emitOverseerEscalationDeduped(store, task.id, decision);
262895
262901
  }
262896
262902
  }
262897
262903
  if (task.column === "in-progress" && this.sessionAdvisor) {
@@ -382091,7 +382097,11 @@ function toBranchGroupPrState(prInfo) {
382091
382097
  }
382092
382098
  function createGroupPrCallback(github) {
382093
382099
  return async ({ cwd, group, members, headBranch, baseBranch }) => {
382094
- const existing = await github.findPrForBranch({ head: headBranch, state: "open" });
382100
+ const repo = getCurrentRepo(cwd);
382101
+ if (!repo) {
382102
+ throw new Error("createGroupPr: could not determine repository");
382103
+ }
382104
+ const existing = await github.findPrForBranch({ owner: repo.owner, repo: repo.repo, head: headBranch, state: "open" });
382095
382105
  if (existing) {
382096
382106
  return { prNumber: existing.number, prUrl: existing.url, prState: toBranchGroupPrState(existing) };
382097
382107
  }
@@ -382102,6 +382112,8 @@ function createGroupPrCallback(github) {
382102
382112
  branchName: getTaskBranchName(member.id)
382103
382113
  }));
382104
382114
  const created = await github.createPr({
382115
+ owner: repo.owner,
382116
+ repo: repo.repo,
382105
382117
  title: buildGroupPullRequestTitle(group, members),
382106
382118
  body: buildGroupPullRequestBody(group, membersWithBranch),
382107
382119
  head: headBranch,
@@ -382167,20 +382179,28 @@ function createPrNodeGithubOps(github, options = {}) {
382167
382179
  const getCwd = (entity) => options.getTaskWorktree?.(entity.sourceId) ?? process.cwd();
382168
382180
  return {
382169
382181
  resolvePrSource: (task) => {
382170
- const repo = getCurrentRepo();
382171
- const repoSlug = repo ? `${repo.owner}/${repo.repo}` : "";
382182
+ const cwd = options.getTaskWorktree?.(task.id) ?? task.worktree ?? process.cwd();
382183
+ const repo = getCurrentRepo(cwd);
382184
+ if (!repo) {
382185
+ throw new Error(
382186
+ `pr-create: could not determine repository for task ${task.id} (no GitHub remote resolved from ${cwd})`
382187
+ );
382188
+ }
382172
382189
  return {
382173
382190
  sourceType: "task",
382174
382191
  sourceId: task.id,
382175
- repo: repoSlug,
382192
+ repo: `${repo.owner}/${repo.repo}`,
382176
382193
  headBranch: getTaskBranchName(task.id)
382177
382194
  };
382178
382195
  },
382179
382196
  createPr: async ({ task, entity }) => {
382180
- const cwd = process.cwd();
382197
+ const cwd = options.getTaskWorktree?.(entity.sourceId) ?? task.worktree ?? process.cwd();
382181
382198
  const headBranch = entity.headBranch || getTaskBranchName(task.id);
382182
382199
  await pushTaskBranchToOrigin(cwd, headBranch);
382200
+ const { owner, name: name2 } = splitRepoSlug(entity.repo);
382183
382201
  const created = await github.createPr({
382202
+ owner,
382203
+ repo: name2,
382184
382204
  title: task.title ?? `Task ${task.id}`,
382185
382205
  body: task.description ?? "",
382186
382206
  head: headBranch,
@@ -382193,8 +382213,11 @@ function createPrNodeGithubOps(github, options = {}) {
382193
382213
  if (entity.prNumber == null) {
382194
382214
  throw new Error(`pr-merge: entity ${entity.id} has no persisted prNumber`);
382195
382215
  }
382216
+ const { owner, name: name2 } = splitRepoSlug(entity.repo);
382196
382217
  try {
382197
382218
  await github.mergePr({
382219
+ owner,
382220
+ repo: name2,
382198
382221
  number: entity.prNumber,
382199
382222
  method: "squash",
382200
382223
  expectedHeadOid: entity.headOid
@@ -382398,11 +382421,13 @@ async function processPullRequestMergeTask(store, cwd, taskId, github, getTaskMe
382398
382421
  commentCount: 0
382399
382422
  };
382400
382423
  } else {
382401
- groupPrInfo = await github.findPrForBranch({ head: branchGroup.branchName, state: "open" });
382424
+ groupPrInfo = await github.findPrForBranch({ owner: prRepo.owner, repo: prRepo.repo, head: branchGroup.branchName, state: "open" });
382402
382425
  if (!groupPrInfo) {
382403
382426
  await pushTaskBranchToOrigin(cwd, branchGroup.branchName);
382404
382427
  try {
382405
382428
  groupPrInfo = await github.createPr({
382429
+ owner: prRepo.owner,
382430
+ repo: prRepo.repo,
382406
382431
  title: buildGroupPullRequestTitle(branchGroup, members),
382407
382432
  body: buildGroupPullRequestBody(branchGroup, membersWithCommits),
382408
382433
  head: branchGroup.branchName,
@@ -382463,7 +382488,7 @@ async function processPullRequestMergeTask(store, cwd, taskId, github, getTaskMe
382463
382488
  return "waiting";
382464
382489
  }
382465
382490
  await store.updateTask(task.id, { status: "merging-pr" });
382466
- const mergedPr2 = await github.mergePr({ number: refreshedPrInfo2.number, method: "squash" });
382491
+ const mergedPr2 = await github.mergePr({ owner: prRepo.owner, repo: prRepo.repo, number: refreshedPrInfo2.number, method: "squash" });
382467
382492
  await store.updateBranchGroup(branchGroup.id, {
382468
382493
  prNumber: mergedPr2.number,
382469
382494
  prUrl: mergedPr2.url,
@@ -382486,12 +382511,14 @@ async function processPullRequestMergeTask(store, cwd, taskId, github, getTaskMe
382486
382511
  let prInfo = task.prInfo;
382487
382512
  if (!prInfo) {
382488
382513
  await store.updateTask(task.id, { status: "creating-pr" });
382489
- const existingPr = await github.findPrForBranch({ head: branch, state: "all" });
382514
+ const existingPr = await github.findPrForBranch({ owner: prRepo.owner, repo: prRepo.repo, head: branch, state: "all" });
382490
382515
  if (!existingPr) {
382491
382516
  await pushTaskBranchToOrigin(cwd, branch);
382492
382517
  }
382493
382518
  try {
382494
382519
  prInfo = existingPr ?? await github.createPr({
382520
+ owner: prRepo.owner,
382521
+ repo: prRepo.repo,
382495
382522
  title: buildPullRequestTitle(task),
382496
382523
  body: buildPullRequestBody(task),
382497
382524
  head: branch,
@@ -382549,7 +382576,7 @@ async function processPullRequestMergeTask(store, cwd, taskId, github, getTaskMe
382549
382576
  await store.updateTask(task.id, { status: "merging-pr" });
382550
382577
  let mergedPr;
382551
382578
  try {
382552
- mergedPr = await github.mergePr({ number: prInfo.number, method: "squash" });
382579
+ mergedPr = await github.mergePr({ owner: prRepo.owner, repo: prRepo.repo, number: prInfo.number, method: "squash" });
382553
382580
  } catch (err) {
382554
382581
  let refreshedStatus;
382555
382582
  try {