lionagi 0.18.0__py3-none-any.whl → 0.18.2__py3-none-any.whl
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.
- lionagi/__init__.py +102 -59
 - lionagi/_errors.py +0 -5
 - lionagi/adapters/spec_adapters/__init__.py +9 -0
 - lionagi/adapters/spec_adapters/_protocol.py +236 -0
 - lionagi/adapters/spec_adapters/pydantic_field.py +158 -0
 - lionagi/fields.py +83 -0
 - lionagi/ln/__init__.py +3 -1
 - lionagi/ln/_async_call.py +2 -2
 - lionagi/ln/concurrency/primitives.py +4 -4
 - lionagi/ln/concurrency/task.py +1 -0
 - lionagi/ln/fuzzy/_fuzzy_match.py +2 -2
 - lionagi/ln/types/__init__.py +51 -0
 - lionagi/ln/types/_sentinel.py +154 -0
 - lionagi/ln/{types.py → types/base.py} +108 -168
 - lionagi/ln/types/operable.py +221 -0
 - lionagi/ln/types/spec.py +441 -0
 - lionagi/models/field_model.py +69 -7
 - lionagi/models/hashable_model.py +2 -3
 - lionagi/models/model_params.py +4 -3
 - lionagi/operations/ReAct/ReAct.py +1 -1
 - lionagi/operations/act/act.py +3 -3
 - lionagi/operations/builder.py +5 -7
 - lionagi/operations/fields.py +380 -0
 - lionagi/operations/flow.py +4 -6
 - lionagi/operations/node.py +4 -4
 - lionagi/operations/operate/operate.py +123 -89
 - lionagi/operations/operate/operative.py +198 -0
 - lionagi/operations/operate/step.py +203 -0
 - lionagi/operations/select/select.py +1 -1
 - lionagi/operations/select/utils.py +7 -1
 - lionagi/operations/types.py +7 -7
 - lionagi/protocols/action/manager.py +5 -6
 - lionagi/protocols/contracts.py +2 -2
 - lionagi/protocols/generic/__init__.py +22 -0
 - lionagi/protocols/generic/element.py +36 -127
 - lionagi/protocols/generic/pile.py +9 -10
 - lionagi/protocols/generic/progression.py +23 -22
 - lionagi/protocols/graph/edge.py +6 -5
 - lionagi/protocols/ids.py +6 -49
 - lionagi/protocols/messages/__init__.py +3 -1
 - lionagi/protocols/messages/base.py +7 -6
 - lionagi/protocols/messages/instruction.py +0 -1
 - lionagi/protocols/messages/message.py +2 -2
 - lionagi/protocols/types.py +1 -11
 - lionagi/service/connections/__init__.py +3 -0
 - lionagi/service/connections/providers/claude_code_cli.py +3 -2
 - lionagi/service/hooks/_types.py +1 -1
 - lionagi/service/hooks/_utils.py +1 -1
 - lionagi/service/hooks/hook_event.py +3 -8
 - lionagi/service/hooks/hook_registry.py +5 -5
 - lionagi/service/hooks/hooked_event.py +61 -1
 - lionagi/service/imodel.py +24 -20
 - lionagi/service/third_party/claude_code.py +1 -2
 - lionagi/service/third_party/openai_models.py +24 -22
 - lionagi/service/token_calculator.py +1 -94
 - lionagi/session/branch.py +26 -228
 - lionagi/session/session.py +5 -90
 - lionagi/version.py +1 -1
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/METADATA +6 -5
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/RECORD +62 -82
 - lionagi/fields/__init__.py +0 -47
 - lionagi/fields/action.py +0 -188
 - lionagi/fields/base.py +0 -153
 - lionagi/fields/code.py +0 -239
 - lionagi/fields/file.py +0 -234
 - lionagi/fields/instruct.py +0 -135
 - lionagi/fields/reason.py +0 -55
 - lionagi/fields/research.py +0 -52
 - lionagi/operations/brainstorm/__init__.py +0 -2
 - lionagi/operations/brainstorm/brainstorm.py +0 -498
 - lionagi/operations/brainstorm/prompt.py +0 -11
 - lionagi/operations/instruct/__init__.py +0 -2
 - lionagi/operations/instruct/instruct.py +0 -28
 - lionagi/operations/plan/__init__.py +0 -6
 - lionagi/operations/plan/plan.py +0 -386
 - lionagi/operations/plan/prompt.py +0 -25
 - lionagi/operations/utils.py +0 -45
 - lionagi/protocols/forms/__init__.py +0 -2
 - lionagi/protocols/forms/base.py +0 -85
 - lionagi/protocols/forms/flow.py +0 -79
 - lionagi/protocols/forms/form.py +0 -86
 - lionagi/protocols/forms/report.py +0 -48
 - lionagi/protocols/mail/__init__.py +0 -2
 - lionagi/protocols/mail/exchange.py +0 -220
 - lionagi/protocols/mail/mail.py +0 -51
 - lionagi/protocols/mail/mailbox.py +0 -103
 - lionagi/protocols/mail/manager.py +0 -218
 - lionagi/protocols/mail/package.py +0 -101
 - lionagi/protocols/operatives/__init__.py +0 -2
 - lionagi/protocols/operatives/operative.py +0 -362
 - lionagi/protocols/operatives/step.py +0 -227
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/WHEEL +0 -0
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/licenses/LICENSE +0 -0
 
| 
         @@ -1,22 +1,18 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            lionagi/__init__.py,sha256= 
     | 
| 
      
 1 
     | 
    
         
            +
            lionagi/__init__.py,sha256=G9dRgXWADxhrceGnTWNy5quGu-LGaeeqJ-e6viHNG5k,4052
         
     | 
| 
       2 
2 
     | 
    
         
             
            lionagi/_class_registry.py,sha256=vp3YkOelyv9azuQFfhGN_9N_n5fAKAY2MtpSLeNpjW0,3108
         
     | 
| 
       3 
     | 
    
         
            -
            lionagi/_errors.py,sha256= 
     | 
| 
      
 3 
     | 
    
         
            +
            lionagi/_errors.py,sha256=QRiBlcArmdJbXbt0fku5LfpPFeK3It9dFsPE-vyikNE,3692
         
     | 
| 
       4 
4 
     | 
    
         
             
            lionagi/_types.py,sha256=nGtsaSee7FaIZvym3PH8NPaN5PN8QscTgcZfpMNaMEo,1296
         
     | 
| 
       5 
5 
     | 
    
         
             
            lionagi/config.py,sha256=meBzsT7xYDh1FwxGz_Q-XfOw3XkxPtlSJ1vqx9xk5YE,4779
         
     | 
| 
      
 6 
     | 
    
         
            +
            lionagi/fields.py,sha256=r7r4-3nSvBBRuArztgOTn2zpNBmkQvZvf63IJeeW5_k,2036
         
     | 
| 
       6 
7 
     | 
    
         
             
            lionagi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       7 
8 
     | 
    
         
             
            lionagi/utils.py,sha256=j4wRrPiuHprx7l7j3z8U9NlPWMzrM8lHv5q3K_DJLPU,7080
         
     | 
| 
       8 
     | 
    
         
            -
            lionagi/version.py,sha256= 
     | 
| 
      
 9 
     | 
    
         
            +
            lionagi/version.py,sha256=GYySpgpz2Cs3F3nz_H9h8KIG60jkP6f1a--08qCTJCQ,23
         
     | 
| 
       9 
10 
     | 
    
         
             
            lionagi/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       10 
11 
     | 
    
         
             
            lionagi/adapters/_utils.py,sha256=sniMG1LDDkwJNzUF2K32jv7rA6Y1QcohgyNclYsptzI,453
         
     | 
| 
       11 
12 
     | 
    
         
             
            lionagi/adapters/async_postgres_adapter.py,sha256=-7Ah0A8JQvEEYBe2zMkze-65gYiUbpcJGxhYnzrv9ok,3285
         
     | 
| 
       12 
     | 
    
         
            -
            lionagi/ 
     | 
| 
       13 
     | 
    
         
            -
            lionagi/ 
     | 
| 
       14 
     | 
    
         
            -
            lionagi/ 
     | 
| 
       15 
     | 
    
         
            -
            lionagi/fields/code.py,sha256=mcQcDai7kLeJxcq_Emr8WYAy4jmn9RSPIriZuB0WraU,7822
         
     | 
| 
       16 
     | 
    
         
            -
            lionagi/fields/file.py,sha256=6piGyjKQm0bIZrnWjge3-DrxaGti6Ii4BCbohwQ3neo,7406
         
     | 
| 
       17 
     | 
    
         
            -
            lionagi/fields/instruct.py,sha256=2rgDaEqnZkh6MHyC8mc0YdIT1EHNIxrxD77HdW7EoYE,4330
         
     | 
| 
       18 
     | 
    
         
            -
            lionagi/fields/reason.py,sha256=Ay2b0s-vQeBaWpQxGcKrw96Q5xGoeRa0nDFh7HcXOVc,1486
         
     | 
| 
       19 
     | 
    
         
            -
            lionagi/fields/research.py,sha256=lNf3XW0MiqJ4EUN1AL4it9s-N2Zm9y7aSah7W4oWoy8,1530
         
     | 
| 
      
 13 
     | 
    
         
            +
            lionagi/adapters/spec_adapters/__init__.py,sha256=5Fe2mZ0hwGKIiUyoZSBe-7uk2IGUbQSmFrB9rZBXmU4,234
         
     | 
| 
      
 14 
     | 
    
         
            +
            lionagi/adapters/spec_adapters/_protocol.py,sha256=V5og2qjwjtxBE-VskwuI6UrVWdcoFRcOb2ejD_Ml1Ew,6971
         
     | 
