input-kanban 0.0.6 → 0.0.8

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/PROJECT_GUIDE.md CHANGED
@@ -51,9 +51,9 @@ The npm CLI entry is:
51
51
  bin/input-kanban.js
52
52
  ```
53
53
 
54
- It parses CLI options, sets environment variables before importing backend modules, and starts the HTTP server.
54
+ It parses CLI options and sets environment variables before importing backend modules. Without a subcommand, or with `serve`, it starts the HTTP server. With `submit`, it creates a run directly in the shared runs directory and can optionally run an auto loop.
55
55
 
56
- Supported options:
56
+ Supported serve options:
57
57
 
58
58
  ```text
59
59
  --host <host>
@@ -61,10 +61,62 @@ Supported options:
61
61
  --repo <path>
62
62
  --runs-dir <path>
63
63
  --codex-bin <path>
64
+ --runner <headless|tmux>
64
65
  --open
65
66
  --no-open
66
67
  ```
67
68
 
69
+ Supported status options:
70
+
71
+ ```text
72
+ [runId]
73
+ --runs-dir <path>
74
+ --watch
75
+ --poll-ms <ms>
76
+ ```
77
+
78
+ `input-kanban status` refreshes and prints a run summary. If no `runId` is provided, it uses the latest run from the shared runs directory. `--watch` keeps polling until the run reaches a terminal state.
79
+
80
+ Supported result options:
81
+
82
+ ```text
83
+ [runId]
84
+ --runs-dir <path>
85
+ --copy
86
+ ```
87
+
88
+ `input-kanban result [runId]` prints the final judge result. It prefers `judge/verdict.json` and falls back to `judge/last_message.md`. If no `runId` is provided, it uses the latest run. `--copy` sends the result to the system clipboard.
89
+
90
+ Supported stop options:
91
+
92
+ ```text
93
+ <runId>
94
+ --runs-dir <path>
95
+ --reason <text>
96
+ ```
97
+
98
+ `input-kanban stop <runId>` calls the same orchestrator stop path as the Web dashboard. Stop requires an explicit run id. The backend first asks the active runner to stop known processes and then falls back to killing live stored PIDs, so Web and CLI processes can stop each other's headless workers.
99
+
100
+ Supported submit options:
101
+
102
+ ```text
103
+ --repo <path>
104
+ --label <label>
105
+ --task <text>
106
+ --task-file <path|->
107
+ --max-parallel <n>
108
+ --worker-sandbox <read-only|workspace-write|danger-full-access>
109
+ --runner <headless|tmux>
110
+ --runs-dir <path>
111
+ --auto
112
+ --no-auto
113
+ --detach / -d
114
+ --watch
115
+ --poll-ms <ms>
116
+ ```
117
+
118
+ `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`.
119
+
68
120
  Default behavior:
69
121
 
70
122
  - default repo: current working directory when `input-kanban` is launched; run creation validates that the selected repo is inside a Git work tree;
@@ -147,6 +199,7 @@ Recovery options:
147
199
  - Inspect `events.pretty`, `stderr.log`, `last_message.md`, and artifacts.
148
200
  - Manually mark `failed` or `unknown` workers as completed if the user confirms the work is actually done.
149
201
  - Manual completion writes `workers/<taskId>/manual_completion.json`.
202
+ - If the user pastes a manual success result, it is saved as `workers/<taskId>/manual_result.md` and included in final judge input.
150
203
  - The UI preserves the original failed or unknown status while also showing the manual completion marker.
151
204
 
152
205
  ## Stop and Archive
@@ -255,6 +308,8 @@ runs/<runId>/planner/
255
308
  runs/<runId>/planner_attempts/attempt-XX/
256
309
  runs/<runId>/workers/<taskId>/
257
310
  runs/<runId>/judge/judge_input.json
311
+ runs/<runId>/workers/<taskId>/events_timed.jsonl
312
+ runs/<runId>/workers/<taskId>/manual_result.md
258
313
  runs/<runId>/judge/verdict.json
259
314
  ```
260
315
 
@@ -271,6 +326,7 @@ runs/<runId>/judge/verdict.json
271
326
  - `POST /api/runs/:runId/judge`
272
327
  - `POST /api/runs/:runId/stop`
273
328
  - `POST /api/runs/:runId/archive`
329
+ - `PATCH /api/runs/:runId/label`
274
330
  - `GET /api/runs/:runId/task-text`
