automata-cli 0.8.1 → 0.9.0-develop.387
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
CHANGED
|
@@ -71,7 +71,7 @@ Checks that the PR exists and is merged, the working tree is clean, and the remo
|
|
|
71
71
|
|
|
72
72
|
### `automata git publish-release`
|
|
73
73
|
|
|
74
|
-
Execute the
|
|
74
|
+
Execute the release sequence — GitFlow, or trunk-based for a repository without `develop` — and push to `origin`. Only requires `git`.
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
automata git publish-release # auto-detect version from the trunk tag
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
readConfig,
|
|
11
11
|
readRawConfig,
|
|
12
12
|
writeConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-42OV4UI4.js";
|
|
14
14
|
|
|
15
15
|
// src/config/ConfigWizard.tsx
|
|
16
16
|
import { useState } from "react";
|
|
@@ -36,6 +36,15 @@ var EXECUTOR_OPTIONS = [
|
|
|
36
36
|
{ label: "Claude Code", value: "claude" },
|
|
37
37
|
{ label: "Codex", value: "codex" }
|
|
38
38
|
];
|
|
39
|
+
var DUMP_ON_BLOCK_OPTIONS = [
|
|
40
|
+
{ label: "Yes \u2014 print the full health report when a tick does nothing", value: true },
|
|
41
|
+
{ label: "No \u2014 print only the one-line reason", value: false }
|
|
42
|
+
];
|
|
43
|
+
var RELEASE_FLOW_OPTIONS = [
|
|
44
|
+
{ label: "Detect from origin (gitflow if origin/develop exists)", value: void 0 },
|
|
45
|
+
{ label: "GitFlow", value: "gitflow" },
|
|
46
|
+
{ label: "Trunk-based", value: "trunk" }
|
|
47
|
+
];
|
|
39
48
|
var MAIN_MENU_OPTIONS = ["Remote / Mode", "Implement-Next", "Prompts", "Issue Watch", "Do Work", "Git"];
|
|
40
49
|
var PROMPTS_MENU_OPTIONS = [
|
|
41
50
|
"Sonar",
|
|
@@ -160,6 +169,14 @@ function ConfigWizard() {
|
|
|
160
169
|
const [doWorkLockStale, setDoWorkLockStale] = useState(
|
|
161
170
|
String(existing.doWork?.lockStaleMinutes ?? DEFAULT_DO_WORK.lockStaleMinutes)
|
|
162
171
|
);
|
|
172
|
+
const [doWorkDumpOnBlockIndex, setDoWorkDumpOnBlockIndex] = useState(
|
|
173
|
+
Math.max(
|
|
174
|
+
DUMP_ON_BLOCK_OPTIONS.findIndex(
|
|
175
|
+
(option) => option.value === (existing.doWork?.dumpOnBlock ?? DEFAULT_DO_WORK.dumpOnBlock)
|
|
176
|
+
),
|
|
177
|
+
0
|
|
178
|
+
)
|
|
179
|
+
);
|
|
163
180
|
const [validationError, setValidationError] = useState("");
|
|
164
181
|
const [doWorkMaxRuns, setDoWorkMaxRuns] = useState(
|
|
165
182
|
String(existing.doWork?.maxRunsPerTick ?? DEFAULT_DO_WORK.maxRunsPerTick)
|
|
@@ -174,6 +191,8 @@ function ConfigWizard() {
|
|
|
174
191
|
existing.doWork?.prompts?.prOrphan ?? DEFAULT_DO_WORK_PR_ORPHAN_PROMPT
|
|
175
192
|
);
|
|
176
193
|
const [gitTrunkBranch, setGitTrunkBranch] = useState(existing.git?.trunkBranch ?? "");
|
|
194
|
+
const initialReleaseFlowIndex = RELEASE_FLOW_OPTIONS.findIndex((o) => o.value === existing.git?.releaseFlow);
|
|
195
|
+
const [releaseFlowIndex, setReleaseFlowIndex] = useState(Math.max(initialReleaseFlowIndex, 0));
|
|
177
196
|
const [pendingRemote, setPendingRemote] = useState(existing.remoteType ?? "gh");
|
|
178
197
|
const [pendingTechnique, setPendingTechnique] = useState(
|
|
179
198
|
existing.issueDiscoveryTechnique ?? "label"
|
|
@@ -323,28 +342,7 @@ function ConfigWizard() {
|
|
|
323
342
|
setValidationError("Enter a whole number of minutes greater than zero.");
|
|
324
343
|
return;
|
|
325
344
|
}
|
|
326
|
-
|
|
327
|
-
const current = readRawConfig();
|
|
328
|
-
writeConfig({
|
|
329
|
-
...current,
|
|
330
|
-
doWork: {
|
|
331
|
-
...current.doWork,
|
|
332
|
-
baseBranch: doWorkBaseBranch.trim() || void 0,
|
|
333
|
-
protectedBranches: parseAllowedUsers(doWorkProtectedBranches),
|
|
334
|
-
executor: EXECUTOR_OPTIONS[doWorkExecutorIndex].value,
|
|
335
|
-
models: {
|
|
336
|
-
claude: doWorkClaudeModel.trim() || void 0,
|
|
337
|
-
codex: doWorkCodexModel.trim() || void 0
|
|
338
|
-
},
|
|
339
|
-
effort: {
|
|
340
|
-
claude: doWorkClaudeEffort.trim() || void 0,
|
|
341
|
-
codex: doWorkCodexEffort.trim() || void 0
|
|
342
|
-
},
|
|
343
|
-
maxRunsPerTick: maxRuns ?? void 0,
|
|
344
|
-
lockStaleMinutes: parsed
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
exit();
|
|
345
|
+
setScreen("do-work-dump-on-block");
|
|
348
346
|
},
|
|
349
347
|
onBack: () => setScreen("do-work-max-runs")
|
|
350
348
|
},
|
|
@@ -383,12 +381,7 @@ function ConfigWizard() {
|
|
|
383
381
|
},
|
|
384
382
|
"git-trunk-branch": {
|
|
385
383
|
setValue: setGitTrunkBranch,
|
|
386
|
-
onSubmit: () =>
|
|
387
|
-
const branch = gitTrunkBranch.trim();
|
|
388
|
-
const current = readRawConfig();
|
|
389
|
-
writeConfig({ ...current, git: { ...current.git, trunkBranch: branch || void 0 } });
|
|
390
|
-
exit();
|
|
391
|
-
},
|
|
384
|
+
onSubmit: () => setScreen("git-release-flow"),
|
|
392
385
|
onBack: () => setScreen("main")
|
|
393
386
|
}
|
|
394
387
|
};
|
|
@@ -440,6 +433,58 @@ function ConfigWizard() {
|
|
|
440
433
|
setIndex: setDoWorkExecutorIndex,
|
|
441
434
|
onSelect: () => setScreen("do-work-claude-model"),
|
|
442
435
|
onBack: () => setScreen("do-work-protected-branches")
|
|
436
|
+
},
|
|
437
|
+
"do-work-dump-on-block": {
|
|
438
|
+
index: doWorkDumpOnBlockIndex,
|
|
439
|
+
length: DUMP_ON_BLOCK_OPTIONS.length,
|
|
440
|
+
setIndex: setDoWorkDumpOnBlockIndex,
|
|
441
|
+
onSelect: () => {
|
|
442
|
+
const maxRuns = parseWholeInt(doWorkMaxRuns);
|
|
443
|
+
const current = readRawConfig();
|
|
444
|
+
writeConfig({
|
|
445
|
+
...current,
|
|
446
|
+
doWork: {
|
|
447
|
+
...current.doWork,
|
|
448
|
+
baseBranch: doWorkBaseBranch.trim() || void 0,
|
|
449
|
+
protectedBranches: parseAllowedUsers(doWorkProtectedBranches),
|
|
450
|
+
executor: EXECUTOR_OPTIONS[doWorkExecutorIndex].value,
|
|
451
|
+
models: {
|
|
452
|
+
claude: doWorkClaudeModel.trim() || void 0,
|
|
453
|
+
codex: doWorkCodexModel.trim() || void 0
|
|
454
|
+
},
|
|
455
|
+
effort: {
|
|
456
|
+
claude: doWorkClaudeEffort.trim() || void 0,
|
|
457
|
+
codex: doWorkCodexEffort.trim() || void 0
|
|
458
|
+
},
|
|
459
|
+
maxRunsPerTick: maxRuns ?? void 0,
|
|
460
|
+
// Validated on the previous screen, which refuses to advance without
|
|
461
|
+
// a positive whole number.
|
|
462
|
+
lockStaleMinutes: parseWholeInt(doWorkLockStale) ?? DEFAULT_DO_WORK.lockStaleMinutes,
|
|
463
|
+
dumpOnBlock: DUMP_ON_BLOCK_OPTIONS[doWorkDumpOnBlockIndex].value
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
exit();
|
|
467
|
+
},
|
|
468
|
+
onBack: () => setScreen("do-work-lock-stale")
|
|
469
|
+
},
|
|
470
|
+
"git-release-flow": {
|
|
471
|
+
index: releaseFlowIndex,
|
|
472
|
+
length: RELEASE_FLOW_OPTIONS.length,
|
|
473
|
+
setIndex: setReleaseFlowIndex,
|
|
474
|
+
onSelect: () => {
|
|
475
|
+
const branch = gitTrunkBranch.trim();
|
|
476
|
+
const current = readRawConfig();
|
|
477
|
+
writeConfig({
|
|
478
|
+
...current,
|
|
479
|
+
git: {
|
|
480
|
+
...current.git,
|
|
481
|
+
trunkBranch: branch || void 0,
|
|
482
|
+
releaseFlow: RELEASE_FLOW_OPTIONS[releaseFlowIndex].value
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
exit();
|
|
486
|
+
},
|
|
487
|
+
onBack: () => setScreen("git-trunk-branch")
|
|
443
488
|
}
|
|
444
489
|
};
|
|
445
490
|
useInput((input, key) => {
|
|
@@ -543,7 +588,7 @@ function ConfigWizard() {
|
|
|
543
588
|
title: "Do Work \u2014 Lock Staleness",
|
|
544
589
|
label: "Minutes before a run lock from another host is treated as stale:",
|
|
545
590
|
value: doWorkLockStale,
|
|
546
|
-
hint: `Type a number \xB7 Enter to
|
|
591
|
+
hint: `Type a number \xB7 Enter to continue \xB7 ${BACK}`
|
|
547
592
|
},
|
|
548
593
|
"do-work-discuss-prompt": {
|
|
549
594
|
title: "Prompts \u2014 Do Work \u2014 Discuss",
|
|
@@ -567,7 +612,7 @@ function ConfigWizard() {
|
|
|
567
612
|
title: "Git \u2014 Trunk Branch",
|
|
568
613
|
label: "Branch publish-release releases to (blank = detect it from the remote):",
|
|
569
614
|
value: gitTrunkBranch,
|
|
570
|
-
hint: `Type branch \xB7 Enter to
|
|
615
|
+
hint: `Type branch \xB7 Enter to continue \xB7 ${BACK}`
|
|
571
616
|
}
|
|
572
617
|
};
|
|
573
618
|
const menuViews = {
|
|
@@ -600,6 +645,18 @@ function ConfigWizard() {
|
|
|
600
645
|
options: EXECUTOR_OPTIONS.map((o) => o.label),
|
|
601
646
|
index: doWorkExecutorIndex,
|
|
602
647
|
hint: `\u2191/\u2193 to move \xB7 Enter to continue \xB7 ${BACK}`
|
|
648
|
+
},
|
|
649
|
+
"do-work-dump-on-block": {
|
|
650
|
+
title: "Do Work \u2014 Report on a Blocked Tick",
|
|
651
|
+
options: DUMP_ON_BLOCK_OPTIONS.map((o) => o.label),
|
|
652
|
+
index: doWorkDumpOnBlockIndex,
|
|
653
|
+
hint: `\u2191/\u2193 to move \xB7 Enter to save and exit \xB7 ${BACK}`
|
|
654
|
+
},
|
|
655
|
+
"git-release-flow": {
|
|
656
|
+
title: "Git \u2014 Release Flow",
|
|
657
|
+
options: RELEASE_FLOW_OPTIONS.map((o) => o.label),
|
|
658
|
+
index: releaseFlowIndex,
|
|
659
|
+
hint: `\u2191/\u2193 to move \xB7 Enter to save \xB7 ${BACK}`
|
|
603
660
|
}
|
|
604
661
|
};
|
|
605
662
|
const textView = textViews[screen];
|
|
@@ -12,7 +12,8 @@ var DEFAULT_DO_WORK = {
|
|
|
12
12
|
protectedBranches: ["main", "master"],
|
|
13
13
|
executor: "claude",
|
|
14
14
|
maxRunsPerTick: 0,
|
|
15
|
-
lockStaleMinutes: 120
|
|
15
|
+
lockStaleMinutes: 120,
|
|
16
|
+
dumpOnBlock: true
|
|
16
17
|
};
|
|
17
18
|
var DEFAULT_DO_WORK_ISSUE_DISCUSS_PROMPT = "You are the agent named in the context below, working on a GitHub issue together with the people allowed to instruct you. Answer the messages marked NEW; the earlier messages are context only.\n\nDo not modify, create or delete any file, and do not create a branch or a pull request, UNLESS a message marked NEW explicitly asks you to implement the work. If it does: create a branch off the base branch named below, implement the change following the project's existing conventions, run the tests and the linter, and open a pull request whose body contains `Closes #<issue number>`.\n\nOtherwise do not touch the code at all: reply on the issue with the specification, the plan, or the open questions you need answered. Keep the reply short and concrete.\n\nEither way, always post a reply on the issue before you finish \u2014 including when you implemented and opened a pull request. Silence is indistinguishable from a crash, and the run will be reported as having produced no answer.";
|
|
18
19
|
var DEFAULT_DO_WORK_PR_WORK_PROMPT = "You are the agent named in the context below, working on the pull request for a GitHub issue together with the people allowed to instruct you. Work on the branch named below, which is already checked out and up to date.\n\nAddress every message marked NEW and every unresolved review thread listed. Follow the project's existing conventions, run the tests and the linter, then commit and push to that branch. Do not merge the pull request and do not push to the base branch.\n\nReply on the pull request with a short summary of what you changed, or reply in the review thread when your answer belongs to a specific comment. Always post a reply \u2014 silence looks like a crash.";
|