echotools 2.3.8__tar.gz → 2.3.10__tar.gz

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 (199) hide show
  1. {echotools-2.3.8 → echotools-2.3.10}/PKG-INFO +1 -1
  2. {echotools-2.3.8 → echotools-2.3.10}/pyproject.toml +1 -1
  3. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/__init__.py +3 -0
  4. echotools-2.3.10/src/echotools/compat.py +83 -0
  5. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/selector.py +3 -1
  6. echotools-2.3.10/src/echotools/exec/terminal/session/__init__.py +20 -0
  7. {echotools-2.3.8 → echotools-2.3.10}/src/echotools.egg-info/PKG-INFO +1 -1
  8. {echotools-2.3.8 → echotools-2.3.10}/src/echotools.egg-info/SOURCES.txt +1 -21
  9. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_entml_protocol.py +68 -0
  10. echotools-2.3.8/src/echotools/exec/terminal/session/__init__.py +0 -7
  11. echotools-2.3.8/src/echotools/fncall/__init__.py +0 -1
  12. echotools-2.3.8/src/echotools/fncall/parsers/__init__.py +0 -1
  13. echotools-2.3.8/src/echotools/fncall/parsers/stream.py +0 -1
  14. echotools-2.3.8/src/echotools/fncall/parsers/xml_parser.py +0 -1
  15. echotools-2.3.8/src/echotools/fncall/prompt/__init__.py +0 -1
  16. echotools-2.3.8/src/echotools/fncall/prompt/history.py +0 -1
  17. echotools-2.3.8/src/echotools/fncall/prompt/inject.py +0 -1
  18. echotools-2.3.8/src/echotools/fncall/prompt/templates.py +0 -1
  19. echotools-2.3.8/src/echotools/fncall/protocols/__init__.py +0 -1
  20. echotools-2.3.8/src/echotools/fncall/protocols/entml.py +0 -1
  21. echotools-2.3.8/src/echotools/fncall/registry.py +0 -1
  22. echotools-2.3.8/src/echotools/fncall/shared/__init__.py +0 -1
  23. echotools-2.3.8/src/echotools/fncall/shared/coercion.py +0 -1
  24. echotools-2.3.8/src/echotools/fncall/shared/loop_detect.py +0 -1
  25. echotools-2.3.8/src/echotools/fncall/shared/normalization.py +0 -1
  26. echotools-2.3.8/src/echotools/fncall/shared/xml_helpers.py +0 -1
  27. echotools-2.3.8/src/echotools/logger/__init__.py +0 -1
  28. echotools-2.3.8/src/echotools/logger/manager.py +0 -1
  29. echotools-2.3.8/src/echotools/protocol/__init__.py +0 -1
  30. echotools-2.3.8/src/echotools/protocol/base.py +0 -1
  31. echotools-2.3.8/src/echotools/py.typed +0 -0
  32. {echotools-2.3.8 → echotools-2.3.10}/README.md +0 -0
  33. {echotools-2.3.8 → echotools-2.3.10}/docs/README.md +0 -0
  34. {echotools-2.3.8 → echotools-2.3.10}/setup.cfg +0 -0
  35. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/cache/__init__.py +0 -0
  36. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/cache/list_cache.py +0 -0
  37. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/cache/memory_cache.py +0 -0
  38. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/__init__.py +0 -0
  39. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/base.py +0 -0
  40. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/center.py +0 -0
  41. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/center_notify.py +0 -0
  42. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/center_template.py +0 -0
  43. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/loader.py +0 -0
  44. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/config/merge.py +0 -0
  45. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/errors/__init__.py +0 -0
  46. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/errors/base.py +0 -0
  47. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/errors/classify.py +0 -0
  48. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/errors/common.py +0 -0
  49. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/errors/http.py +0 -0
  50. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/ids/__init__.py +0 -0
  51. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/ids/generator.py +0 -0
  52. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/io/__init__.py +0 -0
  53. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/io/io_utils.py +0 -0
  54. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/io/printstream.py +0 -0
  55. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/logger/__init__.py +0 -0
  56. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/logger/manager.py +0 -0
  57. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/retry/__init__.py +0 -0
  58. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/base/retry/retry.py +0 -0
  59. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/__init__.py +0 -0
  60. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/candidate.py +0 -0
  61. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/dispatcher.py +0 -0
  62. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/proxy_selector.py +0 -0
  63. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/race.py +0 -0
  64. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/dispatch/usage.py +0 -0
  65. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/__init__.py +0 -0
  66. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/parsers/__init__.py +0 -0
  67. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/parsers/stream.py +0 -0
  68. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/parsers/xml_params.py +0 -0
  69. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/parsers/xml_parser.py +0 -0
  70. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/prompt/__init__.py +0 -0
  71. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/prompt/history.py +0 -0
  72. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/prompt/history_format.py +0 -0
  73. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/prompt/inject.py +0 -0
  74. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/prompt/prompt_helpers.py +0 -0
  75. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/prompt/templates.py +0 -0
  76. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/protocols/__init__.py +0 -0
  77. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/protocols/entml.py +0 -0
  78. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/protocols/entml_invoke.py +0 -0
  79. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/protocols/entml_patterns.py +0 -0
  80. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/protocols/entml_thinking.py +0 -0
  81. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/protocols/entml_values.py +0 -0
  82. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/registry.py +0 -0
  83. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/shared/__init__.py +0 -0
  84. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/shared/coercion.py +0 -0
  85. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/shared/loop_detect.py +0 -0
  86. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/shared/normalization.py +0 -0
  87. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/shared/schema_render.py +0 -0
  88. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/fncall/shared/xml_helpers.py +0 -0
  89. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/keys.py +0 -0
  90. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/lifecycle/__init__.py +0 -0
  91. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/lifecycle/manager.py +0 -0
  92. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/lifecycle/updater.py +0 -0
  93. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/lifecycle/updater_pull.py +0 -0
  94. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/process/__init__.py +0 -0
  95. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/process/port.py +0 -0
  96. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/protocol/__init__.py +0 -0
  97. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/protocol/base.py +0 -0
  98. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/__init__.py +0 -0
  99. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/conpty.py +0 -0
  100. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/local/__init__.py +0 -0
  101. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/local/core.py +0 -0
  102. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/local/proc.py +0 -0
  103. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/local/unix.py +0 -0
  104. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/local/win.py +0 -0
  105. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/sanitize.py +0 -0
  106. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/session/base.py +0 -0
  107. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/session/client.py +0 -0
  108. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/ssh.py +0 -0
  109. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/exec/terminal/tmux.py +0 -0
  110. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/events/__init__.py +0 -0
  111. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/events/bus.py +0 -0
  112. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/events/event.py +0 -0
  113. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/spinner/__init__.py +0 -0
  114. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/spinner/spinner.py +0 -0
  115. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/spinner/spinner_color.py +0 -0
  116. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/tracing/__init__.py +0 -0
  117. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/tracing/context.py +0 -0
  118. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/tracing/span.py +0 -0
  119. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/tracing/tracer.py +0 -0
  120. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/translate.py +0 -0
  121. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/watcher/__init__.py +0 -0
  122. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/watcher/file_watcher.py +0 -0
  123. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/__init__.py +0 -0
  124. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/application.py +0 -0
  125. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/broker.py +0 -0
  126. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/app.js +0 -0
  127. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/filezone.js +0 -0
  128. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/motionkit.js +0 -0
  129. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/sendbutton.js +0 -0
  130. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/sortablelist.css +0 -0
  131. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/sortablelist.js +0 -0
  132. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/textinput.js +0 -0
  133. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/components/voiceinput.js +0 -0
  134. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/fonts/inter-500.woff2 +0 -0
  135. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/fonts/inter-600.woff2 +0 -0
  136. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/fonts/inter400.woff2 +0 -0
  137. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/fonts/tailwind.css +0 -0
  138. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/inputbox.css +0 -0
  139. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/inputbox.js +0 -0
  140. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/style.css +0 -0
  141. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/input_box/voicegif.js +0 -0
  142. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/middleware.py +0 -0
  143. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/stats.py +0 -0
  144. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/media/web/utils.py +0 -0
  145. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/files/__init__.py +0 -0
  146. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/files/file_util.py +0 -0
  147. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/network/__init__.py +0 -0
  148. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/network/http_utils.py +0 -0
  149. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/plugin/__init__.py +0 -0
  150. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/plugin/base.py +0 -0
  151. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/plugin/discovery.py +0 -0
  152. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/plugin/registry.py +0 -0
  153. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/plugin/registry_ops.py +0 -0
  154. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/proxy/__init__.py +0 -0
  155. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/proxy/manager.py +0 -0
  156. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/runtime/__init__.py +0 -0
  157. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/runtime/collector.py +0 -0
  158. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/scheduler/__init__.py +0 -0
  159. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/scheduler/scheduler.py +0 -0
  160. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/sdk/__init__.py +0 -0
  161. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/plat/sdk/facade.py +0 -0
  162. {echotools-2.3.8 → echotools-2.3.10}/src/echotools/version.py +0 -0
  163. {echotools-2.3.8 → echotools-2.3.10}/src/echotools.egg-info/dependency_links.txt +0 -0
  164. {echotools-2.3.8 → echotools-2.3.10}/src/echotools.egg-info/requires.txt +0 -0
  165. {echotools-2.3.8 → echotools-2.3.10}/src/echotools.egg-info/top_level.txt +0 -0
  166. {echotools-2.3.8 → echotools-2.3.10}/src/tests/bench_import.py +0 -0
  167. {echotools-2.3.8 → echotools-2.3.10}/src/tests/conftest.py +0 -0
  168. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_cache_retry.py +0 -0
  169. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_completion.py +0 -0
  170. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_config.py +0 -0
  171. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_config_extended.py +0 -0
  172. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_coverage_core.py +0 -0
  173. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_dispatch.py +0 -0
  174. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_dispatch_extended.py +0 -0
  175. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_dispatch_race.py +0 -0
  176. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_errors.py +0 -0
  177. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_errors_common.py +0 -0
  178. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_events.py +0 -0
  179. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_events_event.py +0 -0
  180. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_facade.py +0 -0
  181. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_fncall.py +0 -0
  182. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_ids.py +0 -0
  183. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_imports.py +0 -0
  184. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_io.py +0 -0
  185. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_keys.py +0 -0
  186. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_lifecycle.py +0 -0
  187. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_logger.py +0 -0
  188. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_merge.py +0 -0
  189. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_plugin.py +0 -0
  190. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_printstream.py +0 -0
  191. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_protocols.py +0 -0
  192. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_proxy.py +0 -0
  193. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_proxy_selector.py +0 -0
  194. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_runtime.py +0 -0
  195. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_scheduler.py +0 -0
  196. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_tracing.py +0 -0
  197. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_usage.py +0 -0
  198. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_web.py +0 -0
  199. {echotools-2.3.8 → echotools-2.3.10}/src/tests/test_web_broker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: echotools