| 
      
 15 
     | 
    
         
            +
            lionagi/adapters/spec_adapters/pydantic_field.py,sha256=kuUwoIHpWAbvtdAh0Xk04GFkNHjU5OA_mVzP9hcQxlQ,5408
         
     | 
| 
       20 
16 
     | 
    
         
             
            lionagi/libs/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       21 
17 
     | 
    
         
             
            lionagi/libs/file/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       22 
18 
     | 
    
         
             
            lionagi/libs/file/chunk.py,sha256=_wHdZY9OCDILWWwWOvvS22T9CYGV9bW1zRUi96-UqDg,8970
         
     | 
| 
         @@ -33,121 +29,105 @@ lionagi/libs/validate/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8He 
     | 
|
| 
       33 
29 
     | 
    
         
             
            lionagi/libs/validate/common_field_validators.py,sha256=9PUabJZVFGeXShOOZ5jliRaXLefBovACllynAQCU0Ow,4774
         
     | 
| 
       34 
30 
     | 
    
         
             
            lionagi/libs/validate/to_num.py,sha256=ZRHDjpTCykPfDIZZa4rZKNaR_8ZHbPDFlw9rc02DrII,11610
         
     | 
| 
       35 
31 
     | 
    
         
             
            lionagi/libs/validate/validate_boolean.py,sha256=WcszKSMksFBCels2OMd0qElqDauyq53-h7cuOM_nIKU,3610
         
     | 
| 
       36 
     | 
    
         
            -
            lionagi/ln/__init__.py,sha256= 
     | 
| 
       37 
     | 
    
         
            -
            lionagi/ln/_async_call.py,sha256= 
     | 
| 
      
 32 
     | 
    
         
            +
            lionagi/ln/__init__.py,sha256=rehWx09QyfPJrl4go_aEdvuW8sSBp_aYPq9mCSoq1Gk,1641
         
     | 
| 
      
 33 
     | 
    
         
            +
            lionagi/ln/_async_call.py,sha256=Nmrain7hI0qL96WKH8PQjmbGjnNi-7JwpuwdtK4vKpQ,9647
         
     | 
| 
       38 
34 
     | 
    
         
             
            lionagi/ln/_hash.py,sha256=dIrQgOAdrWkVQcaCJXN-XIaA1sIZSYtAU302fywrtJU,4756
         
     | 
| 
       39 
35 
     | 
    
         
             
            lionagi/ln/_json_dump.py,sha256=zOeoOE3JbaGAzL-lfAdMqdgaXWYXFliqcgXsZ_pxonI,10347
         
     | 
| 
       40 
36 
     | 
    
         
             
            lionagi/ln/_list_call.py,sha256=zvISmCeNAH7yjBcusQI1s17n556tILgePhRMdAM2plA,2831
         
     | 
| 
       41 
37 
     | 
    
         
             
            lionagi/ln/_to_list.py,sha256=V9hC3dpyMhRJwuuyOCU_wJygzEB6sJVZ0fmIRtM6uTg,6993
         
     | 
| 
       42 
38 
     | 
    
         
             
            lionagi/ln/_utils.py,sha256=5Z_AsDxdtH5wNB-P4IiihhH0dYUcZMT-hTxFQBQPwL0,4303
         
     | 
| 
       43 
     | 
    
         
            -
            lionagi/ln/types.py,sha256=vUprqqW1nfHDNrOGk417NHEeEXpTpJqP9eqlMuEOaBI,11118
         
     | 
| 
       44 
39 
     | 
    
         
             
            lionagi/ln/concurrency/__init__.py,sha256=xt_GLZ1Zb-nC-RnrNt8jOBWb_uf1md__B1R5cplMShg,1190
         
     | 
| 
       45 
40 
     | 
    
         
             
            lionagi/ln/concurrency/_compat.py,sha256=itxdRzl95PLEBQvNY0zTriF39kymaNRpKncT8QsOomA,2065
         
     | 
| 
       46 
41 
     | 
    
         
             
            lionagi/ln/concurrency/cancel.py,sha256=8JlWy_EVto4Fls1yQLBteCbpn4zP6ydnqIa_EL5kxZc,3313
         
     | 
| 
       47 
42 
     | 
    
         
             
            lionagi/ln/concurrency/errors.py,sha256=Tg76ods-CG_9rz7TksTiRGqpTzWHi-Wm9JPotGB9iEM,869
         
     | 
| 
       48 
43 
     | 
    
         
             
            lionagi/ln/concurrency/patterns.py,sha256=08eebVxbBxkcMFgJqZB-cXS7lRZduH1Y-zorb8fTTZs,9447
         
     | 
| 
       49 
     | 
    
         
            -
            lionagi/ln/concurrency/primitives.py,sha256 
     | 
| 
      
 44 
     | 
    
         
            +
            lionagi/ln/concurrency/primitives.py,sha256=Elda6PSD_AwllvvmNYxNXE3E3oGMUjOnOwSYs3FKQag,9552
         
     | 
| 
       50 
45 
     | 
    
         
             
            lionagi/ln/concurrency/resource_tracker.py,sha256=ffLr0FkHyaHsUa4UDyWwse-8wGLaLMnAyfyeTDyzrDA,1512
         
     | 
| 
       51 
     | 
    
         
            -
            lionagi/ln/concurrency/task.py,sha256= 
     | 
| 
      
 46 
     | 
    
         
            +
            lionagi/ln/concurrency/task.py,sha256=LSRCKrcjA5QVNlFFRfyCrzPGWw9efBaHoJtHxKEbjCU,2692
         
     | 
| 
       52 
47 
     | 
    
         
             
            lionagi/ln/concurrency/utils.py,sha256=MUWupnFtWxR15hWnligLZrS4Z1SAQ7j3cuCG08cK3GQ,431
         
     | 
| 
       53 
48 
     | 
    
         
             
            lionagi/ln/fuzzy/__init__.py,sha256=Py7hPV7uk5rPRGvQ4yPjMzXS32aQ7QVkO-mX69FfsMM,544
         
     | 
| 
       54 
49 
     | 
    
         
             
            lionagi/ln/fuzzy/_extract_json.py,sha256=rYHaK36yzRpie8qO-T7mZKOue2yqCLx3ixiuKhsaKvg,2224
         
     | 
| 
       55 
50 
     | 
    
         
             
            lionagi/ln/fuzzy/_fuzzy_json.py,sha256=S0lCkNvprn7XZHoYdRfzXueexSbjxTeLPkpyJ9IAO3A,3860
         
     | 
| 
       56 
     | 
    
         
            -
            lionagi/ln/fuzzy/_fuzzy_match.py,sha256 
     | 
| 
      
 51 
     | 
    
         
            +
            lionagi/ln/fuzzy/_fuzzy_match.py,sha256=MUEMrM9JuMEq8ZNURi2TGKkCPRppeV0L61eTjfrOIFM,5872
         
     | 
| 
       57 
52 
     | 
    
         
             
            lionagi/ln/fuzzy/_fuzzy_validate.py,sha256=XuafNXflTerQrQYV0S6MrQHR3_6DuYBv6BAYTLSxgfI,5161
         
     | 
| 
       58 
53 
     | 
    
         
             
            lionagi/ln/fuzzy/_string_similarity.py,sha256=01u73Bp4YPN-s7YMzQjbYM5d6mjKGSjJpar14Wab_5U,8792
         
     | 
| 
       59 
54 
     | 
    
         
             
            lionagi/ln/fuzzy/_to_dict.py,sha256=Crz4sDIIcTZS3idxynWK7U4EdHvZooPDJIsOH3t6xgQ,12068
         
     | 
| 
      
 55 
     | 
    
         
            +
            lionagi/ln/types/__init__.py,sha256=r2DR6ltl1yKnu_Vyh3RqbQuVbP3E4ym_slSjtvucDbY,806
         
     | 
| 
      
 56 
     | 
    
         
            +
            lionagi/ln/types/_sentinel.py,sha256=X_9o2BNW-k5z0UcW6xEJFLcrvyidbk6e4MNk4O_YANQ,3927
         
     | 
| 
      
 57 
     | 
    
         
            +
            lionagi/ln/types/base.py,sha256=d_EuEFi6_jE-pG2tKT-q_W15TJRHJodJmy8tprusjzg,9927
         
     | 
| 
      
 58 
     | 
    
         
            +
            lionagi/ln/types/operable.py,sha256=dy0sIXVcIIp70r4O04ndshNSozVocQDHjUgEftL4VoU,6845
         
     | 
| 
      
 59 
     | 
    
         
            +
            lionagi/ln/types/spec.py,sha256=KNqNTttCuYabOiwCJoLFkameupsQprsU9qeIcrSK99o,13828
         
     | 
| 
       60 
60 
     | 
    
         
             
            lionagi/models/__init__.py,sha256=Nq0RqoT7DXrpS1_lVgfrlZXl2_E2_E_HHANcbPlDfh8,418
         
     | 
| 
       61 
     | 
    
         
            -
            lionagi/models/field_model.py,sha256= 
     | 
| 
       62 
     | 
    
         
            -
            lionagi/models/hashable_model.py,sha256= 
     | 
| 
       63 
     | 
    
         
            -
            lionagi/models/model_params.py,sha256= 
     | 
| 
      
 61 
     | 
    
         
            +
            lionagi/models/field_model.py,sha256=uKLcc8ZpJwkSAaJ2hWLa_NF2ZU7oRDgwTEY10JnJJ8g,31511
         
     | 
| 
      
 62 
     | 
    
         
            +
            lionagi/models/hashable_model.py,sha256=U2Cw9dSdkX0PjyBY2kZ1UwvL_Rd69sVX4wA6nO_o1UQ,3242
         
     | 
