@synergenius/flow-weaver 0.17.0 → 0.17.2

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 (123) hide show
  1. package/dist/api/index.d.ts +4 -1
  2. package/dist/api/index.js +4 -1
  3. package/dist/api/templates.js +2 -2
  4. package/dist/api/validate.d.ts +2 -2
  5. package/dist/api/validate.js +6 -6
  6. package/dist/api/validation-registry.d.ts +10 -0
  7. package/dist/api/validation-registry.js +10 -0
  8. package/dist/ast/types.d.ts +91 -4
  9. package/dist/built-in-nodes/invoke-workflow.d.ts +1 -1
  10. package/dist/built-in-nodes/invoke-workflow.js +1 -1
  11. package/dist/chevrotain-parser/connect-parser.js +25 -7
  12. package/dist/cli/commands/compile.d.ts +5 -9
  13. package/dist/cli/commands/compile.js +21 -14
  14. package/dist/cli/commands/dev.d.ts +2 -13
  15. package/dist/cli/commands/dev.js +10 -204
  16. package/dist/cli/commands/doctor.js +6 -3
  17. package/dist/cli/commands/export.d.ts +8 -17
  18. package/dist/cli/commands/export.js +8 -17
  19. package/dist/cli/commands/init-personas.d.ts +17 -6
  20. package/dist/cli/commands/init-personas.js +73 -24
  21. package/dist/cli/commands/init.d.ts +5 -2
  22. package/dist/cli/commands/init.js +73 -42
  23. package/dist/cli/commands/mcp-setup.d.ts +7 -0
  24. package/dist/cli/commands/mcp-setup.js +16 -1
  25. package/dist/cli/flow-weaver.mjs +71002 -70385
  26. package/dist/cli/index.d.ts +1 -0
  27. package/dist/cli/index.js +9 -7
  28. package/dist/cli/templates/index.d.ts +20 -1
  29. package/dist/cli/templates/index.js +66 -15
  30. package/dist/cli/templates/nodes/human-approval.js +2 -3
  31. package/dist/cli/templates/nodes/rag-retriever.js +1 -1
  32. package/dist/constants.d.ts +7 -0
  33. package/dist/constants.js +13 -3
  34. package/dist/context/index.js +13 -3
  35. package/dist/deployment/config/loader.js +2 -1
  36. package/dist/deployment/core/adapters.d.ts +1 -25
  37. package/dist/deployment/core/adapters.js +0 -95
  38. package/dist/deployment/core/formatters.d.ts +0 -15
  39. package/dist/deployment/core/formatters.js +0 -24
  40. package/dist/deployment/index.d.ts +7 -5
  41. package/dist/deployment/index.js +8 -5
  42. package/dist/deployment/types.d.ts +2 -45
  43. package/dist/diagram/html-viewer.js +65 -32
  44. package/dist/diagram/renderer.js +9 -6
  45. package/dist/diagram/theme.js +4 -0
  46. package/dist/diagram/types.d.ts +2 -0
  47. package/dist/doc-metadata/extractors/annotations.js +5 -5
  48. package/dist/doc-metadata/extractors/cli-commands.js +1 -1
  49. package/dist/doc-metadata/extractors/mcp-tools.js +1 -2
  50. package/dist/docs/index.d.ts +28 -1
  51. package/dist/docs/index.js +95 -28
  52. package/dist/export/index.d.ts +2 -3
  53. package/dist/{deployment/targets/cicd-base.d.ts → extensions/cicd/base-target.d.ts} +35 -36
  54. package/dist/{deployment/targets/cicd-base.js → extensions/cicd/base-target.js} +97 -57
  55. package/dist/{validation/cicd-detection.d.ts → extensions/cicd/detection.d.ts} +2 -2
  56. package/dist/{validation/cicd-detection.js → extensions/cicd/detection.js} +13 -1
  57. package/dist/extensions/cicd/docs/cicd.md +395 -0
  58. package/dist/extensions/cicd/index.d.ts +10 -0
  59. package/dist/extensions/cicd/index.js +10 -0
  60. package/dist/extensions/cicd/register.d.ts +11 -0
  61. package/dist/extensions/cicd/register.js +62 -0
  62. package/dist/extensions/cicd/rules.d.ts +30 -0
  63. package/dist/{validation/cicd-rules.js → extensions/cicd/rules.js} +60 -56
  64. package/dist/extensions/cicd/tag-handler.d.ts +14 -0
  65. package/dist/extensions/cicd/tag-handler.js +488 -0
  66. package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-docker.d.ts +1 -1
  67. package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-matrix.d.ts +1 -1
  68. package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-multi-env.d.ts +1 -1
  69. package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-test-deploy.d.ts +1 -1
  70. package/dist/extensions/index.d.ts +12 -0
  71. package/dist/extensions/index.js +12 -0
  72. package/dist/extensions/inngest/dev-mode.d.ts +9 -0
  73. package/dist/extensions/inngest/dev-mode.js +213 -0
  74. package/dist/{generator/inngest.d.ts → extensions/inngest/generator.d.ts} +2 -2
  75. package/dist/{generator/inngest.js → extensions/inngest/generator.js} +4 -4
  76. package/dist/extensions/inngest/index.d.ts +2 -0
  77. package/dist/extensions/inngest/index.js +2 -0
  78. package/dist/extensions/inngest/register.d.ts +6 -0
  79. package/dist/extensions/inngest/register.js +23 -0
  80. package/dist/extensions/inngest/templates/ai-agent-durable.d.ts +8 -0
  81. package/dist/{cli/templates/workflows → extensions/inngest/templates}/ai-agent-durable.js +8 -8
  82. package/dist/{cli/templates/workflows → extensions/inngest/templates}/ai-pipeline-durable.d.ts +2 -2
  83. package/dist/{cli/templates/workflows → extensions/inngest/templates}/ai-pipeline-durable.js +7 -7
  84. package/dist/generated-version.d.ts +1 -1
  85. package/dist/generated-version.js +1 -1
  86. package/dist/generator/compile-target-registry.d.ts +20 -0
  87. package/dist/generator/compile-target-registry.js +20 -0
  88. package/dist/generator/dev-mode-registry.d.ts +27 -0
  89. package/dist/generator/dev-mode-registry.js +20 -0
  90. package/dist/index.d.ts +4 -0
  91. package/dist/index.js +3 -0
  92. package/dist/jsdoc-parser.d.ts +12 -114
  93. package/dist/jsdoc-parser.js +57 -362
  94. package/dist/marketplace/index.d.ts +2 -2
  95. package/dist/marketplace/index.js +1 -1
  96. package/dist/marketplace/registry.d.ts +39 -1
  97. package/dist/marketplace/registry.js +77 -0
  98. package/dist/marketplace/types.d.ts +76 -3
  99. package/dist/mcp/server.d.ts +1 -0
  100. package/dist/mcp/server.js +2 -0
  101. package/dist/mcp/tools-export.js +3 -3
  102. package/dist/mcp/tools-query.js +17 -11
  103. package/dist/mcp/tools-template.js +1 -1
  104. package/dist/parser/tag-registry.d.ts +47 -0
  105. package/dist/parser/tag-registry.js +57 -0
  106. package/dist/parser.d.ts +3 -0
  107. package/dist/parser.js +10 -23
  108. package/dist/validation/rule-registry.d.ts +36 -0
  109. package/dist/validation/rule-registry.js +37 -0
  110. package/dist/validator.js +3 -3
  111. package/docs/reference/concepts.md +2 -1
  112. package/docs/reference/deployment.md +21 -0
  113. package/docs/reference/jsdoc-grammar.md +242 -1
  114. package/docs/reference/scaffold.md +0 -6
  115. package/package.json +9 -1
  116. package/dist/cli/templates/workflows/ai-agent-durable.d.ts +0 -8
  117. package/dist/export/templates.d.ts +0 -24
  118. package/dist/export/templates.js +0 -186
  119. package/dist/validation/cicd-rules.d.ts +0 -62
  120. /package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-docker.js +0 -0
  121. /package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-matrix.js +0 -0
  122. /package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-multi-env.js +0 -0
  123. /package/dist/{cli/templates/workflows → extensions/cicd/templates}/cicd-test-deploy.js +0 -0
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { FunctionLike } from './function-like.js';
7
7
  import type { TDataType, TPortConfig, TMergeStrategy, TNodeTagAST } from './ast/types.js';
