@runfusion/fusion 0.0.3 → 0.0.4

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/bin.js CHANGED
@@ -34457,7 +34457,7 @@ async function syncBackupAutomation(automationStore, settings) {
34457
34457
  if (!AutomationStore2.isValidCron(schedule)) {
34458
34458
  throw new Error(`Invalid backup schedule: ${schedule}`);
34459
34459
  }
34460
- const command = "fn backup --create";
34460
+ const command = "npx runfusion.ai backup --create";
34461
34461
  if (existingSchedule) {
34462
34462
  return await automationStore.updateSchedule(existingSchedule.id, {
34463
34463
  scheduleType: "custom",
@@ -34490,7 +34490,7 @@ async function syncBackupRoutine(routineStore, settings) {
34490
34490
  if (!RoutineStore2.isValidCron(schedule)) {
34491
34491
  throw new Error(`Invalid backup schedule: ${schedule}`);
34492
34492
  }
34493
- const command = "fn backup --create";
34493
+ const command = "npx runfusion.ai backup --create";
34494
34494
  const input = {
34495
34495
  name: BACKUP_SCHEDULE_NAME,
34496
34496
  description: "Automatic database backup based on project settings",
@@ -50947,6 +50947,21 @@ var init_terminal_service = __esm({
50947
50947
  }
50948
50948
  return { shell: "/bin/sh", args: [] };
50949
50949
  }
50950
+ /**
50951
+ * Build concise diagnostics for PTY launch failures without logging the full environment.
50952
+ */
50953
+ getSpawnDiagnostics(requestedShell, detectedShell, detectedArgs, cwd) {
50954
+ return {
50955
+ platform: os2.platform(),
50956
+ projectRoot: this.projectRoot,
50957
+ cwd,
50958
+ requestedShell: requestedShell ?? null,
50959
+ detectedShell,
50960
+ detectedArgs,
50961
+ envShell: process.env.SHELL ?? null,
50962
+ allowedShells: this.getAllowedShells().filter((shellPath) => existsSync17(shellPath))
50963
+ };
50964
+ }
50950
50965
  /**
50951
50966
  * Validate and resolve a working directory path
50952
50967
  */
@@ -51073,6 +51088,7 @@ var init_terminal_service = __esm({
51073
51088
  };
51074
51089
  }
51075
51090
  const cwd = await this.resolveWorkingDirectory(options.cwd);
51091
+ const spawnDiagnostics = this.getSpawnDiagnostics(options.shell, detectedShell, shellArgs, cwd);
51076
51092
  const cleanEnv = {};
51077
51093
  for (const [key, value] of Object.entries(process.env)) {
51078
51094
  if (value !== void 0 && !STRIP_ENV_VARS.includes(key)) {
@@ -51088,7 +51104,11 @@ var init_terminal_service = __esm({
51088
51104
  LC_ALL: process.env.LC_ALL || process.env.LANG || "en_US.UTF-8",
51089
51105
  ...options.env
51090
51106
  };
51091
- console.info(`Creating session ${id} with shell: ${shell} in ${cwd}`);
51107
+ console.info(`[createSession] Creating session ${id}`, {
51108
+ ...spawnDiagnostics,
51109
+ selectedShell: shell,
51110
+ selectedArgs: shell === detectedShell ? shellArgs : []
51111
+ });
51092
51112
  let pty;
51093
51113
  try {
51094
51114
  pty = await loadPtyModule();
@@ -51141,12 +51161,13 @@ var init_terminal_service = __esm({
51141
51161
  lastSpawnError = spawnError;
51142
51162
  console.error(
51143
51163
  `[createSession] PTY spawn failed (${attempt.reason}) for ${attempt.shell} ${attempt.args.join(" ")}:`,
51144
- spawnError
51164
+ spawnError,
51165
+ spawnDiagnostics
51145
51166
  );
51146
51167
  }
51147
51168
  }
51148
51169
  if (!ptyProcess) {
51149
- console.error(`[createSession] All PTY spawn attempts failed`, lastSpawnError);
51170
+ console.error(`[createSession] All PTY spawn attempts failed`, lastSpawnError, spawnDiagnostics);
51150
51171
  return {
51151
51172
  success: false,
51152
51173
  code: "pty_spawn_failed",