coban 0.2.1 → 0.2.2

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 CHANGED
@@ -57,6 +57,26 @@ npm install -g coban
57
57
  cd ~/your-project && coban
58
58
  ```
59
59
 
60
+ ### First run
61
+
62
+ On first start coban writes `~/.config/coban/config.json` and only offers what it finds: `claude`, `codex`,
63
+ `opencode` and `cursor-agent` that are on your `PATH`. A plain `claude` login (`~/.claude`) becomes profile `h1`.
64
+ More Claude accounts appear as `h2`/`h3` when `~/.claude-hesap2` / `~/.claude-hesap3` exist (log in with
65
+ `CLAUDE_CONFIG_DIR=~/.claude-hesap2 claude`). Edit the file any time, see Config below.
66
+
67
+ Note: the prompts coban gives the orchestrator and workers, and `coban --help`, are currently in Turkish.
68
+
69
+ ### Troubleshooting
70
+
71
+ | symptom | fix |
72
+ |---|---|
73
+ | `SyntaxError` / `ERR_UNKNOWN_FILE_EXTENSION` on start | Node is too old, check `node -v` (needs ≥ 24) |
74
+ | agent panel opens but asks to log in | log in once with that CLI (`claude`, `codex`...) outside coban, using the same `CLAUDE_CONFIG_DIR` as the profile |
75
+ | a profile is missing | its CLI is not on `PATH` when coban first ran: install it and delete the config file, or add the profile by hand |
76
+ | `coban çalışmıyor` from a `coban ...` command | open the TUI first with plain `coban`: those commands talk to the running app |
77
+ | stale socket after a crash | `rm ~/.coban/coban.sock` |
78
+ | Codex cannot talk to coban | its sandbox may block the unix socket, see Known gaps |
79
+
60
80
  ### From source (development)
61
81
 
62
82
  In a clone, TypeScript runs directly with no build step:
package/dist/config.js CHANGED
@@ -20,6 +20,33 @@ const claude = (n, model, color) => ({
20
20
  env: { CLAUDE_CONFIG_DIR: `~/.claude-hesap${n}` },
21
21
  color,
22
22
  });
23
+ const onPath = (bin) => (process.env.PATH ?? '').split(path.delimiter).some((d) => d && fs.existsSync(path.join(d, bin)));
24
+ // First run on a fresh machine: only offer what is actually installed. A single `claude` login (~/.claude) becomes
25
+ // h1; extra accounts (h2, h3) appear only when their own config dir (~/.claude-hesapN) already exists.
26
+ export function detectConfig() {
27
+ const profiles = [];
28
+ if (onPath('claude')) {
29
+ const h1 = claude(1, OPUS, '#F6D5C8');
30
+ if (!fs.existsSync(path.join(os.homedir(), '.claude-hesap1')))
31
+ delete h1.env;
32
+ profiles.push(h1);
33
+ for (const n of [2, 3]) {
34
+ if (fs.existsSync(path.join(os.homedir(), `.claude-hesap${n}`)))
35
+ profiles.push(claude(n, SONNET, n === 2 ? '#FFD9A0' : '#C8E6C9'));
36
+ }
37
+ }
38
+ for (const p of DEFAULT_CONFIG.profiles) {
39
+ if (!p.id.match(/^h\d$/) && onPath(p.cmd.split(' ')[0]))
40
+ profiles.push(p);
41
+ }
42
+ if (!profiles.length)
43
+ return DEFAULT_CONFIG; // nothing found: keep the full template to edit
44
+ const orchestrator = profiles[0].id;
45
+ const cfg = { ...DEFAULT_CONFIG, orchestrator, profiles };
46
+ if (!/^h\d$/.test(orchestrator))
47
+ delete cfg.orchestratorModel; // the Sonnet override is a Claude model id
48
+ return cfg;
49
+ }
23
50
  export const DEFAULT_CONFIG = {
24
51
  orchestrator: 'h1',
25
52
  // Coordination is mostly reading and routing, so the orchestrator runs on Sonnet;
@@ -38,7 +65,7 @@ const expand = (v) => v.replace(/^~(?=\/|$)/, os.homedir());
38
65
  export function loadConfig() {
39
66
  if (!fs.existsSync(CONFIG_PATH)) {
40
67
  fs.mkdirSync(path.dirname(CONFIG_PATH), { recursive: true });
41
- fs.writeFileSync(CONFIG_PATH, JSON.stringify(DEFAULT_CONFIG, null, 2) + '\n');
68
+ fs.writeFileSync(CONFIG_PATH, JSON.stringify(detectConfig(), null, 2) + '\n');
42
69
  }
43
70
  const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8'));
44
71
  for (const p of cfg.profiles) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coban",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "A terminal app where one orchestrator agent dispatches work to many AI coding agents — several Claude Code accounts, Codex, OpenCode, Cursor — that message each other over a shared board.",
5
5
  "scripts": {
6
6
  "postinstall": "node -e \"for(const a of ['darwin-arm64','darwin-x64','linux-x64','linux-arm64']){try{require('fs').chmodSync(require.resolve('node-pty/package.json').replace('package.json','prebuilds/'+a+'/spawn-helper'),0o755)}catch{}}\"",