input-kanban 0.0.9 → 0.0.10

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 CHANGED
@@ -8,16 +8,18 @@ CLI options take precedence over environment variables. Environment variables ta
8
8
 
9
9
  - `PORT`: HTTP server port. Default: `8787`. CLI option: `--port`.
10
10
  - `HOST`: HTTP bind host. Default: `127.0.0.1`. CLI option: `--host`.
11
- - `KANBAN_DEFAULT_REPO`: Default target repository path for new runs. Default: the current working directory when `input-kanban` is launched. CLI option: `--repo`. Creating a run validates that this path is inside a Git work tree.
11
+ - `KANBAN_DEFAULT_WORKSPACE`: Default workspace path for new runs. Default: the current working directory when `input-kanban` is launched. CLI option: `--workspace`. `KANBAN_DEFAULT_REPO` remains as a compatibility alias. Creating a run only requires this path to exist and be a directory; Git is detected and marked when available.
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
14
  - `KANBAN_RUNNER`: Runner mode. Supported values: `headless`, `tmux`. Default: `headless`. CLI option: `--runner`.
15
+ - `KANBAN_AUTO_POLL_MS`: Poll interval for the Web server background scheduler. Default: `3000`.
16
+ - `KANBAN_AUTO_MAX_RETRIES`: Maximum automatic retries for recoverable failed/unknown tasks in the scheduler. Default: `1`.
15
17
 
16
18
  ## Environment Example
17
19
 
18
20
  ```bash
19
21
  PORT=8787 \
20
- KANBAN_DEFAULT_REPO=/path/to/child-repo \
22
+ KANBAN_DEFAULT_WORKSPACE=/path/to/workspace \
21
23
  KANBAN_RUNS_DIR=/path/to/kanban-runs \
22
24
  KANBAN_CODEX_BIN=codex \
23
25
  KANBAN_RUNNER=headless \
@@ -29,7 +31,7 @@ input-kanban
29
31
  ```bash
30
32
  input-kanban \
31
33
  --port 8787 \
32
- --repo /path/to/child-repo \
34
+ --workspace /path/to/workspace \
33
35
  --runs-dir /path/to/kanban-runs \
34
36
  --codex-bin codex \
35
37
  --runner headless
@@ -37,7 +39,8 @@ input-kanban \
37
39
 
38
40
  ## Notes
39
41
 
40
- - `KANBAN_DEFAULT_REPO` / `--repo` should point to the actual git repository where work should run.
42
+ - `KANBAN_DEFAULT_WORKSPACE` / `--workspace` should point to the local directory where work should run; `KANBAN_DEFAULT_REPO` / `--repo` remain compatibility aliases.
43
+ - `input-kanban serve` starts a lightweight background scheduler that uses the same orchestrator auto-advance path as CLI `submit --auto` / `input-kanban auto <runId>`. It advances planned runs, serial batches, final judge startup, and bounded automatic retries without relying on an open browser tab.
41
44
  - `KANBAN_RUNNER` / `--runner tmux` runs Codex tasks inside tmux windows while keeping scheduling and status tracking in the Node.js orchestrator.
42
45
  - `KANBAN_RUNNER=tmux` is optional. Use it when you want live terminal visibility into planner, worker, and final judge sessions.
43
46
  - 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.
package/PROJECT_GUIDE.md CHANGED
@@ -33,9 +33,9 @@ The intended use case is:
33
33
 
34
34
  ## Important Boundaries
35
35
 
36
- - If the current workspace is a multi-repo umbrella, the target repo must be a concrete child repository, not the umbrella root.
37
- - Workers can modify the target repository. Failed workers are not automatically retried because a partial modification may already exist.
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.
36
+ - If the current workspace is a multi-repo umbrella, the target workspace must be a concrete child directory, not the umbrella root.
37
+ - Workers can modify the target workspace. Failed workers are not automatically retried because a partial modification may already exist.
38
+ - The planner only creates a plan and does not modify the target workspace. 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
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
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.
@@ -58,6 +58,7 @@ Supported serve options:
58
58
  ```text
59
59
  --host <host>
60
60
  --port <port>
61
+ --workspace <path>
61
62
  --repo <path>
62
63
  --runs-dir <path>
63
64
  --codex-bin <path>
@@ -113,6 +114,7 @@ Supported stop options:
113
114
  Supported submit options:
114
115
 
115
116
  ```text
117
+ --workspace <path>
116
118
  --repo <path>
117
119
  --label <label>
118
120
  --task <text>
@@ -128,11 +130,11 @@ Supported submit options:
128
130
  --poll-ms <ms>