275
331
  - `GET /api/runs/:runId/tasks/:taskId/file?name=...`
276
332
  - `POST /api/runs/:runId/tasks/:taskId/mark-completed`
@@ -336,7 +392,7 @@ notes or handoff.
336
392
  1. Headless runner:
337
393
  - Start the app with `input-kanban --runner headless --runs-dir <tmp-runs-dir> --repo <target-repo> --port <free-port>`.
338
394
  - 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.
395
+ - 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.
340
396
  - Stop the run and verify no unrelated local process is affected.
341
397
 
342
398
  2. tmux runner, only when `tmux -V` succeeds:
@@ -354,6 +410,10 @@ notes or handoff.
354
410
  - Verify the package includes `bin/`, `src/`, `public/`, `README.md`, `README.en.md`, `PROJECT_GUIDE.md`, `ENVIRONMENT.md`, and `package.json`.
355
411
  - Verify no runtime run directories, local logs, or unrelated temporary artifacts are included.
356
412
 
413
+ ## Release Notes
414
+
415
+ Keep a single repository-level `RELEASE_NOTES.md` with recent version history. Do not add one tracked `RELEASE_NOTES.vX.Y.Z.md` file per release. When creating a GitHub Release, use a temporary notes file or copy the relevant version section from `RELEASE_NOTES.md` into `gh release create --notes-file`.
416
+
357
417
  ## Change Guidelines
358
418
 
359
419
  - Do not add automatic worker retry unless there is a verified rollback or idempotency mechanism.
package/README.en.md CHANGED
@@ -43,6 +43,46 @@ If you do not want to `cd` into the target repository first, pass it explicitly:
43
43
  input-kanban --repo /path/to/your/repo
44
44
  ```
45
45
 
46
+ ## CLI Auto Execution
47
+
48
+ To submit a task from the terminal and let it advance automatically, use `submit`. Task content supports two input modes:
49
+
50
+ ```bash
51
+ input-kanban submit --task-file task.md --label "Fix login issue"
52
+ input-kanban submit --task "Fix the login issue and add regression tests" --label "Fix login issue"
53
+ ```
54
+
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`.
56
+
57
+ To return immediately and let a background supervisor continue the auto loop, pass `-d` / `--detach`:
58
+
59
+ ```bash
60
+ input-kanban submit --task-file task.md -d
61
+ ```
62
+
63
+ To create the run and start planning without dispatching or judging, pass `--no-auto`.
64
+
65
+ Common examples:
66
+
67
+ ```bash
68
+ input-kanban submit --task "Fix login issue"
69
+ input-kanban submit --task-file task.md --max-parallel 2 --worker-sandbox workspace-write
70
+ input-kanban submit --runs-dir ~/.input-kanban/runs --runner tmux -d
71
+ ```
72
+
73
+ Check and stop:
74
+
75
+ ```bash
76
+ input-kanban status
77
+ input-kanban status --watch
78
+ input-kanban status <runId> --watch
79
+ input-kanban result
80
+ input-kanban result <runId> --copy
81
+ input-kanban stop <runId>
82
+ ```
83
+
84
+ Without a `runId`, `status` and `result` use the latest run by default. `result --copy` copies the final judge result. Stopping requires an explicit `runId` to avoid stopping the wrong run.
85
+
46
86
  ## Common Startup Options
47
87
 
48
88
  ```bash
@@ -76,7 +116,7 @@ After run-level tmux metadata is available, the dashboard shows `Copy tmux attac
76
116
  1. Click `New Run`.
77
117
  2. Enter a label, target repository, worker sandbox, and task description.
78
118
  3. Click `Create Run`.
79
- 4. Click `Plan` to let the Codex planner generate batches and workers.
119
+ 4. The dashboard automatically starts `Plan` so the Codex planner can generate batches and workers.
80
120
  5. Click `Dispatch` to run workers by batch barrier and concurrency limits.
81
121
  6. Inspect execution logs, final messages, error logs, and artifacts.
82
122
  7. After all batches complete, click `Final Judge`.
package/README.md CHANGED
@@ -43,6 +43,46 @@ http://127.0.0.1:8787
43
43
  input-kanban --repo /path/to/your/repo