| 
      
 63 
     | 
    
         
            +
            lionagi/models/model_params.py,sha256=NPxVFYQuDuXMYnuG5u_rHR_mL7lVd-GWAMv1HmqRwik,12142
         
     | 
| 
       64 
64 
     | 
    
         
             
            lionagi/models/operable_model.py,sha256=t6EKeJzG4wqo4tHroPe873R_hMLpcWq4gUiwCC_8pcM,20175
         
     | 
| 
       65 
65 
     | 
    
         
             
            lionagi/models/schema_model.py,sha256=atgySn8e3zcQdFDERMrfSS1ZKzRZjQCAlNNlnp22vIg,663
         
     | 
| 
       66 
66 
     | 
    
         
             
            lionagi/operations/__init__.py,sha256=A9GvZqRuzxV98wrwo0-Y2bOTpz0TTPePHDTOj0cYR9Y,440
         
     | 
| 
       67 
67 
     | 
    
         
             
            lionagi/operations/_visualize_graph.py,sha256=F0KadgRthP-6-R-FPgvlwiiaiWH3ueO-rjSd1bzRUbE,8594
         
     | 
| 
       68 
     | 
    
         
            -
            lionagi/operations/builder.py,sha256= 
     | 
| 
       69 
     | 
    
         
            -
            lionagi/operations/ 
     | 
| 
      
 68 
     | 
    
         
            +
            lionagi/operations/builder.py,sha256=aGbXLe1Gfji59ZUWc0wM4NCYBbZv0wwki0AT7B7sHZs,14654
         
     | 
| 
      
 69 
     | 
    
         
            +
            lionagi/operations/fields.py,sha256=dEbQUUOutT6DLMqNyVOfUsuhGvWJsXPoMEQtXhMNv3c,12274
         
     | 
| 
      
 70 
     | 
    
         
            +
            lionagi/operations/flow.py,sha256=v7E9_ybTGnOE3kKMoYIgkNqxMp9_SUHHTGNQQQuswrc,25014
         
     | 
| 
       70 
71 
     | 
    
         
             
            lionagi/operations/manager.py,sha256=YZr3VjPAZVVFd_bIjF1aoQqzzKZHNA1kcqefNi5QFFM,683
         
     | 
| 
       71 
     | 
    
         
            -
            lionagi/operations/node.py,sha256= 
     | 
| 
       72 
     | 
    
         
            -
            lionagi/operations/types.py,sha256= 
     | 
| 
       73 
     | 
    
         
            -
            lionagi/operations/ 
     | 
| 
       74 
     | 
    
         
            -
            lionagi/operations/ReAct/ReAct.py,sha256=d153LHTbZnti8onydK7c_6Yx6aQEBJRHe_zEYLsGHZY,20686
         
     | 
| 
      
 72 
     | 
    
         
            +
            lionagi/operations/node.py,sha256=XjnsuqXgYxN6Kj5UvNdjdOWQs4rW2iGAanhNocmHuj0,3437
         
     | 
| 
      
 73 
     | 
    
         
            +
            lionagi/operations/types.py,sha256=MTnLvkrm1oVfXVFxG-pTxYz4MhpHvZBDJX7XoqoIjrQ,4083
         
     | 
| 
      
 74 
     | 
    
         
            +
            lionagi/operations/ReAct/ReAct.py,sha256=zgGo806jwFvDDw9r-e4Q60ERpsIUf1a6D6vPp6QJubM,20671
         
     | 
| 
       75 
75 
     | 
    
         
             
            lionagi/operations/ReAct/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       76 
76 
     | 
    
         
             
            lionagi/operations/ReAct/utils.py,sha256=YzKZaqD_Yb016grdx7hqSR2irM-idY9-FgCjgp9zffg,4300
         
     | 
| 
       77 
77 
     | 
    
         
             
            lionagi/operations/act/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       78 
     | 
    
         
            -
            lionagi/operations/act/act.py,sha256= 
     | 
| 
       79 
     | 
    
         
            -
            lionagi/operations/brainstorm/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       80 
     | 
    
         
            -
            lionagi/operations/brainstorm/brainstorm.py,sha256=daLcfhJxV8vZTZ83XENLCFr0k3rnki3MXqMjnCoybUI,18793
         
     | 
| 
       81 
     | 
    
         
            -
            lionagi/operations/brainstorm/prompt.py,sha256=Ma-9cAGS5UdDtidK28A4WldS2712-NVGxtXvhSuBet4,606
         
     | 
| 
      
 78 
     | 
    
         
            +
            lionagi/operations/act/act.py,sha256=LfcfXUdj2PuaQnqvGq71IRTUW-YWHyp6dsOKlPCzLN8,6449
         
     | 
| 
       82 
79 
     | 
    
         
             
            lionagi/operations/chat/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       83 
80 
     | 
    
         
             
            lionagi/operations/chat/chat.py,sha256=j21Zxdc_pkuFskT6HH2rXgh6fkvbwqp4C77L7xfWs9Y,6667
         
     | 
| 
       84 
81 
     | 
    
         
             
            lionagi/operations/communicate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       85 
82 
     | 
    
         
             
            lionagi/operations/communicate/communicate.py,sha256=zQ-15MwJmw6sic0HdOBl8EJvVUBOThj5bu55Stg9YdA,5569
         
     | 
| 
       86 
     | 
    
         
            -
            lionagi/operations/instruct/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       87 
     | 
    
         
            -
            lionagi/operations/instruct/instruct.py,sha256=aaWzn3bnN4HCfe2uF0-u0VbSPsTJye83EsAUhmNsVRI,790
         
     | 
| 
       88 
83 
     | 
    
         
             
            lionagi/operations/interpret/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       89 
84 
     | 
    
         
             
            lionagi/operations/interpret/interpret.py,sha256=uVK9Yk4-n92DZfEQrNQ-IU7PJd_IfVJWJENbmVCf_Ns,2497
         
     | 
| 
       90 
85 
     | 
    
         
             
            lionagi/operations/operate/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       91 
     | 
    
         
            -
            lionagi/operations/operate/operate.py,sha256= 
     | 
| 
      
 86 
     | 
    
         
            +
            lionagi/operations/operate/operate.py,sha256=Cv1E5-MKBcJWOoVn1Ek3i_JKbWl5ORwNgzDMzSnteZo,11160
         
     | 
| 
      
 87 
     | 
    
         
            +
            lionagi/operations/operate/operative.py,sha256=8Mu6m2J9zTUesYxGN64NsGHIuakOubMznbVUv6T3Lgs,6543
         
     | 
| 
      
 88 
     | 
    
         
            +
            lionagi/operations/operate/step.py,sha256=dNxzmFCe7wj6RYAlbJcpwgWsh1QhNM383EvgDcJRSLw,7093
         
     | 
| 
       92 
89 
     | 
    
         
             
            lionagi/operations/parse/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       93 
90 
     | 
    
         
             
            lionagi/operations/parse/parse.py,sha256=LwQoKNbkADSnhkrwMZeOPlTFAjsKC1QmnorbtKsdNX8,6699
         
     | 
| 
       94 
     | 
    
         
            -
            lionagi/operations/plan/__init__.py,sha256=_I1NOEn9w7ymriCXW-6gN3dDwJPM35H2nNHy2IJj4FU,152
         
     | 
| 
       95 
     | 
    
         
            -
            lionagi/operations/plan/plan.py,sha256=04mr8tu3BQmCczf324pm-FlmP_NulZ1sS7JTFrdT5jI,15311
         
     | 
| 
       96 
     | 
    
         
            -
            lionagi/operations/plan/prompt.py,sha256=WhnND5JjafKgKgcaHBPR5hxwdtwSHfWulVRyomL1rVU,989
         
     | 
| 
       97 
91 
     | 
    
         
             
            lionagi/operations/select/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       98 
     | 
    
         
            -
            lionagi/operations/select/select.py,sha256= 
     | 
| 
       99 
     | 
    
         
            -
            lionagi/operations/select/utils.py,sha256= 
     | 
| 
      
 92 
     | 
    
         
            +
            lionagi/operations/select/select.py,sha256=a5goZp0DYiTkCUDh3hg8j0Ef2S653KpKTkhVV9CpKsc,4440
         
     | 
| 
      
 93 
     | 
    
         
            +
            lionagi/operations/select/utils.py,sha256=R8_neCZMVfC_8reLw3YCbpbbAWexSphXw4bo3UCryug,3834
         
     | 
| 
       100 
94 
     | 
    
         
             
            lionagi/protocols/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       101 
95 
     | 
    
         
             
            lionagi/protocols/_concepts.py,sha256=eheWQxlHTo36uGpkSpINLO-OmTdjpJEFrVX1hJ7N590,1551
         
     | 
| 
       102 
     | 
    
         
            -
            lionagi/protocols/contracts.py,sha256= 
     | 
| 
       103 
     | 
    
         
            -
            lionagi/protocols/ids.py,sha256= 
     | 
| 
       104 
     | 
    
         
            -
            lionagi/protocols/types.py,sha256= 
     | 
| 
      
 96 
     | 
    
         
            +
            lionagi/protocols/contracts.py,sha256=ZHPDy0GIu_V9MsiSNcJ4Nzs2GWbAJN3H-_FTivplE7w,1390
         
     | 
| 
      
 97 
     | 
    
         
            +
            lionagi/protocols/ids.py,sha256=bhuXt_-_8C6w3lLmKSzKmulQ0Om5W6bzIyrilT7A4W8,1025
         
     | 
