Skip to content

Commit 090c83e

Browse files
committed
update style
1 parent 0f7248b commit 090c83e

10 files changed

Lines changed: 9 additions & 161 deletions

‎diagrams/01-system-overview.md‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ flowchart TB
3030
engine -.->|plugin calls| luna
3131
engine -.->|plugin calls| guardrails
3232
engine -.->|plugin calls| custom
33-
34-
style client fill:#e1f5fe,stroke:#01579b
35-
style server fill:#f3e5f5,stroke:#4a148c
36-
style external fill:#fff3e0,stroke:#e65100
3733
```
3834

3935
## Package Structure
@@ -55,11 +51,6 @@ flowchart LR
5551
models --> server
5652
engine --> server
5753
sdk -.->|HTTP| server
58-
59-
style models fill:#c8e6c9,stroke:#2e7d32
60-
style engine fill:#bbdefb,stroke:#1565c0
61-
style sdk fill:#fff9c4,stroke:#f9a825
62-
style server fill:#f8bbd9,stroke:#c2185b
6354
```
6455

6556
## Key Interactions

‎diagrams/02-deployment-architecture.md‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ flowchart TB
3636
svc --> deploy
3737
deploy --> pg
3838
hpa -.->|scales| deploy
39-
40-
style k8s fill:#e3f2fd,stroke:#1565c0
41-
style ns fill:#fce4ec,stroke:#c2185b
42-
style deploy fill:#f3e5f5,stroke:#7b1fa2
43-
style db fill:#e8f5e9,stroke:#388e3c
4439
```
4540

4641
## Service Communication
@@ -67,9 +62,6 @@ flowchart LR
6762
ingress -->|HTTP| service
6863
service -->|Round Robin| pods
6964
pods -->|TCP| postgres
70-
71-
style external fill:#fff3e0,stroke:#ef6c00
72-
style cluster fill:#e8eaf6,stroke:#3949ab
7365
```
7466

7567
## Configuration
@@ -91,9 +83,6 @@ flowchart TD
9183
env --> app
9284
secrets --> app
9385
configmap --> app
94-
95-
style config fill:#fff8e1,stroke:#ff8f00
96-
style server fill:#e1f5fe,stroke:#0277bd
9786
```
9887

9988
## Endpoints

‎diagrams/03-entity-relationships.md‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ flowchart TD
1414
agent -->|"has one (optional)"| policy
1515
policy -->|"has many"| controlset
1616
controlset -->|"has many"| control
17-
18-
style agent fill:#e3f2fd,stroke:#1565c0
19-
style policy fill:#f3e5f5,stroke:#7b1fa2
20-
style controlset fill:#e8f5e9,stroke:#388e3c
21-
style control fill:#fff3e0,stroke:#ef6c00
2217
```
2318

2419
## Database Schema (ERD)
@@ -116,11 +111,6 @@ flowchart LR
116111
cs1 --> c2
117112
cs2 --> c3
118113
cs2 --> c4
119-
120-
style agents fill:#e3f2fd,stroke:#1565c0
121-
style policies fill:#f3e5f5,stroke:#7b1fa2
122-
style controlsets fill:#e8f5e9,stroke:#388e3c
123-
style controls fill:#fff3e0,stroke:#ef6c00
124114
```
125115

126116
## Data Traversal

‎diagrams/04-control-definition-model.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ flowchart TD
133133
check_match -->|Yes| action_deny
134134
check_match -->|Yes| action_warn
135135
check_match -->|Yes| action_log
136-
137-
style action_deny fill:#ffcdd2,stroke:#c62828
138-
style action_warn fill:#fff9c4,stroke:#f9a825
139-
style skip fill:#e0e0e0,stroke:#757575
140136
```
141137

142138
## Example Control Definition

‎diagrams/05-request-response-models.md‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,27 +141,21 @@ sequenceDiagram
141141
participant Server
142142
participant DB
143143
144-
rect rgb(227, 242, 253)
145-
Note over Client,DB: Agent Registration
144+
Note over Client,DB: Agent Registration
146145
Client->>Server: POST /agents/initAgent<br/>InitAgentRequest
147146
Server->>DB: Upsert Agent
148147
Server-->>Client: InitAgentResponse
149-
end
150148
151-
rect rgb(243, 229, 245)
152-
Note over Client,DB: Policy Assignment
149+
Note over Client,DB: Policy Assignment
153150
Client->>Server: POST /agents/{id}/policy/{policy_id}
154151
Server->>DB: Update Agent.policy_id
155152
Server-->>Client: SetPolicyResponse
156-
end
157153
158-
rect rgb(255, 243, 224)
159-
Note over Client,DB: Evaluation
154+
Note over Client,DB: Evaluation
160155
Client->>Server: POST /evaluation<br/>EvaluationRequest
161156
Server->>DB: Fetch Agent's Controls
162157
Server->>Server: Run Control Engine
163158
Server-->>Client: EvaluationResponse
164-
end
165159
```
166160

167161
## Payload Discrimination
@@ -180,9 +174,6 @@ flowchart LR
180174
payload --> check
181175
check -->|No| llm
182176
check -->|Yes| tool
183-
184-
style llm fill:#e8f5e9,stroke:#388e3c
185-
style tool fill:#fff3e0,stroke:#ef6c00
186177
```
187178

