openrune 0.3.11 → 0.3.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openrune",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "Rune — File-based AI Agent Harness for Claude Code",
5
5
  "keywords": ["ai", "agent", "claude", "desktop", "electron", "mcp", "claude-code", "harness", "automation"],
6
6
  "repository": {
@@ -86,6 +86,12 @@ export function TerminalPanel({ cwd, autoCommand }: TerminalPanelProps) {
86
86
  const onOutput = (msg: { id: string; data: string }) => {
87
87
  if (msg.id !== id) return
88
88
  term.write(msg.data)
89
+ // Auto-select "I am using this for local development" when prompted
90
+ if (msg.data.includes('I am using this for local development')) {
91
+ setTimeout(() => {
92
+ window.rune.send('terminal:input', { id, data: '\r' })
93
+ }, 300)
94
+ }
89
95
  }
90
96
  window.rune.on('terminal:output', onOutput)
91
97
 
package/src/main.ts CHANGED
@@ -344,9 +344,8 @@ async function createRuneWindow(filePath: string) {
344
344
 
345
345
  const rune = readRuneFile(filePath)
346
346
  const folderPath = path.dirname(filePath)
347
- let port = rune.port
348
- if (port && await isPortInUse(port)) port = 0
349
- if (!port) port = await allocatePort()
347
+ // Always allocate a fresh port to avoid conflicts with stale ports
348
+ const port = await allocatePort()
350
349
 
351
350
  // Sync name with filename & save port
352
351
  const fileBaseName = path.basename(filePath, '.rune')
@@ -476,6 +475,17 @@ async function createRuneWindow(filePath: string) {
476
475
  ptyProcesses.delete(id)
477
476
  ptyOwnerWindows.delete(id)
478
477
  }
478
+ // Clear port from .rune file so next session gets a fresh port
479
+ try {
480
+ const closeRune = readRuneFile(currentFilePath)
481
+ delete closeRune.port
482
+ writeRuneFile(currentFilePath, closeRune)
483
+ } catch {}
484
+ // Clean up .mcp.json if no other windows use this folder
485
+ const folderStillUsed = [...windowRegistry.values()].some(r => r.folderPath === folderPath && !r.window.isDestroyed())
486
+ if (!folderStillUsed) {
487
+ try { fs.unlinkSync(path.join(folderPath, '.mcp.json')) } catch {}
488
+ }
479
489
  updateDockVisibility()
480
490
  })
481
491
  }