| 
      
 98 
     | 
    
         
            +
            lionagi/protocols/types.py,sha256=fpBjcOt9_cuH1BK-4qeu7_E77OHFs6nxxmJpIjjJdX8,2130
         
     | 
| 
       105 
99 
     | 
    
         
             
            lionagi/protocols/action/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       106 
100 
     | 
    
         
             
            lionagi/protocols/action/function_calling.py,sha256=Qu5wCBGZk-c0D-rKMF8nYI3mzJGphosLWi7NCySSErY,4534
         
     | 
| 
       107 
     | 
    
         
            -
            lionagi/protocols/action/manager.py,sha256= 
     | 
| 
      
 101 
     | 
    
         
            +
            lionagi/protocols/action/manager.py,sha256=xKN1RV-ugUToFN5Xh6vQXlSyMk6BcxaTMONRDDOD99o,19971
         
     | 
| 
       108 
102 
     | 
    
         
             
            lionagi/protocols/action/tool.py,sha256=A4WNMUkR05ivE_2bruSfgVKSgpP9iKSgIpLBp3C1Q6Q,5846
         
     | 
| 
       109 
     | 
    
         
            -
            lionagi/protocols/ 
     | 
| 
       110 
     | 
    
         
            -
            lionagi/protocols/ 
     | 
| 
       111 
     | 
    
         
            -
            lionagi/protocols/forms/flow.py,sha256=O9mWreqpbAIhApDc7X_j0ep_sM5xa27T-1jOk6nhMG0,2698
         
     | 
| 
       112 
     | 
    
         
            -
            lionagi/protocols/forms/form.py,sha256=-KH3ofRM14-aUAoIssNvJt-J3yT1tnPLkI5OnRQ9MSc,3058
         
     | 
| 
       113 
     | 
    
         
            -
            lionagi/protocols/forms/report.py,sha256=zc-2bnVZJRzZnj6QOy1ba4dsfZkqzC0yOqtR_y-iHwc,1605
         
     | 
| 
       114 
     | 
    
         
            -
            lionagi/protocols/generic/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       115 
     | 
    
         
            -
            lionagi/protocols/generic/element.py,sha256=CKHzIfKRxg1kh-FyvVB1l06AzU79WTfqSvISzF2XKaA,14628
         
     | 
| 
      
 103 
     | 
    
         
            +
            lionagi/protocols/generic/__init__.py,sha256=5SI1sSwWsYTkCgSSQI19xxFo6-UHvynIYGwPozz64ZM,551
         
     | 
| 
      
 104 
     | 
    
         
            +
            lionagi/protocols/generic/element.py,sha256=6nZQYUWfhhPrzBk82-WTwQgETAkaEu-eTe6WlqitjTk,11889
         
     | 
| 
       116 
105 
     | 
    
         
             
            lionagi/protocols/generic/event.py,sha256=oTDHFZeLTlX_olNN-6IFAVUU0bAlxn7nBOi5mu5kMnY,6546
         
     | 
| 
       117 
106 
     | 
    
         
             
            lionagi/protocols/generic/log.py,sha256=flAk8NrYQN6yfY9w0D8y2Q-MIpESUK-1XaQCLnYtJ_I,8393
         
     | 
| 
       118 
     | 
    
         
            -
            lionagi/protocols/generic/pile.py,sha256= 
     | 
| 
      
 107 
     | 
    
         
            +
            lionagi/protocols/generic/pile.py,sha256=A8h6BQOluCBy8bKJ8Mgkj2FL9yWfCwz_bHCYa1K7i38,37111
         
     | 
| 
       119 
108 
     | 
    
         
             
            lionagi/protocols/generic/processor.py,sha256=e4s9pf0yjx-VIGN0uYnJ48TKDVpc_O_98_L-0hwawEk,11701
         
     | 
| 
       120 
     | 
    
         
            -
            lionagi/protocols/generic/progression.py,sha256= 
     | 
| 
      
 109 
     | 
    
         
            +
            lionagi/protocols/generic/progression.py,sha256=yWwulINX4zNYC2NS1UunqryzS3femIM0it0EvTVcQN8,15207
         
     | 
| 
       121 
110 
     | 
    
         
             
            lionagi/protocols/graph/__init__.py,sha256=oHHzwu1ystmRqn6MMaZ0emiscmw09v7doL_-QaJN2Z4,249
         
     | 
| 
       122 
     | 
    
         
            -
            lionagi/protocols/graph/edge.py,sha256= 
     | 
| 
      
 111 
     | 
    
         
            +
            lionagi/protocols/graph/edge.py,sha256=tHGdvGrp525G82CM22_MoRJLDY9DIy2pXXf5K9_HLmE,5243
         
     | 
| 
       123 
112 
     | 
    
         
             
            lionagi/protocols/graph/graph.py,sha256=_zGQ6ypCYVyDuTBTMAR2dXtI8niOwX_vbgXEQM4YPvo,11155
         
     | 
| 
       124 
113 
     | 
    
         
             
            lionagi/protocols/graph/node.py,sha256=e9LDNDGJoqp0l6WwVLrv_87ll00_5FxqBpj3hg6NPLg,5301
         
     | 
| 
       125 
     | 
    
         
            -
            lionagi/protocols/ 
     | 
| 
       126 
     | 
    
         
            -
            lionagi/protocols/mail/exchange.py,sha256=7KZIDmyAnwYzs6ksg2p5be9jGcpRV7SjlOWpyQrXNmI,7037
         
     | 
| 
       127 
     | 
    
         
            -
            lionagi/protocols/mail/mail.py,sha256=RmGd8dJD1om8qxCDlb4UlxDrcWXItKL9ZhFgzWUWIfk,1352
         
     | 
| 
       128 
     | 
    
         
            -
            lionagi/protocols/mail/mailbox.py,sha256=F6-9do52IKfQKewtwOTxdlPCDYmBT4tDGKlMvFhc-BI,2729
         
     | 
| 
       129 
     | 
    
         
            -
            lionagi/protocols/mail/manager.py,sha256=QqH5IgnAGwLOpUS8sJmDYLNYKVqbUdz-3sZgVCbl7gw,6960
         
     | 
| 
       130 
     | 
    
         
            -
            lionagi/protocols/mail/package.py,sha256=RebLIMmkx1V7q1940NsmSXKsNKNPXigwZnI6Aewp3HM,2655
         
     | 
| 
       131 
     | 
    
         
            -
            lionagi/protocols/messages/__init__.py,sha256=VtHtfD41BezXk2VKgRXlVGBj-Gxc3c5rvomb7g2Qsu0,898
         
     | 
| 
      
 114 
     | 
    
         
            +
            lionagi/protocols/messages/__init__.py,sha256=Hw0n1uQPvn8aGymZoJLku8fS0sC2vLrYOagizMvxm5U,976
         
     | 
| 
       132 
115 
     | 
    
         
             
            lionagi/protocols/messages/action_request.py,sha256=VDmdxxKYJhSOE0oui8mNIPpVb3mmA_46Db_Xo8twV_I,3588
         
     | 
| 
       133 
116 
     | 
    
         
             
            lionagi/protocols/messages/action_response.py,sha256=AioBkMKzBworwk7LtlxWZR7rQB6nrvEsjNGTk_v1XYQ,2989
         
     | 
| 
       134 
117 
     | 
    
         
             
            lionagi/protocols/messages/assistant_response.py,sha256=jv1svk_pk4sc_AslHMDn7CtIAFCM5aKmaiPbqNyD4Ds,6071
         
     | 
| 
       135 
     | 
    
         
            -
            lionagi/protocols/messages/base.py,sha256 
     | 
| 
       136 
     | 
    
         
            -
            lionagi/protocols/messages/instruction.py,sha256= 
     | 
| 
      
 118 
     | 
    
         
            +
            lionagi/protocols/messages/base.py,sha256=xWDX2kpJZmH7NVfzuNZ_9jGVdy3UNZ80ivth45l_Y9Y,2640
         
     | 
| 
      
 119 
     | 
    
         
            +
            lionagi/protocols/messages/instruction.py,sha256=GC3PCTthQPJwFkQYqQF1CmijnhhLsE6G1gr6Lgw38JQ,11800
         
     | 
| 
       137 
120 
     | 
    
         
             
            lionagi/protocols/messages/manager.py,sha256=ZbQ1VfphbS7ddr4SHmnSqLTo8lnZ4Vtl8pKL8xnLPD0,18900
         
     | 
| 
       138 
     | 
    
         
            -
            lionagi/protocols/messages/message.py,sha256= 
     | 
| 
      
 121 
     | 
    
         
            +
            lionagi/protocols/messages/message.py,sha256=SJHOC7ulNZ4ZYnURqTXFCxaZVc-2_uxx7psKIr8OASw,4497
         
     | 
| 
       139 
122 
     | 
    
         
             
            lionagi/protocols/messages/system.py,sha256=A9RqcNUUCFq6GcGBvMpv7Y6R4igFt1sER9sZMXyyFWg,2380
         
     | 
| 
       140 
     | 
    
         
            -
            lionagi/protocols/operatives/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       141 
     | 
    
         
            -
            lionagi/protocols/operatives/operative.py,sha256=StMHk8EShQXeBLN9GYsLfzne94jsIO0x2vf988bQWos,14368
         
     | 
| 
       142 
     | 
    
         
            -
            lionagi/protocols/operatives/step.py,sha256=9GEsKOvTSrnBcDEtJV7PryJuR7Uk7CRjhwtFKFEZEe4,9276
         
     | 
| 
       143 
123 
     | 
    
         
             
            lionagi/service/__init__.py,sha256=MYcfEFFLSdRS4blwYdx883T8Px2bn81JAeqSIPW9SFs,2545
         
     | 
| 
       144 
