claude-rpc 0.9.0 → 0.9.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.
- package/package.json +1 -1
- package/src/default-config.js +8 -6
- package/src/format.js +7 -6
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/default-config.js
CHANGED
|
@@ -21,12 +21,14 @@ export const DEFAULT_CONFIG = {
|
|
|
21
21
|
// when Claude isn't open, the Discord presence should disappear quickly.
|
|
22
22
|
// The SessionEnd hook short-circuits this — see hook.js + format.applyIdle.
|
|
23
23
|
staleSessionMin: 5,
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
|
|
24
|
+
// Closing the terminal kills Claude Code without firing its SessionEnd hook,
|
|
25
|
+
// so the daemon can't tell "closed" from "paused" — it only sees the
|
|
26
|
+
// transcript stop. Default false: clear the card ~90-120s after the
|
|
27
|
+
// transcript goes quiet, so a closed terminal doesn't leave a stale card up.
|
|
28
|
+
// Set true to instead linger as 'idle' until staleSessionMin (keeps the card
|
|
29
|
+
// up through short pauses, at the cost of a closed terminal showing idle for
|
|
30
|
+
// up to staleSessionMin minutes before clearing).
|
|
31
|
+
idleWhenOpen: false,
|
|
30
32
|
// When true, the daemon CLEARS Discord activity entirely once the state
|
|
31
33
|
// goes stale — your profile shows nothing instead of an "Away" frame.
|
|
32
34
|
hideWhenStale: true,
|
package/src/format.js
CHANGED
|
@@ -736,12 +736,13 @@ export function applyIdle(state, cfg = {}) {
|
|
|
736
736
|
const idleMs = (cfg.idleThresholdSec || 60) * 1000;
|
|
737
737
|
const staleMs = Math.max(60_000, (cfg.staleSessionMin || 5) * 60 * 1000);
|
|
738
738
|
const notificationMs = (cfg.notificationWindowSec || 8) * 1000;
|
|
739
|
-
//
|
|
740
|
-
//
|
|
741
|
-
//
|
|
742
|
-
//
|
|
743
|
-
//
|
|
744
|
-
|
|
739
|
+
// Closing the terminal kills Claude Code without firing SessionEnd, so the
|
|
740
|
+
// only passive "is it gone?" signal is "no transcript is being written".
|
|
741
|
+
// DEFAULT (false): clear the card within ~90-120s of the transcript going
|
|
742
|
+
// quiet — a closed terminal shouldn't leave a card up for 5 minutes. Opt in
|
|
743
|
+
// with idleWhenOpen:true to instead linger as 'idle' until the staleMs
|
|
744
|
+
// backstop (keeps the card up through short pauses with the terminal open).
|
|
745
|
+
const idleWhenOpen = cfg.idleWhenOpen === true;
|
|
745
746
|
|
|
746
747
|
// Authoritative close signal from the SessionEnd hook — trust it instead
|
|
747
748
|
// of waiting on staleSessionMin. Any other hook clears the flag, so a
|