slide-lye 0.2.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.
- slide_lye-0.2.2/.gitignore +316 -0
- slide_lye-0.2.2/PKG-INFO +137 -0
- slide_lye-0.2.2/README.md +100 -0
- slide_lye-0.2.2/lye/__init__.py +132 -0
- slide_lye-0.2.2/lye/audio.py +268 -0
- slide_lye-0.2.2/lye/browser.py +232 -0
- slide_lye-0.2.2/lye/command_line.py +220 -0
- slide_lye-0.2.2/lye/files.py +495 -0
- slide_lye-0.2.2/lye/image.py +253 -0
- slide_lye-0.2.2/lye/notion.py +772 -0
- slide_lye-0.2.2/lye/slack.py +483 -0
- slide_lye-0.2.2/lye/utils/__init__.py +7 -0
- slide_lye-0.2.2/lye/utils/files.py +90 -0
- slide_lye-0.2.2/lye/utils/logging.py +58 -0
- slide_lye-0.2.2/lye/web.py +231 -0
- slide_lye-0.2.2/pyproject.toml +75 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
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
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be added to the global gitignore or merged into this project gitignore.
|
|
158
|
+
# For PyCharm Community Edition, use 'Community' instead of 'Professional'
|
|
159
|
+
.idea/
|
|
160
|
+
|
|
161
|
+
# VS Code
|
|
162
|
+
.vscode/
|
|
163
|
+
|
|
164
|
+
# macOS
|
|
165
|
+
.DS_Store
|
|
166
|
+
.AppleDouble
|
|
167
|
+
.LSOverride
|
|
168
|
+
|
|
169
|
+
# Icon must end with two \r
|
|
170
|
+
Icon
|
|
171
|
+
|
|
172
|
+
# Thumbnails
|
|
173
|
+
._*
|
|
174
|
+
|
|
175
|
+
# Files that might appear in the root of a volume
|
|
176
|
+
.DocumentRevisions-V100
|
|
177
|
+
.fseventsd
|
|
178
|
+
.Spotlight-V100
|
|
179
|
+
.TemporaryItems
|
|
180
|
+
.Trashes
|
|
181
|
+
.VolumeIcon.icns
|
|
182
|
+
.com.apple.timemachine.donotpresent
|
|
183
|
+
|
|
184
|
+
# Directories potentially created on remote AFP share
|
|
185
|
+
.AppleDB
|
|
186
|
+
.AppleDesktop
|
|
187
|
+
Network Trash Folder
|
|
188
|
+
Temporary Items
|
|
189
|
+
.apdisk
|
|
190
|
+
|
|
191
|
+
# Windows
|
|
192
|
+
Thumbs.db
|
|
193
|
+
Thumbs.db:encryptable
|
|
194
|
+
ehthumbs.db
|
|
195
|
+
ehthumbs_vista.db
|
|
196
|
+
|
|
197
|
+
# Dump file
|
|
198
|
+
*.stackdump
|
|
199
|
+
|
|
200
|
+
# Folder config file
|
|
201
|
+
[Dd]esktop.ini
|
|
202
|
+
|
|
203
|
+
# Recycle Bin used on file shares
|
|
204
|
+
$RECYCLE.BIN/
|
|
205
|
+
|
|
206
|
+
# Windows Installer files
|
|
207
|
+
*.cab
|
|
208
|
+
*.msi
|
|
209
|
+
*.msix
|
|
210
|
+
*.msm
|
|
211
|
+
*.msp
|
|
212
|
+
|
|
213
|
+
# Windows shortcuts
|
|
214
|
+
*.lnk
|
|
215
|
+
|
|
216
|
+
# Linux
|
|
217
|
+
*~
|
|
218
|
+
|
|
219
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
220
|
+
.fuse_hidden*
|
|
221
|
+
|
|
222
|
+
# KDE directory preferences
|
|
223
|
+
.directory
|
|
224
|
+
|
|
225
|
+
# Linux trash folder which might appear on any partition or disk
|
|
226
|
+
.Trash-*
|
|
227
|
+
|
|
228
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
229
|
+
.nfs*
|
|
230
|
+
|
|
231
|
+
# Node.js (for documentation sites)
|
|
232
|
+
node_modules/
|
|
233
|
+
npm-debug.log*
|
|
234
|
+
yarn-debug.log*
|
|
235
|
+
yarn-error.log*
|
|
236
|
+
lerna-debug.log*
|
|
237
|
+
.pnpm-debug.log*
|
|
238
|
+
|
|
239
|
+
# Package manager files
|
|
240
|
+
# package-lock.json # Allow legitimate lock files
|
|
241
|
+
yarn.lock
|
|
242
|
+
pnpm-lock.yaml
|
|
243
|
+
|
|
244
|
+
# Temporary folders
|
|
245
|
+
tmp/
|
|
246
|
+
temp/
|
|
247
|
+
|
|
248
|
+
# Database files
|
|
249
|
+
*.db
|
|
250
|
+
*.sqlite
|
|
251
|
+
*.sqlite3
|
|
252
|
+
|
|
253
|
+
# AI/ML model files
|
|
254
|
+
*.pkl
|
|
255
|
+
*.pickle
|
|
256
|
+
*.joblib
|
|
257
|
+
*.h5
|
|
258
|
+
*.hdf5
|
|
259
|
+
*.pt
|
|
260
|
+
*.pth
|
|
261
|
+
*.onnx
|
|
262
|
+
|
|
263
|
+
# Data files
|
|
264
|
+
# *.csv # Allow legitimate CSV files
|
|
265
|
+
# *.json # Too aggressive - allow config files
|
|
266
|
+
*.parquet
|
|
267
|
+
*.feather
|
|
268
|
+
*.xlsx
|
|
269
|
+
*.xls
|
|
270
|
+
|
|
271
|
+
# Log files
|
|
272
|
+
*.log
|
|
273
|
+
logs/
|
|
274
|
+
|
|
275
|
+
# Configuration files with secrets
|
|
276
|
+
.env.local
|
|
277
|
+
.env.development.local
|
|
278
|
+
.env.test.local
|
|
279
|
+
.env.production.local
|
|
280
|
+
secrets.yaml
|
|
281
|
+
secrets.yml
|
|
282
|
+
config.local.yaml
|
|
283
|
+
config.local.yml
|
|
284
|
+
|
|
285
|
+
# Backup files
|
|
286
|
+
*.bak
|
|
287
|
+
*.backup
|
|
288
|
+
*.old
|
|
289
|
+
*.orig
|
|
290
|
+
*.tmp
|
|
291
|
+
|
|
292
|
+
# Archive files
|
|
293
|
+
*.zip
|
|
294
|
+
*.tar
|
|
295
|
+
*.tar.gz
|
|
296
|
+
*.rar
|
|
297
|
+
*.7z
|
|
298
|
+
|
|
299
|
+
# Generated files
|
|
300
|
+
*.generated.*
|
|
301
|
+
*_generated.*
|
|
302
|
+
|
|
303
|
+
# Custom project ignores
|
|
304
|
+
# Add any project-specific ignores here
|
|
305
|
+
# Data files in specific locations (more targeted)
|
|
306
|
+
data/*.csv
|
|
307
|
+
data/*.json
|
|
308
|
+
datasets/*.csv
|
|
309
|
+
datasets/*.json
|
|
310
|
+
output/*.csv
|
|
311
|
+
output/*.json
|
|
312
|
+
temp/*.csv
|
|
313
|
+
temp/*.json
|
|
314
|
+
|
|
315
|
+
# Ignore Code Workspace files
|
|
316
|
+
*.code-workspace
|
slide_lye-0.2.2/PKG-INFO
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: slide-lye
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: Lye - Tools package for Tyler AI framework
|
|
5
|
+
Project-URL: Homepage, https://github.com/adamwdraper/slide
|
|
6
|
+
Project-URL: Repository, https://github.com/adamwdraper/slide
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/adamwdraper/slide/issues
|
|
8
|
+
Author: adamwdraper
|
|
9
|
+
License: MIT
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Requires-Python: >=3.12
|
|
17
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
18
|
+
Requires-Dist: browser-use>=0.1.40
|
|
19
|
+
Requires-Dist: httpx>=0.27.2
|
|
20
|
+
Requires-Dist: langchain-openai>=0.1.0
|
|
21
|
+
Requires-Dist: litellm>=1.60.2
|
|
22
|
+
Requires-Dist: pandas>=2.2.3
|
|
23
|
+
Requires-Dist: pdf2image>=1.17.0
|
|
24
|
+
Requires-Dist: platformdirs>=4.3.6
|
|
25
|
+
Requires-Dist: pypdf>=5.3.0
|
|
26
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
27
|
+
Requires-Dist: python-magic>=0.4.0
|
|
28
|
+
Requires-Dist: requests>=2.32.3
|
|
29
|
+
Requires-Dist: slack-sdk>=3.36.0
|
|
30
|
+
Requires-Dist: weave>=0.51.32
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: coverage>=7.6.10; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio>=0.25.2; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=8.3.4; extra == 'dev'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# Lye - Tools Package for Tyler
|
|
39
|
+
|
|
40
|
+
Lye is a collection of tools that extend Tyler's capabilities, providing integrations with various services and utilities.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install slide-lye
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
or with uv:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uv add slide-lye
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Available Tools
|
|
55
|
+
|
|
56
|
+
### Web Tools
|
|
57
|
+
- `fetch_page`: Fetch and extract content from web pages
|
|
58
|
+
- `download_file`: Download files from URLs
|
|
59
|
+
- `extract_text_from_html`: Extract text content from HTML
|
|
60
|
+
- `fetch_html`: Fetch raw HTML content
|
|
61
|
+
|
|
62
|
+
### Slack Tools
|
|
63
|
+
- `post_message`: Post messages to Slack channels
|
|
64
|
+
- `get_channel_history`: Get message history from channels
|
|
65
|
+
- `get_users`: Get list of users in workspace
|
|
66
|
+
- `search_messages`: Search for messages
|
|
67
|
+
- `upload_file`: Upload files to Slack
|
|
68
|
+
- `summarize_channel`: Get AI summary of channel activity
|
|
69
|
+
|
|
70
|
+
### Command Line Tools
|
|
71
|
+
- `execute_command`: Execute shell commands safely
|
|
72
|
+
- `list_directory`: List directory contents
|
|
73
|
+
- `search_files`: Search for files by pattern
|
|
74
|
+
|
|
75
|
+
### Notion Tools
|
|
76
|
+
- `search_pages`: Search Notion pages
|
|
77
|
+
- `create_page`: Create new Notion pages
|
|
78
|
+
- `update_page`: Update existing pages
|
|
79
|
+
- `get_page`: Get page content
|
|
80
|
+
- `delete_page`: Delete pages
|
|
81
|
+
- `list_databases`: List available databases
|
|
82
|
+
- `query_database`: Query database contents
|
|
83
|
+
- `create_database_item`: Create database entries
|
|
84
|
+
- `update_database_item`: Update database entries
|
|
85
|
+
|
|
86
|
+
### Image Tools
|
|
87
|
+
- `generate_image`: Generate images using AI
|
|
88
|
+
- `analyze_image`: Analyze image content
|
|
89
|
+
|
|
90
|
+
### Audio Tools
|
|
91
|
+
- `text_to_speech`: Convert text to speech
|
|
92
|
+
- `speech_to_text`: Convert speech to text
|
|
93
|
+
|
|
94
|
+
### File Tools
|
|
95
|
+
- `read_file`: Read various file formats
|
|
96
|
+
- `write_file`: Write content to files
|
|
97
|
+
- `read_pdf`: Extract text from PDFs
|
|
98
|
+
- `process_csv`: Read and analyze CSV files
|
|
99
|
+
- `read_json`: Read JSON files
|
|
100
|
+
- `write_json`: Write JSON files
|
|
101
|
+
|
|
102
|
+
### Browser Tools
|
|
103
|
+
- `browser_automate`: Automate browser interactions
|
|
104
|
+
- `browser_screenshot`: Take screenshots of web pages
|
|
105
|
+
|
|
106
|
+
## Usage with Tyler
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from tyler import Agent
|
|
110
|
+
|
|
111
|
+
# Use all tools from a module
|
|
112
|
+
agent = Agent(tools=["web", "slack"])
|
|
113
|
+
|
|
114
|
+
# Use specific tools
|
|
115
|
+
agent = Agent(tools=["web:fetch_page,download_file"])
|
|
116
|
+
|
|
117
|
+
# Import tools directly
|
|
118
|
+
from lye import WEB_TOOLS, SLACK_TOOLS
|
|
119
|
+
agent = Agent(tools=WEB_TOOLS + SLACK_TOOLS)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Development
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Install with dev dependencies
|
|
126
|
+
uv sync --dev
|
|
127
|
+
|
|
128
|
+
# Run tests
|
|
129
|
+
uv run pytest
|
|
130
|
+
|
|
131
|
+
# Run specific test
|
|
132
|
+
uv run pytest tests/test_web.py
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
MIT License - see LICENSE file for details.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Lye - Tools Package for Tyler
|
|
2
|
+
|
|
3
|
+
Lye is a collection of tools that extend Tyler's capabilities, providing integrations with various services and utilities.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install slide-lye
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
or with uv:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uv add slide-lye
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Available Tools
|
|
18
|
+
|
|
19
|
+
### Web Tools
|
|
20
|
+
- `fetch_page`: Fetch and extract content from web pages
|
|
21
|
+
- `download_file`: Download files from URLs
|
|
22
|
+
- `extract_text_from_html`: Extract text content from HTML
|
|
23
|
+
- `fetch_html`: Fetch raw HTML content
|
|
24
|
+
|
|
25
|
+
### Slack Tools
|
|
26
|
+
- `post_message`: Post messages to Slack channels
|
|
27
|
+
- `get_channel_history`: Get message history from channels
|
|
28
|
+
- `get_users`: Get list of users in workspace
|
|
29
|
+
- `search_messages`: Search for messages
|
|
30
|
+
- `upload_file`: Upload files to Slack
|
|
31
|
+
- `summarize_channel`: Get AI summary of channel activity
|
|
32
|
+
|
|
33
|
+
### Command Line Tools
|
|
34
|
+
- `execute_command`: Execute shell commands safely
|
|
35
|
+
- `list_directory`: List directory contents
|
|
36
|
+
- `search_files`: Search for files by pattern
|
|
37
|
+
|
|
38
|
+
### Notion Tools
|
|
39
|
+
- `search_pages`: Search Notion pages
|
|
40
|
+
- `create_page`: Create new Notion pages
|
|
41
|
+
- `update_page`: Update existing pages
|
|
42
|
+
- `get_page`: Get page content
|
|
43
|
+
- `delete_page`: Delete pages
|
|
44
|
+
- `list_databases`: List available databases
|
|
45
|
+
- `query_database`: Query database contents
|
|
46
|
+
- `create_database_item`: Create database entries
|
|
47
|
+
- `update_database_item`: Update database entries
|
|
48
|
+
|
|
49
|
+
### Image Tools
|
|
50
|
+
- `generate_image`: Generate images using AI
|
|
51
|
+
- `analyze_image`: Analyze image content
|
|
52
|
+
|
|
53
|
+
### Audio Tools
|
|
54
|
+
- `text_to_speech`: Convert text to speech
|
|
55
|
+
- `speech_to_text`: Convert speech to text
|
|
56
|
+
|
|
57
|
+
### File Tools
|
|
58
|
+
- `read_file`: Read various file formats
|
|
59
|
+
- `write_file`: Write content to files
|
|
60
|
+
- `read_pdf`: Extract text from PDFs
|
|
61
|
+
- `process_csv`: Read and analyze CSV files
|
|
62
|
+
- `read_json`: Read JSON files
|
|
63
|
+
- `write_json`: Write JSON files
|
|
64
|
+
|
|
65
|
+
### Browser Tools
|
|
66
|
+
- `browser_automate`: Automate browser interactions
|
|
67
|
+
- `browser_screenshot`: Take screenshots of web pages
|
|
68
|
+
|
|
69
|
+
## Usage with Tyler
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from tyler import Agent
|
|
73
|
+
|
|
74
|
+
# Use all tools from a module
|
|
75
|
+
agent = Agent(tools=["web", "slack"])
|
|
76
|
+
|
|
77
|
+
# Use specific tools
|
|
78
|
+
agent = Agent(tools=["web:fetch_page,download_file"])
|
|
79
|
+
|
|
80
|
+
# Import tools directly
|
|
81
|
+
from lye import WEB_TOOLS, SLACK_TOOLS
|
|
82
|
+
agent = Agent(tools=WEB_TOOLS + SLACK_TOOLS)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Install with dev dependencies
|
|
89
|
+
uv sync --dev
|
|
90
|
+
|
|
91
|
+
# Run tests
|
|
92
|
+
uv run pytest
|
|
93
|
+
|
|
94
|
+
# Run specific test
|
|
95
|
+
uv run pytest tests/test_web.py
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT License - see LICENSE file for details.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Lye - Tools package for Tyler
|
|
3
|
+
"""
|
|
4
|
+
__version__ = "0.2.2"
|
|
5
|
+
|
|
6
|
+
import importlib
|
|
7
|
+
import sys
|
|
8
|
+
import os
|
|
9
|
+
import glob
|
|
10
|
+
from typing import Dict, List
|
|
11
|
+
from lye.utils.logging import get_logger
|
|
12
|
+
|
|
13
|
+
# Get configured logger
|
|
14
|
+
logger = get_logger(__name__)
|
|
15
|
+
|
|
16
|
+
# Initialize empty tool lists for each module
|
|
17
|
+
WEB_TOOLS = []
|
|
18
|
+
SLACK_TOOLS = []
|
|
19
|
+
COMMAND_LINE_TOOLS = []
|
|
20
|
+
NOTION_TOOLS = []
|
|
21
|
+
IMAGE_TOOLS = []
|
|
22
|
+
AUDIO_TOOLS = []
|
|
23
|
+
FILES_TOOLS = []
|
|
24
|
+
BROWSER_TOOLS = []
|
|
25
|
+
|
|
26
|
+
# Combined tools list
|
|
27
|
+
TOOLS = []
|
|
28
|
+
|
|
29
|
+
# Try to import each tool module
|
|
30
|
+
try:
|
|
31
|
+
from . import web
|
|
32
|
+
from . import slack
|
|
33
|
+
from . import command_line
|
|
34
|
+
from . import notion
|
|
35
|
+
from . import image
|
|
36
|
+
from . import audio
|
|
37
|
+
from . import files
|
|
38
|
+
from . import browser
|
|
39
|
+
|
|
40
|
+
except ImportError as e:
|
|
41
|
+
print(f"Warning: Some tool modules could not be imported: {e}")
|
|
42
|
+
|
|
43
|
+
# Get tool lists from each module and maintain both individual and combined lists
|
|
44
|
+
try:
|
|
45
|
+
module_tools = getattr(web, "TOOLS", [])
|
|
46
|
+
WEB_TOOLS.extend(module_tools)
|
|
47
|
+
TOOLS.extend(module_tools)
|
|
48
|
+
except Exception as e:
|
|
49
|
+
print(f"Warning: Could not load web tools: {e}")
|
|
50
|
+
|
|
51
|
+
try:
|
|
52
|
+
module_tools = getattr(slack, "TOOLS", [])
|
|
53
|
+
SLACK_TOOLS.extend(module_tools)
|
|
54
|
+
TOOLS.extend(module_tools)
|
|
55
|
+
except Exception as e:
|
|
56
|
+
print(f"Warning: Could not load slack tools: {e}")
|
|
57
|
+
|
|
58
|
+
try:
|
|
59
|
+
module_tools = getattr(command_line, "TOOLS", [])
|
|
60
|
+
COMMAND_LINE_TOOLS.extend(module_tools)
|
|
61
|
+
TOOLS.extend(module_tools)
|
|
62
|
+
except Exception as e:
|
|
63
|
+
print(f"Warning: Could not load command line tools: {e}")
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
module_tools = getattr(notion, "TOOLS", [])
|
|
67
|
+
NOTION_TOOLS.extend(module_tools)
|
|
68
|
+
TOOLS.extend(module_tools)
|
|
69
|
+
except Exception as e:
|
|
70
|
+
print(f"Warning: Could not load notion tools: {e}")
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
module_tools = getattr(image, "TOOLS", [])
|
|
74
|
+
IMAGE_TOOLS.extend(module_tools)
|
|
75
|
+
TOOLS.extend(module_tools)
|
|
76
|
+
except Exception as e:
|
|
77
|
+
print(f"Warning: Could not load image tools: {e}")
|
|
78
|
+
|
|
79
|
+
try:
|
|
80
|
+
module_tools = getattr(audio, "TOOLS", [])
|
|
81
|
+
AUDIO_TOOLS.extend(module_tools)
|
|
82
|
+
TOOLS.extend(module_tools)
|
|
83
|
+
except Exception as e:
|
|
84
|
+
print(f"Warning: Could not load audio tools: {e}")
|
|
85
|
+
|
|
86
|
+
try:
|
|
87
|
+
module_tools = getattr(files, "TOOLS", [])
|
|
88
|
+
FILES_TOOLS.extend(module_tools)
|
|
89
|
+
TOOLS.extend(module_tools)
|
|
90
|
+
except Exception as e:
|
|
91
|
+
print(f"Warning: Could not load files tools: {e}")
|
|
92
|
+
|
|
93
|
+
try:
|
|
94
|
+
module_tools = getattr(browser, "TOOLS", [])
|
|
95
|
+
BROWSER_TOOLS.extend(module_tools)
|
|
96
|
+
TOOLS.extend(module_tools)
|
|
97
|
+
except Exception as e:
|
|
98
|
+
print(f"Warning: Could not load browser tools: {e}")
|
|
99
|
+
|
|
100
|
+
__all__ = [
|
|
101
|
+
# Module-level tool lists
|
|
102
|
+
'TOOLS',
|
|
103
|
+
'WEB_TOOLS',
|
|
104
|
+
'FILES_TOOLS',
|
|
105
|
+
'COMMAND_LINE_TOOLS',
|
|
106
|
+
'AUDIO_TOOLS',
|
|
107
|
+
'IMAGE_TOOLS',
|
|
108
|
+
'BROWSER_TOOLS',
|
|
109
|
+
'SLACK_TOOLS',
|
|
110
|
+
'NOTION_TOOLS',
|
|
111
|
+
# Module namespaces for cleaner imports
|
|
112
|
+
'web',
|
|
113
|
+
'files',
|
|
114
|
+
'command_line',
|
|
115
|
+
'audio',
|
|
116
|
+
'image',
|
|
117
|
+
'browser',
|
|
118
|
+
'slack',
|
|
119
|
+
'notion',
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
# Map of module names to their tools for dynamic loading
|
|
123
|
+
TOOL_MODULES: Dict[str, List] = {
|
|
124
|
+
'web': WEB_TOOLS,
|
|
125
|
+
'slack': SLACK_TOOLS,
|
|
126
|
+
'command_line': COMMAND_LINE_TOOLS,
|
|
127
|
+
'notion': NOTION_TOOLS,
|
|
128
|
+
'image': IMAGE_TOOLS,
|
|
129
|
+
'audio': AUDIO_TOOLS,
|
|
130
|
+
'files': FILES_TOOLS,
|
|
131
|
+
'browser': BROWSER_TOOLS
|
|
132
|
+
}
|