124 
     | 
    
         
             
            lionagi/service/broadcaster.py,sha256=XvaUaBb6awcq-DJGVNJnnAIZUrrtOPnhWcgVgZTnGq8,1941
         
     | 
| 
       145 
     | 
    
         
            -
            lionagi/service/imodel.py,sha256= 
     | 
| 
      
 125 
     | 
    
         
            +
            lionagi/service/imodel.py,sha256=GhptwsEMN4QORa3ePntCs-HkkcYuphehOWXlJzCUSPc,16626
         
     | 
| 
       146 
126 
     | 
    
         
             
            lionagi/service/manager.py,sha256=ZQWj_QKYsKVblsNHeDBMMQllduMArjLqaZHlP3F1_tE,1160
         
     | 
| 
       147 
127 
     | 
    
         
             
            lionagi/service/rate_limited_processor.py,sha256=D983_04YqurcA-svjDKXVzmlD1bWoVkFHtwqQhB-fGo,6095
         
     | 
| 
       148 
128 
     | 
    
         
             
            lionagi/service/resilience.py,sha256=djIDMJHe2XHoULa3x0wygt3kjeMgElSmWf0RFeyD3SU,18717
         
     | 
| 
       149 
     | 
    
         
            -
            lionagi/service/token_calculator.py,sha256= 
     | 
| 
       150 
     | 
    
         
            -
            lionagi/service/connections/__init__.py,sha256= 
     | 
| 
      
 129 
     | 
    
         
            +
            lionagi/service/token_calculator.py,sha256=MW3ekSppvMcVlTU37RIU4SIkiVUfYxeE6TMiT4gIsGw,3723
         
     | 
| 
      
 130 
     | 
    
         
            +
            lionagi/service/connections/__init__.py,sha256=5laA2kcjSmblSjjK7Qor6EMSFqh_G6iMkmx-Tt3XvuY,441
         
     | 
| 
       151 
131 
     | 
    
         
             
            lionagi/service/connections/api_calling.py,sha256=8NpgyFzz9oU6lTXq_gBetaqH_M6RnOoxIg4rbcS1Jco,6003
         
     | 
| 
       152 
132 
     | 
    
         
             
            lionagi/service/connections/endpoint.py,sha256=T4JKy-fQ9_LFDpaTP0SEzUFIlfnhlnMJFcEb-qgThVg,14833
         
     | 
| 
       153 
133 
     | 
    
         
             
            lionagi/service/connections/endpoint_config.py,sha256=L-DQdxVLBA8ZapVSvLhjmlo0pP1199aRA8lccquGoHI,5172
         
     | 
| 
         @@ -157,35 +137,35 @@ lionagi/service/connections/mcp/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ2 
     | 
|
| 
       157 
137 
     | 
    
         
             
            lionagi/service/connections/mcp/wrapper.py,sha256=EDbAm9gj4_zGBRdXf9yS0ZpyMNLfkEuDV2zo_YRt9QA,9161
         
     | 
| 
       158 
138 
     | 
    
         
             
            lionagi/service/connections/providers/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       159 
139 
     | 
    
         
             
            lionagi/service/connections/providers/anthropic_.py,sha256=7xShtS2Whg-F2DpueSyI0X3ZknqTYeDXi1AvkEDQOBc,3160
         
     | 
| 
       160 
     | 
    
         
            -
            lionagi/service/connections/providers/claude_code_cli.py,sha256= 
     | 
| 
      
 140 
     | 
    
         
            +
            lionagi/service/connections/providers/claude_code_cli.py,sha256=jSTD7Gaz1-EBAVL5mClmpcN3UmdAGb7hto4HRLfUPFs,4485
         
     | 
| 
       161 
141 
     | 
    
         
             
            lionagi/service/connections/providers/exa_.py,sha256=p2mVkuztpHuS4Ud2dR082dPPEiVp6MFUXlehU9fD9lc,1051
         
     | 
| 
       162 
142 
     | 
    
         
             
            lionagi/service/connections/providers/nvidia_nim_.py,sha256=S1Z8XhL7W5uANiNTkHK_ffeBL3_lD9KuthI70NSd_4g,2412
         
     | 
| 
       163 
143 
     | 
    
         
             
            lionagi/service/connections/providers/oai_.py,sha256=vXYecSAHkMONpbFoVivldBbyPlU2y8pWKYY-LiXzsBE,4289
         
     | 
| 
       164 
144 
     | 
    
         
             
            lionagi/service/connections/providers/ollama_.py,sha256=Y1e8dR7uDOxnCI45f9qvPh4NtVUd0qDppohNb-g6tQM,4564
         
     | 
| 
       165 
145 
     | 
    
         
             
            lionagi/service/connections/providers/perplexity_.py,sha256=9eXYXsGQuDy8WdEbZ3Och9qDl-lZTBmocMo9-FsTIeE,1649
         
     | 
| 
       166 
146 
     | 
    
         
             
            lionagi/service/hooks/__init__.py,sha256=toX-rQji-pxglI4yKzu-0Xp7E4xVvh0__Z70G_Gz2Y0,469
         
     | 
| 
       167 
     | 
    
         
            -
            lionagi/service/hooks/_types.py,sha256= 
     | 
| 
       168 
     | 
    
         
            -
            lionagi/service/hooks/_utils.py,sha256= 
     | 
| 
       169 
     | 
    
         
            -
            lionagi/service/hooks/hook_event.py,sha256= 
     | 
| 
       170 
     | 
    
         
            -
            lionagi/service/hooks/hook_registry.py,sha256= 
     | 
| 
       171 
     | 
    
         
            -
            lionagi/service/hooks/hooked_event.py,sha256= 
     | 
| 
      
 147 
     | 
    
         
            +
            lionagi/service/hooks/_types.py,sha256=zu3bJ-Lt-R24E5LWWkqXOBENJL3fLidfAVI_wY2YWYI,1263
         
     | 
| 
      
 148 
     | 
    
         
            +
            lionagi/service/hooks/_utils.py,sha256=vkyiXaeNV98F8hDSORJ3DxqPyIpykbhrXXCyGe-BsV0,2629
         
     | 
| 
      
 149 
     | 
    
         
            +
            lionagi/service/hooks/hook_event.py,sha256=7Yx-Xcl75RlX_SbffgVissPAzYVNb7xckm0642egtck,2719
         
     | 
| 
      
 150 
     | 
    
         
            +
            lionagi/service/hooks/hook_registry.py,sha256=hHW1l4mGUPh8HASaSZ_CSYUdtn5j904_wyO9RuFEYpE,8535
         
     | 
| 
      
 151 
     | 
    
         
            +
            lionagi/service/hooks/hooked_event.py,sha256=8lRCGZ9htRZL9JOV9fHIRB1rCHrMwW0YgLReQ7-5dtU,6947
         
     | 
| 
       172 
152 
     | 
    
         
             
            lionagi/service/third_party/README.md,sha256=qFjWnI8rmLivIyr6Tc-hRZh-rQwntROp76af4MBNJJc,2214
         
     | 
| 
       173 
153 
     | 
    
         
             
            lionagi/service/third_party/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       174 
154 
     | 
    
         
             
            lionagi/service/third_party/anthropic_models.py,sha256=8Ioc2YjQkHIwsqrnzbfyXAADIIPpP21mPDhx7XkGpRo,4022
         
     | 
| 
       175 
     | 
    
         
            -
            lionagi/service/third_party/claude_code.py,sha256= 
     | 
| 
      
 155 
     | 
    
         
            +
            lionagi/service/third_party/claude_code.py,sha256=t3sSsiiXCJA7qciAj3Ct80i0meaKiWJwZ47t-WlPCoU,23795
         
     | 
| 
       176 
156 
     | 
    
         
             
            lionagi/service/third_party/exa_models.py,sha256=G_hnekcy-DillPLzMoDQ8ZisVAL8Mp7iMAK4xqAT_3w,5470
         
     | 
| 
       177 
     | 
    
         
            -
            lionagi/service/third_party/openai_models.py,sha256= 
     | 
| 
      
 157 
     | 
    
         
            +
            lionagi/service/third_party/openai_models.py,sha256=HDIZ1llg26aLYPmyqYUep7xtWw2e3Ws-7ebvtHZKqT4,11405
         
     | 
| 
       178 
158 
     | 
    
         
             
            lionagi/service/third_party/pplx_models.py,sha256=-EhyJgOWR6rzSv3zczUtk80X6c19p18Dg9KC6l8BFRQ,6473
         
     | 
| 
       179 
159 
     | 
    
         
             
            lionagi/session/__init__.py,sha256=KqR6ZzF0JZmPxa0Yb5Ocm88MTMQR1alhlm00QTbHOvA,198
         
     | 
| 
       180 
     | 
    
         
            -
            lionagi/session/branch.py,sha256= 
     | 
| 
      
 160 
     | 
    
         
            +
            lionagi/session/branch.py,sha256=maymM9n8H21CXrhScbHEfEKA2nNciEXvvc5FeeUh6Es,52647
         
     | 
| 
       181 
161 
     | 
    
         
             
            lionagi/session/prompts.py,sha256=GPr0jibyAAqS3awDzGC8SoCL6aWJLLCCbXY0JUuxOC0,3170
         
     | 
| 
       182 
     | 
    
         
            -
            lionagi/session/session.py,sha256= 
     | 
| 
      
 162 
     | 
    
         
            +
            lionagi/session/session.py,sha256=mpG6QGPuzi4U9VUNctg_hAlnyMr8QPVyi_HPqxn7jdw,10044
         
     | 
| 
       183 
163 
     | 
    
         
             
            lionagi/tools/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       184 