8
+ import type { TagHandlerRegistry } from './parser/tag-registry.js';
8
9
  export interface JSDocNodeTypeConfig {
9
10
  name?: string;
10
11
  label?: string;
@@ -200,67 +201,6 @@ export interface JSDocWorkflowConfig {
200
201
  limit: number;
201
202
  period?: string;
202
203
  };
203
- /** @secret declarations */
204
- secrets?: Array<{
205
- name: string;
206
- description?: string;
207
- platform?: 'github' | 'gitlab' | 'all';
208
- scope?: string;
209
- }>;
210
- /** @runner default execution environment */
211
- runner?: string;
212
- /** @cache configurations */
213
- caches?: Array<{
214
- strategy: string;
215
- path?: string;
216
- key?: string;
217
- }>;
218
- /** @artifact declarations */
219
- artifacts?: Array<{
220
- name: string;
221
- path: string;
222
- retention?: number;
223
- }>;
224
- /** @environment declarations */
225
- environments?: Array<{
226
- name: string;
227
- url?: string;
228
- reviewers?: number;
229
- }>;
230
- /** @matrix strategy */
231
- matrix?: {
232
- dimensions: Record<string, string[]>;
233
- include?: Record<string, string>[];
234
- exclude?: Record<string, string>[];
235
- };
236
- /** @service containers */
237
- services?: Array<{
238
- name: string;
239
- image: string;
240
- env?: Record<string, string>;
241
- ports?: string[];
242
- }>;
243
- /** @concurrency control */
244
- concurrency?: {
245
- group: string;
246
- cancelInProgress?: boolean;
247
- };
248
- /** Extended CI/CD triggers from @trigger push/pull_request/dispatch/tag */
249
- cicdTriggers?: Array<{
250
- type: 'push' | 'pull_request' | 'schedule' | 'dispatch' | 'tag';
251
- branches?: string[];
252
- paths?: string[];
253
- pathsIgnore?: string[];
254
- pattern?: string;
255
- types?: string[];
256
- cron?: string;
257
- inputs?: Record<string, {
258
- description?: string;
259
- required?: boolean;
260
- default?: string;
261
- type?: string;
262
- }>;
263
- }>;
264
204
  /** @deploy target key=value pairs */
265
205
  deploy?: Record<string, Record<string, unknown>>;
266
206
  }
