@adhdev/daemon-core 0.9.82-rc.206 → 0.9.82-rc.208

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.206",
3
+ "version": "0.9.82-rc.208",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -500,6 +500,15 @@ export class SpecDriver {
500
500
  this.lastBusyState = evState;
501
501
  // Cancel any pending idle commit — non-idle reading invalidates it.
502
502
  this.cancelIdleHold();
503
+ // Reset completion_idle_after tracking on busy re-entry. If the
504
+ // completion marker is still on screen when a new PTY burst
505
+ // arrives (rapid tool-output toggle), the old firstSeenAt would
506
+ // make ageMs >= holdMs immediately on the very next reevaluate,
507
+ // forcing idle again before the new output has settled and
508
+ // creating a rapid busy↔idle loop. Resetting here forces the
509
+ // hold window to restart from the current moment.
510
+ this.completionIdleKey = '';
511
+ this.completionIdleFirstSeenAt = 0;
503
512
  // Schedule a re-evaluation when the hold window expires. PTYs
504
513
  // typically stop emitting once the agent stops printing (the
505
514
  // footer settles), so without an explicit timer the driver
@@ -813,8 +822,8 @@ function guessExt(mime: string): string {
813
822
 
814
823
  function extractMatchedRules(ev: SpecEvaluation): string[] {
815
824
  if (!Array.isArray(ev.trace)) return [];
816
- return (ev.trace as any[])
817
- .filter(t => t.matched === true || t.kind === 'state_match')
818
- .map(t => t.rule ?? t.stateId ?? t.id ?? String(t))
825
+ return ev.trace
826
+ .filter(t => t.kind === 'state_match')
827
+ .map(t => t.text)
819
828
  .filter(Boolean);
820
829
  }