129
131
  ```
130
132
 
131
- `input-kanban submit` creates a run and starts the planner. Task content can come from `--task <text>` or `--task-file <path|->`; omitting `--repo` uses the current working directory as the target Git work tree. Omitting `--label` derives the run label from the first non-empty task line. Auto mode is the default for submit: it keeps polling the run, dispatches batches when the plan is ready, and starts the final judge once all batches complete. `--no-auto` keeps submit to create + plan only. `-d` / `--detach` starts a background supervisor process for the auto loop and lets the submitting terminal return immediately. The submit output includes `input-kanban status <runId> --watch` for terminal-side observation. Because it writes to the same runs directory as the Web server, CLI-created runs are visible in the 8787 dashboard when both processes use the same `--runs-dir`.
133
+ `input-kanban submit` creates a run and starts the planner. Task content can come from `--task <text>` or `--task-file <path|->`; omitting `--workspace` uses the current working directory as the target workspace, and `--repo` remains a compatibility alias. Omitting `--label` derives the run label from the first non-empty task line. Auto mode is the default for submit: it keeps polling the run through the shared orchestrator auto-advance path, dispatches batches when the plan is ready, and starts the final judge once all batches complete. `--no-auto` keeps submit to create + plan only. `-d` / `--detach` starts a background supervisor process for the same auto loop and lets the submitting terminal return immediately. The Web server also starts a lightweight scheduler that uses this shared path, so serial batch advancement does not depend on an open browser tab. The submit output includes `input-kanban status <runId> --watch` for terminal-side observation. Because it writes to the same runs directory as the Web server, CLI-created runs are visible in the 8787 dashboard when both processes use the same `--runs-dir`.
132
134
 
133
135
  Default behavior:
134
136
 
135
- - default repo: current working directory when `input-kanban` is launched; run creation validates that the selected repo is inside a Git work tree;
137
+ - default workspace: current working directory when `input-kanban` is launched; run creation only validates that the selected directory exists and is a directory; Git is detected and labeled when available;
136
138
  - default host: `127.0.0.1`;
137
139
  - default port: `8787`;
138
140
  - default runs directory: `~/.input-kanban/runs`;
@@ -308,7 +310,7 @@ Risk notes:
308
310
 
309
311
  - A stale-lock timeout that is too short can accidentally steal a lock from a slow or paused process; too long slows recovery.
310
312
  - `child.onExit` callbacks must continue to take the write lock.
311
- - If the repository ever moves to shared network storage, the current single-machine exclusive-file assumptions should be re-evaluated.
313
+ - If the workspace ever moves to shared network storage, the current single-machine exclusive-file assumptions should be re-evaluated.
312
314
 
313
315
  ## Stop and Archive
314
316
 
@@ -500,13 +502,13 @@ change. Record the exact commands, run ids, and artifact paths in the release
500
502
  notes or handoff.
501
503
 
502
504
  1. Headless runner:
503
- - Start the app with `input-kanban --runner headless --runs-dir <tmp-runs-dir> --repo <target-repo> --port <free-port>`.
505
+ - Start the app with `input-kanban --runner headless --runs-dir <tmp-runs-dir> --workspace <target-workspace> --port <free-port>`.
504
506
  - Create a small run, plan it, dispatch at least one worker, and run the final judge if the plan requires it.
505
507
  - Verify the run state reports `runner: headless`, no task exposes `tmux` metadata, and role directories contain the expected `prompt.md`, `events.jsonl`, `events_timed.jsonl`, `stderr.log`, `last_message.md`, and `exit_code` files.
506
508
  - Stop the run and verify no unrelated local process is affected.
507
509
 
508
510
  2. tmux runner, only when `tmux -V` succeeds:
509
- - Start the app with `input-kanban --runner tmux --runs-dir <tmp-runs-dir> --repo <target-repo> --port <free-port>`.
511
+ - Start the app with `input-kanban --runner tmux --runs-dir <tmp-runs-dir> --workspace <target-workspace> --port <free-port>`.
510
512
  - Create a small run and click Plan. Verify a session named `input-kanban-<runId>` exists and has a planner window.
511
513
  - 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`.
512
514
  - Verify `run.sh` writes `exit_code` before printing the keep-open summary, then keeps the window open for manual inspection.
@@ -527,7 +529,7 @@ Keep a single repository-level `RELEASE_NOTES.md` with recent version history. D
527
529
  ## Change Guidelines
528
530
 
529
531
  - Do not add automatic worker retry unless there is a verified rollback or idempotency mechanism.
530
- - Do not default to `--skip-git-repo-check`; prefer a concrete target child repository.
532
+ - Do not default to bypassing workspace validation; prefer a concrete target child workspace.
531
533
  - Preserve batch barriers when modifying scheduling logic.
532
534
  - Decide clearly between soft archive and physical directory archive before changing archive semantics.
533
535
  - Keep the frontend buildless unless there is a strong reason to introduce a build pipeline.
package/README.en.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [中文](README.md) | English
4
4
 
5
- Input Kanban is a local Codex orchestration dashboard. The recommended path is to install it from npm, run `input-kanban` inside the target repository, and use the browser UI to manage planning, worker execution, and final judging.
5
+ Input Kanban is a local Codex orchestration dashboard. The recommended path is to install it from npm, run `input-kanban` inside the target workspace, and use the browser UI to manage planning, worker execution, and final judging. If the workspace is a Git repository, the UI marks it as such.
6
6
 
7
7
  ## Recommended Usage
8
8
 
@@ -18,12 +18,12 @@ Verify the installation:
18
18
  input-kanban --help
19
19
  ```
20
20
 
21
- ### 2. Start in the Target Repository
21
+ ### 2. Start in the Target Workspace
22
22
 
23
- Enter the repository you want Codex to modify or inspect:
23
+ Enter the workspace you want Codex to modify or inspect:
24
24
 
25
25
  ```bash
26
- cd /path/to/your/repo
26
+ cd /path/to/your/workspace
27
27
  input-kanban
