echotools 2.4.0__tar.gz → 2.4.2__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.
- {echotools-2.4.0 → echotools-2.4.2}/PKG-INFO +195 -195
- {echotools-2.4.0 → echotools-2.4.2}/README.md +139 -139
- {echotools-2.4.0 → echotools-2.4.2}/pyproject.toml +153 -153
- {echotools-2.4.0 → echotools-2.4.2}/setup.cfg +8 -8
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/__init__.py +212 -212
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/cache/__init__.py +8 -8
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/cache/list_cache.py +155 -155
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/cache/memory_cache.py +74 -74
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/__init__.py +23 -23
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/base.py +155 -155
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/center.py +285 -285
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/center_notify.py +39 -39
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/center_template.py +142 -142
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/loader.py +138 -138
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/errors/__init__.py +49 -49
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/errors/base.py +32 -32
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/errors/classify.py +79 -79
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/errors/common.py +74 -74
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/errors/http.py +126 -126
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/ids/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/ids/generator.py +62 -62
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/io/__init__.py +37 -37
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/io/io_utils.py +81 -81
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/logger/__init__.py +12 -12
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/logger/manager.py +187 -187
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/retry/__init__.py +12 -12
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/retry/retry.py +171 -171
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/__init__.py +21 -21
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/candidate.py +51 -51
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/dispatcher.py +233 -233
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/proxy_selector.py +154 -154
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/race.py +119 -119
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/selector.py +400 -400
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/__init__.py +38 -38
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/parsers/__init__.py +5 -5
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/parsers/stream.py +203 -203
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/parsers/stream_delta.py +269 -269
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/parsers/stream_feed.py +165 -165
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/parsers/stream_final.py +231 -231
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/prompt/__init__.py +5 -5
- echotools-2.4.2/src/echotools/exec/fncall/prompt/behavior_blocks.py +124 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/prompt/history.py +324 -322
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/prompt/history_format.py +145 -145
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/prompt/inject.py +212 -212
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/prompt/prompt_helpers.py +290 -277
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/__init__.py +14 -14
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml.py +247 -234
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_patterns/__init__.py +92 -92
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_patterns/invoke.py +197 -197
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_patterns/params.py +219 -219
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_patterns/regex.py +99 -99
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_patterns/strip.py +31 -31
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_schema/__init__.py +26 -26
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_schema/mangled.py +201 -201
- echotools-2.4.2/src/echotools/exec/fncall/protocols/entml_schema/validate.py +218 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_stream/__init__.py +22 -22
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_stream/body.py +293 -293
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_stream/snap.py +173 -173
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_think/__init__.py +37 -37
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_think/core.py +211 -206
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_think/filter.py +294 -294
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_think/hist.py +168 -168
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_think/hold.py +315 -315
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_think/parse.py +288 -288
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_tool/__init__.py +52 -52
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_tool/comment.py +70 -70
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_tool/fakemarkup.py +252 -224
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_tool/invoke.py +204 -201
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_tool/tools.py +156 -156
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/protocols/entml_tool/values.py +143 -134
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/registry.py +73 -73
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/__init__.py +29 -29
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/coercion.py +310 -289
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/entml_format.py +184 -169
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/history_markup.py +333 -333
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/loop_detect.py +136 -136
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/normalization.py +181 -181
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/fncall/shared/schema_render.py +126 -126
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/lifecycle/__init__.py +8 -8
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/lifecycle/manager.py +72 -72
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/lifecycle/updater.py +197 -197
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/lifecycle/updater_pull.py +33 -33
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/process/__init__.py +10 -10
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/process/port.py +193 -193
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/protocol/__init__.py +19 -19
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/protocol/base.py +139 -139
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/conpty.py +246 -246
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/local/__init__.py +6 -6
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/local/core.py +318 -318
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/local/proc.py +331 -331
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/local/unix.py +195 -195
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/local/win.py +199 -199
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/session/__init__.py +20 -20
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/session/base.py +353 -353
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/session/client.py +155 -155
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/tmux.py +105 -105
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/__init__.py +89 -89
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/charmap.py +148 -148
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/spinner.py +342 -342
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/mixins/__init__.py +15 -15
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/mixins/uibase.py +195 -195
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/mixins/uicmds.py +224 -224
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/mixins/uiinteract.py +199 -199
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/mixins/uioutput.py +304 -304
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/mixins/uistream.py +144 -144
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/ui_console.py +20 -20
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/ui_io.py +27 -27
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/ui_log.py +67 -67
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/ui_platform.py +389 -389
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/ui_text.py +395 -395
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uicore/ui_types.py +246 -246
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_bridge.py +204 -205
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_countdown.py +62 -62
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_layout.py +50 -50
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_misc.py +336 -336
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_panel.py +137 -137
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_table.py +205 -205
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uilayout/ui_tree.py +146 -146
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_box.py +197 -197
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_editor.py +360 -360
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_progress.py +296 -296
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_richcli.py +110 -110
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_select.py +199 -199
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_stream.py +85 -85
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/uiwidgets/ui_themes.py +241 -240
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/events/__init__.py +8 -8
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/events/bus.py +104 -104
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/events/event.py +31 -31
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/spinner/__init__.py +24 -24
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/spinner/spinner.py +324 -324
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/spinner/spinner_color.py +98 -98
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/tracing/__init__.py +28 -28
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/tracing/context.py +63 -63
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/tracing/span.py +135 -135
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/tracing/tracer.py +97 -97
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/watcher/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/watcher/file_watcher.py +110 -110
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/__init__.py +37 -37
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/application.py +120 -120
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/sendbutton.js +64 -64
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/sortablelist.js +104 -104
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/textinput.js +185 -185
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/inputbox.js +277 -277
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/style.css +170 -170
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/voicegif.js +1 -1
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/middleware.py +129 -129
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/utils.py +187 -187
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/files/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/files/file_util.py +155 -155
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/network/__init__.py +11 -11
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/network/http_utils.py +68 -68
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/plugin/__init__.py +9 -9
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/plugin/base.py +41 -41
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/plugin/discovery.py +179 -179
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/plugin/registry.py +245 -245
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/plugin/registry_ops.py +99 -99
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/proxy/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/proxy/manager.py +268 -268
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/runtime/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/runtime/collector.py +60 -60
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/scheduler/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/scheduler/scheduler.py +69 -69
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/sdk/__init__.py +7 -7
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/plat/sdk/facade.py +251 -251
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/version.py +15 -15
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools.egg-info/PKG-INFO +195 -195
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools.egg-info/SOURCES.txt +3 -1
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/_check_parity.py +78 -75
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/bench_import.py +14 -14
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/conftest.py +19 -19
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/fixtures/entml_golden.py +103 -104
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/fixtures/entml_golden_update.py +24 -24
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/fixtures/simulated_fake_history_markup_responses.py +481 -481
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/fixtures/simulated_fault_thinking_responses.py +220 -220
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/fixtures/simulated_llm_tool_responses.py +805 -805
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_adversarial_stream_splits.py +147 -147
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_cache_retry.py +128 -128
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_completion.py +48 -48
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_config.py +85 -85
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_config_extended.py +45 -45
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_console.py +19 -19
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_coverage_core.py +515 -515
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_dispatch.py +35 -35
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_dispatch_extended.py +44 -44
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_dispatch_race.py +55 -55
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_agent_output_formats.py +143 -143
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_bare_invoke_format.py +395 -395
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_batch_stream_comprehensive.py +514 -514
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_fake_structure_markup.py +356 -315
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_golden.py +43 -44
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_invoke_known_tool_gate.py +219 -219
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_parser_comprehensive.py +655 -655
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_protocol.py +1769 -1743
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_stream_json.py +77 -77
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_stream_json_exhaustive.py +268 -268
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_thinking_history.py +71 -71
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_tool_parse_leak.py +256 -256
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_tool_pipeline.py +882 -883
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_tools.py +204 -204
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_errors.py +45 -45
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_errors_common.py +24 -24
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_events.py +56 -56
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_events_event.py +18 -18
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_facade.py +33 -33
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fake_history_markup_batch.py +70 -70
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fake_history_markup_invoke_preserve.py +130 -130
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fake_history_markup_reply_protect.py +168 -168
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fake_history_markup_stream.py +151 -151
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fault_thinking_close_batch.py +86 -86
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fault_thinking_close_stream.py +149 -149
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fncall.py +94 -94
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_fncall_stream_thinking.py +436 -436
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_history_markup_filter.py +321 -321
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_ids.py +25 -25
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_imports.py +39 -39
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_io.py +20 -20
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_keys.py +27 -27
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_lifecycle.py +34 -34
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_logger.py +37 -37
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_merge.py +26 -26
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_model_branch_matrix.py +204 -204
- echotools-2.4.2/src/tests/test_multiline_parameter_comprehensive.py +346 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_plugin.py +31 -31
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_printstream.py +337 -337
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_protocols.py +25 -25
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_proxy.py +56 -56
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_proxy_selector.py +27 -27
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_runtime.py +25 -25
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_scheduler.py +27 -27
- echotools-2.4.2/src/tests/test_schema_validate.py +103 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_simulated_llm_tool_parse.py +175 -175
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_stream_partial_json_parity.py +450 -450
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_stream_realtime_parse.py +137 -137
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_tracing.py +30 -30
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_ui_bridge.py +59 -60
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_usage.py +37 -37
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_web.py +48 -48
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_web_broker.py +50 -50
- echotools-2.4.0/src/echotools/exec/fncall/prompt/behavior_blocks.py +0 -69
- echotools-2.4.0/src/echotools/exec/fncall/prompt/templates.py +0 -168
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/config/merge.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/base/io/printstream.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/dispatch/usage.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/keys.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/__init__.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/sanitize.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/exec/terminal/ssh.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/console/ui.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/translate.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/broker.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/app.js +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/filezone.js +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/motionkit.js +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/sortablelist.css +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/components/voiceinput.js +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/fonts/inter-500.woff2 +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/fonts/inter-600.woff2 +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/fonts/inter400.woff2 +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/input_box/inputbox.css +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools/media/web/stats.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools.egg-info/dependency_links.txt +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools.egg-info/requires.txt +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/echotools.egg-info/top_level.txt +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/fixtures/__init__.py +0 -0
- {echotools-2.4.0 → echotools-2.4.2}/src/tests/test_entml_thinking_parse.py +0 -0
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: echotools
|
|
3
|
-
Version: 2.4.
|
|
4
|
-
Summary: 通用基础设施 SDK:配置、日志、事件、调度、插件、协议、调用链
|
|
5
|
-
Home-page: https://github.com/nichengfuben/echotools
|
|
6
|
-
Author: nichengfuben
|
|
7
|
-
License: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/nichengfuben/echotools
|
|
9
|
-
Project-URL: Repository, https://github.com/nichengfuben/echotools
|
|
10
|
-
Project-URL: Issues, https://github.com/nichengfuben/echotools/issues
|
|
11
|
-
Classifier: Development Status :: 4 - Beta
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
-
Requires-Python: >=3.8
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
Requires-Dist: typing-extensions>=4.7.0
|
|
24
|
-
Provides-Extra: toml
|
|
25
|
-
Requires-Dist: tomlkit>=0.11.0; extra == "toml"
|
|
26
|
-
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "toml"
|
|
27
|
-
Provides-Extra: watch
|
|
28
|
-
Requires-Dist: watchdog>=3.0.0; extra == "watch"
|
|
29
|
-
Provides-Extra: http
|
|
30
|
-
Requires-Dist: aiohttp>=3.8.0; extra == "http"
|
|
31
|
-
Provides-Extra: socks
|
|
32
|
-
Requires-Dist: aiohttp-socks>=0.8.0; extra == "socks"
|
|
33
|
-
Provides-Extra: ssh
|
|
34
|
-
Requires-Dist: paramiko>=3.0.0; extra == "ssh"
|
|
35
|
-
Provides-Extra: terminal
|
|
36
|
-
Requires-Dist: pywinpty>=2.0.0; sys_platform == "win32" and extra == "terminal"
|
|
37
|
-
Provides-Extra: console
|
|
38
|
-
Requires-Dist: rich>=13.0; extra == "console"
|
|
39
|
-
Requires-Dist: wcwidth>=0.2; extra == "console"
|
|
40
|
-
Provides-Extra: all
|
|
41
|
-
Requires-Dist: tomlkit>=0.11.0; extra == "all"
|
|
42
|
-
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "all"
|
|
43
|
-
Requires-Dist: watchdog>=3.0.0; extra == "all"
|
|
44
|
-
Requires-Dist: aiohttp>=3.8.0; extra == "all"
|
|
45
|
-
Requires-Dist: aiohttp-socks>=0.8.0; extra == "all"
|
|
46
|
-
Requires-Dist: paramiko>=3.0.0; extra == "all"
|
|
47
|
-
Requires-Dist: pywinpty>=2.0.0; sys_platform == "win32" and extra == "all"
|
|
48
|
-
Requires-Dist: rich>=13.0; extra == "all"
|
|
49
|
-
Requires-Dist: wcwidth>=0.2; extra == "all"
|
|
50
|
-
Provides-Extra: dev
|
|
51
|
-
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
52
|
-
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
53
|
-
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
54
|
-
Requires-Dist: mypy>=1.5.0; extra == "dev"
|
|
55
|
-
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
56
|
-
|
|
57
|
-
# echotools
|
|
58
|
-
|
|
59
|
-
通用基础设施 SDK:配置、日志、事件、调度、插件、调用链,以及 **entml** LLM 工具调用协议与终端 Console UI。
|
|
60
|
-
|
|
61
|
-
完全项目无关,兼容 Python 3.8–3.14。当前版本:**2.4.
|
|
62
|
-
|
|
63
|
-
## 安装
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# 核心(仅 typing-extensions)
|
|
67
|
-
pip install echotools
|
|
68
|
-
|
|
69
|
-
# 完整功能(含 TOML、Web、终端、Console UI 等)
|
|
70
|
-
pip install echotools[all]
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### 可选依赖
|
|
74
|
-
|
|
75
|
-
| Extra | 用途 |
|
|
76
|
-
|-------|------|
|
|
77
|
-
| `toml` | TOML 配置读写 |
|
|
78
|
-
| `watch` | watchdog 文件监视 |
|
|
79
|
-
| `http` | aiohttp Web 层 |
|
|
80
|
-
| `socks` | SOCKS 代理 |
|
|
81
|
-
| `ssh` | SSH 终端 |
|
|
82
|
-
| `terminal` | Windows ConPTY |
|
|
83
|
-
| `console` | Rich 终端 UI(渐变、表格、交互选择) |
|
|
84
|
-
| `all` | 全部可选依赖 |
|
|
85
|
-
| `dev` | pytest、ruff、mypy |
|
|
86
|
-
|
|
87
|
-
## 快速开始
|
|
88
|
-
|
|
89
|
-
### 基础设施
|
|
90
|
-
|
|
91
|
-
```python
|
|
92
|
-
from echotools import EchoTools
|
|
93
|
-
|
|
94
|
-
et = EchoTools(service_name="myapp")
|
|
95
|
-
et.logger.configure(level="INFO", color=True)
|
|
96
|
-
cfg = et.config
|
|
97
|
-
cfg.load("config.toml")
|
|
98
|
-
|
|
99
|
-
with et.tracer.trace("request") as trace:
|
|
100
|
-
with et.tracer.span(trace, "db") as span:
|
|
101
|
-
span.set_tag("query", "select 1")
|
|
102
|
-
|
|
103
|
-
await et.shutdown()
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### entml 工具调用
|
|
107
|
-
|
|
108
|
-
内置 **entml**(`<entml:*>` 熵标记语言)协议,负责 prompt 注入与模型输出解析。
|
|
109
|
-
|
|
110
|
-
```python
|
|
111
|
-
from echotools import FncallStreamParser, get_protocol, inject_fncall
|
|
112
|
-
|
|
113
|
-
tools = [
|
|
114
|
-
{
|
|
115
|
-
"name": "Bash",
|
|
116
|
-
"description": "Run a shell command",
|
|
117
|
-
"input_schema": {
|
|
118
|
-
"type": "object",
|
|
119
|
-
"properties": {"command": {"type": "string"}},
|
|
120
|
-
"required": ["command"],
|
|
121
|
-
},
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
messages = [{"role": "user", "content": "列出当前目录"}]
|
|
125
|
-
|
|
126
|
-
proto = get_protocol()
|
|
127
|
-
out_messages = inject_fncall(messages, tools, proto, lang="zh")
|
|
128
|
-
|
|
129
|
-
parser = FncallStreamParser(proto, tools=tools)
|
|
130
|
-
for chunk in model_stream:
|
|
131
|
-
parser.feed(chunk)
|
|
132
|
-
if parser.get_ready_tool_calls():
|
|
133
|
-
...
|
|
134
|
-
result = parser.finalize()
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
能力包括:prompt 注入(history / 工具结果 / thinking 模式)、batch `parse()`、流式
|
|
138
|
-
`partial_text` / `input_json_delta`、伪 history 剥离、工具循环检测。
|
|
139
|
-
|
|
140
|
-
### 终端 Console UI
|
|
141
|
-
|
|
142
|
-
需要 `pip install echotools[console]`(或 `[all]`):
|
|
143
|
-
|
|
144
|
-
```python
|
|
145
|
-
from echotools.media.console import (
|
|
146
|
-
create_themed_ui,
|
|
147
|
-
render_gradient_banner,
|
|
148
|
-
render_text_lines,
|
|
149
|
-
run_select,
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
ui = create_themed_ui(theme_name="ocean") # ocean / forest / sunset / violet / rose / slate / cyan
|
|
153
|
-
print(render_gradient_banner(render_text_lines("echotools"), theme_name="ocean"))
|
|
154
|
-
choice = run_select(ui, "选择主题", ["ocean", "forest", "sunset"])
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## 能力总览
|
|
158
|
-
|
|
159
|
-
| 模块 | 说明 |
|
|
160
|
-
|------|------|
|
|
161
|
-
| `EchoTools` | 门面:配置、日志、事件、调度、插件等统一入口 |
|
|
162
|
-
| `ConfigCenter` | 点路径配置 + 热重载 + 类型绑定 |
|
|
163
|
-
| `LoggerManager` | 调用链注入 + 颜色 + 轮转 |
|
|
164
|
-
| `EventBus` | 同步/异步事件 |
|
|
165
|
-
| `Tracer` | 轻量调用链 |
|
|
166
|
-
| `TaskDispatcher` | 单发/竞速 + 贝叶斯自适应选择 |
|
|
167
|
-
| `PluginRegistry` | 自动发现 + 热重载 |
|
|
168
|
-
| `get_protocol` / `inject_fncall` | entml 工具协议与 prompt 注入 |
|
|
169
|
-
| `FncallStreamParser` | 流式工具调用解析 |
|
|
170
|
-
| `media.console` | Rich 终端 UI、多主题、交互选择与 ANSI 渐变 |
|
|
171
|
-
| `PrintStream` | 动态速度打印流 |
|
|
172
|
-
| `ProxyManager` | HTTP/HTTPS/SOCKS |
|
|
173
|
-
| `WebApplication` | aiohttp Web(需 `[http]`) |
|
|
174
|
-
| `LocalTerminal` / `SSHTerminal` | 终端会话(需 `[terminal]` / `[ssh]`) |
|
|
175
|
-
| `AutoUpdater` | git 自动更新 |
|
|
176
|
-
| `FileWatcher` | 轮询文件监视 |
|
|
177
|
-
|
|
178
|
-
## 开发
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
pip install -e ".[dev,all]"
|
|
182
|
-
make -C docs lint
|
|
183
|
-
make -C docs test
|
|
184
|
-
make -C docs cov
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
模块指南见 [docs/modules.md](docs/modules.md),API 参考见 [docs/api.md](docs/api.md)。
|
|
188
|
-
|
|
189
|
-
## 变更记录
|
|
190
|
-
|
|
191
|
-
见 [docs/CHANGELOG.md](docs/CHANGELOG.md)。
|
|
192
|
-
|
|
193
|
-
## 许可证
|
|
194
|
-
|
|
195
|
-
MIT
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: echotools
|
|
3
|
+
Version: 2.4.2
|
|
4
|
+
Summary: 通用基础设施 SDK:配置、日志、事件、调度、插件、协议、调用链
|
|
5
|
+
Home-page: https://github.com/nichengfuben/echotools
|
|
6
|
+
Author: nichengfuben
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/nichengfuben/echotools
|
|
9
|
+
Project-URL: Repository, https://github.com/nichengfuben/echotools
|
|
10
|
+
Project-URL: Issues, https://github.com/nichengfuben/echotools/issues
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: typing-extensions>=4.7.0
|
|
24
|
+
Provides-Extra: toml
|
|
25
|
+
Requires-Dist: tomlkit>=0.11.0; extra == "toml"
|
|
26
|
+
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "toml"
|
|
27
|
+
Provides-Extra: watch
|
|
28
|
+
Requires-Dist: watchdog>=3.0.0; extra == "watch"
|
|
29
|
+
Provides-Extra: http
|
|
30
|
+
Requires-Dist: aiohttp>=3.8.0; extra == "http"
|
|
31
|
+
Provides-Extra: socks
|
|
32
|
+
Requires-Dist: aiohttp-socks>=0.8.0; extra == "socks"
|
|
33
|
+
Provides-Extra: ssh
|
|
34
|
+
Requires-Dist: paramiko>=3.0.0; extra == "ssh"
|
|
35
|
+
Provides-Extra: terminal
|
|
36
|
+
Requires-Dist: pywinpty>=2.0.0; sys_platform == "win32" and extra == "terminal"
|
|
37
|
+
Provides-Extra: console
|
|
38
|
+
Requires-Dist: rich>=13.0; extra == "console"
|
|
39
|
+
Requires-Dist: wcwidth>=0.2; extra == "console"
|
|
40
|
+
Provides-Extra: all
|
|
41
|
+
Requires-Dist: tomlkit>=0.11.0; extra == "all"
|
|
42
|
+
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "all"
|
|
43
|
+
Requires-Dist: watchdog>=3.0.0; extra == "all"
|
|
44
|
+
Requires-Dist: aiohttp>=3.8.0; extra == "all"
|
|
45
|
+
Requires-Dist: aiohttp-socks>=0.8.0; extra == "all"
|
|
46
|
+
Requires-Dist: paramiko>=3.0.0; extra == "all"
|
|
47
|
+
Requires-Dist: pywinpty>=2.0.0; sys_platform == "win32" and extra == "all"
|
|
48
|
+
Requires-Dist: rich>=13.0; extra == "all"
|
|
49
|
+
Requires-Dist: wcwidth>=0.2; extra == "all"
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
52
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
54
|
+
Requires-Dist: mypy>=1.5.0; extra == "dev"
|
|
55
|
+
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
56
|
+
|
|
57
|
+
# echotools
|
|
58
|
+
|
|
59
|
+
通用基础设施 SDK:配置、日志、事件、调度、插件、调用链,以及 **entml** LLM 工具调用协议与终端 Console UI。
|
|
60
|
+
|
|
61
|
+
完全项目无关,兼容 Python 3.8–3.14。当前版本:**2.4.2**(详见 [CHANGELOG](docs/CHANGELOG.md))。
|
|
62
|
+
|
|
63
|
+
## 安装
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# 核心(仅 typing-extensions)
|
|
67
|
+
pip install echotools
|
|
68
|
+
|
|
69
|
+
# 完整功能(含 TOML、Web、终端、Console UI 等)
|
|
70
|
+
pip install echotools[all]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 可选依赖
|
|
74
|
+
|
|
75
|
+
| Extra | 用途 |
|
|
76
|
+
|-------|------|
|
|
77
|
+
| `toml` | TOML 配置读写 |
|
|
78
|
+
| `watch` | watchdog 文件监视 |
|
|
79
|
+
| `http` | aiohttp Web 层 |
|
|
80
|
+
| `socks` | SOCKS 代理 |
|
|
81
|
+
| `ssh` | SSH 终端 |
|
|
82
|
+
| `terminal` | Windows ConPTY |
|
|
83
|
+
| `console` | Rich 终端 UI(渐变、表格、交互选择) |
|
|
84
|
+
| `all` | 全部可选依赖 |
|
|
85
|
+
| `dev` | pytest、ruff、mypy |
|
|
86
|
+
|
|
87
|
+
## 快速开始
|
|
88
|
+
|
|
89
|
+
### 基础设施
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from echotools import EchoTools
|
|
93
|
+
|
|
94
|
+
et = EchoTools(service_name="myapp")
|
|
95
|
+
et.logger.configure(level="INFO", color=True)
|
|
96
|
+
cfg = et.config
|
|
97
|
+
cfg.load("config.toml")
|
|
98
|
+
|
|
99
|
+
with et.tracer.trace("request") as trace:
|
|
100
|
+
with et.tracer.span(trace, "db") as span:
|
|
101
|
+
span.set_tag("query", "select 1")
|
|
102
|
+
|
|
103
|
+
await et.shutdown()
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### entml 工具调用
|
|
107
|
+
|
|
108
|
+
内置 **entml**(`<entml:*>` 熵标记语言)协议,负责 prompt 注入与模型输出解析。
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from echotools import FncallStreamParser, get_protocol, inject_fncall
|
|
112
|
+
|
|
113
|
+
tools = [
|
|
114
|
+
{
|
|
115
|
+
"name": "Bash",
|
|
116
|
+
"description": "Run a shell command",
|
|
117
|
+
"input_schema": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {"command": {"type": "string"}},
|
|
120
|
+
"required": ["command"],
|
|
121
|
+
},
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
messages = [{"role": "user", "content": "列出当前目录"}]
|
|
125
|
+
|
|
126
|
+
proto = get_protocol()
|
|
127
|
+
out_messages = inject_fncall(messages, tools, proto, lang="zh")
|
|
128
|
+
|
|
129
|
+
parser = FncallStreamParser(proto, tools=tools)
|
|
130
|
+
for chunk in model_stream:
|
|
131
|
+
parser.feed(chunk)
|
|
132
|
+
if parser.get_ready_tool_calls():
|
|
133
|
+
...
|
|
134
|
+
result = parser.finalize()
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
能力包括:prompt 注入(history / 工具结果 / thinking 模式)、batch `parse()`、流式
|
|
138
|
+
`partial_text` / `input_json_delta`、伪 history 剥离、工具循环检测。
|
|
139
|
+
|
|
140
|
+
### 终端 Console UI
|
|
141
|
+
|
|
142
|
+
需要 `pip install echotools[console]`(或 `[all]`):
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
from echotools.media.console import (
|
|
146
|
+
create_themed_ui,
|
|
147
|
+
render_gradient_banner,
|
|
148
|
+
render_text_lines,
|
|
149
|
+
run_select,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
ui = create_themed_ui(theme_name="ocean") # ocean / forest / sunset / violet / rose / slate / cyan
|
|
153
|
+
print(render_gradient_banner(render_text_lines("echotools"), theme_name="ocean"))
|
|
154
|
+
choice = run_select(ui, "选择主题", ["ocean", "forest", "sunset"])
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## 能力总览
|
|
158
|
+
|
|
159
|
+
| 模块 | 说明 |
|
|
160
|
+
|------|------|
|
|
161
|
+
| `EchoTools` | 门面:配置、日志、事件、调度、插件等统一入口 |
|
|
162
|
+
| `ConfigCenter` | 点路径配置 + 热重载 + 类型绑定 |
|
|
163
|
+
| `LoggerManager` | 调用链注入 + 颜色 + 轮转 |
|
|
164
|
+
| `EventBus` | 同步/异步事件 |
|
|
165
|
+
| `Tracer` | 轻量调用链 |
|
|
166
|
+
| `TaskDispatcher` | 单发/竞速 + 贝叶斯自适应选择 |
|
|
167
|
+
| `PluginRegistry` | 自动发现 + 热重载 |
|
|
168
|
+
| `get_protocol` / `inject_fncall` | entml 工具协议与 prompt 注入 |
|
|
169
|
+
| `FncallStreamParser` | 流式工具调用解析 |
|
|
170
|
+
| `media.console` | Rich 终端 UI、多主题、交互选择与 ANSI 渐变 |
|
|
171
|
+
| `PrintStream` | 动态速度打印流 |
|
|
172
|
+
| `ProxyManager` | HTTP/HTTPS/SOCKS |
|
|
173
|
+
| `WebApplication` | aiohttp Web(需 `[http]`) |
|
|
174
|
+
| `LocalTerminal` / `SSHTerminal` | 终端会话(需 `[terminal]` / `[ssh]`) |
|
|
175
|
+
| `AutoUpdater` | git 自动更新 |
|
|
176
|
+
| `FileWatcher` | 轮询文件监视 |
|
|
177
|
+
|
|
178
|
+
## 开发
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
pip install -e ".[dev,all]"
|
|
182
|
+
make -C docs lint
|
|
183
|
+
make -C docs test
|
|
184
|
+
make -C docs cov
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
模块指南见 [docs/modules.md](docs/modules.md),API 参考见 [docs/api.md](docs/api.md)。
|
|
188
|
+
|
|
189
|
+
## 变更记录
|
|
190
|
+
|
|
191
|
+
见 [docs/CHANGELOG.md](docs/CHANGELOG.md)。
|
|
192
|
+
|
|
193
|
+
## 许可证
|
|
194
|
+
|
|
195
|
+
MIT
|
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
# echotools
|
|
2
|
-
|
|
3
|
-
通用基础设施 SDK:配置、日志、事件、调度、插件、调用链,以及 **entml** LLM 工具调用协议与终端 Console UI。
|
|
4
|
-
|
|
5
|
-
完全项目无关,兼容 Python 3.8–3.14。当前版本:**2.4.
|
|
6
|
-
|
|
7
|
-
## 安装
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# 核心(仅 typing-extensions)
|
|
11
|
-
pip install echotools
|
|
12
|
-
|
|
13
|
-
# 完整功能(含 TOML、Web、终端、Console UI 等)
|
|
14
|
-
pip install echotools[all]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### 可选依赖
|
|
18
|
-
|
|
19
|
-
| Extra | 用途 |
|
|
20
|
-
|-------|------|
|
|
21
|
-
| `toml` | TOML 配置读写 |
|
|
22
|
-
| `watch` | watchdog 文件监视 |
|
|
23
|
-
| `http` | aiohttp Web 层 |
|
|
24
|
-
| `socks` | SOCKS 代理 |
|
|
25
|
-
| `ssh` | SSH 终端 |
|
|
26
|
-
| `terminal` | Windows ConPTY |
|
|
27
|
-
| `console` | Rich 终端 UI(渐变、表格、交互选择) |
|
|
28
|
-
| `all` | 全部可选依赖 |
|
|
29
|
-
| `dev` | pytest、ruff、mypy |
|
|
30
|
-
|
|
31
|
-
## 快速开始
|
|
32
|
-
|
|
33
|
-
### 基础设施
|
|
34
|
-
|
|
35
|
-
```python
|
|
36
|
-
from echotools import EchoTools
|
|
37
|
-
|
|
38
|
-
et = EchoTools(service_name="myapp")
|
|
39
|
-
et.logger.configure(level="INFO", color=True)
|
|
40
|
-
cfg = et.config
|
|
41
|
-
cfg.load("config.toml")
|
|
42
|
-
|
|
43
|
-
with et.tracer.trace("request") as trace:
|
|
44
|
-
with et.tracer.span(trace, "db") as span:
|
|
45
|
-
span.set_tag("query", "select 1")
|
|
46
|
-
|
|
47
|
-
await et.shutdown()
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### entml 工具调用
|
|
51
|
-
|
|
52
|
-
内置 **entml**(`<entml:*>` 熵标记语言)协议,负责 prompt 注入与模型输出解析。
|
|
53
|
-
|
|
54
|
-
```python
|
|
55
|
-
from echotools import FncallStreamParser, get_protocol, inject_fncall
|
|
56
|
-
|
|
57
|
-
tools = [
|
|
58
|
-
{
|
|
59
|
-
"name": "Bash",
|
|
60
|
-
"description": "Run a shell command",
|
|
61
|
-
"input_schema": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"properties": {"command": {"type": "string"}},
|
|
64
|
-
"required": ["command"],
|
|
65
|
-
},
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
messages = [{"role": "user", "content": "列出当前目录"}]
|
|
69
|
-
|
|
70
|
-
proto = get_protocol()
|
|
71
|
-
out_messages = inject_fncall(messages, tools, proto, lang="zh")
|
|
72
|
-
|
|
73
|
-
parser = FncallStreamParser(proto, tools=tools)
|
|
74
|
-
for chunk in model_stream:
|
|
75
|
-
parser.feed(chunk)
|
|
76
|
-
if parser.get_ready_tool_calls():
|
|
77
|
-
...
|
|
78
|
-
result = parser.finalize()
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
能力包括:prompt 注入(history / 工具结果 / thinking 模式)、batch `parse()`、流式
|
|
82
|
-
`partial_text` / `input_json_delta`、伪 history 剥离、工具循环检测。
|
|
83
|
-
|
|
84
|
-
### 终端 Console UI
|
|
85
|
-
|
|
86
|
-
需要 `pip install echotools[console]`(或 `[all]`):
|
|
87
|
-
|
|
88
|
-
```python
|
|
89
|
-
from echotools.media.console import (
|
|
90
|
-
create_themed_ui,
|
|
91
|
-
render_gradient_banner,
|
|
92
|
-
render_text_lines,
|
|
93
|
-
run_select,
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
ui = create_themed_ui(theme_name="ocean") # ocean / forest / sunset / violet / rose / slate / cyan
|
|
97
|
-
print(render_gradient_banner(render_text_lines("echotools"), theme_name="ocean"))
|
|
98
|
-
choice = run_select(ui, "选择主题", ["ocean", "forest", "sunset"])
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## 能力总览
|
|
102
|
-
|
|
103
|
-
| 模块 | 说明 |
|
|
104
|
-
|------|------|
|
|
105
|
-
| `EchoTools` | 门面:配置、日志、事件、调度、插件等统一入口 |
|
|
106
|
-
| `ConfigCenter` | 点路径配置 + 热重载 + 类型绑定 |
|
|
107
|
-
| `LoggerManager` | 调用链注入 + 颜色 + 轮转 |
|
|
108
|
-
| `EventBus` | 同步/异步事件 |
|
|
109
|
-
| `Tracer` | 轻量调用链 |
|
|
110
|
-
| `TaskDispatcher` | 单发/竞速 + 贝叶斯自适应选择 |
|
|
111
|
-
| `PluginRegistry` | 自动发现 + 热重载 |
|
|
112
|
-
| `get_protocol` / `inject_fncall` | entml 工具协议与 prompt 注入 |
|
|
113
|
-
| `FncallStreamParser` | 流式工具调用解析 |
|
|
114
|
-
| `media.console` | Rich 终端 UI、多主题、交互选择与 ANSI 渐变 |
|
|
115
|
-
| `PrintStream` | 动态速度打印流 |
|
|
116
|
-
| `ProxyManager` | HTTP/HTTPS/SOCKS |
|
|
117
|
-
| `WebApplication` | aiohttp Web(需 `[http]`) |
|
|
118
|
-
| `LocalTerminal` / `SSHTerminal` | 终端会话(需 `[terminal]` / `[ssh]`) |
|
|
119
|
-
| `AutoUpdater` | git 自动更新 |
|
|
120
|
-
| `FileWatcher` | 轮询文件监视 |
|
|
121
|
-
|
|
122
|
-
## 开发
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
pip install -e ".[dev,all]"
|
|
126
|
-
make -C docs lint
|
|
127
|
-
make -C docs test
|
|
128
|
-
make -C docs cov
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
模块指南见 [docs/modules.md](docs/modules.md),API 参考见 [docs/api.md](docs/api.md)。
|
|
132
|
-
|
|
133
|
-
## 变更记录
|
|
134
|
-
|
|
135
|
-
见 [docs/CHANGELOG.md](docs/CHANGELOG.md)。
|
|
136
|
-
|
|
137
|
-
## 许可证
|
|
138
|
-
|
|
139
|
-
MIT
|
|
1
|
+
# echotools
|
|
2
|
+
|
|
3
|
+
通用基础设施 SDK:配置、日志、事件、调度、插件、调用链,以及 **entml** LLM 工具调用协议与终端 Console UI。
|
|
4
|
+
|
|
5
|
+
完全项目无关,兼容 Python 3.8–3.14。当前版本:**2.4.2**(详见 [CHANGELOG](docs/CHANGELOG.md))。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 核心(仅 typing-extensions)
|
|
11
|
+
pip install echotools
|
|
12
|
+
|
|
13
|
+
# 完整功能(含 TOML、Web、终端、Console UI 等)
|
|
14
|
+
pip install echotools[all]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 可选依赖
|
|
18
|
+
|
|
19
|
+
| Extra | 用途 |
|
|
20
|
+
|-------|------|
|
|
21
|
+
| `toml` | TOML 配置读写 |
|
|
22
|
+
| `watch` | watchdog 文件监视 |
|
|
23
|
+
| `http` | aiohttp Web 层 |
|
|
24
|
+
| `socks` | SOCKS 代理 |
|
|
25
|
+
| `ssh` | SSH 终端 |
|
|
26
|
+
| `terminal` | Windows ConPTY |
|
|
27
|
+
| `console` | Rich 终端 UI(渐变、表格、交互选择) |
|
|
28
|
+
| `all` | 全部可选依赖 |
|
|
29
|
+
| `dev` | pytest、ruff、mypy |
|
|
30
|
+
|
|
31
|
+
## 快速开始
|
|
32
|
+
|
|
33
|
+
### 基础设施
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from echotools import EchoTools
|
|
37
|
+
|
|
38
|
+
et = EchoTools(service_name="myapp")
|
|
39
|
+
et.logger.configure(level="INFO", color=True)
|
|
40
|
+
cfg = et.config
|
|
41
|
+
cfg.load("config.toml")
|
|
42
|
+
|
|
43
|
+
with et.tracer.trace("request") as trace:
|
|
44
|
+
with et.tracer.span(trace, "db") as span:
|
|
45
|
+
span.set_tag("query", "select 1")
|
|
46
|
+
|
|
47
|
+
await et.shutdown()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### entml 工具调用
|
|
51
|
+
|
|
52
|
+
内置 **entml**(`<entml:*>` 熵标记语言)协议,负责 prompt 注入与模型输出解析。
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from echotools import FncallStreamParser, get_protocol, inject_fncall
|
|
56
|
+
|
|
57
|
+
tools = [
|
|
58
|
+
{
|
|
59
|
+
"name": "Bash",
|
|
60
|
+
"description": "Run a shell command",
|
|
61
|
+
"input_schema": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {"command": {"type": "string"}},
|
|
64
|
+
"required": ["command"],
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
messages = [{"role": "user", "content": "列出当前目录"}]
|
|
69
|
+
|
|
70
|
+
proto = get_protocol()
|
|
71
|
+
out_messages = inject_fncall(messages, tools, proto, lang="zh")
|
|
72
|
+
|
|
73
|
+
parser = FncallStreamParser(proto, tools=tools)
|
|
74
|
+
for chunk in model_stream:
|
|
75
|
+
parser.feed(chunk)
|
|
76
|
+
if parser.get_ready_tool_calls():
|
|
77
|
+
...
|
|
78
|
+
result = parser.finalize()
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
能力包括:prompt 注入(history / 工具结果 / thinking 模式)、batch `parse()`、流式
|
|
82
|
+
`partial_text` / `input_json_delta`、伪 history 剥离、工具循环检测。
|
|
83
|
+
|
|
84
|
+
### 终端 Console UI
|
|
85
|
+
|
|
86
|
+
需要 `pip install echotools[console]`(或 `[all]`):
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from echotools.media.console import (
|
|
90
|
+
create_themed_ui,
|
|
91
|
+
render_gradient_banner,
|
|
92
|
+
render_text_lines,
|
|
93
|
+
run_select,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
ui = create_themed_ui(theme_name="ocean") # ocean / forest / sunset / violet / rose / slate / cyan
|
|
97
|
+
print(render_gradient_banner(render_text_lines("echotools"), theme_name="ocean"))
|
|
98
|
+
choice = run_select(ui, "选择主题", ["ocean", "forest", "sunset"])
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 能力总览
|
|
102
|
+
|
|
103
|
+
| 模块 | 说明 |
|
|
104
|
+
|------|------|
|
|
105
|
+
| `EchoTools` | 门面:配置、日志、事件、调度、插件等统一入口 |
|
|
106
|
+
| `ConfigCenter` | 点路径配置 + 热重载 + 类型绑定 |
|
|
107
|
+
| `LoggerManager` | 调用链注入 + 颜色 + 轮转 |
|
|
108
|
+
| `EventBus` | 同步/异步事件 |
|
|
109
|
+
| `Tracer` | 轻量调用链 |
|
|
110
|
+
| `TaskDispatcher` | 单发/竞速 + 贝叶斯自适应选择 |
|
|
111
|
+
| `PluginRegistry` | 自动发现 + 热重载 |
|
|
112
|
+
| `get_protocol` / `inject_fncall` | entml 工具协议与 prompt 注入 |
|
|
113
|
+
| `FncallStreamParser` | 流式工具调用解析 |
|
|
114
|
+
| `media.console` | Rich 终端 UI、多主题、交互选择与 ANSI 渐变 |
|
|
115
|
+
| `PrintStream` | 动态速度打印流 |
|
|
116
|
+
| `ProxyManager` | HTTP/HTTPS/SOCKS |
|
|
117
|
+
| `WebApplication` | aiohttp Web(需 `[http]`) |
|
|
118
|
+
| `LocalTerminal` / `SSHTerminal` | 终端会话(需 `[terminal]` / `[ssh]`) |
|
|
119
|
+
| `AutoUpdater` | git 自动更新 |
|
|
120
|
+
| `FileWatcher` | 轮询文件监视 |
|
|
121
|
+
|
|
122
|
+
## 开发
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pip install -e ".[dev,all]"
|
|
126
|
+
make -C docs lint
|
|
127
|
+
make -C docs test
|
|
128
|
+
make -C docs cov
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
模块指南见 [docs/modules.md](docs/modules.md),API 参考见 [docs/api.md](docs/api.md)。
|
|
132
|
+
|
|
133
|
+
## 变更记录
|
|
134
|
+
|
|
135
|
+
见 [docs/CHANGELOG.md](docs/CHANGELOG.md)。
|
|
136
|
+
|
|
137
|
+
## 许可证
|
|
138
|
+
|
|
139
|
+
MIT
|