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.
Files changed (132) hide show
  1. bench/__init__.py +5 -0
  2. bench/cli.py +69 -0
  3. bench/harness/__init__.py +66 -0
  4. bench/harness/client.py +692 -0
  5. bench/harness/config.py +397 -0
  6. bench/harness/csv_writer.py +109 -0
  7. bench/harness/evaluate.py +512 -0
  8. bench/harness/metrics.py +283 -0
  9. bench/harness/runner.py +899 -0
  10. bench/py.typed +0 -0
  11. bench/reporter.py +629 -0
  12. bench/run.py +487 -0
  13. bench/secrets.py +101 -0
  14. bench/utils.py +16 -0
  15. onetool/__init__.py +4 -0
  16. onetool/cli.py +391 -0
  17. onetool/py.typed +0 -0
  18. onetool_mcp-1.0.0b1.dist-info/METADATA +163 -0
  19. onetool_mcp-1.0.0b1.dist-info/RECORD +132 -0
  20. onetool_mcp-1.0.0b1.dist-info/WHEEL +4 -0
  21. onetool_mcp-1.0.0b1.dist-info/entry_points.txt +3 -0
  22. onetool_mcp-1.0.0b1.dist-info/licenses/LICENSE.txt +687 -0
  23. onetool_mcp-1.0.0b1.dist-info/licenses/NOTICE.txt +64 -0
  24. ot/__init__.py +37 -0
  25. ot/__main__.py +6 -0
  26. ot/_cli.py +107 -0
  27. ot/_tui.py +53 -0
  28. ot/config/__init__.py +46 -0
  29. ot/config/defaults/bench.yaml +4 -0
  30. ot/config/defaults/diagram-templates/api-flow.mmd +33 -0
  31. ot/config/defaults/diagram-templates/c4-context.puml +30 -0
  32. ot/config/defaults/diagram-templates/class-diagram.mmd +87 -0
  33. ot/config/defaults/diagram-templates/feature-mindmap.mmd +70 -0
  34. ot/config/defaults/diagram-templates/microservices.d2 +81 -0
  35. ot/config/defaults/diagram-templates/project-gantt.mmd +37 -0
  36. ot/config/defaults/diagram-templates/state-machine.mmd +42 -0
  37. ot/config/defaults/onetool.yaml +25 -0
  38. ot/config/defaults/prompts.yaml +97 -0
  39. ot/config/defaults/servers.yaml +7 -0
  40. ot/config/defaults/snippets.yaml +4 -0
  41. ot/config/defaults/tool_templates/__init__.py +7 -0
  42. ot/config/defaults/tool_templates/extension.py +52 -0
  43. ot/config/defaults/tool_templates/isolated.py +61 -0
  44. ot/config/dynamic.py +121 -0
  45. ot/config/global_templates/__init__.py +2 -0
  46. ot/config/global_templates/bench-secrets-template.yaml +6 -0
  47. ot/config/global_templates/bench.yaml +9 -0
  48. ot/config/global_templates/onetool.yaml +27 -0
  49. ot/config/global_templates/secrets-template.yaml +44 -0
  50. ot/config/global_templates/servers.yaml +18 -0
  51. ot/config/global_templates/snippets.yaml +235 -0
  52. ot/config/loader.py +1087 -0
  53. ot/config/mcp.py +145 -0
  54. ot/config/secrets.py +190 -0
  55. ot/config/tool_config.py +125 -0
  56. ot/decorators.py +116 -0
  57. ot/executor/__init__.py +35 -0
  58. ot/executor/base.py +16 -0
  59. ot/executor/fence_processor.py +83 -0
  60. ot/executor/linter.py +142 -0
  61. ot/executor/pack_proxy.py +260 -0
  62. ot/executor/param_resolver.py +140 -0
  63. ot/executor/pep723.py +288 -0
  64. ot/executor/result_store.py +369 -0
  65. ot/executor/runner.py +496 -0
  66. ot/executor/simple.py +163 -0
  67. ot/executor/tool_loader.py +396 -0
  68. ot/executor/validator.py +398 -0
  69. ot/executor/worker_pool.py +388 -0
  70. ot/executor/worker_proxy.py +189 -0
  71. ot/http_client.py +145 -0
  72. ot/logging/__init__.py +37 -0
  73. ot/logging/config.py +315 -0
  74. ot/logging/entry.py +213 -0
  75. ot/logging/format.py +188 -0
  76. ot/logging/span.py +349 -0
  77. ot/meta.py +1555 -0
  78. ot/paths.py +453 -0
  79. ot/prompts.py +218 -0
  80. ot/proxy/__init__.py +21 -0
  81. ot/proxy/manager.py +396 -0
  82. ot/py.typed +0 -0
  83. ot/registry/__init__.py +189 -0
  84. ot/registry/models.py +57 -0
  85. ot/registry/parser.py +269 -0
  86. ot/registry/registry.py +413 -0
  87. ot/server.py +315 -0
  88. ot/shortcuts/__init__.py +15 -0
  89. ot/shortcuts/aliases.py +87 -0
  90. ot/shortcuts/snippets.py +258 -0
  91. ot/stats/__init__.py +35 -0
  92. ot/stats/html.py +250 -0
  93. ot/stats/jsonl_writer.py +283 -0
  94. ot/stats/reader.py +354 -0
  95. ot/stats/timing.py +57 -0
  96. ot/support.py +63 -0
  97. ot/tools.py +114 -0
  98. ot/utils/__init__.py +81 -0
  99. ot/utils/batch.py +161 -0
  100. ot/utils/cache.py +120 -0
  101. ot/utils/deps.py +403 -0
  102. ot/utils/exceptions.py +23 -0
  103. ot/utils/factory.py +179 -0
  104. ot/utils/format.py +65 -0
  105. ot/utils/http.py +202 -0
  106. ot/utils/platform.py +45 -0
  107. ot/utils/sanitize.py +130 -0
  108. ot/utils/truncate.py +69 -0
  109. ot_tools/__init__.py +4 -0
  110. ot_tools/_convert/__init__.py +12 -0
  111. ot_tools/_convert/excel.py +279 -0
  112. ot_tools/_convert/pdf.py +254 -0
  113. ot_tools/_convert/powerpoint.py +268 -0
  114. ot_tools/_convert/utils.py +358 -0
  115. ot_tools/_convert/word.py +283 -0
  116. ot_tools/brave_search.py +604 -0
  117. ot_tools/code_search.py +736 -0
  118. ot_tools/context7.py +495 -0
  119. ot_tools/convert.py +614 -0
  120. ot_tools/db.py +415 -0
  121. ot_tools/diagram.py +1604 -0
  122. ot_tools/diagram.yaml +167 -0
  123. ot_tools/excel.py +1372 -0
  124. ot_tools/file.py +1348 -0
  125. ot_tools/firecrawl.py +732 -0
  126. ot_tools/grounding_search.py +646 -0
  127. ot_tools/package.py +604 -0
  128. ot_tools/py.typed +0 -0
  129. ot_tools/ripgrep.py +544 -0
  130. ot_tools/scaffold.py +471 -0
  131. ot_tools/transform.py +213 -0
  132. ot_tools/web_fetch.py +384 -0