164 
     | 
    
         
             
            lionagi/tools/base.py,sha256=ypzT7-XPGW_KzIAAGwlzwRx594zcIPoBqW_WqAozwo4,1893
         
     | 
| 
       185 
165 
     | 
    
         
             
            lionagi/tools/types.py,sha256=HD3lkxKFFxVKPgxVLOerJ-VNxQiXA0Cw2TrlxEEBQWU,226
         
     | 
| 
       186 
166 
     | 
    
         
             
            lionagi/tools/file/__init__.py,sha256=ySvN2mEd6TEvCVCDGfBS9H_cSrZQ21WomjRC8Herm0Y,108
         
     | 
| 
       187 
167 
     | 
    
         
             
            lionagi/tools/file/reader.py,sha256=JCKDyOcKv07Iee8oJls8y5Qg0_PefnfqsIp_FiZQrsQ,9660
         
     | 
| 
       188 
     | 
    
         
            -
            lionagi-0.18. 
     | 
| 
       189 
     | 
    
         
            -
            lionagi-0.18. 
     | 
| 
       190 
     | 
    
         
            -
            lionagi-0.18. 
     | 
| 
       191 
     | 
    
         
            -
            lionagi-0.18. 
     | 
| 
      
 168 
     | 
    
         
            +
            lionagi-0.18.2.dist-info/METADATA,sha256=QekE7MrV8mQrBMwByBIc5BKzQykyZuqEkHcI_MLpfXc,23462
         
     | 
| 
      
 169 
     | 
    
         
            +
            lionagi-0.18.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
         
     | 
| 
      
 170 
     | 
    
         
            +
            lionagi-0.18.2.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
         
     | 
| 
      
 171 
     | 
    
         
            +
            lionagi-0.18.2.dist-info/RECORD,,
         
     | 
    
        lionagi/fields/__init__.py
    DELETED
    
    | 
         @@ -1,47 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from .action import (
         
     | 
| 
       2 
     | 
    
         
            -
                ACTION_REQUESTS_FIELD,
         
     | 
| 
       3 
     | 
    
         
            -
                ACTION_REQUIRED_FIELD,
         
     | 
| 
       4 
     | 
    
         
            -
                ACTION_RESPONSES_FIELD,
         
     | 
| 
       5 
     | 
    
         
            -
                ActionRequestModel,
         
     | 
| 
       6 
     | 
    
         
            -
                ActionResponseModel,
         
     | 
| 
       7 
     | 
    
         
            -
            )
         
     | 
| 
       8 
     | 
    
         
            -
            from .base import (
         
     | 
| 
       9 
     | 
    
         
            -
                CodeSnippet,
         
     | 
| 
       10 
     | 
    
         
            -
                Outline,
         
     | 
| 
       11 
     | 
    
         
            -
                OutlineItem,
         
     | 
| 
       12 
     | 
    
         
            -
                Section,
         
     | 
| 
       13 
     | 
    
         
            -
                Source,
         
     | 
| 
       14 
     | 
    
         
            -
                TextSnippet,
         
     | 
| 
       15 
     | 
    
         
            -
            )
         
     | 
| 
       16 
     | 
    
         
            -
            from .file import Documentation, File, Module, ResearchSummary
         
     | 
| 
       17 
     | 
    
         
            -
            from .instruct import (
         
     | 
| 
       18 
     | 
    
         
            -
                INSTRUCT_FIELD,
         
     | 
| 
       19 
     | 
    
         
            -
                LIST_INSTRUCT_FIELD_MODEL,
         
     | 
| 
       20 
     | 
    
         
            -
                Instruct,
         
     | 
| 
       21 
     | 
    
         
            -
                InstructResponse,
         
     | 
| 
       22 
     | 
    
         
            -
            )
         
     | 
| 
       23 
     | 
    
         
            -
            from .reason import REASON_FIELD, Reason
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            __all__ = (
         
     | 
| 
       26 
     | 
    
         
            -
                "ActionRequestModel",
         
     | 
| 
       27 
     | 
    
         
            -
                "ActionResponseModel",
         
     | 
| 
       28 
     | 
    
         
            -
                "Source",
         
     | 
| 
       29 
     | 
    
         
            -
                "TextSnippet",
         
     | 
| 
       30 
     | 
    
         
            -
                "CodeSnippet",
         
     | 
| 
       31 
     | 
    
         
            -
                "Section",
         
     | 
| 
       32 
     | 
    
         
            -
                "OutlineItem",
         
     | 
| 
       33 
     | 
    
         
            -
                "Outline",
         
     | 
| 
       34 
     | 
    
         
            -
                "File",
         
     | 
| 
       35 
     | 
    
         
            -
                "Module",
         
     | 
| 
       36 
     | 
    
         
            -
                "ResearchSummary",
         
     | 
| 
       37 
     | 
    
         
            -
                "Documentation",
         
     | 
| 
       38 
     | 
    
         
            -
                "Instruct",
         
     | 
| 
       39 
     | 
    
         
            -
                "InstructResponse",
         
     | 
| 
       40 
     | 
    
         
            -
                "Reason",
         
     | 
| 
       41 
     | 
    
         
            -
                "LIST_INSTRUCT_FIELD_MODEL",
         
     | 
| 
       42 
     | 
    
         
            -
                "INSTRUCT_FIELD",
         
     | 
| 
       43 
     | 
    
         
            -
                "ACTION_REQUESTS_FIELD",
         
     | 
| 
       44 
     | 
    
         
            -
                "ACTION_RESPONSES_FIELD",
         
     | 
| 
       45 
     | 
    
         
            -
                "ACTION_REQUIRED_FIELD",
         
     | 
| 
       46 
     | 
    
         
            -
                "REASON_FIELD",
         
     | 
| 
       47 
     | 
    
         
            -
            )
         
     | 
    
        lionagi/fields/action.py
    DELETED
    
    | 
         @@ -1,188 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright (c) 2023-2025, HaiyangLi <quantocean.li at gmail dot com>
         
     | 
| 
       2 
     | 
    
         
            -
            # SPDX-License-Identifier: Apache-2.0
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            import re
         
     | 
| 
       5 
     | 
    
         
            -
            from typing import Any
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            from pydantic import BaseModel, Field, field_validator
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            from lionagi.libs.validate.common_field_validators import (
         
     | 
| 
       10 
     | 
    
         
            -
                validate_boolean_field,
         
     | 
| 
       11 
     | 
    
         
            -
                validate_nullable_string_field,
         
     | 
| 
       12 
     | 
    
         
            -
            )
         
     | 
| 
       13 
     | 
    
         
            -
            from lionagi.ln import extract_json, to_dict, to_list
         
     | 
| 
       14 
     | 
    
         
            -
            from lionagi.models import FieldModel, HashableModel
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            __all__ = (
         
     | 
| 
       17 
     | 
    
         
            -
                "ActionRequestModel",
         
     | 
| 
       18 
     | 
    
         
            -
                "ActionResponseModel",
         
     | 
| 
       19 
     | 
    
         
            -
            )
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
            def parse_action_request(content: str | dict) -> list[dict]:
         
     | 
| 
       23 
     | 
    
         
            -
                json_blocks = []
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                if isinstance(content, BaseModel):
         
     | 
| 
       26 
     | 
    
         
            -
                    json_blocks = [content.model_dump()]
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                elif isinstance(content, str):
         
     | 
| 
       29 
     | 
    
         
            -
                    json_blocks = extract_json(content, fuzzy_parse=True)
         
     | 
| 
       30 
     | 
    
         
            -
                    if not json_blocks:
         
     | 
| 
       31 
     | 
    
         
            -
                        pattern2 = r"```python\s*(.*?)\s*```"
         
     | 
| 
       32 
     | 
    
         
            -
                        _d = re.findall(pattern2, content, re.DOTALL)
         
     | 
| 
       33 
     | 
    
         
            -
                        json_blocks = [
         
     | 
| 
       34 
     | 
    
         
            -
                            extract_json(match, fuzzy_parse=True) for match in _d
         
     | 
| 
       35 
     | 
    
         
            -
                        ]
         
     | 
| 
       36 
     | 
    
         
            -
                        json_blocks = to_list(json_blocks, dropna=True)
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
                    print(json_blocks)
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                elif content and isinstance(content, dict):
         
     | 
| 
       41 
     | 
    
         
            -
                    json_blocks = [content]
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                if json_blocks and not isinstance(json_blocks, list):
         
     | 
| 
       44 
     | 
    
         
            -
                    json_blocks = [json_blocks]
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                out = []
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                for i in json_blocks:
         
     | 
| 
       49 
     | 
    
         
            -
                    j = {}
         
     | 
| 
       50 
     | 
    
         
            -
                    if isinstance(i, dict):
         
     | 
| 
       51 
     | 
    
         
            -
                        if "function" in i and isinstance(i["function"], dict):
         
     | 
| 
       52 
     | 
    
         
            -
                            if "name" in i["function"]:
         
     | 
| 
       53 
     | 
    
         
            -
                                i["function"] = i["function"]["name"]
         
     | 
| 
       54 
     | 
    
         
            -
                        for k, v in i.items():
         
     | 
| 
       55 
     | 
    
         
            -
                            k = (
         
     | 
| 
       56 
     | 
    
         
            -
                                k.replace("action_", "")
         
     | 
| 
       57 
     | 
    
         
            -
                                .replace("recipient_", "")
         
     | 
| 
       58 
     | 
    
         
            -
                                .replace("s", "")
         
     | 
| 
       59 
     | 
    
         
            -
                            )
         
     | 
| 
       60 
     | 
    
         
            -
                            if k in ["name", "function", "recipient"]:
         
     | 
| 
       61 
     | 
    
         
            -
                                j["function"] = v
         
     | 
