Skip to content

The agent that grows with you

fix(desktop): expose APPROVAL_RESPOND_TIMEOUT_MS via the plugin SDK

Austin Pickett39aaa5c32657
diff --git a/apps/desktop/src/plugins/hermes-bots/group-test-utils.ts b/apps/desktop/src/plugins/hermes-bots/group-test-utils.ts
index 1292cf4e315..1f1a944f103 100644
--- a/apps/desktop/src/plugins/hermes-bots/group-test-utils.ts
+++ b/apps/desktop/src/plugins/hermes-bots/group-test-utils.ts
@@ -447,6 +447,8 @@ export async function pluginSdkMock(host: Record<string, unknown>) {
const nanostores = await import('nanostores')
return {
+ // Real value: approval.respond forwards it as its client deadline (#60654).
+ APPROVAL_RESPOND_TIMEOUT_MS: 300_000,
atom: nanostores.atom,
// Feature-detected SDK members: the modules read them off the namespace
// and fall back when absent, but vitest rejects a namespace access with
diff --git a/apps/desktop/src/plugins/hermes-bots/group-turns.ts b/apps/desktop/src/plugins/hermes-bots/group-turns.ts
index 1c056437eed..d15b4dbe64e 100644
--- a/apps/desktop/src/plugins/hermes-bots/group-turns.ts
+++ b/apps/desktop/src/plugins/hermes-bots/group-turns.ts
@@ -6,9 +6,7 @@
* Room-level sequencing lives in group-rounds.ts, which drives these.
*/
-import { host } from '@hermes/plugin-sdk'
-
-import { APPROVAL_RESPOND_TIMEOUT_MS } from '@hermes/shared'
+import { APPROVAL_RESPOND_TIMEOUT_MS, host } from '@hermes/plugin-sdk'
import { noteBotAttention } from './data'
import { groupFailureReason, recordGroupActivity } from './group-activity'
diff --git a/apps/desktop/src/sdk/index.ts b/apps/desktop/src/sdk/index.ts
index 297be359cc1..7579b1d36e7 100644
--- a/apps/desktop/src/sdk/index.ts
+++ b/apps/desktop/src/sdk/index.ts
@@ -1985,6 +1985,10 @@ export type { DisplayLease, DisplayObserveResult, DisplayStatus, DisplayThumbnai
/** THE compact-number formatter — every user-facing count/token figure goes
* through here (1230 → "1.2k", 1_500_000 → "1.5M"). Don't hand-roll `/1000`. */
export { compactNumber } from '@hermes/shared'
+/** Client deadline for `approval.respond`: matches the backend's
+ * `approvals.timeout` (300s) so a plugin answering an approval never rejects
+ * its own RPC while the backend still applies the decision (#60654). */
+export { APPROVAL_RESPOND_TIMEOUT_MS } from '@hermes/shared'
/** Hermes' reasoning levels, so a plugin surfacing a thinking depth uses the
* same scale as the rest of the app (labels: `reasoningEffortLabel`). */
export {