adhdev 0.8.66 → 0.8.67

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/dist/cli/index.js CHANGED
@@ -84664,7 +84664,7 @@ var init_adhdev_daemon = __esm({
84664
84664
  init_source();
84665
84665
  init_version();
84666
84666
  init_src();
84667
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.66" });
84667
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.67" });
84668
84668
  AdhdevDaemon = class _AdhdevDaemon {
84669
84669
  localHttpServer = null;
84670
84670
  localWss = null;
@@ -85386,6 +85386,15 @@ ${err?.stack || ""}`);
85386
85386
  await this.handleCommand(msg, msg.type, msg.payload);
85387
85387
  });
85388
85388
  }
85389
+ shouldFastFlushLaunchStatus(commandType, result) {
85390
+ if (!result || result.success !== true) return false;
85391
+ return commandType === "launch_cli" || commandType === "launch_ide";
85392
+ }
85393
+ triggerImmediateLaunchStatusUpdate(reason) {
85394
+ this.statusReporter?.resetP2PHash();
85395
+ void this.statusReporter?.sendUnifiedStatusReport({ forceServer: true, reason });
85396
+ void this.flushP2PDaemonMetadataSubscriptions();
85397
+ }
85389
85398
  async handleCommand(msg, cmd, args) {
85390
85399
  const normalizedArgs = this.ensureInteractionContext(args);
85391
85400
  const interactionId = String(normalizedArgs._interactionId);
@@ -85413,6 +85422,9 @@ ${err?.stack || ""}`);
85413
85422
  return;
85414
85423
  }
85415
85424
  const result = await this.components.router.execute(cmd, normalizedArgs, source);
85425
+ if (this.shouldFastFlushLaunchStatus(cmd, result)) {
85426
+ this.triggerImmediateLaunchStatusUpdate(`command:${cmd}`);
85427
+ }
85416
85428
  if (cmd.startsWith("workspace_")) this.statusReporter?.throttledReport();
85417
85429
  if (cmd === "get_status_metadata" || cmd.startsWith("workspace_") || cmd.startsWith("session_host_")) {
85418
85430
  void this.flushP2PDaemonMetadataSubscriptions();
@@ -85483,6 +85495,9 @@ ${err?.stack || ""}`);
85483
85495
  }
85484
85496
  }
85485
85497
  const routed = await this.components.router.execute(cmdType, normalizedData, "p2p");
85498
+ if (this.shouldFastFlushLaunchStatus(cmdType, routed)) {
85499
+ this.triggerImmediateLaunchStatusUpdate(`p2p:${cmdType}`);
85500
+ }
85486
85501
  if (cmdType.startsWith("workspace_")) this.statusReporter?.throttledReport();
85487
85502
  if (cmdType === "get_status_metadata" || cmdType.startsWith("workspace_") || cmdType.startsWith("session_host_")) {
85488
85503
  void this.flushP2PDaemonMetadataSubscriptions();