automata-cli 0.8.1 → 0.9.0-develop.382

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.
@@ -10,7 +10,7 @@ import {
10
10
  readConfig,
11
11
  readRawConfig,
12
12
  writeConfig
13
- } from "./chunk-MIPBYVK5.js";
13
+ } from "./chunk-42OV4UI4.js";
14
14
 
15
15
  // src/config/ConfigWizard.tsx
16
16
  import { useState } from "react";
@@ -36,6 +36,10 @@ 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
+ ];
39
43
  var MAIN_MENU_OPTIONS = ["Remote / Mode", "Implement-Next", "Prompts", "Issue Watch", "Do Work", "Git"];
40
44
  var PROMPTS_MENU_OPTIONS = [
41
45
  "Sonar",
@@ -160,6 +164,14 @@ function ConfigWizard() {
160
164
  const [doWorkLockStale, setDoWorkLockStale] = useState(
161
165
  String(existing.doWork?.lockStaleMinutes ?? DEFAULT_DO_WORK.lockStaleMinutes)
162
166
  );
167
+ const [doWorkDumpOnBlockIndex, setDoWorkDumpOnBlockIndex] = useState(
168
+ Math.max(
169
+ DUMP_ON_BLOCK_OPTIONS.findIndex(
170
+ (option) => option.value === (existing.doWork?.dumpOnBlock ?? DEFAULT_DO_WORK.dumpOnBlock)
171
+ ),
172
+ 0
173
+ )
174
+ );
163
175
  const [validationError, setValidationError] = useState("");
164
176
  const [doWorkMaxRuns, setDoWorkMaxRuns] = useState(
165
177
  String(existing.doWork?.maxRunsPerTick ?? DEFAULT_DO_WORK.maxRunsPerTick)
@@ -323,28 +335,7 @@ function ConfigWizard() {
323
335
  setValidationError("Enter a whole number of minutes greater than zero.");
324
336
  return;
325
337
  }
326
- const maxRuns = parseWholeInt(doWorkMaxRuns);
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();
338
+ setScreen("do-work-dump-on-block");
348
339
  },
349
340
  onBack: () => setScreen("do-work-max-runs")
350
341
  },
@@ -440,6 +431,39 @@ function ConfigWizard() {
440
431
  setIndex: setDoWorkExecutorIndex,
441
432
  onSelect: () => setScreen("do-work-claude-model"),
442
433
  onBack: () => setScreen("do-work-protected-branches")
434
+ },
435
+ "do-work-dump-on-block": {
436
+ index: doWorkDumpOnBlockIndex,
437
+ length: DUMP_ON_BLOCK_OPTIONS.length,
438
+ setIndex: setDoWorkDumpOnBlockIndex,
439
+ onSelect: () => {
440
+ const maxRuns = parseWholeInt(doWorkMaxRuns);
441
+ const current = readRawConfig();
442
+ writeConfig({
443
+ ...current,
444
+ doWork: {
445
+ ...current.doWork,
446
+ baseBranch: doWorkBaseBranch.trim() || void 0,
447
+ protectedBranches: parseAllowedUsers(doWorkProtectedBranches),
448
+ executor: EXECUTOR_OPTIONS[doWorkExecutorIndex].value,
449
+ models: {
450
+ claude: doWorkClaudeModel.trim() || void 0,
451
+ codex: doWorkCodexModel.trim() || void 0
452
+ },
453
+ effort: {
454
+ claude: doWorkClaudeEffort.trim() || void 0,
455
+ codex: doWorkCodexEffort.trim() || void 0
456
+ },
457
+ maxRunsPerTick: maxRuns ?? void 0,
458
+ // Validated on the previous screen, which refuses to advance without
459
+ // a positive whole number.
460
+ lockStaleMinutes: parseWholeInt(doWorkLockStale) ?? DEFAULT_DO_WORK.lockStaleMinutes,
461
+ dumpOnBlock: DUMP_ON_BLOCK_OPTIONS[doWorkDumpOnBlockIndex].value
462
+ }
463
+ });
464
+ exit();
465
+ },
466
+ onBack: () => setScreen("do-work-lock-stale")
443
467
  }
444
468
  };
445
469
  useInput((input, key) => {
@@ -543,7 +567,7 @@ function ConfigWizard() {
543
567
  title: "Do Work \u2014 Lock Staleness",
544
568
  label: "Minutes before a run lock from another host is treated as stale:",
545
569
  value: doWorkLockStale,
546
- hint: `Type a number \xB7 Enter to save \xB7 ${BACK}`
570
+ hint: `Type a number \xB7 Enter to continue \xB7 ${BACK}`
547
571
  },
548
572
  "do-work-discuss-prompt": {
549
573
  title: "Prompts \u2014 Do Work \u2014 Discuss",
@@ -600,6 +624,12 @@ function ConfigWizard() {
600
624
  options: EXECUTOR_OPTIONS.map((o) => o.label),
601
625
  index: doWorkExecutorIndex,
602
626
  hint: `\u2191/\u2193 to move \xB7 Enter to continue \xB7 ${BACK}`
627
+ },
628
+ "do-work-dump-on-block": {
629
+ title: "Do Work \u2014 Report on a Blocked Tick",
630
+ options: DUMP_ON_BLOCK_OPTIONS.map((o) => o.label),
631
+ index: doWorkDumpOnBlockIndex,
632
+ hint: `\u2191/\u2193 to move \xB7 Enter to save and exit \xB7 ${BACK}`
603
633
  }
604
634
  };
605
635
  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.";