ot_tools/diagram.yaml ADDED
@@ -0,0 +1,167 @@
1
+ # Diagram tool configuration
2
+ # Load via: include: [diagram.yaml] (falls back to bundled)
3
+
4
+ tools:
5
+ diagram:
6
+ backend:
7
+ type: kroki
8
+ remote_url: https://kroki.io
9
+ self_hosted_url: http://localhost:8000
10
+ prefer: self_hosted # remote | self_hosted | auto
11
+ timeout: 30.0
12
+
13
+ policy:
14
+ rules: |
15
+ NEVER use ASCII art or text-based diagrams in markdown.
16
+ Use the diagram tools for all visual representations.
17
+ Save output as SVG and reference in markdown.
18
+ Always generate source first, then render.
19
+ Choose the provider based on diagram type - see instructions.
20
+ preferred_format: svg
21
+ preferred_providers:
22
+ - mermaid
23
+ - d2
24
+ - plantuml
25
+
26
+ output:
27
+ dir: ../diagrams # Relative to config dir (.onetool/../diagrams)
28
+ naming: "{provider}_{name}_{timestamp}"
29
+ default_format: svg
30
+ save_source: true
31
+
32
+ instructions:
33
+ mermaid:
34
+ when_to_use: |
35
+ - Flowcharts and decision trees
36
+ - Sequence diagrams for API flows
37
+ - Class diagrams for data models
38
+ - State diagrams for workflows
39
+ - Gantt charts for project timelines
40
+ - Mindmaps for brainstorming
41
+ style_tips: |
42
+ Use subgraphs to group related nodes.
43
+ Keep flowcharts top-to-bottom (TD) for readability.
44
+ Limit sequence diagrams to 5-7 participants.
45
+
46
+ QUOTING RULES (critical):
47
+ - Sequence diagrams: NO quotes after 'as' (they appear literally)
48
+ Use: participant WS as Web Server
49
+ NOT: participant WS as "Web Server"
50
+ - Flowcharts/class: USE quotes for labels with spaces
51
+ Use: A["Start Process"], B{"Decision?"}
52
+ - Never put spaces in node/participant IDs
53
+ syntax_guide: https://mermaid.js.org/syntax/
54
+ example: |
55
+ sequenceDiagram
56
+ participant C as Client
57
+ participant S as Server
58
+ C->>S: Request
59
+ S-->>C: Response
60
+
61
+ plantuml:
62
+ when_to_use: |
63
+ - Complex UML diagrams (class, component, deployment)
64
+ - C4 architecture diagrams (use stdlib)
65
+ - Detailed sequence diagrams with notes
66
+ - Diagrams requiring themes and skinparams
67
+ style_tips: |
68
+ Use skinparam for consistent theming.
69
+ Leverage !include for reusable components.
70
+ Use packages to organise large diagrams.
71
+ Add notes for context on complex relationships.
72
+
73
+ QUOTING RULES (critical):
74
+ - Always quote display names BEFORE 'as':
75
+ participant "Web Server" as WS
76
+ - Never put spaces in aliases (the ID after 'as')
77
+ - Use stereotypes for interfaces: <<interface>>
78
+ syntax_guide: https://plantuml.com/
79
+ example: |
80
+ @startuml
81
+ actor User
82
+ participant "API Gateway" as GW
83
+ database DB
84
+
85
+ User -> GW: Login request
86
+ GW -> DB: Check credentials
87
+ DB --> GW: User record
88
+ GW --> User: 200 OK
89
+ @enduml
90
+
91
+ d2:
92
+ when_to_use: |
93
+ - Clean architecture diagrams
94
+ - System context diagrams
95
+ - Hand-drawn style (sketch mode)
96
+ - Layouts with automatic positioning
97
+ - C4-style container diagrams
98
+ style_tips: |
99
+ Use containers for logical grouping.
100
+ D2 auto-layouts well - avoid manual positioning.
101
+ Use markdown in labels for rich formatting.
102
+ Leverage layers for complex diagrams.
103
+ Use shape: person for actors.
104
+ Direction hint: direction: right or direction: down.
105
+
106
+ QUOTING RULES (critical):
107
+ - Always quote labels after colon: node: "Display Name"
108
+ - IDs (before colon) should not have spaces
109
+ - Use style.sketch: true for hand-drawn look
110
+ syntax_guide: https://d2lang.com/tour/intro
111
+ example: |
112
+ direction: right
113
+
114
+ user: "User" {
115
+ shape: person
116
+ }
117
+
118
+ system: "My System" {
119
+ api: "API Server"
120
+ db: "Database"
121
+ }
122
+
123
+ user -> system.api: "Uses"
124
+ system.api -> system.db
125
+
126
+ templates:
127
+ api-flow:
128
+ provider: mermaid
129
+ diagram_type: sequence
130
+ description: REST API request/response flow
131
+ file: diagram-templates/api-flow.mmd
132
+
133
+ microservices:
134
+ provider: d2
135
+ diagram_type: architecture
136
+ description: Microservices architecture layout
137
+ file: diagram-templates/microservices.d2
138
+
139
+ c4-context:
140
+ provider: plantuml
141
+ diagram_type: c4
142
+ description: C4 system context diagram
143
+ file: diagram-templates/c4-context.puml
144
+
145
+ state-machine:
146
+ provider: mermaid
147
+ diagram_type: state
148
+ description: State machine diagram
149
+ file: diagram-templates/state-machine.mmd
150
+
151
+ class-diagram:
152
+ provider: mermaid
153
+ diagram_type: class
154
+ description: Class/data model diagram
155
+ file: diagram-templates/class-diagram.mmd
156
+
157
+ project-gantt:
158
+ provider: mermaid
159
+ diagram_type: gantt
160
+ description: Project timeline Gantt chart
161
+ file: diagram-templates/project-gantt.mmd
162
+
163
+ feature-mindmap:
164
+ provider: mermaid
165
+ diagram_type: mindmap
166
+ description: Feature brainstorming mindmap
167
+ file: diagram-templates/feature-mindmap.mmd