28
28
  ```
29
29
 
@@ -35,14 +35,16 @@ http://127.0.0.1:8787
35
35
 
36
36
  Open that URL in your browser to use the dashboard.
37
37
 
38
- ### 3. Start with an Explicit Repository
38
+ ### 3. Start with an Explicit Workspace
39
39
 
40
- If you do not want to `cd` into the target repository first, pass it explicitly:
40
+ If you do not want to `cd` into the target workspace first, pass it explicitly:
41
41
 
42
42
  ```bash
43
- input-kanban --repo /path/to/your/repo
43
+ input-kanban --workspace /path/to/your/workspace
44
44
  ```
45
45
 
46
+ `--repo` remains available as a compatibility alias.
47
+
46
48
  ## CLI Auto Execution
47
49
 
48
50
  To submit a task from the terminal and let it advance automatically, use `submit`. Task content supports two input modes:
@@ -52,7 +54,9 @@ input-kanban submit --task-file task.md --label "Fix login issue"
52
54
  input-kanban submit --task "Fix the login issue and add regression tests" --label "Fix login issue"
53
55
  ```
54
56
 
55
- `submit` creates a run, starts planning, dispatches all batches, and starts the final judge after all workers finish by default. The default repo is the current directory. If `--label` is omitted, the run label is generated from the task text. It uses the same runs directory, so CLI-created runs are visible in the Web dashboard on port 8787 as long as the dashboard uses the same `--runs-dir`.
57
+ `submit` creates a run, starts planning, dispatches all batches, and starts the final judge after all workers finish by default. The default workspace is the current directory. If `--label` is omitted, the run label is generated from the task text. It uses the same runs directory, so CLI-created runs are visible in the Web dashboard on port 8787 as long as the dashboard uses the same `--runs-dir`.
58
+
59
+ `input-kanban serve` starts a lightweight background scheduler that keeps refreshing and advancing unfinished runs: it dispatches batches when a plan is ready, starts the next serial batch after the previous one completes, and starts the final judge after all batches complete. CLI `submit --auto` / `input-kanban auto <runId>` and the Web server share the same orchestrator auto-advance path, so progress no longer depends on whether a browser page is open or refreshed.
56
60
 
57
61
  To return immediately and let a background supervisor continue the auto loop, pass `-d` / `--detach`:
58
62
 
@@ -87,7 +91,7 @@ input-kanban --json retry <runId> [taskId]
87
91
  input-kanban stop <runId>
88
92
  ```
89
93
 
90
- Use `runs` to discover visible run batches first; `runs --active` shows only runs that have not reached a terminal state or still have running tasks, which lets an agent find `runId` values before calling `status <runId>`. Without a `runId`, `status` and `result` use the latest run by default. `result --copy` copies the final judge result. `retry` preserves the failed attempt and retries failed/unknown tasks. `--json` is handy for agents/scripts that need structured output. Stopping requires an explicit `runId` to avoid stopping the wrong run.
94
+ Use `runs` to discover visible run batches first; `runs --active` shows only runs that have not reached a terminal state or still have running tasks, which lets an agent find `runId` values before calling `status <runId>`. To focus on one workspace, use `input-kanban runs --workspace /path/to/workspace`; the Web sidebar has the same workspace filter. Without a `runId`, `status` and `result` use the latest run by default. `result --copy` copies the final judge result. `retry` preserves the failed attempt and retries failed/unknown tasks. `--json` is handy for agents/scripts that need structured output. Stopping requires an explicit `runId` to avoid stopping the wrong run.
91
95
 
92
96
  ## Common Startup Options
93
97
 
@@ -102,7 +106,7 @@ input-kanban --open
102
106
 
103
107
  Defaults:
104
108
 
105
- - target repository: the current directory where `input-kanban` is launched; creating a run validates that it is inside a Git work tree
109
+ - workspace: the current directory where `input-kanban` is launched; creating a run only requires an existing directory, and Git is shown as an optional capability when detected
106
110
  - host: `127.0.0.1`
107
111
  - port: `8787`
108
112
  - runs directory: `~/.input-kanban/runs`
@@ -113,14 +117,14 @@ Defaults:
113
117
 
114
118
  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.
115
119
 
116
- 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.
120
+ 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 workspace.
117
121
 
118
122
  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.
119
123
 
120
124
  ## Using the Dashboard
121
125
 
122
126
  1. Click `New Run`.
123
- 2. Enter a label, target repository, worker sandbox, and task description.
127
+ 2. Enter a label, workspace, worker sandbox, and task description.
124
128
  3. Click `Create Run`.
125
129
  4. The dashboard automatically starts `Plan` so the Codex planner can generate batches and workers.
126
130
  5. After planning completes, Web auto mode dispatches workers by batch barrier and concurrency limits by default.
@@ -159,7 +163,7 @@ runs/<runId>/
159
163
  └── verdict.json
160
164
  ```
161
165
 
162
- These files are local run records and do not need to be committed to your application repository.
166
+ These files are local run records and do not need to be committed to your application workspace.
163
167
 
164
168
  ## Requirements
165
169
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  中文 | [English](README.en.md)
4
4
 
