next-issue 0.11.1 → 0.12.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 +8 -3
- package/dist/config.mjs +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,7 +193,11 @@ does not know all stop the run, so a typo cannot pass without a word.
|
|
|
193
193
|
"diffMaxChars": 60000,
|
|
194
194
|
"keepRunDays": 7,
|
|
195
195
|
"draftPullRequest": true,
|
|
196
|
-
"models": {
|
|
196
|
+
"models": {
|
|
197
|
+
"implementer": null,
|
|
198
|
+
"reviewer": null,
|
|
199
|
+
"fixer": null
|
|
200
|
+
},
|
|
197
201
|
"labels": {
|
|
198
202
|
"ready": "status:todo",
|
|
199
203
|
"inProgress": "status:in-progress",
|
|
@@ -222,7 +226,7 @@ does not know all stop the run, so a typo cannot pass without a word.
|
|
|
222
226
|
| `keepRunDays` | `7` | The number of days to keep the run files; `0` keeps them all |
|
|
223
227
|
| `draftPullRequest` | `true` | Open the pull request as a draft, until the review approves |
|
|
224
228
|
| `setupCommand` | from the lock file | A shell command to run in a new worktree, before the implementer |
|
|
225
|
-
| `models` | `
|
|
229
|
+
| `models` | `null` per role | The model per agent role: `implementer`, `reviewer`, `fixer` |
|
|
226
230
|
| `labels` | see above | The names of the labels that the harness reads and sets |
|
|
227
231
|
|
|
228
232
|
An empty `labels.ready` turns the ready requirement off. The harness then
|
|
@@ -231,7 +235,8 @@ claims every open issue that no other label and no assignee holds back.
|
|
|
231
235
|
The log gives the reason for a skipped issue as `stop-label`, `not-ready`,
|
|
232
236
|
`in-flight` or `assigned`.
|
|
233
237
|
|
|
234
|
-
A role
|
|
238
|
+
A role set to `null`, or with no entry in `models`, uses the default model of
|
|
239
|
+
the SDK.
|
|
235
240
|
|
|
236
241
|
Without a `setupCommand`, the harness looks in the new worktree for a lock file
|
|
237
242
|
and runs the install command that goes with it:
|
package/dist/config.mjs
CHANGED
|
@@ -43,11 +43,17 @@ const WHOLE_FIELDS = [
|
|
|
43
43
|
];
|
|
44
44
|
const MODEL_ROLES = ["implementer", "reviewer", "fixer"];
|
|
45
45
|
const LABEL_NAMES = ["ready", "inProgress", "inReview", "done", "needsHuman", "skip"];
|
|
46
|
+
const FILE_DEFAULTS = {
|
|
47
|
+
...DEFAULTS,
|
|
48
|
+
models: Object.fromEntries(MODEL_ROLES.map((role) => [role, null])),
|
|
49
|
+
};
|
|
46
50
|
export const CONFIG_FILE = "next-issue.config.json";
|
|
47
51
|
export async function writeDefaultConfig(root, force) {
|
|
48
52
|
const path = join(root, CONFIG_FILE);
|
|
49
53
|
try {
|
|
50
|
-
await writeFile(path, `${JSON.stringify(
|
|
54
|
+
await writeFile(path, `${JSON.stringify(FILE_DEFAULTS, null, 2)}\n`, {
|
|
55
|
+
flag: force ? "w" : "wx",
|
|
56
|
+
});
|
|
51
57
|
}
|
|
52
58
|
catch (error) {
|
|
53
59
|
if (error.code === "EEXIST") {
|
|
@@ -111,7 +117,7 @@ export function parseConfig(value) {
|
|
|
111
117
|
}
|
|
112
118
|
}
|
|
113
119
|
for (const role of MODEL_ROLES) {
|
|
114
|
-
if (models[role] !== undefined) {
|
|
120
|
+
if (models[role] !== undefined && models[role] !== null) {
|
|
115
121
|
config.models[role] = text(models[role], `models.${role}`, false);
|
|
116
122
|
}
|
|
117
123
|
}
|