slife2 0.1.0__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.
- slife2-0.1.0/.gitignore +200 -0
- slife2-0.1.0/DESIGN.md +3662 -0
- slife2-0.1.0/LICENSE +21 -0
- slife2-0.1.0/PKG-INFO +1183 -0
- slife2-0.1.0/README.md +1148 -0
- slife2-0.1.0/pyproject.toml +279 -0
- slife2-0.1.0/sdd.md +1046 -0
- slife2-0.1.0/slife2/__init__.py +480 -0
- slife2-0.1.0/slife2/__main__.py +5 -0
- slife2-0.1.0/slife2/clients/__init__.py +7 -0
- slife2-0.1.0/slife2/clients/embedder.py +160 -0
- slife2-0.1.0/slife2/clients/gateway.py +677 -0
- slife2-0.1.0/slife2/clients/model.py +241 -0
- slife2-0.1.0/slife2/clients/toolclient.py +305 -0
- slife2-0.1.0/slife2/helpers/__init__.py +4 -0
- slife2-0.1.0/slife2/helpers/clock.py +43 -0
- slife2-0.1.0/slife2/helpers/timeouts.py +369 -0
- slife2-0.1.0/slife2/helpers/timeutil.py +257 -0
- slife2-0.1.0/slife2/libs/__init__.py +4 -0
- slife2-0.1.0/slife2/libs/harness/__init__.py +4 -0
- slife2-0.1.0/slife2/libs/harness/async_tasks.py +594 -0
- slife2-0.1.0/slife2/libs/harness/handover.py +279 -0
- slife2-0.1.0/slife2/libs/harness/markers.py +46 -0
- slife2-0.1.0/slife2/libs/host/__init__.py +4 -0
- slife2-0.1.0/slife2/libs/host/config.py +2534 -0
- slife2-0.1.0/slife2/libs/host/configfile.py +678 -0
- slife2-0.1.0/slife2/libs/host/launcher.py +916 -0
- slife2-0.1.0/slife2/libs/host/paths.py +317 -0
- slife2-0.1.0/slife2/libs/host/runtime.py +1055 -0
- slife2-0.1.0/slife2/libs/model/__init__.py +5 -0
- slife2-0.1.0/slife2/libs/model/base.py +130 -0
- slife2-0.1.0/slife2/libs/model/wire.py +121 -0
- slife2-0.1.0/slife2/libs/plugin/__init__.py +4 -0
- slife2-0.1.0/slife2/libs/plugin/audience.py +180 -0
- slife2-0.1.0/slife2/libs/plugin/family.py +1024 -0
- slife2-0.1.0/slife2/libs/plugin/protocol.py +593 -0
- slife2-0.1.0/slife2/libs/store/__init__.py +4 -0
- slife2-0.1.0/slife2/libs/store/catalogue.py +1946 -0
- slife2-0.1.0/slife2/libs/store/db.py +1601 -0
- slife2-0.1.0/slife2/libs/store/index.py +845 -0
- slife2-0.1.0/slife2/libs/store/textindex.py +202 -0
- slife2-0.1.0/slife2/libs/turn/__init__.py +4 -0
- slife2-0.1.0/slife2/libs/turn/attachments.py +316 -0
- slife2-0.1.0/slife2/libs/turn/context.py +580 -0
- slife2-0.1.0/slife2/libs/turn/events.py +359 -0
- slife2-0.1.0/slife2/libs/turn/loop.py +546 -0
- slife2-0.1.0/slife2/libs/turn/messages.py +307 -0
- slife2-0.1.0/slife2/libs/turn/prompt.py +100 -0
- slife2-0.1.0/slife2/libs/turn/templates/a2a_orphans.j2 +9 -0
- slife2-0.1.0/slife2/libs/turn/templates/agent_task.j2 +19 -0
- slife2-0.1.0/slife2/libs/turn/templates/recall.j2 +108 -0
- slife2-0.1.0/slife2/libs/turn/templates/schedule.j2 +15 -0
- slife2-0.1.0/slife2/libs/turn/templates/system.j2 +3 -0
- slife2-0.1.0/slife2/libs/turn/tokens.py +229 -0
- slife2-0.1.0/slife2/libs/turn/tools.py +452 -0
- slife2-0.1.0/slife2/plugins/__init__.py +11 -0
- slife2-0.1.0/slife2/plugins/a2a/__init__.py +34 -0
- slife2-0.1.0/slife2/plugins/a2a/broker.py +352 -0
- slife2-0.1.0/slife2/plugins/a2a/inbound_store.py +321 -0
- slife2-0.1.0/slife2/plugins/a2a/mesh.py +1421 -0
- slife2-0.1.0/slife2/plugins/a2a/server.py +1086 -0
- slife2-0.1.0/slife2/plugins/a2a/task_store.py +155 -0
- slife2-0.1.0/slife2/plugins/agent/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/agent/server.py +2535 -0
- slife2-0.1.0/slife2/plugins/agent_task/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/agent_task/server.py +1016 -0
- slife2-0.1.0/slife2/plugins/cabinet/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/cabinet/server.py +1006 -0
- slife2-0.1.0/slife2/plugins/cabinet/store.py +1591 -0
- slife2-0.1.0/slife2/plugins/cli/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/cli/server.py +397 -0
- slife2-0.1.0/slife2/plugins/context/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/context/server.py +874 -0
- slife2-0.1.0/slife2/plugins/file_tunnel/__init__.py +14 -0
- slife2-0.1.0/slife2/plugins/file_tunnel/providers.py +1460 -0
- slife2-0.1.0/slife2/plugins/file_tunnel/server.py +637 -0
- slife2-0.1.0/slife2/plugins/llm/__init__.py +44 -0
- slife2-0.1.0/slife2/plugins/llm/anthropic_server.py +558 -0
- slife2-0.1.0/slife2/plugins/llm/embeddings_server.py +358 -0
- slife2-0.1.0/slife2/plugins/llm/openai_responses_server.py +574 -0
- slife2-0.1.0/slife2/plugins/llm/openai_server.py +366 -0
- slife2-0.1.0/slife2/plugins/llm/server_common.py +616 -0
- slife2-0.1.0/slife2/plugins/mcp_tools/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/mcp_tools/server.py +293 -0
- slife2-0.1.0/slife2/plugins/media/__init__.py +10 -0
- slife2-0.1.0/slife2/plugins/media/adapters.py +821 -0
- slife2-0.1.0/slife2/plugins/media/server.py +396 -0
- slife2-0.1.0/slife2/plugins/restapi/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/restapi/server.py +324 -0
- slife2-0.1.0/slife2/plugins/schedule/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/schedule/expressions.py +185 -0
- slife2-0.1.0/slife2/plugins/schedule/server.py +1044 -0
- slife2-0.1.0/slife2/plugins/schedule/store.py +640 -0
- slife2-0.1.0/slife2/plugins/skills/__init__.py +2 -0
- slife2-0.1.0/slife2/plugins/skills/playbooks.py +643 -0
- slife2-0.1.0/slife2/plugins/skills/server.py +404 -0
- slife2-0.1.0/slife2/plugins/toolhub/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/toolhub/server.py +2900 -0
- slife2-0.1.0/slife2/plugins/tui/__init__.py +4 -0
- slife2-0.1.0/slife2/plugins/tui/server.py +529 -0
- slife2-0.1.0/slife2/plugins/wechat/__init__.py +1 -0
- slife2-0.1.0/slife2/plugins/wechat/ilink.py +637 -0
- slife2-0.1.0/slife2/plugins/wechat/server.py +1630 -0
- slife2-0.1.0/slife2/tui/__init__.py +14 -0
- slife2-0.1.0/slife2/tui/app.py +1047 -0
- slife2-0.1.0/slife2/tui/app.tcss +159 -0
- slife2-0.1.0/slife2/tui/client.py +645 -0
- slife2-0.1.0/slife2/tui/notes.py +83 -0
- slife2-0.1.0/slife2/tui/restore.py +263 -0
- slife2-0.1.0/slife2/tui/theme.py +74 -0
- slife2-0.1.0/slife2/tui/widgets.py +1689 -0
- slife2-0.1.0/slife2.yaml +851 -0
- slife2-0.1.0/tests/clients/test_gateway.py +571 -0
- slife2-0.1.0/tests/clients/test_mcp_backend.py +244 -0
- slife2-0.1.0/tests/clients/test_toolclient.py +469 -0
- slife2-0.1.0/tests/conftest.py +220 -0
- slife2-0.1.0/tests/e2e/test_a_turn_over_the_real_stack.py +401 -0
- slife2-0.1.0/tests/fakes.py +611 -0
- slife2-0.1.0/tests/helpers/test_timeutil.py +280 -0
- slife2-0.1.0/tests/libs/harness/test_markers.py +102 -0
- slife2-0.1.0/tests/libs/host/test_config.py +1226 -0
- slife2-0.1.0/tests/libs/host/test_configfile.py +582 -0
- slife2-0.1.0/tests/libs/host/test_launcher.py +960 -0
- slife2-0.1.0/tests/libs/host/test_paths.py +152 -0
- slife2-0.1.0/tests/libs/host/test_runtime.py +887 -0
- slife2-0.1.0/tests/libs/model/test_wire.py +261 -0
- slife2-0.1.0/tests/libs/plugin/test_protocol.py +234 -0
- slife2-0.1.0/tests/libs/store/test_db.py +614 -0
- slife2-0.1.0/tests/libs/store/test_db_search.py +646 -0
- slife2-0.1.0/tests/libs/store/test_textindex.py +150 -0
- slife2-0.1.0/tests/libs/store/test_toolsdb.py +1123 -0
- slife2-0.1.0/tests/libs/turn/test_attachments.py +237 -0
- slife2-0.1.0/tests/libs/turn/test_loop.py +612 -0
- slife2-0.1.0/tests/libs/turn/test_tokens.py +173 -0
- slife2-0.1.0/tests/libs/turn/test_tool_params.py +641 -0
- slife2-0.1.0/tests/libs/turn/test_tools.py +84 -0
- slife2-0.1.0/tests/plugins/a2a/test_a2a.py +1961 -0
- slife2-0.1.0/tests/plugins/agent/test_model_tools.py +417 -0
- slife2-0.1.0/tests/plugins/agent/test_server.py +2215 -0
- slife2-0.1.0/tests/plugins/agent_task/test_agent_task.py +914 -0
- slife2-0.1.0/tests/plugins/cabinet/test_cabinet.py +911 -0
- slife2-0.1.0/tests/plugins/cli/test_cli_server.py +404 -0
- slife2-0.1.0/tests/plugins/context/test_context_server.py +954 -0
- slife2-0.1.0/tests/plugins/file_tunnel/test_file_tunnel.py +766 -0
- slife2-0.1.0/tests/plugins/file_tunnel/test_file_tunnel_providers.py +861 -0
- slife2-0.1.0/tests/plugins/llm/test_embeddings_server.py +299 -0
- slife2-0.1.0/tests/plugins/llm/test_llm_servers.py +2116 -0
- slife2-0.1.0/tests/plugins/mcp_tools/test_mcp_tools.py +349 -0
- slife2-0.1.0/tests/plugins/media/test_media.py +757 -0
- slife2-0.1.0/tests/plugins/restapi/test_restapi_tools.py +389 -0
- slife2-0.1.0/tests/plugins/schedule/test_schedule.py +1290 -0
- slife2-0.1.0/tests/plugins/skills/test_skills.py +452 -0
- slife2-0.1.0/tests/plugins/skills/test_skills_server.py +348 -0
- slife2-0.1.0/tests/plugins/skills/test_skills_tools.py +357 -0
- slife2-0.1.0/tests/plugins/toolhub/test_toolhub.py +2498 -0
- slife2-0.1.0/tests/plugins/tui/test_tui_control.py +489 -0
- slife2-0.1.0/tests/plugins/wechat/test_wechat.py +1488 -0
- slife2-0.1.0/tests/test_no_magic_timeouts.py +431 -0
- slife2-0.1.0/tests/test_smoke.py +360 -0
- slife2-0.1.0/tests/tui/test_approval.py +209 -0
- slife2-0.1.0/tests/tui/test_tui.py +2665 -0
- slife2-0.1.0/tests/tui/test_tui_client.py +516 -0
slife2-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# UV
|
|
95
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
96
|
+
# uv.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# poetry.lock
|
|
100
|
+
# poetry.toml
|
|
101
|
+
|
|
102
|
+
# pdm
|
|
103
|
+
.pdm-python
|
|
104
|
+
.pdm-build/
|
|
105
|
+
|
|
106
|
+
# pixi
|
|
107
|
+
.pixi
|
|
108
|
+
|
|
109
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
110
|
+
__pypackages__/
|
|
111
|
+
|
|
112
|
+
# Celery stuff
|
|
113
|
+
celerybeat-schedule
|
|
114
|
+
celerybeat.pid
|
|
115
|
+
|
|
116
|
+
# Redis
|
|
117
|
+
*.rdb
|
|
118
|
+
*.aof
|
|
119
|
+
*.pid
|
|
120
|
+
|
|
121
|
+
# RabbitMQ
|
|
122
|
+
mnesia/
|
|
123
|
+
rabbitmq/
|
|
124
|
+
rabbitmq-data/
|
|
125
|
+
|
|
126
|
+
# ActiveMQ
|
|
127
|
+
activemq-data/
|
|
128
|
+
|
|
129
|
+
# SageMath parsed files
|
|
130
|
+
*.sage.py
|
|
131
|
+
|
|
132
|
+
# Environments
|
|
133
|
+
.env
|
|
134
|
+
.envrc
|
|
135
|
+
.venv
|
|
136
|
+
env/
|
|
137
|
+
venv/
|
|
138
|
+
ENV/
|
|
139
|
+
env.bak/
|
|
140
|
+
venv.bak/
|
|
141
|
+
|
|
142
|
+
# Spyder project settings
|
|
143
|
+
.spyderproject
|
|
144
|
+
.spyproject
|
|
145
|
+
|
|
146
|
+
# Rope project settings
|
|
147
|
+
.ropeproject
|
|
148
|
+
|
|
149
|
+
# mkdocs documentation
|
|
150
|
+
/site
|
|
151
|
+
|
|
152
|
+
# mypy
|
|
153
|
+
.mypy_cache/
|
|
154
|
+
.dmypy.json
|
|
155
|
+
dmypy.json
|
|
156
|
+
|
|
157
|
+
# Pyre type checker
|
|
158
|
+
.pyre/
|
|
159
|
+
|
|
160
|
+
# pytype static type analyzer
|
|
161
|
+
.pytype/
|
|
162
|
+
|
|
163
|
+
# Cython debug symbols
|
|
164
|
+
cython_debug/
|
|
165
|
+
|
|
166
|
+
# PyCharm
|
|
167
|
+
# .idea/
|
|
168
|
+
|
|
169
|
+
# Abstra
|
|
170
|
+
.abstra/
|
|
171
|
+
|
|
172
|
+
# Visual Studio Code
|
|
173
|
+
# .vscode/
|
|
174
|
+
tempCodeRunnerFile.py
|
|
175
|
+
|
|
176
|
+
# Ruff stuff:
|
|
177
|
+
.ruff_cache/
|
|
178
|
+
|
|
179
|
+
# PyPI configuration file
|
|
180
|
+
.pypirc
|
|
181
|
+
|
|
182
|
+
# Marimo
|
|
183
|
+
marimo/_static/
|
|
184
|
+
marimo/_lsp/
|
|
185
|
+
__marimo__/
|
|
186
|
+
|
|
187
|
+
# Streamlit
|
|
188
|
+
.streamlit/secrets.toml
|
|
189
|
+
|
|
190
|
+
# slife2's data directory, when it is the checkout itself.
|
|
191
|
+
#
|
|
192
|
+
# A checkout keeps its data beside itself so the checked-in slife2.yaml is the
|
|
193
|
+
# one in use and agents/ is a directory you can open. That puts generated
|
|
194
|
+
# state in the working tree, which is exactly what this keeps out of it:
|
|
195
|
+
# runtime/ is a daemon's bookkeeping and agents/ is where a conversation, a
|
|
196
|
+
# cabinet and a WeChat login live, and none of them belongs in a commit. slife2.yaml and skills/ are deliberately NOT ignored —
|
|
197
|
+
# both are written by a person rather than produced by a run, and neither holds
|
|
198
|
+
# a secret, so both are the file the whole arrangement exists to read.
|
|
199
|
+
runtime/
|
|
200
|
+
agents/
|