5
- Input Kanban 是一个本地 Codex 编排看板。推荐通过 npm 安装,然后在目标代码仓库里运行 `input-kanban`,用浏览器管理任务拆分、并发执行和最终验收。
5
+ Input Kanban 是一个本地 Codex 编排看板。推荐通过 npm 安装,然后在目标工作区里运行 `input-kanban`,用浏览器管理任务拆分、并发执行和最终验收;如果工作区恰好是 Git 仓库,界面会额外标识出来。
6
6
 
7
7
  ## 推荐使用方式
8
8
 
@@ -18,12 +18,12 @@ npm install -g input-kanban
18
18
  input-kanban --help
19
19
  ```
20
20
 
21
- ### 2. 在目标仓库启动
21
+ ### 2. 在目标工作区启动
22
22
 
23
- 进入你希望 Codex 修改或检查的代码仓库:
23
+ 进入你希望 Codex 修改或检查的工作区:
24
24
 
25
25
  ```bash
26
- cd /path/to/your/repo
26
+ cd /path/to/your/workspace
27
27
  input-kanban
28
28
  ```
29
29
 
@@ -35,14 +35,16 @@ http://127.0.0.1:8787
35
35
 
36
36
  打开浏览器访问这个地址即可使用看板。
37
37
 
38
- ### 3. 指定目标仓库启动
38
+ ### 3. 指定目标工作区启动
39
39
 
40
- 如果不想先 `cd` 到目标仓库,也可以显式指定:
40
+ 如果不想先 `cd` 到目标工作区,也可以显式指定:
41
41
 
42
42
  ```bash
43
- input-kanban --repo /path/to/your/repo
43
+ input-kanban --workspace /path/to/your/workspace
44
44
  ```
45
45
 
46
+ `--repo` 仍可作为兼容别名使用。
47
+
46
48
  ## CLI 自动执行
47
49
 
48
50
  如果希望从终端直接提交任务并自动推进,可以使用 `submit`。任务内容支持两种输入方式:
@@ -52,7 +54,9 @@ input-kanban submit --task-file task.md --label "修复登录问题"
52
54
  input-kanban submit --task "修复登录问题,并补充回归测试" --label "修复登录问题"
53
55
  ```
54
56
 
55
- `submit` 默认会创建任务批次、发起拆分、自动派发所有批次,并在全部完成后自动发起最终验收。默认 repo 是当前目录;如果不传 `--label`,任务批次名称会从任务内容自动生成。它使用同一个 runs 目录,所以只要 8787 Web 看板也使用相同的 `--runs-dir`,CLI 创建的任务会在 Web 界面里可见。
57
+ `submit` 默认会创建任务批次、发起拆分、自动派发所有批次,并在全部完成后自动发起最终验收。默认 workspace 是当前目录;如果不传 `--label`,任务批次名称会从任务内容自动生成。它使用同一个 runs 目录,所以只要 8787 Web 看板也使用相同的 `--runs-dir`,CLI 创建的任务会在 Web 界面里可见。
58
+
59
+ `input-kanban serve` 会启动一个轻量后台 scheduler,持续刷新并推进未完成的 run:plan ready 后派发 batch、串行 batch 完成后启动下一批、全部 batch 完成后启动 final judge。CLI `submit --auto` / `input-kanban auto <runId>` 与 Web server 共用同一套 orchestrator 自动推进逻辑,因此任务推进不再依赖浏览器页面是否打开或刷新。
56
60
 
57
61
  如果希望提交后立即返回,让任务在后台自动执行,可以加 `-d` / `--detach`:
58
62
 
@@ -87,7 +91,7 @@ input-kanban --json retry <runId> [taskId]
87
91
  input-kanban stop <runId>
88
92
  ```
89
93
 
90
- `runs` 用来先列出可见任务批次,`runs --active` 只列出未进入终态或仍有子任务运行的批次,便于 agent 先发现 `runId`,再用 `status <runId>` 查详情。不传 `runId` 时,`status` 和 `result` 默认查看最近一次任务批次。`result --copy` 会复制最终验收结果;`retry` 会保留失败现场并重试失败/未知任务;`--json` 适合给 agent/脚本做结构化读取;停止任务请显式传入 `runId`,避免误停。
94
+ `runs` 用来先列出可见任务批次,`runs --active` 只列出未进入终态或仍有子任务运行的批次,便于 agent 先发现 `runId`,再用 `status <runId>` 查详情。要只看某个工作区,可用 `input-kanban runs --workspace /path/to/workspace`;Web 左栏也提供了工作区筛选。不传 `runId` 时,`status` 和 `result` 默认查看最近一次任务批次。`result --copy` 会复制最终验收结果;`retry` 会保留失败现场并重试失败/未知任务;`--json` 适合给 agent/脚本做结构化读取;停止任务请显式传入 `runId`,避免误停。
91
95
 
92
96
  ## 常用启动参数
93
97
 
@@ -102,7 +106,7 @@ input-kanban --open
102
106
 
103
107
  默认值:
104
108
 
105
- - 目标仓库:启动 `input-kanban` 时的当前目录;创建批次时会校验它必须位于 Git work tree
109
+ - 工作区:启动 `input-kanban` 时的当前目录;创建批次时只要求它是一个存在的目录,若检测到 Git 会额外显示 Git 标识
106
110
  - host:`127.0.0.1`
107
111
  - port:`8787`
108
112
  - runs 目录:`~/.input-kanban/runs`
@@ -113,14 +117,14 @@ input-kanban --open
113
117
 
114
118
  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 里手动退出。
115
119
 
116
- tmux 模式是可选能力,主要用于在终端里实时查看每个 Codex 角色的执行过程。`codex exec` 当前属于非交互模式,默认不会弹出人工 approval;如果创建任务时选择 `danger-full-access`,表示显式放开 worker sandbox 限制,应只在受控测试仓库中使用。
120
+ tmux 模式是可选能力,主要用于在终端里实时查看每个 Codex 角色的执行过程。`codex exec` 当前属于非交互模式,默认不会弹出人工 approval;如果创建任务时选择 `danger-full-access`,表示显式放开 worker sandbox 限制,应只在受控测试工作区中使用。
117
121
 
118
122
  看板会在 run 生成 tmux 元数据后显示 `复制tmux attach指令`。文件查看区域不再重复展示 tmux 终端信息;如需查看现场,请从批次详情顶部复制 attach 指令进入 tmux session。
119
123
 
120
124
  ## 在看板里如何使用
121
125
 
122
126
  1. 点击 `新建任务批次`。
123
- 2. 输入批次名称、目标仓库、Worker 沙箱和任务说明。
127
+ 2. 输入批次名称、工作区、Worker 沙箱和任务说明。
124
128
  3. 点击 `创建批次`。
125
129
  4. 看板会自动发起 `拆分任务`,让 Codex planner 生成 batches 和 workers。
126
130
  5. 拆分完成后,Web 默认自动派发执行,按 batch barrier 和并发限制运行 workers。
@@ -159,7 +163,7 @@ runs/<runId>/
159
163
  └── verdict.json
160
164
  ```
