@axiomatic-labs/claudeflow 2.13.41 → 2.13.42

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.
@@ -51,7 +51,13 @@ function normalizeHandlerPath(command) {
51
51
  }
52
52
 
53
53
  function defaultOverrides() {
54
- return { version: 1, disabledHandlers: [], disabledReminders: [], enforcementDisabled: false };
54
+ return {
55
+ version: 1,
56
+ disabledHandlers: [],
57
+ disabledReminders: [],
58
+ enforcementDisabled: false,
59
+ runToCompletionReminderEnabled: false,
60
+ };
55
61
  }
56
62
 
57
63
  function readOverrides(projectRoot) {
@@ -62,6 +68,7 @@ function readOverrides(projectRoot) {
62
68
  disabledHandlers: Array.isArray(data.disabledHandlers) ? data.disabledHandlers : [],
63
69
  disabledReminders: Array.isArray(data.disabledReminders) ? data.disabledReminders : [],
64
70
  enforcementDisabled: data.enforcementDisabled === true,
71
+ runToCompletionReminderEnabled: data.runToCompletionReminderEnabled === true,
65
72
  };
66
73
  }
67
74
 
@@ -189,6 +196,19 @@ function toggleEnforcementMode(projectRoot, { disable }) {
189
196
  return { state: disable ? 'off' : 'on' };
190
197
  }
191
198
 
199
+ // Toggle the run-to-completion reminder. Independent of the master
200
+ // enforcement switch — it's a soft nudge, not a gate. Default OFF.
201
+ function toggleRunToCompletionReminder(projectRoot, { enable }) {
202
+ if (typeof enable !== 'boolean') return { state: 'error', reason: 'enable-required' };
203
+ const overrides = readOverrides(projectRoot);
204
+ if (overrides.runToCompletionReminderEnabled === enable) {
205
+ return { state: 'noop', reason: enable ? 'already-on' : 'already-off' };
206
+ }
207
+ overrides.runToCompletionReminderEnabled = enable;
208
+ writeOverrides(projectRoot, overrides);
209
+ return { state: enable ? 'on' : 'off' };
210
+ }
211
+
192
212
  // Toggle a single reminder by id. Same persistence file, same hot-reload
193
213
  // semantics — `reload-reminder.js` re-reads overrides on every invocation.
194
214
  function toggleReminderOverride(projectRoot, { id, disable }) {
@@ -219,6 +239,7 @@ module.exports = {
219
239
  toggleHookOverride,
220
240
  toggleReminderOverride,
221
241
  toggleEnforcementMode,
242
+ toggleRunToCompletionReminder,
222
243
  normalizeHandlerPath,
223
244
  matchesOverride,
224
245
  };
package/lib/panel.js CHANGED
@@ -26,6 +26,7 @@ const {
26
26
  toggleHookOverride,
27
27
  toggleReminderOverride,
28
28
  toggleEnforcementMode,
29
+ toggleRunToCompletionReminder,
29
30
  normalizeHandlerPath,
30
31
  } = require('./hook-overrides.js');
31
32
 
@@ -286,6 +287,14 @@ function getEnforcementInfo(cwd) {
286
287
  };
287
288
  }
288
289
 
