next-issue 0.3.0 → 0.4.0
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 +15 -4
- package/dist/agents.mjs +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,13 +4,13 @@ A small harness that works through the open issues of a GitHub repository with
|
|
|
4
4
|
the Claude Agent SDK. Run it inside a git repository.
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
npx next-issue
|
|
7
|
+
npx -y next-issue@latest
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
Or install it once:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install -g next-issue
|
|
13
|
+
npm install -g next-issue@latest
|
|
14
14
|
next-issue
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -91,7 +91,8 @@ progress goes to standard error.
|
|
|
91
91
|
Recorded for each step: `claim`, `comments`, `worktree`, `implement`, `push`,
|
|
92
92
|
`pull-request`, `checks`, `review` and `fix`, each with a `.start`, `.end` or
|
|
93
93
|
`.error` event and a duration in `ms`. Every `git` and `gh` command is recorded
|
|
94
|
-
with its exit code and duration.
|
|
94
|
+
with its exit code and duration. A `tool` event holds the tool name, and for a
|
|
95
|
+
`Bash` tool the command too. Each agent call adds a `usage` event with the
|
|
95
96
|
tokens, the cost estimate in dollars, the turn count, the tool-call count, the
|
|
96
97
|
model and the session id, so you can open the session again and read the full
|
|
97
98
|
transcript.
|
|
@@ -121,7 +122,7 @@ Three levels of console output:
|
|
|
121
122
|
To write the file with the defaults, run the `init` command in the repository:
|
|
122
123
|
|
|
123
124
|
```bash
|
|
124
|
-
npx next-issue init
|
|
125
|
+
npx -y next-issue@latest init
|
|
125
126
|
```
|
|
126
127
|
|
|
127
128
|
The command writes `next-issue.config.json` in the root of the repository and
|
|
@@ -209,3 +210,13 @@ npm run build
|
|
|
209
210
|
|
|
210
211
|
`npm run build` compiles `src/*.mts` to `dist/*.mjs`. The package holds the
|
|
211
212
|
compiled files, because Node does not strip types under `node_modules`.
|
|
213
|
+
|
|
214
|
+
## Releases
|
|
215
|
+
|
|
216
|
+
Releases are automatic. Write [conventional
|
|
217
|
+
commits](https://www.conventionalcommits.org/) on `main`. Release Please then
|
|
218
|
+
keeps a release pull request open with the version bump and the changelog. Merge
|
|
219
|
+
that pull request. The workflow tags the commit, makes the GitHub release and
|
|
220
|
+
publishes the package to npm with a
|
|
221
|
+
[trusted publish](https://docs.npmjs.com/trusted-publishers), so no token is
|
|
222
|
+
stored.
|
package/dist/agents.mjs
CHANGED
|
@@ -44,7 +44,7 @@ export async function runAgent(recorder, request) {
|
|
|
44
44
|
if (block.type === "tool_use") {
|
|
45
45
|
toolCalls += 1;
|
|
46
46
|
toolNames.set(block.id, block.name);
|
|
47
|
-
log.event("tool",
|
|
47
|
+
log.event("tool", toolFields(block.name, block.input));
|
|
48
48
|
}
|
|
49
49
|
if (block.type === "text") {
|
|
50
50
|
text += block.text;
|
|
@@ -120,3 +120,10 @@ function main(models) {
|
|
|
120
120
|
}
|
|
121
121
|
return name;
|
|
122
122
|
}
|
|
123
|
+
export function toolFields(name, input) {
|
|
124
|
+
if (name !== "Bash" || typeof input !== "object" || input === null) {
|
|
125
|
+
return { tool: name };
|
|
126
|
+
}
|
|
127
|
+
const { command } = input;
|
|
128
|
+
return typeof command === "string" ? { tool: name, command } : { tool: name };
|
|
129
|
+
}
|