json-object-editor 0.10.443 → 0.10.501

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/_www/mcp-test.html +136 -0
  3. package/css/jif/Read Me.txt +5 -5
  4. package/css/jif/demo-files/demo.css +153 -153
  5. package/css/jif/demo-files/demo.js +30 -30
  6. package/css/jif/demo.html +285 -285
  7. package/css/jif/fonts/joeiconfont.svg +24 -24
  8. package/css/jif/ie7/ie7.css +45 -45
  9. package/css/jif/ie7/ie7.js +46 -46
  10. package/css/jif/selection.json +573 -573
  11. package/css/joe.css +12 -12
  12. package/css/jquery-ui-1.10.4.custom.min.css +5 -5
  13. package/css/jquery-ui.min.css +6 -6
  14. package/css/jquery.timepicker.css +72 -72
  15. package/es5-build/web-components/account-info.js +136 -136
  16. package/es5-build/web-components/capp-components.js +160 -160
  17. package/es5-build/web-components/capp-panel.js +85 -85
  18. package/es5-build/web-components/capp-view.js +73 -73
  19. package/es5-build/web-components/joe-autocomplete.js +149 -149
  20. package/es5-build/web-components/joe-button.js +132 -132
  21. package/es5-build/web-components/joe-card.js +92 -92
  22. package/es5-build/web-components/joe-component.js +74 -74
  23. package/es5-build/web-components/joe-field.js +70 -70
  24. package/es5-build/web-components/joe-list-item.js +176 -176
  25. package/es5-build/web-components/joe-user-cube.js +100 -100
  26. package/es5-build/web-components/report-components.js +133 -133
  27. package/grunt/build +86 -86
  28. package/grunt/package-lock.json +9105 -9105
  29. package/grunt/package.json +47 -47
  30. package/grunt/src +86 -86
  31. package/js/joe.js +10 -10
  32. package/js/leaflet.js +8 -8
  33. package/js/libs/adapter-latest.js +4400 -4400
  34. package/js/libs/craydent-1.9.2.js +11741 -11741
  35. package/js/libs/craydent-upload-2.0.0.js +394 -394
  36. package/js/libs/hammer.min.208.js +6 -6
  37. package/js/libs/jquery-3.5.1.min.js +2 -2
  38. package/js/libs/moment.min.js +6 -6
  39. package/js/native-shim.js +46 -46
  40. package/js/plugins/c3/c3.min.js +5 -5
  41. package/js/plugins/c3/d3.v3.min.js +4 -4
  42. package/js/plugins/threejs/Detector.js +78 -78
  43. package/js/plugins/threejs/LICENSE +21 -21
  44. package/js/plugins/threejs/MTLLoader.js +417 -417
  45. package/js/plugins/threejs/OBJLoader.js +564 -564
  46. package/js/plugins/threejs/OrbitControls.js +1037 -1037
  47. package/js/plugins/threejs/README.md +9 -9
  48. package/js/plugins/threejs/assets/female-croupier-2013-03-26.mtl +3 -3
  49. package/js/plugins/threejs/index.html +178 -178
  50. package/js/plugins/threejs/three.js +41507 -41507
  51. package/package.json +2 -2
  52. package/readme.md +113 -0
  53. package/server/init.js +7 -0
  54. package/server/modules/MCP.js +310 -0
  55. package/server/modules/Server.js +23 -2
  56. package/server/plugins/chatgpt-assistants.js +359 -359
  57. package/server/plugins/chatgpt-tools.js +79 -79
