@runfusion/fusion 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,7 +78,7 @@
78
78
  }
79
79
  })();
80
80
  </script>
81
- <script type="module" crossorigin src="/assets/index-zTogbMzz.js"></script>
81
+ <script type="module" crossorigin src="/assets/index-ep-146OC.js"></script>
82
82
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-K0fH_qHe.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/vendor-xterm-DzcZoU0P.js">
84
84
  <link rel="stylesheet" crossorigin href="/assets/vendor-xterm-LZoznX6r.css">
package/dist/extension.js CHANGED
@@ -137,7 +137,7 @@ var init_settings_schema = __esm({
137
137
  worktreeRebaseRemote: "",
138
138
  strictScopeEnforcement: false,
139
139
  buildRetryCount: 0,
140
- verificationFixRetries: 1,
140
+ verificationFixRetries: 3,
141
141
  buildTimeoutMs: 3e5,
142
142
  requirePlanApproval: false,
143
143
  specStalenessEnabled: false,
@@ -53586,7 +53586,7 @@ async function aiMergeTask(store, rootDir, taskId, options = {}) {
53586
53586
  } catch (error) {
53587
53587
  if (error.name === "VerificationError") {
53588
53588
  const verificationErr = error;
53589
- const maxFixRetries = Math.min(settings.verificationFixRetries ?? 1, 3);
53589
+ const maxFixRetries = Math.min(settings.verificationFixRetries ?? 3, 3);
53590
53590
  if (maxFixRetries > 0 && (verificationErr.verificationResult.testResult || verificationErr.verificationResult.buildResult)) {
53591
53591
  mergerLog.log(`${taskId}: deterministic verification failed \u2014 attempting in-merge fix (up to ${maxFixRetries} attempts)`);
53592
53592
  await store.logEntry(taskId, `Verification failed during merge \u2014 attempting in-merge fix (up to ${maxFixRetries} attempts)`);
@@ -53631,7 +53631,7 @@ async function aiMergeTask(store, rootDir, taskId, options = {}) {
53631
53631
  throw error;
53632
53632
  }
53633
53633
  if (error.message?.includes("Build verification failed")) {
53634
- const maxFixRetries = Math.min(settings.verificationFixRetries ?? 1, 3);
53634
+ const maxFixRetries = Math.min(settings.verificationFixRetries ?? 3, 3);
53635
53635
  if (maxFixRetries > 0 && (effectiveTestCommand || effectiveBuildCommand)) {
53636
53636
  mergerLog.log(`${taskId}: build verification failed \u2014 attempting in-merge fix`);
53637
53637
  await store.logEntry(taskId, `Build verification failed during merge \u2014 attempting in-merge fix`);
@@ -65629,8 +65629,13 @@ ${taskDetail.prompt}` : "No PROMPT.md available.",
65629
65629
  this.assignedListener = async (agent, taskId) => {
65630
65630
  if (!this.running) return;
65631
65631
  try {
65632
- if (!isHeartbeatManaged(agent) || !isTickableState(agent.state)) {
65633
- heartbeatLog.log(`Assignment trigger skipped for ${agent.id} (state=${agent.state})`);
65632
+ if (!isHeartbeatManaged(agent)) {
65633
+ heartbeatLog.log(`Assignment trigger skipped for ${agent.id} (ephemeral/internal)`);
65634
+ return;
65635
+ }
65636
+ const runtimeConfig = agent.runtimeConfig ?? {};
65637
+ if (runtimeConfig.enabled === false) {
65638
+ heartbeatLog.log(`Assignment trigger skipped for ${agent.id} (disabled)`);
65634
65639
  return;
65635
65640
  }
65636
65641
  const activeRun = await this.store.getActiveHeartbeatRun(agent.id);
@@ -66089,6 +66094,10 @@ var init_self_healing = __esm({
66089
66094
  const result = await readLog("HEAD");
66090
66095
  stdout = result.stdout;
66091
66096
  }
66097
+ if (!stdout.trim() && task.baseCommitSha) {
66098
+ const result = await readLog("HEAD");
66099
+ stdout = result.stdout;
66100
+ }
66092
66101
  const firstLine = stdout.trim().split("\n").find(Boolean);
66093
66102
  if (!firstLine) return null;
66094
66103
  const [sha, subject] = firstLine.split("");
@@ -67950,10 +67959,10 @@ var init_in_process_runtime = __esm({
67950
67959
  this.taskStore
67951
67960
  );
67952
67961
  this.triggerScheduler.start();
67953
- const isTickable = (agent) => !isEphemeralAgent(agent) && (agent.state === "active" || agent.state === "running");
67962
+ const isHeartbeatEnabledAgent = (agent) => !isEphemeralAgent(agent) && agent.runtimeConfig?.enabled !== false;
67954
67963
  this.agentCreatedListener = (agent) => {
67955
67964
  if (!this.triggerScheduler) return;
67956
- if (!isTickable(agent)) return;
67965
+ if (!isHeartbeatEnabledAgent(agent)) return;
67957
67966
  const rc = agent.runtimeConfig;
67958
67967
  this.triggerScheduler.registerAgent(agent.id, {
67959
67968
  heartbeatIntervalMs: rc?.heartbeatIntervalMs,
@@ -67964,9 +67973,9 @@ var init_in_process_runtime = __esm({
67964
67973
  this.agentStore.on("agent:created", this.agentCreatedListener);
67965
67974
  this.agentUpdatedListener = (agent) => {
67966
67975
  if (!this.triggerScheduler) return;
67967
- if (!isTickable(agent)) {
67976
+ if (!isHeartbeatEnabledAgent(agent)) {
67968
67977
  this.triggerScheduler.unregisterAgent(agent.id);
67969
- runtimeLog.log(`Unregistered agent ${agent.id} from heartbeat triggers (state=${agent.state})`);
67978
+ runtimeLog.log(`Unregistered agent ${agent.id} from heartbeat triggers`);
67970
67979
  return;
67971
67980
  }
67972
67981
  const rc = agent.runtimeConfig;
@@ -67974,7 +67983,7 @@ var init_in_process_runtime = __esm({
67974
67983
  heartbeatIntervalMs: rc?.heartbeatIntervalMs,
67975
67984
  maxConcurrentRuns: rc?.maxConcurrentRuns
67976
67985
  });
67977
- runtimeLog.log(`Re-registered agent ${agent.id} for heartbeat triggers (state=${agent.state})`);
67986
+ runtimeLog.log(`Re-registered agent ${agent.id} for heartbeat triggers`);
67978
67987
  };
67979
67988
  this.agentStore.on("agent:updated", this.agentUpdatedListener);
67980
67989
  this.ephemeralTerminationListener = (agentId, from, to) => {
@@ -68009,7 +68018,7 @@ var init_in_process_runtime = __esm({
68009
68018
  const agents = await this.agentStore.listAgents();
68010
68019
  let registeredCount = 0;
68011
68020
  for (const agent of agents) {
68012
- if (!isTickable(agent)) continue;
68021
+ if (!isHeartbeatEnabledAgent(agent)) continue;
68013
68022
  const rc = agent.runtimeConfig;
68014
68023
  this.triggerScheduler.registerAgent(agent.id, {
68015
68024
  heartbeatIntervalMs: rc?.heartbeatIntervalMs,
@@ -72458,11 +72467,13 @@ var init_terminal = __esm({
72458
72467
  });
72459
72468
 
72460
72469
  // ../dashboard/src/terminal-service.ts
72461
- var isBunBinary;
72470
+ import { createRequire } from "node:module";
72471
+ var isBunBinary, require2;
72462
72472
  var init_terminal_service = __esm({
72463
72473
  "../dashboard/src/terminal-service.ts"() {
72464
72474
  "use strict";
72465
72475
  isBunBinary = typeof Bun !== "undefined" && !!Bun.embeddedFiles;
72476
+ require2 = createRequire(import.meta.url);
72466
72477
  }
72467
72478
  });
72468
72479
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runfusion/fusion",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "license": "MIT",
5
5
  "description": "Fusion CLI: HTTP API server, daemon, dashboard launcher, and task tooling for the Fusion AI coding agent.",
6
6
  "homepage": "https://github.com/Runfusion/Fusion#readme",