188179
## Control Model (API Response)

‎diagrams/06-evaluation-flow.md‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ flowchart TD
2525
filter --> loop
2626
loop --> process
2727
process --> response
28-
29-
style request fill:#e3f2fd,stroke:#1565c0
30-
style engine fill:#f5f5f5,stroke:#616161
31-
style response fill:#e8f5e9,stroke:#388e3c
3228
```
3329

3430
## Control Filtering Logic
@@ -51,9 +47,6 @@ flowchart TD
5147
c2 -->|Yes| c3
5248
c3 -->|No| skipped
5349
c3 -->|Yes| applicable
54-
55-
style applicable fill:#c8e6c9,stroke:#2e7d32
56-
style skipped fill:#ffcdd2,stroke:#c62828
5750
```
5851

5952
## Data Selection
@@ -73,9 +66,6 @@ flowchart LR
7366
7467
payload --> selector
7568
selector --> data
76-
77-
style payload fill:#e3f2fd,stroke:#1565c0
78-
style data fill:#e8f5e9,stroke:#388e3c
7969
```
8070

8171
## Evaluator Processing
@@ -111,9 +101,6 @@ flowchart TD
111101
regex --> result
112102
list --> result
113103
plugin --> result
114-
115-
style data fill:#e3f2fd,stroke:#1565c0
116-
style result fill:#fff3e0,stroke:#ef6c00
117104
```
118105

119106
## Result Aggregation
@@ -134,9 +121,6 @@ flowchart TD
134121
check -->|Yes| unsafe
135122
safe --> response
136123
unsafe --> response
137-
138-
style safe fill:#c8e6c9,stroke:#2e7d32
139-
style unsafe fill:#ffcdd2,stroke:#c62828
140124
```
141125

142126
## Complete Sequence
@@ -215,7 +199,4 @@ flowchart TD
215199
216200
match_on -->|"match"| result_match
217201
match_on -->|"no_match"| result_nomatch
218-
219-
style condition_met fill:#c8e6c9,stroke:#2e7d32
220-
style condition_not fill:#ffcdd2,stroke:#c62828
221202
```

‎diagrams/07-agent-lifecycle.md‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ sequenceDiagram
6060
participant Server as Server
6161
participant DB as Database
6262
63-
rect rgb(243, 229, 245)
64-
Note over Admin,DB: Setup Phase (One-time)
63+
Note over Admin,DB: Setup Phase (One-time)
6564
Admin->>Server: PUT /controls {name}
6665
Server->>DB: Create control
6766
Admin->>Server: PUT /controls/{id}/data {definition}
@@ -76,14 +75,11 @@ sequenceDiagram
7675
Server->>DB: Create policy
7776
Admin->>Server: POST /policies/{id}/control_sets/{set_id}
7877
Server->>DB: Link control set to policy
79-
end
8078
81-
rect rgb(227, 242, 253)
82-
Note over Admin,DB: Assignment Phase
79+
Note over Admin,DB: Assignment Phase
8380
Admin->>Server: POST /agents/{agent_id}/policy/{policy_id}
8481
Server->>DB: Update agent.policy_id
8582
Server-->>Admin: {success: true}
86-
end
8783
```
8884

8985
## Agent Data Model
@@ -138,9 +134,6 @@ flowchart LR
138134
end
139135
140136
v0 -->|"Tool schema changed"| v1
141-
142-
style v0 fill:#e0e0e0,stroke:#757575
143-
style v1 fill:#c8e6c9,stroke:#2e7d32
144137
```
145138

