Skip to content

Commit 3aeb370

Browse files
authored
Merge pull request #62 from Integration-Automation/dev
Release: merge dev into main
2 parents d2807d9 + ea2d62f commit 3aeb370

52 files changed

Lines changed: 4239 additions & 271 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 212 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -55,105 +55,235 @@ facade.
5555
## Architecture
5656

5757
```mermaid
58-
flowchart LR
59-
User[User / CLI / JSON batch]
58+
flowchart TD
59+
CLI["<b>CLI / JSON batch</b><br/>python -m automation_file"]
60+
GUIUser["<b>PySide6 GUI</b><br/>launch_ui"]
61+
ClientSDK["<b>HTTPActionClient SDK</b>"]
62+
MCPHost["<b>MCP hosts</b><br/>Claude Desktop · MCP CLIs"]
63+
Plugins["<b>Entry-point plugins</b><br/>automation_file.actions"]
64+
65+
subgraph Facade["<b>automation_file &mdash; facade (__init__.py)</b>"]
66+
PublicAPI["<b>Public API</b><br/>execute_action · execute_action_parallel · execute_action_dag<br/>validate_action · driver_instance · s3_instance · azure_blob_instance<br/>dropbox_instance · sftp_instance · ftp_instance · onedrive_instance · box_instance<br/>start_autocontrol_socket_server · start_http_action_server<br/>start_metrics_server · start_web_ui · MCPServer<br/>notification_manager · scheduler · trigger_manager<br/>AutomationConfig · progress_registry · Quota · retry_on_transient"]
67+
end
68+
69+
subgraph Core["<b>core</b>"]
70+
Registry[("<b>ActionRegistry</b><br/>FA_* commands")]
71+
Executor["<b>ActionExecutor</b><br/>serial · parallel · dry-run · validate-first"]
72+
DAG["<b>dag_executor</b><br/>topological fan-out"]
73+
Callback["<b>CallbackExecutor</b>"]
74+
Loader["<b>PackageLoader</b><br/>+ entry-point plugins"]
75+
Queue["<b>ActionQueue</b>"]
76+
Json["<b>json_store</b>"]
77+
Sub["<b>substitution</b><br/>${env:} ${date:} ${uuid}"]
78+
end
79+
80+
subgraph Reliability["<b>reliability</b>"]
81+
Retry["<b>retry</b><br/>@retry_on_transient"]
82+
QuotaMod["<b>Quota</b><br/>bytes + time budget"]
83+
Breaker["<b>CircuitBreaker</b>"]
84+
RL["<b>RateLimiter</b>"]
85+
Locks["<b>FileLock</b> · <b>SQLiteLock</b>"]
86+
end
87+
88+
subgraph Observability["<b>observability</b>"]
89+
Progress["<b>progress</b><br/>CancellationToken · Reporter"]
90+
Metrics["<b>metrics</b><br/>Prometheus counters + histograms"]
91+
Audit["<b>AuditLog</b><br/>SQLite"]
92+
Tracing["<b>tracing</b><br/>OpenTelemetry spans"]
93+
FIM["<b>IntegrityMonitor</b>"]
94+
end
6095
61-
subgraph Facade["automation_file (facade)"]
62-
Public["Public API<br/>execute_action, execute_action_parallel,<br/>validate_action, driver_instance,<br/>start_autocontrol_socket_server,<br/>start_http_action_server, Quota,<br/>retry_on_transient, safe_join, ..."]
96+
subgraph Security["<b>security &amp; config</b>"]
97+
Secrets["<b>Secret providers</b><br/>Env · File · Chained"]
98+
Config["<b>AutomationConfig</b><br/>TOML loader"]
99+
ConfW["<b>ConfigWatcher</b><br/>hot reload"]
100+
Crypto["<b>crypto</b><br/>AES-256-GCM"]
101+
Check["<b>checksum</b> / <b>manifest</b>"]
102+
SafeP["<b>safe_paths</b><br/>safe_join · is_within"]
103+
ACL["<b>ActionACL</b>"]
63104
end
64105
65-
subgraph Core["core"]
66-
Registry[(ActionRegistry<br/>FA_* commands)]
67-
Executor[ActionExecutor]
68-
Callback[CallbackExecutor]
69-
Loader[PackageLoader]
70-
Json[json_store]
71-
Retry[retry]
72-
QuotaMod[quota]
73-
Progress[progress<br/>Token + Reporter]
106+
subgraph Events["<b>event-driven</b>"]
107+
Trigger["<b>TriggerManager</b><br/>watchdog file watcher"]
108+
Sched["<b>Scheduler</b><br/>5-field cron + overlap guard"]
74109
end
75110
76-
subgraph Events["event-driven"]
77-
TriggerMod["trigger<br/>watchdog file watcher"]
78-
SchedulerMod["scheduler<br/>cron background thread"]
111+
subgraph Servers["<b>servers</b>"]
112+
TCP["<b>TCPActionServer</b><br/>loopback · AUTH secret"]
113+
HTTPS["<b>HTTPActionServer</b><br/>POST /actions · Bearer<br/>/healthz /readyz /progress /openapi.json"]
114+
MCP["<b>MCPServer</b><br/>JSON-RPC 2.0 (stdio)"]
115+
MetSrv["<b>MetricsServer</b><br/>/metrics"]
116+
WebUI["<b>WebUIServer</b><br/>HTMX dashboard"]
79117
end
80118
81-
subgraph Local["local"]
82-
FileOps[file_ops]
83-
DirOps[dir_ops]
84-
ZipOps[zip_ops]
85-
Safe[safe_paths]
119+
subgraph UI["<b>ui (PySide6)</b>"]
120+
MainWin["<b>MainWindow</b><br/>Home · Local · HTTP · Drive · S3 · Azure · Dropbox<br/>SFTP · OneDrive · Box · JSON · Triggers · Scheduler<br/>Progress · Transfer · Servers"]
121+
Worker["<b>ActionWorker</b><br/>QRunnable on QThreadPool"]
86122
end
87123
88-
subgraph Remote["remote"]
89-
UrlVal[url_validator]
90-
Http[http_download]
91-
Drive["google_drive<br/>client + *_ops"]
92-
S3["s3"]
93-
Azure["azure_blob"]
94-
Dropbox["dropbox_api"]
95-
SFTP["sftp"]
124+
subgraph Local["<b>local ops</b>"]
125+
FileOps["<b>file_ops</b> · <b>dir_ops</b>"]
126+
Archives["<b>zip_ops</b> · <b>tar_ops</b> · <b>archive_ops</b>"]
127+
DataOps["<b>data_ops</b><br/>csv · jsonl · parquet · yaml"]
128+
TextOps["<b>text_ops</b> · <b>diff_ops</b><br/><b>json_edit</b> · <b>templates</b>"]
129+
Misc["<b>shell_ops</b> · <b>sync_ops</b> · <b>trash</b><br/><b>versioning</b> · <b>conditional</b> · <b>mime</b>"]
96130
end
97131
98-
subgraph Server["server"]
99-
TCP[TCPActionServer]
100-
HTTP[HTTPActionServer]
132+
subgraph Remote["<b>remote backends</b>"]
133+
UrlVal["<b>url_validator</b><br/>SSRF guard"]
134+
Http["<b>http_download</b><br/>retry · resume · SHA-256"]
135+
Drive["<b>google_drive</b>"]
136+
S3M["<b>s3</b>"]
137+
Azure["<b>azure_blob</b>"]
138+
Dropbox["<b>dropbox_api</b>"]
139+
SFTP["<b>sftp</b> (RejectPolicy)"]
140+
FTP["<b>ftp / FTPS</b>"]
141+
OneD["<b>onedrive</b>"]
142+
Box["<b>box</b>"]
143+
WebDAV["<b>webdav</b>"]
144+
SMB["<b>smb / cifs</b>"]
145+
Fsspec["<b>fsspec_bridge</b>"]
146+
Cross["<b>cross_backend</b><br/>local:// s3:// drive:// azure://<br/>dropbox:// sftp:// ftp://"]
101147
end
102148
103-
subgraph UI["ui (PySide6)"]
104-
Launcher[launch_ui]
105-
MainWindow["MainWindow<br/>9-tab control surface"]
149+
subgraph Notify["<b>notifications</b>"]
150+
NM["<b>NotificationManager</b><br/>fanout · dedup · SSRF guard"]
151+
Sinks["<b>Sinks</b><br/>Webhook · Slack · Email<br/>Telegram · Discord · Teams · PagerDuty"]
106152
end
107153
108-
subgraph Project["project / utils"]
109-
Builder[ProjectBuilder]
110-
Templates[templates]
111-
Discovery[file_discovery]
154+
subgraph Utils["<b>utils / project</b>"]
155+
Fast["<b>fast_find</b><br/>mdfind / locate / es.exe"]
156+
Dedup["<b>find_duplicates</b>"]
157+
Grep["<b>grep_files</b>"]
158+
Rotate["<b>rotate_backups</b>"]
159+
Discovery["<b>file_discovery</b>"]
160+
Builder["<b>ProjectBuilder</b> + templates"]
112161
end
113162
114-
User --> Public
115-
User --> Launcher
116-
Launcher --> MainWindow
117-
MainWindow --> Public
118-
Public --> Executor
119-
Public --> Callback
120-
Public --> Loader
121-
Public --> TCP
122-
Public --> HTTP
123-
124-
Executor --> Registry
125-
Executor --> Retry
126-
Executor --> QuotaMod
127-
Callback --> Registry
128-
Loader --> Registry
129-
TCP --> Executor
130-
HTTP --> Executor
131-
Executor --> Json
132-
133-
Registry --> FileOps
134-
Registry --> DirOps
135-
Registry --> ZipOps
136-
Registry --> Safe
137-
Registry --> Http
138-
Registry --> Drive
139-
Registry --> S3
140-
Registry --> Azure
141-
Registry --> Dropbox
142-
Registry --> SFTP
143-
Registry --> Builder
144-
Registry --> TriggerMod
145-
Registry --> SchedulerMod
146-
Registry --> Progress
147-
148-
TriggerMod --> Executor
149-
SchedulerMod --> Executor
150-
Http --> Progress
151-
S3 --> Progress
152-
153-
Http --> UrlVal
154-
Http --> Retry
155-
Builder --> Templates
156-
Builder --> Discovery
163+
CLI ==> PublicAPI
164+
GUIUser ==> MainWin
165+
ClientSDK ==> HTTPS
166+
MCPHost ==> MCP
167+
Plugins ==> Loader
168+
169+
MainWin ==> Worker
170+
Worker ==> PublicAPI
171+
172+
PublicAPI ==> Executor
173+
PublicAPI ==> DAG
174+
PublicAPI ==> Callback
175+
PublicAPI ==> Queue
176+
PublicAPI ==> Config
177+
PublicAPI ==> NM
178+
PublicAPI ==> Trigger
179+
PublicAPI ==> Sched
180+
181+
TCP ==> Executor
182+
HTTPS ==> Executor
183+
MCP ==> Registry
184+
MetSrv ==> Metrics
185+
WebUI ==> Registry
186+
ACL ==> TCP
187+
ACL ==> HTTPS
188+
189+
Executor ==> Registry
190+
Executor ==> Sub
191+
Executor ==> Retry
192+
Executor ==> QuotaMod
193+
Executor ==> Metrics
194+
Executor ==> Audit
195+
Executor ==> Tracing
196+
Executor ==> Json
197+
DAG ==> Executor
198+
Callback ==> Registry
199+
Loader ==> Registry
200+
201+
Trigger ==> Executor
202+
Sched ==> Executor
203+
Trigger -. on failure .-> NM
204+
Sched -. on failure .-> NM
205+
FIM -. on drift .-> NM
206+
ConfW ==> Config
207+
Config ==> Secrets
208+
Config ==> NM
209+
210+
Registry ==> FileOps
211+
Registry ==> Archives
212+
Registry ==> DataOps
213+
Registry ==> TextOps
214+
Registry ==> Misc
215+
Registry ==> Http
216+
Registry ==> Drive
217+
Registry ==> S3M
218+
Registry ==> Azure
219+
Registry ==> Dropbox
220+
Registry ==> SFTP
221+
Registry ==> FTP
222+
Registry ==> OneD
223+
Registry ==> Box
224+
Registry ==> WebDAV
225+
Registry ==> SMB
226+
Registry ==> Fsspec
227+
Registry ==> Cross
228+
Registry ==> Crypto
229+
Registry ==> Check
230+
Registry ==> Fast
231+
Registry ==> Dedup
232+
Registry ==> Grep
233+
Registry ==> Rotate
234+
Registry ==> Discovery
235+
Registry ==> Builder
236+
Registry ==> Progress
237+
238+
FileOps ==> SafeP
239+
Archives ==> SafeP
240+
Misc ==> SafeP
241+
242+
Http ==> UrlVal
243+
Http ==> Retry
244+
Http ==> Progress
245+
Http ==> Check
246+
S3M ==> Progress
247+
WebDAV ==> UrlVal
248+
NM ==> UrlVal
249+
NM ==> Sinks
250+
251+
Cross ==> Drive
252+
Cross ==> S3M
253+
Cross ==> Azure
254+
Cross ==> Dropbox
255+
Cross ==> SFTP
256+
Cross ==> FTP
257+
258+
classDef entry fill:#FDEDEC,stroke:#641E16,stroke-width:3px,color:#000,font-weight:bold;
259+
classDef facade fill:#D6EAF8,stroke:#154360,stroke-width:4px,color:#000,font-weight:bold;
260+
classDef core fill:#FEF9E7,stroke:#1F3A93,stroke-width:3px,color:#000,font-weight:bold;
261+
classDef rel fill:#D1F2EB,stroke:#0B5345,stroke-width:3px,color:#000,font-weight:bold;
262+
classDef obs fill:#FDEBD0,stroke:#9C640C,stroke-width:3px,color:#000,font-weight:bold;
263+
classDef sec fill:#F5B7B1,stroke:#78281F,stroke-width:3px,color:#000,font-weight:bold;
264+
classDef event fill:#FCF3CF,stroke:#7D6608,stroke-width:3px,color:#000,font-weight:bold;
265+
classDef server fill:#FADBD8,stroke:#922B21,stroke-width:3px,color:#000,font-weight:bold;
266+
classDef ui fill:#AED6F1,stroke:#1B4F72,stroke-width:3px,color:#000,font-weight:bold;
267+
classDef localOps fill:#E8DAEF,stroke:#512E5F,stroke-width:3px,color:#000,font-weight:bold;
268+
classDef remote fill:#D5F5E3,stroke:#196F3D,stroke-width:3px,color:#000,font-weight:bold;
269+
classDef notify fill:#F9E79F,stroke:#7D6608,stroke-width:3px,color:#000,font-weight:bold;
270+
classDef utils fill:#EAEDED,stroke:#212F3C,stroke-width:3px,color:#000,font-weight:bold;
271+
272+
class CLI,GUIUser,ClientSDK,MCPHost,Plugins entry;
273+
class PublicAPI facade;
274+
class Registry,Executor,DAG,Callback,Loader,Queue,Json,Sub core;
275+
class Retry,QuotaMod,Breaker,RL,Locks rel;
276+
class Progress,Metrics,Audit,Tracing,FIM obs;
277+
class Secrets,Config,ConfW,Crypto,Check,SafeP,ACL sec;
278+
class Trigger,Sched event;
279+
class TCP,HTTPS,MCP,MetSrv,WebUI server;
280+
class MainWin,Worker ui;
281+
class FileOps,Archives,DataOps,TextOps,Misc localOps;
282+
class UrlVal,Http,Drive,S3M,Azure,Dropbox,SFTP,FTP,OneD,Box,WebDAV,SMB,Fsspec,Cross remote;
283+
class NM,Sinks notify;
284+
class Fast,Dedup,Grep,Rotate,Discovery,Builder utils;
285+
286+
linkStyle default stroke:#1F2A44,stroke-width:2.5px;
157287
```
158288

159289
The `ActionRegistry` built by `build_default_registry()` is the single source

0 commit comments

Comments
 (0)