@netpad/mcp-server 2.2.1 → 2.3.0

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.
package/dist/index.js CHANGED
@@ -17929,6 +17929,53 @@ var WORKFLOW_NODE_TYPES = {
17929
17929
  { key: "timeout", label: "Timeout (ms)", type: "number", default: 5e3 }
17930
17930
  ]
17931
17931
  }
17932
+ ],
17933
+ // Forms (Form Reactions)
17934
+ forms: [
17935
+ {
17936
+ type: "field-event-trigger",
17937
+ name: "Field Event Trigger",
17938
+ description: "Trigger workflow when a form field event occurs (blur, change, focus). Entry point for form reaction workflows.",
17939
+ icon: "bolt",
17940
+ color: "#00BCD4",
17941
+ category: "forms",
17942
+ stage: "trigger",
17943
+ inputs: [],
17944
+ outputs: [
17945
+ { id: "triggerField", label: "Trigger Field", type: "string" },
17946
+ { id: "triggerEvent", label: "Event Type", type: "string" },
17947
+ { id: "fieldValue", label: "Field Value", type: "any" },
17948
+ { id: "formData", label: "Form Data", type: "object" },
17949
+ { id: "formId", label: "Form ID", type: "string" },
17950
+ { id: "reactionId", label: "Reaction ID", type: "string" }
17951
+ ],
17952
+ configFields: [
17953
+ { key: "formId", label: "Form ID", type: "string", required: false },
17954
+ { key: "triggerMode", label: "Trigger Mode", type: "select", options: ["any", "all"], default: "any" },
17955
+ { key: "debounceMs", label: "Debounce (ms)", type: "number", default: 0 }
17956
+ ]
17957
+ },
17958
+ {
17959
+ type: "form-field-update",
17960
+ name: "Form Field Update",
17961
+ description: "Update form fields with workflow data. Maps workflow outputs to form fields for real-time updates.",
17962
+ icon: "edit_note",
17963
+ color: "#00BCD4",
17964
+ category: "forms",
17965
+ stage: "action",
17966
+ inputs: [{ id: "data", label: "Input Data", type: "object" }],
17967
+ outputs: [
17968
+ { id: "success", label: "Success", type: "boolean" },
17969
+ { id: "updates", label: "Updates", type: "object" },
17970
+ { id: "updatedFields", label: "Updated Fields", type: "array" },
17971
+ { id: "skippedFields", label: "Skipped Fields", type: "array" }
17972
+ ],
17973
+ configFields: [
17974
+ { key: "feedbackMode", label: "Feedback Mode", type: "select", options: ["silent", "subtle", "toast"], default: "silent" },
17975
+ { key: "validateAfterUpdate", label: "Validate After Update", type: "boolean", default: false },
17976
+ { key: "updates", label: "Field Mappings", type: "array", itemType: "object", required: true }
17977
+ ]
17978
+ }
17932
17979
  ]
17933
17980
  };
17934
17981
  var WORKFLOW_TEMPLATES = {
@@ -18190,6 +18237,126 @@ var WORKFLOW_TEMPLATES = {
18190
18237
  targetHandle: "data"
18191
18238
  }
18192
18239
  ]