161
165
 
162
- 这些文件是本地运行记录,不需要提交到你的业务仓库。
166
+ 这些文件是本地运行记录,不需要提交到你的业务工作区。
163
167
 
164
168
  ## 使用前提
165
169
 
package/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Release Notes
2
2
 
3
+ ## v0.0.10
4
+
5
+ ### Highlights
6
+
7
+ - Adopt a workspace-first model: `workspace` / `--workspace` are now the primary identity for runs, while `repo` / `--repo` remain compatibility aliases.
8
+ - Allow non-Git workspace directories and show Git only as an optional capability marker when detected.
9
+ - Add workspace filtering to CLI/API/Web: `input-kanban runs --workspace <path>` and `/api/runs?workspace=<path>` filter runs by workspace.
10
+ - Add a server-side background scheduler for `input-kanban serve` so unfinished runs continue to advance without relying on an open browser tab.
11
+ - Share auto-advance logic between CLI `submit --auto` / `input-kanban auto <runId>` and the Web server scheduler through the orchestrator.
12
+ - Make `/api/runs` lightweight by reading run summaries without refreshing every historical run, improving cold-start list loading.
13
+ - Simplify the Web sidebar: workspace filtering is a compact dropdown, the redundant list refresh button is removed, list load timing is available via a small hover icon, and Git is shown as a simple marker.
14
+
15
+ ### Verification
16
+
17
+ - `npm run check` passed with 62 tests.
18
+ - `npm pack --dry-run` passed before publishing.
19
+
20
+ ## v0.0.9
21
+
22
+ ### Highlights
23
+
24
+ - Add MIT license and include it in the published npm package.
25
+ - Add agent-friendly `--json` output for discovery, status lookup, result reading, stop, submit, and auto commands.
26
+ - Add `runs` / `runs --active` to list visible and active run IDs before querying details.
27
+ - Add `retry <runId> [taskId]` with preserved failed attempts and a one-shot auto retry path for blocked batches.
28
+ - Add per-run `run_state.lock` protection around state writes to reduce CLI/Web/supervisor lost-update races.
29
+ - Keep Web auto mode enabled by default after planning: dispatch planned work and auto-start the final judge while the page is open.
30
+ - Keep CLI auto mode enabled by default for `submit`, with `--no-auto` as the create-and-plan-only escape hatch.
31
+ - Add `result --copy` for copying final judge output, and keep version display in both CLI and Web footer.
32
+
33
+ ### Verification
34
+
35
+ - `npm run check` passed with 58 tests.
36
+ - `npm pack --dry-run` included the MIT `LICENSE` file.
37
+
3
38
  ## v0.0.8
4
39
 
5
40
  ### Highlights
@@ -43,7 +43,7 @@ function splitCommand(argv) {
43
43
  }
44
44
 
