@mergeline/agent 0.5.1 → 0.5.2
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 +7 -3
- package/dist/init.js +12 -2
- package/kit/claude-settings.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,12 +73,14 @@ name exists or where the file still carries the kit's marker line, adds its
|
|
|
73
73
|
permissions to `.claude/settings.json` (plus the repository's own package
|
|
74
74
|
manager: install and its test, lint and typecheck scripts, from the lockfile
|
|
75
75
|
and `package.json`) and removes only the broad rules an older kit wrote
|
|
76
|
-
(`Bash(board *)`, `Bash(git push *)` and the like)
|
|
76
|
+
(`Bash(board *)`, `Bash(git push *)` and the like) and the deny rule
|
|
77
|
+
`Bash(git push *:*)` of kits 3 and 4, which Claude Code reads as a literal
|
|
78
|
+
prefix, so it stopped nothing; it adds a `board` server to
|
|
77
79
|
`.mcp.json` that reads `${BOARD_URL}` and `${BOARD_AGENT_KEY}` from the
|
|
78
80
|
environment, or else the key `login` saved: the key is never written to the
|
|
79
81
|
repository.
|
|
80
82
|
|
|
81
|
-
What the agent may run without asking (kit
|
|
83
|
+
What the agent may run without asking (kit 5, in `.claude/settings.json`):
|
|
82
84
|
|
|
83
85
|
- the board's MCP tools, and `board` (or `npx -y @mergeline/agent`) with
|
|
84
86
|
`claim`, `heartbeat`, `log`, `record-spec`, `ask`, `submit`, `release`,
|
|
@@ -102,7 +104,9 @@ option),
|
|
|
102
104
|
`--pathspec-from-file` (from `--pathspec-fr`) on any `git` command;
|
|
103
105
|
`git diff` with `--no-index`, an argument starting with `/`, `~` or `$`
|
|
104
106
|
(bare or quoted), or `../`; a push to `main`, with `--force`, a refspec
|
|
105
|
-
with
|
|
107
|
+
with `:`
|
|
108
|
+
(`git push origin agent/x:main`; kit 5's rule is `git push *:**`, since
|
|
109
|
+
Claude Code reads a rule that ends in `:*` as a literal prefix),
|
|
106
110
|
`--delete`, `-d`, `--mirror`, `--all` or `--tags`; a worktree path that
|
|
107
111
|
leaves `../.wt/`; `--repo` (`-R`) on `gh pr`, `--body-file` (`-F`) on
|
|
108
112
|
`gh pr create`; `gh pr merge`, `gh api`, `gh repo`, `curl`. An agent
|
package/dist/init.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
// the kit's marker line; a file of the same name that the kit did not write
|
|
9
9
|
// is skipped with a note.
|
|
10
10
|
// - .claude/settings.json gets the kit's permissions added to its lists
|
|
11
|
-
// (and loses the broad allow rules of kits 1 and 2, RETIRED_ALLOW
|
|
11
|
+
// (and loses the broad allow rules of kits 1 and 2, RETIRED_ALLOW, and
|
|
12
|
+
// the deny rule Claude Code misreads in kits 3 and 4, RETIRED_DENY);
|
|
12
13
|
// .mcp.json gets a `board` server unless it already has one. The agent key
|
|
13
14
|
// is never written: .mcp.json refers to ${BOARD_URL} and ${BOARD_AGENT_KEY}.
|
|
14
15
|
// The permissions also allow the repository's own package manager (from its
|
|
@@ -44,7 +45,7 @@ export const PACKAGE_VERSION = PACKAGE.version;
|
|
|
44
45
|
* which wrote no version. The board says when a claim's kit is older than it
|
|
45
46
|
* expects (KIT_MIN in pocketbase/pb_hooks/board_lib.js).
|
|
46
47
|
*/
|
|
47
|
-
export const KIT_VERSION =
|
|
48
|
+
export const KIT_VERSION = 5;
|
|
48
49
|
const START = `<!-- mergeline:start (kit ${KIT_VERSION}; managed by \`board init\`; edit outside these markers) -->`;
|
|
49
50
|
/** Markers are found by these prefixes, so an edited marker line or an older kit's still counts. */
|
|
50
51
|
const START_PREFIX = "<!-- mergeline:start";
|
|
@@ -72,6 +73,13 @@ const RETIRED_ALLOW = [
|
|
|
72
73
|
"Bash(git push *)",
|
|
73
74
|
"Bash(git commit *)",
|
|
74
75
|
];
|
|
76
|
+
/**
|
|
77
|
+
* Deny rules an older kit wrote that a newer one replaces: `Bash(git push *:*)`
|
|
78
|
+
* (kits 3 and 4) ends in `:*`, which Claude Code reads as its old prefix form
|
|
79
|
+
* (a literal prefix `git push *`, with the `*` not expanded), so it matched
|
|
80
|
+
* nothing and Claude Code warned at every start. Kit 5 has `git push *:**`.
|
|
81
|
+
*/
|
|
82
|
+
const RETIRED_DENY = ["Bash(git push *:*)"];
|
|
75
83
|
/** Scripts the agent runs before a PR (done.md), when the project has them. */
|
|
76
84
|
const CHECK_SCRIPTS = ["test", "lint", "typecheck", "check"];
|
|
77
85
|
/**
|
|
@@ -250,6 +258,8 @@ export function init(opts) {
|
|
|
250
258
|
let have = Array.isArray(data.permissions[list]) ? data.permissions[list] : [];
|
|
251
259
|
if (list === "allow")
|
|
252
260
|
have = have.filter((e) => !RETIRED_ALLOW.includes(e));
|
|
261
|
+
if (list === "deny")
|
|
262
|
+
have = have.filter((e) => !RETIRED_DENY.includes(e));
|
|
253
263
|
data.permissions[list] = [...have, ...entries.filter((e) => !have.includes(e))];
|
|
254
264
|
}
|
|
255
265
|
});
|
package/kit/claude-settings.json
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"Bash(git push -f *)",
|
|
115
115
|
"Bash(git push * --force*)",
|
|
116
116
|
"Bash(git push * -f*)",
|
|
117
|
-
"Bash(git push
|
|
117
|
+
"Bash(git push *:**)",
|
|
118
118
|
"Bash(git push origin agent/* *)",
|
|
119
119
|
"Bash(git push -u origin agent/* *)",
|
|
120
120
|
"Bash(git push * --delete*)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mergeline/agent",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
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",
|