146139
## Agent States
@@ -188,6 +181,4 @@ flowchart TD
188181
step3 --> step4
189182
step4 --> step5
190183
step5 --> step6
191-
192-
style step6 fill:#c8e6c9,stroke:#2e7d32
193184
```

‎diagrams/08-protect-decorator-flow.md‎

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ flowchart LR
1919
2020
call["Function Call"] --> decorator
2121
decorator --> result["Return Value"]
22-
23-
style code fill:#e3f2fd,stroke:#1565c0
24-
style decorator fill:#f3e5f5,stroke:#7b1fa2
2522
```
2623

2724
## Execution Sequence
@@ -38,29 +35,25 @@ sequenceDiagram
3835
Dec->>Dec: Bind arguments to parameters
3936
Dec->>Dec: Extract mapped data sources
4037
41-
rect rgb(255, 243, 224)
42-
Note over Dec,Engine: PRE-execution check
38+
Note over Dec,Engine: PRE-execution check
4339
Dec->>Engine: Evaluate(data, stage="pre")
4440
Engine-->>Dec: EvaluationResponse
4541
4642
alt is_safe = false
4743
Dec-->>App: Raise exception or return error
4844
end
49-
end
5045
5146
Dec->>Func: Execute original function
5247
Func-->>Dec: Return value
5348
54-
rect rgb(232, 245, 233)
55-
Note over Dec,Engine: POST-execution check
49+
Note over Dec,Engine: POST-execution check
5650
Dec->>Dec: Add return value to data
5751
Dec->>Engine: Evaluate(data, stage="post")
5852
Engine-->>Dec: EvaluationResponse
5953
6054
alt is_safe = false
6155
Dec-->>App: Raise exception or return error
6256
end
63-
end
6457
6558
Dec-->>App: Return result
6659
```
@@ -85,8 +78,6 @@ flowchart TD
8578
8679
decorator --> mapping
8780
function --> mapping
88-
89-
style mapping fill:#e8f5e9,stroke:#388e3c
9081
```
9182

9283
## Parameter Binding Process
@@ -109,8 +100,6 @@ flowchart LR
109100
110101
call --> bind
111102
bind --> result
112-
113-
style result fill:#fff3e0,stroke:#ef6c00
114103
```
115104

116105
## Data Available at Each Stage
@@ -129,9 +118,6 @@ flowchart TD
129118
130119
pre --> exec
131120
exec --> post
132-
133-
style pre fill:#fff3e0,stroke:#ef6c00
134-
style post fill:#e8f5e9,stroke:#388e3c
135121
```
136122

137123
## What You CAN and CANNOT Access
@@ -151,9 +137,6 @@ flowchart LR
151137
n3["Intermediate results"]
152138
n4["Unmapped parameters"]
153139
end
154-
155-
style can fill:#c8e6c9,stroke:#2e7d32
156-
style cannot fill:#ffcdd2,stroke:#c62828
157140
```
158141

159142
## Common Patterns
@@ -166,8 +149,6 @@ flowchart LR
166149
pre -->|Safe| func["Process"]
167150
pre -->|Unsafe| block["Block"]
168151
func --> output["Output"]
169-
170-
style block fill:#ffcdd2,stroke:#c62828
171152
```
172153

173154
### Pattern 2: Output Filtering
@@ -178,8 +159,6 @@ flowchart LR
178159
func --> post["POST Check"]
179160
post -->|Safe| output["Return Output"]
180161
post -->|PII Detected| redact["Redact/Block"]
181-
182-
style redact fill:#fff3e0,stroke:#ef6c00
183162
```
184163

185164
### Pattern 3: Full Pipeline
@@ -199,9 +178,6 @@ flowchart LR
199178
200179
pre -->|Fail| blocked1["Blocked"]
201180
post -->|Fail| blocked2["Blocked"]
202-
203-
style blocked1 fill:#ffcdd2,stroke:#c62828
204-
style blocked2 fill:#ffcdd2,stroke:#c62828
205181
```
206182

207183
## LangGraph Integration Example
@@ -222,9 +198,6 @@ flowchart TD
222198
node1 --> node2
223199
node2 --> node3
224200
node3 --> finish
225-
226-
style node1 fill:#e3f2fd,stroke:#1565c0
227-
style node3 fill:#e3f2fd,stroke:#1565c0
228201
```
229202

230203
## Error Handling
@@ -254,8 +227,4 @@ flowchart TD
254227
deny --> exception
255228
warn --> log_warning
256229
log --> log_info
257-
258-
style exception fill:#ffcdd2,stroke:#c62828
259-
style log_warning fill:#fff3e0,stroke:#ef6c00
260-
style safe fill:#c8e6c9,stroke:#2e7d32
261230
```

0 commit comments

Comments
 (0)