ivoryos 0.1.20__py3-none-any.whl → 0.1.22__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.
Potentially problematic release.
This version of ivoryos might be problematic. Click here for more details.
- ivoryos/__init__.py +21 -16
- ivoryos/routes/control/control.py +2 -2
- ivoryos/routes/control/templates/control/controllers_home.html +6 -1
- ivoryos/routes/database/database.py +45 -2
- ivoryos/routes/database/templates/database/experiment_database.html +4 -2
- ivoryos/routes/database/templates/database/workflow_run_database.html +81 -0
- ivoryos/routes/design/design.py +74 -18
- ivoryos/routes/design/templates/design/experiment_builder.html +84 -94
- ivoryos/routes/design/templates/design/experiment_run.html +188 -101
- ivoryos/routes/main/templates/main/home.html +80 -47
- ivoryos/static/js/socket_handler.js +59 -16
- ivoryos/static/js/sortable_design.js +102 -33
- ivoryos/static/style.css +9 -0
- ivoryos/templates/base.html +9 -6
- ivoryos/utils/client_proxy.py +57 -0
- ivoryos/utils/db_models.py +66 -11
- ivoryos/utils/form.py +50 -2
- ivoryos/utils/global_config.py +10 -0
- ivoryos/utils/llm_agent.py +1 -1
- ivoryos/utils/script_runner.py +115 -43
- ivoryos/utils/utils.py +24 -1
- ivoryos/version.py +1 -1
- {ivoryos-0.1.20.dist-info → ivoryos-0.1.22.dist-info}/METADATA +7 -3
- {ivoryos-0.1.20.dist-info → ivoryos-0.1.22.dist-info}/RECORD +27 -25
- {ivoryos-0.1.20.dist-info → ivoryos-0.1.22.dist-info}/LICENSE +0 -0
- {ivoryos-0.1.20.dist-info → ivoryos-0.1.22.dist-info}/WHEEL +0 -0
- {ivoryos-0.1.20.dist-info → ivoryos-0.1.22.dist-info}/top_level.txt +0 -0
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
{% block title %}IvoryOS | Design{% endblock %}
|
|
3
3
|
|
|
4
4
|
{% block body %}
|
|
5
|
-
{#
|
|
5
|
+
{# overlay block for text-to-code gen #}
|
|
6
6
|
<div id="overlay" class="overlay">
|
|
7
7
|
<div>
|
|
8
8
|
<h3 id="overlay-text">Generating design, please wait...</h3>
|
|
9
9
|
<div class="spinner-border" role="status"></div>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
|
+
|
|
12
13
|
<div class="row">
|
|
13
14
|
<div class="col-md-3 scroll-column" >
|
|
14
15
|
|
|
@@ -30,7 +31,6 @@
|
|
|
30
31
|
|
|
31
32
|
{# edit action #}
|
|
32
33
|
{% if session["edit_action"] %}
|
|
33
|
-
{# {{ session["edit_action"] }}#}
|
|
34
34
|
{% with action = session["edit_action"] %}
|
|
35
35
|
<h5> {{ format_name(action['action']) }} </h5>
|
|
36
36
|
<form role="form" method='POST' name="{{instrument}}" action="{{ url_for('design.edit_action', uuid=session["edit_action"]['uuid']) }}">
|
|
@@ -69,91 +69,71 @@
|
|
|
69
69
|
<button class="btn btn-primary" type="submit" name="back" id="back" value="back">Back</button>
|
|
70
70
|
</form>
|
|
71
71
|
{% endwith %}
|
|
72
|
+
|
|
73
|
+
|
|
72
74
|
{% elif instrument %}
|
|
73
75
|
<div>
|
|
74
76
|
<div class="d-flex justify-content-between align-items-center " style="margin-bottom: 1vh;margin-top: 1vh;">
|
|
75
|
-
|
|
76
77
|
<a class="btn btn-primary" role="button" type="button" href="{{url_for('design.experiment_builder')}}"><i class="bi bi-arrow-return-left"></i></a>
|
|
77
|
-
|
|
78
78
|
{{ format_name(instrument) }}
|
|
79
|
-
|
|
80
|
-
|
|
81
79
|
</div>
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
{% endfor %}
|
|
100
|
-
</div>
|
|
101
|
-
<button type="submit" class="btn btn-dark">Add </button>
|
|
102
|
-
</form>
|
|
103
|
-
{% else %}
|
|
104
|
-
{% if script.editing_type == "script" %}
|
|
105
|
-
{# Auto Fill Toggle #}
|
|
106
|
-
<div class="d-flex justify-content-between align-items-center " style="margin-bottom: 1vh;margin-top: 1vh;">
|
|
107
|
-
|
|
108
|
-
<div></div>
|
|
109
|
-
<form role="form" method='POST' name="autoFill" id="autoFill">
|
|
110
|
-
<div class="form-check form-switch">
|
|
111
|
-
<input type="hidden" id="autofill" name="autofill" value="temp_value">
|
|
112
|
-
<input class="form-check-input" type="checkbox" id="autoFillCheck" name="autoFillCheck" onchange="document.getElementById('autoFill').submit();"
|
|
113
|
-
value="temp_value"
|
|
114
|
-
{{ "checked" if session["autofill"] else "" }}>
|
|
115
|
-
<label class="form-check-label" for="autoFillCheck">Auto fill</label>
|
|
116
|
-
</div>
|
|
117
|
-
<button type="submit" class="btn btn-default" style="display: none;">Auto fill </button>
|
|
118
|
-
</form>
|
|
119
|
-
</div>
|
|
120
|
-
{% endif %}
|
|
81
|
+
{% if script.editing_type == "script" %}
|
|
82
|
+
{# Auto Fill Toggle #}
|
|
83
|
+
<div class="d-flex justify-content-between align-items-center " style="margin-bottom: 1vh;margin-top: 1vh;">
|
|
84
|
+
<div></div>
|
|
85
|
+
<form role="form" method='POST' name="autoFill" id="autoFill">
|
|
86
|
+
<div class="form-check form-switch">
|
|
87
|
+
<input type="hidden" id="autofill" name="autofill" value="temp_value">
|
|
88
|
+
<input class="form-check-input" type="checkbox" id="autoFillCheck" name="autoFillCheck" onchange="document.getElementById('autoFill').submit();"
|
|
89
|
+
value="temp_value"
|
|
90
|
+
{{ "checked" if session["autofill"] else "" }}>
|
|
91
|
+
<label class="form-check-label" for="autoFillCheck">Auto fill</label>
|
|
92
|
+
</div>
|
|
93
|
+
<button type="submit" class="btn btn-default" style="display: none;">Auto fill </button>
|
|
94
|
+
</form>
|
|
95
|
+
</div>
|
|
96
|
+
{% endif %}
|
|
121
97
|
|
|
122
98
|
{# according for instrument #}
|
|
123
99
|
<div class="accordion accordion-flush" id="accordionActions" >
|
|
124
|
-
{% if use_llm %}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<!--
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</div>
|
|
100
|
+
{% if use_llm and not instrument == "flow_control" %}
|
|
101
|
+
<div class="accordion-item text-to-code">
|
|
102
|
+
<h2 class="accordion-header">
|
|
103
|
+
<button class="accordion-button text-to-code" type="button" data-bs-toggle="collapse" data-bs-target="#text-to-code" aria-expanded="false" aria-controls="collapseExample">
|
|
104
|
+
Text-to-Code
|
|
105
|
+
</button>
|
|
106
|
+
</h2>
|
|
107
|
+
<div id="text-to-code" class="accordion-collapse collapse show" data-bs-parent="#accordionActions">
|
|
108
|
+
<div class="accordion-body">
|
|
109
|
+
<form role="form" method='POST' name="generate" id="generate" action="{{url_for('design.generate_code')}}">
|
|
110
|
+
<input type="hidden" id="instrument" name="instrument" value="{{instrument}}">
|
|
111
|
+
<textarea class="form-control" id="prompt" name="prompt" rows="6" aria-describedby="promptHelpBlock">{{ session['prompt'][instrument] if instrument in session['prompt'] else '' }}</textarea>
|
|
112
|
+
<div id="promptHelpBlock" class="form-text">
|
|
113
|
+
This will overwrite current design.
|
|
114
|
+
</div>
|
|
115
|
+
<!-- <button type="submit" class="btn btn-dark" id="clear" name="clear" onclick="submitForm('generate')">Clear</button>-->
|
|
116
|
+
<button type="submit" class="btn btn-dark" id="gen" name="gen">Generate</button>
|
|
117
|
+
</form>
|
|
143
118
|
</div>
|
|
119
|
+
</div>
|
|
144
120
|
</div>
|
|
145
121
|
{% endif %}
|
|
122
|
+
|
|
146
123
|
{% for name, form in forms.items() %}
|
|
147
|
-
<div class="accordion-item
|
|
124
|
+
<div class="accordion-item design-control" draggable="true">
|
|
148
125
|
<h2 class="accordion-header">
|
|
149
|
-
<button class="accordion-button collapsed
|
|
126
|
+
<button class="accordion-button collapsed draggable-action"
|
|
127
|
+
type="button" data-bs-toggle="collapse"
|
|
128
|
+
data-bs-target="#{{name}}" aria-expanded="false"
|
|
129
|
+
aria-controls="collapseExample"
|
|
130
|
+
data-action="{{ name }}">
|
|
150
131
|
{{ format_name(name) }}
|
|
151
132
|
</button>
|
|
152
133
|
</h2>
|
|
153
|
-
|
|
154
134
|
<div id="{{name}}" class="accordion-collapse collapse" data-bs-parent="#accordionActions">
|
|
155
135
|
<div class="accordion-body">
|
|
156
|
-
<form role="form" method='POST' name="add" id="add">
|
|
136
|
+
<form role="form" method='POST' name="add" id="add-{{name}}">
|
|
157
137
|
<div class="form-group">
|
|
158
138
|
{{ form.hidden_tag() }}
|
|
159
139
|
{% for field in form %}
|
|
@@ -171,18 +151,21 @@
|
|
|
171
151
|
{% endif %}
|
|
172
152
|
{% endfor %}
|
|
173
153
|
</div>
|
|
174
|
-
<button type="submit" class="btn btn-dark">Add
|
|
175
|
-
|
|
154
|
+
<button type="submit" class="btn btn-dark">Add</button>
|
|
155
|
+
{% if 'hidden_name' in form %}
|
|
156
|
+
<i class="bi bi-info-circle ms-2" data-bs-toggle="tooltip" data-bs-placement="top"
|
|
157
|
+
title='{{ form.hidden_name.description or "Docstring is not available" }}'>
|
|
158
|
+
</i>
|
|
159
|
+
{% else %}
|
|
160
|
+
<!-- handle info tooltip for flow control / workflows -->
|
|
161
|
+
{% endif %}
|
|
176
162
|
|
|
177
163
|
</form>
|
|
178
|
-
|
|
179
|
-
|
|
180
164
|
</div>
|
|
181
165
|
</div>
|
|
182
166
|
</div>
|
|
183
167
|
{% endfor %}
|
|
184
168
|
</div>
|
|
185
|
-
{% endif %}
|
|
186
169
|
</div>
|
|
187
170
|
|
|
188
171
|
|
|
@@ -190,29 +173,11 @@
|
|
|
190
173
|
{% else %}
|
|
191
174
|
<div style="margin-bottom: 4vh;"></div>
|
|
192
175
|
<div class="accordion accordion-flush">
|
|
193
|
-
<div class="accordion-item design-control">
|
|
194
|
-
<h5 class="accordion-header">
|
|
195
|
-
<button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#advanced" role="button" aria-expanded="false" aria-controls="collapseExample">
|
|
196
|
-
Builtin Operations:
|
|
197
|
-
</button>
|
|
198
|
-
</h5>
|
|
199
|
-
<div class="accordion-collapse collapse show" id="advanced">
|
|
200
|
-
<ul class="list-group">
|
|
201
|
-
{% for instrument in ['if', 'while', 'variable', 'wait', 'repeat'] %}
|
|
202
|
-
<form role="form" method='GET' name="device" action="{{url_for('design.experiment_builder',instrument=instrument)}}">
|
|
203
|
-
<div class="form-group">
|
|
204
|
-
<button class="list-group-item list-group-item-action" aria-current="true" type="submit">{{instrument}}</button>
|
|
205
|
-
</div>
|
|
206
|
-
</form>
|
|
207
|
-
{% endfor %}
|
|
208
|
-
</ul>
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
176
|
|
|
212
177
|
<div class="accordion-item design-control">
|
|
213
178
|
<h5 class="accordion-header">
|
|
214
179
|
<button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#deck" role="button" aria-expanded="false" aria-controls="collapseExample">
|
|
215
|
-
|
|
180
|
+
Operations
|
|
216
181
|
</button>
|
|
217
182
|
</h5>
|
|
218
183
|
<div class="accordion-collapse collapse show" id="deck">
|
|
@@ -232,7 +197,7 @@
|
|
|
232
197
|
<div class="accordion-item design-control">
|
|
233
198
|
<h5 class="accordion-header">
|
|
234
199
|
<button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#local" role="button" aria-expanded="false" aria-controls="collapseExample">
|
|
235
|
-
Local
|
|
200
|
+
Local Operations
|
|
236
201
|
</button>
|
|
237
202
|
</h5>
|
|
238
203
|
<div class="accordion-collapse collapse show" id="local">
|
|
@@ -279,7 +244,7 @@
|
|
|
279
244
|
</ul>
|
|
280
245
|
</div>
|
|
281
246
|
|
|
282
|
-
<div class="canvas">
|
|
247
|
+
<div class="canvas" droppable="true">
|
|
283
248
|
<div class="collapse" id="info">
|
|
284
249
|
<table class="table script-table">
|
|
285
250
|
<tbody>
|
|
@@ -363,6 +328,10 @@
|
|
|
363
328
|
<label class="input-group-text" for="run_name">Run Name</label>
|
|
364
329
|
<input class="form-control" type="text" name="run_name" id="run_name" placeholder="{{script['name']}}" required="required">
|
|
365
330
|
</div>
|
|
331
|
+
<div class="form-check form-switch">
|
|
332
|
+
<input class="form-check-input" type="checkbox" name="register_workflow" id="register_workflow">
|
|
333
|
+
<label class="input-group-label" for="register_workflow">Register this workflow</label>
|
|
334
|
+
</div>
|
|
366
335
|
</div>
|
|
367
336
|
<div class="modal-footer">
|
|
368
337
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Close </button>
|
|
@@ -415,8 +384,29 @@
|
|
|
415
384
|
</div>
|
|
416
385
|
</div>
|
|
417
386
|
</div>
|
|
387
|
+
<!-- Bootstrap Modal -->
|
|
388
|
+
<div class="modal fade" id="dropModal" tabindex="-1" aria-labelledby="dropModalLabel" aria-hidden="true">
|
|
389
|
+
<div class="modal-dialog">
|
|
390
|
+
<div class="modal-content">
|
|
391
|
+
<div class="modal-header">
|
|
392
|
+
<h5 class="modal-title" id="dropModalLabel">Configure Action</h5>
|
|
393
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
394
|
+
</div>
|
|
395
|
+
<div class="modal-body">
|
|
396
|
+
<p>Drop Position ID: <strong id="modalDropTarget"></strong></p>
|
|
397
|
+
|
|
398
|
+
<!-- Form will be dynamically inserted here -->
|
|
399
|
+
<div id="modalFormFields"></div>
|
|
400
|
+
</div>
|
|
401
|
+
<div class="modal-footer">
|
|
402
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
418
408
|
|
|
419
|
-
{% if instrument and
|
|
409
|
+
{% if instrument and use_llm %}
|
|
420
410
|
<script>
|
|
421
411
|
const buttonIds = {{ ['generate'] | tojson }};
|
|
422
412
|
</script>
|