-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
573 lines (573 loc) · 18.6 KB
/
package.json
File metadata and controls
573 lines (573 loc) · 18.6 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
{
"name": "vscode-lot-notebooks",
"displayName": "LOT Notebooks",
"description": "Coreflux VS Code Notebooks for LOT language, leveraging making data-driven systems",
"version": "0.4.2",
"publisher": "Coreflux",
"engines": {
"vscode": "^1.85.0"
},
"icon": "images/logo.png",
"categories": [
"Notebooks"
],
"activationEvents": [
"onNotebook:lot-notebook",
"onLanguage:lot",
"onLanguage:scl",
"onCommand:lot-notebook.create",
"onCommand:lot-notebook.new",
"onView:corefluxEntitiesView"
],
"main": "./dist/extension.js",
"contributes": {
"menus": {
"commandPalette": [],
"editor/title": [],
"view/title": [],
"view/item/context": [
{
"command": "corefluxEntities.copyCode",
"group": "1_modification@1"
},
{
"command": "coreflux.createEntityDefinition",
"group": "1_modification@2"
},
{
"command": "coreflux.updateCellFromMqtt",
"group": "1_modification@3"
},
{
"command": "coreflux.runEntityCell",
"group": "1_modification@4"
},
{
"command": "coreflux.removeEntity",
"group": "9_modification@1"
},
{
"command": "corefluxEntities.viewDescription",
"when": "viewId == corefluxEntitiesView && viewItem == corefluxEntityDescriptionItem",
"group": "inline"
}
],
"notebook/toolbar": [
{
"command": "lot.openChatbot",
"group": "navigation",
"when": "notebookType == lot-notebook && config.lotNotebook.experimentalFeatures.anselmoChatbot"
}
],
"notebook/cell/context": [
{
"command": "lot-notebook.explainCell",
"group": "navigation",
"when": "notebookType == lot-notebook && notebookCellType == code && config.lotNotebook.experimentalFeatures.anselmoChatbot"
},
{
"command": "lot-notebook.detectAndSwitchLanguage",
"group": "navigation",
"when": "notebookCellType == code"
}
]
},
"views": {
"explorer": [
{
"id": "corefluxEntitiesView",
"name": "Coreflux Entities",
"icon": "images/CF_icon.svg",
"contextualTitle": "Coreflux Entities"
}
]
},
"commands": [
{
"command": "lot-notebook.create",
"title": "New LOT Notebook",
"category": "LOT Notebook"
},
{
"command": "lot-notebook.detectAndSwitchLanguage",
"title": "Detect and Switch to LOT Language",
"category": "LOT Notebook"
},
{
"command": "lot-notebook.changeCredentials",
"title": "Change MQTT Broker Credentials",
"category": "LOT Notebook"
},
{
"command": "lot.openTopicPayload",
"title": "Edit Topic Payload",
"category": "LOT Notebook"
},
{
"command": "lot.openChatbot",
"title": "🤖 Anselmo ChatBot (beta preview)",
"category": "LOT Notebook"
},
{
"command": "corefluxEntities.refresh",
"title": "Refresh",
"category": "Coreflux",
"icon": "$(refresh)"
},
{
"command": "corefluxEntities.copyCode",
"title": "📋 Copy Code",
"category": "Coreflux"
},
{
"command": "corefluxEntities.viewDescription",
"title": "View Description",
"category": "Coreflux"
},
{
"command": "coreflux.removeAllModels",
"title": "Remove All Models",
"category": "Coreflux"
},
{
"command": "coreflux.removeAllActions",
"title": "Remove All Actions",
"category": "Coreflux"
},
{
"command": "coreflux.removeAllRoutes",
"title": "Remove All Routes",
"category": "Coreflux"
},
{
"command": "coreflux.removeAllPythonScripts",
"title": "Remove All Python Scripts",
"category": "Coreflux"
},
{
"command": "coreflux.removeAllRules",
"title": "Remove All Rules",
"category": "Coreflux"
},
{
"command": "coreflux.removeEntity",
"title": "🗑️ Remove Entity from Coreflux",
"category": "Coreflux"
},
{
"command": "coreflux.createEntityDefinition",
"title": "✨ Create Definition in Notebook",
"category": "Coreflux"
},
{
"command": "coreflux.updateCellFromMqtt",
"title": "💾 Update Cell from Coreflux",
"category": "Coreflux"
},
{
"command": "coreflux.runEntityCell",
"title": "⚡ Update Coreflux from Cell",
"category": "Coreflux"
},
{
"command": "lot-notebook.explainCell",
"title": "Explain Language Of Things Cell with Anselmo",
"category": "Language Of Things"
},
{
"command": "lot-notebook.enableExperimentalFeatures",
"title": "Enable Experimental Features",
"category": "LOT Notebook"
},
{
"command": "lot-notebook.disableExperimentalFeatures",
"title": "Disable Experimental Features",
"category": "LOT Notebook"
},
{
"command": "lot-notebook.new",
"title": "LOT Notebook: New LOT Notebook",
"category": "LOT Notebook"
},
{
"command": "coreflux.openWalkthrough",
"title": "Open Getting Started Walkthrough",
"category": "Coreflux"
},
{
"command": "coreflux.createMarkdownFile",
"title": "Create Markdown Documentation",
"category": "Coreflux"
},
{
"command": "coreflux.connectBroker",
"title": "Connect to MQTT Broker",
"category": "Coreflux"
},
{
"command": "coreflux.disconnectBroker",
"title": "Disconnect from MQTT Broker",
"category": "Coreflux"
},
{
"command": "coreflux.createTimerAction",
"title": "Create Timer Action",
"category": "Coreflux"
},
{
"command": "coreflux.uploadAction",
"title": "Upload Action to Broker",
"category": "Coreflux"
},
{
"command": "coreflux.createModel",
"title": "Create Data Model",
"category": "Coreflux"
},
{
"command": "coreflux.createModelAction",
"title": "Create Model Action",
"category": "Coreflux"
},
{
"command": "coreflux.createDockerSetup",
"title": "Create Docker Setup",
"category": "Coreflux"
},
{
"command": "coreflux.setupGitRepo",
"title": "Setup Git Repository",
"category": "Coreflux"
},
{
"command": "coreflux.createPythonScripts",
"title": "Create Python Scripts",
"category": "Coreflux"
},
{
"command": "coreflux.testTelemetry",
"title": "Test Telemetry Connection",
"category": "Coreflux"
}
],
"viewsWelcome": [
{
"view": "corefluxEntities",
"contents": "Welcome to Coreflux! Get started by creating your first LOT notebook.\n\n[Create LOT Notebook](command:lot-notebook.new)\n\n[Open Getting Started Guide](command:coreflux.openWalkthrough)\n\nLearn more about [Language of Things](https://docs.coreflux.org/lot)."
}
],
"notebooks": [
{
"id": "lot-notebook",
"type": "lot-notebook",
"displayName": "LOT Notebook",
"selector": [
{
"filenamePattern": "*.lotnb"
}
]
}
],
"notebookRenderer": [
{
"id": "lotTreeRenderer",
"displayName": "LOT Tree Renderer",
"entrypoint": "./dist/renderer/treeRenderer.js",
"mimeTypes": [
"application/lot-tree+json"
]
},
{
"id": "lotShellRenderer",
"displayName": "LOT Shell Renderer",
"entrypoint": "./dist/renderer/shellRenderer.js",
"mimeTypes": [
"application/lot-shell+json"
]
}
],
"iconThemes": [
{
"id": "lot-icon-theme",
"label": "LOT Icon Theme",
"path": "./lot-icon-theme.json"
}
],
"languages": [
{
"id": "lot",
"aliases": [
"LOT",
"lot"
],
"extensions": [
".lot",
".cf"
],
"configuration": "./language-configuration.json",
"languageDetection": {
"patterns": [
{
"pattern": "\\b(DEFINE|MODEL|RULE|ROUTE|ACTION|PUBLISH|KEEP|GET|ON|EVERY|DO|IF|THEN|ELSE|SET|FILTER|REGEX|ADD|TOPIC|COLLAPSED)\\b",
"weight": 1.0
},
{
"pattern": "\\bDEFINE\\s+(MODEL|ACTION|RULE|ROUTE)\\b",
"weight": 2.0
},
{
"pattern": "\\bON\\s+EVERY\\b",
"weight": 1.5
},
{
"pattern": "\\bPUBLISH\\s+TOPIC\\b",
"weight": 1.5
},
{
"pattern": "\\bKEEP\\s+TOPIC\\b",
"weight": 1.5
},
{
"pattern": "\\bGET\\s+TOPIC\\b",
"weight": 1.5
},
{
"pattern": "\\bIF\\s*\\(.*\\)\\s*THEN\\b",
"weight": 1.3
},
{
"pattern": "\\bDO\\s*\\{",
"weight": 1.2
}
]
}
},
{
"id": "shellscript",
"aliases": [
"Shell Script",
"Bash",
"shellscript",
"sh",
"bash"
],
"extensions": [
".sh"
]
},
{
"id": "terminal",
"aliases": [
"Terminal",
"Command",
"cmd",
"powershell",
"sh",
"bash"
],
"extensions": []
}
],
"grammars": [
{
"language": "lot",
"scopeName": "source.lot",
"path": "./syntaxes/lot.tmLanguage.json"
},
{
"language": "terminal",
"scopeName": "source.terminal",
"path": "./syntaxes/terminal.tmLanguage.json"
}
],
"configuration": {
"title": "Coreflux",
"properties": {
"coreflux.telemetryEnabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Enable anonymous telemetry to help improve the extension. [Privacy Policy](https://docs.coreflux.org/privacy)",
"scope": "application"
},
"lotNotebook.experimentalFeatures": {
"type": "object",
"title": "Experimental Features",
"description": "Enable experimental features that are still in development",
"properties": {
"anselmoChatbot": {
"type": "boolean",
"default": false,
"description": "Enable Anselmo ChatBot (experimental AI assistant for LOT notebooks)"
},
"pythonScripting": {
"type": "object",
"title": "Python Scripting",
"description": "Enable Python scripting features (requires broker version >1.7.0)",
"properties": {
"enabled": {
"type": "boolean",
"default": false
}
}
}
}
}
}
},
"walkthroughs": [
{
"id": "coreflux.onboarding",
"title": "Get Started with Coreflux",
"description": "Learn how to build IoT solutions with Language of Things (LOT)",
"steps": [
{
"id": "create-lot-notebook",
"title": "Create your first LOT notebook file",
"description": "**What is LOT?** LOT (Language of Things) is a simple programming language designed for IoT applications. It makes it easy to create automated behaviors for smart devices.\n\n**Why notebooks?** LOT notebooks combine code, documentation, and visualizations in one place, making it perfect for learning and prototyping IoT solutions.\n\n**What you'll create:** A new .lotnb file where you'll write your IoT automation code.\n\n[Create LOT Notebook](command:lot-notebook.new)",
"media": {
"image": "media/walkthrough/create-notebook.gif",
"altText": "Creating a new LOT notebook"
},
"completionEvents": [
"onCommand:lot-notebook.new"
]
},
{
"id": "create-markdown-file",
"title": "Add walkthrough explanation",
"description": "**What is this step?** Adding documentation to explain what you're building and why.\n\n**Why documentation matters:** Good documentation helps you understand the purpose of each part of your IoT solution and makes it easier to share with others.\n\n**What you'll create:** A markdown cell with a complete guide explaining the smart office monitoring system you'll build.\n\n[Add Walkthrough Guide](command:coreflux.createMarkdownFile)",
"media": {
"image": "media/walkthrough/create-markdown.gif",
"altText": "Adding walkthrough explanation to notebook"
},
"completionEvents": [
"onCommand:coreflux.createMarkdownFile"
]
},
{
"id": "connect-broker",
"title": "Connect to your broker",
"description": "**What is an MQTT broker?** An MQTT broker is like a central post office for IoT devices. It receives messages from devices and delivers them to other devices that need that information.\n\n**Why do we need it?** Your LOT actions need somewhere to send their data and receive commands. The broker makes this communication possible.\n\n**What happens when connected:** Once connected, your actions can start sending data and your devices can communicate in real-time.\n\n[Connect to Broker](command:coreflux.connectBroker)",
"media": {
"image": "media/walkthrough/connect-broker.gif",
"altText": "Connecting to MQTT broker"
},
"completionEvents": [
"onCommand:coreflux.connectBroker"
]
},
{
"id": "create-timer-action",
"title": "Create an Action that runs every 1 second",
"description": "**What is an Action?** An Action is like a recipe that tells your IoT system what to do automatically. It can run on a schedule, respond to events, or react to sensor data.\n\n**Why every 1 second?** This creates a \"heartbeat\" signal that shows your system is alive and working. It's like a pulse that confirms everything is running properly.\n\n**What it does:** This action will publish a simple message every second to demonstrate continuous operation.\n\n[Create Timer Action](command:coreflux.createTimerAction)",
"media": {
"image": "media/walkthrough/timer-action.gif",
"altText": "Creating a timer-based action"
},
"completionEvents": [
"onCommand:coreflux.createTimerAction"
]
},
{
"id": "upload-action",
"title": "Upload the Action to the broker",
"description": "**What is uploading?** Uploading sends your Action code to the broker where it will actually run and execute your automation.\n\n**Why upload to broker?** The broker is where your Actions live and work. Without uploading, your code is just sitting in the notebook - it won't actually do anything.\n\n**What happens after upload:** Your Action starts running on the broker and will continue running until you stop it. You can see it working in real-time!\n\n[Upload Action](command:coreflux.uploadAction)",
"media": {
"image": "media/walkthrough/upload-action.gif",
"altText": "Uploading action to broker"
},
"completionEvents": [
"onCommand:coreflux.uploadAction"
]
},
{
"id": "create-model",
"title": "Create a MODEL",
"description": "**What is a Model?** A Model is like a template that defines the structure of your data. It's like creating a form where you specify what information you want to collect.\n\n**Why use Models?** Instead of sending random data, Models ensure your information is organized and consistent. It's like having a standard format for all your sensor readings.\n\n**What you'll create:** A SensorReading model with fields for temperature, humidity, location, and timestamp.\n\n[Create Model](command:coreflux.createModel)",
"media": {
"image": "media/walkthrough/create-model.gif",
"altText": "Creating a data model"
},
"completionEvents": [
"onCommand:coreflux.createModel"
]
},
{
"id": "create-model-action",
"title": "Create an Action that publishes the MODEL",
"description": "**What is a Model Action?** This is an Action that uses your Model to send structured data. Instead of random messages, it sends organized information in a consistent format.\n\n**Why combine Actions with Models?** This creates realistic IoT data that mimics real sensors. Your Action generates sample sensor readings that follow your Model's structure.\n\n**What it does:** Every 5 seconds, it creates sample temperature and humidity data and publishes it using your SensorReading model.\n\n[Create Model Action](command:coreflux.createModelAction)",
"media": {
"image": "media/walkthrough/model-action.gif",
"altText": "Creating an action that uses a model"
},
"completionEvents": [
"onCommand:coreflux.createModelAction"
]
},
{
"id": "create-python-scripts",
"title": "Hello World with Python",
"description": "**What is Python integration?** LOT can call Python functions to do complex calculations, data processing, or use Python libraries. This gives you the power of Python with the simplicity of LOT.\n\n**Why use Python with LOT?** Python is great for data analysis, machine learning, and complex logic. LOT handles the IoT communication, while Python handles the heavy computation.\n\n**What you'll create:** A simple Python function that creates personalized greetings, and a LOT Action that calls this function every 5 seconds.\n\n[Create Python Scripts](command:coreflux.createPythonScripts)",
"media": {
"image": "media/walkthrough/python-scripts.gif",
"altText": "Creating Python scripts and LOT actions"
},
"completionEvents": [
"onCommand:coreflux.createPythonScripts"
]
},
{
"id": "connect-with-community",
"title": "Connect with Coreflux Community",
"description": "**Join our community!** You've completed your first LOT walkthrough! Now connect with other developers, get support, and stay updated with the latest Coreflux developments.\n\n**Get help and support:** Our community is here to help you build amazing IoT solutions with LOT. Join discussions, ask questions, and share your projects.\n\n**Stay connected:** Follow us for updates, tutorials, and community highlights.\n\n**Connect with us:**\n- 💬 [Discord](https://discord.gg/CHCWt6xF)\n- 🐳 [Docker Hub](https://hub.docker.com/r/coreflux/coreflux-mqtt-broker)\n- 📧 [Contact Support](https://www.coreflux.org/contact-us)\n- 🐙 [GitHub](https://github.com/CorefluxCommunity)",
"media": {
"image": "media/walkthrough/create-notebook.gif",
"altText": "Community resources"
},
"completionEvents": []
}
]
}
],
"notebookCellLanguages": [
"lot",
"scl",
"markdown",
"bash",
"shellscript",
"terminal",
"python"
]
},
"scripts": {
"compile:extension": "tsc --project tsconfig.json",
"compile:renderer": "tsc --project tsconfig.renderer.json",
"compile": "npm run compile:extension && npm run compile:renderer",
"watch": "tsc --watch --project tsconfig.json",
"package": "npm run compile",
"lint": "eslint src --ext ts"
},
"devDependencies": {
"@types/node": "14.x",
"@types/node-fetch": "^2.6.12",
"@types/uuid": "^9.0.8",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"copy-webpack-plugin": "^13.0.0",
"eslint": "^8.0.0",
"ts-loader": "^9.2.2",
"typescript": "^4.8.4"
},
"dependencies": {
"@types/vscode-notebook-renderer": "^1.72.3",
"ansi-to-html": "^0.7.2",
"markdown-it": "^14.1.0",
"mermaid": "^10.9.0",
"mqtt": "^5.10.3",
"node-fetch": "^3.3.2",
"tree-kill": "^1.2.2",
"uuid": "^9.0.1"
},
"extensionDependencies": []
}