cpee 2.1.114 → 2.1.115

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18b1d4bf1374bd11d7f886e70bffe237833a6dcd92755cb2d3ce6d89069eb7a9
4
- data.tar.gz: 97320261f72f9aa36765cecb38612e3a51b551a303587b6938ea5451c8fde4f6
3
+ metadata.gz: 5266a816c9887f8f7fc9aee7afd63da03ed24cf1faccdc86bd73b9032641a2d6
4
+ data.tar.gz: e74e115ad4cd86b929601222e5ce2a34c4dda283cccab033b6b90a105b67d5a5
5
5
  SHA512:
6
- metadata.gz: 6820d708a92fa15143439aebac23f4b4952bd68feed314e171d57d75c863a386a6064299a035da5673510993c479dfb8bb0ab6731bbaee9806cea9a1ba86cf02
7
- data.tar.gz: 48f750879f5da583f61894044c7ae329fe81afa7a13298b57cd1a7a0f6efd69237c863df98e214ee927ca1147110afffa363c3a5370c26ef2f2eb2aa2de78586
6
+ metadata.gz: ae8c810e3c26ab1b42bff595a1896ac026dd9c14b8889e5583d0ccee2fa03dd4e70e6853d4418fc2a3104f866c7d375bcfd03e1df04d9504a7ab4802db8cb48f
7
+ data.tar.gz: 7af9533ed3f9772ad9ffa5dbdbf370fbae2200b71743cefaca66e3b541adf1822ef91ca5cb0d7da2a39c476a1be0caf265461e2e24c26b1f1613f57411fce1b3
data/cockpit/css/llm.css CHANGED
@@ -15,11 +15,30 @@
15
15
  #status.success {
16
16
  background-color: var(--wfadaptor-exec-vote);
17
17
  }
18
+ #status.loading {
19
+ background-color: #99c1f1;
20
+ }
21
+
22
+ #status.loading::after {
23
+ display: inline-block;
24
+ animation: dotty steps(1,end) 1s infinite;
25
+ content: '';
26
+ }
27
+
28
+ @keyframes dotty {
29
+ 0% { content: ''; }
30
+ 16% { content: '.'; }
31
+ 32% { content: '..'; }
32
+ 48% { content: '...'; }
33
+ 64% { content: '..'; }
34
+ 80% { content: '.'; }
35
+ 100% { content: ''; }
36
+ }
18
37
 
19
38
  #prompt_container {
20
39
  padding: 0.2em 0.5em;
21
40
  outline: none;
22
- min-height: 2.66em;
41
+ min-height: 9em;
23
42
  display: flex;
24
43
  flex-wrap: nowrap;
25
44
  }
@@ -71,8 +90,12 @@
71
90
 
72
91
  .llm_button {
73
92
  width: 100%;
93
+ min-width: 2.5em;
74
94
  height: 100%;
75
95
  }
96
+ .llm_button.small:nth-child(2) {
97
+ margin-top: 0.5em;
98
+ }
76
99
 
