next-issue 2.4.10 → 2.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 +10 -8
- package/dist/agents.mjs +4 -4
- package/dist/observe.mjs +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,17 +201,19 @@ the issue authors, or run it in a container.
|
|
|
201
201
|
|
|
202
202
|
## Observability
|
|
203
203
|
|
|
204
|
-
Every run has an id, `<timestamp>`, and writes
|
|
205
|
-
`.next-issue/runs/`:
|
|
204
|
+
Every run has an id, `<timestamp>`, and writes these under `.next-issue/runs/`:
|
|
206
205
|
|
|
207
206
|
- `<id>.jsonl` — one JSON object per event, with `ts`, `runId`, `kind`, and the
|
|
208
207
|
`issue`, `role` or `round` in scope;
|
|
209
208
|
- `<id>.summary.json` — token totals per agent role, event counts, and
|
|
210
209
|
one report per issue with the outcome, the reason, the pull request number
|
|
211
|
-
and the budgets used
|
|
210
|
+
and the budgets used;
|
|
211
|
+
- `<id>/sessions/` — the full pi session of each agent call, with every
|
|
212
|
+
message, tool call and tool result. The session id in a `usage` event is
|
|
213
|
+
part of the file name.
|
|
212
214
|
|
|
213
|
-
At the start of a run, the harness deletes the files under
|
|
214
|
-
that are older than `keepRunDays`. Set the field to `0` to keep them all.
|
|
215
|
+
At the start of a run, the harness deletes the files and folders under
|
|
216
|
+
`.next-issue/runs/` that are older than `keepRunDays`. Set the field to `0` to keep them all.
|
|
215
217
|
|
|
216
218
|
A short text summary of the same data goes to standard output. Use `--json` to
|
|
217
219
|
get the full summary object there instead, so the harness fits in a pipe. All
|
|
@@ -244,9 +246,9 @@ Three levels of console output:
|
|
|
244
246
|
- `gh`, authenticated with write access to the repository
|
|
245
247
|
- pi, logged in to a model provider. The agents use the model, the thinking
|
|
246
248
|
level and the extensions from your pi settings, except the `pi-next-issue`
|
|
247
|
-
extension. The implementer and the fixer get the
|
|
248
|
-
|
|
249
|
-
except `edit` and `write`.
|
|
249
|
+
extension. The implementer and the fixer get the default tools of your pi
|
|
250
|
+
settings, the `grep`, `find` and `ls` tools and the tools of your
|
|
251
|
+
extensions. The reviewer gets all of them except `edit` and `write`.
|
|
250
252
|
|
|
251
253
|
## Configuration
|
|
252
254
|
|
package/dist/agents.mjs
CHANGED
|
@@ -3,10 +3,10 @@ import { createAgentSession, DefaultResourceLoader, defineTool, getAgentDir, Mod
|
|
|
3
3
|
import { onStop } from './exec.mjs';
|
|
4
4
|
import { emptyUsage } from './observe.mjs';
|
|
5
5
|
const REVIEWING = {
|
|
6
|
-
tools: ['
|
|
6
|
+
tools: ['+grep', '+find', '+ls', '-edit', '-write'],
|
|
7
7
|
};
|
|
8
8
|
const CODING = {
|
|
9
|
-
tools: ['
|
|
9
|
+
tools: ['+grep', '+find', '+ls'],
|
|
10
10
|
};
|
|
11
11
|
export { CODING, REVIEWING };
|
|
12
12
|
export const SUBMIT_TOOL = 'submit_result';
|
|
@@ -56,8 +56,8 @@ export async function runAgent(recorder, request) {
|
|
|
56
56
|
cwd: request.cwd,
|
|
57
57
|
agentDir,
|
|
58
58
|
resourceLoader,
|
|
59
|
-
sessionManager: SessionManager.
|
|
60
|
-
tools:
|
|
59
|
+
sessionManager: SessionManager.create(request.cwd, recorder.sessionDir),
|
|
60
|
+
tools: request.profile.tools,
|
|
61
61
|
customTools,
|
|
62
62
|
modelRuntime,
|
|
63
63
|
...(runtime.settingsManager === undefined ? {} : { settingsManager: runtime.settingsManager }),
|
package/dist/observe.mjs
CHANGED
|
@@ -73,6 +73,9 @@ export class Recorder {
|
|
|
73
73
|
get logFile() {
|
|
74
74
|
return this.sink.file;
|
|
75
75
|
}
|
|
76
|
+
get sessionDir() {
|
|
77
|
+
return join(this.sink.file.replace(/\.jsonl$/, ''), 'sessions');
|
|
78
|
+
}
|
|
76
79
|
get level() {
|
|
77
80
|
return this.sink.level;
|
|
78
81
|
}
|
|
@@ -154,8 +157,8 @@ export async function pruneRuns(root, keepDays) {
|
|
|
154
157
|
const path = join(dir, name);
|
|
155
158
|
try {
|
|
156
159
|
const info = await stat(path);
|
|
157
|
-
if (info.
|
|
158
|
-
await rm(path, { force: true });
|
|
160
|
+
if (info.mtimeMs < cutoff) {
|
|
161
|
+
await rm(path, { force: true, recursive: true });
|
|
159
162
|
dropped += 1;
|
|
160
163
|
}
|
|
161
164
|
}
|