@@ -297,13 +237,17 @@ export interface JSDocPatternConfig {
297
237
  }
298
238
  export declare class JSDocParser {
299
239
  /**
300
- * Parse @flowWeaver nodeType from JSDoc comments
240
+ * Parse @flowWeaver nodeType from JSDoc comments.
241
+ * When a TagHandlerRegistry is provided, unknown tags are checked against it
242
+ * before being reported as warnings.
301
243
  */
302
- parseNodeType(func: FunctionLike, warnings: string[]): JSDocNodeTypeConfig | null;
244
+ parseNodeType(func: FunctionLike, warnings: string[], tagRegistry?: TagHandlerRegistry): JSDocNodeTypeConfig | null;
303
245
  /**
304
- * Parse @flowWeaver workflow from JSDoc comments
246
+ * Parse @flowWeaver workflow from JSDoc comments.
247
+ * When a TagHandlerRegistry is provided, unknown tags are checked against it
248
+ * before being reported as warnings.
305
249
  */
306
- parseWorkflow(func: FunctionLike, warnings: string[]): JSDocWorkflowConfig | null;
250
+ parseWorkflow(func: FunctionLike, warnings: string[], tagRegistry?: TagHandlerRegistry): JSDocWorkflowConfig | null;
307
251
  /**
308
252
  * Parse @flowWeaver pattern from JSDoc comments
309
253
  */
@@ -400,12 +344,9 @@ export declare class JSDocParser {
400
344
  private parseCoerceTag;
401
345
  /**
402
346
  * Parse @trigger tag using Chevrotain parser.
347
+ * Delegates unrecognized trigger formats to the tag registry (e.g. CI/CD triggers).
403
348
  */
404
349
  private parseTriggerTag;
405
- /**
406
- * Parse a CI/CD-specific trigger type (push, pull_request, dispatch, tag, schedule).
407
- */
408
- private parseCICDTrigger;
409
350
  /**
410
351
  * Parse @cancelOn tag using Chevrotain parser.
411
352
  */
@@ -414,61 +355,18 @@ export declare class JSDocParser {
414
355
  * Parse @throttle tag using Chevrotain parser.
415
356
  */
416
357
  private parseThrottleTag;
417
- /**
418
- * Dispatch a CI/CD or @deploy tag to the appropriate parser.
419
- * Consolidates all deployment-related cases from the main switch.
420
- */
421
- private handleDeploymentTag;
422
358
  /**
423
359
  * Parse @deploy tag.
424
360
  * Format: @deploy <target> key=value key2="value with spaces" key3=123 key4=true
425
361
  *
426
362
  * Examples:
427
363
  * @deploy github-actions action="actions/checkout@v4"
428
- * @deploy inngest durableSteps=true framework="next" retries=3
429
- * @deploy lambda memory=256 timeout=30
364
+ * @deploy my-target durableSteps=true framework="next" retries=3
365
+ * @deploy another-target memory=256 timeout=30
430
366
  *
431
367
  * Values are auto-coerced: "true"/"false" → boolean, numeric strings → number.
432
368
  */
433
369
  private parseDeployTag;
434
- /**
435
- * Parse @secret tag.
436
- * Format: @secret NAME - description
437
- * Optional: @secret NAME scope="deploy" platform="github" - description
438
- */
439
- private parseSecretTag;
440
- /**
441
- * Parse @cache tag.
442
- * Format: @cache strategy [key="file"] [path="dir"]
443
- */
444
- private parseCacheTag;
445
- /**
446
- * Parse @artifact tag.
447
- * Format: @artifact name path="dist/" [retention=5]
448
- */
449
- private parseArtifactTag;
450
- /**
451
- * Parse @environment tag.
452
- * Format: @environment name [url="..."] [reviewers=N]
453
- */
454
- private parseEnvironmentTag;
455
- /**
456
- * Parse @matrix tag.
457
- * Format: @matrix dim1="val1,val2" dim2="val3,val4"
458
- * Or: @matrix include dim1="val1" dim2="val2"
459
- * Or: @matrix exclude dim1="val1" dim2="val2"
460
- */
461
- private parseMatrixTag;
462
- /**
463
- * Parse @service tag.
464
- * Format: @service name image="..." [env="K=V,K2=V2"] [ports="5432:5432"]
465
- */
466
- private parseServiceTag;
467
- /**
468
- * Parse @concurrency tag.
469
- * Format: @concurrency group="name" [cancel-in-progress=true]
470
- */
471
- private parseConcurrencyTag;
472
370
  /**
473
371
  * Parse default value from string
474
372
  */