wogiflow 2.22.0 → 2.22.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.
@@ -12,6 +12,7 @@ const { checkImplementationGate } = require('../../core/implementation-gate');
12
12
  const { checkResearchRequirement } = require('../../core/research-gate');
13
13
  const { setRoutingPending, clearRoutingPending, ROUTING_CLEARED_PATH } = require('../../core/routing-gate');
14
14
  const { getPhaseContextPrompt } = require('../../core/phase-gate');
15
+ const { buildOverdueContext } = require('../../core/overdue-dispatches');
15
16
  const { markSkillPending, loadDurableSession } = require('../../../flow-durable-session');
16
17
  const { captureCurrentPrompt } = require('../../../flow-prompt-capture');
17
18
  const { spawnBackgroundDetection } = require('../../../flow-correction-detector');
@@ -172,6 +173,23 @@ runHook('UserPromptSubmit', async ({ input, parsedInput }) => {
172
173
  };
173
174
  }
174
175
 
176
+ // wf-d3e67abe — surface overdue workspace dispatches (silent worker deaths)
177
+ // to the manager model before it processes the next prompt. Manager-only;
178
+ // fail-open (buildOverdueContext returns null on any error or wrong scope).
179
+ try {
180
+ const overduePrompt = buildOverdueContext();
181
+ if (overduePrompt) {
182
+ coreResult = {
183
+ ...coreResult,
184
+ overduePrompt
185
+ };
186
+ }
187
+ } catch (err) {
188
+ if (process.env.DEBUG) {
189
+ console.error(`[Hook] Overdue dispatches check failed: ${err.message}`);
190
+ }
191
+ }
192
+
175
193
  return coreResult;
176
194
  }, {
177
195
  failMode: 'block',