44
44
  ```
45
45
 
46
+ ## CLI 自动执行
47
+
48
+ 如果希望从终端直接提交任务并自动推进,可以使用 `submit`。任务内容支持两种输入方式:
49
+
50
+ ```bash
51
+ input-kanban submit --task-file task.md --label "修复登录问题"
52
+ input-kanban submit --task "修复登录问题,并补充回归测试" --label "修复登录问题"
53
+ ```
54
+
55
+ `submit` 默认会创建任务批次、发起拆分、自动派发所有批次,并在全部完成后自动发起最终验收。默认 repo 是当前目录;如果不传 `--label`,任务批次名称会从任务内容自动生成。它使用同一个 runs 目录,所以只要 8787 Web 看板也使用相同的 `--runs-dir`,CLI 创建的任务会在 Web 界面里可见。
56
+
57
+ 如果希望提交后立即返回,让任务在后台自动执行,可以加 `-d` / `--detach`:
58
+
59
+ ```bash
60
+ input-kanban submit --task-file task.md -d
61
+ ```
62
+
63
+ 如果只想创建并拆分,不自动派发和验收,可以加 `--no-auto`。
64
+
65
+ 常用参数:
66
+
67
+ ```bash
68
+ input-kanban submit --task "修复登录问题"
69
+ input-kanban submit --task-file task.md --max-parallel 2 --worker-sandbox workspace-write
70
+ input-kanban submit --runs-dir ~/.input-kanban/runs --runner tmux -d
71
+ ```
72
+
73
+ 查看和停止:
74
+
75
+ ```bash
76
+ input-kanban status
77
+ input-kanban status --watch
78
+ input-kanban status <runId> --watch
79
+ input-kanban result
80
+ input-kanban result <runId> --copy
81
+ input-kanban stop <runId>
82
+ ```
83
+
84
+ 不传 `runId` 时,`status` 和 `result` 默认查看最近一次任务批次。`result --copy` 会复制最终验收结果;停止任务请显式传入 `runId`,避免误停。
85
+
46
86
  ## 常用启动参数
47
87
 
48
88
  ```bash
@@ -76,7 +116,7 @@ tmux 模式是可选能力,主要用于在终端里实时查看每个 Codex
76
116
  1. 点击 `新建任务批次`。
77
117
  2. 输入批次名称、目标仓库、Worker 沙箱和任务说明。
78
118
  3. 点击 `创建批次`。
79
- 4. 点击 `拆分任务`,让 Codex planner 生成 batches 和 workers。
119
+ 4. 看板会自动发起 `拆分任务`,让 Codex planner 生成 batches 和 workers。
80
120
  5. 点击 `派发执行`,按 batch barrier 和并发限制运行 workers。
81
121
  6. 查看执行日志、最终回复、错误日志和产物。
82
122
  7. 所有 batch 完成后,点击 `汇总验收`。
