@barnaby.build/barnaby 0.0.129 → 0.0.132
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/README.md +25 -0
- package/bin/barnaby.cjs +1 -1
- package/package.json +8 -2
- package/scripts/bump-version.mjs +35 -0
- package/scripts/create-release-notes.mjs +47 -0
- package/scripts/dev-clean.mjs +27 -0
- package/scripts/shortcut-win.mjs +55 -0
package/README.md
CHANGED
|
@@ -7,6 +7,31 @@ Barnaby is a desktop AI agent orchestrator for **agentic coordination** — conn
|
|
|
7
7
|
- **API provider**: OpenRouter — free-tier and paid models via API key (ideal when CLI quotas are exhausted)
|
|
8
8
|
- **UI experience**: Split layouts (horizontal, vertical, grid), workspace window, dark/light themes, zoom, activity timeline
|
|
9
9
|
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
### Option 1: Download (recommended)
|
|
13
|
+
|
|
14
|
+
[Download Barnaby](https://github.com/incendiosoftware/Barnaby/releases) — portable `.exe` for Windows. No install required.
|
|
15
|
+
|
|
16
|
+
### Option 2: npm (requires Node.js 20+)
|
|
17
|
+
|
|
18
|
+
**Quick run:**
|
|
19
|
+
```bash
|
|
20
|
+
npx '@barnaby.build/barnaby'
|
|
21
|
+
```
|
|
22
|
+
*PowerShell: use single quotes as shown. Bash/zsh: quotes optional.*
|
|
23
|
+
|
|
24
|
+
**Global install:**
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g '@barnaby.build/barnaby'
|
|
27
|
+
barnaby
|
|
28
|
+
```
|
|
29
|
+
*PowerShell: use single quotes around the package name.*
|
|
30
|
+
|
|
31
|
+
**Windows (npm install):** A Start menu shortcut is created automatically. Search "Barnaby" in Start. For correct taskbar icon, **pin the shortcut** (right‑click → Pin to taskbar), not the running window.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
10
35
|
Latest Binary Release
|
|
11
36
|
[Download Barnaby v0.0.125](https://github.com/incendiosoftware/Barnaby/releases/tag/v0.0.125)
|
|
12
37
|
|
package/bin/barnaby.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barnaby.build/barnaby",
|
|
3
3
|
"productName": "Barnaby",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.132",
|
|
5
5
|
"main": "dist-electron/main/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"barnaby": "bin/barnaby.cjs"
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"dist-electron",
|
|
12
12
|
"public",
|
|
13
13
|
"bin",
|
|
14
|
+
"scripts",
|
|
14
15
|
"package.json"
|
|
15
16
|
],
|
|
16
17
|
"description": "Barnaby: local agent loops without API keys.",
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
},
|
|
27
28
|
"type": "module",
|
|
28
29
|
"engines": {
|
|
29
|
-
"node": ">=20 <
|
|
30
|
+
"node": ">=20 <26"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"bump:version": "node scripts/bump-version.mjs",
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"release:notes": "node scripts/create-release-notes.mjs",
|
|
45
46
|
"release:prepare": "npm run bump:version && npm run release:notes && npm run build:portable:raw",
|
|
46
47
|
"publish": "gh workflow run release.yml -f releasable=true --ref main",
|
|
48
|
+
"postinstall": "node scripts/shortcut-win.mjs",
|
|
47
49
|
"publish:npm": "npm run build && npm publish",
|
|
48
50
|
"package:win": "npm run build:dist && electron-packager . Barnaby --platform=win32 --arch=x64 --out=release/0.0.1/packaged --overwrite --asar --prune=true --icon=build/icon.png",
|
|
49
51
|
"preview": "vite preview",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"@uiw/react-codemirror": "^4.25.4",
|
|
69
71
|
"@xterm/addon-fit": "^0.11.0",
|
|
70
72
|
"@xterm/xterm": "^5.3.0",
|
|
73
|
+
"barnaby": "^0.2.0",
|
|
71
74
|
"electron-updater": "^6.3.9",
|
|
72
75
|
"node-pty": "^1.0.0",
|
|
73
76
|
"react-markdown": "^10.1.0",
|
|
@@ -75,6 +78,9 @@
|
|
|
75
78
|
"react-syntax-highlighter": "^16.1.0",
|
|
76
79
|
"remark-gfm": "^4.0.1"
|
|
77
80
|
},
|
|
81
|
+
"optionalDependencies": {
|
|
82
|
+
"electron": "^40.6.0"
|
|
83
|
+
},
|
|
78
84
|
"devDependencies": {
|
|
79
85
|
"@electron/packager": "^19.0.5",
|
|
80
86
|
"@playwright/test": "^1.48.2",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
const root = process.cwd()
|
|
5
|
+
const packageJsonPath = path.join(root, 'package.json')
|
|
6
|
+
const packageLockPath = path.join(root, 'package-lock.json')
|
|
7
|
+
|
|
8
|
+
function bumpPatch(version) {
|
|
9
|
+
const parts = String(version).trim().split('.')
|
|
10
|
+
if (parts.length !== 3) {
|
|
11
|
+
throw new Error(`Expected semantic version x.y.z, got "${version}"`)
|
|
12
|
+
}
|
|
13
|
+
const [major, minor, patch] = parts.map((p) => Number(p))
|
|
14
|
+
if ([major, minor, patch].some((n) => Number.isNaN(n))) {
|
|
15
|
+
throw new Error(`Expected numeric semantic version, got "${version}"`)
|
|
16
|
+
}
|
|
17
|
+
return `${major}.${minor}.${patch + 1}`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
|
21
|
+
const currentVersion = packageJson.version
|
|
22
|
+
const nextVersion = bumpPatch(currentVersion)
|
|
23
|
+
packageJson.version = nextVersion
|
|
24
|
+
fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`, 'utf8')
|
|
25
|
+
|
|
26
|
+
if (fs.existsSync(packageLockPath)) {
|
|
27
|
+
const packageLock = JSON.parse(fs.readFileSync(packageLockPath, 'utf8'))
|
|
28
|
+
if (typeof packageLock.version === 'string') packageLock.version = nextVersion
|
|
29
|
+
if (packageLock.packages && packageLock.packages[''] && typeof packageLock.packages[''].version === 'string') {
|
|
30
|
+
packageLock.packages[''].version = nextVersion
|
|
31
|
+
}
|
|
32
|
+
fs.writeFileSync(packageLockPath, `${JSON.stringify(packageLock, null, 2)}\n`, 'utf8')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
console.log(`Version bumped: ${currentVersion} -> ${nextVersion}`)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
const root = process.cwd()
|
|
5
|
+
const packageJsonPath = path.join(root, 'package.json')
|
|
6
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
|
7
|
+
const version = String(packageJson.version || '').trim()
|
|
8
|
+
|
|
9
|
+
if (!version) {
|
|
10
|
+
throw new Error('package.json version is missing.')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const notesFilename = `RELEASE_NOTES_${version}.md`
|
|
14
|
+
const notesPath = path.join(root, notesFilename)
|
|
15
|
+
|
|
16
|
+
if (fs.existsSync(notesPath)) {
|
|
17
|
+
console.log(`Release notes already exist: ${notesFilename}`)
|
|
18
|
+
process.exit(0)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const now = new Date()
|
|
22
|
+
const month = now.toLocaleString('en-US', { month: 'long' })
|
|
23
|
+
const year = now.getFullYear()
|
|
24
|
+
|
|
25
|
+
const template = `# Barnaby ${version} - Release Notes
|
|
26
|
+
|
|
27
|
+
**Released:** ${month} ${year}
|
|
28
|
+
|
|
29
|
+
## Added
|
|
30
|
+
|
|
31
|
+
- TODO
|
|
32
|
+
|
|
33
|
+
## Changed
|
|
34
|
+
|
|
35
|
+
- TODO
|
|
36
|
+
|
|
37
|
+
## Fixed
|
|
38
|
+
|
|
39
|
+
- TODO
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- Artifact: \`release/${version}/Barnaby_${version}_portable.exe\`
|
|
44
|
+
`
|
|
45
|
+
|
|
46
|
+
fs.writeFileSync(notesPath, template, 'utf8')
|
|
47
|
+
console.log(`Created ${notesFilename}`)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process'
|
|
2
|
+
|
|
3
|
+
function run(cmd) {
|
|
4
|
+
try {
|
|
5
|
+
execSync(cmd, { stdio: 'pipe', windowsHide: true })
|
|
6
|
+
} catch {
|
|
7
|
+
// best effort cleanup only
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (process.platform === 'win32') {
|
|
12
|
+
// Free Vite default port if stale process is still attached.
|
|
13
|
+
run(
|
|
14
|
+
`powershell -NoProfile -ExecutionPolicy Bypass -Command "$p = netstat -ano | Select-String ':5173' | ForEach-Object { ($_ -split '\\s+')[-1] } | Sort-Object -Unique; foreach ($id in $p) { try { Stop-Process -Id ([int]$id) -Force -ErrorAction Stop } catch {} }"`,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
// Kill stale Electron instances from this workspace.
|
|
18
|
+
run(
|
|
19
|
+
`powershell -NoProfile -ExecutionPolicy Bypass -Command "Get-Process electron -ErrorAction SilentlyContinue | Where-Object { $_.Path -like '*AgentOrchestrator*\\\\node_modules\\\\electron\\\\dist\\\\electron.exe' } | ForEach-Object { try { Stop-Process -Id $_.Id -Force -ErrorAction Stop } catch {} }"`,
|
|
20
|
+
)
|
|
21
|
+
} else {
|
|
22
|
+
// Unix-like fallback: free 5173 and terminate matching electron instances.
|
|
23
|
+
run(`sh -lc "lsof -ti :5173 | xargs -r kill -9"`)
|
|
24
|
+
run(`sh -lc "ps aux | grep '[e]lectron' | grep 'AgentOrchestrator' | awk '{print $2}' | xargs -r kill -9"`)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
console.log('dev-clean completed')
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Creates a Start menu shortcut for Barnaby on Windows (global install only).
|
|
4
|
+
* Fixes: (1) App not findable in Windows search (2) Taskbar pinning shows Electron.
|
|
5
|
+
* Tip: Pin the "Barnaby" shortcut from Start menu to taskbar for correct icon.
|
|
6
|
+
*/
|
|
7
|
+
import { platform } from 'node:os'
|
|
8
|
+
import { existsSync, writeFileSync } from 'node:fs'
|
|
9
|
+
import { dirname, join } from 'node:path'
|
|
10
|
+
import { fileURLToPath } from 'node:url'
|
|
11
|
+
import { execSync } from 'node:child_process'
|
|
12
|
+
|
|
13
|
+
function main() {
|
|
14
|
+
if (platform() !== 'win32') return
|
|
15
|
+
if (process.env.npm_config_global !== 'true') return
|
|
16
|
+
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
18
|
+
const pkgRoot = join(__dirname, '..')
|
|
19
|
+
|
|
20
|
+
// Use node + our script directly (barnaby.cmd may not exist yet when postinstall runs)
|
|
21
|
+
const barnabyScript = join(pkgRoot, 'bin', 'barnaby.cjs')
|
|
22
|
+
if (!existsSync(barnabyScript)) return
|
|
23
|
+
const nodeExe = process.execPath
|
|
24
|
+
|
|
25
|
+
const iconPath = [
|
|
26
|
+
join(pkgRoot, 'dist', 'appicon.png'),
|
|
27
|
+
join(pkgRoot, 'public', 'appicon.png'),
|
|
28
|
+
join(pkgRoot, 'dist', 'favicon.ico'),
|
|
29
|
+
join(pkgRoot, 'public', 'favicon.ico'),
|
|
30
|
+
join(pkgRoot, 'build', 'icon.png')
|
|
31
|
+
].find(existsSync)
|
|
32
|
+
const startMenuDir = join(process.env.APPDATA || '', 'Microsoft', 'Windows', 'Start Menu', 'Programs')
|
|
33
|
+
const shortcutPath = join(startMenuDir, 'Barnaby.lnk')
|
|
34
|
+
|
|
35
|
+
const ps = `
|
|
36
|
+
$WshShell = New-Object -ComObject WScript.Shell
|
|
37
|
+
$Shortcut = $WshShell.CreateShortcut('${shortcutPath.replace(/'/g, "''")}')
|
|
38
|
+
$Shortcut.TargetPath = '${nodeExe.replace(/'/g, "''")}'
|
|
39
|
+
$Shortcut.Arguments = '${barnabyScript.replace(/'/g, "''")}'
|
|
40
|
+
$Shortcut.WorkingDirectory = '${(process.env.USERPROFILE || '').replace(/'/g, "''")}'
|
|
41
|
+
$Shortcut.Description = 'Barnaby - AI agent IDE'
|
|
42
|
+
${iconPath ? `if (Test-Path '${iconPath.replace(/'/g, "''")}') { $Shortcut.IconLocation = '${iconPath.replace(/'/g, "''")},0' }` : ''}
|
|
43
|
+
$Shortcut.Save()
|
|
44
|
+
`
|
|
45
|
+
try {
|
|
46
|
+
const tmp = join(process.env.TEMP || '', 'barnaby-shortcut.ps1')
|
|
47
|
+
writeFileSync(tmp, ps.trim(), 'utf8')
|
|
48
|
+
execSync(`powershell -NoProfile -ExecutionPolicy Bypass -File "${tmp}"`, { stdio: 'pipe' })
|
|
49
|
+
console.log('[Barnaby] Start menu shortcut created. Pin it to taskbar for the correct icon.')
|
|
50
|
+
} catch {
|
|
51
|
+
// Silent fail - shortcut is optional
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
main()
|