3
- Version: 2.3.8
3
+ Version: 2.3.10
4
4
  Summary: 通用基础设施 SDK:配置、日志、事件、调度、插件、协议、调用链
5
5
  Author: nichengfuben
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "echotools"
7
- version = "2.3.8"
7
+ version = "2.3.10"
8
8
  description = "通用基础设施 SDK:配置、日志、事件、调度、插件、协议、调用链"
9
9
  readme = "docs/README.md"
10
10
  requires-python = ">=3.8"
@@ -10,6 +10,9 @@ from typing import Any
10
10
 
11
11
  from echotools.version import get_version
12
12
  from echotools.plat.sdk import EchoTools
13
+ from echotools.compat import install_compat_aliases
14
+
15
+ install_compat_aliases()
13
16
 
14
17
  __version__ = get_version()
15
18
 
@@ -0,0 +1,83 @@
1
+ from __future__ import annotations
2
+
3
+ """Backward-compatible import aliases for pre-2.3.9 module paths."""
4
+
5
+ import importlib
6
+ import importlib.abc
7
+ import importlib.util
8
+ import sys
9
+ from types import ModuleType
10
+ from typing import Dict, Optional
11
+
12
+ _MODULE_ALIASES: Dict[str, str] = {
13
+ "echotools.cache": "echotools.base.cache",
14
+ "echotools.config": "echotools.base.config",
15
+ "echotools.dispatch": "echotools.exec.dispatch",
16
+ "echotools.files": "echotools.plat.files",
17
+ "echotools.fncall": "echotools.exec.fncall",
18
+ "echotools.ids": "echotools.base.ids",
19
+ "echotools.io": "echotools.base.io",
20
+ "echotools.lifecycle": "echotools.exec.lifecycle",
21
+ "echotools.logger": "echotools.base.logger",
22
+ "echotools.plugin": "echotools.plat.plugin",
23
+ "echotools.process": "echotools.exec.process",
24
+ "echotools.protocol": "echotools.exec.protocol",
25
+ "echotools.proxy": "echotools.plat.proxy",
26
+ "echotools.retry": "echotools.base.retry",
27
+ "echotools.scheduler": "echotools.plat.scheduler",
28
+ "echotools.terminal": "echotools.exec.terminal",
29
+ "echotools.web": "echotools.media.web",
30
+ "echotools.events": "echotools.media.events",
31
+ "echotools.spinner": "echotools.media.spinner",
32
+ "echotools.tracing": "echotools.media.tracing",
33
+ "echotools.translate": "echotools.media.translate",
34
+ "echotools.watcher": "echotools.media.watcher",
35
+ "echotools.network": "echotools.plat.network",
36
+ "echotools.runtime": "echotools.plat.runtime",
37
+ "echotools.sdk": "echotools.plat.sdk",
38
+ "echotools.keys": "echotools.exec.keys",
39
+ }
40
+
41
+
42
+ def _map_name(fullname: str) -> Optional[str]:
43
+ for old, new in _MODULE_ALIASES.items():
44
+ if fullname == old or fullname.startswith(old + "."):
45
+ return new + fullname[len(old) :]
46
+ return None
47
+
48
+
49
+ class _AliasLoader(importlib.abc.Loader):
50
+ def __init__(self, fullname: str, target: str) -> None:
51
+ self._fullname = fullname
52
+ self._target = target
53
+
54
+ def create_module(self, spec: importlib.machinery.ModuleSpec) -> Optional[ModuleType]:
55
+ return None
56
+
57
+ def exec_module(self, module: ModuleType) -> None:
58
+ target = importlib.import_module(self._target)
59
+ module.__dict__.update(target.__dict__)
60
+ module.__name__ = self._fullname
61
+ module.__package__ = self._fullname.rpartition(".")[0]
62
+ sys.modules[self._fullname] = module
63
+
64
+
65
+ class _AliasFinder(importlib.abc.MetaPathFinder):
66
+ def find_spec(
67
+ self,
68
+ fullname: str,
69
+ path: Optional[list[str]],
70
+ target: Optional[ModuleType] = None,
71
+ ) -> Optional[importlib.machinery.ModuleSpec]:
72
+ mapped = _map_name(fullname)
73
+ if mapped is None:
74
+ return None
75
+ return importlib.util.spec_from_loader(
76
+ fullname,
77
+ _AliasLoader(fullname, mapped),
78
+ )
79
+
80
+
81
+ def install_compat_aliases() -> None:
82
+ if not any(isinstance(finder, _AliasFinder) for finder in sys.meta_path):
83
+ sys.meta_path.insert(0, _AliasFinder())
@@ -28,6 +28,8 @@ from echotools.base.logger.manager import get_logger
28
28
 
