reslop 0.2.7 → 0.3.1

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.
Files changed (158) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +16 -14
  3. package/bin/reslop.js +8 -5
  4. package/lib/agents/agents.js +573 -0
  5. package/lib/agents/allow.js +71 -0
  6. package/lib/agents/allow.json +17 -0
  7. package/lib/agents/models.js +467 -0
  8. package/lib/api.js +15 -12
  9. package/lib/cli.js +43 -68
  10. package/lib/{files.js → common/files.js} +48 -55
  11. package/lib/{find.js → common/find.js} +1 -1
  12. package/lib/common/format.js +101 -0
  13. package/lib/{utilities.js → common/process.js} +7 -95
  14. package/lib/common/tasks.json +27 -0
  15. package/lib/common/utilities.js +112 -0
  16. package/lib/dashboard/git.js +9 -16
  17. package/lib/dashboard/model.js +90 -49
  18. package/lib/dashboard/npm.js +17 -13
  19. package/lib/dashboard/tree.js +27 -30
  20. package/lib/{session → dashboard}/watch.js +36 -31
  21. package/lib/{workspace.js → dashboard/workspace.js} +23 -38
  22. package/lib/{deps.js → deps/deps.js} +31 -45
  23. package/lib/{deps-diff.js → deps/diff.js} +35 -25
  24. package/lib/{manifest.js → deps/manifest.js} +47 -30
  25. package/lib/diff/align.js +1 -2
  26. package/lib/diff/diff.js +2 -2
  27. package/lib/diff/display.js +29 -5
  28. package/lib/diff/inline.js +10 -14
  29. package/lib/diff/items.js +6 -4
  30. package/lib/diff/patch.js +39 -3
  31. package/lib/diff/unit.js +45 -16
  32. package/lib/{git-branches.js → git/branches.js} +53 -48
  33. package/lib/{git-deps.js → git/deps.js} +151 -95
  34. package/lib/git/git.js +71 -0
  35. package/lib/git/worktree.js +504 -0
  36. package/lib/highlight/bash.js +1 -2
  37. package/lib/highlight/csv.js +1 -2
  38. package/lib/highlight/dot.js +1 -2
  39. package/lib/{highlight.js → highlight/highlight.js} +42 -11
  40. package/lib/highlight/html.js +20 -18
  41. package/lib/highlight/json.js +1 -2
  42. package/lib/highlight/log.js +1 -2
  43. package/lib/highlight/txt.js +1 -2
  44. package/lib/{session → input}/actions.js +114 -48
  45. package/lib/{editor.js → input/editor.js} +16 -8
  46. package/lib/{keys.js → input/keys.js} +24 -45
  47. package/lib/input/line-edit.js +78 -0
  48. package/lib/input/menu-pick.js +70 -0
  49. package/lib/render/agents.js +642 -0
  50. package/lib/render/branches.js +4 -5
  51. package/lib/render/commits.js +54 -64
  52. package/lib/render/{dash-activity.js → dashboard/activity.js} +25 -40
  53. package/lib/render/{dash-blocks.js → dashboard/blocks.js} +131 -137
  54. package/lib/render/{dashboard.js → dashboard/dashboard.js} +25 -22
  55. package/lib/render/diff.js +166 -45
  56. package/lib/render/field.js +131 -0
  57. package/lib/render/files.js +9 -14
  58. package/lib/render/footer.js +385 -0
  59. package/lib/render/frame.js +123 -25
  60. package/lib/render/header.js +176 -0
  61. package/lib/render/log.js +320 -0
  62. package/lib/render/menu.js +60 -0
  63. package/lib/render/notes.js +16 -11
  64. package/lib/render/npm.js +322 -196
  65. package/lib/render/packages.js +9 -13
  66. package/lib/render/primitives.js +101 -15
  67. package/lib/render/render.js +7 -11
  68. package/lib/render/repos.js +13 -25
  69. package/lib/render/status.js +370 -0
  70. package/lib/render/status.json +85 -0
  71. package/lib/render/{dash-table.js → table.js} +13 -60
  72. package/lib/render/tiles.js +109 -48
  73. package/lib/render/unit.js +32 -13
  74. package/lib/{report-model.js → report/model.js} +4 -6
  75. package/lib/{report-parse.js → report/parse.js} +9 -14
  76. package/lib/{report-render.js → report/render.js} +48 -19
  77. package/lib/{report-run.js → report/run.js} +42 -30
  78. package/lib/{report-test.js → report/test.js} +56 -55
  79. package/lib/{report-tools.js → report/tools.js} +24 -33
  80. package/lib/review/agent-instructions.md +14 -0
  81. package/lib/review/format.js +420 -0
  82. package/lib/{review-merge.js → review/merge.js} +9 -8
  83. package/lib/review/review.js +190 -0
  84. package/lib/review/store.js +281 -0
  85. package/lib/review/templates.js +83 -0
  86. package/lib/runs/commands.js +14 -0
  87. package/lib/runs/logs.js +299 -0
  88. package/lib/runs/output.js +174 -0
  89. package/lib/runs/process.js +113 -0
  90. package/lib/{runs.js → runs/runs.js} +84 -36
  91. package/lib/runs/scripts.js +150 -0
  92. package/lib/session/agents/agents.js +976 -0
  93. package/lib/session/agents/job.js +320 -0
  94. package/lib/session/agents/jobs.js +355 -0
  95. package/lib/session/agents/options.js +153 -0
  96. package/lib/session/agents/plans.js +83 -0
  97. package/lib/session/branches.js +33 -40
  98. package/lib/session/change-actions.js +34 -100
  99. package/lib/session/commit.js +91 -52
  100. package/lib/session/compose.js +189 -147
  101. package/lib/session/dashboard.js +23 -22
  102. package/lib/session/dispatch.js +86 -21
  103. package/lib/session/files-pane.js +47 -26
  104. package/lib/session/find.js +16 -29
  105. package/lib/session/import.js +93 -0
  106. package/lib/session/items.js +8 -17
  107. package/lib/session/lifecycle.js +78 -72
  108. package/lib/session/load.js +2 -4
  109. package/lib/session/navigation.js +6 -3
  110. package/lib/session/npm/history.js +250 -0
  111. package/lib/session/npm/npm.js +836 -0
  112. package/lib/session/{packages.js → npm/packages.js} +21 -14
  113. package/lib/session/ops.js +125 -34
  114. package/lib/session/pointer.js +202 -10
  115. package/lib/session/prefs.js +112 -0
  116. package/lib/session/reads.js +109 -0
  117. package/lib/session/review.js +28 -10
  118. package/lib/session/run-panel.js +40 -0
  119. package/lib/{session.js → session/session.js} +158 -63
  120. package/lib/session/tasks.js +321 -66
  121. package/lib/session/templates.js +1 -1
  122. package/lib/session/terminal.js +94 -12
  123. package/lib/session/unit.js +35 -30
  124. package/lib/session/update.js +194 -6
  125. package/lib/session/view.js +65 -65
  126. package/lib/session/workspace.js +39 -78
  127. package/lib/{capabilities.js → source/capabilities.js} +3 -12
  128. package/lib/{github.js → source/github.js} +102 -32
  129. package/lib/{gitlab.js → source/gitlab.js} +87 -10
  130. package/lib/{remote.js → source/remote.js} +144 -40
  131. package/lib/source/review-threads.graphql +20 -0
  132. package/lib/source/source.js +74 -0
  133. package/lib/term/ansi.js +396 -0
  134. package/lib/{clipboard.js → term/clipboard.js} +3 -6
  135. package/lib/{select.js → term/select.js} +4 -3
  136. package/lib/term/themes/dark.json +122 -0
  137. package/lib/term/themes/light.json +122 -0
  138. package/lib/term/wide.txt +21 -0
  139. package/lib/{wrap.js → term/wrap.js} +4 -4
  140. package/package.json +2 -2
  141. package/lib/ansi.js +0 -545
  142. package/lib/detect.js +0 -34
  143. package/lib/diff/edit.js +0 -33
  144. package/lib/git-worktree.js +0 -455
  145. package/lib/git.js +0 -79
  146. package/lib/npm-commands.js +0 -522
  147. package/lib/render/chrome.js +0 -806
  148. package/lib/render/present.js +0 -19
  149. package/lib/render/report.js +0 -43
  150. package/lib/render/search.js +0 -25
  151. package/lib/review.js +0 -745
  152. package/lib/session/accessors.js +0 -26
  153. package/lib/session/edit-click.js +0 -57
  154. package/lib/session/npm.js +0 -452
  155. package/lib/session/progress.js +0 -41
  156. package/lib/source.js +0 -36
  157. package/lib/update.js +0 -192
  158. /package/lib/{git-reword-todo.js → git/reword-todo.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  ## [Unreleased][unreleased]
4
4
 
5
+ ## [0.3.1][] - 2026-10-13
6
+
7
+ - Allow agents to write to work with git
8
+ - Add default URL for tasks import in UI
9
+ - Implement session continue for supported agents
10
+ - Fix scroller in agents sessions list
11
+ - Multiple fixes in background agents and command runner
12
+ - Sync the lockfile when a `package.json` change is staged
13
+ - Update agent instructions to make commits
14
+ - Support Ctrl+Backspace word deletion in editors
15
+ - Support Shift-cursor selection in the tasks editor
16
+
17
+ ## [0.3.0][] - 2026-10-12
18
+
19
+ - Execute review results and plan in cli agents
20
+ - Detect available agents and choose its model, effort, context
21
+ - Show agent execution and progress; sessions, history in TUI
22
+ - Import GitHub and GitLab issues into tasks
23
+ - Run tests in the background
24
+ - Codebase refactoring and optimization for simplicity and performance
25
+ - Async repository reads and writes
26
+ - Startup and diff rendering optimizations
27
+ - Rename `.review` to `.plan`
28
+ - Reorganize `.reslop` settings into sections
29
+ - Dashboard and run panel improvements
30
+ - Optional line numbers in diff and file views (ctrl+l)
31
+
5
32
  ## [0.2.7][] - 2026-10-03
6
33
 
7
34
  - Add tiling view for multi-repository environment
@@ -172,7 +199,9 @@
172
199
  - Feedback and todos that produce a repair plan for an agent
173
200
  - Intra-line highlighting in unified, mixed, and side-by-side layouts
174
201
 
175
- [unreleased]: https://github.com/tshemsedinov/reslop/compare/v0.2.7...HEAD
202
+ [unreleased]: https://github.com/tshemsedinov/reslop/compare/v0.3.1...HEAD
203
+ [0.3.1]: https://github.com/tshemsedinov/reslop/compare/v0.3.0...v0.3.1
204
+ [0.3.0]: https://github.com/tshemsedinov/reslop/compare/v0.2.7...v0.3.0
176
205
  [0.2.7]: https://github.com/tshemsedinov/reslop/compare/v0.2.6...v0.2.7
177
206
  [0.2.6]: https://github.com/tshemsedinov/reslop/compare/v0.2.5...v0.2.6
178
207
  [0.2.5]: https://github.com/tshemsedinov/reslop/compare/v0.2.4...v0.2.5
package/README.md CHANGED
@@ -17,20 +17,23 @@ Open a change, leave findings and a backlog, and prepare a repair plan for the a
17
17
  Review → Plan → Repair → Verify
18
18
  ```
19
19
 
20
- - Live dashboard: files, diffs, tasks, branches, commits, run, and npm, updated in real time
20
+ - Live dashboard: files, diffs, tasks, branches, commits, run, agents, and npm, updated in real time
21
21
  - Leave feedback, a project backlog, and in-place code proposals as a repair plan
22
22
  - Review uncommitted git diffs, a given commit, a GitHub PR, or a GitLab MR
23
23
  - File-scope review mode: not just diffs, with editor mode
24
24
  - Stage, unstage, or revert each contiguous block of diff lines
25
25
  - Auto-reload local diffs when files change, keeping the current screen
26
- - Import GitHub PR and GitLab MR review comments into the local plan for AI
27
- - Commits list: brief and full, view a commit's diff, commit, amend, apply, edit, fixup, and delete
26
+ - Import GitHub PR and GitLab MR review comments, and GitHub/GitLab issues, into tasks and the local plan
27
+ - Commits list: brief and full, view a commit's diff, commit, update, amend, apply, edit, fixup, and delete
28
28
  - Branches: checkout, create, rebase, delete, pull, and push
29
29
  - npm scripts and bins: run, edit, and reorder; double-click to run; clean logs older than 5 days
30
30
  - Reduced test and lint output for agents: failures and a short summary, not passing noise
31
31
  - Review, renew, audit and update npm dependencies in `package.json` and the lockfile
32
32
  - Auto-update reslop patch and minor releases; confirm a new major
33
- - Work with git, npm and fetch in background
33
+ - Work with git, npm, and fetch in the background; run tests in the background while you review
34
+ - Execute the plan in local CLI agents: pick agent, model, and effort; watch progress; sessions, history, and continue or new runs
35
+ - Agent defaults and extras in `.reslop` (grouped settings sections)
36
+ - Optional line numbers in diff and file views (`Ctrl+L`)
34
37
 
35
38
  ## Install
36
39
 
@@ -47,9 +50,9 @@ Requires Node.js `>=18.15.0`.
47
50
  - `reslop path/file` show only that path or file (starts on the file list)
48
51
  - `reslop 7ac260c` show that commit (read-only)
49
52
  - `reslop https://github.com/metarhia/metacom/pull/555` GitHub/GitLab PR/MR
50
- - `reslop -n` start a new review even if the latest is still editing
53
+ - `reslop https://github.com/metarhia/metacom/issues/550` import GitHub/GitLab issue
54
+ - `reslop https://github.com/metarhia/metacom/issues` import all issues
51
55
  - `reslop -r` read-only mode
52
- - `reslop -light` light color theme (default dark)
53
56
  - `reslop t -- <program> [args]` run one program and print a reduced report
54
57
 
55
58
  Prefix each program in an npm script with `reslop t --`. Keep `&&` between those wraps, so each program is captured on its own and a failing step does not start the next one:
@@ -59,29 +62,28 @@ Prefix each program in an npm script with `reslop t --`. Keep `&&` between those
59
62
  "test": "reslop t -- npm run -s lint && reslop t -- node --test"
60
63
  ```
61
64
 
62
- The report is Markdown: failures, diagnostics, and a short summary. Passing results are omitted and similar problems are grouped. The reduced report and the raw output are both saved under `.log/`. The report names the raw file for an agent to read when a detail is missing. Set `RESLOP_OUTPUT=raw` to pass the command through unchanged. The review screen runs scripts in raw mode and applies its own filter once.
65
+ The report is Markdown: failures, diagnostics, and a short summary. Passing results are omitted and similar problems are grouped. The reduced report is saved as `.log/<name>.log` and the raw output as `.log/<name>.raw`. The report names the raw file for an agent to read when a detail is missing. Set `RESLOP_OUTPUT=raw` to pass the command through unchanged. The review screen runs scripts in raw mode and applies its own filter once.
63
66
 
64
67
  Run the full check with `npm t`. Run one or more test files with `reslop t -- node --test <files>`. New reviews include those two commands in the agent instructions.
65
68
 
66
- `reslop t` records each run in `.log/.runs/` so that the dashboard can show commands started by an agent in another terminal.
69
+ `reslop t` records each run as `.log/<name>.json` beside those files so that the dashboard can show commands started by an agent in another terminal.
67
70
 
68
- Reviews go in `.review/YYYY-MM-DD-NN.md` with frontmatter `status`:
71
+ Reviews go in `.plan/YYYY-MM-DD-NN.md` with frontmatter `status`:
69
72
 
70
- - `editing`: still writing the review in reslop
71
- - `ready`: ready for AI to work through the checkboxes
73
+ - `editing`: writing the review in reslop; AI works through the checkboxes
72
74
  - `partial`: AI started; some items remain
73
- - `done`: all items marked `[x]`
75
+ - `done`: all items marked `[x]`; adding an issue in reslop sets it back to `editing`
76
+
77
+ `ready` and `pending` in older reviews are read as `editing`.
74
78
 
75
79
  ## Future
76
80
 
77
- - Import issues from GitHub and GitLab
78
81
  - Search, blame, and file history in the review
79
82
  - Security and code-quality audit; propose a repair plan
80
83
  - Send anonymized code blocks for expert review
81
84
  - Send questions and the repair plan to experts for approval
82
85
  - Ask experts
83
86
  - Apply refactoring skills
84
- - Call agents, harnesses, and IDEs to execute prepared plans
85
87
  - Squash, cherry-pick, and interactive rebase
86
88
  - Merge, rename, and conflict resolution
87
89
 
package/bin/reslop.js CHANGED
@@ -1,13 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- const cli = require('../lib/cli.js');
5
- const { run, errorMessage } = cli;
6
- const session = require('../lib/session.js');
7
- const { LEAVE_TERM } = session;
4
+ const { errorMessage } = require('../lib/common/utilities.js');
8
5
 
9
6
  const fail = (reason) => {
10
7
  try {
8
+ const { LEAVE_TERM } = require('../lib/session/terminal.js');
11
9
  process.stdout.write(LEAVE_TERM);
12
10
  } catch {
13
11
  // ignore
@@ -19,4 +17,9 @@ const fail = (reason) => {
19
17
  process.on('uncaughtException', fail);
20
18
  process.on('unhandledRejection', fail);
21
19
 
22
- run(process).then((code) => process.exit(code), fail);
20
+ const start = () => {
21
+ if (process.argv[2] !== 't') return require('../lib/cli.js').run(process);
22
+ return require('../lib/report/run.js').runCapture(process, {});
23
+ };
24
+
25
+ start().then((code) => process.exit(code), fail);