context_stream.cpython-314.pyc
1 + 2 �9giIy � 3 �b � R t ^ RIHtHt ^ RIHtHt ^ RIHtHtH t H 4 t 5 HtHtH t ^ RIHt ^ RIt^ RIt^RIHtHt ! R R]4 t] ! R R 6 4 4 t] ! R R4 4 t ! R R4 t ! R R4 tRAR R llt] ! R R4 4 t] ! R R4 4 t ! R R4 tRBR R llt]R8X Ed� ] ! R4 ] ! R4 ]! RR7 w t!t"] ! R 4 ]"PG R!R"R#R$R%R&7 ]"PG R'R(R)R*R%R&7 ]"PG R+R,R-R.R%R&7 ]!PI 4 t%] ! R/]%PL R0]%PN R1 24 ] ! R24 ^ RI(t(]!PR PU 4 FQ t+]+PX R!8X d 7 R3]+n- K ]+PX R'8X d 8 R4]+n- K7 ]+PX R+8X g KJ R5]+n- KS ]!P] 4 t/] ! R6]/ U u. uF q PX NK up 24 ] ! R74 ]!Pa 4 F; t+] ! R8]+PZ R9 R:]+PX R;]+Pb R<, R=24 K= ] ! R>4 ]!Pe R'4 ]!Pg R'4 t4] ! R?]4Pj Pl 24 ] ! R@4 R# R# u up i )CaZ 9 Context Stream - Continuous attention-weighted context management. 10 11 Instead of fill-compact-fill sawtooth, maintain a continuous stream 12 where items flow in and out based on attention. 13 14 Key insight: Context is a river, not a bucket. 15 - Items enter when attention lands on them 16 - Items exit when attention decays below threshold 17 - High-attention items move slowly (high friction) 18 - Low-attention items flow quickly (low friction) 19 - The stream is always near capacity but breathing 20 21 This eliminates the jarring "compaction" events and creates 22 smooth context evolution that mirrors how human memory works. 23 )� dataclass�field)�datetime� timedelta)�Optional�List�Dict�Tuple�Any�Callable�Set)�EnumN)�detect_signals�SignalDetectionc �. � ] tR t^tRtRtRtRtRtRt Rt 24 R# ) �StreamPriorityz!Priority levels for stream items.�pinned�active�recent�decaying�exiting� N)�__name__� 25 __module__�__qualname__�__firstlineno__�__doc__�PINNED�ACTIVE�RECENT�DECAYING�EXITING�__static_attributes__r � �@/Users/rcerf/repos/Sovereign_OS/core/attention/context_stream.pyr r s � �+� �F� �F� �F��H��Gr# r c �� a � ] tR t^%t o RtRtRt]! ]P R7 t 26 ]! ]P R7 tRtRt ]P tRtRt]! ]R7 tRtRtR tV 3R ltR 27 tV tR# )� 28 StreamItemz� 29 An item in the context stream. 30 31 Each item has: 32 - Content (the actual context) 33 - Attention score (current relevance) 34 - Velocity (how fast it's moving toward exit) 35 - Entry time (when it entered the stream) 36 � �?��default_factory� � �?� Fc �4 � V P VP 8 # )z;For heap ordering - lower attention = higher exit priority.��attention_score)�self�others &&r$ �__lt__�StreamItem.__lt__H s � ��#�#�e�&;�&;�;�;r# c �� <� V ^8� d Qh/ S[ ;R&