exonware-xwsystem 0.1.0.1__py3-none-any.whl → 0.1.0.4__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.
Files changed (341) hide show
  1. exonware/__init__.py +2 -1
  2. exonware/conf.py +2 -2
  3. exonware/xwsystem/__init__.py +115 -43
  4. exonware/xwsystem/base.py +30 -0
  5. exonware/xwsystem/caching/__init__.py +39 -13
  6. exonware/xwsystem/caching/base.py +24 -6
  7. exonware/xwsystem/caching/bloom_cache.py +2 -2
  8. exonware/xwsystem/caching/cache_manager.py +2 -1
  9. exonware/xwsystem/caching/conditional.py +2 -2
  10. exonware/xwsystem/caching/contracts.py +85 -139
  11. exonware/xwsystem/caching/decorators.py +6 -19
  12. exonware/xwsystem/caching/defs.py +2 -1
  13. exonware/xwsystem/caching/disk_cache.py +2 -1
  14. exonware/xwsystem/caching/distributed.py +2 -1
  15. exonware/xwsystem/caching/errors.py +2 -1
  16. exonware/xwsystem/caching/events.py +110 -27
  17. exonware/xwsystem/caching/eviction_strategies.py +2 -2
  18. exonware/xwsystem/caching/external_caching_python.py +701 -0
  19. exonware/xwsystem/caching/facade.py +253 -0
  20. exonware/xwsystem/caching/factory.py +300 -0
  21. exonware/xwsystem/caching/fluent.py +14 -12
  22. exonware/xwsystem/caching/integrity.py +21 -6
  23. exonware/xwsystem/caching/lfu_cache.py +2 -1
  24. exonware/xwsystem/caching/lfu_optimized.py +18 -6
  25. exonware/xwsystem/caching/lru_cache.py +7 -4
  26. exonware/xwsystem/caching/memory_bounded.py +2 -2
  27. exonware/xwsystem/caching/metrics_exporter.py +2 -2
  28. exonware/xwsystem/caching/observable_cache.py +2 -2
  29. exonware/xwsystem/caching/pluggable_cache.py +2 -2
  30. exonware/xwsystem/caching/rate_limiter.py +2 -2
  31. exonware/xwsystem/caching/read_through.py +2 -2
  32. exonware/xwsystem/caching/secure_cache.py +81 -28
  33. exonware/xwsystem/caching/serializable.py +9 -7
  34. exonware/xwsystem/caching/stats.py +2 -2
  35. exonware/xwsystem/caching/tagging.py +2 -2
  36. exonware/xwsystem/caching/ttl_cache.py +4 -3
  37. exonware/xwsystem/caching/two_tier_cache.py +6 -3
  38. exonware/xwsystem/caching/utils.py +30 -12
  39. exonware/xwsystem/caching/validation.py +2 -2
  40. exonware/xwsystem/caching/warming.py +6 -3
  41. exonware/xwsystem/caching/write_behind.py +15 -6
  42. exonware/xwsystem/config/__init__.py +11 -17
  43. exonware/xwsystem/config/base.py +5 -5
  44. exonware/xwsystem/config/contracts.py +93 -153
  45. exonware/xwsystem/config/defaults.py +3 -2
  46. exonware/xwsystem/config/defs.py +3 -2
  47. exonware/xwsystem/config/errors.py +2 -5
  48. exonware/xwsystem/config/logging.py +12 -8
  49. exonware/xwsystem/config/logging_setup.py +3 -2
  50. exonware/xwsystem/config/performance.py +1 -46
  51. exonware/xwsystem/config/performance_modes.py +9 -8
  52. exonware/xwsystem/config/version_manager.py +1 -0
  53. exonware/xwsystem/config.py +27 -0
  54. exonware/xwsystem/console/__init__.py +53 -0
  55. exonware/xwsystem/console/base.py +133 -0
  56. exonware/xwsystem/console/cli/__init__.py +61 -0
  57. exonware/xwsystem/{cli → console/cli}/args.py +27 -24
  58. exonware/xwsystem/{cli → console/cli}/base.py +18 -87
  59. exonware/xwsystem/{cli → console/cli}/colors.py +15 -13
  60. exonware/xwsystem/console/cli/console.py +98 -0
  61. exonware/xwsystem/{cli → console/cli}/contracts.py +51 -69
  62. exonware/xwsystem/console/cli/defs.py +87 -0
  63. exonware/xwsystem/console/cli/encoding.py +69 -0
  64. exonware/xwsystem/{cli → console/cli}/errors.py +8 -3
  65. exonware/xwsystem/console/cli/event_logger.py +166 -0
  66. exonware/xwsystem/{cli → console/cli}/progress.py +25 -21
  67. exonware/xwsystem/{cli → console/cli}/prompts.py +3 -2
  68. exonware/xwsystem/{cli → console/cli}/tables.py +27 -24
  69. exonware/xwsystem/console/contracts.py +113 -0
  70. exonware/xwsystem/console/defs.py +154 -0
  71. exonware/xwsystem/console/errors.py +34 -0
  72. exonware/xwsystem/console/event_logger.py +385 -0
  73. exonware/xwsystem/console/writer.py +132 -0
  74. exonware/xwsystem/contracts.py +28 -0
  75. exonware/xwsystem/data_structures/__init__.py +23 -0
  76. exonware/xwsystem/data_structures/trie.py +34 -0
  77. exonware/xwsystem/data_structures/union_find.py +144 -0
  78. exonware/xwsystem/defs.py +17 -0
  79. exonware/xwsystem/errors.py +23 -0
  80. exonware/xwsystem/facade.py +62 -0
  81. exonware/xwsystem/http_client/__init__.py +22 -1
  82. exonware/xwsystem/http_client/advanced_client.py +8 -5
  83. exonware/xwsystem/http_client/base.py +3 -2
  84. exonware/xwsystem/http_client/client.py +7 -4
  85. exonware/xwsystem/http_client/contracts.py +42 -56
  86. exonware/xwsystem/http_client/defs.py +2 -1
  87. exonware/xwsystem/http_client/errors.py +2 -1
  88. exonware/xwsystem/http_client/facade.py +156 -0
  89. exonware/xwsystem/io/__init__.py +22 -3
  90. exonware/xwsystem/io/archive/__init__.py +8 -2
  91. exonware/xwsystem/io/archive/archive.py +1 -1
  92. exonware/xwsystem/io/archive/archive_files.py +4 -7
  93. exonware/xwsystem/io/archive/archivers.py +120 -10
  94. exonware/xwsystem/io/archive/base.py +4 -5
  95. exonware/xwsystem/io/archive/codec_integration.py +1 -2
  96. exonware/xwsystem/io/archive/compression.py +1 -2
  97. exonware/xwsystem/io/archive/facade.py +263 -0
  98. exonware/xwsystem/io/archive/formats/__init__.py +2 -3
  99. exonware/xwsystem/io/archive/formats/brotli_format.py +20 -7
  100. exonware/xwsystem/io/archive/formats/lz4_format.py +20 -7
  101. exonware/xwsystem/io/archive/formats/rar.py +11 -5
  102. exonware/xwsystem/io/archive/formats/sevenzip.py +12 -6
  103. exonware/xwsystem/io/archive/formats/squashfs_format.py +1 -2
  104. exonware/xwsystem/io/archive/formats/tar.py +52 -7
  105. exonware/xwsystem/io/archive/formats/wim_format.py +11 -5
  106. exonware/xwsystem/io/archive/formats/zip.py +1 -2
  107. exonware/xwsystem/io/archive/formats/zpaq_format.py +1 -2
  108. exonware/xwsystem/io/archive/formats/zstandard.py +20 -7
  109. exonware/xwsystem/io/base.py +119 -115
  110. exonware/xwsystem/io/codec/__init__.py +4 -2
  111. exonware/xwsystem/io/codec/base.py +19 -13
  112. exonware/xwsystem/io/codec/contracts.py +59 -2
  113. exonware/xwsystem/io/codec/registry.py +67 -21
  114. exonware/xwsystem/io/common/__init__.py +1 -1
  115. exonware/xwsystem/io/common/atomic.py +29 -16
  116. exonware/xwsystem/io/common/base.py +11 -10
  117. exonware/xwsystem/io/common/lock.py +6 -5
  118. exonware/xwsystem/io/common/path_manager.py +2 -1
  119. exonware/xwsystem/io/common/watcher.py +1 -2
  120. exonware/xwsystem/io/contracts.py +301 -433
  121. exonware/xwsystem/io/contracts_1.py +1180 -0
  122. exonware/xwsystem/io/data_operations.py +19 -20
  123. exonware/xwsystem/io/defs.py +4 -3
  124. exonware/xwsystem/io/errors.py +3 -2
  125. exonware/xwsystem/io/facade.py +87 -61
  126. exonware/xwsystem/io/file/__init__.py +1 -1
  127. exonware/xwsystem/io/file/base.py +8 -9
  128. exonware/xwsystem/io/file/conversion.py +2 -3
  129. exonware/xwsystem/io/file/file.py +61 -18
  130. exonware/xwsystem/io/file/paged_source.py +8 -8
  131. exonware/xwsystem/io/file/paging/__init__.py +1 -2
  132. exonware/xwsystem/io/file/paging/byte_paging.py +4 -5
  133. exonware/xwsystem/io/file/paging/line_paging.py +2 -3
  134. exonware/xwsystem/io/file/paging/record_paging.py +2 -3
  135. exonware/xwsystem/io/file/paging/registry.py +1 -2
  136. exonware/xwsystem/io/file/source.py +13 -17
  137. exonware/xwsystem/io/filesystem/__init__.py +1 -1
  138. exonware/xwsystem/io/filesystem/base.py +1 -2
  139. exonware/xwsystem/io/filesystem/local.py +3 -4
  140. exonware/xwsystem/io/folder/__init__.py +1 -1
  141. exonware/xwsystem/io/folder/base.py +1 -2
  142. exonware/xwsystem/io/folder/folder.py +16 -7
  143. exonware/xwsystem/io/indexing/__init__.py +14 -0
  144. exonware/xwsystem/io/indexing/facade.py +443 -0
  145. exonware/xwsystem/io/path_parser.py +98 -0
  146. exonware/xwsystem/io/serialization/__init__.py +21 -3
  147. exonware/xwsystem/io/serialization/auto_serializer.py +146 -20
  148. exonware/xwsystem/io/serialization/base.py +84 -34
  149. exonware/xwsystem/io/serialization/contracts.py +50 -73
  150. exonware/xwsystem/io/serialization/defs.py +2 -1
  151. exonware/xwsystem/io/serialization/errors.py +2 -1
  152. exonware/xwsystem/io/serialization/flyweight.py +154 -7
  153. exonware/xwsystem/io/serialization/format_detector.py +15 -14
  154. exonware/xwsystem/io/serialization/formats/__init__.py +8 -5
  155. exonware/xwsystem/io/serialization/formats/binary/bson.py +15 -6
  156. exonware/xwsystem/io/serialization/formats/binary/cbor.py +5 -5
  157. exonware/xwsystem/io/serialization/formats/binary/marshal.py +5 -5
  158. exonware/xwsystem/io/serialization/formats/binary/msgpack.py +5 -5
  159. exonware/xwsystem/io/serialization/formats/binary/pickle.py +5 -5
  160. exonware/xwsystem/io/serialization/formats/binary/plistlib.py +5 -5
  161. exonware/xwsystem/io/serialization/formats/database/dbm.py +7 -7
  162. exonware/xwsystem/io/serialization/formats/database/shelve.py +7 -7
  163. exonware/xwsystem/io/serialization/formats/database/sqlite3.py +7 -7
  164. exonware/xwsystem/io/serialization/formats/tabular/__init__.py +27 -0
  165. exonware/xwsystem/io/serialization/formats/tabular/base.py +89 -0
  166. exonware/xwsystem/io/serialization/formats/tabular/csv.py +319 -0
  167. exonware/xwsystem/io/serialization/formats/tabular/df.py +249 -0
  168. exonware/xwsystem/io/serialization/formats/tabular/excel.py +291 -0
  169. exonware/xwsystem/io/serialization/formats/tabular/googlesheets.py +374 -0
  170. exonware/xwsystem/io/serialization/formats/text/__init__.py +1 -1
  171. exonware/xwsystem/io/serialization/formats/text/append_only_log.py +5 -7
  172. exonware/xwsystem/io/serialization/formats/text/configparser.py +5 -5
  173. exonware/xwsystem/io/serialization/formats/text/csv.py +7 -5
  174. exonware/xwsystem/io/serialization/formats/text/formdata.py +5 -5
  175. exonware/xwsystem/io/serialization/formats/text/json.py +27 -18
  176. exonware/xwsystem/io/serialization/formats/text/json5.py +8 -4
  177. exonware/xwsystem/io/serialization/formats/text/jsonlines.py +18 -14
  178. exonware/xwsystem/io/serialization/formats/text/multipart.py +5 -5
  179. exonware/xwsystem/io/serialization/formats/text/toml.py +8 -6
  180. exonware/xwsystem/io/serialization/formats/text/xml.py +25 -20
  181. exonware/xwsystem/io/serialization/formats/text/yaml.py +8 -6
  182. exonware/xwsystem/io/serialization/parsers/__init__.py +3 -2
  183. exonware/xwsystem/io/serialization/parsers/base.py +6 -5
  184. exonware/xwsystem/io/serialization/parsers/hybrid_parser.py +7 -6
  185. exonware/xwsystem/io/serialization/parsers/msgspec_parser.py +10 -7
  186. exonware/xwsystem/io/serialization/parsers/orjson_direct_parser.py +7 -6
  187. exonware/xwsystem/io/serialization/parsers/orjson_parser.py +11 -8
  188. exonware/xwsystem/io/serialization/parsers/pysimdjson_parser.py +13 -9
  189. exonware/xwsystem/io/serialization/parsers/rapidjson_parser.py +10 -7
  190. exonware/xwsystem/io/serialization/parsers/registry.py +11 -10
  191. exonware/xwsystem/io/serialization/parsers/standard.py +7 -6
  192. exonware/xwsystem/io/serialization/parsers/ujson_parser.py +10 -7
  193. exonware/xwsystem/io/serialization/registry.py +4 -4
  194. exonware/xwsystem/io/serialization/serializer.py +168 -79
  195. exonware/xwsystem/io/serialization/universal_options.py +367 -0
  196. exonware/xwsystem/io/serialization/utils/__init__.py +1 -2
  197. exonware/xwsystem/io/serialization/utils/path_ops.py +5 -6
  198. exonware/xwsystem/io/source_reader.py +223 -0
  199. exonware/xwsystem/io/stream/__init__.py +1 -1
  200. exonware/xwsystem/io/stream/async_operations.py +61 -14
  201. exonware/xwsystem/io/stream/base.py +1 -2
  202. exonware/xwsystem/io/stream/codec_io.py +6 -7
  203. exonware/xwsystem/ipc/__init__.py +1 -0
  204. exonware/xwsystem/ipc/async_fabric.py +4 -4
  205. exonware/xwsystem/ipc/base.py +6 -5
  206. exonware/xwsystem/ipc/contracts.py +41 -66
  207. exonware/xwsystem/ipc/defs.py +2 -1
  208. exonware/xwsystem/ipc/errors.py +2 -1
  209. exonware/xwsystem/ipc/message_queue.py +5 -2
  210. exonware/xwsystem/ipc/pipes.py +70 -34
  211. exonware/xwsystem/ipc/process_manager.py +7 -5
  212. exonware/xwsystem/ipc/process_pool.py +6 -5
  213. exonware/xwsystem/ipc/shared_memory.py +64 -11
  214. exonware/xwsystem/monitoring/__init__.py +7 -0
  215. exonware/xwsystem/monitoring/base.py +11 -8
  216. exonware/xwsystem/monitoring/contracts.py +86 -144
  217. exonware/xwsystem/monitoring/defs.py +2 -1
  218. exonware/xwsystem/monitoring/error_recovery.py +16 -3
  219. exonware/xwsystem/monitoring/errors.py +2 -1
  220. exonware/xwsystem/monitoring/facade.py +183 -0
  221. exonware/xwsystem/monitoring/memory_monitor.py +1 -0
  222. exonware/xwsystem/monitoring/metrics.py +1 -0
  223. exonware/xwsystem/monitoring/performance_manager_generic.py +7 -7
  224. exonware/xwsystem/monitoring/performance_monitor.py +1 -0
  225. exonware/xwsystem/monitoring/performance_validator.py +1 -0
  226. exonware/xwsystem/monitoring/system_monitor.py +6 -5
  227. exonware/xwsystem/monitoring/tracing.py +18 -16
  228. exonware/xwsystem/monitoring/tracker.py +2 -1
  229. exonware/xwsystem/operations/__init__.py +5 -50
  230. exonware/xwsystem/operations/base.py +3 -44
  231. exonware/xwsystem/operations/contracts.py +25 -15
  232. exonware/xwsystem/operations/defs.py +1 -1
  233. exonware/xwsystem/operations/diff.py +5 -4
  234. exonware/xwsystem/operations/errors.py +1 -1
  235. exonware/xwsystem/operations/merge.py +6 -4
  236. exonware/xwsystem/operations/patch.py +5 -4
  237. exonware/xwsystem/patterns/__init__.py +1 -0
  238. exonware/xwsystem/patterns/base.py +2 -1
  239. exonware/xwsystem/patterns/context_manager.py +2 -1
  240. exonware/xwsystem/patterns/contracts.py +215 -256
  241. exonware/xwsystem/patterns/defs.py +2 -1
  242. exonware/xwsystem/patterns/dynamic_facade.py +1 -0
  243. exonware/xwsystem/patterns/errors.py +2 -4
  244. exonware/xwsystem/patterns/handler_factory.py +2 -3
  245. exonware/xwsystem/patterns/import_registry.py +1 -0
  246. exonware/xwsystem/patterns/object_pool.py +1 -0
  247. exonware/xwsystem/patterns/registry.py +4 -43
  248. exonware/xwsystem/plugins/__init__.py +2 -1
  249. exonware/xwsystem/plugins/base.py +6 -5
  250. exonware/xwsystem/plugins/contracts.py +94 -158
  251. exonware/xwsystem/plugins/defs.py +2 -1
  252. exonware/xwsystem/plugins/errors.py +2 -1
  253. exonware/xwsystem/py.typed +3 -0
  254. exonware/xwsystem/query/__init__.py +36 -0
  255. exonware/xwsystem/query/contracts.py +56 -0
  256. exonware/xwsystem/query/errors.py +22 -0
  257. exonware/xwsystem/query/registry.py +128 -0
  258. exonware/xwsystem/runtime/__init__.py +2 -1
  259. exonware/xwsystem/runtime/base.py +4 -3
  260. exonware/xwsystem/runtime/contracts.py +39 -60
  261. exonware/xwsystem/runtime/defs.py +2 -1
  262. exonware/xwsystem/runtime/env.py +11 -9
  263. exonware/xwsystem/runtime/errors.py +2 -1
  264. exonware/xwsystem/runtime/reflection.py +3 -2
  265. exonware/xwsystem/security/__init__.py +68 -11
  266. exonware/xwsystem/security/audit.py +167 -0
  267. exonware/xwsystem/security/base.py +121 -24
  268. exonware/xwsystem/security/contracts.py +91 -146
  269. exonware/xwsystem/security/crypto.py +17 -16
  270. exonware/xwsystem/security/defs.py +2 -1
  271. exonware/xwsystem/security/errors.py +2 -1
  272. exonware/xwsystem/security/facade.py +321 -0
  273. exonware/xwsystem/security/file_security.py +330 -0
  274. exonware/xwsystem/security/hazmat.py +11 -8
  275. exonware/xwsystem/security/monitor.py +372 -0
  276. exonware/xwsystem/security/path_validator.py +140 -18
  277. exonware/xwsystem/security/policy.py +357 -0
  278. exonware/xwsystem/security/resource_limits.py +1 -0
  279. exonware/xwsystem/security/validator.py +455 -0
  280. exonware/xwsystem/shared/__init__.py +14 -1
  281. exonware/xwsystem/shared/base.py +285 -2
  282. exonware/xwsystem/shared/contracts.py +415 -126
  283. exonware/xwsystem/shared/defs.py +2 -1
  284. exonware/xwsystem/shared/errors.py +2 -2
  285. exonware/xwsystem/shared/xwobject.py +316 -0
  286. exonware/xwsystem/structures/__init__.py +1 -0
  287. exonware/xwsystem/structures/base.py +3 -2
  288. exonware/xwsystem/structures/circular_detector.py +15 -14
  289. exonware/xwsystem/structures/contracts.py +53 -76
  290. exonware/xwsystem/structures/defs.py +2 -1
  291. exonware/xwsystem/structures/errors.py +2 -1
  292. exonware/xwsystem/structures/tree_walker.py +2 -1
  293. exonware/xwsystem/threading/__init__.py +21 -4
  294. exonware/xwsystem/threading/async_primitives.py +6 -5
  295. exonware/xwsystem/threading/base.py +3 -2
  296. exonware/xwsystem/threading/contracts.py +87 -143
  297. exonware/xwsystem/threading/defs.py +2 -1
  298. exonware/xwsystem/threading/errors.py +2 -1
  299. exonware/xwsystem/threading/facade.py +175 -0
  300. exonware/xwsystem/threading/locks.py +1 -0
  301. exonware/xwsystem/threading/safe_factory.py +1 -0
  302. exonware/xwsystem/utils/__init__.py +40 -0
  303. exonware/xwsystem/utils/base.py +22 -21
  304. exonware/xwsystem/utils/contracts.py +50 -73
  305. exonware/xwsystem/utils/dt/__init__.py +19 -3
  306. exonware/xwsystem/utils/dt/base.py +5 -4
  307. exonware/xwsystem/utils/dt/contracts.py +22 -29
  308. exonware/xwsystem/utils/dt/defs.py +2 -1
  309. exonware/xwsystem/utils/dt/errors.py +2 -5
  310. exonware/xwsystem/utils/dt/formatting.py +88 -2
  311. exonware/xwsystem/utils/dt/humanize.py +10 -9
  312. exonware/xwsystem/utils/dt/parsing.py +56 -5
  313. exonware/xwsystem/utils/dt/timezone_utils.py +2 -24
  314. exonware/xwsystem/utils/errors.py +2 -4
  315. exonware/xwsystem/utils/paths.py +1 -0
  316. exonware/xwsystem/utils/string.py +49 -0
  317. exonware/xwsystem/utils/test_runner.py +185 -0
  318. exonware/xwsystem/utils/utils_contracts.py +2 -1
  319. exonware/xwsystem/utils/web.py +110 -0
  320. exonware/xwsystem/validation/__init__.py +25 -1
  321. exonware/xwsystem/validation/base.py +6 -5
  322. exonware/xwsystem/validation/contracts.py +29 -41
  323. exonware/xwsystem/validation/data_validator.py +1 -0
  324. exonware/xwsystem/validation/declarative.py +11 -8
  325. exonware/xwsystem/validation/defs.py +2 -1
  326. exonware/xwsystem/validation/errors.py +2 -1
  327. exonware/xwsystem/validation/facade.py +198 -0
  328. exonware/xwsystem/validation/fluent_validator.py +22 -19
  329. exonware/xwsystem/validation/schema_discovery.py +210 -0
  330. exonware/xwsystem/validation/type_safety.py +2 -1
  331. exonware/xwsystem/version.py +2 -2
  332. {exonware_xwsystem-0.1.0.1.dist-info → exonware_xwsystem-0.1.0.4.dist-info}/METADATA +71 -4
  333. exonware_xwsystem-0.1.0.4.dist-info/RECORD +337 -0
  334. exonware/xwsystem/cli/__init__.py +0 -43
  335. exonware/xwsystem/cli/console.py +0 -113
  336. exonware/xwsystem/cli/defs.py +0 -134
  337. exonware/xwsystem/conf.py +0 -44
  338. exonware/xwsystem/security/auth.py +0 -484
  339. exonware_xwsystem-0.1.0.1.dist-info/RECORD +0 -284
  340. {exonware_xwsystem-0.1.0.1.dist-info → exonware_xwsystem-0.1.0.4.dist-info}/WHEEL +0 -0
  341. {exonware_xwsystem-0.1.0.1.dist-info → exonware_xwsystem-0.1.0.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env python3
2
+ #exonware/xwsystem/src/exonware/xwsystem/plugins/contracts.py
2
3
  """
3
4
  Company: eXonware.com
4
5
  Author: Eng. Muhammad AlShehri
5
6
  Email: connect@exonware.com
6
- Version: 0.1.0.1
7
+ Version: 0.1.0.4
7
8
  Generation Date: September 04, 2025
8
9
 
9
10
  Plugin protocol interfaces for XWSystem.
10
11
  """
11
12
 
12
- from abc import ABC, abstractmethod
13
- from typing import Any, Optional, Union, Iterator, Callable
13
+ from typing import Any, Optional, Iterator, Callable, Protocol, runtime_checkable
14
14
  import importlib
15
15
 
16
16
  # Import enums from types module
@@ -27,28 +27,26 @@ from .defs import (
27
27
  # PLUGIN INTERFACES
28
28
  # ============================================================================
29
29
 
30
- class IPlugin(ABC):
30
+ @runtime_checkable
31
+ class IPlugin(Protocol):
31
32
  """
32
33
  Interface for plugins.
33
34
 
34
35
  Enforces consistent plugin behavior across XWSystem.
35
36
  """
36
37
 
37
- @abstractmethod
38
38
  def initialize(self) -> None:
39
39
  """
40
40
  Initialize the plugin.
41
41
  """
42
- pass
42
+ ...
43
43
 
44
- @abstractmethod
45
44
  def shutdown(self) -> None:
46
45
  """
47
46
  Shutdown the plugin.
48
47
  """
49
- pass
48
+ ...
50
49
 
51
- @abstractmethod
52
50
  def get_info(self) -> dict[str, Any]:
53
51
  """
54
52
  Get plugin information.
@@ -56,9 +54,8 @@ class IPlugin(ABC):
56
54
  Returns:
57
55
  Plugin information dictionary
58
56
  """
59
- pass
57
+ ...
60
58
 
61
- @abstractmethod
62
59
  def is_enabled(self) -> bool:
63
60
  """
64
61
  Check if plugin is enabled.
@@ -66,23 +63,20 @@ class IPlugin(ABC):
66
63
  Returns:
67
64
  True if enabled
68
65
  """
69
- pass
66
+ ...
70
67
 
71
- @abstractmethod
72
68
  def enable(self) -> None:
73
69
  """
74
70
  Enable the plugin.
75
71
  """
76
- pass
72
+ ...
77
73
 
78
- @abstractmethod
79
74
  def disable(self) -> None:
80
75
  """
81
76
  Disable the plugin.
82
77
  """
83
- pass
78
+ ...
84
79
 
85
- @abstractmethod
86
80
  def get_state(self) -> PluginState:
87
81
  """
88
82
  Get plugin state.
@@ -90,9 +84,8 @@ class IPlugin(ABC):
90
84
  Returns:
91
85
  Current plugin state
92
86
  """
93
- pass
87
+ ...
94
88
 
95
- @abstractmethod
96
89
  def get_plugin_type(self) -> PluginType:
97
90
  """
98
91
  Get plugin type.
@@ -100,9 +93,8 @@ class IPlugin(ABC):
100
93
  Returns:
101
94
  Plugin type
102
95
  """
103
- pass
96
+ ...
104
97
 
105
- @abstractmethod
106
98
  def get_priority(self) -> PluginPriority:
107
99
  """
108
100
  Get plugin priority.
@@ -110,9 +102,8 @@ class IPlugin(ABC):
110
102
  Returns:
111
103
  Plugin priority
112
104
  """
113
- pass
105
+ ...
114
106
 
115
- @abstractmethod
116
107
  def get_dependencies(self) -> list[str]:
117
108
  """
118
109
  Get plugin dependencies.
@@ -120,9 +111,8 @@ class IPlugin(ABC):
120
111
  Returns:
121
112
  List of dependency names
122
113
  """
123
- pass
114
+ ...
124
115
 
125
- @abstractmethod
126
116
  def get_version(self) -> str:
127
117
  """
128
118
  Get plugin version.
@@ -130,9 +120,8 @@ class IPlugin(ABC):
130
120
  Returns:
131
121
  Plugin version string
132
122
  """
133
- pass
123
+ ...
134
124
 
135
- @abstractmethod
136
125
  def get_author(self) -> str:
137
126
  """
138
127
  Get plugin author.
@@ -140,9 +129,8 @@ class IPlugin(ABC):
140
129
  Returns:
141
130
  Plugin author
142
131
  """
143
- pass
132
+ ...
144
133
 
145
- @abstractmethod
146
134
  def get_description(self) -> str:
147
135
  """
148
136
  Get plugin description.
@@ -150,21 +138,21 @@ class IPlugin(ABC):
150
138
  Returns:
151
139
  Plugin description
152
140
  """
153
- pass
141
+ ...
154
142
 
155
143
 
156
144
  # ============================================================================
157
145
  # EXTENSIBLE INTERFACES
158
146
  # ============================================================================
159
147
 
160
- class IExtensible(ABC):
148
+ @runtime_checkable
149
+ class IExtensible(Protocol):
161
150
  """
162
151
  Interface for extensible objects.
163
152
 
164
153
  Enforces consistent extension behavior across XWSystem.
165
154
  """
166
155
 
167
- @abstractmethod
168
156
  def add_extension(self, extension: Any) -> bool:
169
157
  """
170
158
  Add extension.
@@ -175,9 +163,8 @@ class IExtensible(ABC):
175
163
  Returns:
176
164
  True if added successfully
177
165
  """
178
- pass
166
+ ...
179
167
 
180
- @abstractmethod
181
168
  def remove_extension(self, name: str) -> bool:
182
169
  """
183
170
  Remove extension by name.
@@ -188,9 +175,8 @@ class IExtensible(ABC):
188
175
  Returns:
189
176
  True if removed
190
177
  """
191
- pass
178
+ ...
192
179
 
193
- @abstractmethod
194
180
  def get_extensions(self) -> list[Any]:
195
181
  """
196
182
  Get all extensions.
@@ -198,9 +184,8 @@ class IExtensible(ABC):
198
184
  Returns:
199
185
  List of extensions
200
186
  """
201
- pass
187
+ ...
202
188
 
203
- @abstractmethod
204
189
  def get_extension(self, name: str) -> Optional[Any]:
205
190
  """
206
191
  Get extension by name.
@@ -211,9 +196,8 @@ class IExtensible(ABC):
211
196
  Returns:
212
197
  Extension or None
213
198
  """
214
- pass
199
+ ...
215
200
 
216
- @abstractmethod
217
201
  def has_extension(self, name: str) -> bool:
218
202
  """
219
203
  Check if extension exists.
@@ -224,9 +208,8 @@ class IExtensible(ABC):
224
208
  Returns:
225
209
  True if exists
226
210
  """
227
- pass
211
+ ...
228
212
 
229
- @abstractmethod
230
213
  def list_extension_names(self) -> list[str]:
231
214
  """
232
215
  List extension names.
@@ -234,16 +217,14 @@ class IExtensible(ABC):
234
217
  Returns:
235
218
  List of extension names
236
219
  """
237
- pass
220
+ ...
238
221
 
239
- @abstractmethod
240
222
  def clear_extensions(self) -> None:
241
223
  """
242
224
  Clear all extensions.
243
225
  """
244
- pass
226
+ ...
245
227
 
246
- @abstractmethod
247
228
  def get_extension_count(self) -> int:
248
229
  """
249
230
  Get number of extensions.
@@ -251,21 +232,21 @@ class IExtensible(ABC):
251
232
  Returns:
252
233
  Number of extensions
253
234
  """
254
- pass
235
+ ...
255
236
 
256
237
 
257
238
  # ============================================================================
258
239
  # HOOKABLE INTERFACES
259
240
  # ============================================================================
260
241
 
261
- class IHookable(ABC):
242
+ @runtime_checkable
243
+ class IHookable(Protocol):
262
244
  """
263
245
  Interface for hookable objects.
264
246
 
265
247
  Enforces consistent hook behavior across XWSystem.
266
248
  """
267
249
 
268
- @abstractmethod
269
250
  def add_hook(self, event: str, callback: Callable, hook_type: HookType = HookType.ACTION) -> str:
270
251
  """
271
252
  Add hook callback.
@@ -278,9 +259,8 @@ class IHookable(ABC):
278
259
  Returns:
279
260
  Hook ID
280
261
  """
281
- pass
262
+ ...
282
263
 
283
- @abstractmethod
284
264
  def remove_hook(self, event: str, callback: Callable) -> bool:
285
265
  """
286
266
  Remove hook callback.
@@ -292,9 +272,8 @@ class IHookable(ABC):
292
272
  Returns:
293
273
  True if removed
294
274
  """
295
- pass
275
+ ...
296
276
 
297
- @abstractmethod
298
277
  def trigger_hook(self, event: str, data: Any = None) -> Any:
299
278
  """
300
279
  Trigger hook event.
@@ -306,9 +285,8 @@ class IHookable(ABC):
306
285
  Returns:
307
286
  Hook result
308
287
  """
309
- pass
288
+ ...
310
289
 
311
- @abstractmethod
312
290
  def list_hooks(self, event: Optional[str] = None) -> list[dict[str, Any]]:
313
291
  """
314
292
  List hooks.
@@ -319,9 +297,8 @@ class IHookable(ABC):
319
297
  Returns:
320
298
  List of hook information
321
299
  """
322
- pass
300
+ ...
323
301
 
324
- @abstractmethod
325
302
  def has_hooks(self, event: str) -> bool:
326
303
  """
327
304
  Check if event has hooks.
@@ -332,9 +309,8 @@ class IHookable(ABC):
332
309
  Returns:
333
310
  True if has hooks
334
311
  """
335
- pass
312
+ ...
336
313
 
337
- @abstractmethod
338
314
  def clear_hooks(self, event: Optional[str] = None) -> None:
339
315
  """
340
316
  Clear hooks.
@@ -342,9 +318,8 @@ class IHookable(ABC):
342
318
  Args:
343
319
  event: Clear hooks for specific event, or all if None
344
320
  """
345
- pass
321
+ ...
346
322
 
347
- @abstractmethod
348
323
  def get_hook_count(self, event: Optional[str] = None) -> int:
349
324
  """
350
325
  Get hook count.
@@ -355,21 +330,21 @@ class IHookable(ABC):
355
330
  Returns:
356
331
  Number of hooks
357
332
  """
358
- pass
333
+ ...
359
334
 
360
335
 
361
336
  # ============================================================================
362
337
  # PLUGIN MANAGER INTERFACES
363
338
  # ============================================================================
364
339
 
365
- class IPluginManager(ABC):
340
+ @runtime_checkable
341
+ class IPluginManager(Protocol):
366
342
  """
367
343
  Interface for plugin management.
368
344
 
369
345
  Enforces consistent plugin management across XWSystem.
370
346
  """
371
347
 
372
- @abstractmethod
373
348
  def load_plugin(self, plugin_path: str) -> bool:
374
349
  """
375
350
  Load plugin from path.
@@ -380,9 +355,8 @@ class IPluginManager(ABC):
380
355
  Returns:
381
356
  True if loaded successfully
382
357
  """
383
- pass
358
+ ...
384
359
 
385
- @abstractmethod
386
360
  def unload_plugin(self, plugin_name: str) -> bool:
387
361
  """
388
362
  Unload plugin.
@@ -393,9 +367,8 @@ class IPluginManager(ABC):
393
367
  Returns:
394
368
  True if unloaded successfully
395
369
  """
396
- pass
370
+ ...
397
371
 
398
- @abstractmethod
399
372
  def reload_plugin(self, plugin_name: str) -> bool:
400
373
  """
401
374
  Reload plugin.
@@ -406,9 +379,8 @@ class IPluginManager(ABC):
406
379
  Returns:
407
380
  True if reloaded successfully
408
381
  """
409
- pass
382
+ ...
410
383
 
411
- @abstractmethod
412
384
  def get_plugin(self, plugin_name: str) -> Optional[IPlugin]:
413
385
  """
414
386
  Get plugin by name.
@@ -419,9 +391,8 @@ class IPluginManager(ABC):
419
391
  Returns:
420
392
  Plugin instance or None
421
393
  """
422
- pass
394
+ ...
423
395
 
424
- @abstractmethod
425
396
  def list_plugins(self) -> list[str]:
426
397
  """
427
398
  List all plugin names.
@@ -429,9 +400,8 @@ class IPluginManager(ABC):
429
400
  Returns:
430
401
  List of plugin names
431
402
  """
432
- pass
403
+ ...
433
404
 
434
- @abstractmethod
435
405
  def list_loaded_plugins(self) -> list[str]:
436
406
  """
437
407
  List loaded plugin names.
@@ -439,9 +409,8 @@ class IPluginManager(ABC):
439
409
  Returns:
440
410
  List of loaded plugin names
441
411
  """
442
- pass
412
+ ...
443
413
 
444
- @abstractmethod
445
414
  def is_plugin_loaded(self, plugin_name: str) -> bool:
446
415
  """
447
416
  Check if plugin is loaded.
@@ -452,9 +421,8 @@ class IPluginManager(ABC):
452
421
  Returns:
453
422
  True if loaded
454
423
  """
455
- pass
424
+ ...
456
425
 
457
- @abstractmethod
458
426
  def get_plugin_info(self, plugin_name: str) -> Optional[dict[str, Any]]:
459
427
  """
460
428
  Get plugin information.
@@ -465,21 +433,21 @@ class IPluginManager(ABC):
465
433
  Returns:
466
434
  Plugin information or None
467
435
  """
468
- pass
436
+ ...
469
437
 
470
438
 
471
439
  # ============================================================================
472
440
  # PLUGIN REGISTRY INTERFACES
473
441
  # ============================================================================
474
442
 
475
- class IPluginRegistry(ABC):
443
+ @runtime_checkable
444
+ class IPluginRegistry(Protocol):
476
445
  """
477
446
  Interface for plugin registry.
478
447
 
479
448
  Enforces consistent plugin registration across XWSystem.
480
449
  """
481
450
 
482
- @abstractmethod
483
451
  def register_plugin(self, plugin_class: type[IPlugin], name: str, priority: PluginPriority = PluginPriority.NORMAL) -> bool:
484
452
  """
485
453
  Register plugin class.
@@ -492,9 +460,8 @@ class IPluginRegistry(ABC):
492
460
  Returns:
493
461
  True if registered successfully
494
462
  """
495
- pass
463
+ ...
496
464
 
497
- @abstractmethod
498
465
  def unregister_plugin(self, name: str) -> bool:
499
466
  """
500
467
  Unregister plugin.
@@ -505,9 +472,8 @@ class IPluginRegistry(ABC):
505
472
  Returns:
506
473
  True if unregistered
507
474
  """
508
- pass
475
+ ...
509
476
 
510
- @abstractmethod
511
477
  def get_registered_plugins(self) -> dict[str, type[IPlugin]]:
512
478
  """
513
479
  Get all registered plugins.
@@ -515,9 +481,8 @@ class IPluginRegistry(ABC):
515
481
  Returns:
516
482
  Dictionary of registered plugins
517
483
  """
518
- pass
484
+ ...
519
485
 
520
- @abstractmethod
521
486
  def is_plugin_registered(self, name: str) -> bool:
522
487
  """
523
488
  Check if plugin is registered.
@@ -528,9 +493,8 @@ class IPluginRegistry(ABC):
528
493
  Returns:
529
494
  True if registered
530
495
  """
531
- pass
496
+ ...
532
497
 
533
- @abstractmethod
534
498
  def get_plugin_class(self, name: str) -> Optional[type[IPlugin]]:
535
499
  """
536
500
  Get plugin class by name.
@@ -541,16 +505,14 @@ class IPluginRegistry(ABC):
541
505
  Returns:
542
506
  Plugin class or None
543
507
  """
544
- pass
508
+ ...
545
509
 
546
- @abstractmethod
547
510
  def clear_registry(self) -> None:
548
511
  """
549
512
  Clear plugin registry.
550
513
  """
551
- pass
514
+ ...
552
515
 
553
- @abstractmethod
554
516
  def get_registry_stats(self) -> dict[str, Any]:
555
517
  """
556
518
  Get registry statistics.
@@ -558,21 +520,21 @@ class IPluginRegistry(ABC):
558
520
  Returns:
559
521
  Registry statistics dictionary
560
522
  """
561
- pass
523
+ ...
562
524
 
563
525
 
564
526
  # ============================================================================
565
527
  # PLUGIN DISCOVERY INTERFACES
566
528
  # ============================================================================
567
529
 
568
- class IPluginDiscovery(ABC):
530
+ @runtime_checkable
531
+ class IPluginDiscovery(Protocol):
569
532
  """
570
533
  Interface for plugin discovery.
571
534
 
572
535
  Enforces consistent plugin discovery across XWSystem.
573
536
  """
574
537
 
575
- @abstractmethod
576
538
  def discover_plugins(self, search_paths: list[str]) -> list[str]:
577
539
  """
578
540
  Discover plugins in search paths.
@@ -583,9 +545,8 @@ class IPluginDiscovery(ABC):
583
545
  Returns:
584
546
  List of discovered plugin paths
585
547
  """
586
- pass
548
+ ...
587
549
 
588
- @abstractmethod
589
550
  def scan_directory(self, directory: str) -> list[str]:
590
551
  """
591
552
  Scan directory for plugins.
@@ -596,9 +557,8 @@ class IPluginDiscovery(ABC):
596
557
  Returns:
597
558
  List of plugin files found
598
559
  """
599
- pass
560
+ ...
600
561
 
601
- @abstractmethod
602
562
  def validate_plugin(self, plugin_path: str) -> tuple[bool, list[str]]:
603
563
  """
604
564
  Validate plugin.
@@ -609,9 +569,8 @@ class IPluginDiscovery(ABC):
609
569
  Returns:
610
570
  Tuple of (is_valid, error_messages)
611
571
  """
612
- pass
572
+ ...
613
573
 
614
- @abstractmethod
615
574
  def get_plugin_metadata(self, plugin_path: str) -> Optional[dict[str, Any]]:
616
575
  """
617
576
  Get plugin metadata.
@@ -622,9 +581,8 @@ class IPluginDiscovery(ABC):
622
581
  Returns:
623
582
  Plugin metadata or None
624
583
  """
625
- pass
584
+ ...
626
585
 
627
- @abstractmethod
628
586
  def is_plugin_file(self, file_path: str) -> bool:
629
587
  """
630
588
  Check if file is a plugin.
@@ -635,9 +593,8 @@ class IPluginDiscovery(ABC):
635
593
  Returns:
636
594
  True if file is a plugin
637
595
  """
638
- pass
596
+ ...
639
597
 
640
- @abstractmethod
641
598
  def get_supported_extensions(self) -> list[str]:
642
599
  """
643
600
  Get supported plugin file extensions.
@@ -645,21 +602,21 @@ class IPluginDiscovery(ABC):
645
602
  Returns:
646
603
  List of supported extensions
647
604
  """
648
- pass
605
+ ...
649
606
 
650
607
 
651
608
  # ============================================================================
652
609
  # PLUGIN CONFIGURATION INTERFACES
653
610
  # ============================================================================
654
611
 
655
- class IPluginConfig(ABC):
612
+ @runtime_checkable
613
+ class IPluginConfig(Protocol):
656
614
  """
657
615
  Interface for plugin configuration.
658
616
 
659
617
  Enforces consistent plugin configuration across XWSystem.
660
618
  """
661
619
 
662
- @abstractmethod
663
620
  def get_plugin_config(self, plugin_name: str) -> dict[str, Any]:
664
621
  """
665
622
  Get plugin configuration.
@@ -670,9 +627,8 @@ class IPluginConfig(ABC):
670
627
  Returns:
671
628
  Plugin configuration dictionary
672
629
  """
673
- pass
630
+ ...
674
631
 
675
- @abstractmethod
676
632
  def set_plugin_config(self, plugin_name: str, config: dict[str, Any]) -> None:
677
633
  """
678
634
  Set plugin configuration.
@@ -681,9 +637,8 @@ class IPluginConfig(ABC):
681
637
  plugin_name: Plugin name
682
638
  config: Configuration dictionary
683
639
  """
684
- pass
640
+ ...
685
641
 
686
- @abstractmethod
687
642
  def update_plugin_config(self, plugin_name: str, key: str, value: Any) -> None:
688
643
  """
689
644
  Update plugin configuration value.
@@ -693,9 +648,8 @@ class IPluginConfig(ABC):
693
648
  key: Configuration key
694
649
  value: Configuration value
695
650
  """
696
- pass
651
+ ...
697
652
 
698
- @abstractmethod
699
653
  def get_plugin_config_value(self, plugin_name: str, key: str, default: Any = None) -> Any:
700
654
  """
701
655
  Get plugin configuration value.
@@ -708,9 +662,8 @@ class IPluginConfig(ABC):
708
662
  Returns:
709
663
  Configuration value or default
710
664
  """
711
- pass
665
+ ...
712
666
 
713
- @abstractmethod
714
667
  def has_plugin_config(self, plugin_name: str, key: str) -> bool:
715
668
  """
716
669
  Check if plugin has configuration key.
@@ -722,9 +675,8 @@ class IPluginConfig(ABC):
722
675
  Returns:
723
676
  True if key exists
724
677
  """
725
- pass
678
+ ...
726
679
 
727
- @abstractmethod
728
680
  def remove_plugin_config(self, plugin_name: str, key: str) -> bool:
729
681
  """
730
682
  Remove plugin configuration key.
@@ -736,9 +688,8 @@ class IPluginConfig(ABC):
736
688
  Returns:
737
689
  True if removed
738
690
  """
739
- pass
691
+ ...
740
692
 
741
- @abstractmethod
742
693
  def clear_plugin_config(self, plugin_name: str) -> None:
743
694
  """
744
695
  Clear plugin configuration.
@@ -746,9 +697,8 @@ class IPluginConfig(ABC):
746
697
  Args:
747
698
  plugin_name: Plugin name
748
699
  """
749
- pass
700
+ ...
750
701
 
751
- @abstractmethod
752
702
  def save_plugin_config(self, plugin_name: str, file_path: str) -> bool:
753
703
  """
754
704
  Save plugin configuration to file.
@@ -760,9 +710,8 @@ class IPluginConfig(ABC):
760
710
  Returns:
761
711
  True if saved successfully
762
712
  """
763
- pass
713
+ ...
764
714
 
765
- @abstractmethod
766
715
  def load_plugin_config(self, plugin_name: str, file_path: str) -> bool:
767
716
  """
768
717
  Load plugin configuration from file.
@@ -774,21 +723,21 @@ class IPluginConfig(ABC):
774
723
  Returns:
775
724
  True if loaded successfully
776
725
  """
777
- pass
726
+ ...
778
727
 
779
728
 
780
729
  # ============================================================================
781
730
  # PLUGIN EVENTS INTERFACES
782
731
  # ============================================================================
783
732
 
784
- class IPluginEvents(ABC):
733
+ @runtime_checkable
734
+ class IPluginEvents(Protocol):
785
735
  """
786
736
  Interface for plugin events.
787
737
 
788
738
  Enforces consistent plugin event handling across XWSystem.
789
739
  """
790
740
 
791
- @abstractmethod
792
741
  def emit_event(self, event: PluginEvent, plugin_name: str, data: Any = None) -> None:
793
742
  """
794
743
  Emit plugin event.
@@ -798,9 +747,8 @@ class IPluginEvents(ABC):
798
747
  plugin_name: Plugin name
799
748
  data: Event data
800
749
  """
801
- pass
750
+ ...
802
751
 
803
- @abstractmethod
804
752
  def subscribe_to_event(self, event: PluginEvent, callback: Callable) -> str:
805
753
  """
806
754
  Subscribe to plugin event.
@@ -812,9 +760,8 @@ class IPluginEvents(ABC):
812
760
  Returns:
813
761
  Subscription ID
814
762
  """
815
- pass
763
+ ...
816
764
 
817
- @abstractmethod
818
765
  def unsubscribe_from_event(self, subscription_id: str) -> bool:
819
766
  """
820
767
  Unsubscribe from plugin event.
@@ -825,9 +772,8 @@ class IPluginEvents(ABC):
825
772
  Returns:
826
773
  True if unsubscribed
827
774
  """
828
- pass
775
+ ...
829
776
 
830
- @abstractmethod
831
777
  def get_event_subscribers(self, event: PluginEvent) -> list[Callable]:
832
778
  """
833
779
  Get event subscribers.
@@ -838,9 +784,8 @@ class IPluginEvents(ABC):
838
784
  Returns:
839
785
  List of subscriber callbacks
840
786
  """
841
- pass
787
+ ...
842
788
 
843
- @abstractmethod
844
789
  def clear_event_subscribers(self, event: Optional[PluginEvent] = None) -> None:
845
790
  """
846
791
  Clear event subscribers.
@@ -848,9 +793,8 @@ class IPluginEvents(ABC):
848
793
  Args:
849
794
  event: Clear subscribers for specific event, or all if None
850
795
  """
851
- pass
796
+ ...
852
797
 
853
- @abstractmethod
854
798
  def get_event_history(self, event: Optional[PluginEvent] = None, limit: int = 100) -> list[dict[str, Any]]:
855
799
  """
856
800
  Get event history.
@@ -862,28 +806,27 @@ class IPluginEvents(ABC):
862
806
  Returns:
863
807
  List of event history entries
864
808
  """
865
- pass
809
+ ...
866
810
 
867
- @abstractmethod
868
811
  def clear_event_history(self) -> None:
869
812
  """
870
813
  Clear event history.
871
814
  """
872
- pass
815
+ ...
873
816
 
874
817
 
875
818
  # ============================================================================
876
819
  # PLUGIN DEPENDENCY INTERFACES
877
820
  # ============================================================================
878
821
 
879
- class IPluginDependency(ABC):
822
+ @runtime_checkable
823
+ class IPluginDependency(Protocol):
880
824
  """
881
825
  Interface for plugin dependency management.
882
826
 
883
827
  Enforces consistent plugin dependency handling across XWSystem.
884
828
  """
885
829
 
886
- @abstractmethod
887
830
  def add_dependency(self, plugin_name: str, dependency: str, version: Optional[str] = None) -> None:
888
831
  """
889
832
  Add plugin dependency.
@@ -893,9 +836,8 @@ class IPluginDependency(ABC):
893
836
  dependency: Dependency name
894
837
  version: Required version
895
838
  """
896
- pass
839
+ ...
897
840
 
898
- @abstractmethod
899
841
  def remove_dependency(self, plugin_name: str, dependency: str) -> bool:
900
842
  """
901
843
  Remove plugin dependency.
@@ -907,9 +849,8 @@ class IPluginDependency(ABC):
907
849
  Returns:
908
850
  True if removed
909
851
  """
910
- pass
852
+ ...
911
853
 
912
- @abstractmethod
913
854
  def get_dependencies(self, plugin_name: str) -> list[dict[str, Any]]:
914
855
  """
915
856
  Get plugin dependencies.
@@ -920,9 +861,8 @@ class IPluginDependency(ABC):
920
861
  Returns:
921
862
  List of dependency information
922
863
  """
923
- pass
864
+ ...
924
865
 
925
- @abstractmethod
926
866
  def check_dependencies(self, plugin_name: str) -> tuple[bool, list[str]]:
927
867
  """
928
868
  Check if plugin dependencies are satisfied.
@@ -933,9 +873,8 @@ class IPluginDependency(ABC):
933
873
  Returns:
934
874
  Tuple of (all_satisfied, missing_dependencies)
935
875
  """
936
- pass
876
+ ...
937
877
 
938
- @abstractmethod
939
878
  def resolve_dependencies(self, plugin_name: str) -> list[str]:
940
879
  """
941
880
  Resolve plugin dependency order.
@@ -946,9 +885,8 @@ class IPluginDependency(ABC):
946
885
  Returns:
947
886
  List of plugins in dependency order
948
887
  """
949
- pass
888
+ ...
950
889
 
951
- @abstractmethod
952
890
  def get_dependents(self, plugin_name: str) -> list[str]:
953
891
  """
954
892
  Get plugins that depend on this plugin.
@@ -959,9 +897,8 @@ class IPluginDependency(ABC):
959
897
  Returns:
960
898
  List of dependent plugin names
961
899
  """
962
- pass
900
+ ...
963
901
 
964
- @abstractmethod
965
902
  def has_circular_dependency(self, plugin_name: str) -> bool:
966
903
  """
967
904
  Check for circular dependencies.
@@ -972,9 +909,8 @@ class IPluginDependency(ABC):
972
909
  Returns:
973
910
  True if circular dependency exists
974
911
  """
975
- pass
912
+ ...
976
913
 
977
- @abstractmethod
978
914
  def get_dependency_graph(self) -> dict[str, list[str]]:
979
915
  """
980
916
  Get plugin dependency graph.
@@ -982,4 +918,4 @@ class IPluginDependency(ABC):
982
918
  Returns:
983
919
  Dependency graph dictionary
984
920
  """
985
- pass
921
+ ...