input-kanban 0.0.2 → 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/ENVIRONMENT.md +10 -1
- package/PROJECT_GUIDE.md +36 -4
- package/README.en.md +13 -1
- package/README.md +13 -1
- package/bin/input-kanban-format-events.js +12 -0
- package/bin/input-kanban-tmux-overview.js +66 -0
- package/bin/input-kanban.js +12 -1
- package/package.json +2 -2
- package/public/index.html +166 -29
- package/src/eventFormatter.js +85 -0
- package/src/orchestrator.js +139 -131
- package/src/runners/headlessRunner.js +51 -0
- package/src/runners/index.js +13 -0
- package/src/runners/tmuxRunner.js +220 -0
- package/src/runners/tmuxUtils.js +17 -0
- package/src/server.js +3 -3
- package/src/tmux.js +156 -0
- package/src/utils.js +9 -0
package/ENVIRONMENT.md
CHANGED
|
@@ -11,6 +11,7 @@ CLI options take precedence over environment variables. Environment variables ta
|
|
|
11
11
|
- `KANBAN_DEFAULT_REPO`: Default target repository path for new runs. Default: the current working directory when `input-kanban` is launched. CLI option: `--repo`.
|
|
12
12
|
- `KANBAN_RUNS_DIR`: Directory for run state, logs, and artifacts. Default: `.input-kanban/runs` under the user's home directory. CLI option: `--runs-dir`.
|
|
13
13
|
- `KANBAN_CODEX_BIN`: Codex CLI executable name or path. Default: `codex`. CLI option: `--codex-bin`.
|
|
14
|
+
- `KANBAN_RUNNER`: Runner mode. Supported values: `headless`, `tmux`. Default: `headless`. CLI option: `--runner`.
|
|
14
15
|
|
|
15
16
|
## Environment Example
|
|
16
17
|
|
|
@@ -19,6 +20,7 @@ PORT=8787 \
|
|
|
19
20
|
KANBAN_DEFAULT_REPO=/path/to/child-repo \
|
|
20
21
|
KANBAN_RUNS_DIR=/path/to/kanban-runs \
|
|
21
22
|
KANBAN_CODEX_BIN=codex \
|
|
23
|
+
KANBAN_RUNNER=headless \
|
|
22
24
|
input-kanban
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -29,11 +31,18 @@ input-kanban \
|
|
|
29
31
|
--port 8787 \
|
|
30
32
|
--repo /path/to/child-repo \
|
|
31
33
|
--runs-dir /path/to/kanban-runs \
|
|
32
|
-
--codex-bin codex
|
|
34
|
+
--codex-bin codex \
|
|
35
|
+
--runner headless
|
|
33
36
|
```
|
|
34
37
|
|
|
35
38
|
## Notes
|
|
36
39
|
|
|
37
40
|
- `KANBAN_DEFAULT_REPO` / `--repo` should point to the actual git repository where work should run.
|
|
41
|
+
- `KANBAN_RUNNER` / `--runner tmux` runs Codex tasks inside tmux windows while keeping scheduling and status tracking in the Node.js orchestrator.
|
|
42
|
+
- `KANBAN_RUNNER=tmux` is optional. Use it when you want live terminal visibility into planner, worker, and final judge sessions.
|
|
43
|
+
- tmux mode uses one session per run and one window for planner, each batch, and judge. Batch windows contain an overview pane plus worker panes.
|
|
44
|
+
- tmux role windows stay open after the Codex command exits. The runner writes `exit_code` before entering the keep-open shell so Node.js status refresh can continue to advance from filesystem state.
|
|
45
|
+
- The dashboard exposes the run-level `tmux attach-session` copy action after tmux metadata is available. File viewer panels do not repeat tmux terminal details.
|
|
46
|
+
- `codex exec` is non-interactive in current supported usage. tmux mode does not implement automatic approval and does not turn `codex exec` into an approval UI.
|
|
38
47
|
- The runtime runs directory contains task text, logs, model output, artifacts, and possible audit information. It should not be committed to git.
|
|
39
48
|
- Avoid writing machine-specific absolute paths into public or shared documentation.
|
package/PROJECT_GUIDE.md
CHANGED
|
@@ -7,7 +7,7 @@ This document explains how Input Kanban is implemented so that humans and coding
|
|
|
7
7
|
Implementation status:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
mvp / batch-scheduler / codex-exec-primary / buildkite-style-ui / manual-recovery / stop-archive / cli-bootstrap
|
|
10
|
+
mvp / batch-scheduler / codex-exec-primary / tmux-batch-layout / buildkite-style-ui / manual-recovery / stop-archive / cli-bootstrap
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Recent validation:
|
|
@@ -37,6 +37,10 @@ The intended use case is:
|
|
|
37
37
|
- Workers can modify the target repository. Failed workers are not automatically retried because a partial modification may already exist.
|
|
38
38
|
- The planner only creates a plan and does not modify the target repo. Planner failures, invalid output, and empty plans can be safely retried before any worker or judge starts.
|
|
39
39
|
- Local process state, `exit_code`, logs, and artifacts are the source of truth. Codex App Server session lookup is auxiliary.
|
|
40
|
+
- tmux mode changes terminal visibility only. Node.js still owns scheduling, batch barriers, `maxParallel`, stop/archive, `judge_input.json`, and status refresh from `exit_code` plus artifacts.
|
|
41
|
+
- tmux windows stay open after command completion for human inspection, but `exit_code` is written before the keep-open shell starts so state can advance without closing the window.
|
|
42
|
+
- Dashboard tmux attach copy actions are shown only after tmux metadata is present. The file viewer does not repeat tmux terminal details.
|
|
43
|
+
- `codex exec` is treated as non-interactive; tmux mode provides live terminal visibility, not an approval UI.
|
|
40
44
|
- There is no batch-level judge. Only one final judge pass runs after all batches complete.
|
|
41
45
|
|
|
42
46
|
## CLI Entry
|
|
@@ -98,7 +102,7 @@ A task is one worker inside a batch. Batch-level parallelism is controlled by `b
|
|
|
98
102
|
### Roles
|
|
99
103
|
|
|
100
104
|
- `planner`: read-only `codex exec` that returns a plan.
|
|
101
|
-
- `worker`:
|
|
105
|
+
- `worker`: `codex exec` that performs work. The run-level worker sandbox defaults to `workspace-write`, and the create form can explicitly select `read-only` or `danger-full-access`.
|
|
102
106
|
- `judge`: read-only `codex exec` that performs final evaluation.
|
|
103
107
|
|
|
104
108
|
## Run State Machine
|
|
@@ -219,12 +223,13 @@ It can read planner, worker, and judge files.
|
|
|
219
223
|
Current behavior:
|
|
220
224
|
|
|
221
225
|
- Selecting a task updates the file viewer title to `runId / taskId`.
|
|
222
|
-
-
|
|
226
|
+
- File tabs are role-specific. Planner, worker, and judge views expose only their common or relevant files.
|
|
227
|
+
- If a file tab is already open, switching tasks reloads the same file only when that role exposes the same tab; otherwise the file view is cleared.
|
|
223
228
|
- Auto refresh also reloads the selected task's selected file and attempts to preserve scroll position.
|
|
224
229
|
- `events.pretty` is a virtual file generated by formatting `events.jsonl` into a readable Chinese execution log.
|
|
225
230
|
- The execution view shows event counts and a jump-to-bottom button.
|
|
226
231
|
- `last_message.md` has a hover copy button in the top-left of the text area.
|
|
227
|
-
- `judge_input.json`
|
|
232
|
+
- `judge_input.json` and `verdict.json` are shown for the judge role. `exit_code` is not a default file tab because the task table already shows exit codes.
|
|
228
233
|
|
|
229
234
|
## Files and Responsibilities
|
|
230
235
|
|
|
@@ -322,6 +327,33 @@ npm run check
|
|
|
322
327
|
|
|
323
328
|
When editing `public/index.html`, also consider extracting the inline script and checking it with `node --check`.
|
|
324
329
|
|
|
330
|
+
## Manual Smoke Checklist
|
|
331
|
+
|
|
332
|
+
Use this checklist before an npm release when runner behavior or package contents
|
|
333
|
+
change. Record the exact commands, run ids, and artifact paths in the release
|
|
334
|
+
notes or handoff.
|
|
335
|
+
|
|
336
|
+
1. Headless runner:
|
|
337
|
+
- Start the app with `input-kanban --runner headless --runs-dir <tmp-runs-dir> --repo <target-repo> --port <free-port>`.
|
|
338
|
+
- Create a small run, plan it, dispatch at least one worker, and run the final judge if the plan requires it.
|
|
339
|
+
- Verify the run state reports `runner: headless`, no task exposes `tmux` metadata, and role directories contain the expected `prompt.md`, `events.jsonl`, `stderr.log`, `last_message.md`, and `exit_code` files.
|
|
340
|
+
- Stop the run and verify no unrelated local process is affected.
|
|
341
|
+
|
|
342
|
+
2. tmux runner, only when `tmux -V` succeeds:
|
|
343
|
+
- Start the app with `input-kanban --runner tmux --runs-dir <tmp-runs-dir> --repo <target-repo> --port <free-port>`.
|
|
344
|
+
- Create a small run and click Plan. Verify a session named `input-kanban-<runId>` exists and has a planner window.
|
|
345
|
+
- Dispatch workers. Verify each batch gets its own window with an overview pane plus worker panes, and each role directory writes `run.sh` and `tmux.json` with the expected `sessionName`, `windowName`, `target`, and `attachCommand`.
|
|
346
|
+
- Verify `run.sh` writes `exit_code` before printing the keep-open summary, then keeps the window open for manual inspection.
|
|
347
|
+
- Verify status refresh can advance planner, workers, and judge to `completed`, `planned`, or `judged` from filesystem state while tmux windows remain open.
|
|
348
|
+
- Verify the UI does not show run attach copy before tmux metadata exists, then shows `复制tmux attach指令` in the run detail header after metadata exists. Verify the file viewer does not show a separate tmux terminal info panel.
|
|
349
|
+
- Complete or stop the run. Verify stop removes only the exact `input-kanban-<runId>` tmux session and leaves any other tmux session running.
|
|
350
|
+
- Do not mark this smoke as passed when tmux is unavailable or when these tmux checks were not run.
|
|
351
|
+
|
|
352
|
+
3. Package dry run:
|
|
353
|
+
- Run `npm pack --dry-run`.
|
|
354
|
+
- Verify the package includes `bin/`, `src/`, `public/`, `README.md`, `README.en.md`, `PROJECT_GUIDE.md`, `ENVIRONMENT.md`, and `package.json`.
|
|
355
|
+
- Verify no runtime run directories, local logs, or unrelated temporary artifacts are included.
|
|
356
|
+
|
|
325
357
|
## Change Guidelines
|
|
326
358
|
|
|
327
359
|
- Do not add automatic worker retry unless there is a verified rollback or idempotency mechanism.
|
package/README.en.md
CHANGED
|
@@ -50,6 +50,7 @@ input-kanban --port 8787
|
|
|
50
50
|
input-kanban --host 127.0.0.1
|
|
51
51
|
input-kanban --runs-dir ~/.input-kanban/runs
|
|
52
52
|
input-kanban --codex-bin codex
|
|
53
|
+
input-kanban --runner headless
|
|
53
54
|
input-kanban --open
|
|
54
55
|
```
|
|
55
56
|
|
|
@@ -60,11 +61,20 @@ Defaults:
|
|
|
60
61
|
- port: `8787`
|
|
61
62
|
- runs directory: `~/.input-kanban/runs`
|
|
62
63
|
- Codex command: `codex`
|
|
64
|
+
- runner: `headless`
|
|
65
|
+
|
|
66
|
+
`--runner` currently supports `headless` and `tmux`. The default behavior remains `headless`; `tmux` creates one `input-kanban-<runId>` session per run and one window for the planner, each batch, and the final judge. A batch window contains an overview pane plus the worker panes for that batch.
|
|
67
|
+
|
|
68
|
+
tmux mode still leaves batch barriers, `maxParallel`, final judge sequencing, and `judge_input.json` generation in Node.js. Each role output directory gets `run.sh` and `tmux.json`; status continues to be driven by `events.jsonl`, `stderr.log`, `last_message.md`, `exit_code`, and existing artifact files. After a tmux role command finishes, it writes `exit_code` first and then keeps the window open for inspection; the user closes the window manually from tmux.
|
|
69
|
+
|
|
70
|
+
tmux mode is optional and intended for live terminal viewing of each Codex role. `codex exec` is currently non-interactive and does not normally show manual approval prompts; if you select `danger-full-access` when creating a run, you explicitly relax the worker sandbox and should only do so in a controlled test repository.
|
|
71
|
+
|
|
72
|
+
After run-level tmux metadata is available, the dashboard shows `Copy tmux attach command`. The file viewer no longer repeats tmux terminal details; use the run detail header to copy the attach command and inspect the tmux session.
|
|
63
73
|
|
|
64
74
|
## Using the Dashboard
|
|
65
75
|
|
|
66
76
|
1. Click `New Run`.
|
|
67
|
-
2. Enter a label, target repository, and task description.
|
|
77
|
+
2. Enter a label, target repository, worker sandbox, and task description.
|
|
68
78
|
3. Click `Create Run`.
|
|
69
79
|
4. Click `Plan` to let the Codex planner generate batches and workers.
|
|
70
80
|
5. Click `Dispatch` to run workers by batch barrier and concurrency limits.
|
|
@@ -77,6 +87,7 @@ Defaults:
|
|
|
77
87
|
- Split a larger Codex programming task into multiple workers.
|
|
78
88
|
- Control execution order with batch barriers.
|
|
79
89
|
- Observe each worker's local status, logs, and final response.
|
|
90
|
+
- In tmux runner mode, inspect an overview pane and worker panes inside each batch window.
|
|
80
91
|
- Run a final judge after all workers complete.
|
|
81
92
|
- Keep local run records for debugging and recovery.
|
|
82
93
|
|
|
@@ -108,6 +119,7 @@ These files are local run records and do not need to be committed to your applic
|
|
|
108
119
|
|
|
109
120
|
- Node.js 20 or newer.
|
|
110
121
|
- Codex CLI installed and configured.
|
|
122
|
+
- `tmux` installed when using `--runner tmux`.
|
|
111
123
|
- The `codex` command works in your terminal, or `--codex-bin` points to the Codex executable.
|
|
112
124
|
|
|
113
125
|
## Maintainer Development
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ input-kanban --port 8787
|
|
|
50
50
|
input-kanban --host 127.0.0.1
|
|
51
51
|
input-kanban --runs-dir ~/.input-kanban/runs
|
|
52
52
|
input-kanban --codex-bin codex
|
|
53
|
+
input-kanban --runner headless
|
|
53
54
|
input-kanban --open
|
|
54
55
|
```
|
|
55
56
|
|
|
@@ -60,11 +61,20 @@ input-kanban --open
|
|
|
60
61
|
- port:`8787`
|
|
61
62
|
- runs 目录:`~/.input-kanban/runs`
|
|
62
63
|
- Codex 命令:`codex`
|
|
64
|
+
- runner:`headless`
|
|
65
|
+
|
|
66
|
+
`--runner` 当前支持 `headless` 和 `tmux`。默认行为保持 `headless`;`tmux` 会为每个 run 创建一个 `input-kanban-<runId>` session,并为 planner、每个 batch、final judge 创建独立 window。batch window 内包含 overview pane 和对应 worker panes。
|
|
67
|
+
|
|
68
|
+
tmux 模式仍由 Node.js 负责 batch barrier、`maxParallel`、final judge 顺序和 `judge_input.json` 生成。每个角色输出目录会写入 `run.sh` 和 `tmux.json`,状态继续由 `events.jsonl`、`stderr.log`、`last_message.md`、`exit_code` 和既有 artifact 文件驱动。tmux 角色命令完成后会先写入 `exit_code`,再保留 window,方便查看现场;需要关闭时由用户在 tmux 里手动退出。
|
|
69
|
+
|
|
70
|
+
tmux 模式是可选能力,主要用于在终端里实时查看每个 Codex 角色的执行过程。`codex exec` 当前属于非交互模式,默认不会弹出人工 approval;如果创建任务时选择 `danger-full-access`,表示显式放开 worker sandbox 限制,应只在受控测试仓库中使用。
|
|
71
|
+
|
|
72
|
+
看板会在 run 生成 tmux 元数据后显示 `复制tmux attach指令`。文件查看区域不再重复展示 tmux 终端信息;如需查看现场,请从批次详情顶部复制 attach 指令进入 tmux session。
|
|
63
73
|
|
|
64
74
|
## 在看板里如何使用
|
|
65
75
|
|
|
66
76
|
1. 点击 `新建任务批次`。
|
|
67
|
-
2.
|
|
77
|
+
2. 输入批次名称、目标仓库、Worker 沙箱和任务说明。
|
|
68
78
|
3. 点击 `创建批次`。
|
|
69
79
|
4. 点击 `拆分任务`,让 Codex planner 生成 batches 和 workers。
|
|
70
80
|
5. 点击 `派发执行`,按 batch barrier 和并发限制运行 workers。
|
|
@@ -77,6 +87,7 @@ input-kanban --open
|
|
|
77
87
|
- 把一个较大的 Codex 编程任务拆成多个 worker。
|
|
78
88
|
- 按批次阻塞关系控制执行顺序。
|
|
79
89
|
- 在本地观察每个 worker 的状态、日志和最终回复。
|
|
90
|
+
- 使用 tmux runner 时,在每个 batch window 中查看 overview pane 和 worker panes。
|
|
80
91
|
- 在所有 worker 完成后,让 final judge 汇总验收。
|
|
81
92
|
- 保留本地运行记录,便于排查和恢复。
|
|
82
93
|
|
|
@@ -108,6 +119,7 @@ runs/<runId>/
|
|
|
108
119
|
|
|
109
120
|
- 已安装 Node.js 20 或更高版本。
|
|
110
121
|
- 已安装并配置可用的 Codex CLI。
|
|
122
|
+
- 如需使用 `--runner tmux`,本机需要安装可用的 `tmux`。
|
|
111
123
|
- `codex` 命令能在终端中正常运行,或通过 `--codex-bin` 指定 Codex 可执行文件路径。
|
|
112
124
|
|
|
113
125
|
## 维护者开发
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import readline from 'node:readline';
|
|
3
|
+
import { formatCodexEventLine } from '../src/eventFormatter.js';
|
|
4
|
+
|
|
5
|
+
const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
|
|
6
|
+
let index = 0;
|
|
7
|
+
|
|
8
|
+
rl.on('line', line => {
|
|
9
|
+
if (!line.trim()) return;
|
|
10
|
+
console.log(formatCodexEventLine(line, index++));
|
|
11
|
+
console.log('');
|
|
12
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
|
|
4
|
+
const statePath = process.argv[2];
|
|
5
|
+
|
|
6
|
+
function readState() {
|
|
7
|
+
if (!statePath) return null;
|
|
8
|
+
try { return JSON.parse(fs.readFileSync(statePath, 'utf8')); }
|
|
9
|
+
catch { return null; }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function countTasks(tasks = []) {
|
|
13
|
+
return {
|
|
14
|
+
total: tasks.length,
|
|
15
|
+
pending: tasks.filter(task => task.status === 'pending').length,
|
|
16
|
+
running: tasks.filter(task => task.status === 'running').length,
|
|
17
|
+
completed: tasks.filter(task => task.status === 'completed').length,
|
|
18
|
+
failed: tasks.filter(task => ['failed', 'unknown'].includes(task.status)).length,
|
|
19
|
+
stopped: tasks.filter(task => task.status === 'stopped').length
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function line(label, value) {
|
|
24
|
+
console.log(`${label.padEnd(12)} ${value}`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const state = readState();
|
|
28
|
+
const now = new Date().toLocaleString();
|
|
29
|
+
console.log('Input Kanban tmux Overview');
|
|
30
|
+
console.log('='.repeat(32));
|
|
31
|
+
console.log(`Updated ${now}`);
|
|
32
|
+
|
|
33
|
+
if (!state) {
|
|
34
|
+
console.log('Waiting for run_state.json...');
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
line('Run', state.runId || '-');
|
|
39
|
+
line('Label', state.label || '-');
|
|
40
|
+
line('Status', state.status || '-');
|
|
41
|
+
line('Repo', state.repo || '-');
|
|
42
|
+
console.log('');
|
|
43
|
+
|
|
44
|
+
const batches = Array.isArray(state.batches) ? state.batches : [];
|
|
45
|
+
const plannerStatus = state.planner?.status || 'pending';
|
|
46
|
+
const judgeStatus = state.judge?.status || 'pending';
|
|
47
|
+
console.log(`Special planner=${plannerStatus} judge=${judgeStatus}`);
|
|
48
|
+
console.log(`Batches ${batches.length}`);
|
|
49
|
+
console.log('');
|
|
50
|
+
|
|
51
|
+
if (!batches.length) {
|
|
52
|
+
console.log('No worker batches materialized yet.');
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
for (const [index, batch] of batches.entries()) {
|
|
57
|
+
const tasks = Array.isArray(batch.tasks) ? batch.tasks : [];
|
|
58
|
+
const counts = countTasks(tasks);
|
|
59
|
+
console.log(`${index + 1}. ${batch.id || `batch-${index + 1}`} ${batch.status || 'pending'} maxParallel=${batch.maxParallel || '-'} workers=${counts.total}`);
|
|
60
|
+
console.log(` completed=${counts.completed} running=${counts.running} pending=${counts.pending} failed=${counts.failed} stopped=${counts.stopped}`);
|
|
61
|
+
for (const task of tasks) {
|
|
62
|
+
const tmux = task.tmux?.ready ? ` window=${task.tmux.windowName || '-'} pane=${task.tmux.paneId || '-'}` : '';
|
|
63
|
+
console.log(` - ${task.id || '-'} ${task.status || 'pending'}${tmux}`);
|
|
64
|
+
}
|
|
65
|
+
console.log('');
|
|
66
|
+
}
|
package/bin/input-kanban.js
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
4
|
|
|
5
|
+
const VALID_RUNNERS = ['headless', 'tmux'];
|
|
6
|
+
|
|
7
|
+
function validateRunner(value, source) {
|
|
8
|
+
if (VALID_RUNNERS.includes(value)) return value;
|
|
9
|
+
throw new Error(`invalid ${source}: ${value}; expected one of: ${VALID_RUNNERS.join(', ')}`);
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
function parseArgs(argv) {
|
|
6
|
-
const args = { host: '127.0.0.1', port: undefined, repo: undefined, runsDir: undefined, codexBin: undefined, open: false, help: false };
|
|
13
|
+
const args = { host: '127.0.0.1', port: undefined, repo: undefined, runsDir: undefined, codexBin: undefined, runner: undefined, open: false, help: false };
|
|
7
14
|
for (let i = 0; i < argv.length; i++) {
|
|
8
15
|
const arg = argv[i];
|
|
9
16
|
const next = () => argv[++i];
|
|
@@ -15,6 +22,7 @@ function parseArgs(argv) {
|
|
|
15
22
|
else if (arg === '--repo' || arg === '-r') args.repo = next();
|
|
16
23
|
else if (arg === '--runs-dir') args.runsDir = next();
|
|
17
24
|
else if (arg === '--codex-bin') args.codexBin = next();
|
|
25
|
+
else if (arg === '--runner') args.runner = validateRunner(next(), '--runner');
|
|
18
26
|
else throw new Error(`unknown argument: ${arg}`);
|
|
19
27
|
}
|
|
20
28
|
return args;
|
|
@@ -32,6 +40,7 @@ Options:
|
|
|
32
40
|
-r, --repo <path> Default target repository, default current directory
|
|
33
41
|
--runs-dir <path> Runtime runs directory, default ~/.input-kanban/runs
|
|
34
42
|
--codex-bin <path> Codex CLI executable, default codex
|
|
43
|
+
--runner <mode> Runner mode: headless or tmux, default headless
|
|
35
44
|
--open Open browser after starting
|
|
36
45
|
--no-open Do not open browser, default
|
|
37
46
|
-h, --help Show help
|
|
@@ -54,6 +63,7 @@ try {
|
|
|
54
63
|
else if (!process.env.KANBAN_DEFAULT_REPO) process.env.KANBAN_DEFAULT_REPO = process.cwd();
|
|
55
64
|
if (args.runsDir) process.env.KANBAN_RUNS_DIR = path.resolve(args.runsDir);
|
|
56
65
|
if (args.codexBin) process.env.KANBAN_CODEX_BIN = args.codexBin;
|
|
66
|
+
if (args.runner) process.env.KANBAN_RUNNER = args.runner;
|
|
57
67
|
|
|
58
68
|
const { startServer } = await import('../src/server.js');
|
|
59
69
|
const instance = await startServer({ host: process.env.HOST, port: Number(process.env.PORT || 8787), log: false });
|
|
@@ -61,6 +71,7 @@ try {
|
|
|
61
71
|
console.log(`URL: ${instance.url}`);
|
|
62
72
|
console.log(`Repo: ${instance.defaultRepo}`);
|
|
63
73
|
console.log(`Runs: ${instance.runsDir}`);
|
|
74
|
+
console.log(`Runner: ${instance.runner}`);
|
|
64
75
|
if (args.open) openBrowser(instance.url);
|
|
65
76
|
const shutdown = () => { instance.stop().finally(() => process.exit(0)); };
|
|
66
77
|
process.on('SIGINT', shutdown);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "input-kanban",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"input-kanban": "bin/input-kanban.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"start": "node bin/input-kanban.js",
|
|
10
|
-
"check": "node --check bin/input-kanban.js && node --check src/server.js && node --check src/orchestrator.js && node --check src/appServerClient.js && node --check src/utils.js"
|
|
10
|
+
"check": "node --check bin/input-kanban.js && node --check bin/input-kanban-format-events.js && node --check bin/input-kanban-tmux-overview.js && node --check src/server.js && node --check src/orchestrator.js && node --check src/appServerClient.js && node --check src/utils.js && node --check src/eventFormatter.js && node --check src/runners/index.js && node --check src/runners/headlessRunner.js && node --check src/runners/tmuxRunner.js && node --check src/runners/tmuxUtils.js && node --check src/tmux.js && node --test"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {},
|
|
13
13
|
"description": "A local Codex orchestration kanban dashboard",
|