onetool-mcp 1.0.0b1__py3-none-any.whl → 1.0.0rc2__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 (81) hide show
  1. onetool/cli.py +63 -4
  2. onetool_mcp-1.0.0rc2.dist-info/METADATA +266 -0
  3. onetool_mcp-1.0.0rc2.dist-info/RECORD +129 -0
  4. {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/licenses/LICENSE.txt +1 -1
  5. {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/licenses/NOTICE.txt +54 -64
  6. ot/__main__.py +6 -6
  7. ot/config/__init__.py +48 -46
  8. ot/config/global_templates/__init__.py +2 -2
  9. ot/config/{defaults → global_templates}/diagram-templates/api-flow.mmd +33 -33
  10. ot/config/{defaults → global_templates}/diagram-templates/c4-context.puml +30 -30
  11. ot/config/{defaults → global_templates}/diagram-templates/class-diagram.mmd +87 -87
  12. ot/config/{defaults → global_templates}/diagram-templates/feature-mindmap.mmd +70 -70
  13. ot/config/{defaults → global_templates}/diagram-templates/microservices.d2 +81 -81
  14. ot/config/{defaults → global_templates}/diagram-templates/project-gantt.mmd +37 -37
  15. ot/config/{defaults → global_templates}/diagram-templates/state-machine.mmd +42 -42
  16. ot/config/global_templates/diagram.yaml +167 -0
  17. ot/config/global_templates/onetool.yaml +3 -1
  18. ot/config/{defaults → global_templates}/prompts.yaml +102 -97
  19. ot/config/global_templates/security.yaml +31 -0
  20. ot/config/global_templates/servers.yaml +93 -12
  21. ot/config/global_templates/snippets.yaml +5 -26
  22. ot/config/{defaults → global_templates}/tool_templates/__init__.py +7 -7
  23. ot/config/loader.py +221 -105
  24. ot/config/mcp.py +5 -1
  25. ot/config/secrets.py +192 -190
  26. ot/decorators.py +116 -116
  27. ot/executor/__init__.py +35 -35
  28. ot/executor/base.py +16 -16
  29. ot/executor/fence_processor.py +83 -83
  30. ot/executor/linter.py +142 -142
  31. ot/executor/pep723.py +288 -288
  32. ot/executor/runner.py +20 -6
  33. ot/executor/simple.py +163 -163
  34. ot/executor/validator.py +603 -164
  35. ot/http_client.py +145 -145
  36. ot/logging/__init__.py +37 -37
  37. ot/logging/entry.py +213 -213
  38. ot/logging/format.py +191 -188
  39. ot/logging/span.py +349 -349
  40. ot/meta.py +236 -14
  41. ot/paths.py +32 -49
  42. ot/prompts.py +218 -218
  43. ot/proxy/manager.py +14 -2
  44. ot/registry/__init__.py +189 -189
  45. ot/registry/parser.py +269 -269
  46. ot/server.py +330 -315
  47. ot/shortcuts/__init__.py +15 -15
  48. ot/shortcuts/aliases.py +87 -87
  49. ot/shortcuts/snippets.py +258 -258
  50. ot/stats/__init__.py +35 -35
  51. ot/stats/html.py +2 -2
  52. ot/stats/reader.py +354 -354
  53. ot/stats/timing.py +57 -57
  54. ot/support.py +63 -63
  55. ot/tools.py +1 -1
  56. ot/utils/batch.py +161 -161
  57. ot/utils/cache.py +120 -120
  58. ot/utils/exceptions.py +23 -23
  59. ot/utils/factory.py +178 -179
  60. ot/utils/format.py +65 -65
  61. ot/utils/http.py +202 -202
  62. ot/utils/platform.py +45 -45
  63. ot/utils/truncate.py +69 -69
  64. ot_tools/__init__.py +4 -4
  65. ot_tools/_convert/__init__.py +12 -12
  66. ot_tools/_convert/pdf.py +254 -254
  67. ot_tools/diagram.yaml +167 -167
  68. ot_tools/scaffold.py +2 -2
  69. ot_tools/transform.py +124 -19
  70. ot_tools/web_fetch.py +94 -43
  71. onetool_mcp-1.0.0b1.dist-info/METADATA +0 -163
  72. onetool_mcp-1.0.0b1.dist-info/RECORD +0 -132
  73. ot/config/defaults/bench.yaml +0 -4
  74. ot/config/defaults/onetool.yaml +0 -25
  75. ot/config/defaults/servers.yaml +0 -7
  76. ot/config/defaults/snippets.yaml +0 -4
  77. ot_tools/firecrawl.py +0 -732
  78. {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/WHEEL +0 -0
  79. {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/entry_points.txt +0 -0
  80. /ot/config/{defaults → global_templates}/tool_templates/extension.py +0 -0
  81. /ot/config/{defaults → global_templates}/tool_templates/isolated.py +0 -0
ot/config/__init__.py CHANGED
@@ -1,46 +1,48 @@
1
- """Centralized configuration for OneTool.
2
-
3
- This module provides a single source of truth for all configuration settings
4
- via YAML configuration for tool discovery and settings.
5
-
6
- Usage:
7
- from ot.config import get_config, load_config
8
-
9
- config = get_config()
10
- print(config.log_level)
11
- print(config.tools_dir)
12
-
13
- # For tools to access their configuration:
14
- from ot.config import get_tool_config
15
-
16
- class Config(BaseModel):
17
- timeout: float = 60.0
18
-
19
- config = get_tool_config("brave", Config)
20
- """
21
-
22
- from ot.config.loader import (
23
- OneToolConfig,
24
- SnippetDef,
25
- SnippetParam,
26
- get_config,
27
- is_log_verbose,
28
- load_config,
29
- )
30
- from ot.config.mcp import McpServerConfig
31
- from ot.config.secrets import get_secret, get_secrets, load_secrets
32
- from ot.config.tool_config import get_tool_config
33
-
34
- __all__ = [
35
- "McpServerConfig",
36
- "OneToolConfig",
37
- "SnippetDef",
38
- "SnippetParam",
39
- "get_config",
40
- "get_secret",
41
- "get_secrets",
42
- "get_tool_config",
43
- "is_log_verbose",
44
- "load_config",
45
- "load_secrets",
46
- ]
1
+ """Centralized configuration for OneTool.
2
+
3
+ This module provides a single source of truth for all configuration settings
4
+ via YAML configuration for tool discovery and settings.
5
+
6
+ Usage:
7
+ from ot.config import get_config, load_config
8
+
9
+ config = get_config()
10
+ print(config.log_level)
11
+ print(config.tools_dir)
12
+
13
+ # For tools to access their configuration:
14
+ from ot.config import get_tool_config
15
+
16
+ class Config(BaseModel):
17
+ timeout: float = 60.0
18
+
19
+ config = get_tool_config("brave", Config)
20
+ """
21
+
22
+ from ot.config.loader import (
23
+ ConfigNotFoundError,
24
+ OneToolConfig,
25
+ SnippetDef,
26
+ SnippetParam,
27
+ get_config,
28
+ is_log_verbose,
29
+ load_config,
30
+ )
31
+ from ot.config.mcp import McpServerConfig
32
+ from ot.config.secrets import get_secret, get_secrets, load_secrets
33
+ from ot.config.tool_config import get_tool_config
34
+
35
+ __all__ = [
36
+ "ConfigNotFoundError",
37
+ "McpServerConfig",
38
+ "OneToolConfig",
39
+ "SnippetDef",
40
+ "SnippetParam",
41
+ "get_config",
42
+ "get_secret",
43
+ "get_secrets",
44
+ "get_tool_config",
45
+ "is_log_verbose",
46
+ "load_config",
47
+ "load_secrets",
48
+ ]
@@ -1,2 +1,2 @@
1
- # OneTool Global Templates
2
- # This package contains template config files copied to ~/.onetool/ on first run.
1
+ # OneTool Global Templates
2
+ # This package contains template config files copied to ~/.onetool/ on first run.
@@ -1,33 +1,33 @@
1
- %% API Flow Template - Sequence Diagram
2
- %% Replace placeholders with actual service names and operations
3
-
4
- sequenceDiagram
5
- participant C as Client
6
- participant GW as API Gateway
7
- participant S as Service
8
- participant DB as Database
9
-
10
- Note over C,DB: Request Flow
11
-
12
- C->>GW: POST /api/resource
13
- activate GW
14
-
15
- GW->>GW: Validate token
16
- alt Invalid token
17
- GW-->>C: 401 Unauthorized
18
- else Valid token
19
- GW->>S: Forward request
20
- activate S
21
-
22
- S->>DB: Query data
23
- activate DB
24
- DB-->>S: Result set
25
- deactivate DB
26
-
27
- S-->>GW: Response payload
28
- deactivate S
29
-
30
- GW-->>C: 200 OK + data
31
- end
32
-
33
- deactivate GW
1
+ %% API Flow Template - Sequence Diagram
2
+ %% Replace placeholders with actual service names and operations
3
+
4
+ sequenceDiagram
5
+ participant C as Client
6
+ participant GW as API Gateway
7
+ participant S as Service
8
+ participant DB as Database
9
+
10
+ Note over C,DB: Request Flow
11
+
12
+ C->>GW: POST /api/resource
13
+ activate GW
14
+
15
+ GW->>GW: Validate token
16
+ alt Invalid token
17
+ GW-->>C: 401 Unauthorized
18
+ else Valid token
19
+ GW->>S: Forward request
20
+ activate S
21
+
22
+ S->>DB: Query data
23
+ activate DB
24
+ DB-->>S: Result set
25
+ deactivate DB
26
+
27
+ S-->>GW: Response payload
28
+ deactivate S
29
+
30
+ GW-->>C: 200 OK + data
31
+ end
32
+
33
+ deactivate GW
@@ -1,30 +1,30 @@
1
- @startuml C4 Context Diagram
2
- !include <C4/C4_Context>
3
-
4
- title System Context Diagram - [System Name]
5
-
6
- ' Actors
7
- Person(user, "User", "A user of the system who needs to accomplish tasks")
8
- Person(admin, "Administrator", "Manages system configuration and users")
9
-
10
- ' Core system
11
- System(system, "My System", "Provides the main functionality that users need")
12
-
13
- ' External systems
14
- System_Ext(email, "Email System", "Sends notifications and alerts")
15
- System_Ext(payment, "Payment Provider", "Handles payment processing")
16
- System_Ext(identity, "Identity Provider", "Manages authentication via SSO")
17
-
18
- ' Relationships
19
- Rel(user, system, "Uses", "HTTPS")
20
- Rel(admin, system, "Administers", "HTTPS")
21
-
22
- Rel(system, email, "Sends emails using", "SMTP")
23
- Rel(system, payment, "Processes payments via", "HTTPS/REST")
24
- Rel(system, identity, "Authenticates users with", "OIDC")
25
-
26
- ' Layout hints
27
- Lay_D(user, system)
28
- Lay_R(system, email)
29
-
30
- @enduml
1
+ @startuml C4 Context Diagram
2
+ !include <C4/C4_Context>
3
+
4
+ title System Context Diagram - [System Name]
5
+
6
+ ' Actors
7
+ Person(user, "User", "A user of the system who needs to accomplish tasks")
8
+ Person(admin, "Administrator", "Manages system configuration and users")
9
+
10
+ ' Core system
11
+ System(system, "My System", "Provides the main functionality that users need")
12
+
13
+ ' External systems
14
+ System_Ext(email, "Email System", "Sends notifications and alerts")
15
+ System_Ext(payment, "Payment Provider", "Handles payment processing")
16
+ System_Ext(identity, "Identity Provider", "Manages authentication via SSO")
17
+
18
+ ' Relationships
19
+ Rel(user, system, "Uses", "HTTPS")
20
+ Rel(admin, system, "Administers", "HTTPS")
21
+
22
+ Rel(system, email, "Sends emails using", "SMTP")
23
+ Rel(system, payment, "Processes payments via", "HTTPS/REST")
24
+ Rel(system, identity, "Authenticates users with", "OIDC")
25
+
26
+ ' Layout hints
27
+ Lay_D(user, system)
28
+ Lay_R(system, email)
29
+
30
+ @enduml
@@ -1,87 +1,87 @@
1
- %% Class Diagram Template
2
- %% Replace with your actual data model
3
-
4
- classDiagram
5
- class User {
6
- +String id
7
- +String email
8
- +String name
9
- +DateTime createdAt
10
- +DateTime updatedAt
11
- +login() bool
12
- +logout() void
13
- +updateProfile(data) User
14
- }
15
-
16
- class Organisation {
17
- +String id
18
- +String name
19
- +String slug
20
- +Plan plan
21
- +getMembers() List~User~
22
- +addMember(user) void
23
- +removeMember(user) void
24
- }
25
-
26
- class Project {
27
- +String id
28
- +String name
29
- +String description
30
- +Status status
31
- +DateTime deadline
32
- +getTasks() List~Task~
33
- +addTask(task) void
34
- +archive() void
35
- }
36
-
37
- class Task {
38
- +String id
39
- +String title
40
- +String description
41
- +Priority priority
42
- +Status status
43
- +User assignee
44
- +assign(user) void
45
- +complete() void
46
- }
47
-
48
- class Comment {
49
- +String id
50
- +String content
51
- +User author
52
- +DateTime createdAt
53
- +edit(content) void
54
- +delete() void
55
- }
56
-
57
- %% Relationships
58
- User "1" --> "*" Organisation : belongs to
59
- Organisation "1" --> "*" Project : owns
60
- Project "1" --> "*" Task : contains
61
- User "1" --> "*" Task : assigned to
62
- Task "1" --> "*" Comment : has
63
- User "1" --> "*" Comment : writes
64
-
65
- %% Enums
66
- class Status {
67
- <<enumeration>>
68
- DRAFT
69
- ACTIVE
70
- COMPLETED
71
- ARCHIVED
72
- }
73
-
74
- class Priority {
75
- <<enumeration>>
76
- LOW
77
- MEDIUM
78
- HIGH
79
- CRITICAL
80
- }
81
-
82
- class Plan {
83
- <<enumeration>>
84
- FREE
85
- PRO
86
- ENTERPRISE
87
- }
1
+ %% Class Diagram Template
2
+ %% Replace with your actual data model
3
+
4
+ classDiagram
5
+ class User {
6
+ +String id
7
+ +String email
8
+ +String name
9
+ +DateTime createdAt
10
+ +DateTime updatedAt
11
+ +login() bool
12
+ +logout() void
13
+ +updateProfile(data) User
14
+ }
15
+
16
+ class Organisation {
17
+ +String id
18
+ +String name
19
+ +String slug
20
+ +Plan plan
21
+ +getMembers() List~User~
22
+ +addMember(user) void
23
+ +removeMember(user) void
24
+ }
25
+
26
+ class Project {
27
+ +String id
28
+ +String name
29
+ +String description
30
+ +Status status
31
+ +DateTime deadline
32
+ +getTasks() List~Task~
33
+ +addTask(task) void
34
+ +archive() void
35
+ }
36
+
37
+ class Task {
38
+ +String id
39
+ +String title
40
+ +String description
41
+ +Priority priority
42
+ +Status status
43
+ +User assignee
44
+ +assign(user) void
45
+ +complete() void
46
+ }
47
+
48
+ class Comment {
49
+ +String id
50
+ +String content
51
+ +User author
52
+ +DateTime createdAt
53
+ +edit(content) void
54
+ +delete() void
55
+ }
56
+
57
+ %% Relationships
58
+ User "1" --> "*" Organisation : belongs to
59
+ Organisation "1" --> "*" Project : owns
60
+ Project "1" --> "*" Task : contains
61
+ User "1" --> "*" Task : assigned to
62
+ Task "1" --> "*" Comment : has
63
+ User "1" --> "*" Comment : writes
64
+
65
+ %% Enums
66
+ class Status {
67
+ <<enumeration>>
68
+ DRAFT
69
+ ACTIVE
70
+ COMPLETED
71
+ ARCHIVED
72
+ }
73
+
74
+ class Priority {
75
+ <<enumeration>>
76
+ LOW
77
+ MEDIUM
78
+ HIGH
79
+ CRITICAL
80
+ }
81
+
82
+ class Plan {
83
+ <<enumeration>>
84
+ FREE
85
+ PRO
86
+ ENTERPRISE
87
+ }
@@ -1,70 +1,70 @@
1
- %% Feature Mindmap Template
2
- %% Replace with your actual feature breakdown
3
-
4
- mindmap
5
- root((Product))
6
- Authentication
7
- Login
8
- Email/Password
9
- Social OAuth
10
- SSO/SAML
11
- Registration
12
- Email verification
13
- Onboarding flow
14
- Security
15
- 2FA/MFA
16
- Session management
17
- Password policies
18
- User Management
19
- Profiles
20
- Avatar upload
21
- Preferences
22
- Notifications
23
- Organisations
24
- Team creation
25
- Role assignment
26
- Invitations
27
- Permissions
28
- Role-based access
29
- Resource sharing
30
- Audit logging
31
- Core Features
32
- Dashboard
33
- Analytics widgets
34
- Quick actions
35
- Recent activity
36
- Projects
37
- CRUD operations
38
- Collaboration
39
- Version history
40
- Tasks
41
- Assignment
42
- Due dates
43
- Comments
44
- Attachments
45
- Integrations
46
- APIs
47
- REST endpoints
48
- GraphQL
49
- Webhooks
50
- Third-party
51
- Slack
52
- GitHub
53
- Jira
54
- Import/Export
55
- CSV
56
- JSON
57
- PDF reports
58
- Infrastructure
59
- Performance
60
- Caching
61
- CDN
62
- Database optimisation
63
- Reliability
64
- Backups
65
- Monitoring
66
- Alerting
67
- Scalability
68
- Load balancing
69
- Auto-scaling
70
- Multi-region
1
+ %% Feature Mindmap Template
2
+ %% Replace with your actual feature breakdown
3
+
4
+ mindmap
5
+ root((Product))
6
+ Authentication
7
+ Login
8
+ Email/Password
9
+ Social OAuth
10
+ SSO/SAML
11
+ Registration
12
+ Email verification
13
+ Onboarding flow
14
+ Security
15
+ 2FA/MFA
16
+ Session management
17
+ Password policies
18
+ User Management
19
+ Profiles
20
+ Avatar upload
21
+ Preferences
22
+ Notifications
23
+ Organisations
24
+ Team creation
25
+ Role assignment
26
+ Invitations
27
+ Permissions
28
+ Role-based access
29
+ Resource sharing
30
+ Audit logging
31
+ Core Features
32
+ Dashboard
33
+ Analytics widgets
34
+ Quick actions
35
+ Recent activity
36
+ Projects
37
+ CRUD operations
38
+ Collaboration
39
+ Version history
40
+ Tasks
41
+ Assignment
42
+ Due dates
43
+ Comments
44
+ Attachments
45
+ Integrations
46
+ APIs
47
+ REST endpoints
48
+ GraphQL
49
+ Webhooks
50
+ Third-party
51
+ Slack
52
+ GitHub
53
+ Jira
54
+ Import/Export
55
+ CSV
56
+ JSON
57
+ PDF reports
58
+ Infrastructure
59
+ Performance
60
+ Caching
61
+ CDN
62
+ Database optimisation
63
+ Reliability
64
+ Backups
65
+ Monitoring
66
+ Alerting
67
+ Scalability
68
+ Load balancing
69
+ Auto-scaling
70
+ Multi-region