@mergeline/agent 0.5.0 → 0.5.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.
package/README.md CHANGED
@@ -78,14 +78,16 @@ and `package.json`) and removes only the broad rules an older kit wrote
78
78
  environment, or else the key `login` saved: the key is never written to the
79
79
  repository.
80
80
 
81
- What the agent may run without asking (kit 3, in `.claude/settings.json`):
81
+ What the agent may run without asking (kit 4, in `.claude/settings.json`):
82
82
 
83
83
  - the board's MCP tools, and `board` (or `npx -y @mergeline/agent`) with
84
84
  `claim`, `heartbeat`, `log`, `record-spec`, `ask`, `submit`, `release`,
85
85
  `list`, `whoami`, `help`; Claude Code asks the person for `start`,
86
86
  `watch`, `login`, `init` and `mcp`;
87
87
  - `git fetch origin ...`, `git show`, `git rev-parse`, `git status`,
88
- `git diff`, `git log`, `git add`, `git commit`, `git worktree add
88
+ `git diff` (inside the working tree), `git log`, `git add`,
89
+ `git commit -m ...` (also `-am`, `-a -m`: the message on the command
90
+ line, never from a file), `git worktree add
89
91
  ../.wt/...`, `git worktree list`, `git push origin agent/...` and
90
92
  `git push -u origin agent/...` (one branch, nothing after it),
91
93
  `git merge origin/main`;
@@ -93,9 +95,14 @@ What the agent may run without asking (kit 3, in `.claude/settings.json`):
93
95
  - `npm test`, `npm run lint` and the project's own install, test, lint and
94
96
  typecheck scripts.
95
97
 
96
- Denied, whatever else allows it: `--upload-pack` (`git fetch -u`),
97
- `--receive-pack`, `--exec`, `--output`, `--git-dir` and `--work-tree` on any
98
- `git` command; a push to `main`, with `--force`, a refspec with `:`,
98
+ Denied, whatever else allows it: `--upload-pack` (`git fetch -u`, and
99
+ any prefix from `--upl`, since git takes an unambiguous prefix of a long
100
+ option),
101
+ `--receive-pack`, `--exec`, `--output`, `--git-dir`, `--work-tree` and
102
+ `--pathspec-from-file` (from `--pathspec-fr`) on any `git` command;
103
+ `git diff` with `--no-index`, an argument starting with `/`, `~` or `$`
104
+ (bare or quoted), or `../`; a push to `main`, with `--force`, a refspec
105
+ with `:`,
99
106
  `--delete`, `-d`, `--mirror`, `--all` or `--tags`; a worktree path that
100
107
  leaves `../.wt/`; `--repo` (`-R`) on `gh pr`, `--body-file` (`-F`) on
101
108
  `gh pr create`; `gh pr merge`, `gh api`, `gh repo`, `curl`. An agent
package/dist/init.js CHANGED
@@ -44,7 +44,7 @@ export const PACKAGE_VERSION = PACKAGE.version;
44
44
  * which wrote no version. The board says when a claim's kit is older than it
45
45
  * expects (KIT_MIN in pocketbase/pb_hooks/board_lib.js).
46
46
  */
47
- export const KIT_VERSION = 3;
47
+ export const KIT_VERSION = 4;
48
48
  const START = `<!-- mergeline:start (kit ${KIT_VERSION}; managed by \`board init\`; edit outside these markers) -->`;
49
49
  /** Markers are found by these prefixes, so an edited marker line or an older kit's still counts. */
50
50
  const START_PREFIX = "<!-- mergeline:start";
@@ -59,7 +59,8 @@ const COMMANDS = {
59
59
  done: "Finish the current ticket: test, push, open a PR, submit for review",
60
60
  };
61
61
  /**
62
- * Allow rules an older kit wrote that kit 3 narrows (security audit run 1):
62
+ * Allow rules an older kit wrote that kit 3 narrows (security audit run 1),
63
+ * and `git commit *` (kits 2 and 3) that kit 4 narrows to `-m` (R9.6.1):
63
64
  * init takes them out of settings.json, since adding the narrow rules next to
64
65
  * them would change nothing.
65
66
  */
@@ -69,6 +70,7 @@ const RETIRED_ALLOW = [
69
70
  "Bash(git fetch *)",
70
71
  "Bash(git worktree *)",
71
72
  "Bash(git push *)",
73
+ "Bash(git commit *)",
72
74
  ];
73
75
  /** Scripts the agent runs before a PR (done.md), when the project has them. */
74
76
  const CHECK_SCRIPTS = ["test", "lint", "typecheck", "check"];
@@ -56,7 +56,9 @@
56
56
  "Bash(git log)",
57
57
  "Bash(git log *)",
58
58
  "Bash(git add *)",
59
- "Bash(git commit *)",
59
+ "Bash(git commit -m *)",
60
+ "Bash(git commit -am *)",
61
+ "Bash(git commit -a -m *)",
60
62
  "Bash(git worktree add ../.wt/*)",
61
63
  "Bash(git worktree list)",
62
64
  "Bash(git push origin agent/*)",
@@ -76,12 +78,33 @@
76
78
  "Bash(gh pr merge *)",
77
79
  "Bash(gh api *)",
78
80
  "Bash(gh repo *)",
79
- "Bash(git *--upload-pack*)",
81
+ "Bash(git *--upl*)",
80
82
  "Bash(git *--receive-pack*)",
81
83
  "Bash(git *--exec*)",
82
84
  "Bash(git *--output*)",
83
85
  "Bash(git *--git-dir*)",
84
86
  "Bash(git *--work-tree*)",
87
+ "Bash(git *--pathspec-fr*)",
88
+ "Bash(git diff *--no-index*)",
89
+ "Bash(git diff *../*)",
90
+ "Bash(git diff /*)",
91
+ "Bash(git diff * /*)",
92
+ "Bash(git diff ~*)",
93
+ "Bash(git diff * ~*)",
94
+ "Bash(git diff $*)",
95
+ "Bash(git diff * $*)",
96
+ "Bash(git diff '/*)",
97
+ "Bash(git diff * '/*)",
98
+ "Bash(git diff '~*)",
99
+ "Bash(git diff * '~*)",
100
+ "Bash(git diff '$*)",
101
+ "Bash(git diff * '$*)",
102
+ "Bash(git diff \"/*)",
103
+ "Bash(git diff * \"/*)",
104
+ "Bash(git diff \"~*)",
105
+ "Bash(git diff * \"~*)",
106
+ "Bash(git diff \"$*)",
107
+ "Bash(git diff * \"$*)",
85
108
  "Bash(git fetch -u*)",
86
109
  "Bash(git fetch * -u*)",
87
110
  "Bash(git push origin main*)",
package/kit/done.md CHANGED
@@ -9,7 +9,8 @@ the `board` command of the same name (`submit_for_review` is `board submit`).
9
9
  2. Call `heartbeat` before you push. If it says another session holds the
10
10
  ticket, stop at once: do not commit, push or open a PR. If it says to
11
11
  claim again, stop and claim.
12
- 3. Commit with a clear message and push the branch:
12
+ 3. Commit with a clear message given on the command line,
13
+ `git commit -m "<message>"` (or `-am`), and push the branch:
13
14
  `git push -u origin <branch>`.
14
15
  4. Open a PR against `main` with `gh pr create`. Title: the ticket title.
15
16
  The body names the ticket id, the spec path and the spec commit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mergeline/agent",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "The agent's side of a Mergeline board: an MCP server and the `board` CLI. Works with any agent tool that runs MCP servers or shell commands.",
5
5
  "license": "MIT",
6
6
  "author": "frontender-ua",