| 
       62 
     | 
    
         
            -
                            elif k in ["parameter", "argument", "arg", "param"]:
         
     | 
| 
       63 
     | 
    
         
            -
                                j["arguments"] = to_dict(
         
     | 
| 
       64 
     | 
    
         
            -
                                    v, str_type="json", fuzzy_parse=True, suppress=True
         
     | 
| 
       65 
     | 
    
         
            -
                                )
         
     | 
| 
       66 
     | 
    
         
            -
                        if (
         
     | 
| 
       67 
     | 
    
         
            -
                            j
         
     | 
| 
       68 
     | 
    
         
            -
                            and all(key in j for key in ["function", "arguments"])
         
     | 
| 
       69 
     | 
    
         
            -
                            and j["arguments"]
         
     | 
| 
       70 
     | 
    
         
            -
                        ):
         
     | 
| 
       71 
     | 
    
         
            -
                            out.append(j)
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
                return out
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
            class ActionRequestModel(HashableModel):
         
     | 
| 
       77 
     | 
    
         
            -
                """
         
     | 
| 
       78 
     | 
    
         
            -
                Captures a single action request, typically from a user or system message.
         
     | 
| 
       79 
     | 
    
         
            -
                Includes the name of the function and the arguments to be passed.
         
     | 
| 
       80 
     | 
    
         
            -
                """
         
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
                function: str | None = Field(
         
     | 
| 
       83 
     | 
    
         
            -
                    None,
         
     | 
| 
       84 
     | 
    
         
            -
                    title="Function",
         
     | 
| 
       85 
     | 
    
         
            -
                    description=(
         
     | 
| 
       86 
     | 
    
         
            -
                        "Name of the function to call from the provided `tool_schemas`. "
         
     | 
| 
       87 
     | 
    
         
            -
                        "If no `tool_schemas` exist, set to None or leave blank. "
         
     | 
| 
       88 
     | 
    
         
            -
                        "Never invent new function names outside what's given."
         
     | 
| 
       89 
     | 
    
         
            -
                    ),
         
     | 
| 
       90 
     | 
    
         
            -
                    examples=["multiply", "create_user"],
         
     | 
| 
       91 
     | 
    
         
            -
                )
         
     | 
| 
       92 
     | 
    
         
            -
                arguments: dict[str, Any] | None = Field(
         
     | 
| 
       93 
     | 
    
         
            -
                    None,
         
     | 
| 
       94 
     | 
    
         
            -
                    title="Arguments",
         
     | 
| 
       95 
     | 
    
         
            -
                    description=(
         
     | 
| 
       96 
     | 
    
         
            -
                        "Dictionary of arguments for the chosen function. "
         
     | 
| 
       97 
     | 
    
         
            -
                        "Use only argument names/types defined in `tool_schemas`. "
         
     | 
| 
       98 
     | 
    
         
            -
                        "Never introduce extra argument names."
         
     | 
| 
       99 
     | 
    
         
            -
                    ),
         
     | 
| 
       100 
     | 
    
         
            -
                )
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
                @field_validator("arguments", mode="before")
         
     | 
| 
       103 
     | 
    
         
            -
                def validate_arguments(cls, value: Any) -> dict[str, Any]:
         
     | 
| 
       104 
     | 
    
         
            -
                    """
         
     | 
| 
       105 
     | 
    
         
            -
                    Coerce arguments into a dictionary if possible, recursively.
         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
                    Raises:
         
     | 
| 
       108 
     | 
    
         
            -
                        ValueError if the data can't be coerced.
         
     | 
| 
       109 
     | 
    
         
            -
                    """
         
     | 
| 
       110 
     | 
    
         
            -
                    return to_dict(
         
     | 
| 
       111 
     | 
    
         
            -
                        value,
         
     | 
| 
       112 
     | 
    
         
            -
                        fuzzy_parse=True,
         
     | 
| 
       113 
     | 
    
         
            -
                        recursive=True,
         
     | 
| 
       114 
     | 
    
         
            -
                        recursive_python_only=False,
         
     | 
| 
       115 
     | 
    
         
            -
                    )
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
                @field_validator("function", mode="before")
         
     | 
| 
       118 
     | 
    
         
            -
                def validate_function(cls, value: str) -> str:
         
     | 
| 
       119 
     | 
    
         
            -
                    """
         
     | 
| 
       120 
     | 
    
         
            -
                    Ensure the function name is a valid non-empty string (if provided).
         
     | 
| 
       121 
     | 
    
         
            -
                    """
         
     | 
| 
       122 
     | 
    
         
            -
                    return validate_nullable_string_field(cls, value, "function", False)
         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                @classmethod
         
     | 
| 
       125 
     | 
    
         
            -
                def create(cls, content: str):
         
     | 
| 
       126 
     | 
    
         
            -
                    """
         
     | 
| 
       127 
     | 
    
         
            -
                    Attempt to parse a string (usually from a conversation or JSON) into
         
     | 
| 
       128 
     | 
    
         
            -
                    one or more ActionRequestModel instances.
         
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
                    If no valid structure is found, returns an empty list.
         
     | 
| 
       131 
     | 
    
         
            -
                    """
         
     | 
| 
       132 
     | 
    
         
            -
                    try:
         
     | 
| 
       133 
     | 
    
         
            -
                        content = parse_action_request(content)
         
     | 
| 
       134 
     | 
    
         
            -
                        if content:
         
     | 
| 
       135 
     | 
    
         
            -
                            return [cls.model_validate(i) for i in content]
         
     | 
| 
       136 
     | 
    
         
            -
                        return []
         
     | 
| 
       137 
     | 
    
         
            -
                    except Exception:
         
     | 
| 
       138 
     | 
    
         
            -
                        return []
         
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
            ACTION_REQUESTS_FIELD = FieldModel(
         
     | 
| 
       142 
     | 
    
         
            -
                name="action_requests",
         
     | 
| 
       143 
     | 
    
         
            -
                annotation=list[ActionRequestModel],
         
     | 
| 
       144 
     | 
    
         
            -
                default_factory=list,
         
     | 
| 
       145 
     | 
    
         
            -
                title="Actions",
         
     | 
| 
       146 
     | 
    
         
            -
                description=(
         
     | 
| 
       147 
     | 
    
         
            -
                    "List of actions to be executed when `action_required` is true. "
         
     | 
| 
       148 
     | 
    
         
            -
                    "Each action must align with the available `tool_schemas`. "
         
     | 
| 
       149 
     | 
    
         
            -
                    "Leave empty if no actions are needed."
         
     | 
| 
       150 
     | 
    
         
            -
                ),
         
     | 
| 
       151 
     | 
    
         
            -
            )
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
     | 
    
         
            -
            class ActionResponseModel(HashableModel):
         
     | 
| 
       155 
     | 
    
         
            -
                """
         
     | 
| 
       156 
     | 
    
         
            -
                Encapsulates a function's output after being called. Typically
         
     | 
| 
       157 
     | 
    
         
            -
                references the original function name, arguments, and the result.
         
     | 
| 
       158 
     | 
    
         
            -
                """
         
     | 
| 
       159 
     | 
    
         
            -
             
     | 
| 
       160 
     | 
    
         
            -
                function: str = Field(default_factory=str, title="Function")
         
     | 
| 
       161 
     | 
    
         
            -
                arguments: dict[str, Any] = Field(default_factory=dict)
         
     | 
| 
       162 
     | 
    
         
            -
                output: Any = None
         
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
            ACTION_RESPONSES_FIELD = FieldModel(
         
     | 
| 
       166 
     | 
    
         
            -
                name="action_responses",
         
     | 
| 
       167 
     | 
    
         
            -
                annotation=list[ActionResponseModel],
         
     | 
| 
       168 
     | 
    
         
            -
                default_factory=list,
         
     | 
| 
       169 
     | 
    
         
            -
                title="Actions",
         
     | 
| 
       170 
     | 
    
         
            -
                description="**do not fill**",
         
     | 
| 
       171 
     | 
    
         
            -
            )
         
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
            ACTION_REQUIRED_FIELD = FieldModel(
         
     | 
| 
       175 
     | 
    
         
            -
                name="action_required",
         
     | 
| 
       176 
     | 
    
         
            -
                annotation=bool,
         
     | 
| 
       177 
     | 
    
         
            -
                default=False,
         
     | 
| 
       178 
     | 
    
         
            -
                title="Action Required",
         
     | 
| 
       179 
     | 
    
         
            -
                description=(
         
     | 
| 
       180 
     | 
    
         
            -
                    "Whether this step strictly requires performing actions. "
         
     | 
| 
       181 
     | 
    
         
            -
                    "If true, the requests in `action_requests` must be fulfilled, "
         
     | 
| 
       182 
     | 
    
         
            -
                    "assuming `tool_schemas` are available. "
         
     | 
| 
       183 
     | 
    
         
            -
                    "If false or no `tool_schemas` exist, actions are optional."
         
     | 
| 
       184 
     | 
    
         
            -
                ),
         
     | 
| 
       185 
     | 
    
         
            -
                validator=lambda cls, v: validate_boolean_field(cls, v, False),
         
     | 
| 
       186 
     | 
    
         
            -
                validator_kwargs={"mode": "before"},
         
     | 
| 
       187 
     | 
    
         
            -
            )
         
     | 
| 
       188 
     | 
    
         
            -
            # File: lionagi/libs/fields/action.py
         
     | 
    
        lionagi/fields/base.py
    DELETED
    
    | 
         @@ -1,153 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright (c) 2023-2025, HaiyangLi <quantocean.li at gmail dot com>
         
     | 
