next-issue 14.1.2 → 14.2.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.
Files changed (84) hide show
  1. package/dist/{ignore.mjs → cli/ignore.mjs} +2 -2
  2. package/dist/{logs.mjs → cli/logs.mjs} +5 -5
  3. package/dist/{start.mjs → cli/start.mjs} +5 -5
  4. package/dist/{switch-run.mjs → cli/switch-run.mjs} +3 -3
  5. package/dist/cli.mjs +14 -14
  6. package/dist/{version.mjs → shared/version.mjs} +1 -1
  7. package/dist/{budget.mjs → worker/budget.mjs} +3 -3
  8. package/dist/{command-records.mjs → worker/command-records.mjs} +1 -1
  9. package/dist/{conflict.mjs → worker/conflict.mjs} +4 -4
  10. package/dist/{editors.mjs → worker/editors.mjs} +2 -2
  11. package/dist/{enter-review.mjs → worker/enter-review.mjs} +5 -5
  12. package/dist/{fix.mjs → worker/fix.mjs} +9 -9
  13. package/dist/{gate.mjs → worker/gate.mjs} +8 -8
  14. package/dist/{git-version.mjs → worker/git-version.mjs} +1 -1
  15. package/dist/{implement.mjs → worker/implement.mjs} +8 -8
  16. package/dist/{land.mjs → worker/land.mjs} +8 -8
  17. package/dist/{local-checks.mjs → worker/local-checks.mjs} +6 -6
  18. package/dist/{open-job.mjs → worker/open-job.mjs} +4 -4
  19. package/dist/{pending.mjs → worker/pending.mjs} +4 -4
  20. package/dist/{pipeline.mjs → worker/pipeline.mjs} +7 -7
  21. package/dist/{progress.mjs → worker/progress.mjs} +1 -1
  22. package/dist/{prune-runs.mjs → worker/prune-runs.mjs} +3 -3
  23. package/dist/{questions.mjs → worker/questions.mjs} +5 -5
  24. package/dist/{review.mjs → worker/review.mjs} +8 -8
  25. package/dist/{run.mjs → worker/run.mjs} +16 -16
  26. package/dist/{serve.mjs → worker/serve.mjs} +8 -8
  27. package/dist/{upcoming.mjs → worker/upcoming.mjs} +6 -6
  28. package/dist/{verdict.mjs → worker/verdict.mjs} +2 -2
  29. package/dist/{worker-log.mjs → worker/worker-log.mjs} +1 -1
  30. package/dist/{worker-run.mjs → worker/worker-run.mjs} +4 -4
  31. package/dist/{worktree-setup.mjs → worker/worktree-setup.mjs} +7 -7
  32. package/package.json +1 -1
  33. /package/dist/{agents.mjs → shared/agents.mjs} +0 -0
  34. /package/dist/{args.mjs → shared/args.mjs} +0 -0
  35. /package/dist/{check-poll.mjs → shared/check-poll.mjs} +0 -0
  36. /package/dist/{children.mjs → shared/children.mjs} +0 -0
  37. /package/dist/{ci-checks.mjs → shared/ci-checks.mjs} +0 -0
  38. /package/dist/{config-fields.mjs → shared/config-fields.mjs} +0 -0
  39. /package/dist/{config.mjs → shared/config.mjs} +0 -0
  40. /package/dist/{durations.mjs → shared/durations.mjs} +0 -0
  41. /package/dist/{errors.mjs → shared/errors.mjs} +0 -0
  42. /package/dist/{exec.mjs → shared/exec.mjs} +0 -0
  43. /package/dist/{files.mjs → shared/files.mjs} +0 -0
  44. /package/dist/{gh.mjs → shared/gh.mjs} +0 -0
  45. /package/dist/{git-commit.mjs → shared/git-commit.mjs} +0 -0
  46. /package/dist/{git-land.mjs → shared/git-land.mjs} +0 -0
  47. /package/dist/{git-merge.mjs → shared/git-merge.mjs} +0 -0
  48. /package/dist/{git.mjs → shared/git.mjs} +0 -0
  49. /package/dist/{github.mjs → shared/github.mjs} +0 -0
  50. /package/dist/{hand-over-comments.mjs → shared/hand-over-comments.mjs} +0 -0
  51. /package/dist/{handover.mjs → shared/handover.mjs} +0 -0
  52. /package/dist/{hunt.mjs → shared/hunt.mjs} +0 -0
  53. /package/dist/{interrupt.mjs → shared/interrupt.mjs} +0 -0
  54. /package/dist/{issue-format.mjs → shared/issue-format.mjs} +0 -0
  55. /package/dist/{job.mjs → shared/job.mjs} +0 -0
  56. /package/dist/{labels.mjs → shared/labels.mjs} +0 -0
  57. /package/dist/{local-base.mjs → shared/local-base.mjs} +0 -0
  58. /package/dist/{lock.mjs → shared/lock.mjs} +0 -0
  59. /package/dist/{loop.mjs → shared/loop.mjs} +0 -0
  60. /package/dist/{observe.mjs → shared/observe.mjs} +0 -0
  61. /package/dist/{poll.mjs → shared/poll.mjs} +0 -0
  62. /package/dist/{ports.mjs → shared/ports.mjs} +0 -0
  63. /package/dist/{prompts.mjs → shared/prompts.mjs} +0 -0
  64. /package/dist/{protocol.mjs → shared/protocol.mjs} +0 -0
  65. /package/dist/{records.mjs → shared/records.mjs} +0 -0
  66. /package/dist/{render.mjs → shared/render.mjs} +0 -0
  67. /package/dist/{revert.mjs → shared/revert.mjs} +0 -0
  68. /package/dist/{run-logs.mjs → shared/run-logs.mjs} +0 -0
  69. /package/dist/{setup.mjs → shared/setup.mjs} +0 -0
  70. /package/dist/{skip.mjs → shared/skip.mjs} +0 -0
  71. /package/dist/{slots.mjs → shared/slots.mjs} +0 -0
  72. /package/dist/{state.mjs → shared/state.mjs} +0 -0
  73. /package/dist/{summary.mjs → shared/summary.mjs} +0 -0
  74. /package/dist/{switch.mjs → shared/switch.mjs} +0 -0
  75. /package/dist/{text.mjs → shared/text.mjs} +0 -0
  76. /package/dist/{unsettled.mjs → shared/unsettled.mjs} +0 -0
  77. /package/dist/{usage.mjs → shared/usage.mjs} +0 -0
  78. /package/dist/{watch.mjs → shared/watch.mjs} +0 -0
  79. /package/dist/{worker-client.mjs → shared/worker-client.mjs} +0 -0
  80. /package/dist/{worker-paths.mjs → shared/worker-paths.mjs} +0 -0
  81. /package/dist/{worktree.mjs → shared/worktree.mjs} +0 -0
  82. /package/dist/{agent-reply.mjs → worker/agent-reply.mjs} +0 -0
  83. /package/dist/{refresh.mjs → worker/refresh.mjs} +0 -0
  84. /package/dist/{worker-server.mjs → worker/worker-server.mjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { appendFile, mkdir, rm, writeFile } from 'node:fs/promises';
2
2
  import { join, resolve } from 'node:path';
3
- import { readTextIfPresent, readTextOrEmpty } from './files.mjs';
4
- import { git } from './git.mjs';
3
+ import { readTextIfPresent, readTextOrEmpty } from '../shared/files.mjs';
4
+ import { git } from '../shared/git.mjs';
5
5
  export async function excludeFile(root) {
6
6
  return join(resolve(root, await git(root, ['rev-parse', '--git-common-dir'])), 'info', 'exclude');
7
7
  }
@@ -2,11 +2,11 @@ import { writeSync } from 'node:fs';
2
2
  import { open } from 'node:fs/promises';
3
3
  import { basename, join } from 'node:path';
4
4
  import { StringDecoder } from 'node:string_decoder';
5
- import { wakeableSleep } from './durations.mjs';
6
- import { hasCode } from './errors.mjs';
7
- import { listOrEmpty } from './files.mjs';
8
- import { render } from './render.mjs';
9
- import { runsDir } from './state.mjs';
5
+ import { wakeableSleep } from '../shared/durations.mjs';
6
+ import { hasCode } from '../shared/errors.mjs';
7
+ import { listOrEmpty } from '../shared/files.mjs';
8
+ import { render } from '../shared/render.mjs';
9
+ import { runsDir } from '../shared/state.mjs';
10
10
  const POLL_MS = 200;
11
11
  export async function newestRunLog(root) {
12
12
  const dir = runsDir(root);
@@ -1,9 +1,9 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { NOTES, onPresses } from './interrupt.mjs';
3
- import { isNewer, } from './protocol.mjs';
4
- import { formatSummary } from './summary.mjs';
5
- import { packageVersion } from './version.mjs';
6
- import { CLOSED, going, reachWorker, rejoinRun } from './worker-client.mjs';
2
+ import { NOTES, onPresses } from '../shared/interrupt.mjs';
3
+ import { isNewer, } from '../shared/protocol.mjs';
4
+ import { formatSummary } from '../shared/summary.mjs';
5
+ import { packageVersion } from '../shared/version.mjs';
6
+ import { CLOSED, going, reachWorker, rejoinRun, } from '../shared/worker-client.mjs';
7
7
  const RUN_GOING = 'a run is going in this repository already';
8
8
  function output() {
9
9
  let queue = Promise.resolve();
@@ -1,7 +1,7 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { isNewer } from './protocol.mjs';
3
- import { packageVersion } from './version.mjs';
4
- import { CLOSED, findWorker, going } from './worker-client.mjs';
2
+ import { isNewer } from '../shared/protocol.mjs';
3
+ import { packageVersion } from '../shared/version.mjs';
4
+ import { CLOSED, findWorker, going } from '../shared/worker-client.mjs';
5
5
  const FIELDS = { watch: 'watching', hunt: 'hunting' };
6
6
  const NO_RUN = 'next-issue: no run is going in this repository\n';
7
7
  function onOffText(on) {
package/dist/cli.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import { parseArgs, USAGE } from './args.mjs';
3
- import { moveOldConfig, rejectOldConfig, writeDefaultConfig } from './config.mjs';
4
- import { OLD_CONFIG_FILE } from './config-fields.mjs';
5
- import { message } from './errors.mjs';
6
- import { repoRoot } from './git.mjs';
7
- import { ensureExcluded, excludeFile, removeIgnored } from './ignore.mjs';
8
- import { stopWorker } from './lock.mjs';
9
- import { followLog, newestRunLog } from './logs.mjs';
10
- import { serve } from './serve.mjs';
11
- import { startInWorker } from './start.mjs';
12
- import { STATE_DIR } from './state.mjs';
13
- import { switchInWorker } from './switch-run.mjs';
14
- import { workerPaths } from './worker-paths.mjs';
15
- import { WORKTREE_DIR } from './worktree.mjs';
2
+ import { parseArgs, USAGE } from './shared/args.mjs';
3
+ import { moveOldConfig, rejectOldConfig, writeDefaultConfig } from './shared/config.mjs';
4
+ import { OLD_CONFIG_FILE } from './shared/config-fields.mjs';
5
+ import { message } from './shared/errors.mjs';
6
+ import { repoRoot } from './shared/git.mjs';
7
+ import { ensureExcluded, excludeFile, removeIgnored } from './cli/ignore.mjs';
8
+ import { stopWorker } from './shared/lock.mjs';
9
+ import { followLog, newestRunLog } from './cli/logs.mjs';
10
+ import { serve } from './worker/serve.mjs';
11
+ import { startInWorker } from './cli/start.mjs';
12
+ import { STATE_DIR } from './shared/state.mjs';
13
+ import { switchInWorker } from './cli/switch-run.mjs';
14
+ import { workerPaths } from './shared/worker-paths.mjs';
15
+ import { WORKTREE_DIR } from './shared/worktree.mjs';
16
16
  function write(stream, text) {
17
17
  return new Promise((resolve, reject) => {
18
18
  stream.write(text, (error) => (error ? reject(error) : resolve()));
@@ -1,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
3
  export async function packageVersion() {
4
- const raw = await readFile(join(import.meta.dirname, '..', 'package.json'), 'utf8');
4
+ const raw = await readFile(join(import.meta.dirname, '..', '..', 'package.json'), 'utf8');
5
5
  return JSON.parse(raw).version;
6
6
  }
@@ -1,6 +1,6 @@
1
- import { onKill } from './children.mjs';
2
- import { escalateAndFinish } from './handover.mjs';
3
- import { writeState, writeStateNow } from './state.mjs';
1
+ import { onKill } from '../shared/children.mjs';
2
+ import { escalateAndFinish } from '../shared/handover.mjs';
3
+ import { writeState, writeStateNow } from '../shared/state.mjs';
4
4
  const LIMITS = { ciFixes: 'maxCiFixes', reviewRounds: 'maxReviewRounds' };
5
5
  export function budgetUse(job, budget) {
6
6
  return { round: job.state[budget], limit: job.context.config[LIMITS[budget]] };
@@ -1,5 +1,5 @@
1
1
  import { AsyncLocalStorage } from 'node:async_hooks';
2
- import { setCommandObserver, succeeded } from './exec.mjs';
2
+ import { setCommandObserver, succeeded } from '../shared/exec.mjs';
3
3
  const commandRecorder = new AsyncLocalStorage();
4
4
  setCommandObserver((record) => {
5
5
  const recorder = commandRecorder.getStore();
@@ -1,10 +1,10 @@
1
1
  import { parseCommitSubject } from './agent-reply.mjs';
2
2
  import { refundBudget, refundOnKill, spendBudget } from './budget.mjs';
3
- import { runStopped } from './children.mjs';
3
+ import { runStopped } from '../shared/children.mjs';
4
4
  import { commitWork, runFixer } from './fix.mjs';
5
- import { escalateAndFinish } from './handover.mjs';
6
- import { fallbackTitle } from './job.mjs';
7
- import { writeState } from './state.mjs';
5
+ import { escalateAndFinish } from '../shared/handover.mjs';
6
+ import { fallbackTitle } from '../shared/job.mjs';
7
+ import { writeState } from '../shared/state.mjs';
8
8
  export async function rebase(job) {
9
9
  const { context, issue, log, state, worktree } = job;
10
10
  const { config, ports, base } = context;
@@ -1,5 +1,5 @@
1
- import { escalateAndFinish } from './handover.mjs';
2
- import { heldOnBase, unsettledNote } from './unsettled.mjs';
1
+ import { escalateAndFinish } from '../shared/handover.mjs';
2
+ import { heldOnBase, unsettledNote } from '../shared/unsettled.mjs';
3
3
  /** Hands the issue over when a person without write access last changed its title or body; otherwise gives the job the title and body checked. */
4
4
  export async function untrustedEditors(job) {
5
5
  const { context, issue, log } = job;
@@ -1,9 +1,9 @@
1
- import { escalateAndFinish } from './handover.mjs';
2
- import { ROUND_CONTINUE } from './job.mjs';
1
+ import { escalateAndFinish } from '../shared/handover.mjs';
2
+ import { ROUND_CONTINUE } from '../shared/job.mjs';
3
3
  import { landApproved, resumeLanding } from './land.mjs';
4
- import { reapplyMessage, restoreChange } from './revert.mjs';
5
- import { writeState } from './state.mjs';
6
- import { beforeBaseSettled, releaseSettled } from './unsettled.mjs';
4
+ import { reapplyMessage, restoreChange } from '../shared/revert.mjs';
5
+ import { writeState } from '../shared/state.mjs';
6
+ import { beforeBaseSettled, releaseSettled } from '../shared/unsettled.mjs';
7
7
  export async function enterReview(job) {
8
8
  const { context, state } = job;
9
9
  const reverted = await beforeBaseSettled(state, context.base, async () => {
@@ -1,14 +1,14 @@
1
1
  import { parseCommitSubject, parseResolved, parseUnrelated, withoutClosingReferences, } from './agent-reply.mjs';
2
- import { CODING } from './agents.mjs';
2
+ import { CODING } from '../shared/agents.mjs';
3
3
  import { budgetUse } from './budget.mjs';
4
- import { runStopped } from './children.mjs';
5
- import { message } from './errors.mjs';
6
- import { HookError } from './git-commit.mjs';
7
- import { escalateAndFinish } from './handover.mjs';
8
- import { fallbackTitle, runRole } from './job.mjs';
9
- import { fixPrompt, hookPrompt } from './prompts.mjs';
10
- import { writeState } from './state.mjs';
11
- import { keepTail } from './text.mjs';
4
+ import { runStopped } from '../shared/children.mjs';
5
+ import { message } from '../shared/errors.mjs';
6
+ import { HookError } from '../shared/git-commit.mjs';
7
+ import { escalateAndFinish } from '../shared/handover.mjs';
8
+ import { fallbackTitle, runRole } from '../shared/job.mjs';
9
+ import { fixPrompt, hookPrompt } from '../shared/prompts.mjs';
10
+ import { writeState } from '../shared/state.mjs';
11
+ import { keepTail } from '../shared/text.mjs';
12
12
  export function escalateCheckFix(job, unrelated, checks, after = '') {
13
13
  if (unrelated === undefined) {
14
14
  return escalateAndFinish(job, `The fixer added no commit for the failed ${checks}.${after}`, 'no fix commit');
@@ -1,13 +1,13 @@
1
1
  import { budgetUse, refundBudget, refundOnKill } from './budget.mjs';
2
- import { checkWaiting } from './check-poll.mjs';
3
- import { runStopped } from './children.mjs';
4
- import { asError, message } from './errors.mjs';
2
+ import { checkWaiting } from '../shared/check-poll.mjs';
3
+ import { runStopped } from '../shared/children.mjs';
4
+ import { asError, message } from '../shared/errors.mjs';
5
5
  import { escalateCheckFix, fixRound } from './fix.mjs';
6
- import { escalateAndFinish } from './handover.mjs';
7
- import { GATE_FIXED, GATE_PASSED } from './job.mjs';
8
- import { revertFailedChecks, revertOrReport, sentence } from './revert.mjs';
9
- import { writeState } from './state.mjs';
10
- import { HALT_NOTE } from './unsettled.mjs';
6
+ import { escalateAndFinish } from '../shared/handover.mjs';
7
+ import { GATE_FIXED, GATE_PASSED } from '../shared/job.mjs';
8
+ import { revertFailedChecks, revertOrReport, sentence } from '../shared/revert.mjs';
9
+ import { writeState } from '../shared/state.mjs';
10
+ import { HALT_NOTE } from '../shared/unsettled.mjs';
11
11
  export async function checkGate(job, sha) {
12
12
  const { base } = job.context;
13
13
  let checks;
@@ -1,4 +1,4 @@
1
- import { must } from './exec.mjs';
1
+ import { must } from '../shared/exec.mjs';
2
2
  // `git hook run` (every commit) needs 2.36, `git check-attr --source` (every conflict) needs 2.40.
3
3
  export const MIN_GIT = [2, 40];
4
4
  export function gitVersionError(output) {
@@ -1,14 +1,14 @@
1
1
  import { parseCommitSubject, parseDone, parseQuestions } from './agent-reply.mjs';
2
- import { CODING, REVIEWING } from './agents.mjs';
3
- import { message } from './errors.mjs';
2
+ import { CODING, REVIEWING } from '../shared/agents.mjs';
3
+ import { message } from '../shared/errors.mjs';
4
4
  import { commitWork } from './fix.mjs';
5
- import { escalateAndFinish, finishDone } from './handover.mjs';
6
- import { numbered, withOpenQuestions } from './issue-format.mjs';
7
- import { fallbackTitle, ROUND_CONTINUE, runRole, } from './job.mjs';
8
- import { donePrompt, implementPrompt } from './prompts.mjs';
5
+ import { escalateAndFinish, finishDone } from '../shared/handover.mjs';
6
+ import { numbered, withOpenQuestions } from '../shared/issue-format.mjs';
7
+ import { fallbackTitle, ROUND_CONTINUE, runRole, } from '../shared/job.mjs';
8
+ import { donePrompt, implementPrompt } from '../shared/prompts.mjs';
9
9
  import { undoingReview } from './review.mjs';
10
- import { writeState } from './state.mjs';
11
- import { agentHeading } from './text.mjs';
10
+ import { writeState } from '../shared/state.mjs';
11
+ import { agentHeading } from '../shared/text.mjs';
12
12
  import { blockingFindings, formatFindings, parseVerdict } from './verdict.mjs';
13
13
  export async function implement(job) {
14
14
  const { context, issue, log, state, worktree, comments, reply } = job;
@@ -1,14 +1,14 @@
1
- import { runStopped } from './children.mjs';
1
+ import { runStopped } from '../shared/children.mjs';
2
2
  import { rebase } from './conflict.mjs';
3
3
  import { checkGate, escalateError } from './gate.mjs';
4
- import { PUSH_TRIES } from './git-land.mjs';
5
- import { updateLocalBase } from './local-base.mjs';
4
+ import { PUSH_TRIES } from '../shared/git-land.mjs';
5
+ import { updateLocalBase } from '../shared/local-base.mjs';
6
6
  import { localChecks } from './local-checks.mjs';
7
- import { escalateAndFinish, finishDone, stop } from './handover.mjs';
8
- import { oneAtATime } from './lock.mjs';
9
- import { readState, savedIssues, writeState } from './state.mjs';
10
- import { outputBlock } from './text.mjs';
11
- import { beforeBaseSettled, blocksLanding, HALT_NOTE, releaseSettled } from './unsettled.mjs';
7
+ import { escalateAndFinish, finishDone, stop } from '../shared/handover.mjs';
8
+ import { oneAtATime } from '../shared/lock.mjs';
9
+ import { readState, savedIssues, writeState } from '../shared/state.mjs';
10
+ import { outputBlock } from '../shared/text.mjs';
11
+ import { beforeBaseSettled, blocksLanding, HALT_NOTE, releaseSettled, } from '../shared/unsettled.mjs';
12
12
  const GIT_ERROR_CHARS = 1000;
13
13
  export function landApproved(job) {
14
14
  return landing(job, () => landLoop(job));
@@ -1,11 +1,11 @@
1
1
  import { budgetUse, refundBudget, refundOnKill } from './budget.mjs';
2
- import { evenWhenStopped, refuseWhenStopped, runStopped } from './children.mjs';
3
- import { minutesToMs } from './durations.mjs';
4
- import { succeeded } from './exec.mjs';
2
+ import { evenWhenStopped, refuseWhenStopped, runStopped } from '../shared/children.mjs';
3
+ import { minutesToMs } from '../shared/durations.mjs';
4
+ import { succeeded } from '../shared/exec.mjs';
5
5
  import { escalateCheckFix, fixRound } from './fix.mjs';
6
- import { escalateAndFinish } from './handover.mjs';
7
- import { writeState } from './state.mjs';
8
- import { outputBlock } from './text.mjs';
6
+ import { escalateAndFinish } from '../shared/handover.mjs';
7
+ import { writeState } from '../shared/state.mjs';
8
+ import { outputBlock } from '../shared/text.mjs';
9
9
  import { setUpBeforeChecks } from './worktree-setup.mjs';
10
10
  /**
11
11
  * Runs the configured check commands in the worktree before a push.
@@ -1,7 +1,7 @@
1
- import { handOverReply, writerComments } from './hand-over-comments.mjs';
2
- import { setStatus } from './job.mjs';
3
- import { oneAtATime } from './lock.mjs';
4
- import { writeState } from './state.mjs';
1
+ import { handOverReply, writerComments } from '../shared/hand-over-comments.mjs';
2
+ import { setStatus } from '../shared/job.mjs';
3
+ import { oneAtATime } from '../shared/lock.mjs';
4
+ import { writeState } from '../shared/state.mjs';
5
5
  export async function openJob(context, issue, log, state, start, handedOver, pending) {
6
6
  const started = Date.now();
7
7
  const { repo, config } = context;
@@ -1,7 +1,7 @@
1
- import { errorMatches, message } from './errors.mjs';
2
- import { listedIssues, waitingIssues } from './skip.mjs';
3
- import { readState, savedIssues, writeState } from './state.mjs';
4
- import { blocksLanding, heldOnBase } from './unsettled.mjs';
1
+ import { errorMatches, message } from '../shared/errors.mjs';
2
+ import { listedIssues, waitingIssues } from '../shared/skip.mjs';
3
+ import { readState, savedIssues, writeState } from '../shared/state.mjs';
4
+ import { blocksLanding, heldOnBase } from '../shared/unsettled.mjs';
5
5
  /**
6
6
  * What `gh issue view` says for an issue that was deleted or moved to another repository. Its GraphQL
7
7
  * `repository.issue` lookup does not follow a transfer (only REST does), so a moved issue fails like a deleted one.
@@ -1,15 +1,15 @@
1
1
  import { untrustedEditors } from './editors.mjs';
2
2
  import { enterReview, settleSquash } from './enter-review.mjs';
3
- import { branchName } from './git.mjs';
4
- import { runStopped } from './children.mjs';
5
- import { claimedError, dropClosed, finishClosing, stop, stopNow } from './handover.mjs';
3
+ import { branchName } from '../shared/git.mjs';
4
+ import { runStopped } from '../shared/children.mjs';
5
+ import { claimedError, dropClosed, finishClosing, stop, stopNow } from '../shared/handover.mjs';
6
6
  import { implement } from './implement.mjs';
7
7
  import { openJob } from './open-job.mjs';
8
8
  import { reviewRound, settleReview } from './review.mjs';
9
- import { closedReport, skipReport, unclaimedError } from './skip.mjs';
10
- import { hasLabel } from './labels.mjs';
11
- import { newState, readState, resetState, } from './state.mjs';
12
- import { beforeBaseSettled } from './unsettled.mjs';
9
+ import { closedReport, skipReport, unclaimedError } from '../shared/skip.mjs';
10
+ import { hasLabel } from '../shared/labels.mjs';
11
+ import { newState, readState, resetState, } from '../shared/state.mjs';
12
+ import { beforeBaseSettled } from '../shared/unsettled.mjs';
13
13
  import { setUp } from './worktree-setup.mjs';
14
14
  export async function processIssue(context, issue, claimed = () => undefined, slot) {
15
15
  const { repo } = context;
@@ -1,4 +1,4 @@
1
- import { truncate } from './text.mjs';
1
+ import { truncate } from '../shared/text.mjs';
2
2
  const TOOL_LINE_MAX = 80;
3
3
  const NOT_STAGES = new Set(['issue.start', 'agent.start', 'run.start']);
4
4
  export function startProgress(hunting = false) {
@@ -1,8 +1,8 @@
1
1
  import { readdir, rm, stat } from 'node:fs/promises';
2
2
  import { join } from 'node:path';
3
- import { daysToMs } from './durations.mjs';
4
- import { listOrEmpty } from './files.mjs';
5
- import { runsDir } from './state.mjs';
3
+ import { daysToMs } from '../shared/durations.mjs';
4
+ import { listOrEmpty } from '../shared/files.mjs';
5
+ import { runsDir } from '../shared/state.mjs';
6
6
  export async function pruneRuns(root, keepDays) {
7
7
  if (keepDays <= 0) {
8
8
  return 0;
@@ -1,8 +1,8 @@
1
- import { loadConfig } from './config.mjs';
2
- import { message } from './errors.mjs';
3
- import { detectRepo } from './git.mjs';
4
- import { waitingQuestions } from './hand-over-comments.mjs';
5
- import { PORTS } from './ports.mjs';
1
+ import { loadConfig } from '../shared/config.mjs';
2
+ import { message } from '../shared/errors.mjs';
3
+ import { detectRepo } from '../shared/git.mjs';
4
+ import { waitingQuestions } from '../shared/hand-over-comments.mjs';
5
+ import { PORTS } from '../shared/ports.mjs';
6
6
  export async function listQuestions(root) {
7
7
  const config = await loadConfig(root);
8
8
  return waitingQuestions(await detectRepo(root, config.remote), config, PORTS);
@@ -1,14 +1,14 @@
1
- import { REVIEWING } from './agents.mjs';
2
- import { runStopped } from './children.mjs';
1
+ import { REVIEWING } from '../shared/agents.mjs';
2
+ import { runStopped } from '../shared/children.mjs';
3
3
  import { budgetUse, refundBudget, refundOnKill, spendBudget } from './budget.mjs';
4
- import { message } from './errors.mjs';
4
+ import { message } from '../shared/errors.mjs';
5
5
  import { fixRound } from './fix.mjs';
6
- import { escalateAndFinish } from './handover.mjs';
7
- import { ROUND_CONTINUE, runRole, setStatus } from './job.mjs';
6
+ import { escalateAndFinish } from '../shared/handover.mjs';
7
+ import { ROUND_CONTINUE, runRole, setStatus } from '../shared/job.mjs';
8
8
  import { landApproved } from './land.mjs';
9
- import { capDiff, history, reviewPrompt } from './prompts.mjs';
10
- import { writeState } from './state.mjs';
11
- import { agentHeading, COMMENT_CUT, fitComment } from './text.mjs';
9
+ import { capDiff, history, reviewPrompt } from '../shared/prompts.mjs';
10
+ import { writeState } from '../shared/state.mjs';
11
+ import { agentHeading, COMMENT_CUT, fitComment } from '../shared/text.mjs';
12
12
  import { blockingFindings, formatFindings, formatVerdict, openFindings, parseVerdict, } from './verdict.mjs';
13
13
  export async function reviewRound(job) {
14
14
  const { context, issue, state } = job;
@@ -1,24 +1,24 @@
1
1
  import { recordCommands } from './command-records.mjs';
2
- import { loadConfig } from './config.mjs';
3
- import { minutesToMs } from './durations.mjs';
4
- import { message } from './errors.mjs';
5
- import { withDefaultTimeout } from './exec.mjs';
6
- import { writeJson } from './files.mjs';
7
- import { slug } from './gh.mjs';
8
- import { detectRepo } from './git.mjs';
2
+ import { loadConfig } from '../shared/config.mjs';
3
+ import { minutesToMs } from '../shared/durations.mjs';
4
+ import { message } from '../shared/errors.mjs';
5
+ import { withDefaultTimeout } from '../shared/exec.mjs';
6
+ import { writeJson } from '../shared/files.mjs';
7
+ import { slug } from '../shared/gh.mjs';
8
+ import { detectRepo } from '../shared/git.mjs';
9
9
  import { checkGitVersion } from './git-version.mjs';
10
- import { defaultBranch } from './github.mjs';
11
- import { hunter } from './hunt.mjs';
12
- import { onOff } from './switch.mjs';
13
- import { exitCode, runIssues } from './loop.mjs';
14
- import { Recorder } from './observe.mjs';
10
+ import { defaultBranch } from '../shared/github.mjs';
11
+ import { hunter } from '../shared/hunt.mjs';
12
+ import { onOff } from '../shared/switch.mjs';
13
+ import { exitCode, runIssues } from '../shared/loop.mjs';
14
+ import { Recorder } from '../shared/observe.mjs';
15
15
  import { pendingIssues } from './pending.mjs';
16
16
  import { processIssue } from './pipeline.mjs';
17
- import { PORTS } from './ports.mjs';
17
+ import { PORTS } from '../shared/ports.mjs';
18
18
  import { pruneRuns } from './prune-runs.mjs';
19
- import { count } from './summary.mjs';
20
- import { packageVersion } from './version.mjs';
21
- import { watchIssues } from './watch.mjs';
19
+ import { count } from '../shared/summary.mjs';
20
+ import { packageVersion } from '../shared/version.mjs';
21
+ import { watchIssues } from '../shared/watch.mjs';
22
22
  export async function runRepo(root, args, controls) {
23
23
  const config = await loadConfig(root, { sortFile: true });
24
24
  return withDefaultTimeout(minutesToMs(config.commandTimeoutMinutes), () => runWithConfig(root, args, controls, config));
@@ -3,19 +3,19 @@ import { mkdir, rename, rm } from 'node:fs/promises';
3
3
  import { createServer } from 'node:http';
4
4
  import { basename, dirname, join } from 'node:path';
5
5
  import { WebSocketServer } from 'ws';
6
- import { parseStartArgs } from './args.mjs';
7
- import { stopChildren, withRunChildren } from './children.mjs';
8
- import { message } from './errors.mjs';
9
- import { lock } from './lock.mjs';
6
+ import { parseStartArgs } from '../shared/args.mjs';
7
+ import { stopChildren, withRunChildren } from '../shared/children.mjs';
8
+ import { message } from '../shared/errors.mjs';
9
+ import { lock } from '../shared/lock.mjs';
10
10
  import { startProgress } from './progress.mjs';
11
- import { isNewer, } from './protocol.mjs';
11
+ import { isNewer, } from '../shared/protocol.mjs';
12
12
  import { listQuestions, questionSender, send, } from './questions.mjs';
13
13
  import { runRepo } from './run.mjs';
14
14
  import { listUpcoming, sendUpcoming } from './upcoming.mjs';
15
- import { packageVersion } from './version.mjs';
16
- import { resumeOnSuccessor } from './worker-client.mjs';
15
+ import { packageVersion } from '../shared/version.mjs';
16
+ import { resumeOnSuccessor } from '../shared/worker-client.mjs';
17
17
  import { keepLogTrimmed, LOG_CHECK_MS } from './worker-log.mjs';
18
- import { checkSocketPath, workerPaths } from './worker-paths.mjs';
18
+ import { checkSocketPath, workerPaths } from '../shared/worker-paths.mjs';
19
19
  import { active, dropUpgrade, endStatus, newRun, requestRefresh, requestStop, requestUpgrade, runControls, runsMessage, setHunting, setWatching, startRefusal, stoppingMessage, stopPoint, switchRefusal, } from './worker-run.mjs';
20
20
  import { broadcast, closer, fileId, isLaunch, listen, parseMessage, readBody, removeOwned, reply, sendAll, shutdown, stopListening, } from './worker-server.mjs';
21
21
  const LOCK_WAIT_MS = 5_000;
@@ -1,10 +1,10 @@
1
- import { loadConfig } from './config.mjs';
2
- import { message } from './errors.mjs';
3
- import { detectRepo } from './git.mjs';
4
- import { PORTS } from './ports.mjs';
1
+ import { loadConfig } from '../shared/config.mjs';
2
+ import { message } from '../shared/errors.mjs';
3
+ import { detectRepo } from '../shared/git.mjs';
4
+ import { PORTS } from '../shared/ports.mjs';
5
5
  import { send } from './questions.mjs';
6
- import { listedIssues, skipReason } from './skip.mjs';
7
- import { savedIssues } from './state.mjs';
6
+ import { listedIssues, skipReason } from '../shared/skip.mjs';
7
+ import { savedIssues } from '../shared/state.mjs';
8
8
  /** The fresh issues the worker would claim, oldest first as it claims them; issues with saved state resume instead. */
9
9
  export async function upcomingIssues(repo, config, ports) {
10
10
  const issues = await listedIssues(ports, repo, config, []);
@@ -1,5 +1,5 @@
1
- import { isRecord } from './records.mjs';
2
- import { agentHeading, paragraphs } from './text.mjs';
1
+ import { isRecord } from '../shared/records.mjs';
2
+ import { agentHeading, paragraphs } from '../shared/text.mjs';
3
3
  function isSeverity(value) {
4
4
  return value === 'blocking' || value === 'minor';
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { closeSync, fstatSync, ftruncateSync, openSync, readSync, writeSync } from 'node:fs';
2
- import { showingCommands } from './exec.mjs';
2
+ import { showingCommands } from '../shared/exec.mjs';
3
3
  export const LOG_LIMIT_BYTES = 10 * 1024 * 1024;
4
4
  export const LOG_KEEP_BYTES = 5 * 1024 * 1024;
5
5
  export const LOG_CHECK_MS = 60_000;
@@ -1,8 +1,8 @@
1
- import { runChildren, stopRunChildren } from './children.mjs';
2
- import { wakeableSleep } from './durations.mjs';
3
- import { onOff } from './switch.mjs';
1
+ import { runChildren, stopRunChildren } from '../shared/children.mjs';
2
+ import { wakeableSleep } from '../shared/durations.mjs';
3
+ import { onOff } from '../shared/switch.mjs';
4
4
  import { applyEvent } from './progress.mjs';
5
- import { STOP_POINTS, } from './protocol.mjs';
5
+ import { STOP_POINTS, } from '../shared/protocol.mjs';
6
6
  import { refresher } from './refresh.mjs';
7
7
  export function newRun(progress) {
8
8
  return {
@@ -1,10 +1,10 @@
1
- import { refuseWhenStopped } from './children.mjs';
2
- import { minutesToMs } from './durations.mjs';
3
- import { succeeded } from './exec.mjs';
4
- import { escalateAndFinish } from './handover.mjs';
5
- import { ROUND_CONTINUE } from './job.mjs';
6
- import { keepTail } from './text.mjs';
7
- import { heldOnBase, unsettledNote } from './unsettled.mjs';
1
+ import { refuseWhenStopped } from '../shared/children.mjs';
2
+ import { minutesToMs } from '../shared/durations.mjs';
3
+ import { succeeded } from '../shared/exec.mjs';
4
+ import { escalateAndFinish } from '../shared/handover.mjs';
5
+ import { ROUND_CONTINUE } from '../shared/job.mjs';
6
+ import { keepTail } from '../shared/text.mjs';
7
+ import { heldOnBase, unsettledNote } from '../shared/unsettled.mjs';
8
8
  export async function setUp(job) {
9
9
  const setup = await runSetup(job);
10
10
  if (setup === undefined || succeeded(setup)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "14.1.2",
3
+ "version": "14.2.1",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes