-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASLM_Module.json
More file actions
229 lines (229 loc) · 9.42 KB
/
ASLM_Module.json
File metadata and controls
229 lines (229 loc) · 9.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
{
"fileVersion": 1,
"id": "aslm-python-example",
"name": "Example Python Module",
"description": "Reference ASLM Python module: Flask WebView UI, typed settings (getExec/setExec), downloads bridge (stdio JSON), host theme/locale snapshots, module interop HTTP client, and host-managed python-runtime venv.",
"version": "1.0.0.5",
"author": "NEXTGGTECH",
"type": "ui",
"category": [
"developer-tools"
],
"hasPage": true,
"icon": "icon.png",
"sidebarIcon": "sidebar_icon.png",
"source": {
"type": "github",
"repo": "NEXTGGTECH/ASLM-Python-Example-Module"
},
"update": {
"mode": "release",
"channel": "release",
"branch": "main",
"preserve": [
"Settings/settings.json"
],
"runFirstRunAfterUpdate": true
},
"dependencies": {
"engines": [
{
"id": "python-runtime",
"libraries": [
"flask>=3.0"
]
}
]
},
"commands": {
"firstRun": [
{
"name": "Initialize settings.json",
"description": "Creates Settings/settings.json from manifest defaults (first install or after update).",
"engine": "python-runtime",
"exec": "main.py first_run"
}
],
"run": [
{
"name": "Flask WebView server",
"description": "Binds to example-port and serves App/ for the ASLM module page (ASLM_UI_PORT).",
"engine": "python-runtime",
"exec": "main.py runserver"
}
]
},
"settings": [
{
"key": "example-port",
"name": "Port number",
"description": "TCP port for the Flask UI server; ASLM reserves it, injects ASLM_UI_PORT, and passes the value to setExec",
"type": "port",
"default": 20100,
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-port",
"setExec": "main.py set_setting --key example-port --value {value}"
},
{
"key": "example-string",
"name": "String value",
"description": "Plain text stored in settings.json, exported as ASLM_EXAMPLE_STRING; shown as the greeting banner on the dashboard",
"type": "string",
"default": "Example Python Module - ASLM reference UI",
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-string",
"setExec": "main.py set_setting --key example-string --value {value}"
},
{
"key": "example-bool",
"name": "Boolean value",
"description": "ASLM passes \"true\"/\"false\" to setExec, normalised to a Python bool; when true, the dashboard shows ASLM_* env vars and raw JSON debug panels",
"type": "bool",
"default": true,
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-bool",
"setExec": "main.py set_setting --key example-bool --value {value}"
},
{
"key": "example-int",
"name": "Integer value",
"description": "Whole number passed as a string to setExec and converted with int(); used as the auto-refresh interval (ms) for the Module Interop registry timer",
"type": "int",
"default": 10000,
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-int",
"setExec": "main.py set_setting --key example-int --value {value}"
},
{
"key": "example-number",
"name": "Float value",
"description": "Decimal number passed to setExec and converted with float(); sampling fraction 0.0-1.0 for verbose log output in bridge and interop handlers",
"type": "number",
"default": 0.25,
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-number",
"setExec": "main.py set_setting --key example-number --value {value}"
},
{
"key": "example-password",
"name": "Password value",
"description": "Masked in the ASLM UI, redacted to *** in GET /api/settings; used as a bearer token in sample HTTP client Authorization headers",
"type": "password",
"default": "sk-1234-5678-9012-3456-7890",
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-password",
"setExec": "main.py set_setting --key example-password --value {value}"
},
{
"key": "example-select",
"name": "Select value",
"description": "Enum constrained to allowedValues; controls logging.basicConfig level in main.py subcommands (basic: INFO, debug: DEBUG, trace: DEBUG + verbose)",
"type": "select",
"default": "debug",
"allowedValues": [
"basic",
"debug",
"trace"
],
"engine": "python-runtime",
"getExec": "main.py get_setting --key example-select",
"setExec": "main.py set_setting --key example-select --value {value}"
},
{
"key": "python-runtime",
"name": "Engine flag",
"description": "Read-only flag set by ASLM; true when the python-runtime engine is installed, false when the package is missing. Key equals the engine id.",
"type": "engine",
"default": true,
"engine": "python-runtime",
"getExec": "main.py get_setting --key python-runtime",
"setExec": "main.py set_setting --key python-runtime --value {value}"
},
{
"key": "python-runtime_path",
"name": "Path value",
"description": "Absolute path to python.exe in the host-managed venv; ASLM auto-fills it using the key prefix convention <engineId>_path",
"type": "path",
"default": null,
"engine": "python-runtime",
"getExec": "main.py get_setting --key python-runtime_path",
"setExec": "main.py set_setting --key python-runtime_path --value {value}"
},
{
"key": "python-runtime_data",
"name": "Data directory",
"description": "Per-engine writable data root; ASLM auto-fills it using the key prefix convention <engineId>_data",
"type": "data",
"default": null,
"engine": "python-runtime",
"getExec": "main.py get_setting --key python-runtime_data",
"setExec": "main.py set_setting --key python-runtime_data --value {value}"
},
{
"key": "python-runtime_models",
"name": "Models directory",
"description": "Per-engine models directory; ASLM auto-fills it using the key prefix convention <engineId>_models",
"type": "models",
"default": null,
"engine": "python-runtime",
"getExec": "main.py get_setting --key python-runtime_models",
"setExec": "main.py set_setting --key python-runtime_models --value {value}"
},
{
"key": "example-theme",
"name": "Host theme snapshot",
"description": "Host-only; ASLM calls apply_aslm_host_theme --file {path}, handler saves to Settings/host_theme.json and maps colors.* to CSS variables",
"type": "theme",
"engine": "python-runtime",
"setExec": "main.py apply_aslm_host_theme --file {value}"
},
{
"key": "example-locale",
"name": "Host locale snapshot",
"description": "Host-only; ASLM calls apply_aslm_locale --file {path}, handler saves to Settings/host_locale.json; read language and displayName to localise UI strings",
"type": "locale",
"engine": "python-runtime",
"setExec": "main.py apply_aslm_locale --file {value}"
}
],
"downloadsBridge": {
"protocolVersion": 1,
"engine": "python-runtime",
"entryPoint": "main.py downloads_bridge",
"operations": [
"list_categories",
"list_items",
"describe_item",
"resolve_install",
"resolve_uninstall"
],
"categories": [
{
"id": "example-catalog",
"title": "Python reference artifacts",
"description": "Sample entries that document downloads bridge request/response fields. resolve_install returns step templates (download_file, extract_zip, python_package) without downloading in this reference module.",
"groupKey": "python-reference",
"targetRef": "example_data",
"sortOrder": 10
}
],
"targets": {
"example_data": {
"root": "Data",
"relative": "example-downloads",
"description": "Install root: <module>/Data/example-downloads/ — used as targetRef in installManifest/uninstallManifest from this bridge."
}
}
},
"moduleInterop": {
"protocolVersion": 1,
"client": {
"enabled": true
}
},
"status": {
"installed": false,
"enabled": false,
"firstRunCompleted": false
}
}