@@ -0,0 +1,86 @@
1
+ # Release Notes
2
+
3
+ ## v0.0.8
4
+
5
+ ### Highlights
6
+
7
+ - Add CLI `submit` workflow with two task input modes: `--task-file <markdown>` for Markdown files and `--task <text>` for inline task text.
8
+ - Add CLI auto loop as the default `submit` behavior to create a run, start planning, dispatch batches, and run the final judge while keeping the run visible in the shared Web dashboard.
9
+ - Add CLI `-d` / `--detach` to run the auto loop in a background supervisor, plus `--no-auto` for create-and-plan-only mode.
10
+ - Add CLI `status [runId] [--watch]`, defaulting to the latest run when `runId` is omitted.
11
+ - Add CLI `result [runId] [--copy]` to print or copy the final judge result.
12
+ - Add CLI `stop <runId>` and make backend stop robust across CLI/Web processes by falling back to stored live PIDs.
13
+ - Derive the run label from task text when `--label` / form label is omitted.
14
+ - Add dashboard run-card archive confirmation without modal popups and replace the detail refresh text chips with a one-shot circle animation.
15
+
16
+ ### Verification
17
+
18
+ - `npm run check` passed with 51 tests.
19
+
20
+ ## v0.0.7
21
+
22
+ ### Highlights
23
+
24
+ - Improve the run list cards: replace `Run ID` with a repository chip and copy action, add frozen duration, and hide rename buttons until hover/focus.
25
+ - Streamline dashboard flow: creating a run now automatically starts planning, selecting a task opens its execution log by default, and running-task conflicts show Chinese user-facing messages.
26
+ - Improve task detail ergonomics: copy actions are available for both final replies and verdict JSON, and manual success completion stores pasted human evidence.
27
+ - Add execution timing artifacts and summary chips, including `events_timed.jsonl`, command duration breakdowns, model/scheduler time, startup/teardown time, and system event counts.
28
+ - Strengthen run creation validation by rejecting missing target paths and directories outside a Git work tree before planning starts.
29
+ - Keep release notes in a single repository-level `RELEASE_NOTES.md` and include that file in the npm package.
30
+
31
+ ### Verification
32
+
33
+ - `npm run check` passed with 43 tests.
34
+ - `npm pack --dry-run` passed before publishing.
35
+
36
+ ## v0.0.6
37
+
38
+ ### Changes
39
+
40
+ - Validate the target repository when creating a run, rejecting missing paths and directories outside a Git work tree before planning starts.
41
+ - Add a compact copy button for the full repository path in the run detail header.
42
+ - Document the Git work tree requirement in the README, English README, environment reference, and project guide.
43
+
44
+ ### Verification
45
+
46
+ - `npm run check` passed with 38 tests.
47
+ - `npm pack --dry-run` confirmed package contents before the version bump.
48
+
49
+ ## v0.0.5
50
+
51
+ ### Highlights
52
+
53
+ - Add Input Kanban branding icons to the dashboard header and browser tab.
54
+ - Add standard favicon and Apple touch icon assets so browsers can show the same visual identity as the page header.
55
+ - Align left run-list metadata with the compact chip style used in run details.
56
+ - Align batch-row metadata in the task table with the same chip style for `Batch ID`, `最大并发`, and `进度`.
57
+
58
+ ### Notes
59
+
60
+ - This is a UI polish release after `v0.0.4`.
61
+ - No runner, scheduler, tmux, sandbox, or Codex execution behavior changes are included.
62
+
63
+ ### Verification
64
+
65
+ - `npm run check` passed.
66
+ - `npm pack --dry-run` passed.
67
+
68
+ ## v0.0.4
69
+
70
+ ### Highlights
71
+
72
+ - Add tmux batch layout: one session per run, windows for planner, each batch, and judge, with batch windows showing an overview pane plus worker panes.
73
+ - Show formatted Codex execution output in tmux panes while keeping raw JSONL logs in `events.jsonl`.
74
+ - Add worker sandbox selection in the create form, including explicit `danger-full-access` for controlled test repositories.
75
+ - Refine the dashboard UI with compact run metadata chips, no redundant tmux badges, no file-viewer tmux panel, and role-specific file tabs.
76
+ - Freeze run duration after terminal states such as final judge completion, instead of continuing to count on auto-refresh.
77
+
78
+ ### Notes
79
+
80
+ - `codex exec` is treated as non-interactive; tmux mode provides live terminal visibility but does not implement manual approval prompts.
81
+ - The dashboard exposes the run-level `tmux attach-session` copy action after tmux metadata is available.
82
+ - Use `danger-full-access` only when you explicitly want to relax worker sandbox limits in a controlled environment.
83
+
84
+ ### Verification
85
+
86
+ - `npm run check` passed.
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import readline from 'node:readline';
5
+
6
+ const [eventsFile, timedEventsFile] = process.argv.slice(2);
7
+ if (!eventsFile || !timedEventsFile) {
8
+ console.error('usage: input-kanban-timestamp-events.js <events.jsonl> <events_timed.jsonl>');
9
+ process.exit(2);
10
+ }
11
+
12
+ await fs.promises.mkdir(path.dirname(eventsFile), { recursive: true });
13
+ await fs.promises.mkdir(path.dirname(timedEventsFile), { recursive: true });
14
+
15
+ const events = fs.createWriteStream(eventsFile, { flags: 'a' });
16
+ const timed = fs.createWriteStream(timedEventsFile, { flags: 'a' });
17
+ const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
18
+
19
+ for await (const line of rl) {
20
+ const rawLine = `${line}\n`;
21
+ events.write(rawLine);
22
+ process.stdout.write(rawLine);
23
+ const receivedAt = new Date().toISOString();
24
+ try {
25
+ timed.write(`${JSON.stringify({ receivedAt, event: JSON.parse(line) })}\n`);
26
+ } catch {
27
+ timed.write(`${JSON.stringify({ receivedAt, rawLine: line })}\n`);
28
+ }
29
+ }
30
+
31
+ await Promise.all([
32
+ new Promise(resolve => events.end(resolve)),
33
+ new Promise(resolve => timed.end(resolve))
34
+ ]);