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.
- onetool/cli.py +63 -4
- onetool_mcp-1.0.0rc2.dist-info/METADATA +266 -0
- onetool_mcp-1.0.0rc2.dist-info/RECORD +129 -0
- {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/licenses/LICENSE.txt +1 -1
- {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/licenses/NOTICE.txt +54 -64
- ot/__main__.py +6 -6
- ot/config/__init__.py +48 -46
- ot/config/global_templates/__init__.py +2 -2
- ot/config/{defaults → global_templates}/diagram-templates/api-flow.mmd +33 -33
- ot/config/{defaults → global_templates}/diagram-templates/c4-context.puml +30 -30
- ot/config/{defaults → global_templates}/diagram-templates/class-diagram.mmd +87 -87
- ot/config/{defaults → global_templates}/diagram-templates/feature-mindmap.mmd +70 -70
- ot/config/{defaults → global_templates}/diagram-templates/microservices.d2 +81 -81
- ot/config/{defaults → global_templates}/diagram-templates/project-gantt.mmd +37 -37
- ot/config/{defaults → global_templates}/diagram-templates/state-machine.mmd +42 -42
- ot/config/global_templates/diagram.yaml +167 -0
- ot/config/global_templates/onetool.yaml +3 -1
- ot/config/{defaults → global_templates}/prompts.yaml +102 -97
- ot/config/global_templates/security.yaml +31 -0
- ot/config/global_templates/servers.yaml +93 -12
- ot/config/global_templates/snippets.yaml +5 -26
- ot/config/{defaults → global_templates}/tool_templates/__init__.py +7 -7
- ot/config/loader.py +221 -105
- ot/config/mcp.py +5 -1
- ot/config/secrets.py +192 -190
- ot/decorators.py +116 -116
- ot/executor/__init__.py +35 -35
- ot/executor/base.py +16 -16
- ot/executor/fence_processor.py +83 -83
- ot/executor/linter.py +142 -142
- ot/executor/pep723.py +288 -288
- ot/executor/runner.py +20 -6
- ot/executor/simple.py +163 -163
- ot/executor/validator.py +603 -164
- ot/http_client.py +145 -145
- ot/logging/__init__.py +37 -37
- ot/logging/entry.py +213 -213
- ot/logging/format.py +191 -188
- ot/logging/span.py +349 -349
- ot/meta.py +236 -14
- ot/paths.py +32 -49
- ot/prompts.py +218 -218
- ot/proxy/manager.py +14 -2
- ot/registry/__init__.py +189 -189
- ot/registry/parser.py +269 -269
- ot/server.py +330 -315
- ot/shortcuts/__init__.py +15 -15
- ot/shortcuts/aliases.py +87 -87
- ot/shortcuts/snippets.py +258 -258
- ot/stats/__init__.py +35 -35
- ot/stats/html.py +2 -2
- ot/stats/reader.py +354 -354
- ot/stats/timing.py +57 -57
- ot/support.py +63 -63
- ot/tools.py +1 -1
- ot/utils/batch.py +161 -161
- ot/utils/cache.py +120 -120
- ot/utils/exceptions.py +23 -23
- ot/utils/factory.py +178 -179
- ot/utils/format.py +65 -65
- ot/utils/http.py +202 -202
- ot/utils/platform.py +45 -45
- ot/utils/truncate.py +69 -69
- ot_tools/__init__.py +4 -4
- ot_tools/_convert/__init__.py +12 -12
- ot_tools/_convert/pdf.py +254 -254
- ot_tools/diagram.yaml +167 -167
- ot_tools/scaffold.py +2 -2
- ot_tools/transform.py +124 -19
- ot_tools/web_fetch.py +94 -43
- onetool_mcp-1.0.0b1.dist-info/METADATA +0 -163
- onetool_mcp-1.0.0b1.dist-info/RECORD +0 -132
- ot/config/defaults/bench.yaml +0 -4
- ot/config/defaults/onetool.yaml +0 -25
- ot/config/defaults/servers.yaml +0 -7
- ot/config/defaults/snippets.yaml +0 -4
- ot_tools/firecrawl.py +0 -732
- {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/WHEEL +0 -0
- {onetool_mcp-1.0.0b1.dist-info → onetool_mcp-1.0.0rc2.dist-info}/entry_points.txt +0 -0
- /ot/config/{defaults → global_templates}/tool_templates/extension.py +0 -0
- /ot/config/{defaults → global_templates}/tool_templates/isolated.py +0 -0
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
# Microservices Architecture Template
|
|
2
|
-
# Replace placeholders with actual service names
|
|
3
|
-
|
|
4
|
-
direction: right
|
|
5
|
-
|
|
6
|
-
# External actors
|
|
7
|
-
user: "User" {
|
|
8
|
-
shape: person
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
# Frontend layer
|
|
12
|
-
frontend: "Frontend" {
|
|
13
|
-
style.fill: "#e3f2fd"
|
|
14
|
-
|
|
15
|
-
web: "Web App"
|
|
16
|
-
mobile: "Mobile App"
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
# API layer
|
|
20
|
-
gateway: "API Gateway" {
|
|
21
|
-
style.fill: "#fff3e0"
|
|
22
|
-
|
|
23
|
-
auth: "Auth"
|
|
24
|
-
routing: "Router"
|
|
25
|
-
rate_limit: "Rate Limiter"
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
# Services layer
|
|
29
|
-
services: "Services" {
|
|
30
|
-
style.fill: "#e8f5e9"
|
|
31
|
-
|
|
32
|
-
user_svc: "User Service"
|
|
33
|
-
order_svc: "Order Service"
|
|
34
|
-
notification_svc: "Notification Service"
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
# Data layer
|
|
38
|
-
data: "Data Stores" {
|
|
39
|
-
style.fill: "#fce4ec"
|
|
40
|
-
|
|
41
|
-
postgres: "PostgreSQL" {
|
|
42
|
-
shape: cylinder
|
|
43
|
-
}
|
|
44
|
-
redis: "Redis" {
|
|
45
|
-
shape: cylinder
|
|
46
|
-
}
|
|
47
|
-
queue: "Message Queue" {
|
|
48
|
-
shape: queue
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
# External services
|
|
53
|
-
external: "External" {
|
|
54
|
-
style.stroke-dash: 3
|
|
55
|
-
|
|
56
|
-
email: "Email Provider"
|
|
57
|
-
payment: "Payment Gateway"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
# Connections
|
|
61
|
-
user -> frontend.web
|
|
62
|
-
user -> frontend.mobile
|
|
63
|
-
|
|
64
|
-
frontend.web -> gateway.routing
|
|
65
|
-
frontend.mobile -> gateway.routing
|
|
66
|
-
|
|
67
|
-
gateway.routing -> gateway.auth
|
|
68
|
-
gateway.auth -> services.user_svc
|
|
69
|
-
gateway.routing -> services.order_svc
|
|
70
|
-
gateway.routing -> services.notification_svc
|
|
71
|
-
|
|
72
|
-
services.user_svc -> data.postgres
|
|
73
|
-
services.order_svc -> data.postgres
|
|
74
|
-
services.order_svc -> data.queue
|
|
75
|
-
|
|
76
|
-
services.notification_svc -> data.queue
|
|
77
|
-
services.notification_svc -> external.email
|
|
78
|
-
|
|
79
|
-
services.order_svc -> external.payment
|
|
80
|
-
|
|
81
|
-
data.redis <- gateway.rate_limit: "Rate limits"
|
|
1
|
+
# Microservices Architecture Template
|
|
2
|
+
# Replace placeholders with actual service names
|
|
3
|
+
|
|
4
|
+
direction: right
|
|
5
|
+
|
|
6
|
+
# External actors
|
|
7
|
+
user: "User" {
|
|
8
|
+
shape: person
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
# Frontend layer
|
|
12
|
+
frontend: "Frontend" {
|
|
13
|
+
style.fill: "#e3f2fd"
|
|
14
|
+
|
|
15
|
+
web: "Web App"
|
|
16
|
+
mobile: "Mobile App"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# API layer
|
|
20
|
+
gateway: "API Gateway" {
|
|
21
|
+
style.fill: "#fff3e0"
|
|
22
|
+
|
|
23
|
+
auth: "Auth"
|
|
24
|
+
routing: "Router"
|
|
25
|
+
rate_limit: "Rate Limiter"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# Services layer
|
|
29
|
+
services: "Services" {
|
|
30
|
+
style.fill: "#e8f5e9"
|
|
31
|
+
|
|
32
|
+
user_svc: "User Service"
|
|
33
|
+
order_svc: "Order Service"
|
|
34
|
+
notification_svc: "Notification Service"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# Data layer
|
|
38
|
+
data: "Data Stores" {
|
|
39
|
+
style.fill: "#fce4ec"
|
|
40
|
+
|
|
41
|
+
postgres: "PostgreSQL" {
|
|
42
|
+
shape: cylinder
|
|
43
|
+
}
|
|
44
|
+
redis: "Redis" {
|
|
45
|
+
shape: cylinder
|
|
46
|
+
}
|
|
47
|
+
queue: "Message Queue" {
|
|
48
|
+
shape: queue
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# External services
|
|
53
|
+
external: "External" {
|
|
54
|
+
style.stroke-dash: 3
|
|
55
|
+
|
|
56
|
+
email: "Email Provider"
|
|
57
|
+
payment: "Payment Gateway"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# Connections
|
|
61
|
+
user -> frontend.web
|
|
62
|
+
user -> frontend.mobile
|
|
63
|
+
|
|
64
|
+
frontend.web -> gateway.routing
|
|
65
|
+
frontend.mobile -> gateway.routing
|
|
66
|
+
|
|
67
|
+
gateway.routing -> gateway.auth
|
|
68
|
+
gateway.auth -> services.user_svc
|
|
69
|
+
gateway.routing -> services.order_svc
|
|
70
|
+
gateway.routing -> services.notification_svc
|
|
71
|
+
|
|
72
|
+
services.user_svc -> data.postgres
|
|
73
|
+
services.order_svc -> data.postgres
|
|
74
|
+
services.order_svc -> data.queue
|
|
75
|
+
|
|
76
|
+
services.notification_svc -> data.queue
|
|
77
|
+
services.notification_svc -> external.email
|
|
78
|
+
|
|
79
|
+
services.order_svc -> external.payment
|
|
80
|
+
|
|
81
|
+
data.redis <- gateway.rate_limit: "Rate limits"
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
%% Project Gantt Chart Template
|
|
2
|
-
%% Replace with your actual project timeline
|
|
3
|
-
|
|
4
|
-
gantt
|
|
5
|
-
title Project Timeline
|
|
6
|
-
dateFormat YYYY-MM-DD
|
|
7
|
-
excludes weekends
|
|
8
|
-
|
|
9
|
-
section Planning
|
|
10
|
-
Requirements gathering :a1, 2024-01-08, 5d
|
|
11
|
-
Technical design :a2, after a1, 5d
|
|
12
|
-
Architecture review :milestone, m1, after a2, 0d
|
|
13
|
-
|
|
14
|
-
section Development
|
|
15
|
-
Core infrastructure :b1, after m1, 10d
|
|
16
|
-
Feature A implementation :b2, after b1, 8d
|
|
17
|
-
Feature B implementation :b3, after b1, 12d
|
|
18
|
-
Integration :b4, after b2, 5d
|
|
19
|
-
Development complete :milestone, m2, after b4, 0d
|
|
20
|
-
|
|
21
|
-
section Testing
|
|
22
|
-
Unit testing :c1, after b2, 5d
|
|
23
|
-
Integration testing :c2, after m2, 5d
|
|
24
|
-
Performance testing :c3, after c2, 3d
|
|
25
|
-
UAT :c4, after c3, 5d
|
|
26
|
-
Testing complete :milestone, m3, after c4, 0d
|
|
27
|
-
|
|
28
|
-
section Deployment
|
|
29
|
-
Staging deployment :d1, after m3, 2d
|
|
30
|
-
Production preparation :d2, after d1, 2d
|
|
31
|
-
Go-live :milestone, m4, after d2, 0d
|
|
32
|
-
Post-launch support :d3, after m4, 5d
|
|
33
|
-
|
|
34
|
-
section Documentation
|
|
35
|
-
API documentation :e1, after b1, 15d
|
|
36
|
-
User guide :e2, after c2, 10d
|
|
37
|
-
Release notes :e3, after m3, 3d
|
|
1
|
+
%% Project Gantt Chart Template
|
|
2
|
+
%% Replace with your actual project timeline
|
|
3
|
+
|
|
4
|
+
gantt
|
|
5
|
+
title Project Timeline
|
|
6
|
+
dateFormat YYYY-MM-DD
|
|
7
|
+
excludes weekends
|
|
8
|
+
|
|
9
|
+
section Planning
|
|
10
|
+
Requirements gathering :a1, 2024-01-08, 5d
|
|
11
|
+
Technical design :a2, after a1, 5d
|
|
12
|
+
Architecture review :milestone, m1, after a2, 0d
|
|
13
|
+
|
|
14
|
+
section Development
|
|
15
|
+
Core infrastructure :b1, after m1, 10d
|
|
16
|
+
Feature A implementation :b2, after b1, 8d
|
|
17
|
+
Feature B implementation :b3, after b1, 12d
|
|
18
|
+
Integration :b4, after b2, 5d
|
|
19
|
+
Development complete :milestone, m2, after b4, 0d
|
|
20
|
+
|
|
21
|
+
section Testing
|
|
22
|
+
Unit testing :c1, after b2, 5d
|
|
23
|
+
Integration testing :c2, after m2, 5d
|
|
24
|
+
Performance testing :c3, after c2, 3d
|
|
25
|
+
UAT :c4, after c3, 5d
|
|
26
|
+
Testing complete :milestone, m3, after c4, 0d
|
|
27
|
+
|
|
28
|
+
section Deployment
|
|
29
|
+
Staging deployment :d1, after m3, 2d
|
|
30
|
+
Production preparation :d2, after d1, 2d
|
|
31
|
+
Go-live :milestone, m4, after d2, 0d
|
|
32
|
+
Post-launch support :d3, after m4, 5d
|
|
33
|
+
|
|
34
|
+
section Documentation
|
|
35
|
+
API documentation :e1, after b1, 15d
|
|
36
|
+
User guide :e2, after c2, 10d
|
|
37
|
+
Release notes :e3, after m3, 3d
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
%% State Machine Template
|
|
2
|
-
%% Replace states and transitions with your workflow
|
|
3
|
-
|
|
4
|
-
stateDiagram-v2
|
|
5
|
-
[*] --> Draft: create
|
|
6
|
-
|
|
7
|
-
Draft --> Submitted: submit
|
|
8
|
-
Draft --> Cancelled: cancel
|
|
9
|
-
|
|
10
|
-
Submitted --> UnderReview: assign_reviewer
|
|
11
|
-
Submitted --> Draft: request_changes
|
|
12
|
-
|
|
13
|
-
UnderReview --> Approved: approve
|
|
14
|
-
UnderReview --> Rejected: reject
|
|
15
|
-
UnderReview --> Draft: request_changes
|
|
16
|
-
|
|
17
|
-
Approved --> Published: publish
|
|
18
|
-
Approved --> Draft: unpublish
|
|
19
|
-
|
|
20
|
-
Rejected --> Draft: revise
|
|
21
|
-
Rejected --> Cancelled: abandon
|
|
22
|
-
|
|
23
|
-
Published --> Archived: archive
|
|
24
|
-
Published --> Draft: unpublish
|
|
25
|
-
|
|
26
|
-
Cancelled --> [*]
|
|
27
|
-
Archived --> [*]
|
|
28
|
-
|
|
29
|
-
note right of Draft
|
|
30
|
-
Initial state for new items.
|
|
31
|
-
Can be edited freely.
|
|
32
|
-
end note
|
|
33
|
-
|
|
34
|
-
note right of UnderReview
|
|
35
|
-
Assigned to a reviewer.
|
|
36
|
-
Cannot be edited by author.
|
|
37
|
-
end note
|
|
38
|
-
|
|
39
|
-
note right of Published
|
|
40
|
-
Visible to all users.
|
|
41
|
-
Audit trail maintained.
|
|
42
|
-
end note
|
|
1
|
+
%% State Machine Template
|
|
2
|
+
%% Replace states and transitions with your workflow
|
|
3
|
+
|
|
4
|
+
stateDiagram-v2
|
|
5
|
+
[*] --> Draft: create
|
|
6
|
+
|
|
7
|
+
Draft --> Submitted: submit
|
|
8
|
+
Draft --> Cancelled: cancel
|
|
9
|
+
|
|
10
|
+
Submitted --> UnderReview: assign_reviewer
|
|
11
|
+
Submitted --> Draft: request_changes
|
|
12
|
+
|
|
13
|
+
UnderReview --> Approved: approve
|
|
14
|
+
UnderReview --> Rejected: reject
|
|
15
|
+
UnderReview --> Draft: request_changes
|
|
16
|
+
|
|
17
|
+
Approved --> Published: publish
|
|
18
|
+
Approved --> Draft: unpublish
|
|
19
|
+
|
|
20
|
+
Rejected --> Draft: revise
|
|
21
|
+
Rejected --> Cancelled: abandon
|
|
22
|
+
|
|
23
|
+
Published --> Archived: archive
|
|
24
|
+
Published --> Draft: unpublish
|
|
25
|
+
|
|
26
|
+
Cancelled --> [*]
|
|
27
|
+
Archived --> [*]
|
|
28
|
+
|
|
29
|
+
note right of Draft
|
|
30
|
+
Initial state for new items.
|
|
31
|
+
Can be edited freely.
|
|
32
|
+
end note
|
|
33
|
+
|
|
34
|
+
note right of UnderReview
|
|
35
|
+
Assigned to a reviewer.
|
|
36
|
+
Cannot be edited by author.
|
|
37
|
+
end note
|
|
38
|
+
|
|
39
|
+
note right of Published
|
|
40
|
+
Visible to all users.
|
|
41
|
+
Audit trail maintained.
|
|
42
|
+
end note
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Diagram tool configuration
|
|
2
|
+
# Provides templates, instructions, and output settings for diagram generation.
|
|
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: remote # 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 .onetool/ directory
|
|
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: config/diagram-templates/api-flow.mmd
|
|
132
|
+
|
|
133
|
+
microservices:
|
|
134
|
+
provider: d2
|
|
135
|
+
diagram_type: architecture
|
|
136
|
+
description: Microservices architecture layout
|
|
137
|
+
file: config/diagram-templates/microservices.d2
|
|
138
|
+
|
|
139
|
+
c4-context:
|
|
140
|
+
provider: plantuml
|
|
141
|
+
diagram_type: c4
|
|
142
|
+
description: C4 system context diagram
|
|
143
|
+
file: config/diagram-templates/c4-context.puml
|
|
144
|
+
|
|
145
|
+
state-machine:
|
|
146
|
+
provider: mermaid
|
|
147
|
+
diagram_type: state
|
|
148
|
+
description: State machine diagram
|
|
149
|
+
file: config/diagram-templates/state-machine.mmd
|
|
150
|
+
|
|
151
|
+
class-diagram:
|
|
152
|
+
provider: mermaid
|
|
153
|
+
diagram_type: class
|
|
154
|
+
description: Class/data model diagram
|
|
155
|
+
file: config/diagram-templates/class-diagram.mmd
|
|
156
|
+
|
|
157
|
+
project-gantt:
|
|
158
|
+
provider: mermaid
|
|
159
|
+
diagram_type: gantt
|
|
160
|
+
description: Project timeline Gantt chart
|
|
161
|
+
file: config/diagram-templates/project-gantt.mmd
|
|
162
|
+
|
|
163
|
+
feature-mindmap:
|
|
164
|
+
provider: mermaid
|
|
165
|
+
diagram_type: mindmap
|
|
166
|
+
description: Feature brainstorming mindmap
|
|
167
|
+
file: config/diagram-templates/feature-mindmap.mmd
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
version: 1
|
|
6
6
|
|
|
7
7
|
# Include external config files (merged left-to-right)
|
|
8
|
-
# Paths are relative to OT_DIR (~/.onetool/), with fallback to
|
|
8
|
+
# Paths are relative to OT_DIR (~/.onetool/), with fallback to global config
|
|
9
9
|
include:
|
|
10
10
|
- config/snippets.yaml # Snippet workflows
|
|
11
11
|
- config/servers.yaml # External MCP servers
|
|
12
|
+
- config/security.yaml # Security allowlists (builtins, imports, calls)
|
|
13
|
+
- config/diagram.yaml # Diagram tool settings and templates
|
|
12
14
|
|
|
13
15
|
tools_dir: []
|
|
14
16
|
|