adhdev 0.8.66 → 0.8.68

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
@@ -10954,6 +10954,8 @@ function resolveCliAdapterConfig(provider) {
10954
10954
  approvalCooldown: t.approvalCooldown ?? 3e3,
10955
10955
  generatingIdle: t.generatingIdle ?? 6e3,
10956
10956
  idleFinish: t.idleFinish ?? 5e3,
10957
+ idleFinishConfirm: t.idleFinishConfirm ?? 2e3,
10958
+ statusActivityHold: t.statusActivityHold ?? 2e3,
10957
10959
  maxResponse: t.maxResponse ?? 3e5,
10958
10960
  shutdownGrace: t.shutdownGrace ?? 1e3,
10959
10961
  outputSettle: t.outputSettle ?? 300
@@ -11203,9 +11205,6 @@ var init_provider_cli_adapter = __esm({
11203
11205
  traceSessionId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
11204
11206
  static MAX_TRACE_ENTRIES = 250;
11205
11207
  providerResolutionMeta;
11206
- static IDLE_FINISH_CONFIRM_MS = 2e3;
11207
- static HERMES_IDLE_FINISH_CONFIRM_MS = 5e3;
11208
- static STATUS_ACTIVITY_HOLD_MS = 2e3;
11209
11208
  static FINISH_RETRY_DELAY_MS = 300;
11210
11209
  static MAX_FINISH_RETRIES = 2;
11211
11210
  syncMessageViews() {
@@ -11213,10 +11212,10 @@ var init_provider_cli_adapter = __esm({
11213
11212
  this.structuredMessages = [...this.committedMessages];
11214
11213
  }
11215
11214
  getIdleFinishConfirmMs() {
11216
- return this.cliType === "hermes-cli" ? _ProviderCliAdapter.HERMES_IDLE_FINISH_CONFIRM_MS : _ProviderCliAdapter.IDLE_FINISH_CONFIRM_MS;
11215
+ return this.timeouts.idleFinishConfirm;
11217
11216
  }
11218
11217
  getStatusActivityHoldMs() {
11219
- return this.cliType === "hermes-cli" ? _ProviderCliAdapter.HERMES_IDLE_FINISH_CONFIRM_MS : _ProviderCliAdapter.STATUS_ACTIVITY_HOLD_MS;
11218
+ return this.timeouts.statusActivityHold;
11220
11219
  }
11221
11220
  setStatus(status, trigger) {
11222
11221
  const prev = this.currentStatus;
@@ -84664,7 +84663,7 @@ var init_adhdev_daemon = __esm({
84664
84663
  init_source();
84665
84664
  init_version();
84666
84665
  init_src();
84667
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.66" });
84666
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.68" });
84668
84667
  AdhdevDaemon = class _AdhdevDaemon {
84669
84668
  localHttpServer = null;
84670
84669
  localWss = null;
@@ -85386,6 +85385,15 @@ ${err?.stack || ""}`);
85386
85385
  await this.handleCommand(msg, msg.type, msg.payload);
85387
85386
  });
85388
85387
  }
85388
+ shouldFastFlushLaunchStatus(commandType, result) {
85389
+ if (!result || result.success !== true) return false;
85390
+ return commandType === "launch_cli" || commandType === "launch_ide";
85391
+ }
85392
+ triggerImmediateLaunchStatusUpdate(reason) {
85393
+ this.statusReporter?.resetP2PHash();
85394
+ void this.statusReporter?.sendUnifiedStatusReport({ forceServer: true, reason });
85395
+ void this.flushP2PDaemonMetadataSubscriptions();
85396
+ }
85389
85397
  async handleCommand(msg, cmd, args) {
85390
85398
  const normalizedArgs = this.ensureInteractionContext(args);
85391
85399
  const interactionId = String(normalizedArgs._interactionId);
@@ -85413,6 +85421,9 @@ ${err?.stack || ""}`);
85413
85421
  return;
85414
85422
  }
85415
85423
  const result = await this.components.router.execute(cmd, normalizedArgs, source);
85424
+ if (this.shouldFastFlushLaunchStatus(cmd, result)) {
85425
+ this.triggerImmediateLaunchStatusUpdate(`command:${cmd}`);
85426
+ }
85416
85427
  if (cmd.startsWith("workspace_")) this.statusReporter?.throttledReport();
85417
85428
  if (cmd === "get_status_metadata" || cmd.startsWith("workspace_") || cmd.startsWith("session_host_")) {
85418
85429
  void this.flushP2PDaemonMetadataSubscriptions();
@@ -85483,6 +85494,9 @@ ${err?.stack || ""}`);
85483
85494
  }
85484
85495
  }
85485
85496
  const routed = await this.components.router.execute(cmdType, normalizedData, "p2p");
85497
+ if (this.shouldFastFlushLaunchStatus(cmdType, routed)) {
85498
+ this.triggerImmediateLaunchStatusUpdate(`p2p:${cmdType}`);
85499
+ }
85486
85500
  if (cmdType.startsWith("workspace_")) this.statusReporter?.throttledReport();
85487
85501
  if (cmdType === "get_status_metadata" || cmdType.startsWith("workspace_") || cmdType.startsWith("session_host_")) {
85488
85502
  void this.flushP2PDaemonMetadataSubscriptions();