episoda 0.2.42 → 0.2.43

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.
@@ -2682,7 +2682,7 @@ var require_package = __commonJS({
2682
2682
  "package.json"(exports2, module2) {
2683
2683
  module2.exports = {
2684
2684
  name: "episoda",
2685
- version: "0.2.42",
2685
+ version: "0.2.43",
2686
2686
  description: "CLI tool for Episoda local development workflow orchestration",
2687
2687
  main: "dist/index.js",
2688
2688
  types: "dist/index.d.ts",
@@ -8824,67 +8824,9 @@ var Daemon = class _Daemon {
8824
8824
  throw error;
8825
8825
  }
8826
8826
  }
8827
- /**
8828
- * EP956: Cleanup module worktree when module moves to done
8829
- *
8830
- * Runs asynchronously to reduce burden on the state change handler.
8831
- * Steps:
8832
- * 1. Stop dev server for the module
8833
- * 2. Log worktree path for potential removal (actual removal TBD)
8834
- *
8835
- * Note: Worktree removal requires git worktree remove command, which
8836
- * needs careful handling to avoid data loss. For now, just stop the
8837
- * dev server and log the path.
8838
- */
8839
- async cleanupModuleWorktree(moduleUid) {
8840
- console.log(`[Daemon] EP956: Starting async cleanup for ${moduleUid}`);
8841
- try {
8842
- await stopDevServer(moduleUid);
8843
- console.log(`[Daemon] EP956: Dev server stopped for ${moduleUid}`);
8844
- const worktree = await getWorktreeInfoForModule(moduleUid);
8845
- if (worktree?.exists && worktree.path) {
8846
- console.log(`[Daemon] EP994: Removing worktree for ${moduleUid} at ${worktree.path}`);
8847
- const projectRoot = await findProjectRoot(worktree.path);
8848
- if (projectRoot) {
8849
- const manager = new WorktreeManager(projectRoot);
8850
- if (await manager.initialize()) {
8851
- const result = await manager.removeWorktree(moduleUid, true);
8852
- if (result.success) {
8853
- console.log(`[Daemon] EP994: Successfully removed worktree for ${moduleUid}`);
8854
- } else {
8855
- console.warn(`[Daemon] EP994: Could not remove worktree for ${moduleUid}: ${result.error}`);
8856
- }
8857
- } else {
8858
- console.warn(`[Daemon] EP994: Could not initialize WorktreeManager for ${moduleUid}`);
8859
- }
8860
- } else {
8861
- console.warn(`[Daemon] EP994: Could not find project root for ${moduleUid} worktree`);
8862
- }
8863
- } else {
8864
- console.log(`[Daemon] EP994: No worktree to remove for ${moduleUid}`);
8865
- }
8866
- try {
8867
- const cleanupConfig = await (0, import_core11.loadConfig)();
8868
- const cleanupApiUrl = cleanupConfig?.api_url || "https://episoda.dev";
8869
- await fetchWithAuth(`${cleanupApiUrl}/api/modules/${moduleUid}`, {
8870
- method: "PATCH",
8871
- headers: { "Content-Type": "application/json" },
8872
- body: JSON.stringify({
8873
- worktree_status: null,
8874
- worktree_path: null,
8875
- worktree_error: null
8876
- })
8877
- });
8878
- console.log(`[Daemon] EP995: Cleared worktree status for ${moduleUid}`);
8879
- } catch (clearError) {
8880
- console.warn(`[Daemon] EP995: Failed to clear worktree status for ${moduleUid}:`, clearError);
8881
- }
8882
- console.log(`[Daemon] EP956: Async cleanup complete for ${moduleUid}`);
8883
- } catch (error) {
8884
- console.error(`[Daemon] EP956: Cleanup error for ${moduleUid}:`, error instanceof Error ? error.message : error);
8885
- throw error;
8886
- }
8887
- }
8827
+ // EP1025: Removed cleanupModuleWorktree - was dead code (never called).
8828
+ // Worktree cleanup is handled by server's cleanupWorktreeAsync which sends
8829
+ // worktree_remove command via WebSocket, handled by GitExecutor.executeWorktreeRemove.
8888
8830
  /**
8889
8831
  * EP1002: Handle worktree_setup command from server
8890
8832
  * This provides a unified setup flow for both local and cloud environments.