29
29
  __all__ = ["AdaptiveSelector", "TASRecord"]
30
30
 
31
+ _DEFAULT_DISPATCH_PERSIST = str(Path.home() / ".echotools" / "dispatch")
32
+
31
33
  logger = get_logger(__name__)
32
34
 
33
35
 
@@ -156,7 +158,7 @@ class AdaptiveSelector:
156
158
 
157
159
  def __init__(
158
160
  self,
159
- persist_dir: str = "persist/dispatch",
161
+ persist_dir: str = _DEFAULT_DISPATCH_PERSIST,
160
162
  group_attr: str = "group",
161
163
  *,
162
164
  flush_debounce: float = 1.0,
@@ -0,0 +1,20 @@
1
+ """Terminal session base and client attachment mixins."""
2
+ from __future__ import annotations
3
+
4
+ from .base import (
5
+ MAX_HISTORY_LINES,
6
+ MAX_OFFLINE_BUFFER_BYTES,
7
+ MAX_SEQ_RING_BYTES,
8
+ TerminalCallback,
9
+ TerminalSession,
10
+ )
11
+ from .client import SessionClientMixin
12
+
13
+ __all__ = [
14
+ "TerminalCallback",
15
+ "TerminalSession",
16
+ "SessionClientMixin",
17
+ "MAX_OFFLINE_BUFFER_BYTES",
18
+ "MAX_SEQ_RING_BYTES",
19
+ "MAX_HISTORY_LINES",
20
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: echotools
3
- Version: 2.3.8
3
+ Version: 2.3.10
4
4
  Summary: 通用基础设施 SDK:配置、日志、事件、调度、插件、协议、调用链
5
5
  Author: nichengfuben
6
6
  License: MIT
@@ -2,7 +2,7 @@ README.md
2
2
  pyproject.toml
3
3
  docs/README.md
4
4
  src/echotools/__init__.py
5
- src/echotools/py.typed
5
+ src/echotools/compat.py
6
6
  src/echotools/version.py
7
7
  src/echotools.egg-info/PKG-INFO
8
8
  src/echotools.egg-info/SOURCES.txt
@@ -86,24 +86,6 @@ src/echotools/exec/terminal/local/win.py
86
86
  src/echotools/exec/terminal/session/__init__.py
87
87
  src/echotools/exec/terminal/session/base.py
88
88
  src/echotools/exec/terminal/session/client.py
89
- src/echotools/fncall/__init__.py
90
- src/echotools/fncall/registry.py
91
- src/echotools/fncall/parsers/__init__.py
92
- src/echotools/fncall/parsers/stream.py
93
- src/echotools/fncall/parsers/xml_parser.py
94
- src/echotools/fncall/prompt/__init__.py
95
- src/echotools/fncall/prompt/history.py
96
- src/echotools/fncall/prompt/inject.py
97
- src/echotools/fncall/prompt/templates.py
98
- src/echotools/fncall/protocols/__init__.py
99
- src/echotools/fncall/protocols/entml.py
100
- src/echotools/fncall/shared/__init__.py
101
- src/echotools/fncall/shared/coercion.py
102
- src/echotools/fncall/shared/loop_detect.py
103
- src/echotools/fncall/shared/normalization.py
104
- src/echotools/fncall/shared/xml_helpers.py
105
- src/echotools/logger/__init__.py
106
- src/echotools/logger/manager.py
107
89
  src/echotools/media/translate.py
108
90
  src/echotools/media/events/__init__.py
109
91
  src/echotools/media/events/bus.py
@@ -156,8 +138,6 @@ src/echotools/plat/scheduler/__init__.py
156
138
  src/echotools/plat/scheduler/scheduler.py
157
139
  src/echotools/plat/sdk/__init__.py
158
140
  src/echotools/plat/sdk/facade.py
159
- src/echotools/protocol/__init__.py
160
- src/echotools/protocol/base.py
161
141
  src/tests/bench_import.py
162
142
  src/tests/conftest.py
163
143
  src/tests/test_cache_retry.py
@@ -108,6 +108,74 @@ def test_coerce_entml_parameter_value(raw, schema, expected) -> None:
108
108
  assert coerce_entml_parameter_value(raw, schema) == expected
109
109
 
110
110
 
111
+ def test_entml_instruction_matches_spec_format() -> None:
112
+ """示范格式:<entml:function_calls> + <entml:invoke> + <entml:parameter>."""
113
+ proto = get_protocol("entml")
114
+ from echotools.exec.fncall.shared.normalization import format_tool_descs
115
+
116
+ tools = [
117
+ {
118
+ "type": "function",
119
+ "function": {
120
+ "name": "ask_user_input_v0",
121
+ "description": "Ask user",
122
+ "parameters": {
123
+ "type": "object",
124
+ "properties": {
125
+ "question": {"type": "string"},
126
+ "options": {
127
+ "type": "array",
128
+ "items": {"type": "string"},
129
+ },
130
+ },
131
+ "required": ["question"],
132
+ },
133
+ },
134
+ }
135
+ ]
136
+ prompt = proto.render_prompt(
137
+ tool_descs=format_tool_descs(tools),
138
+ lang="en",
139
+ current_user_message="pick one",
140
+ )
141
+ assert "<entml:function_calls>" in prompt
142
+ assert '<entml:invoke name="' in prompt
143
+ assert '<entml:parameter name="' in prompt
144
+ assert "String and scalar parameters should be specified as-is" in prompt
145
+ assert "<entml:conversation_history>" not in prompt
146
+ assert "<entml:history>" not in prompt
147
+ assert "<entml:thinking_mode>" not in prompt
148
+
149
+
150
+ def test_entml_roundtrip_parameter_format() -> None:
151
+ """渲染与解析均使用 <entml:parameter name=\"...\">。"""
152
+ from echotools.exec.fncall.protocols.entml_invoke import format_entml_tool_calls
153
+
154
+ sample_calls = [
155
+ {
156
+ "id": "call_0000",
157
+ "type": "function",
158
+ "function": {
159
+ "name": "search",
160
+ "arguments": json.dumps(
161
+ {"query": "hello", "limit": 3, "tags": ["a", "b"]}
162
+ ),
163
+ },
164
+ }
165
+ ]
166
+ rendered = format_entml_tool_calls(sample_calls)
167
+ assert '<entml:parameter name="query">hello</entml:parameter>' in rendered
168
+ assert '<entml:parameter name="limit">3</entml:parameter>' in rendered
169
+ assert '<entml:parameter name="tags">["a", "b"]</entml:parameter>' in rendered
170
+ assert "<parameter name=" not in rendered
171
+
172
+ parsed = parse_entml_tool_calls(rendered, None, None)
173
+ args = json.loads(parsed[0]["function"]["arguments"])
174
+ assert args["query"] == "hello"
175
+ assert args["limit"] == 3
176
+ assert args["tags"] == ["a", "b"]
177
+
178
+
111
179
  def test_entml_parse_schema_coercion() -> None:
112
180
  tools = [
113
181
  {
@@ -1,7 +0,0 @@
1
- """Terminal session base and client attachment mixins."""
2
- from __future__ import annotations
3
-
4
- from .base import TerminalCallback, TerminalSession
5
- from .client import SessionClientMixin
6
-
7
- __all__ = ["TerminalCallback", "TerminalSession", "SessionClientMixin"]
@@ -1 +0,0 @@
1
- from echotools.exec.fncall import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.parsers import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.parsers.stream import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.parsers.xml_parser import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.prompt import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.prompt.history import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.prompt.inject import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.prompt.templates import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.protocols import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.protocols.entml import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.registry import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.shared import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.shared.coercion import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.shared.loop_detect import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.shared.normalization import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.fncall.shared.xml_helpers import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.base.logger.manager import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.base.logger.manager import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.protocol.base import * # noqa: F403
@@ -1 +0,0 @@
1
- from echotools.exec.protocol.base import * # noqa: F403
File without changes
File without changes
File without changes
File without changes