Files
2125_GCE/__pycache__/dual_layer_integration.cpython-314.pyc
T

70 lines
9.1 KiB
Plaintext
Raw Normal View History

2026-07-09 12:54:44 -04:00
+
ÿÜ0jõãóvRt^RIt^RIHtHtHt^RIHtHtH t ]P!] 4t RRlt
RRltR#)Dual-Layer Integration for SuperDave Server.
Adds symbolic cognition layer to FastAPI endpoints:
- /api/symbolic/activate - Activate glyph from intent
- /api/symbolic/status - Get symbolic engine status
- /api/symbolic/glyphs - List active glyphs
- Enhanced /api/chat with glyph routing
- Enhanced /api/generate-image with glyph routing
Usage:
from dual_layer_integration import setup_dual_layer
setup_dual_layer(app)
N)ÚDictÚAnyÚOptional)ÚFastAPIÚ
HTTPExceptionÚHeadercó$V^8„dQhR\/#©éÚapp©r)Úformats"Ú-/home/t420/2125_GCE/dual_layer_integration.pyÚ __annotate__rs÷~~;œ'ñ~cóRVPR4R4pVPR4R4pVPR4\R43RRll4pVPR 4\R43R
R ll4pVPR 4R
4p\P R4R#)z*Setup dual-layer endpoints on FastAPI app.z/api/symbolic/statuscóä"^RIHpV!4pVP4GRjxL
pRRRV/#L
\d2p\P RT 24RRR\
T4/uRp?#Rp?ii;i5i)z5Get symbolic engine status (glyphs, resonance, VRAM).©Úget_symbolic_engineNÚstatusÚ operationalÚsymbolic_layerzSymbolic status error: Úerror)Údual_layer.symbolic_enginerÚ
get_statusÚ ExceptionÚloggerrÚstr)rÚenginerÚes rÚget_symbolic_statusÚ-setup_dual_layer.<locals>.get_symbolic_statuss~éð Ý *ˆFØ.×.ˆ˜  ð
ñ/øô ô Ü L‰LÐ2°1°#Ð ˜'Øœ˜Q›ðõ
ûð üs<A0„ 1¤/¥ 1®A0¯1± A-¼&A(Á"A-Á#A0Á(A-Á-A0z/api/symbolic/glyphscóæ"^RIHpV!4pVP4pRRRVR\V4/# \d2p\
P
RT 24RRR\T4/uRp?#Rp?ii;i5i) zGet list of active glyphs.rrÚsuccessÚ
active_glyphsÚcountzActive glyphs error: rN)rrÚget_active_glyphsÚlenrrrr)rrr$rs rr&Ú+setup_dual_layer.<locals>.get_active_glyphs-s€éð Ý *ˆ"×6ˆMð˜)Ø Øœ˜]Óð
øô
ô Ü L‰LаР˜'Øœ˜Q›ðõ
ûð üs0A1„-2±A1² A.½&A)Á#A.Á$A1Á)A.Á.A1z/api/symbolic/activateNcóhV^8„dQhR\\\3,R\\,/#©r
ÚrequestÚ
authorization©rrrr)r
s"rrÚ&setup_dual_layer.<locals>.__annotate__Cs0÷L@ñL@Ü”cœ3h•ðL@䤕}ñL@rcó"V'dVPRR4MRp^RIHpV!4pVPRR4pVPRR4pVPR4pV'g\ R R
R 7h\
P
R V R
VR, RV 24VPVVVR7GRjxL
pVfRRRR/#RRRVPRVPRVPRVPRVPRVPR\VP4RRVP R VP"R!VP$// #L• \&d4p \
P)R"T 24\ R#\+T 4R 7hRp ? ii;i5i)$aÕActivate glyph from user intent.
Request:
{
"intent": "I need creative image generation",
"request_type": "image", # chat, image, video, vision
"metrics": {...} # optional, auto-calculated if omitted
}
Returns:
{
"status": "success",
"glyph_id": "G001",
"specialized_type": "aether_node",
"model": "forge",
"priority": 10.0,
"resonance_score": 95.5,
"power_boost": 387.95,
"superpower_count": 152,
"routing": {...}
}
úBearer ÚÚ anonymousrÚintentÚ request_typeÚchatÚmetricsézintent required©Ú status_codeÚdetailzGlyph activation request from z
: intent=':Né2Nz ...', type=)Ú user_intentr6r4NrÚfailedÚreasonz'VRAM unavailable or activation rejectedr#Úglyph_idÚspecialized_typeÚmodelÚpriorityÚresonance_scoreÚ power_boostÚsuperpower_countÚroutingÚ constraintsÚ enhancementsÚ vram_budgetzGlyph activation error: éô)ÚreplacerrÚgetrrÚinfoÚactivate_from_intentr?r@rArBrCrDr'Úsuperpower_idsrGrHrIrrr)
r+r,Úuser_idrrr3r4r6Úresultrs
&& rÚactivate_glyphÚ(setup_dual_layer.<locals>.activate_glyphBé÷6;H-×'¨ °2Ô6È[ˆð0 @Ý *ˆFà—[[ ¨2Ó.ˆ"Ÿ;™; ~°vÓ>ˆ—kk ,ˆÜÐ<MÔ K‰Kذ ð:Ø! #;˜- {°<°.ðBô
ð "ר÷ˆFð Š~à˜hØÐð𠘘FŸO™OØ" F×$;Ñ$;ؘŸØ˜FŸO™OØ! 6×#9Ñ#9ؘv×"¤C¨×(=Ñ(=Ó$>ØØ! 6×#5Ñ#5Ø" F×$7Ñ$7Ø! 6×#5Ñ#5ððð
ñøô8ô @Ü L‰LÐ3°A°3Ð ¨C¼¸A»Ô ?ûð @üsOF  A E Á*A E Â3E Â4
E ÃF ÃBE ÅF Å E Å F Å.FÆF Æ F z/api/symbolic/deactivatecóhV^8„dQhR\\\3,R\\,/#r*r-)r
s"rrr.s,÷ @ñ @Ü”cœ3h•ð @䤕}ñ @rcó†"V'dVPRR4MRp^RIHpV!4pVPR4pV'g\ RRR7hVP V4GR jxL
pR
V'dR MR RVR
V/#L \ d4p\PRT 24\ R\T4R7hR p?ii;i5i)z9Deactivate a glyph.