18240
+ },
18241
+ "company-lookup-reaction": {
18242
+ id: "company-lookup-reaction",
18243
+ name: "Company Domain Lookup Reaction",
18244
+ description: "Form reaction that fetches company data when user enters a domain and auto-fills related fields",
18245
+ category: "forms",
18246
+ tags: ["reaction", "forms", "auto-fill", "api"],
18247
+ nodes: [
18248
+ {
18249
+ id: "trigger_1",
18250
+ type: "field-event-trigger",
18251
+ label: "Domain Field Event",
18252
+ position: { x: 100, y: 200 },
18253
+ config: { triggerMode: "any", debounceMs: 500 },
18254
+ enabled: true
18255
+ },
18256
+ {
18257
+ id: "http_1",
18258
+ type: "http-request",
18259
+ label: "Fetch Company Data",
18260
+ position: { x: 350, y: 200 },
18261
+ config: {
18262
+ url: "https://api.example.com/company?domain={{nodes.trigger_1.fieldValue}}",
18263
+ method: "GET",
18264
+ headers: { "Accept": "application/json" }
18265
+ },
18266
+ enabled: true
18267
+ },
18268
+ {
18269
+ id: "update_1",
18270
+ type: "form-field-update",
18271
+ label: "Update Form Fields",
18272
+ position: { x: 600, y: 200 },
18273
+ config: {
18274
+ feedbackMode: "subtle",
18275
+ validateAfterUpdate: false,
18276
+ updates: [
18277
+ { fieldPath: "companyName", sourcePath: "http_1.response.name", nullBehavior: "skip" },
18278
+ { fieldPath: "industry", sourcePath: "http_1.response.industry", nullBehavior: "skip" },
18279
+ { fieldPath: "employeeCount", sourcePath: "http_1.response.size", nullBehavior: "skip" }
18280
+ ]
18281
+ },
18282
+ enabled: true
18283
+ }
18284
+ ],
18285
+ edges: [
18286
+ {
18287
+ id: "edge_1",
18288
+ source: "trigger_1",
18289
+ sourceHandle: "fieldValue",
18290
+ target: "http_1",
18291
+ targetHandle: "body"
18292
+ },
18293
+ {
18294
+ id: "edge_2",
18295
+ source: "http_1",
18296
+ sourceHandle: "response",
18297
+ target: "update_1",
18298
+ targetHandle: "data"
18299
+ }
18300
+ ]
18301
+ },
18302
+ "ai-categorization-reaction": {
18303
+ id: "ai-categorization-reaction",
18304
+ name: "AI Field Categorization Reaction",
18305
+ description: "Form reaction that uses AI to categorize text input and auto-fills category field",
18306
+ category: "forms",
18307
+ tags: ["reaction", "forms", "ai", "classification"],
18308
+ nodes: [
18309
+ {
18310
+ id: "trigger_1",
18311
+ type: "field-event-trigger",
18312
+ label: "Description Field Event",
18313
+ position: { x: 100, y: 200 },
18314
+ config: { triggerMode: "any", debounceMs: 1e3 },
18315
+ enabled: true
18316
+ },
18317
+ {
18318
+ id: "classify_1",
18319
+ type: "ai-classify",
18320
+ label: "Classify Content",
18321
+ position: { x: 350, y: 200 },
18322
+ config: {
18323
+ categories: ["Technical Support", "Billing", "Feature Request", "Bug Report", "General Inquiry"],
18324
+ instructions: "Classify the support ticket based on its description."
18325
+ },
18326
+ enabled: true
18327
+ },
18328
+ {
18329
+ id: "update_1",
18330
+ type: "form-field-update",
18331
+ label: "Update Category",
18332
+ position: { x: 600, y: 200 },
18333
+ config: {
18334
+ feedbackMode: "subtle",
18335
+ validateAfterUpdate: false,
18336
+ updates: [
18337
+ { fieldPath: "category", sourcePath: "classify_1.category", nullBehavior: "skip" },
18338
+ { fieldPath: "aiConfidence", sourcePath: "classify_1.confidence", nullBehavior: "skip" }
18339
+ ]
18340
+ },
18341
+ enabled: true
18342
+ }
18343
+ ],
18344
+ edges: [
18345
+ {
18346
+ id: "edge_1",
18347
+ source: "trigger_1",
18348
+ sourceHandle: "fieldValue",
18349
+ target: "classify_1",
18350
+ targetHandle: "text"
18351
+ },
18352
+ {
18353
+ id: "edge_2",
18354
+ source: "classify_1",
18355
+ sourceHandle: "category",
18356
+ target: "update_1",
18357
+ targetHandle: "data"
18358
+ }
18359
+ ]
18193
18360
  }
18194
18361
  };
18195
18362
  function generateAddNodeCode(workflowId, node) {