next-issue 2.4.10 → 2.5.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 +7 -5
- package/dist/agents.mjs +1 -1
- 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
|
package/dist/agents.mjs
CHANGED
|
@@ -56,7 +56,7 @@ export async function runAgent(recorder, request) {
|
|
|
56
56
|
cwd: request.cwd,
|
|
57
57
|
agentDir,
|
|
58
58
|
resourceLoader,
|
|
59
|
-
sessionManager: SessionManager.
|
|
59
|
+
sessionManager: SessionManager.create(request.cwd, recorder.sessionDir),
|
|
60
60
|
tools: [...request.profile.tools, ...customTools.map((tool) => tool.name)],
|
|
61
61
|
customTools,
|
|
62
62
|
modelRuntime,
|
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
|
}
|