@@ -1,79 +1,79 @@
1
- const OpenAI = require("openai");
2
-
3
- function ChatGPTTools() {
4
- const self = this;
5
-
6
- function coloredLog(message) {
7
- console.log(JOE.Utils.color('[chatgpt-tools]', 'plugin', false), message);
8
- }
9
-
10
-
11
-
12
- function getAPIKey() {
13
- const setting = JOE.Utils.Settings('OPENAI_API_KEY');
14
- if (!setting) throw new Error("Missing OPENAI_API_KEY setting");
15
- return setting;
16
- }
17
-
18
- //search JOE data for ai_tool objects
19
- function getTools(data){
20
- var query = Object.assign({itemtype:'ai_tool'}, data||{});
21
- var tools = JOE.Cache.search(query);
22
- var functionalTools = {};
23
- for(var i=0; i<tools.length; i++){
24
- var tool = tools[i];
25
- functionalTools[tool._id] = Object.assign(tool,{
26
- tool_properties:JSON.parse(tool.tool_properties),
27
- });
28
- }
29
- return functionalTools;
30
- }
31
-
32
- function newClient() {
33
- return new OpenAI({ apiKey: getAPIKey() });
34
- }
35
-
36
-
37
- this.default = function(data, req, res) {
38
- try {
39
- var payload = {
40
- params: req.params,
41
- data: data,
42
- tools:getTools(data),
43
- success:true
44
- };
45
- } catch (e) {
46
- return { errors: 'plugin error: ' + e, failedat: 'plugin' };
47
- }
48
- return payload;
49
- };
50
-
51
- this.flattened = function(data, req, res){
52
- try {
53
- var flattened = JOE.Utils.flattenObject(data._id);
54
- var payload = {
55
- params: req.params,
56
- data: data,
57
- object:flattened,
58
- success:true
59
- };
60
- } catch (e) {
61
- return { errors: 'plugin error: ' + e, failedat: 'plugin' };
62
- }
63
- return payload;
64
- }
65
- //1. start or continue a conversation
66
-
67
-
68
-
69
-
70
- //self.profileBusinessFromURL = profileBusinessFromURL;
71
- this.async = {
72
-
73
-
74
- };
75
- return self;
76
-
77
- }
78
-
79
- module.exports = new ChatGPTTools();
1
+ const OpenAI = require("openai");
2
+
3
+ function ChatGPTTools() {
4
+ const self = this;
5
+
6
+ function coloredLog(message) {
7
+ console.log(JOE.Utils.color('[chatgpt-tools]', 'plugin', false), message);
8
+ }
9
+
10
+
11
+
12
+ function getAPIKey() {
13
+ const setting = JOE.Utils.Settings('OPENAI_API_KEY');
14
+ if (!setting) throw new Error("Missing OPENAI_API_KEY setting");
15
+ return setting;
16
+ }
17
+
18
+ //search JOE data for ai_tool objects
19
+ function getTools(data){
20
+ var query = Object.assign({itemtype:'ai_tool'}, data||{});
21
+ var tools = JOE.Cache.search(query);
22
+ var functionalTools = {};
23
+ for(var i=0; i<tools.length; i++){
24
+ var tool = tools[i];
25
+ functionalTools[tool._id] = Object.assign(tool,{
26
+ tool_properties:JSON.parse(tool.tool_properties),
27
+ });
28
+ }
29
+ return functionalTools;
30
+ }
31
+
32
+ function newClient() {
33
+ return new OpenAI({ apiKey: getAPIKey() });
34
+ }
35
+
36
+
37
+ this.default = function(data, req, res) {
38
+ try {
39
+ var payload = {
40
+ params: req.params,
41
+ data: data,
42
+ tools:getTools(data),
43
+ success:true
44
+ };
45
+ } catch (e) {
46
+ return { errors: 'plugin error: ' + e, failedat: 'plugin' };
47
+ }
48
+ return payload;
49
+ };
50
+
51
+ this.flattened = function(data, req, res){
52
+ try {
53
+ var flattened = JOE.Utils.flattenObject(data._id);
54
+ var payload = {
55
+ params: req.params,
56
+ data: data,
57
+ object:flattened,
58
+ success:true
59
+ };
60
+ } catch (e) {
61
+ return { errors: 'plugin error: ' + e, failedat: 'plugin' };
62
+ }
63
+ return payload;
64
+ }
65
+ //1. start or continue a conversation
66
+
67
+
68
+
69
+
70
+ //self.profileBusinessFromURL = profileBusinessFromURL;
71
+ this.async = {
72
+
73
+
74
+ };
75
+ return self;
76
+
77
+ }
78
+
79
+ module.exports = new ChatGPTTools();