@foresthubai/workflow-cli 0.4.5 → 0.4.8

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.
@@ -11,7 +11,7 @@ components:
11
11
  schemas:
12
12
  DataType:
13
13
  type: string
14
- enum: [int, float, bool, string]
14
+ enum: [int, float, bool, string, image]
15
15
 
16
16
  SignalType:
17
17
  type: string
@@ -301,10 +301,12 @@ components:
301
301
  Model:
302
302
  oneOf:
303
303
  - $ref: "#/components/schemas/LLMModel"
304
+ - $ref: "#/components/schemas/MLModel"
304
305
  discriminator:
305
306
  propertyName: type
306
307
  mapping:
307
308
  LLMModel: "#/components/schemas/LLMModel"
309
+ MLModel: "#/components/schemas/MLModel"
308
310
 
309
311
  LLMModel:
310
312
  type: object
@@ -324,6 +326,19 @@ components:
324
326
  items:
325
327
  $ref: "llmproxy.yaml#/components/schemas/ModelCapability"
326
328
 
329
+ MLModel:
330
+ type: object
331
+ description: A machine-learning model, served by an inference component, that nodes can reference.
332
+ required: [type, id, label]
333
+ properties:
334
+ type: { type: string, enum: [MLModel] }
335
+ id:
336
+ type: string
337
+ description: Stable identifier; this is the model name nodes reference and the component selects on.
338
+ label:
339
+ type: string
340
+ description: Display name.
341
+
327
342
  # ====== Nodes ======
328
343
 
329
344
  Node:
@@ -336,6 +351,8 @@ components:
336
351
  - $ref: "#/components/schemas/SerialWriteNode"
337
352
  - $ref: "#/components/schemas/RetrieverNode"
338
353
  - $ref: "#/components/schemas/WebFetchNode"
354
+ - $ref: "#/components/schemas/MLInferenceNode"
355
+ - $ref: "#/components/schemas/CameraCaptureNode"
339
356
  - $ref: "#/components/schemas/FunctionCallNode"
340
357
  - $ref: "#/components/schemas/OnFunctionCallNode"
341
358
  - $ref: "#/components/schemas/DelayNode"
@@ -360,6 +377,8 @@ components:
360
377
  SerialWrite: "#/components/schemas/SerialWriteNode"
361
378
  Retriever: "#/components/schemas/RetrieverNode"
362
379
  WebFetch: "#/components/schemas/WebFetchNode"
380
+ MLInference: "#/components/schemas/MLInferenceNode"
381
+ CameraCapture: "#/components/schemas/CameraCaptureNode"
363
382
  FunctionCall: "#/components/schemas/FunctionCallNode"
364
383
  OnFunctionCall: "#/components/schemas/OnFunctionCallNode"
365
384
  Delay: "#/components/schemas/DelayNode"
@@ -606,6 +625,45 @@ components:
606
625
  output:
607
626
  $ref: "#/components/schemas/OutputBinding"
608
627
 
628
+ MLInferenceNode:
629
+ type: object
630
+ required: [id, type, arguments, position]
631
+ properties:
632
+ id: { type: string }
633
+ type: { type: string, enum: [MLInference] }
634
+ label: { type: string }
635
+ position: { $ref: "#/components/schemas/NodePosition" }
636
+ arguments:
637
+ type: object
638
+ required: [input, model, output]
639
+ properties:
640
+ model:
641
+ type: string
642
+ description: Reference to an MLModel id.
643
+ input:
644
+ $ref: "#/components/schemas/Reference"
645
+ description: Variable holding the model input. Its type is resolved at runtime and dispatched to the matching handler.
646
+ output:
647
+ $ref: "#/components/schemas/OutputBinding"
648
+
649
+ CameraCaptureNode:
650
+ type: object
651
+ required: [id, type, arguments, position]
652
+ properties:
653
+ id: { type: string }
654
+ type: { type: string, enum: [CameraCapture] }
655
+ label: { type: string }
656
+ position: { $ref: "#/components/schemas/NodePosition" }
657
+ arguments:
658
+ type: object
659
+ required: [cameraReference, output]
660
+ properties:
661
+ cameraReference:
662
+ type: string
663
+ description: Reference to a CAMERA channel id. The channel carries optional capture defaults; it resolves to a capture component endpoint at deploy time.
664
+ output:
665
+ $ref: "#/components/schemas/OutputBinding"
666
+
609
667
  ReadPinNode:
610
668
  type: object
611
669
  required: [id, type, arguments, position]
@@ -815,6 +873,7 @@ components:
815
873
  - $ref: "#/components/schemas/DACChannel"
816
874
  - $ref: "#/components/schemas/UARTChannel"
817
875
  - $ref: "#/components/schemas/MQTTChannel"
876
+ - $ref: "#/components/schemas/CAMERAChannel"
818
877
  - $ref: "#/components/schemas/LOGChannel"
819
878
  discriminator:
820
879
  propertyName: type
@@ -826,6 +885,7 @@ components:
826
885
  DAC: "#/components/schemas/DACChannel"
827
886
  UART: "#/components/schemas/UARTChannel"
828
887
  MQTT: "#/components/schemas/MQTTChannel"
888
+ CAMERA: "#/components/schemas/CAMERAChannel"
829
889
  LOG: "#/components/schemas/LOGChannel"
830
890
 
831
891
  GPIOINChannel:
@@ -897,6 +957,20 @@ components:
897
957
  type: string
898
958
  description: Topic this channel publishes to / subscribes on.
899
959
 
960
+ CAMERAChannel:
961
+ type: object
962
+ required: [type, id, label]
963
+ properties:
964
+ type: { type: string, enum: [CAMERA] }
965
+ id: { type: string }
966
+ label: { type: string }
967
+ width:
968
+ type: integer
969
+ description: Default capture width in pixels. The source picks its native resolution when omitted.
970
+ height:
971
+ type: integer
972
+ description: Default capture height in pixels. The source picks its native resolution when omitted.
973
+
900
974
  LOGChannel:
901
975
  type: object
902
976
  required: [type, id, label, level]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foresthubai/workflow-cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.8",
4
4
  "type": "module",
5
5
  "description": "fh-workflow CLI — author, validate, and visually edit Edge Agents workflow JSON. Bundles the visual builder; no other install required.",
6
6
  "license": "AGPL-3.0-only",
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "scripts": {
25
25
  "dev": "vite",
26
+ "generate": "openapi-typescript ../../contract/deployment.yaml -o cli/deploy/api/deployment.ts && openapi-typescript ../../contract/engine.yaml -o cli/deploy/api/engine.ts && openapi-typescript ../../contract/camera.yaml -o cli/deploy/api/camera.ts",
26
27
  "build": "vite build",
27
28
  "build:cli": "node ./scripts/build-cli.mjs",
28
29
  "build:all": "npm run build && npm run build:cli",