- Strip context bloat from nudge messages — no more IRC digest, git log, or work state inlined into tmux send-keys (was silently dropping the entire message). Nudge now just includes pending notification count. - Notifications no longer send directly via tmux — they flow through the idle nudge only. Urgent notifications reset the fired flag so the nudge fires sooner. - Add test-nudge RPC that exercises the actual daemon send path (test-send was client-side only, didn't test the real code path). - Update nudge text: "Let your feelings guide your thinking." - Increase send-keys sleep from 200ms to 500ms. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
84 lines
2.5 KiB
Cap'n Proto
84 lines
2.5 KiB
Cap'n Proto
@0xb8e2f4a1c3d56789;
|
|
|
|
# Claude daemon RPC interface.
|
|
#
|
|
# Served over a Unix domain socket. Clients connect, bootstrap
|
|
# the Daemon interface, make calls, disconnect.
|
|
|
|
struct Notification {
|
|
type @0 :Text;
|
|
urgency @1 :UInt8;
|
|
message @2 :Text;
|
|
timestamp @3 :Float64;
|
|
}
|
|
|
|
struct TypeInfo {
|
|
name @0 :Text;
|
|
count @1 :UInt64;
|
|
firstSeen @2 :Float64;
|
|
lastSeen @3 :Float64;
|
|
threshold @4 :Int8; # -1 = inherit, 0-3 = explicit level
|
|
}
|
|
|
|
enum Activity {
|
|
idle @0;
|
|
focused @1;
|
|
sleeping @2;
|
|
}
|
|
|
|
struct Status {
|
|
lastUserMsg @0 :Float64;
|
|
lastResponse @1 :Float64;
|
|
claudePane @2 :Text;
|
|
sleepUntil @3 :Float64; # 0 = not sleeping, -1 = indefinite
|
|
quietUntil @4 :Float64;
|
|
consolidating @5 :Bool;
|
|
dreaming @6 :Bool;
|
|
fired @7 :Bool;
|
|
kentPresent @8 :Bool;
|
|
uptime @9 :Float64;
|
|
activity @10 :Activity;
|
|
pendingCount @11 :UInt32;
|
|
idleTimeout @12 :Float64; # configured idle timeout (secs)
|
|
notifyTimeout @13 :Float64; # configured notify-via-tmux timeout (secs)
|
|
sinceActivity @14 :Float64; # secs since max(lastUserMsg, lastResponse)
|
|
sinceUser @15 :Float64; # secs since lastUserMsg
|
|
blockReason @16 :Text; # why idle timer hasn't fired
|
|
activityEwma @17 :Float64; # 0-1, EWMA of recent activity (running fraction)
|
|
}
|
|
|
|
interface Daemon {
|
|
# Idle timer
|
|
user @0 (pane :Text) -> ();
|
|
response @1 (pane :Text) -> ();
|
|
sleep @2 (until :Float64) -> (); # 0 = indefinite
|
|
wake @3 () -> ();
|
|
quiet @4 (seconds :UInt32) -> ();
|
|
consolidating @5 () -> ();
|
|
consolidated @6 () -> ();
|
|
dreamStart @7 () -> ();
|
|
dreamEnd @8 () -> ();
|
|
stop @9 () -> ();
|
|
status @10 () -> (status :Status);
|
|
|
|
# Notifications
|
|
notify @11 (notification :Notification) -> (interrupt :Bool);
|
|
getNotifications @12 (minUrgency :UInt8) -> (notifications :List(Notification));
|
|
getTypes @13 () -> (types :List(TypeInfo));
|
|
setThreshold @14 (type :Text, level :UInt8) -> ();
|
|
|
|
idleTimeout @16 (seconds :Float64) -> ();
|
|
notifyTimeout @19 (seconds :Float64) -> ();
|
|
save @17 () -> ();
|
|
debug @18 () -> (json :Text);
|
|
|
|
ewma @20 (value :Float64) -> (current :Float64);
|
|
afk @21 () -> ();
|
|
sessionTimeout @22 (seconds :Float64) -> ();
|
|
|
|
testNudge @23 () -> (sent :Bool, message :Text);
|
|
|
|
# Modules
|
|
moduleCommand @15 (module :Text, command :Text, args :List(Text))
|
|
-> (result :Text);
|
|
}
|