45
45
  function parseServeArgs(argv) {
46
- const args = { host: '127.0.0.1', port: undefined, repo: undefined, runsDir: undefined, codexBin: undefined, runner: undefined, open: false, json: false, help: false };
46
+ const args = { host: '127.0.0.1', port: undefined, workspace: undefined, repo: undefined, runsDir: undefined, codexBin: undefined, runner: undefined, open: false, json: false, help: false };
47
47
  for (let i = 0; i < argv.length; i++) {
48
48
  const arg = argv[i];
49
49
  const next = () => argv[++i];
@@ -53,6 +53,7 @@ function parseServeArgs(argv) {
53
53
  else if (arg === '--no-open') args.open = false;
54
54
  else if (arg === '--host') args.host = next();
55
55
  else if (arg === '--port' || arg === '-p') args.port = Number(next());
56
+ else if (arg === '--workspace') args.workspace = next();
56
57
  else if (arg === '--repo' || arg === '-r') args.repo = next();
57
58
  else if (arg === '--runs-dir') args.runsDir = next();
58
59
  else if (arg === '--codex-bin') args.codexBin = next();
@@ -63,13 +64,15 @@ function parseServeArgs(argv) {
63
64
  }
64
65
 
65
66
  function parseRunsArgs(argv) {
66
- const args = { runsDir: undefined, active: false, includeArchived: false, limit: 20, json: false, help: false };
67
+ const args = { runsDir: undefined, workspace: undefined, repo: undefined, active: false, includeArchived: false, limit: 20, json: false, help: false };
67
68
  for (let i = 0; i < argv.length; i++) {
68
69
  const arg = argv[i];
69
70
  const next = () => argv[++i];
70
71
  if (arg === '--help' || arg === '-h') args.help = true;
71
72
  else if (arg === '--json' || arg === '-j') args.json = true;
72
73
  else if (arg === '--runs-dir') args.runsDir = next();
74
+ else if (arg === '--workspace') args.workspace = next();
75
+ else if (arg === '--repo' || arg === '-r') args.repo = next();
73
76
  else if (arg === '--active') args.active = true;
74
77
  else if (arg === '--include-archived') args.includeArchived = true;
75
78
  else if (arg === '--limit') args.limit = Number(next());
@@ -144,7 +147,7 @@ function parseStopArgs(argv) {
144
147
  }
145
148
 
146
149
  function parseAutoArgs(argv) {
147
- const args = { host: '127.0.0.1', port: 8787, runsDir: undefined, codexBin: undefined, runner: undefined, runId: undefined, json: false, pollMs: 3000, maxRetries: 1, help: false };
150
+ const args = { host: '127.0.0.1', port: 8787, workspace: undefined, runsDir: undefined, codexBin: undefined, runner: undefined, runId: undefined, json: false, pollMs: 3000, maxRetries: 1, help: false };
148
151
  for (let i = 0; i < argv.length; i++) {
149
152
  const arg = argv[i];
150
153
  const next = () => argv[++i];
@@ -152,6 +155,7 @@ function parseAutoArgs(argv) {
152
155
  else if (arg === '--json' || arg === '-j') args.json = true;
153
156
  else if (arg === '--host') args.host = next();
154
157
  else if (arg === '--port' || arg === '-p') args.port = Number(next());
158
+ else if (arg === '--workspace') args.workspace = next();
155
159
  else if (arg === '--runs-dir') args.runsDir = next();
156
160
  else if (arg === '--codex-bin') args.codexBin = next();
157
161
  else if (arg === '--runner') args.runner = validateRunner(next(), '--runner');
@@ -165,7 +169,7 @@ function parseAutoArgs(argv) {
165
169
 
166
170
  function parseSubmitArgs(argv) {
167
171
  const args = {
168
- host: '127.0.0.1', port: 8787, repo: undefined, runsDir: undefined, codexBin: undefined,
172
+ host: '127.0.0.1', port: 8787, workspace: undefined, repo: undefined, runsDir: undefined, codexBin: undefined,
169
173
  runner: undefined, label: undefined, taskText: undefined, taskFile: undefined, maxParallel: 3,
170
174
  workerSandbox: 'workspace-write', auto: true, detach: false, watch: true, json: false, pollMs: 3000, maxRetries: 1, help: false
171
175
  };
@@ -176,6 +180,7 @@ function parseSubmitArgs(argv) {
176
180
  else if (arg === '--json' || arg === '-j') args.json = true;
177
181
  else if (arg === '--host') args.host = next();
178
182
  else if (arg === '--port' || arg === '-p') args.port = Number(next());
183
+ else if (arg === '--workspace') args.workspace = next();
179
184
  else if (arg === '--repo' || arg === '-r') args.repo = next();
180
185
  else if (arg === '--runs-dir') args.runsDir = next();
181
186
  else if (arg === '--codex-bin') args.codexBin = next();
@@ -199,8 +204,15 @@ function parseSubmitArgs(argv) {
199
204
  function applyRuntimeEnv(args) {
200
205
  if (args.port) process.env.PORT = String(args.port);
201
206
  if (args.host) process.env.HOST = args.host;
202
- if (args.repo) process.env.KANBAN_DEFAULT_REPO = path.resolve(args.repo);
203
- else if (!process.env.KANBAN_DEFAULT_REPO) process.env.KANBAN_DEFAULT_REPO = process.cwd();
207
+ const workspace = args.workspace || args.repo;
208
+ if (workspace) {
209
+ const resolvedWorkspace = path.resolve(workspace);
210
+ process.env.KANBAN_DEFAULT_WORKSPACE = resolvedWorkspace;
211
+ process.env.KANBAN_DEFAULT_REPO = resolvedWorkspace;
212
+ } else {
213
+ if (!process.env.KANBAN_DEFAULT_WORKSPACE) process.env.KANBAN_DEFAULT_WORKSPACE = process.env.KANBAN_DEFAULT_REPO || process.cwd();
214
+ if (!process.env.KANBAN_DEFAULT_REPO) process.env.KANBAN_DEFAULT_REPO = process.env.KANBAN_DEFAULT_WORKSPACE || process.cwd();
215
+ }
204
216
  if (args.runsDir) process.env.KANBAN_RUNS_DIR = path.resolve(args.runsDir);
205
217
  if (args.codexBin) process.env.KANBAN_CODEX_BIN = args.codexBin;
206
218
  if (args.runner) process.env.KANBAN_RUNNER = args.runner;
@@ -231,7 +243,8 @@ Usage:
231
243
  Serve options:
232
244
  --host <host> Host to bind, default 127.0.0.1
233
245
  -p, --port <port> Port to bind, default 8787
234
- -r, --repo <path> Default target repository, default current directory
246
+ --workspace <path> Default workspace, default current directory
247
+ -r, --repo <path> Alias for --workspace
235
248
  --runs-dir <path> Runtime runs directory, default ~/.input-kanban/runs
236
249
  --codex-bin <path> Codex CLI executable, default codex
237
250
  --runner <mode> Runner mode: headless or tmux, default headless
@@ -270,7 +283,8 @@ Stop options:
270
283
  -j, --json Emit JSON output instead of human text
271
284
 
272
285
  Submit options:
273
- -r, --repo <path> Target Git work tree, default current directory
286
+ --workspace <path> Target workspace, default current directory
287
+ -r, --repo <path> Alias for --workspace
274
288
  -l, --label <label> Task batch name, default generated from task text
275
289
  --task <text> Task description text
276
290
  --task-file <path> Read task description from file, use - for stdin
@@ -292,12 +306,13 @@ function printSubmitHelp() {
292
306
  console.log(`input-kanban submit
293
307
 
294
308
  Usage:
295
- input-kanban submit --repo <path> --task-file task.md
296
- input-kanban submit --repo <path> --task "fix the bug" --label "bugfix"
309
+ input-kanban submit --workspace <path> --task-file task.md
310
+ input-kanban submit --workspace <path> --task "fix the bug" --label "bugfix"
297
311
  input-kanban submit --task-file task.md -d
298
312
 
299
313
  Options:
300
- -r, --repo <path> Target Git work tree, default current directory
314
+ --workspace <path> Target workspace, default current directory
315
+ -r, --repo <path> Alias for --workspace
301
316
  -l, --label <label> Task batch name, default generated from task text
302
317
  --task <text> Task description text
303
318
  --task-file <path> Read task description from file, use - for stdin
@@ -318,11 +333,14 @@ function printRunsHelp() {
318
333
 
319
334
  Usage:
320
335
  input-kanban runs
336
+ input-kanban runs --workspace <path>
321
337
  input-kanban runs --active
322
338
  input-kanban --json runs --active
323
339
 
324
340
  Options:
325
341
  --runs-dir <path> Runtime runs directory shared with the Web UI
342
+ --workspace <path> Filter by workspace path
343
+ -r, --repo <path> Alias for --workspace
326
344
  --active Show only active or pending-action runs
327
345
  --include-archived Include archived runs
328
346
  --limit <n> Maximum rows to print, default 20
@@ -467,7 +485,7 @@ function printRunStatus(state) {
467
485
  console.log(`任务批次: ${state.label || '-'}`);
468
486
  console.log(`Run ID: ${state.runId}`);
469
487
  console.log(`状态: ${displayStatus(state.status)}`);
470
- console.log(`仓库: ${state.repo || '-'}`);
488
+ console.log(`工作区: ${state.workspacePath || state.repo || '-'}`);
471
489
  console.log(`当前批次: ${currentBatchText(state)}`);
472
490
  console.log(`进度: ${counts.completed}/${counts.total} |执行中 ${counts.running} |失败 ${counts.failed}`);
473
491
  if (state.judge?.status && state.judge.status !== 'pending') console.log(`验收: ${displayStatus(state.judge.status)}`);
@@ -476,7 +494,7 @@ function printRunStatus(state) {
476
494
  function printRunsTable(runs) {
477
495
  if (!runs.length) { console.log('没有找到任务批次'); return; }
478
496
  for (const run of runs) {
479
- console.log(`${run.runId}|${run.label || '-'}|${displayStatus(run.status)}|进度 ${run.completed}/${run.total}|执行中 ${run.running}|失败 ${run.failed}|runner ${run.runner || '-'}|沙箱 ${run.workerSandbox || '-'}|仓库 ${run.repo || '-'}`);
497
+ console.log(`${run.runId}|${run.label || '-'}|${displayStatus(run.status)}|进度 ${run.completed}/${run.total}|执行中 ${run.running}|失败 ${run.failed}|runner ${run.runner || '-'}|沙箱 ${run.workerSandbox || '-'}|工作区 ${run.workspacePath || run.repo || '-'}`);
480
498
  }
481
499
  }
482
500
 
@@ -510,11 +528,12 @@ async function confirmFailureTerminal(runId, state, refreshRun, pollMs) {
510
528
  }
511
529
 
512
530
  async function watchRun(runId, { auto = false, pollMs = 3000, quiet = false, maxRetries = 1 } = {}) {
513
- const { dispatchRun, refreshRun, retryRun, startJudge } = await import('../src/orchestrator.js');
531
+ const { autoAdvanceRun, refreshRun } = await import('../src/orchestrator.js');
514
532
  let lastStatus = '';
515
- let judgeStarted = false;
516
533
  while (true) {
517
- const state = await refreshRun(runId);
534
+ const state = auto
535
+ ? await autoAdvanceRun(runId, { startCreated: true, maxRetries, retryReason: 'auto retry from CLI' })
536
+ : await refreshRun(runId);
518
537
  if (!state) throw new Error(`run not found: ${runId}`);
519
538
  const line = statusLine(state);
520
539
  if (line !== lastStatus) {
@@ -522,26 +541,6 @@ async function watchRun(runId, { auto = false, pollMs = 3000, quiet = false, max
522
541
  lastStatus = line;
523
542
  }
524
543
 
525
- if (auto && state.status === 'batch_blocked') {
526
- try {
527
- const retryState = await retryRun(runId, { reason: 'auto retry from CLI', maxRetries, auto: true });
528
- if (!quiet) console.log(`自动重试任务: ${retryState.retriedTaskIds?.join(', ') || '-'}`);
529
- lastStatus = '';
530
- continue;
531
- } catch (error) {
532
- if (!quiet) console.log(`自动重试跳过: ${error.message || String(error)}`);
533
- }
534
- }
535
-
536
- if (auto && state.status === 'planned') {
537
- if (!quiet) console.log('自动派发任务...');
538
- await dispatchRun(runId);
539
- } else if (auto && state.status === 'batches_completed' && state.judge?.status !== 'running' && !judgeStarted) {
540
- if (!quiet) console.log('自动发起最终验收...');
541
- judgeStarted = true;
542
- await startJudge(runId);
543
- }
544
-
545
544
  if (isTerminal(state)) {
546
545
  if (isFailureTerminal(state)) {
547
546
  const result = await confirmFailureTerminal(runId, state, refreshRun, pollMs);
@@ -562,13 +561,15 @@ async function serve(args) {
562
561
  const { startServer } = await import('../src/server.js');
563
562
  const instance = await startServer({ host: process.env.HOST, port: Number(process.env.PORT || 8787), log: false });
564
563
  if (args.json) {
565
- printJson({ ok: true, command: 'serve', version: instance.version, url: instance.url, repo: instance.defaultRepo, runsDir: instance.runsDir, runner: instance.runner });
564
+ printJson({ ok: true, command: 'serve', version: instance.version, url: instance.url, defaultWorkspace: instance.defaultWorkspace, defaultRepo: instance.defaultRepo, runsDir: instance.runsDir, runner: instance.runner, scheduler: instance.scheduler });
566
565
  } else {
567
566
  console.log(`Input Kanban v${PACKAGE_VERSION} started`);
568
567
  console.log(`URL: ${instance.url}`);
569
- console.log(`Repo: ${instance.defaultRepo}`);
568
+ console.log(`Workspace: ${instance.defaultWorkspace}`);
569
+ console.log(`Repo alias: ${instance.defaultRepo}`);
570
570
  console.log(`Runs: ${instance.runsDir}`);
571
571
  console.log(`Runner: ${instance.runner}`);
572
+ console.log(`Scheduler: ${instance.scheduler ? 'enabled' : 'disabled'}`);
572
573
  }
573
574
  if (args.open) openBrowser(instance.url);
574
575
  const shutdown = () => { instance.stop().finally(() => process.exit(0)); };
@@ -606,10 +607,11 @@ async function runs(args) {
606
607
  applyRuntimeEnv(args);
607
608
  const { listRuns } = await import('../src/orchestrator.js');
608
609
  const limit = Number.isFinite(Number(args.limit)) && Number(args.limit) > 0 ? Number(args.limit) : 20;
609
- const allRuns = await listRuns({ includeArchived: !!args.includeArchived });
610
+ const workspace = args.workspace || args.repo || '';
611
+ const allRuns = await listRuns({ includeArchived: !!args.includeArchived, workspace });
610
612
  const filtered = (args.active ? allRuns.filter(isActiveRunSummary) : allRuns).slice(0, limit);
611
613
  if (args.json) {
612
- printJson({ ok: true, command: 'runs', active: !!args.active, includeArchived: !!args.includeArchived, limit, count: filtered.length, runs: filtered });
614
+ printJson({ ok: true, command: 'runs', active: !!args.active, includeArchived: !!args.includeArchived, workspace: workspace || undefined, limit, count: filtered.length, runs: filtered });
613
615
  return;
614
616
  }
615
617
  printRunsTable(filtered);
@@ -730,6 +732,7 @@ async function submit(args) {
730
732
  const state = await createRun({
731
733
  label: args.label,
732
734
  taskText,
735
+ workspace: process.env.KANBAN_DEFAULT_WORKSPACE || process.env.KANBAN_DEFAULT_REPO,
733
736
  repo: process.env.KANBAN_DEFAULT_REPO,
734
737
  maxParallel: args.maxParallel,
735
738
  workerSandbox: args.workerSandbox
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "input-kanban",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
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 bin/input-kanban-format-events.js && node --check bin/input-kanban-timestamp-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"
10
+ "check": "node --check bin/input-kanban.js && node --check bin/input-kanban-format-events.js && node --check bin/input-kanban-timestamp-events.js && node --check bin/input-kanban-tmux-overview.js && node --check src/server.js && node --check src/scheduler.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
  "description": "A local Codex orchestration kanban dashboard",
13
13
  "license": "MIT",