You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(bcasl,acasl): clarify plugin location under API/ and emphasize BCASL tag importance
- Add IMPORTANT notes: plugins must live under API/<plugin_id>/ (not under acasl/ or bcasl/)\n- Fix Quick Navigation anchors and add 'Why tags matter' subsection\n- Expand tag guidance and recommended stage tags
- Better examples: minimal plugin, minifier sample, obfuscation sample, and system installs sample.
29
30
30
31
Strict rules (BCASL package signature)
31
-
- Your plugin must be a Python package under API/<plugin_id>/ with an __init__.py.
32
+
33
+
> IMPORTANT: BCASL plugins must always live under API/<plugin_id>/ as Python packages (folder with an __init__.py). Paths such as bcasl/<plugin_id>/ or acasl/<plugin_id>/ are invalid and will not be discovered.
34
+
- Your plugin must be a Python package under API/<plugin_id>/ with an __init__.py (not under acasl/ or bcasl/).
32
35
- In __init__.py, declare at least:
33
36
- BCASL_PLUGIN = True
34
37
- BCASL_ID = "your_id"
@@ -128,6 +131,7 @@ def bcasl_register(manager):
128
131
129
132
2) Folder layout
130
133
134
+
Place plugins exclusively under API/<plugin_id>/ (never under acasl/ or bcasl/):
131
135
```
132
136
<project root>
133
137
└── API/
@@ -199,6 +203,22 @@ Notes:
199
203
- Using tags improves default ordering and UX; the user remains free to override order in bcasl.* or via the UI.
200
204
- Absence of tags falls back to textual heuristics on name/description with the same taxonomy.
201
205
206
+
### Why tags matter
207
+
- Drive default ordering deterministically across projects and workspaces.
208
+
- Prevent anti-patterns like running obfuscation before minification or packaging before validation.
209
+
- Improve the UI: grouping, filtering, and tooltips leverage tags to present clearer pipelines.
- Aid onboarding: contributors understand intent and stage from tags at a glance.
212
+
213
+
Recommended baseline tags by stage:
214
+
- Early: clean, validation
215
+
- Prepare: prepare, resources, configure, codegen
216
+
- Quality: lint, format, typecheck
217
+
- Transform: minify, obfuscation
218
+
- Package: packaging, bundle, archive
219
+
- Meta: manifest, version, docs
220
+
- Delivery: publish, release
221
+
202
222
---
203
223
204
224
5) Progress and non‑interactive considerations
@@ -453,7 +473,7 @@ def bcasl_register(manager):
453
473
---
454
474
455
475
11) Troubleshooting
456
-
- Plugin not visible → ensure BCASL_PLUGIN/ID/DESCRIPTION exist; use @plugin; register via bcasl_register; open API Loader; check logs
476
+
- Plugin not visible → ensure BCASL_PLUGIN/ID/DESCRIPTION exist; it's under API/<plugin_id>/ (not under acasl/ or bcasl/); use @plugin; register via bcasl_register; open API Loader; check logs
457
477
- Config invalid → use UI raw editor; validate formats; fall back to JSON
458
478
- Long operations → use progress; split work; no modal blocking in background
459
479
- Ordering not as expected → add/adjust BCASL_TAGS (e.g., "minify", "obfuscation") or override order in the UI
Copy file name to clipboardExpand all lines: docs/how_to_create_an_acasl_API.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ Highlights (what changed)
26
26
- Examples updated to demonstrate system installs and best practices.
27
27
28
28
Important rules (strict)
29
+
30
+
> IMPORTANT: ACASL plugins must always live under API/<plugin_id>/ as Python packages (folder with an __init__.py). Paths such as acasl/<plugin_id>/ or bcasl/<plugin_id>/ are not valid for ACASL plugins and will not be discovered.
29
31
- ACASL plugins must be Python packages under API/<plugin_id>/ (folder with an __init__.py).
30
32
- Mandatory package signature in __init__.py:
31
33
- ACASL_PLUGIN = True
@@ -87,11 +89,11 @@ ACASL is the post‑compilation counterpart to BCASL. It runs automatically afte
87
89
## Execution flow and integration
88
90
- ACASL is triggered after all builds complete.
89
91
- The default artifact collector scans `<workspace>/dist` and `<workspace>/build` and passes the file list to plugins.
90
-
- Plugins are discovered under API/ at the project root. Only Python packages that declare ACASL_PLUGIN = True and expose acasl_run(ctx) are considered. The runtime further validates ACASL_ID/ACASL_DESCRIPTION; extended metadata are optional but recommended.
92
+
- Plugins are discovered exclusively under API/ at the project root (never under acasl/ or bcasl/). Only Python packages that declare ACASL_PLUGIN = True and expose acasl_run(ctx) are considered. The runtime further validates ACASL_ID/ACASL_DESCRIPTION; extended metadata are optional but recommended.
91
93
- ACASL runs asynchronously (non‑blocking UI). A soft timeout can be configured; each plugin run is measured (duration in ms).
92
94
93
95
## Where to place your plugins (package layout)
94
-
Create Python packages under API/ (not loose .py files):
96
+
Create Python packages under API/ (not loose .py files). Do not place ACASL plugins under acasl/ or bcasl/:
95
97
```
96
98
API/
97
99
├── hash_report/
@@ -288,7 +290,7 @@ def acasl_run(ctx):
288
290
- Ensure `acasl/__init__.py` points to `acasl/acasl_loader.py`.
289
291
- Ensure UI connects to `from acasl import open_acasl_loader_dialog`.
290
292
- Plugin not listed
291
-
- Your plugin must be a Python package under API/<plugin_id>/ with an __init__.py.
293
+
- Your plugin must be a Python package under API/<plugin_id>/ with an __init__.py (not under acasl/ or bcasl/).
292
294
-__init__.py must define ACASL_PLUGIN = True and a callable acasl_run(ctx).
293
295
- Required metadata missing: ensure ACASL_ID and ACASL_DESCRIPTION are defined (strings) — the loader/runtime enforce these.
0 commit comments