onetool-mcp 1.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bench/__init__.py +5 -0
- bench/cli.py +69 -0
- bench/harness/__init__.py +66 -0
- bench/harness/client.py +692 -0
- bench/harness/config.py +397 -0
- bench/harness/csv_writer.py +109 -0
- bench/harness/evaluate.py +512 -0
- bench/harness/metrics.py +283 -0
- bench/harness/runner.py +899 -0
- bench/py.typed +0 -0
- bench/reporter.py +629 -0
- bench/run.py +487 -0
- bench/secrets.py +101 -0
- bench/utils.py +16 -0
- onetool/__init__.py +4 -0
- onetool/cli.py +391 -0
- onetool/py.typed +0 -0
- onetool_mcp-1.0.0b1.dist-info/METADATA +163 -0
- onetool_mcp-1.0.0b1.dist-info/RECORD +132 -0
- onetool_mcp-1.0.0b1.dist-info/WHEEL +4 -0
- onetool_mcp-1.0.0b1.dist-info/entry_points.txt +3 -0
- onetool_mcp-1.0.0b1.dist-info/licenses/LICENSE.txt +687 -0
- onetool_mcp-1.0.0b1.dist-info/licenses/NOTICE.txt +64 -0
- ot/__init__.py +37 -0
- ot/__main__.py +6 -0
- ot/_cli.py +107 -0
- ot/_tui.py +53 -0
- ot/config/__init__.py +46 -0
- ot/config/defaults/bench.yaml +4 -0
- ot/config/defaults/diagram-templates/api-flow.mmd +33 -0
- ot/config/defaults/diagram-templates/c4-context.puml +30 -0
- ot/config/defaults/diagram-templates/class-diagram.mmd +87 -0
- ot/config/defaults/diagram-templates/feature-mindmap.mmd +70 -0
- ot/config/defaults/diagram-templates/microservices.d2 +81 -0
- ot/config/defaults/diagram-templates/project-gantt.mmd +37 -0
- ot/config/defaults/diagram-templates/state-machine.mmd +42 -0
- ot/config/defaults/onetool.yaml +25 -0
- ot/config/defaults/prompts.yaml +97 -0
- ot/config/defaults/servers.yaml +7 -0
- ot/config/defaults/snippets.yaml +4 -0
- ot/config/defaults/tool_templates/__init__.py +7 -0
- ot/config/defaults/tool_templates/extension.py +52 -0
- ot/config/defaults/tool_templates/isolated.py +61 -0
- ot/config/dynamic.py +121 -0
- ot/config/global_templates/__init__.py +2 -0
- ot/config/global_templates/bench-secrets-template.yaml +6 -0
- ot/config/global_templates/bench.yaml +9 -0
- ot/config/global_templates/onetool.yaml +27 -0
- ot/config/global_templates/secrets-template.yaml +44 -0
- ot/config/global_templates/servers.yaml +18 -0
- ot/config/global_templates/snippets.yaml +235 -0
- ot/config/loader.py +1087 -0
- ot/config/mcp.py +145 -0
- ot/config/secrets.py +190 -0
- ot/config/tool_config.py +125 -0
- ot/decorators.py +116 -0
- ot/executor/__init__.py +35 -0
- ot/executor/base.py +16 -0
- ot/executor/fence_processor.py +83 -0
- ot/executor/linter.py +142 -0
- ot/executor/pack_proxy.py +260 -0
- ot/executor/param_resolver.py +140 -0
- ot/executor/pep723.py +288 -0
- ot/executor/result_store.py +369 -0
- ot/executor/runner.py +496 -0
- ot/executor/simple.py +163 -0
- ot/executor/tool_loader.py +396 -0
- ot/executor/validator.py +398 -0
- ot/executor/worker_pool.py +388 -0
- ot/executor/worker_proxy.py +189 -0
- ot/http_client.py +145 -0
- ot/logging/__init__.py +37 -0
- ot/logging/config.py +315 -0
- ot/logging/entry.py +213 -0
- ot/logging/format.py +188 -0
- ot/logging/span.py +349 -0
- ot/meta.py +1555 -0
- ot/paths.py +453 -0
- ot/prompts.py +218 -0
- ot/proxy/__init__.py +21 -0
- ot/proxy/manager.py +396 -0
- ot/py.typed +0 -0
- ot/registry/__init__.py +189 -0
- ot/registry/models.py +57 -0
- ot/registry/parser.py +269 -0
- ot/registry/registry.py +413 -0
- ot/server.py +315 -0
- ot/shortcuts/__init__.py +15 -0
- ot/shortcuts/aliases.py +87 -0
- ot/shortcuts/snippets.py +258 -0
- ot/stats/__init__.py +35 -0
- ot/stats/html.py +250 -0
- ot/stats/jsonl_writer.py +283 -0
- ot/stats/reader.py +354 -0
- ot/stats/timing.py +57 -0
- ot/support.py +63 -0
- ot/tools.py +114 -0
- ot/utils/__init__.py +81 -0
- ot/utils/batch.py +161 -0
- ot/utils/cache.py +120 -0
- ot/utils/deps.py +403 -0
- ot/utils/exceptions.py +23 -0
- ot/utils/factory.py +179 -0
- ot/utils/format.py +65 -0
- ot/utils/http.py +202 -0
- ot/utils/platform.py +45 -0
- ot/utils/sanitize.py +130 -0
- ot/utils/truncate.py +69 -0
- ot_tools/__init__.py +4 -0
- ot_tools/_convert/__init__.py +12 -0
- ot_tools/_convert/excel.py +279 -0
- ot_tools/_convert/pdf.py +254 -0
- ot_tools/_convert/powerpoint.py +268 -0
- ot_tools/_convert/utils.py +358 -0
- ot_tools/_convert/word.py +283 -0
- ot_tools/brave_search.py +604 -0
- ot_tools/code_search.py +736 -0
- ot_tools/context7.py +495 -0
- ot_tools/convert.py +614 -0
- ot_tools/db.py +415 -0
- ot_tools/diagram.py +1604 -0
- ot_tools/diagram.yaml +167 -0
- ot_tools/excel.py +1372 -0
- ot_tools/file.py +1348 -0
- ot_tools/firecrawl.py +732 -0
- ot_tools/grounding_search.py +646 -0
- ot_tools/package.py +604 -0
- ot_tools/py.typed +0 -0
- ot_tools/ripgrep.py +544 -0
- ot_tools/scaffold.py +471 -0
- ot_tools/transform.py +213 -0
- ot_tools/web_fetch.py +384 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# OneTool Default Snippets Library
|
|
2
|
+
# Load via: include: [snippets.yaml] (falls back to bundled)
|
|
3
|
+
|
|
4
|
+
snippets:
|
|
5
|
+
|
|
6
|
+
# ============================================================================
|
|
7
|
+
# BRAVE SEARCH (brv_)
|
|
8
|
+
# ============================================================================
|
|
9
|
+
|
|
10
|
+
brv:
|
|
11
|
+
description: Batch search using Brave (pipe-separated queries)
|
|
12
|
+
params:
|
|
13
|
+
q: { description: "Pipe-separated search queries" }
|
|
14
|
+
count: { default: 10, description: "Results per query" }
|
|
15
|
+
body: |
|
|
16
|
+
brave.search_batch(queries=[{% for item in q.split('|') %}"{{ item.strip() }}"{% if not loop.last %}, {% endif %}{% endfor %}], count={{ count }})
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
brv_research:
|
|
20
|
+
description: Search web and extract structured findings
|
|
21
|
+
params:
|
|
22
|
+
q: { description: "Topic to research" }
|
|
23
|
+
count: { default: 10, description: "Number of sources" }
|
|
24
|
+
body: |
|
|
25
|
+
results = brave.search(query="{{ q }}", count={{ count }})
|
|
26
|
+
llm.transform(input=results, prompt="Extract key findings as bullet points with sources")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# ============================================================================
|
|
31
|
+
# CONTEXT7 DOCS (c7_)
|
|
32
|
+
# ============================================================================
|
|
33
|
+
|
|
34
|
+
c7:
|
|
35
|
+
description: Fetch library documentation for a topic
|
|
36
|
+
params:
|
|
37
|
+
q: { default: "", description: "Topic to search for (e.g., 'hooks', 'routing')" }
|
|
38
|
+
lib: { description: "Library name or key (e.g., 'react', 'next.js', 'vercel/next.js')" }
|
|
39
|
+
body: |
|
|
40
|
+
context7.doc(library_key="{{ lib }}", topic="{{ q }}", mode="info")
|
|
41
|
+
|
|
42
|
+
c7_lib:
|
|
43
|
+
description: Search for a library to get its key
|
|
44
|
+
params:
|
|
45
|
+
q: { description: "Library name to search for (e.g., 'react', 'fastapi')" }
|
|
46
|
+
body: |
|
|
47
|
+
context7.search(query="{{ q }}")
|
|
48
|
+
|
|
49
|
+
c7_eg:
|
|
50
|
+
description: Fetch code examples from library docs
|
|
51
|
+
params:
|
|
52
|
+
lib: { description: "Library key in org/repo format (e.g., 'facebook/react')" }
|
|
53
|
+
q: { description: "Feature/API to get examples for" }
|
|
54
|
+
body: |
|
|
55
|
+
context7.doc(library_key="{{ lib }}", topic="{{ q }}", mode="code")
|
|
56
|
+
|
|
57
|
+
# ============================================================================
|
|
58
|
+
# GROUND SEARCH (g_)
|
|
59
|
+
# ============================================================================
|
|
60
|
+
g:
|
|
61
|
+
description: Batch search using Gemini grounding (pipe-separated queries)
|
|
62
|
+
params:
|
|
63
|
+
q: { description: "Pipe-separated search queries" }
|
|
64
|
+
tech: { default: "", description: "Technology stack context" }
|
|
65
|
+
focus: { default: "general", description: "Focus mode: general, code, documentation, troubleshooting" }
|
|
66
|
+
body: |
|
|
67
|
+
ground.search_batch(queries=[{% for item in q.split('|') %}"{{ item.strip() }}"{% if not loop.last %}, {% endif %}{% endfor %}], context="{{ tech }}", focus="{{ focus }}")
|
|
68
|
+
|
|
69
|
+
g_reddit:
|
|
70
|
+
description: Find community discussions on a topic
|
|
71
|
+
params:
|
|
72
|
+
q: { description: "Topic to discuss" }
|
|
73
|
+
subreddit: { default: "", description: "Specific subreddit" }
|
|
74
|
+
body: |
|
|
75
|
+
ground.reddit(query="{{ q }}"{% if subreddit %}, subreddit="{{ subreddit }}"{% endif %})
|
|
76
|
+
|
|
77
|
+
# ============================================================================
|
|
78
|
+
# RIPGREP (rg_)
|
|
79
|
+
# ============================================================================
|
|
80
|
+
|
|
81
|
+
rg:
|
|
82
|
+
description: Search files with ripgrep
|
|
83
|
+
params:
|
|
84
|
+
p: { description: "Regex pattern to search for" }
|
|
85
|
+
path: { default: ".", description: "Search path" }
|
|
86
|
+
glob: { default: "", description: "File glob filter (e.g., '*.py', '*.{ts,tsx}')" }
|
|
87
|
+
ft: { default: "", description: "File type filter (py, ts, js, etc.)" }
|
|
88
|
+
ctx: { default: 0, description: "Lines of context before/after match" }
|
|
89
|
+
count: { default: "", description: "Max matching lines to return" }
|
|
90
|
+
body: |
|
|
91
|
+
ripgrep.search(pattern="{{ p }}", path="{{ path }}"{% if glob %}, glob="{{ glob }}"{% endif %}{% if ft %}, file_type="{{ ft }}"{% endif %}{% if ctx %}, context={{ ctx }}{% endif %}{% if count %}, max_results={{ count }}{% endif %})
|
|
92
|
+
|
|
93
|
+
rg_count:
|
|
94
|
+
description: Count pattern occurrences by file
|
|
95
|
+
params:
|
|
96
|
+
p: { description: "Pattern to count" }
|
|
97
|
+
ft: { default: "", description: "File type filter (py, ts, etc.)" }
|
|
98
|
+
body: |
|
|
99
|
+
{% if ft %}ripgrep.count(pattern="{{ p }}", file_type="{{ ft }}"){% else %}ripgrep.count(pattern="{{ p }}"){% endif %}
|
|
100
|
+
|
|
101
|
+
# ============================================================================
|
|
102
|
+
# PACKAGE (pkg_)
|
|
103
|
+
# ============================================================================
|
|
104
|
+
|
|
105
|
+
pkg:
|
|
106
|
+
description: Audit project dependencies against latest registry versions
|
|
107
|
+
params:
|
|
108
|
+
path: { default: ".", description: "Project directory path" }
|
|
109
|
+
body: |
|
|
110
|
+
package.audit(path="{{ path }}")
|
|
111
|
+
|
|
112
|
+
pkg_npm:
|
|
113
|
+
description: Check latest npm package versions
|
|
114
|
+
params:
|
|
115
|
+
packages: { description: "Comma-separated package names" }
|
|
116
|
+
body: |
|
|
117
|
+
package.npm(packages=[{% for pkg in packages.split(',') %}"{{ pkg.strip() }}"{% if not loop.last %}, {% endif %}{% endfor %}])
|
|
118
|
+
|
|
119
|
+
pkg_pypi:
|
|
120
|
+
description: Check latest PyPI package versions
|
|
121
|
+
params:
|
|
122
|
+
packages: { description: "Comma-separated package names" }
|
|
123
|
+
body: |
|
|
124
|
+
package.pypi(packages=[{% for pkg in packages.split(',') %}"{{ pkg.strip() }}"{% if not loop.last %}, {% endif %}{% endfor %}])
|
|
125
|
+
|
|
126
|
+
pkg_model:
|
|
127
|
+
description: Search OpenRouter for AI models
|
|
128
|
+
params:
|
|
129
|
+
q: { default: "", description: "Search term (claude, gpt-4)" }
|
|
130
|
+
provider: { default: "", description: "Filter by provider" }
|
|
131
|
+
body: |
|
|
132
|
+
package.models(query="{{ q }}", provider="{{ provider }}", limit=10)
|
|
133
|
+
|
|
134
|
+
# ============================================================================
|
|
135
|
+
# WEB FETCH (web_)
|
|
136
|
+
# ============================================================================
|
|
137
|
+
web:
|
|
138
|
+
description: Fetch multiple URLs concurrently
|
|
139
|
+
params:
|
|
140
|
+
u: { description: "Pipe-separated URLs to fetch" }
|
|
141
|
+
f: { default: "markdown", description: "Output format: text, markdown, json" }
|
|
142
|
+
links: { default: false, description: "Include hyperlinks" }
|
|
143
|
+
max: { default: "", description: "Max length per URL" }
|
|
144
|
+
body: |
|
|
145
|
+
web.fetch_batch(urls=[{% for url in u.split('|') %}"{{ url.strip() }}"{% if not loop.last %}, {% endif %}{% endfor %}], output_format="{{ f }}", include_links={{ links }}{% if max %}, max_length={{ max }}{% endif %})
|
|
146
|
+
|
|
147
|
+
web_data:
|
|
148
|
+
description: Extract structured data from a web page
|
|
149
|
+
params:
|
|
150
|
+
u: { description: "URL to fetch" }
|
|
151
|
+
schema: { description: "What to extract (e.g., 'prices as {item, price}')" }
|
|
152
|
+
body: |
|
|
153
|
+
content = web.fetch(url="{{ u }}", include_tables=True)
|
|
154
|
+
llm.transform(input=content, prompt="Extract {{ schema }} as YAML")
|
|
155
|
+
|
|
156
|
+
web_summary:
|
|
157
|
+
description: Fetch and summarize a web page
|
|
158
|
+
params:
|
|
159
|
+
u: { description: "URL to fetch" }
|
|
160
|
+
focus: { default: "", description: "What to focus on" }
|
|
161
|
+
body: |
|
|
162
|
+
content = web.fetch(url="{{ u }}", output_format="markdown", fast=True)
|
|
163
|
+
llm.transform(input=content, prompt="Summarize this page concisely{% if focus %}, focusing on {{ focus }}{% endif %}")
|
|
164
|
+
# ============================================================================
|
|
165
|
+
# FIRECRAWL (f_)
|
|
166
|
+
# ============================================================================
|
|
167
|
+
|
|
168
|
+
f:
|
|
169
|
+
description: Batch search using Firecrawl (pipe-separated queries)
|
|
170
|
+
params:
|
|
171
|
+
q: { description: "Pipe-separated search queries" }
|
|
172
|
+
count: { default: 10, description: "Results per query" }
|
|
173
|
+
body: |
|
|
174
|
+
results = {}
|
|
175
|
+
for query in [{% for item in q.split('|') %}"{{ item.strip() }}"{% if not loop.last %}, {% endif %}{% endfor %}]:
|
|
176
|
+
results[query] = firecrawl.search(query=query, limit={{ count }})
|
|
177
|
+
results
|
|
178
|
+
|
|
179
|
+
f_fetch:
|
|
180
|
+
description: Fetch a page using Firecrawl scrape
|
|
181
|
+
params:
|
|
182
|
+
u: { required: true, description: "URL to fetch" }
|
|
183
|
+
body: |
|
|
184
|
+
firecrawl.scrape(url="{{ u }}")
|
|
185
|
+
|
|
186
|
+
# ============================================================================
|
|
187
|
+
# GITHUB (gh_)
|
|
188
|
+
# ============================================================================
|
|
189
|
+
|
|
190
|
+
gh:
|
|
191
|
+
description: Search GitHub repositories and return URLs/info for multiple pages
|
|
192
|
+
params:
|
|
193
|
+
q: { description: "GitHub search query" }
|
|
194
|
+
count: { default: 1, description: "Number of pages to fetch (30 results per page)" }
|
|
195
|
+
body: |
|
|
196
|
+
import json
|
|
197
|
+
results = []
|
|
198
|
+
for page in range(1, {{ count }} + 1):
|
|
199
|
+
r = github.search_repositories(query="{{ q }}", page=page, perPage=30)
|
|
200
|
+
data = json.loads(r) if isinstance(r, str) else r
|
|
201
|
+
for repo in data.get("items", []):
|
|
202
|
+
results.append({
|
|
203
|
+
"name": repo["full_name"],
|
|
204
|
+
"url": repo["html_url"],
|
|
205
|
+
"description": repo.get("description") or "",
|
|
206
|
+
"stars": repo.get("stargazers_count", 0),
|
|
207
|
+
"updated": repo.get("updated_at", "")[:10]
|
|
208
|
+
})
|
|
209
|
+
{"total": len(results), "repos": results}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
# ============================================================================
|
|
213
|
+
# INTERNAL TOOLS (ot_)
|
|
214
|
+
# ============================================================================
|
|
215
|
+
ot_reload:
|
|
216
|
+
description: Reload OneTool configuration and tools
|
|
217
|
+
body: |
|
|
218
|
+
ot.reload()
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
ot_status:
|
|
222
|
+
description: Show system health and configuration
|
|
223
|
+
params: {}
|
|
224
|
+
body: |
|
|
225
|
+
{"health": ot.health(), "config": ot.config()}
|
|
226
|
+
|
|
227
|
+
ot_notify:
|
|
228
|
+
description: Notify external processes of LLM progress
|
|
229
|
+
params:
|
|
230
|
+
topic: { default: "status", description: "Status updates" }
|
|
231
|
+
msg:
|
|
232
|
+
required: true
|
|
233
|
+
description: "Status message"
|
|
234
|
+
body: |
|
|
235
|
+
ot.notify(topic="status:{{ topic }}", message="{{ msg }}")
|