| 
       2 
     | 
    
         
            -
            # SPDX-License-Identifier: Apache-2.0
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            from enum import Enum
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            from pydantic import Field, HttpUrl
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
            from lionagi.models import HashableModel
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
            __all__ = (
         
     | 
| 
       11 
     | 
    
         
            -
                "Source",
         
     | 
| 
       12 
     | 
    
         
            -
                "TextSnippet",
         
     | 
| 
       13 
     | 
    
         
            -
                "CodeSnippet",
         
     | 
| 
       14 
     | 
    
         
            -
                "Section",
         
     | 
| 
       15 
     | 
    
         
            -
                "OutlineItem",
         
     | 
| 
       16 
     | 
    
         
            -
                "Outline",
         
     | 
| 
       17 
     | 
    
         
            -
            )
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            class Source(HashableModel):
         
     | 
| 
       21 
     | 
    
         
            -
                """
         
     | 
| 
       22 
     | 
    
         
            -
                Represents a citation or external source, such as:
         
     | 
| 
       23 
     | 
    
         
            -
                 - a website,
         
     | 
| 
       24 
     | 
    
         
            -
                 - documentation link,
         
     | 
| 
       25 
     | 
    
         
            -
                 - research paper,
         
     | 
| 
       26 
     | 
    
         
            -
                 - or any external resource.
         
     | 
| 
       27 
     | 
    
         
            -
                """
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                title: str = Field(
         
     | 
| 
       30 
     | 
    
         
            -
                    ...,
         
     | 
| 
       31 
     | 
    
         
            -
                    description="Short label or title for the reference (e.g. 'Pydantic Docs', 'RFC 3986').",
         
     | 
| 
       32 
     | 
    
         
            -
                )
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                url: str | HttpUrl | None = Field(
         
     | 
| 
       35 
     | 
    
         
            -
                    None,
         
     | 
| 
       36 
     | 
    
         
            -
                    description="Full URL or local path pointing to the resource. Must conform to standard URL format.",
         
     | 
| 
       37 
     | 
    
         
            -
                )
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                note: str | None = Field(
         
     | 
| 
       40 
     | 
    
         
            -
                    default=None,
         
     | 
| 
       41 
     | 
    
         
            -
                    description=(
         
     | 
| 
       42 
     | 
    
         
            -
                        "Optional additional note explaining why this reference is relevant or what it contains."
         
     | 
| 
       43 
     | 
    
         
            -
                    ),
         
     | 
| 
       44 
     | 
    
         
            -
                )
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
            class SnippetType(str, Enum):
         
     | 
| 
       48 
     | 
    
         
            -
                TEXT = "text"
         
     | 
| 
       49 
     | 
    
         
            -
                CODE = "code"
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
            class TextSnippet(HashableModel):
         
     | 
| 
       53 
     | 
    
         
            -
                """
         
     | 
| 
       54 
     | 
    
         
            -
                Specialized snippet for textual/prose content.
         
     | 
| 
       55 
     | 
    
         
            -
                """
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
                type: SnippetType = Field(
         
     | 
| 
       58 
     | 
    
         
            -
                    SnippetType.TEXT,
         
     | 
| 
       59 
     | 
    
         
            -
                    description=(
         
     | 
| 
       60 
     | 
    
         
            -
                        "Must be 'text' for textual snippets. Ensures explicit type distinction."
         
     | 
| 
       61 
     | 
    
         
            -
                    ),
         
     | 
| 
       62 
     | 
    
         
            -
                )
         
     | 
| 
       63 
     | 
    
         
            -
                content: str = Field(
         
     | 
| 
       64 
     | 
    
         
            -
                    ...,
         
     | 
| 
       65 
     | 
    
         
            -
                    description=(
         
     | 
| 
       66 
     | 
    
         
            -
                        "The actual text. Can be a paragraph, bullet list, or any narrative content."
         
     | 
| 
       67 
     | 
    
         
            -
                    ),
         
     | 
| 
       68 
     | 
    
         
            -
                )
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            class CodeSnippet(HashableModel):
         
     | 
| 
       72 
     | 
    
         
            -
                """
         
     | 
| 
       73 
     | 
    
         
            -
                Specialized snippet for source code or command-line examples.
         
     | 
| 
       74 
     | 
    
         
            -
                """
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
                type: SnippetType = Field(
         
     | 
| 
       77 
     | 
    
         
            -
                    SnippetType.CODE,
         
     | 
| 
       78 
     | 
    
         
            -
                    description=(
         
     | 
| 
       79 
     | 
    
         
            -
                        "Must be 'code' for code snippets. Allows separate handling or formatting."
         
     | 
| 
       80 
     | 
    
         
            -
                    ),
         
     | 
| 
       81 
     | 
    
         
            -
                )
         
     | 
| 
       82 
     | 
    
         
            -
                content: str = Field(
         
     | 
| 
       83 
     | 
    
         
            -
                    ...,
         
     | 
| 
       84 
     | 
    
         
            -
                    description=(
         
     | 
| 
       85 
     | 
    
         
            -
                        "The actual code or command sequence. Should be well-formatted so it can be rendered properly."
         
     | 
| 
       86 
     | 
    
         
            -
                    ),
         
     | 
| 
       87 
     | 
    
         
            -
                )
         
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
            class Section(HashableModel):
         
     | 
| 
       91 
     | 
    
         
            -
                """
         
     | 
| 
       92 
     | 
    
         
            -
                A single section of a document or article. Each section has:
         
     | 
| 
       93 
     | 
    
         
            -
                 - A title
         
     | 
| 
       94 
     | 
    
         
            -
                 - A sequential list of content snippets (text or code),
         
     | 
| 
       95 
     | 
    
         
            -
                   which appear in the intended reading order.
         
     | 
| 
       96 
     | 
    
         
            -
                 - Optional sources specifically cited in this section.
         
     | 
| 
       97 
     | 
    
         
            -
                """
         
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
                title: str = Field(
         
     | 
| 
       100 
     | 
    
         
            -
                    ...,
         
     | 
| 
       101 
     | 
    
         
            -
                    description=(
         
     | 
| 
       102 
     | 
    
         
            -
                        "The section heading or label, e.g., 'Introduction', 'Implementation Steps'."
         
     | 
| 
       103 
     | 
    
         
            -
                    ),
         
     | 
| 
       104 
     | 
    
         
            -
                )
         
     | 
| 
       105 
     | 
    
         
            -
                snippets: list[TextSnippet | CodeSnippet] = Field(
         
     | 
| 
       106 
     | 
    
         
            -
                    default_factory=list,
         
     | 
| 
       107 
     | 
    
         
            -
                    description=(
         
     | 
| 
       108 
     | 
    
         
            -
                        "Ordered list of content snippets. Could be multiple text blocks, code examples, etc."
         
     | 
| 
       109 
     | 
    
         
            -
                    ),
         
     | 
| 
       110 
     | 
    
         
            -
                )
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
                sources: list[Source] = Field(
         
     | 
| 
       113 
     | 
    
         
            -
                    default_factory=list,
         
     | 
| 
       114 
     | 
    
         
            -
                    description=(
         
     | 
| 
       115 
     | 
    
         
            -
                        "References specifically cited in this section. "
         
     | 
| 
       116 
     | 
    
         
            -
                        "If sources are stored at the doc-level, this can be omitted."
         
     | 
| 
       117 
     | 
    
         
            -
                    ),
         
     | 
| 
       118 
     | 
    
         
            -
                )
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
            class OutlineItem(HashableModel):
         
     | 
| 
       122 
     | 
    
         
            -
                """
         
     | 
| 
       123 
     | 
    
         
            -
                Represents a single outline item, which could become a full section later.
         
     | 
| 
       124 
     | 
    
         
            -
                """
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
                heading: str = Field(
         
     | 
| 
       127 
     | 
    
         
            -
                    ...,
         
     | 
| 
       128 
     | 
    
         
            -
                    description="Short name or label for this item, e.g., 'Chapter 1: Basics'.",
         
     | 
| 
       129 
     | 
    
         
            -
                )
         
     | 
| 
       130 
     | 
    
         
            -
                summary: str | None = Field(
         
     | 
| 
       131 
     | 
    
         
            -
                    default=None,
         
     | 
| 
       132 
     | 
    
         
            -
                    description=(
         
     | 
| 
       133 
     | 
    
         
            -
                        "A brief description of what this section will cover, if known."
         
     | 
| 
       134 
     | 
    
         
            -
                    ),
         
     | 
| 
       135 
     | 
    
         
            -
                )
         
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
            class Outline(HashableModel):
         
     | 
| 
       139 
     | 
    
         
            -
                """
         
     | 
| 
       140 
     | 
    
         
            -
                A top-level outline for a document or article.
         
     | 
| 
       141 
     | 
    
         
            -
                """
         
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
                topic: str = Field(
         
     | 
| 
       144 
     | 
    
         
            -
                    ..., description="Working title or overarching topic of the document."
         
     | 
| 
       145 
     | 
    
         
            -
                )
         
     | 
| 
       146 
     | 
    
         
            -
                items: list[OutlineItem] = Field(
         
     | 
| 
       147 
     | 
    
         
            -
                    default_factory=list,
         
     | 
| 
       148 
     | 
    
         
            -
                    description="List of major outline points or sections planned.",
         
     | 
| 
       149 
     | 
    
         
            -
                )
         
     | 
| 
       150 
     | 
    
         
            -
                notes: str | None = Field(
         
     | 
| 
       151 
     | 
    
         
            -
                    default=None,
         
     | 
| 
       152 
     | 
    
         
            -
                    description="Any additional remarks, questions, or brainstorming notes for the outline.",
         
     | 
| 
       153 
     | 
    
         
            -
                )
         
     |