290
+ function getRunToCompletionInfo(cwd) {
291
+ const overrides = readOverrides(cwd);
292
+ return {
293
+ on: overrides.runToCompletionReminderEnabled === true,
294
+ handler: 'UserPromptSubmit/run-to-completion-reminder.js',
295
+ };
296
+ }
297
+
289
298
  function getActivePlanInfo(cwd) {
290
299
  const p = path.join(cwd, '.claudeflow', 'state', 'active-plan.json');
291
300
  let raw;
@@ -536,6 +545,7 @@ function collectStatus(cwd) {
536
545
  activeRun: getActiveRunInfo(cwd),
537
546
  reminders: getRemindersInfo(cwd),
538
547
  enforcement: getEnforcementInfo(cwd),
548
+ runToCompletion: getRunToCompletionInfo(cwd),
539
549
  activePlan: getActivePlanInfo(cwd),
540
550
  logs: getLogsInfo(cwd),
541
551
  doctor: getDoctorInfo(cwd),
@@ -706,6 +716,11 @@ details[open] summary { padding-bottom: 8px; border-bottom: 1px solid var(--bord
706
716
  <label class="enforce-switch"><input type="checkbox" id="enforce-toggle" /><span class="enforce-slider"></span></label>
707
717
  <span class="enforce-state" id="enforce-state">…</span>
708
718
  </span>
719
+ <span class="enforce-pill" id="run-to-completion-pill" title="Soft nudge — when the agent stops mid-build with PLACEHOLDER proofs or untouched files, the next user prompt receives a reminder telling the LLM to resume without re-checkpointing. Independent of the master Enforcement switch.">
720
+ <span class="enforce-label">Run-to-completion reminder</span>
721
+ <label class="enforce-switch"><input type="checkbox" id="run-to-completion-toggle" /><span class="enforce-slider"></span></label>
722
+ <span class="enforce-state" id="run-to-completion-state">…</span>
723
+ </span>
709
724
  <label class="toggle"><input type="checkbox" id="auto" checked /> auto-refresh 5s</label>
710
725
  <button id="refresh">Refresh</button>
711
726
  </span>
@@ -826,6 +841,20 @@ function renderHeader() {
826
841
  } else {
827
842
  pill.style.display = 'none';
828
843
  }
844
+ const rtc = state.runToCompletion;
845
+ const rtcPill = document.getElementById('run-to-completion-pill');
846
+ const rtcCb = document.getElementById('run-to-completion-toggle');
847
+ const rtcLbl = document.getElementById('run-to-completion-state');
848
+ if (rtc && rtcPill) {
849
+ rtcPill.dataset.state = rtc.on ? 'on' : 'off';
850
+ rtcCb.checked = rtc.on;
851
+ rtcLbl.textContent = rtc.on ? 'ON' : 'OFF';
852
+ rtcPill.title = rtc.on
853
+ ? 'Run-to-completion reminder is ON — every user prompt during an in-progress build step receives a "resume work, do not checkpoint" reminder. The agent can still stop when genuinely blocked.'
854
+ : 'Run-to-completion reminder is OFF — the agent may pause for user confirmation after partial progress. Click to enable the soft nudge.';
855
+ } else if (rtcPill) {
856
+ rtcPill.style.display = 'none';
857
+ }
829
858
  }
830
859
 
831
860
  function severityFor(id) {
@@ -1476,6 +1505,34 @@ document.getElementById('enforce-toggle').onchange = (e) => {
1476
1505
  toggleEnforcement(!e.target.checked);
1477
1506
  };
1478
1507
 
1508
+ async function toggleRunToCompletion(enable) {
1509
+ try {
1510
+ const r = await fetch('/api/run-to-completion/toggle', {
1511
+ method: 'POST',
1512
+ headers: { 'Content-Type': 'application/json' },
1513
+ body: JSON.stringify({ enable }),
1514
+ });
1515
+ const result = await r.json();
1516
+ if (!r.ok || result.state === 'error') {
1517
+ showToast('Toggle failed: ' + (result.reason || result.error || 'unknown'), 'err');
1518
+ } else if (result.state === 'noop') {
1519
+ showToast('Run-to-completion reminder already in target state', 'ok');
1520
+ } else {
1521
+ showToast(enable
1522
+ ? 'Run-to-completion reminder ON — agent will be nudged to resume mid-build steps.'
1523
+ : 'Run-to-completion reminder OFF — agent may checkpoint after partial progress.',
1524
+ 'ok');
1525
+ }
1526
+ } catch (e) {
1527
+ showToast('Network error: ' + e.message, 'err');
1528
+ }
1529
+ await refresh();
1530
+ }
1531
+
1532
+ document.getElementById('run-to-completion-toggle').onchange = (e) => {
1533
+ toggleRunToCompletion(e.target.checked);
1534
+ };
1535
+
1479
1536
  document.getElementById('refresh').onclick = refresh;
1480
1537
  document.getElementById('auto').onchange = (e) => {
1481
1538
  if (timer) clearInterval(timer);
@@ -1585,6 +1642,20 @@ function handler(cwd) {
1585
1642
  return send(status, JSON.stringify(result), 'application/json');
1586
1643
  }
1587
1644
 
1645
+ if (req.method === 'POST' && route === '/api/run-to-completion/toggle') {
1646
+ const raw = await readRequestBody(req);
1647
+ let payload;
1648
+ try { payload = JSON.parse(raw); }
1649
+ catch { return send(400, JSON.stringify({ error: 'invalid json' }), 'application/json'); }
1650
+ const { enable } = payload;
1651
+ if (typeof enable !== 'boolean') {
1652
+ return send(400, JSON.stringify({ error: 'enable required' }), 'application/json');
1653
+ }
1654
+ const result = toggleRunToCompletionReminder(cwd, { enable });
1655
+ const status = result.state === 'error' ? 500 : 200;
1656
+ return send(status, JSON.stringify(result), 'application/json');
1657
+ }
1658
+
1588
1659
  if (req.method === 'POST' && route === '/api/reminders/toggle') {
1589
1660
  const raw = await readRequestBody(req);
1590
1661
  let payload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomatic-labs/claudeflow",
3
- "version": "2.13.41",
3
+ "version": "2.13.42",
4
4
  "description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
5
5
  "bin": {
6
6
  "claudeflow": "./bin/cli.js"