77
100
  .llm_button:hover {
78
101
  background-color: var(--wfadaptor-selected);
data/cockpit/js/llm.js CHANGED
@@ -1,11 +1,21 @@
1
1
  var last_generated_model = undefined;
2
2
  var last_model_before_generation =undefined;
3
+ var default_llm = "gemini-2.5-flash-lite";
3
4
 
4
5
  function clean_llm_ui(status_id) {
5
6
  status_div = $(`#${status_id}`);
6
7
  status_div.empty();
7
8
  status_div.removeClass('error').removeClass('success');
8
- return
9
+ status_div.removeClass('error').removeClass('error');
10
+ status_div.removeClass('error').removeClass('loading');
11
+ }
12
+
13
+ function querying_llm_ui(status_id,llm_id='xxxx') {
14
+ status_div = $(`#${status_id}`);
15
+ let myllm = $(`#${llm_id}`).find(":selected").val();
16
+ if (myllm === undefined){ myllm = default_llm; }
17
+ status_div.addClass('loading');
18
+ status_div.text('Workflow Modelling Agent Thinks (' + myllm + ')');
9
19
  }
10
20
 
11
21
  function add_prompt(prompt_id,content) {
@@ -16,16 +26,13 @@ function add_prompt(prompt_id,content) {
16
26
  selection.removeAllRanges();
17
27
  selection.addRange(range);
18
28
  document.execCommand('insertText', false, content);
19
- return ;
20
29
  }
21
30
 
22
31
  function call_llm_service(status_id,prompt_id,llm_id) {
23
32
  let input = $(`#${prompt_id}`);
24
33
  let text = input[0].innerText;
25
34
  let myllm = $(`#${llm_id}`).find(":selected").val();
26
- if (myllm === undefined){
27
- myllm = "gemini-2.0-flash";
28
- }
35
+ if (myllm === undefined){ myllm = default_llm; }
29
36
  const formData = new FormData();
30
37
  const blob1 = new Blob([save['dslx']], { type: "text/xml" });
31
38
  formData.append("rpst_xml", blob1);
@@ -44,22 +51,27 @@ function call_llm_service(status_id,prompt_id,llm_id) {
44
51
  success: function(data){
45
52
  last_model_before_generation = save['dslx'];
46
53
  last_generated_model = data.output_cpee;
47
- set_cpee_model(data.output_cpee,["<!-- Input CPEE-Tree -->\n"+data.input_cpee,"# User Input:\n"+data.user_input,"# Used LLM:\n"+data.used_llm,"%% Input Intermediate\n"+data.input_intermediate,"%% Output Intermediate\n"+data.output_intermediate,"<!-- Output CPEE-Tree -->\n"+data.output_cpee]);
54
+ let send = $X(data.output_cpee);
55
+ $('label',send).each((_,ele)=>{
56
+ if ($(ele).text() == "Start Fermenter") {
57
+ $(ele).parent().parent().attr('endpoint','fermenter');
58
+ }
59
+ });
60
+ set_cpee_model(send.serializePrettyXML(),["<!-- Input CPEE-Tree -->\n"+data.input_cpee,"# User Input:\n"+data.user_input,"# Used LLM:\n"+data.used_llm,"%% Input Intermediate\n"+data.input_intermediate,"%% Output Intermediate\n"+data.output_intermediate,"<!-- Output CPEE-Tree -->\n"+data.output_cpee]);
48
61
  set_success(status_id,data.status);
49
62
  },
50
63
  error: function(xhr, status, data) {
64
+ console.log(xhr);
51
65
  set_error(status_id,xhr.responseJSON.error);
52
66
  }
53
67
  });
54
68
 
55
- input.empty();
69
+ input.empty();
56
70
  }
57
71
 
58
72
  function call_llm_text_service(status_id,prompt_id,llm_id,action) {
59
73
  let myllm = $(`#${llm_id}`).find(":selected").val();
60
- if (myllm === undefined){
61
- myllm = "gemini-2.0-flash";
62
- }
74
+ if (myllm === undefined){ myllm = default_llm; }
63
75
  const info = save.attributes_raw.info;
64
76
  const formData = new FormData();
65
77
  const first = new Blob([save['dslx']], { type: "text/xml" });
@@ -95,7 +107,6 @@ function call_llm_text_service(status_id,prompt_id,llm_id,action) {
95
107
  }
96
108
 
97
109
  function set_cpee_model(cpee_xml,expositions=[]) {
98
-
99
110
  const form_data = new FormData();
100
111
  const blob = new Blob([cpee_xml], { type: "text/xml" });
101
112
  form_data.append("dslx", blob);
@@ -117,13 +128,24 @@ function set_cpee_model(cpee_xml,expositions=[]) {
117
128
  function set_success(status_id,success_text) {
118
129
  $(`#${status_id}`).text(success_text);
119
130
  $(`#${status_id}`).addClass('success');
131
+ $(`#${status_id}`).removeClass('loading');
132
+ $(`#${status_id}`).removeClass('error');
120
133
  }
121
134
 
122
135
  function set_error(status_id,error_text) {
123
- $(`#${status_id}`).text(error_text);
124
- $(`#${status_id}`).addClass('error');
136
+ $(`#${status_id}`).text(error_text);
137
+ $(`#${status_id}`).addClass('error');
138
+ $(`#${status_id}`).removeClass('success');
139
+ $(`#${status_id}`).removeClass('loading');
125
140
  }
126
141
 
142
+ function empty_model(){
143
+ set_cpee_model('<description xmlns="http://cpee.org/ns/description/1.0" xmlns:a="http://cpee.org/ns/annotation/1.0"/>',["Reset Context!"]);
144
+ $('#dat_details').empty();
145
+ }
146
+ function load_last_generated_model() {
147
+ set_cpee_model(last_generated_model === undefined ? save['dslx'] : last_generated_model);
148
+ }
127
149
  function load_last_generated_model() {
128
150
  set_cpee_model(last_generated_model === undefined ? save['dslx'] : last_generated_model);
129
151
  }
@@ -151,23 +173,32 @@ $(document).ready(function() {
151
173
  $(document).on('keydown','#prompt',function(e){
152
174
  clean_llm_ui('status');
153
175
  if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
176
+ querying_llm_ui('status','llms');
154
177
  call_llm_service('status',this.id,'llms');
155
178
  }
156
179
  });
157
180
  $(document).on('click','#prompt_submit_button',function(e){
158
181
  clean_llm_ui('status');
182
+ querying_llm_ui('status','llms');
159
183
  call_llm_service('status','prompt','llms');
160
184
  });
185
+ $(document).on('click','#prompt_reset_button',function(e){
186
+ clean_llm_ui('status');
187
+ empty_model();
188
+ });
161
189
  $(document).on('click','#generate_itext_button',function(e){
162
190
  clean_llm_ui('status');
191
+ querying_llm_ui('status','llms');
163
192
  call_llm_text_service('status','prompt','llms','file');
164
193
  });
165
194
  $(document).on('click','#generate_text_button',function(e){
166
195
  clean_llm_ui('status');
196
+ querying_llm_ui('status','llms');
167
197
  call_llm_text_service('status','prompt','llms','show');
168
198
  });
169
199
  $(document).on('click','#prompt_undo_button',function(e){
170
200
  clean_llm_ui('status');
201
+ querying_llm_ui('status','llms');
171
202
  load_last_model_before_generation();
172
203
  });
173
204
  $(document).on('click','#prompt_attach_button',function(e){
@@ -25,7 +25,7 @@ function call_llm_service(status_id,prompt_id) {
25
25
  formData.append("rpst_xml", blob1);
26
26
  const blob2 = new Blob([text], { type: "text/plain" });
27
27
  formData.append("user_input", blob2);
28
- const blob3 = new Blob(['gemini-2.0-flash'], { type: "text/plain" });
28
+ const blob3 = new Blob(['gemini-2.5-flash'], { type: "text/plain" });
29
29
  formData.append("llm", blob3);
30
30
 
31
31
  jQuery.ajax({
data/cockpit/llm.html CHANGED
@@ -65,10 +65,7 @@
65
65
  <link rel="stylesheet" href="css/extended_columns-label.css" type="text/css"/>
66
66
  <link rel="stylesheet" href="css/extended_columns-svg.css" type="text/css" data-include-export="true"/>
67
67
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
68
- <style>
69
- /* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
70
- /* shit balls, no elegance is left in this world */
71
- </style>
68
+ <style></style>
72
69
  </head>
73
70
  <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
74
71
  <div id='disclaimer' class='hidden'> <!--{{{-->
@@ -272,8 +269,8 @@
272
269
  </div>
273
270
  <div id='status'></div>
274
271
  <div id='prompt_container' class="max">
275
- <div id='prompt' contenteditable="true" title="Please enter your modelling instructions here... CTRL-ENTER or press '➤' to submit ..." placeholder="Please enter your modelling instructions here... CTRL-ENTER or press '➤' to submit ..."></div>
276
- <div id='prompt_submit_container' class="single"><button id='prompt_submit_button' class="llm_button">➤</button></div>
272
+ <div id='prompt' contenteditable="true" title="Please enter your modelling instructions here..." placeholder="Please enter your modelling instructions here..."></div>
273
+ <div id='prompt_submit_container' class="single"><button id='prompt_submit_button' title="CTRL-ENTER to Submit" class="llm_button small">➤</button><button id='prompt_reset_button' title="Reset Context" class="llm_button small">🗲</button></div>
277
274
  </div>
278
275
  </ui-area>
279
276
  <ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
@@ -3,8 +3,8 @@
3
3
  <executionhandler>ruby</executionhandler>
4
4
  <dataelements/>
5
5
  <endpoints>
6
- <frames_init>https-post://cpee.org/out/frames/{simple}/</frames_init>
7
- <frames_display>https-put://cpee.org/out/frames/{simple}/</frames_display>
6
+ <frames_init>https-post://{cpee.org}/out/frames/{simple}/</frames_init>
7
+ <frames_display>https-put://{cpee.org}/out/frames/{simple}/</frames_display>
8
8
  </endpoints>
9
9
  <attributes>
10
10
  <guarded>none</guarded>
@@ -14,16 +14,16 @@
14
14
  <info>Frames</info>
15
15
  <creator>Christine Ashcreek</creator>
16
16
  <author>Christine Ashcreek</author>
17
- <model_uuid>5ed82f61-a382-49b5-a420-c63e01d5a9f5</model_uuid>
17
+ <model_uuid>90882be6-e4f3-470c-b1ae-d0e7b04e2e56</model_uuid>
18
18
  <model_version/>
19
- <design_dir>Templates.dir</design_dir>
19
+ <design_dir>Templates.dir/</design_dir>
20
20
  <design_stage>development</design_stage>
21
21
  </attributes>
22
22
  <description>
23
23
  <description xmlns="http://cpee.org/ns/description/1.0">
24
24
  <call id="a1" endpoint="frames_init">
25
25
  <parameters>
26
- <label>"Init Frame"</label>
26
+ <label>Init Frame</label>
27
27
  <color/>
28
28
  <arguments>
29
29
  <style_url>https://cpee.org/form/frames.css</style_url>
@@ -79,7 +79,7 @@
79
79
  </call>
80
80
  <call id="a3" endpoint="frames_display">
81
81
  <parameters>
82
- <label>Clear </label>
82
+ <label>Clear Frame</label>
83
83
  <color/>
84
84
  <arguments>
85
85
  <type>set</type>
@@ -87,8 +87,6 @@
87
87
  <ly>0</ly>
88
88
  <x_amount>5</x_amount>
89
89
  <y_amount>8</y_amount>
90
- <button/>
91
- <style/>
92
90
  <urls/>
93
91
  <default/>
94
92
  </arguments>
@@ -138,7 +136,7 @@
138
136
  </call>
139
137
  <call id="a6" endpoint="frames_display">
140
138
  <parameters>
141
- <label>Show Header</label>
139
+ <label>Show Header </label>
142
140
  <color/>
143
141
  <arguments>
144
142
  <type>set</type>
@@ -146,8 +144,6 @@
146
144
  <ly>0</ly>
147
145
  <x_amount>5</x_amount>
148
146
  <y_amount>1</y_amount>
149
- <button/>
150
- <style/>
151
147
  <urls>
152
148
  <urls_item>
153
149
  <lang>de-at</lang>
@@ -202,7 +198,7 @@
202
198
  </call>
203
199
  <call id="a5" endpoint="frames_display">
204
200
  <parameters>
205
- <label>Display Graph</label>
201
+ <label>Display Graph </label>
206
202
  <color/>
207
203
  <arguments>
208
204
  <type>set</type>
@@ -210,8 +206,6 @@
210
206
  <ly>1</ly>
211
207
  <x_amount>2</x_amount>
212
208
  <y_amount>7</y_amount>
213
- <button/>
214
- <style/>
215
209
  <urls>
216
210
  <urls_item>
217
211
  <lang>de-at</lang>
@@ -264,6 +258,70 @@
264
258
  </code>
265
259
  </documentation>
266
260
  </call>
261
+ <call id="a4" endpoint="frames_display">
262
+ <parameters>
263
+ <label>Display Text </label>
264
+ <color/>
265
+ <arguments>
266
+ <type>set</type>
267
+ <lx>1</lx>
268
+ <ly>1</ly>
269
+ <x_amount>1</x_amount>
270
+ <y_amount>1</y_amount>
271
+ <urls>
272
+ <urls_item>
273
+ <lang>de-at</lang>
274
+ <url>/out/frames/examples/text.html</url>
275
+ </urls_item>
276
+ </urls>
277
+ <default>
278
+ <text>Hallo ***aaa***.</text>
279
+ </default>
280
+ </arguments>
281
+ </parameters>
282
+ <code>
283
+ <signal>false</signal>
284
+ <prepare/>
285
+ <finalize output="result"/>
286
+ <update output="result"/>
287
+ <rescue output="result"/>
288
+ </code>
289
+ <annotations>
290
+ <_generic/>
291
+ <_logging_behavior>
292
+ <_exclude>false</_exclude>
293
+ <_include>false</_include>
294
+ </_logging_behavior>
295
+ <_timing>
296
+ <_timing_weight/>
297
+ <_timing_avg/>
298
+ <explanations/>
299
+ </_timing>
300
+ <_shifting>
301
+ <_shifting_type>Duration</_shifting_type>
302
+ </_shifting>
303
+ <_context_data_analysis>
304
+ <probes/>
305
+ <ips/>
306
+ </_context_data_analysis>
307
+ <report>
308
+ <url/>
309
+ </report>
310
+ <_notes>
311
+ <_notes_general/>
312
+ </_notes>
313
+ </annotations>
314
+ <documentation>
315
+ <input/>
316
+ <output/>
317
+ <implementation>
318
+ <description/>
319
+ </implementation>
320
+ <code>
321
+ <description/>
322
+ </code>
323
+ </documentation>
324
+ </call>
267
325
  <loop mode="post_test" condition="true">
268
326
  <_probability>
269
327
  <_probability_min/>
@@ -272,7 +330,7 @@
272
330
  </_probability>
273
331
  <call id="a2" endpoint="frames_display">
274
332
  <parameters>
275
- <label>Show Button</label>
333
+ <label>Show The Button</label>
276
334
  <color/>
277
335
  <arguments>
278
336
  <type>wait</type>
@@ -280,12 +338,10 @@
280
338
  <ly>1</ly>
281
339
  <x_amount>1</x_amount>
282
340
  <y_amount>1</y_amount>
283
- <button/>
284
- <style/>
285
341
  <urls>
286
342
  <urls_item>
287
343
  <lang>de-at</lang>
288
- <url>https://cpee.org/form/button.html</url>
344
+ <url>/out/frames/examples/button.html</url>
289
345
  </urls_item>
290
346
  </urls>
291
347
  <default/>
@@ -336,7 +392,7 @@
336
392
  </call>
337
393
  <call id="a8" endpoint="frames_display">
338
394
  <parameters>
339
- <label>Experience</label>
395
+ <label>Show Experience Questions</label>
340
396
  <color/>
341
397
  <arguments>
342
398
  <type>wait</type>
@@ -344,12 +400,10 @@
344
400
  <ly>1</ly>
345
401
  <x_amount>3</x_amount>
346
402
  <y_amount>7</y_amount>
347
- <button/>
348
- <style/>
349
403
  <urls>
350
404
  <urls_item>
351
405
  <lang>de-at</lang>
352
- <url>https://cpee.org/quests/dataflow/questions.html</url>
406
+ <url>/out/frames/examples/questions.html</url>
353
407
  </urls_item>
354
408
  </urls>
355
409
  <default>
@@ -408,7 +462,7 @@
408
462
  </call>
409
463
  <call id="a7" endpoint="frames_display">
410
464
  <parameters>
411
- <label>Clear Button</label>
465
+ <label>Clear The Button</label>
412
466
  <color/>
413
467
  <arguments>
414
468
  <type>set</type>
@@ -416,8 +470,6 @@
416
470
  <ly>1</ly>
417
471
  <x_amount>1</x_amount>
418
472
  <y_amount>1</y_amount>
419
- <button/>
420
- <style/>
421
473
  <urls/>
422
474
  <default/>
423
475
  </arguments>
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.1.114"
3
+ s.version = "2.1.115"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "The cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -327,7 +327,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
327
327
  end
328
328
  true
329
329
  end
330
- GC.start
330
+ ### Only do it when you want always the least mem used, but it been 4 times slower
331
+ # GC.start
331
332
  end #}}}
332
333
 
333
334
  def argument_transform_value(obj, struct)
@@ -336,7 +336,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
336
336
  end
337
337
  true
338
338
  end
339
- GC.start
339
+ ### Only do it when you want always the least mem used, but it been 4 times slower
340
+ # GC.start
340
341
  end #}}}
341
342
 
342
343
  def code_error_handling(ret,where,what=RuntimeError) #{{{
@@ -443,6 +444,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
443
444
  send.push Riddl::Parameter::Complex::new('call_headers','application/json', JSON::generate(options))
444
445
 
445
446
  stat, ret, headers = Riddl::Client.new(@controller.url_code).request 'put' => send
447
+
446
448
  if stat >= 200 && stat < 300
447
449
  ret.shift # drop result
448
450
  signal = changed_status = nil
@@ -1 +1 @@
1
- 169210
1
+ 162191
@@ -1 +1 @@
1
- 169252
1
+ 162233
@@ -1 +1 @@
1
- 169238
1
+ 162219
@@ -1 +1 @@
1
- 169224
1
+ 162205
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.114
4
+ version: 2.1.115
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler