@synergenius/flow-weaver 0.33.2 → 0.44.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/LICENSE +201 -226
- package/NOTICE +13 -0
- package/README.md +152 -245
- package/dist/agent/agent-loop.d.ts +4 -2
- package/dist/agent/cli-session.d.ts +3 -3
- package/dist/agent/cli-session.js +511 -438
- package/dist/agent/cli-spawn-config.d.ts +4 -4
- package/dist/agent/gate.d.ts +164 -0
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +174 -28
- package/dist/agent/mcp-bridge.d.ts +1 -1
- package/dist/agent/mcp-bridge.js +114 -128
- package/dist/agent/mcp-tool-server.d.ts +2 -2
- package/dist/agent/mcp-tool-server.js +147 -189
- package/dist/agent/profiles.d.ts +69 -0
- package/dist/agent/providers/anthropic.d.ts +2 -4
- package/dist/agent/providers/claude-cli.d.ts +4 -5
- package/dist/agent/providers/openai-compat.d.ts +8 -1
- package/dist/agent/streaming.d.ts +2 -2
- package/dist/agent/types.d.ts +16 -10
- package/dist/api/builder.d.ts +3 -3
- package/dist/api/compile.d.ts +9 -4
- package/dist/api/durable-validation.d.ts +15 -0
- package/dist/api/generate-in-place.d.ts +21 -19
- package/dist/api/generate.d.ts +21 -16
- package/dist/api/generated-module/local-node-functions.d.ts +24 -0
- package/dist/api/generated-module/module-format.d.ts +23 -0
- package/dist/api/generated-module/module-writer.d.ts +34 -0
- package/dist/api/generated-module/node-type-imports.d.ts +39 -0
- package/dist/api/generated-module/preamble.d.ts +16 -0
- package/dist/api/generated-module/workflow-functions.d.ts +29 -0
- package/dist/api/graph-identity.d.ts +39 -0
- package/dist/api/helpers.d.ts +4 -60
- package/dist/api/in-place/built-in-nodes.d.ts +18 -0
- package/dist/api/in-place/function-body.d.ts +21 -0
- package/dist/api/in-place/fw-imports.d.ts +30 -0
- package/dist/api/in-place/macro-coverage.d.ts +14 -0
- package/dist/api/in-place/node-type-functions.d.ts +18 -0
- package/dist/api/in-place/node-type-jsdoc.d.ts +20 -0
- package/dist/api/in-place/orphaned-node-types.d.ts +16 -0
- package/dist/api/in-place/runtime-section.d.ts +16 -0
- package/dist/api/in-place/signature.d.ts +47 -0
- package/dist/api/in-place/source-file.d.ts +19 -0
- package/dist/api/in-place/workflow-jsdoc.d.ts +19 -0
- package/dist/api/index.d.ts +18 -21
- package/dist/api/index.js +259 -53
- package/dist/api/inline-engine.generated.d.ts +3 -0
- package/dist/api/inline-runtime.d.ts +10 -2
- package/dist/api/manipulation/connections.d.ts +1 -1
- package/dist/api/manipulation/index.d.ts +8 -8
- package/dist/api/manipulation/node-types.d.ts +1 -1
- package/dist/api/manipulation/nodes.d.ts +3 -13
- package/dist/api/manipulation/ports.d.ts +1 -1
- package/dist/api/manipulation/scopes.d.ts +1 -1
- package/dist/api/manipulation/workflow.d.ts +1 -1
- package/dist/api/modify-operation.d.ts +0 -2
- package/dist/api/parse.d.ts +22 -1
- package/dist/api/port-references.d.ts +66 -0
- package/dist/api/query.d.ts +18 -2
- package/dist/api/templates.d.ts +1 -1
- package/dist/api/transform.d.ts +1 -1
- package/dist/api/validate.d.ts +1 -1
- package/dist/api/validation-registry.d.ts +2 -2
- package/dist/artifacts/brief.d.ts +43 -0
- package/dist/artifacts/index.d.ts +31 -0
- package/dist/artifacts/pdf.d.ts +19 -0
- package/dist/ast/builder.d.ts +3 -3
- package/dist/ast/index.d.ts +4 -4
- package/dist/ast/index.js +60 -5
- package/dist/ast/serialization-node.d.ts +1 -1
- package/dist/ast/serialization.d.ts +1 -1
- package/dist/ast/types.d.ts +82 -291
- package/dist/ast/workflow-utils.d.ts +4 -4
- package/dist/built-in-nodes/coercion-types.d.ts +1 -1
- package/dist/built-in-nodes/delay.d.ts +3 -1
- package/dist/built-in-nodes/generated-registry.d.ts +1 -1
- package/dist/built-in-nodes/index.d.ts +6 -5
- package/dist/built-in-nodes/index.js +79 -5
- package/dist/built-in-nodes/invoke-workflow.d.ts +2 -1
- package/dist/built-in-nodes/mock-types.d.ts +45 -14
- package/dist/built-in-nodes/sleep.d.ts +12 -0
- package/dist/built-in-nodes/wait-for-agent.d.ts +2 -1
- package/dist/built-in-nodes/wait-for-event.d.ts +2 -1
- package/dist/chevrotain-parser/coerce-parser.d.ts +1 -1
- package/dist/chevrotain-parser/connect-parser.d.ts +1 -1
- package/dist/chevrotain-parser/grammar-diagrams.d.ts +1 -1
- package/dist/chevrotain-parser/index.d.ts +20 -23
- package/dist/chevrotain-parser/node-parser.d.ts +7 -8
- package/dist/chevrotain-parser/parse-line.d.ts +54 -0
- package/dist/chevrotain-parser/tokens.d.ts +0 -17
- package/dist/chevrotain-parser/trigger-cancel-parser.d.ts +6 -1
- package/dist/chunks/chunk-4EUSHAY6.js +298 -0
- package/dist/chunks/chunk-4KDUEOFD.js +197 -0
- package/dist/chunks/chunk-5Y3AIUWY.js +911 -0
- package/dist/chunks/chunk-6KMVP6AU.js +20 -0
- package/dist/chunks/chunk-6PNJORFL.js +128 -0
- package/dist/chunks/chunk-7AAQNGRH.js +2001 -0
- package/dist/chunks/chunk-7YYKTPJ5.js +22705 -0
- package/dist/chunks/chunk-A5MBOFVY.js +33 -0
- package/dist/chunks/chunk-AXNQRVJB.js +18 -0
- package/dist/chunks/chunk-B6HQ6YS5.js +572 -0
- package/dist/chunks/chunk-CY3RNVML.js +296 -0
- package/dist/chunks/chunk-CYHYDLV4.js +653 -0
- package/dist/chunks/chunk-CZBCCK4Y.js +82 -0
- package/dist/chunks/chunk-DCMGQP5V.js +505 -0
- package/dist/chunks/chunk-DIAA66GL.js +72 -0
- package/dist/chunks/chunk-DUO6H5PR.js +20 -0
- package/dist/chunks/chunk-E5WN7IGO.js +125 -0
- package/dist/chunks/chunk-EFGFXXQF.js +184 -0
- package/dist/chunks/chunk-F3RTZV2A.js +2811 -0
- package/dist/chunks/chunk-FMTLP5ZX.js +1397 -0
- package/dist/chunks/chunk-HKZLQJDV.js +79 -0
- package/dist/chunks/chunk-INDEVYEC.js +146 -0
- package/dist/chunks/chunk-JQTF4R5L.js +390 -0
- package/dist/chunks/chunk-KMCAYNUM.js +331 -0
- package/dist/chunks/chunk-KMWCCOUJ.js +1444 -0
- package/dist/chunks/chunk-KU3CLJI2.js +338 -0
- package/dist/chunks/chunk-NDSTGMKR.js +3300 -0
- package/dist/chunks/chunk-NQNLUAPO.js +505 -0
- package/dist/chunks/chunk-O2U2LO57.js +466 -0
- package/dist/chunks/chunk-OOQG7UPP.js +457 -0
- package/dist/chunks/chunk-OZQAW5ZG.js +112 -0
- package/dist/chunks/chunk-P2CVDGHR.js +487 -0
- package/dist/chunks/chunk-P44RIZ7C.js +592 -0
- package/dist/chunks/chunk-PEZCT37T.js +1475 -0
- package/dist/chunks/chunk-PKWSAW6O.js +152 -0
- package/dist/chunks/chunk-Q6MDDZMT.js +4373 -0
- package/dist/chunks/chunk-QDE4Z7KW.js +6 -0
- package/dist/chunks/chunk-QJDAVSNY.js +8 -0
- package/dist/chunks/chunk-QYPORSLO.js +7552 -0
- package/dist/chunks/chunk-R4QGNK34.js +183 -0
- package/dist/chunks/chunk-REEYC73I.js +3002 -0
- package/dist/chunks/chunk-SEWDMQ6Q.js +46 -0
- package/dist/chunks/chunk-TAIUWKZB.js +3057 -0
- package/dist/chunks/chunk-TN4YZ3O7.js +196 -0
- package/dist/chunks/chunk-TRMFB43C.js +143 -0
- package/dist/chunks/chunk-VO4QXG2X.js +1016 -0
- package/dist/chunks/chunk-VP2P3BPA.js +1002 -0
- package/dist/chunks/chunk-VQ7H33J4.js +2176 -0
- package/dist/chunks/chunk-VWA7MCV2.js +105 -0
- package/dist/chunks/chunk-XAV22WD7.js +253 -0
- package/dist/chunks/chunk-YSPBPZDV.js +148 -0
- package/dist/chunks/chunk-ZKEGXO73.js +282 -0
- package/dist/chunks/chunk-ZMGN6F3S.js +4256 -0
- package/dist/chunks/grammar-diagrams-AI7VDXOM.js +14 -0
- package/dist/chunks/index.min-ECJD6GZC.js +37 -0
- package/dist/chunks/manifest-EPTR5MYH.js +21 -0
- package/dist/chunks/openapi-document-6TCGVDUW.js +69 -0
- package/dist/chunks/registry-K2U5KUTY.js +23 -0
- package/dist/chunks/serialization-node-UGY6CFH6.js +38 -0
- package/dist/chunks/validate-GEKSZPIN.js +24 -0
- package/dist/chunks/validation-registry-IQZX3UE3.js +7 -0
- package/dist/chunks/validator-VXFHLPDW.js +26 -0
- package/dist/chunks/workflow-executor-KBGFKHNR.js +36 -0
- package/dist/cli/commands/agents.d.ts +16 -0
- package/dist/cli/commands/artifact.d.ts +10 -0
- package/dist/cli/commands/compile.d.ts +0 -30
- package/dist/cli/commands/console.d.ts +32 -0
- package/dist/cli/commands/context.d.ts +0 -3
- package/dist/cli/commands/describe.js +386 -352
- package/dist/cli/commands/dev.d.ts +9 -4
- package/dist/cli/commands/diagram.d.ts +3 -5
- package/dist/cli/commands/doctor.d.ts +27 -4
- package/dist/cli/commands/doctor.js +3307 -633
- package/dist/cli/commands/export.d.ts +6 -4
- package/dist/cli/commands/grammar.d.ts +0 -3
- package/dist/cli/commands/implement.d.ts +1 -1
- package/dist/cli/commands/init/agent-handoff.d.ts +28 -0
- package/dist/cli/commands/init/config.d.ts +3 -0
- package/dist/cli/commands/init/files.d.ts +12 -0
- package/dist/cli/commands/init/naming.d.ts +13 -0
- package/dist/cli/commands/init/output.d.ts +12 -0
- package/dist/cli/commands/init/setup.d.ts +21 -0
- package/dist/cli/commands/init/types.d.ts +53 -0
- package/dist/cli/commands/init-personas.d.ts +9 -1
- package/dist/cli/commands/init.d.ts +24 -88
- package/dist/cli/commands/market.d.ts +1 -1
- package/dist/cli/commands/mcp-setup.d.ts +1 -4
- package/dist/cli/commands/modify.d.ts +0 -5
- package/dist/cli/commands/openapi.d.ts +9 -11
- package/dist/cli/commands/run.d.ts +0 -4
- package/dist/cli/commands/serve.d.ts +24 -26
- package/dist/cli/commands/status.d.ts +1 -1
- package/dist/cli/exports.d.ts +3 -4
- package/dist/cli/exports.js +124 -23
- package/dist/cli/flow-weaver-agents-H653446S.mjs +81 -0
- package/dist/cli/flow-weaver-artifact-WBFYTW76.mjs +58 -0
- package/dist/cli/flow-weaver-chunk-265CEK74.mjs +2 -0
- package/dist/cli/flow-weaver-chunk-2C7PZCV5.mjs +186 -0
- package/dist/cli/flow-weaver-chunk-3BSYCWPL.mjs +3109 -0
- package/dist/cli/flow-weaver-chunk-3MKUQP3D.mjs +547 -0
- package/dist/cli/flow-weaver-chunk-3ZLMPQTH.mjs +27 -0
- package/dist/cli/flow-weaver-chunk-4DVY73ML.mjs +280 -0
- package/dist/cli/flow-weaver-chunk-54M4KNEL.mjs +200 -0
- package/dist/cli/flow-weaver-chunk-55QMUZIA.mjs +256 -0
- package/dist/cli/flow-weaver-chunk-6ZUJ7LMX.mjs +2003 -0
- package/dist/cli/flow-weaver-chunk-7ET6N32V.mjs +419 -0
- package/dist/cli/flow-weaver-chunk-7G63RR4K.mjs +8880 -0
- package/dist/cli/flow-weaver-chunk-A6M5K3W7.mjs +4418 -0
- package/dist/cli/flow-weaver-chunk-AA3NATMX.mjs +154 -0
- package/dist/cli/flow-weaver-chunk-APX6MQ5A.mjs +5652 -0
- package/dist/cli/flow-weaver-chunk-BHCC5FE5.mjs +17 -0
- package/dist/cli/flow-weaver-chunk-DM4BBRRU.mjs +35 -0
- package/dist/cli/flow-weaver-chunk-DRN7KPWY.mjs +168 -0
- package/dist/cli/flow-weaver-chunk-EKWF27G6.mjs +23 -0
- package/dist/cli/flow-weaver-chunk-EM5HWQ4R.mjs +338 -0
- package/dist/cli/flow-weaver-chunk-FPPPU2DG.mjs +226 -0
- package/dist/cli/flow-weaver-chunk-GAQXZHNO.mjs +3005 -0
- package/dist/cli/flow-weaver-chunk-GBUNNP33.mjs +1329 -0
- package/dist/cli/flow-weaver-chunk-HMAKDE55.mjs +636 -0
- package/dist/cli/flow-weaver-chunk-HQ3ZAN44.mjs +367 -0
- package/dist/cli/flow-weaver-chunk-I4APCXYN.mjs +21442 -0
- package/dist/cli/flow-weaver-chunk-IJJ4JXTL.mjs +2297 -0
- package/dist/cli/flow-weaver-chunk-J7EPZW2I.mjs +33 -0
- package/dist/cli/flow-weaver-chunk-KOEMJHLG.mjs +83 -0
- package/dist/cli/flow-weaver-chunk-M6CBWQKJ.mjs +271 -0
- package/dist/cli/flow-weaver-chunk-MHJ4N652.mjs +1580 -0
- package/dist/cli/flow-weaver-chunk-MKAFQWLP.mjs +202 -0
- package/dist/cli/flow-weaver-chunk-MMV2XGD3.mjs +3291 -0
- package/dist/cli/flow-weaver-chunk-MSI2UJES.mjs +125 -0
- package/dist/cli/flow-weaver-chunk-N767YRAI.mjs +48 -0
- package/dist/cli/flow-weaver-chunk-NQKKWDGF.mjs +56 -0
- package/dist/cli/flow-weaver-chunk-NYZDQYFU.mjs +45 -0
- package/dist/cli/flow-weaver-chunk-OMVWSNHJ.mjs +14 -0
- package/dist/cli/flow-weaver-chunk-PUWZ47H5.mjs +2188 -0
- package/dist/cli/flow-weaver-chunk-QOPRVDES.mjs +46 -0
- package/dist/cli/flow-weaver-chunk-RIWE7YTR.mjs +216 -0
- package/dist/cli/flow-weaver-chunk-S63Q3JIU.mjs +789 -0
- package/dist/cli/flow-weaver-chunk-T7X5A23H.mjs +558 -0
- package/dist/cli/flow-weaver-chunk-TLV3VZUN.mjs +2 -0
- package/dist/cli/flow-weaver-chunk-TS5P3PIN.mjs +194 -0
- package/dist/cli/flow-weaver-chunk-U3EO3X4B.mjs +649 -0
- package/dist/cli/flow-weaver-chunk-UNFS3NQP.mjs +34 -0
- package/dist/cli/flow-weaver-chunk-V6DHWFQG.mjs +2811 -0
- package/dist/cli/flow-weaver-chunk-VXWNLYQU.mjs +9 -0
- package/dist/cli/flow-weaver-chunk-W3YNK26P.mjs +149 -0
- package/dist/cli/flow-weaver-chunk-XG2WKXYZ.mjs +324 -0
- package/dist/cli/flow-weaver-chunk-YLSRZWFK.mjs +2219 -0
- package/dist/cli/flow-weaver-chunk-YVPURWS6.mjs +40 -0
- package/dist/cli/flow-weaver-chunk-Z44JK332.mjs +582 -0
- package/dist/cli/flow-weaver-chunk-Z5ZJPNSY.mjs +517 -0
- package/dist/cli/flow-weaver-chunk-ZQALO25T.mjs +594 -0
- package/dist/cli/flow-weaver-compile-A2CABDSB.mjs +37 -0
- package/dist/cli/flow-weaver-console-6EBHDBTN.mjs +71 -0
- package/dist/cli/flow-weaver-context-ECLYANFF.mjs +17 -0
- package/dist/cli/flow-weaver-context-ZRUMW2KE.mjs +69 -0
- package/dist/cli/flow-weaver-create-WIP4EFNP.mjs +124 -0
- package/dist/cli/flow-weaver-deployment-WJJRK7NO.mjs +14 -0
- package/dist/cli/flow-weaver-describe-XDIFF5LI.mjs +41 -0
- package/dist/cli/flow-weaver-dev-LG2NSQAU.mjs +196 -0
- package/dist/cli/flow-weaver-diagram-3EVQARQE.mjs +52 -0
- package/dist/cli/flow-weaver-diagram-7LR7O4M2.mjs +44 -0
- package/dist/cli/flow-weaver-diff-USF7DJLU.mjs +85 -0
- package/dist/cli/flow-weaver-docs-QU2ZOXKH.mjs +96 -0
- package/dist/cli/flow-weaver-doctor-K447YWHR.mjs +43 -0
- package/dist/cli/flow-weaver-export-LAS6N56Y.mjs +140 -0
- package/dist/cli/flow-weaver-grammar-RIRUS3Q6.mjs +49 -0
- package/dist/cli/flow-weaver-grammar-diagrams-WXRTW5SK.mjs +15 -0
- package/dist/cli/flow-weaver-implement-5JG6BCFZ.mjs +114 -0
- package/dist/cli/flow-weaver-index.min-OR5SIHXD.mjs +39 -0
- package/dist/cli/flow-weaver-init-34YZNPQX.mjs +972 -0
- package/dist/cli/flow-weaver-init-personas-NOGZTQQ2.mjs +48 -0
- package/dist/cli/flow-weaver-manifest-4JNUSEB3.mjs +18 -0
- package/dist/cli/flow-weaver-market-WA4CKHKV.mjs +444 -0
- package/dist/cli/flow-weaver-mcp-setup-O26MGXSD.mjs +22 -0
- package/dist/cli/flow-weaver-migrate-VFVEUTPH.mjs +119 -0
- package/dist/cli/flow-weaver-modify-VM3JP5K6.mjs +97 -0
- package/dist/cli/flow-weaver-openapi-IRBWI3HM.mjs +71 -0
- package/dist/cli/flow-weaver-openapi-document-7N6YMPG3.mjs +30 -0
- package/dist/cli/flow-weaver-pack-commands-OS2QRXAK.mjs +146 -0
- package/dist/cli/flow-weaver-registry-5MLFRPPT.mjs +25 -0
- package/dist/cli/flow-weaver-run-DSTLSTHR.mjs +555 -0
- package/dist/cli/flow-weaver-serialization-node-LE6PCG4M.mjs +50 -0
- package/dist/cli/flow-weaver-serve-NVLCLSOW.mjs +192 -0
- package/dist/cli/flow-weaver-server-7IERLVXE.mjs +2925 -0
- package/dist/cli/flow-weaver-server-KWF4PXYC.mjs +19112 -0
- package/dist/cli/flow-weaver-status-75W2S3YB.mjs +138 -0
- package/dist/cli/flow-weaver-strip-AZPXUYVA.mjs +79 -0
- package/dist/cli/flow-weaver-templates-DSNMB6K7.mjs +72 -0
- package/dist/cli/flow-weaver-validate-A4UWDQN6.mjs +19 -0
- package/dist/cli/flow-weaver-validate-GRBZ5W4C.mjs +296 -0
- package/dist/cli/flow-weaver-validation-registry-BINGUNXX.mjs +9 -0
- package/dist/cli/flow-weaver-validator-TY56CI42.mjs +21 -0
- package/dist/cli/flow-weaver-watch-OPPERXL6.mjs +114 -0
- package/dist/cli/flow-weaver-workflow-executor-6AHYPXAN.mjs +26 -0
- package/dist/cli/flow-weaver.mjs +3557 -89384
- package/dist/cli/index.d.ts +5 -2
- package/dist/cli/pack-commands-needed.d.ts +12 -0
- package/dist/cli/program.d.ts +14 -0
- package/dist/cli/templates/ai/mock-provider.d.ts +1 -1
- package/dist/cli/templates/index.d.ts +1 -8
- package/dist/cli/templates/nodes/agent-router.d.ts +1 -1
- package/dist/cli/templates/nodes/aggregator.d.ts +1 -1
- package/dist/cli/templates/nodes/conversation-memory.d.ts +1 -1
- package/dist/cli/templates/nodes/http.d.ts +1 -1
- package/dist/cli/templates/nodes/human-approval.d.ts +1 -1
- package/dist/cli/templates/nodes/json-extractor.d.ts +1 -1
- package/dist/cli/templates/nodes/llm-call.d.ts +1 -1
- package/dist/cli/templates/nodes/prompt-template.d.ts +1 -1
- package/dist/cli/templates/nodes/rag-retriever.d.ts +1 -1
- package/dist/cli/templates/nodes/tool-executor.d.ts +1 -1
- package/dist/cli/templates/nodes/transformer.d.ts +1 -1
- package/dist/cli/templates/nodes/validator.d.ts +1 -1
- package/dist/cli/templates/shared/approval-types.d.ts +1 -1
- package/dist/cli/templates/shared/case.d.ts +14 -0
- package/dist/cli/templates/shared/llm-types.d.ts +4 -4
- package/dist/cli/templates/workflows/aggregator.d.ts +1 -1
- package/dist/cli/templates/workflows/ai-agent.d.ts +1 -1
- package/dist/cli/templates/workflows/ai-chat.d.ts +1 -1
- package/dist/cli/templates/workflows/ai-rag.d.ts +1 -1
- package/dist/cli/templates/workflows/ai-react.d.ts +1 -1
- package/dist/cli/templates/workflows/approval.d.ts +10 -0
- package/dist/cli/templates/workflows/conditional.d.ts +2 -2
- package/dist/cli/templates/workflows/error-handler.d.ts +2 -2
- package/dist/cli/templates/workflows/foreach.d.ts +1 -1
- package/dist/cli/templates/workflows/sequential.d.ts +1 -1
- package/dist/cli/templates/workflows/webhook.d.ts +1 -1
- package/dist/cli/utils/interactive.d.ts +6 -0
- package/dist/cli/utils/json-option.d.ts +8 -0
- package/dist/cli/utils/logger.d.ts +2 -0
- package/dist/compiler/durable-source-proof.d.ts +23 -0
- package/dist/compiler/executable-artifact.d.ts +29 -0
- package/dist/compiler/index.d.ts +4 -0
- package/dist/compiler/index.js +36 -0
- package/dist/console/app.js +106 -0
- package/dist/console/assets/synergenius.svg +18 -0
- package/dist/console/author.d.ts +32 -0
- package/dist/console/cli-catalog.d.ts +21 -0
- package/dist/console/cli-run.d.ts +35 -0
- package/dist/console/cli-run.js +46 -0
- package/dist/console/debug.d.ts +67 -0
- package/dist/console/diff-view.d.ts +96 -0
- package/dist/console/export.d.ts +36 -0
- package/dist/console/git.d.ts +27 -0
- package/dist/console/index.d.ts +4 -0
- package/dist/console/index.html +16 -0
- package/dist/console/index.js +203 -0
- package/dist/console/packs.d.ts +100 -0
- package/dist/console/request-guard.d.ts +10 -0
- package/dist/console/respond.d.ts +16 -0
- package/dist/console/router.d.ts +64 -0
- package/dist/console/routes-agents.d.ts +14 -0
- package/dist/console/routes-project.d.ts +3 -0
- package/dist/console/routes-runs.d.ts +3 -0
- package/dist/console/routes-services.d.ts +7 -0
- package/dist/console/routes-tools.d.ts +3 -0
- package/dist/console/runs.d.ts +69 -0
- package/dist/console/scan.d.ts +49 -0
- package/dist/console/schema.d.ts +74 -0
- package/dist/console/server.d.ts +34 -0
- package/dist/console/server.js +43264 -0
- package/dist/console/services.d.ts +119 -0
- package/dist/console/source.d.ts +23 -0
- package/dist/console/status.d.ts +68 -0
- package/dist/console/styles.css +1023 -0
- package/dist/console/terminals.d.ts +22 -0
- package/dist/console/workflow-view.d.ts +153 -0
- package/dist/constants.d.ts +5 -1
- package/dist/constants.js +56 -167
- package/dist/context/index.d.ts +10 -0
- package/dist/context/index.js +14 -191
- package/dist/coordinator/agent-gate.d.ts +107 -0
- package/dist/coordinator/bundle-digest.d.ts +20 -0
- package/dist/coordinator/clock-tick.d.ts +4 -0
- package/dist/coordinator/effect-receipts.d.ts +10 -0
- package/dist/coordinator/errors.d.ts +31 -0
- package/dist/coordinator/file-store.d.ts +3 -0
- package/dist/coordinator/gate-labeling.d.ts +33 -0
- package/dist/coordinator/gate-resolution.d.ts +28 -0
- package/dist/coordinator/index.d.ts +12 -0
- package/dist/coordinator/index.js +107 -0
- package/dist/coordinator/memory-store.d.ts +3 -0
- package/dist/coordinator/params.d.ts +18 -0
- package/dist/coordinator/run-annotations.d.ts +6 -0
- package/dist/coordinator/run-context.d.ts +11 -0
- package/dist/coordinator/run-ending.d.ts +5 -0
- package/dist/coordinator/run-outcome.d.ts +31 -0
- package/dist/coordinator/run-resume.d.ts +6 -0
- package/dist/coordinator/run-start.d.ts +4 -0
- package/dist/coordinator/run-store.d.ts +275 -0
- package/dist/coordinator/run-trace.d.ts +41 -0
- package/dist/coordinator/run-views.d.ts +12 -0
- package/dist/coordinator/runs-dir.d.ts +26 -0
- package/dist/coordinator/store.d.ts +67 -0
- package/dist/coordinator/time.d.ts +39 -0
- package/dist/coordinator/workflow-selection.d.ts +6 -0
- package/dist/deployment/index.d.ts +11 -16
- package/dist/deployment/index.js +541 -50
- package/dist/deployment/targets/base.d.ts +11 -13
- package/dist/deployment/targets/openapi-parts.d.ts +92 -0
- package/dist/diagram/arms.d.ts +70 -0
- package/dist/diagram/ascii-renderer.d.ts +1 -1
- package/dist/diagram/geometry.d.ts +20 -32
- package/dist/diagram/graph/bounds.d.ts +30 -0
- package/dist/diagram/graph/metrics.d.ts +21 -0
- package/dist/diagram/graph/nodes.d.ts +33 -0
- package/dist/diagram/graph/placement.d.ts +22 -0
- package/dist/diagram/graph/ports.d.ts +23 -0
- package/dist/diagram/graph/routing.d.ts +40 -0
- package/dist/diagram/graph/scopes.d.ts +30 -0
- package/dist/diagram/index.d.ts +15 -23
- package/dist/diagram/index.js +632 -111
- package/dist/diagram/labels.d.ts +12 -0
- package/dist/diagram/lanes.d.ts +93 -0
- package/dist/diagram/layout.d.ts +1 -1
- package/dist/diagram/material-symbols.d.ts +7 -0
- package/dist/diagram/orthogonal-router.d.ts +2 -3
- package/dist/diagram/process-view.d.ts +79 -0
- package/dist/diagram/spine.d.ts +25 -0
- package/dist/diagram/theme.d.ts +1 -5
- package/dist/diagram/types.d.ts +6 -20
- package/dist/diff/index.js +53 -9
- package/dist/diff/types.d.ts +1 -5
- package/dist/doc-metadata/extractors/annotations.d.ts +0 -4
- package/dist/doc-metadata/extractors/cli-commands.d.ts +2 -1
- package/dist/doc-metadata/extractors/core-metadata.d.ts +19 -4
- package/dist/doc-metadata/extractors/error-codes.d.ts +1 -1
- package/dist/doc-metadata/extractors/mcp-tools.d.ts +7 -3
- package/dist/doc-metadata/index.d.ts +1 -2
- package/dist/doc-metadata/index.js +2368 -9
- package/dist/doc-metadata/types.d.ts +7 -24
- package/dist/docs/guide.d.ts +33 -0
- package/dist/docs/index.d.ts +7 -4
- package/dist/docs/index.js +298 -298
- package/dist/docs/pack-topics.d.ts +18 -0
- package/dist/editor-completions/annotationValues.d.ts +1 -1
- package/dist/editor-completions/contextParser.d.ts +3 -2
- package/dist/editor-completions/dataTypes.d.ts +1 -1
- package/dist/editor-completions/goToDefinition.d.ts +1 -1
- package/dist/editor-completions/index.d.ts +8 -8
- package/dist/editor-completions/index.js +1244 -175
- package/dist/editor-completions/jsDocAnnotations.d.ts +1 -1
- package/dist/editor-completions/modifierCompletions.d.ts +1 -1
- package/dist/export/index.d.ts +7 -1
- package/dist/generated-branding.js +8 -21
- package/dist/generated-version.d.ts +1 -1
- package/dist/generated-version.js +7 -3
- package/dist/generator/annotation-generator.d.ts +84 -0
- package/dist/generator/async-detection.d.ts +1 -1
- package/dist/{body-generator.d.ts → generator/body-generator.d.ts} +7 -3
- package/dist/generator/code-utils.d.ts +15 -60
- package/dist/generator/connection-reads.d.ts +94 -0
- package/dist/generator/control-flow-plan.d.ts +74 -0
- package/dist/generator/control-flow.d.ts +1 -1
- package/dist/generator/exit-assembly.d.ts +11 -0
- package/dist/generator/index.d.ts +4 -5
- package/dist/generator/index.js +34 -11
- package/dist/generator/input-port-values.d.ts +22 -0
- package/dist/generator/{scope-function-generator.d.ts → node-arguments.d.ts} +76 -1
- package/dist/generator/node-invocation.d.ts +74 -0
- package/dist/{node-types-generator.d.ts → generator/node-types-generator.d.ts} +3 -2
- package/dist/generator/scope-closure.d.ts +23 -0
- package/dist/generator/scoped-child.d.ts +49 -0
- package/dist/{sugar-optimizer.d.ts → generator/sugar-optimizer.d.ts} +1 -1
- package/dist/generator/unified.d.ts +14 -2
- package/dist/generator/workflow-generator.d.ts +37 -0
- package/dist/index.d.ts +29 -26
- package/dist/index.js +1322 -92
- package/dist/jsdoc-port-sync/apply-diff.d.ts +15 -0
- package/dist/jsdoc-port-sync/callback-signature.d.ts +17 -0
- package/dist/jsdoc-port-sync/diff.d.ts +5 -7
- package/dist/jsdoc-port-sync/incomplete-lines.d.ts +41 -0
- package/dist/jsdoc-port-sync/index.d.ts +11 -11
- package/dist/jsdoc-port-sync/index.js +88 -45
- package/dist/jsdoc-port-sync/jsdoc-to-signature.d.ts +66 -0
- package/dist/jsdoc-port-sync/port-parser.d.ts +6 -24
- package/dist/jsdoc-port-sync/port-tag-placement.d.ts +55 -0
- package/dist/jsdoc-port-sync/scoped-ports.d.ts +21 -0
- package/dist/jsdoc-port-sync/signature-parser.d.ts +8 -1
- package/dist/jsdoc-port-sync/signature-to-jsdoc.d.ts +77 -0
- package/dist/jsdoc-port-sync/sync.d.ts +4 -1
- package/dist/marketplace/index.d.ts +5 -3
- package/dist/marketplace/index.js +62 -10
- package/dist/marketplace/install.d.ts +24 -0
- package/dist/marketplace/manifest.d.ts +1 -1
- package/dist/marketplace/npmrc.d.ts +24 -0
- package/dist/marketplace/registry.d.ts +46 -11
- package/dist/marketplace/types.d.ts +41 -24
- package/dist/marketplace/validator.d.ts +1 -1
- package/dist/mcp/debug-session.d.ts +2 -4
- package/dist/mcp/dist-imports.d.ts +12 -0
- package/dist/mcp/response-utils.d.ts +11 -9
- package/dist/mcp/server.d.ts +0 -1
- package/dist/mcp/tools-context.d.ts +11 -0
- package/dist/mcp/tools-diagram.d.ts +1 -2
- package/dist/mcp/tools-export.d.ts +2 -2
- package/dist/mcp/tools-marketplace.d.ts +1 -1
- package/dist/mcp/tools-run.d.ts +17 -0
- package/dist/mcp/tools-workflow.d.ts +3 -0
- package/dist/mcp/types.d.ts +4 -14
- package/dist/mcp/workflow-executor.d.ts +57 -19
- package/dist/npm-packages.d.ts +1 -1
- package/dist/npm-packages.js +10 -473
- package/dist/parser/annotation-parser.d.ts +88 -0
- package/dist/parser/annotation-suggestion.d.ts +23 -0
- package/dist/parser/durable-effect-contract.d.ts +10 -0
- package/dist/parser/expression-references.d.ts +101 -0
- package/dist/parser/external-node-types.d.ts +69 -0
- package/dist/{function-like.d.ts → parser/function-like.d.ts} +10 -3
- package/dist/parser/generated-sections.d.ts +25 -0
- package/dist/parser/import-resolution.d.ts +67 -0
- package/dist/parser/import-stub.d.ts +29 -0
- package/dist/parser/jsdoc/config-types.d.ts +209 -0
- package/dist/parser/jsdoc/graph-tags.d.ts +54 -0
- package/dist/parser/jsdoc/node-type-block.d.ts +23 -0
- package/dist/parser/jsdoc/parse-line-once.d.ts +11 -0
- package/dist/parser/jsdoc/port-tags.d.ts +42 -0
- package/dist/parser/jsdoc/runtime-tags.d.ts +65 -0
- package/dist/parser/jsdoc/signature-types.d.ts +52 -0
- package/dist/parser/jsdoc/workflow-block.d.ts +22 -0
- package/dist/parser/jsdoc-parser.d.ts +23 -0
- package/dist/parser/macro-expansion.d.ts +80 -0
- package/dist/parser/module-resolution.d.ts +38 -0
- package/dist/parser/node-inference.d.ts +39 -0
- package/dist/parser/npm-node-types.d.ts +24 -0
- package/dist/parser/pack-handlers.d.ts +12 -0
- package/dist/parser/path-data-resolution.d.ts +75 -0
- package/dist/parser/port-inference.d.ts +15 -0
- package/dist/{resolve-package-types.d.ts → parser/resolve-package-types.d.ts} +4 -0
- package/dist/parser/serialize-deploy-annotations.d.ts +19 -0
- package/dist/parser/tag-registry.d.ts +22 -0
- package/dist/parser/workflow-extraction.d.ts +39 -0
- package/dist/runtime/ExecutionContext.d.ts +87 -99
- package/dist/runtime/continuation-core.d.ts +147 -0
- package/dist/runtime/continuation.d.ts +48 -0
- package/dist/runtime/debug-controller.d.ts +7 -22
- package/dist/runtime/durable-execution.d.ts +176 -0
- package/dist/runtime/events.d.ts +16 -1
- package/dist/runtime/executable-module-contract.d.ts +16 -0
- package/dist/runtime/index.d.ts +13 -10
- package/dist/runtime/index.js +947 -9
- package/dist/runtime/strict-json.d.ts +15 -0
- package/dist/server/access.d.ts +12 -0
- package/dist/server/api.d.ts +126 -0
- package/dist/server/callback-delivery.d.ts +62 -0
- package/dist/server/callback-url.d.ts +44 -0
- package/dist/server/context.d.ts +35 -0
- package/dist/server/http-error.d.ts +10 -0
- package/dist/server/index.d.ts +7 -1
- package/dist/server/index.js +125 -6
- package/dist/server/openapi-document.d.ts +33 -0
- package/dist/server/openapi.d.ts +32 -0
- package/dist/server/respond.d.ts +35 -0
- package/dist/server/route-params.d.ts +17 -0
- package/dist/server/route-plan.d.ts +41 -0
- package/dist/server/routes-catalog.d.ts +5 -0
- package/dist/server/routes-declared.d.ts +12 -0
- package/dist/server/routes-runs.d.ts +8 -0
- package/dist/server/run-driver.d.ts +58 -0
- package/dist/server/run-view.d.ts +26 -0
- package/dist/server/transport.d.ts +35 -0
- package/dist/server/types.d.ts +143 -52
- package/dist/server/webhook-server.d.ts +12 -38
- package/dist/server/workflow-registry.d.ts +7 -4
- package/dist/service-registry.d.ts +49 -0
- package/dist/service-registry.js +123 -0
- package/dist/testing/assertions.d.ts +2 -2
- package/dist/testing/index.d.ts +14 -13
- package/dist/testing/index.js +582 -24
- package/dist/testing/mock-approval.d.ts +3 -5
- package/dist/testing/mock-llm.d.ts +2 -3
- package/dist/testing/recorder.d.ts +5 -6
- package/dist/testing/replayer.d.ts +6 -7
- package/dist/testing/run-store-check.d.ts +3 -0
- package/dist/testing/token-tracker.d.ts +2 -2
- package/dist/{type-mappings.d.ts → types/type-mappings.d.ts} +13 -1
- package/dist/utils/error-utils.d.ts +4 -2
- package/dist/utils/port-ordering.d.ts +2 -2
- package/dist/utils/port-tag-utils.d.ts +1 -1
- package/dist/validation/agent-detection.d.ts +17 -5
- package/dist/validation/agent-rules.d.ts +6 -7
- package/dist/validation/core-rules.d.ts +49 -0
- package/dist/validation/design-rules.d.ts +9 -3
- package/dist/validation/rule-registry.d.ts +3 -3
- package/dist/validation/rules/connections.d.ts +27 -0
- package/dist/validation/rules/context.d.ts +11 -0
- package/dist/validation/rules/cycles.d.ts +17 -0
- package/dist/validation/rules/data-flow.d.ts +19 -0
- package/dist/validation/rules/scope-topology.d.ts +35 -0
- package/dist/validation/rules/type-compatibility.d.ts +30 -0
- package/dist/validation/type-checker.d.ts +39 -0
- package/dist/validation/validator-helpers.d.ts +31 -0
- package/dist/validation/validator.d.ts +30 -0
- package/docs/reference/advanced-annotations.md +277 -60
- package/docs/reference/built-in-nodes.md +164 -94
- package/docs/reference/cancellation.md +44 -0
- package/docs/reference/cli-reference.md +252 -234
- package/docs/reference/compilation.md +36 -109
- package/docs/reference/concepts.md +80 -63
- package/docs/reference/console.md +169 -0
- package/docs/reference/debugging.md +26 -57
- package/docs/reference/deployment.md +217 -143
- package/docs/reference/durable-gates.md +445 -0
- package/docs/reference/error-codes.md +90 -43
- package/docs/reference/export-interface.md +91 -26
- package/docs/reference/iterative-development.md +50 -28
- package/docs/reference/jsdoc-grammar.md +66 -311
- package/docs/reference/library.md +250 -0
- package/docs/reference/marketplace.md +301 -152
- package/docs/reference/mcp-tools.md +102 -0
- package/docs/reference/node-conversion.md +84 -59
- package/docs/reference/orientation.md +68 -0
- package/docs/reference/scaffold.md +5 -4
- package/docs/reference/tutorial.md +106 -166
- package/docs/reference/visual-reference.md +1 -1
- package/package.json +85 -50
- package/dist/agent/agent-loop.js +0 -156
- package/dist/agent/cli-spawn-config.js +0 -65
- package/dist/agent/device-connection.d.ts +0 -79
- package/dist/agent/device-connection.js +0 -184
- package/dist/agent/env-allowlist.js +0 -60
- package/dist/agent/providers/anthropic.js +0 -198
- package/dist/agent/providers/claude-cli.js +0 -161
- package/dist/agent/providers/openai-compat.js +0 -205
- package/dist/agent/providers/platform.d.ts +0 -23
- package/dist/agent/providers/platform.js +0 -132
- package/dist/agent/streaming.js +0 -186
- package/dist/agent/types.js +0 -20
- package/dist/annotation-generator.d.ts +0 -50
- package/dist/annotation-generator.js +0 -743
- package/dist/api/builder.js +0 -345
- package/dist/api/command-runner.js +0 -787
- package/dist/api/compile.js +0 -148
- package/dist/api/extract-types.js +0 -57
- package/dist/api/generate-in-place.js +0 -1477
- package/dist/api/generate.js +0 -514
- package/dist/api/helpers.js +0 -285
- package/dist/api/inline-runtime.js +0 -526
- package/dist/api/manipulation/connections.js +0 -151
- package/dist/api/manipulation/index.js +0 -41
- package/dist/api/manipulation/node-types.js +0 -200
- package/dist/api/manipulation/nodes.js +0 -355
- package/dist/api/manipulation/ports.js +0 -228
- package/dist/api/manipulation/scopes.js +0 -156
- package/dist/api/manipulation/workflow.js +0 -116
- package/dist/api/modify-operation.js +0 -177
- package/dist/api/parse.js +0 -115
- package/dist/api/patterns.d.ts +0 -112
- package/dist/api/patterns.js +0 -303
- package/dist/api/query.js +0 -840
- package/dist/api/templates.js +0 -117
- package/dist/api/transform.js +0 -40
- package/dist/api/validate.js +0 -64
- package/dist/api/validation-registry.js +0 -10
- package/dist/api/workflow-file-operations.js +0 -180
- package/dist/ast/builder.js +0 -395
- package/dist/ast/serialization-node.js +0 -30
- package/dist/ast/serialization.js +0 -134
- package/dist/ast/types.js +0 -2
- package/dist/ast/workflow-utils.js +0 -114
- package/dist/body-generator.js +0 -35
- package/dist/built-in-nodes/coercion-types.js +0 -61
- package/dist/built-in-nodes/delay.js +0 -29
- package/dist/built-in-nodes/generated-registry.js +0 -299
- package/dist/built-in-nodes/invoke-workflow.js +0 -36
- package/dist/built-in-nodes/mock-types.js +0 -42
- package/dist/built-in-nodes/wait-for-agent.js +0 -31
- package/dist/built-in-nodes/wait-for-event.js +0 -25
- package/dist/chevrotain-parser/coerce-parser.js +0 -103
- package/dist/chevrotain-parser/connect-parser.js +0 -136
- package/dist/chevrotain-parser/fan-parser.js +0 -149
- package/dist/chevrotain-parser/grammar-diagrams.js +0 -273
- package/dist/chevrotain-parser/index.js +0 -31
- package/dist/chevrotain-parser/map-parser.js +0 -130
- package/dist/chevrotain-parser/node-parser.js +0 -558
- package/dist/chevrotain-parser/path-parser.js +0 -140
- package/dist/chevrotain-parser/port-parser.js +0 -519
- package/dist/chevrotain-parser/position-parser.d.ts +0 -20
- package/dist/chevrotain-parser/position-parser.js +0 -83
- package/dist/chevrotain-parser/scope-parser.js +0 -104
- package/dist/chevrotain-parser/tokens.js +0 -429
- package/dist/chevrotain-parser/trigger-cancel-parser.js +0 -291
- package/dist/cli/commands/account.d.ts +0 -4
- package/dist/cli/commands/account.js +0 -50
- package/dist/cli/commands/ai-credentials.d.ts +0 -12
- package/dist/cli/commands/ai-credentials.js +0 -95
- package/dist/cli/commands/apikey.d.ts +0 -4
- package/dist/cli/commands/apikey.js +0 -64
- package/dist/cli/commands/auth.d.ts +0 -9
- package/dist/cli/commands/auth.js +0 -255
- package/dist/cli/commands/compile.js +0 -331
- package/dist/cli/commands/connect.d.ts +0 -4
- package/dist/cli/commands/connect.js +0 -163
- package/dist/cli/commands/context.js +0 -51
- package/dist/cli/commands/create.js +0 -139
- package/dist/cli/commands/deploy.d.ts +0 -6
- package/dist/cli/commands/deploy.js +0 -74
- package/dist/cli/commands/dev.js +0 -227
- package/dist/cli/commands/diagram.js +0 -39
- package/dist/cli/commands/diff.js +0 -57
- package/dist/cli/commands/docs.js +0 -74
- package/dist/cli/commands/export.js +0 -153
- package/dist/cli/commands/grammar.js +0 -40
- package/dist/cli/commands/implement.js +0 -91
- package/dist/cli/commands/init-personas.js +0 -541
- package/dist/cli/commands/init.js +0 -797
- package/dist/cli/commands/market.js +0 -440
- package/dist/cli/commands/mcp-setup.js +0 -433
- package/dist/cli/commands/migrate.js +0 -91
- package/dist/cli/commands/modify.js +0 -58
- package/dist/cli/commands/openapi.js +0 -71
- package/dist/cli/commands/org.d.ts +0 -8
- package/dist/cli/commands/org.js +0 -136
- package/dist/cli/commands/pattern.d.ts +0 -34
- package/dist/cli/commands/pattern.js +0 -186
- package/dist/cli/commands/plugin.d.ts +0 -16
- package/dist/cli/commands/plugin.js +0 -176
- package/dist/cli/commands/run.js +0 -742
- package/dist/cli/commands/serve.js +0 -93
- package/dist/cli/commands/status.js +0 -123
- package/dist/cli/commands/strip.js +0 -61
- package/dist/cli/commands/templates.js +0 -58
- package/dist/cli/commands/validate.js +0 -267
- package/dist/cli/commands/watch.js +0 -71
- package/dist/cli/config/credentials.d.ts +0 -15
- package/dist/cli/config/credentials.js +0 -43
- package/dist/cli/config/platform-client.d.ts +0 -123
- package/dist/cli/config/platform-client.js +0 -248
- package/dist/cli/env-setup.js +0 -12
- package/dist/cli/index.js +0 -850
- package/dist/cli/pack-commands.js +0 -122
- package/dist/cli/postinstall.d.ts +0 -16
- package/dist/cli/postinstall.js +0 -119
- package/dist/cli/templates/ai/mock-provider.js +0 -64
- package/dist/cli/templates/ai/types.js +0 -5
- package/dist/cli/templates/approvals/index.d.ts +0 -15
- package/dist/cli/templates/approvals/index.js +0 -241
- package/dist/cli/templates/index.js +0 -123
- package/dist/cli/templates/nodes/agent-router.js +0 -114
- package/dist/cli/templates/nodes/aggregator.js +0 -63
- package/dist/cli/templates/nodes/conversation-memory.js +0 -85
- package/dist/cli/templates/nodes/http.js +0 -80
- package/dist/cli/templates/nodes/human-approval.js +0 -109
- package/dist/cli/templates/nodes/json-extractor.js +0 -119
- package/dist/cli/templates/nodes/llm-call.js +0 -106
- package/dist/cli/templates/nodes/prompt-template.js +0 -52
- package/dist/cli/templates/nodes/rag-retriever.js +0 -128
- package/dist/cli/templates/nodes/tool-executor.js +0 -108
- package/dist/cli/templates/nodes/transformer.js +0 -68
- package/dist/cli/templates/nodes/validator.js +0 -62
- package/dist/cli/templates/pack-loader.js +0 -58
- package/dist/cli/templates/providers/index.js +0 -239
- package/dist/cli/templates/shared/approval-types.js +0 -31
- package/dist/cli/templates/shared/llm-types.js +0 -109
- package/dist/cli/templates/workflows/aggregator.js +0 -101
- package/dist/cli/templates/workflows/ai-agent.js +0 -326
- package/dist/cli/templates/workflows/ai-chat.js +0 -167
- package/dist/cli/templates/workflows/ai-rag.js +0 -184
- package/dist/cli/templates/workflows/ai-react.js +0 -293
- package/dist/cli/templates/workflows/conditional.js +0 -139
- package/dist/cli/templates/workflows/error-handler.js +0 -145
- package/dist/cli/templates/workflows/foreach.js +0 -140
- package/dist/cli/templates/workflows/sequential.js +0 -200
- package/dist/cli/templates/workflows/webhook.js +0 -158
- package/dist/cli/utils/cli-helpers.d.ts +0 -44
- package/dist/cli/utils/cli-helpers.js +0 -99
- package/dist/cli/utils/logger.js +0 -126
- package/dist/cli/utils/parse-int-strict.js +0 -17
- package/dist/cli/utils/safe-write.js +0 -54
- package/dist/deployment/config/defaults.d.ts +0 -29
- package/dist/deployment/config/defaults.js +0 -98
- package/dist/deployment/config/loader.d.ts +0 -24
- package/dist/deployment/config/loader.js +0 -237
- package/dist/deployment/config/types.d.ts +0 -117
- package/dist/deployment/config/types.js +0 -5
- package/dist/deployment/core/adapters.d.ts +0 -66
- package/dist/deployment/core/adapters.js +0 -156
- package/dist/deployment/core/executor.d.ts +0 -62
- package/dist/deployment/core/executor.js +0 -197
- package/dist/deployment/core/formatters.d.ts +0 -42
- package/dist/deployment/core/formatters.js +0 -146
- package/dist/deployment/openapi/generator.d.ts +0 -146
- package/dist/deployment/openapi/generator.js +0 -347
- package/dist/deployment/openapi/schema-converter.d.ts +0 -49
- package/dist/deployment/openapi/schema-converter.js +0 -192
- package/dist/deployment/targets/base.js +0 -855
- package/dist/deployment/types.d.ts +0 -140
- package/dist/deployment/types.js +0 -8
- package/dist/diagram/ascii-renderer.js +0 -528
- package/dist/diagram/geometry.js +0 -1226
- package/dist/diagram/html-viewer.d.ts +0 -21
- package/dist/diagram/html-viewer.js +0 -1745
- package/dist/diagram/layout.js +0 -143
- package/dist/diagram/orthogonal-router.js +0 -458
- package/dist/diagram/renderer.d.ts +0 -3
- package/dist/diagram/renderer.js +0 -280
- package/dist/diagram/theme.js +0 -282
- package/dist/diagram/types.js +0 -2
- package/dist/diff/WorkflowDiffer.js +0 -429
- package/dist/diff/formatDiff.js +0 -239
- package/dist/diff/impact.js +0 -119
- package/dist/diff/types.js +0 -35
- package/dist/doc-metadata/extractors/annotations.js +0 -638
- package/dist/doc-metadata/extractors/cli-commands.js +0 -326
- package/dist/doc-metadata/extractors/core-metadata.js +0 -61
- package/dist/doc-metadata/extractors/error-codes.js +0 -372
- package/dist/doc-metadata/extractors/grammar-rules.js +0 -51
- package/dist/doc-metadata/extractors/mcp-tools.js +0 -705
- package/dist/doc-metadata/extractors/plugin-api.d.ts +0 -19
- package/dist/doc-metadata/extractors/plugin-api.js +0 -279
- package/dist/doc-metadata/types.js +0 -5
- package/dist/editor-completions/annotationValues.js +0 -146
- package/dist/editor-completions/contextParser.js +0 -410
- package/dist/editor-completions/dataTypes.js +0 -95
- package/dist/editor-completions/goToDefinition.js +0 -112
- package/dist/editor-completions/jsDocAnnotations.js +0 -359
- package/dist/editor-completions/modifierCompletions.js +0 -197
- package/dist/editor-completions/types.js +0 -8
- package/dist/export/index.js +0 -212
- package/dist/extensions/index.d.ts +0 -16
- package/dist/extensions/index.js +0 -17
- package/dist/friendly-errors.js +0 -761
- package/dist/function-like.js +0 -84
- package/dist/generator/async-detection.js +0 -56
- package/dist/generator/code-utils.js +0 -551
- package/dist/generator/compile-target-registry.d.ts +0 -20
- package/dist/generator/compile-target-registry.js +0 -20
- package/dist/generator/control-flow.js +0 -358
- package/dist/generator/dev-mode-registry.d.ts +0 -27
- package/dist/generator/dev-mode-registry.js +0 -20
- package/dist/generator/scope-function-generator.js +0 -397
- package/dist/generator/unified.js +0 -1831
- package/dist/generator.d.ts +0 -54
- package/dist/generator.js +0 -101
- package/dist/jsdoc-parser.d.ts +0 -377
- package/dist/jsdoc-parser.js +0 -1189
- package/dist/jsdoc-port-sync/constants.js +0 -103
- package/dist/jsdoc-port-sync/diff.js +0 -319
- package/dist/jsdoc-port-sync/port-parser.js +0 -579
- package/dist/jsdoc-port-sync/rename.js +0 -256
- package/dist/jsdoc-port-sync/signature-parser.js +0 -559
- package/dist/jsdoc-port-sync/sync.js +0 -653
- package/dist/marketplace/manifest.js +0 -194
- package/dist/marketplace/registry.js +0 -198
- package/dist/marketplace/types.js +0 -9
- package/dist/marketplace/validator.js +0 -150
- package/dist/mcp/agent-channel.d.ts +0 -35
- package/dist/mcp/agent-channel.js +0 -61
- package/dist/mcp/auto-registration.d.ts +0 -3
- package/dist/mcp/auto-registration.js +0 -62
- package/dist/mcp/debug-session.js +0 -25
- package/dist/mcp/index.d.ts +0 -11
- package/dist/mcp/index.js +0 -10
- package/dist/mcp/pack-tools.js +0 -59
- package/dist/mcp/prompts.js +0 -68
- package/dist/mcp/response-utils.js +0 -97
- package/dist/mcp/run-registry.d.ts +0 -29
- package/dist/mcp/run-registry.js +0 -24
- package/dist/mcp/server.js +0 -63
- package/dist/mcp/tools-context.js +0 -51
- package/dist/mcp/tools-debug.js +0 -451
- package/dist/mcp/tools-diagram.js +0 -97
- package/dist/mcp/tools-docs.js +0 -62
- package/dist/mcp/tools-export.js +0 -222
- package/dist/mcp/tools-marketplace.js +0 -132
- package/dist/mcp/tools-model.d.ts +0 -3
- package/dist/mcp/tools-model.js +0 -279
- package/dist/mcp/tools-pattern.d.ts +0 -3
- package/dist/mcp/tools-pattern.js +0 -604
- package/dist/mcp/tools-query.js +0 -377
- package/dist/mcp/tools-resources.js +0 -41
- package/dist/mcp/tools-template.js +0 -119
- package/dist/mcp/tools-workflow-run.d.ts +0 -40
- package/dist/mcp/tools-workflow-run.js +0 -150
- package/dist/mcp/types.js +0 -2
- package/dist/mcp/workflow-executor.js +0 -242
- package/dist/migration/registry.js +0 -29
- package/dist/node-types-generator.js +0 -139
- package/dist/parser/tag-registry.js +0 -57
- package/dist/parser.d.ts +0 -232
- package/dist/parser.js +0 -2500
- package/dist/plugin/PluginPanel.d.ts +0 -12
- package/dist/plugin/PluginPanel.js +0 -5
- package/dist/plugin/index.d.ts +0 -13
- package/dist/plugin/index.js +0 -14
- package/dist/plugin/types.d.ts +0 -75
- package/dist/plugin/types.js +0 -8
- package/dist/resolve-package-types.js +0 -123
- package/dist/runtime/CancellationError.js +0 -20
- package/dist/runtime/ExecutionContext.js +0 -280
- package/dist/runtime/builtin-functions.js +0 -549
- package/dist/runtime/checkpoint.d.ts +0 -84
- package/dist/runtime/checkpoint.js +0 -225
- package/dist/runtime/debug-controller.js +0 -247
- package/dist/runtime/events.js +0 -2
- package/dist/runtime/function-registry.js +0 -66
- package/dist/runtime/parameter-resolver.js +0 -113
- package/dist/server/types.js +0 -5
- package/dist/server/webhook-server.js +0 -269
- package/dist/server/workflow-registry.js +0 -202
- package/dist/shared-project.js +0 -28
- package/dist/sugar-optimizer.js +0 -498
- package/dist/testing/assertions.js +0 -127
- package/dist/testing/mock-approval.js +0 -98
- package/dist/testing/mock-llm.js +0 -119
- package/dist/testing/recorder.js +0 -70
- package/dist/testing/replayer.js +0 -143
- package/dist/testing/token-tracker.js +0 -94
- package/dist/type-checker.d.ts +0 -42
- package/dist/type-checker.js +0 -190
- package/dist/type-mappings.js +0 -131
- package/dist/types/branded-ports.d.ts +0 -151
- package/dist/types/branded-ports.js +0 -121
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.js +0 -5
- package/dist/types.d.ts +0 -139
- package/dist/types.js +0 -15
- package/dist/utils/error-utils.js +0 -27
- package/dist/utils/lru-cache.js +0 -40
- package/dist/utils/port-ordering.js +0 -81
- package/dist/utils/port-tag-utils.js +0 -41
- package/dist/utils/string-distance.js +0 -56
- package/dist/validation/agent-detection.js +0 -115
- package/dist/validation/agent-rules.js +0 -262
- package/dist/validation/design-rules.js +0 -377
- package/dist/validation/rule-registry.js +0 -37
- package/dist/validator.d.ts +0 -113
- package/dist/validator.js +0 -1631
- package/docs/reference/patterns.md +0 -159
- package/scripts/postinstall.cjs +0 -86
- /package/dist/{shared-project.d.ts → parser/shared-project.d.ts} +0 -0
- /package/dist/{friendly-errors.d.ts → validation/friendly-errors.d.ts} +0 -0
|
@@ -1,9 +1,2368 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import {
|
|
2
|
+
nodeTemplates,
|
|
3
|
+
workflowTemplates
|
|
4
|
+
} from "../chunks/chunk-NDSTGMKR.js";
|
|
5
|
+
import {
|
|
6
|
+
getAllGrammars,
|
|
7
|
+
serializedToEBNF
|
|
8
|
+
} from "../chunks/chunk-KMWCCOUJ.js";
|
|
9
|
+
import "../chunks/chunk-QYPORSLO.js";
|
|
10
|
+
import {
|
|
11
|
+
BRANCHING_STRATEGIES,
|
|
12
|
+
EXECUTION_STRATEGIES,
|
|
13
|
+
RESERVED_NODE_NAMES,
|
|
14
|
+
RESERVED_PORT_NAMES,
|
|
15
|
+
SCOPED_PORT_NAMES,
|
|
16
|
+
VALID_NODE_COLORS
|
|
17
|
+
} from "../chunks/chunk-R4QGNK34.js";
|
|
18
|
+
import "../chunks/chunk-SEWDMQ6Q.js";
|
|
19
|
+
|
|
20
|
+
// src/doc-metadata/extractors/mcp-tools.ts
|
|
21
|
+
var MCP_TOOLS = [
|
|
22
|
+
{
|
|
23
|
+
name: "fw_describe",
|
|
24
|
+
description: "Describe a workflow in LLM-friendly format (nodes, connections, graph, validation).",
|
|
25
|
+
category: "query",
|
|
26
|
+
params: [
|
|
27
|
+
{
|
|
28
|
+
name: "filePath",
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Path to the workflow .ts file",
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "format",
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Output format (default: json). ascii/ascii-compact produce terminal-readable diagrams.",
|
|
37
|
+
required: false,
|
|
38
|
+
enum: ["json", "text", "mermaid", "paths", "ascii", "ascii-compact"]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "node",
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Focus on a specific node ID",
|
|
44
|
+
required: false
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "workflowName",
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Specific workflow if file has multiple",
|
|
50
|
+
required: false
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "fw_validate",
|
|
56
|
+
description: "Validate a workflow file and return errors/warnings.",
|
|
57
|
+
category: "query",
|
|
58
|
+
params: [
|
|
59
|
+
{
|
|
60
|
+
name: "filePath",
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "Path to the workflow file",
|
|
63
|
+
required: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "workflowName",
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "Specific workflow name (default: every workflow in the file)",
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "draft",
|
|
73
|
+
type: "boolean",
|
|
74
|
+
description: "Draft mode - suppresses STUB_NODE errors for unimplemented nodes (default: false)",
|
|
75
|
+
required: false
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "fw_compile",
|
|
81
|
+
description: "Compile a workflow to executable code. Only regenerates code inside @flow-weaver-runtime and @flow-weaver-body marker sections, so user code outside markers is preserved. Set production: true to strip debug instrumentation.",
|
|
82
|
+
category: "query",
|
|
83
|
+
params: [
|
|
84
|
+
{
|
|
85
|
+
name: "filePath",
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "Path to the workflow file",
|
|
88
|
+
required: true
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "write",
|
|
92
|
+
type: "boolean",
|
|
93
|
+
description: "Whether to write the output file (default: true)",
|
|
94
|
+
required: false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "production",
|
|
98
|
+
type: "boolean",
|
|
99
|
+
description: "Production mode, meaning no debug events (default: false)",
|
|
100
|
+
required: false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "workflowName",
|
|
104
|
+
type: "string",
|
|
105
|
+
description: "Specific workflow name (default: every workflow in the file)",
|
|
106
|
+
required: false
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "draft",
|
|
110
|
+
type: "boolean",
|
|
111
|
+
description: "Draft mode - suppresses STUB_NODE validation errors so partially implemented workflows can compile (default: false)",
|
|
112
|
+
required: false
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "fw_diff",
|
|
118
|
+
description: "Semantic diff between two workflow files: node type changes, instance changes, connection changes, breaking changes.",
|
|
119
|
+
category: "query",
|
|
120
|
+
params: [
|
|
121
|
+
{
|
|
122
|
+
name: "file1",
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Path to first workflow file",
|
|
125
|
+
required: true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "file2",
|
|
129
|
+
type: "string",
|
|
130
|
+
description: "Path to second workflow file",
|
|
131
|
+
required: true
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "format",
|
|
135
|
+
type: "string",
|
|
136
|
+
description: "Output format (default: text)",
|
|
137
|
+
required: false,
|
|
138
|
+
enum: ["text", "json", "compact"]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "workflowName",
|
|
142
|
+
type: "string",
|
|
143
|
+
description: "Specific workflow name",
|
|
144
|
+
required: false
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "fw_query",
|
|
150
|
+
description: `Query workflow structure. Query types: - nodes: All node instances [{id, nodeType, parent}] - connections: All connections [{from, to}] in "node.port" format. Optional: nodeId to filter. - deps: Direct upstream dependencies [nodeId[]]. Requires: nodeId - dependents: Direct downstream dependents [nodeId[]]. Requires: nodeId - data-deps: Data-only upstream dependencies (excludes control flow). Requires: nodeId - execution-order: Topological sort of main-flow nodes. Scoped nodes are listed separately. - isolated: Nodes with no connections [nodeId[]] - dead-ends: Nodes that don't reach Exit [nodeId[]] - disconnected-outputs: Output ports not connected to anything [{nodeId, ports[]}] - node-types: All node type definitions [{name, functionName, inputs[], outputs[]}]`,
|
|
151
|
+
category: "query",
|
|
152
|
+
params: [
|
|
153
|
+
{
|
|
154
|
+
name: "filePath",
|
|
155
|
+
type: "string",
|
|
156
|
+
description: "Path to the workflow file",
|
|
157
|
+
required: true
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "query",
|
|
161
|
+
type: "string",
|
|
162
|
+
description: "Query type",
|
|
163
|
+
required: true,
|
|
164
|
+
enum: ["nodes", "connections", "deps", "dependents", "data-deps", "execution-order", "isolated", "dead-ends", "disconnected-outputs", "node-types"]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "nodeId",
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Required for deps/dependents. Optional filter for connections.",
|
|
170
|
+
required: false
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: "workflowName",
|
|
174
|
+
type: "string",
|
|
175
|
+
description: "Specific workflow name",
|
|
176
|
+
required: false
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "fw_doctor",
|
|
182
|
+
description: "Check project environment and configuration for flow-weaver compatibility.",
|
|
183
|
+
category: "query",
|
|
184
|
+
params: [
|
|
185
|
+
{
|
|
186
|
+
name: "directory",
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "Directory to check (default: cwd)",
|
|
189
|
+
required: false
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "fw_market_search",
|
|
195
|
+
description: "Search npm for Flow Weaver marketplace packages (node types, workflows, patterns). Returns package name, version, and description.",
|
|
196
|
+
category: "query",
|
|
197
|
+
params: [
|
|
198
|
+
{
|
|
199
|
+
name: "query",
|
|
200
|
+
type: "string",
|
|
201
|
+
description: "Search query text (optional, omit to browse all)",
|
|
202
|
+
required: false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "limit",
|
|
206
|
+
type: "number",
|
|
207
|
+
description: "Maximum number of results (default: 20)",
|
|
208
|
+
required: false
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "registryUrl",
|
|
212
|
+
type: "string",
|
|
213
|
+
description: "Custom registry search URL for private registries (default: public npm)",
|
|
214
|
+
required: false
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "fw_market_list",
|
|
220
|
+
description: "List installed Flow Weaver marketplace packages in the current project. Shows available node types, workflows, and patterns from each package.",
|
|
221
|
+
category: "query",
|
|
222
|
+
params: []
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "fw_diagram",
|
|
226
|
+
description: "Generate a diagram of a workflow. Formats: svg draws the spine (steps in run order, control flow as lanes: failure arms, loop bodies, pulled steps) as a vector image. ascii/ascii-compact/text produce plain text readable in terminal. Provide either filePath (workflow .ts file) or source (inline code).",
|
|
227
|
+
category: "query",
|
|
228
|
+
params: [
|
|
229
|
+
{
|
|
230
|
+
name: "filePath",
|
|
231
|
+
type: "string",
|
|
232
|
+
description: "Path to the workflow .ts file (required if source is not provided)",
|
|
233
|
+
required: false
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "source",
|
|
237
|
+
type: "string",
|
|
238
|
+
description: "Inline workflow source code (required if filePath is not provided)",
|
|
239
|
+
required: false
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "outputPath",
|
|
243
|
+
type: "string",
|
|
244
|
+
description: "Output file path. If omitted, returns content as text.",
|
|
245
|
+
required: false
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "workflowName",
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "Specific workflow name if file has multiple",
|
|
251
|
+
required: false
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: "theme",
|
|
255
|
+
type: "string",
|
|
256
|
+
description: "Color theme (default: dark)",
|
|
257
|
+
required: false,
|
|
258
|
+
enum: ["dark", "light"]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: "format",
|
|
262
|
+
type: "string",
|
|
263
|
+
description: "Output format: svg (the default, drawing the spine as a vector image), ascii (port-level detail), ascii-compact (compact boxes), text (structured list)",
|
|
264
|
+
required: false,
|
|
265
|
+
enum: ["svg", "ascii", "ascii-compact", "text"]
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: "fw_docs",
|
|
271
|
+
description: 'Browse Flow Weaver documentation and reference guides. Use action="list" to see topics, action="read" to read a topic, action="search" to search across all docs.',
|
|
272
|
+
category: "query",
|
|
273
|
+
params: [
|
|
274
|
+
{
|
|
275
|
+
name: "action",
|
|
276
|
+
type: "string",
|
|
277
|
+
description: "What to do: list topics, read a topic, or search",
|
|
278
|
+
required: true,
|
|
279
|
+
enum: ["list", "read", "search"]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "topic",
|
|
283
|
+
type: "string",
|
|
284
|
+
description: 'Topic slug to read (for action="read")',
|
|
285
|
+
required: false
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: "query",
|
|
289
|
+
type: "string",
|
|
290
|
+
description: 'Search query (for action="search")',
|
|
291
|
+
required: false
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "compact",
|
|
295
|
+
type: "boolean",
|
|
296
|
+
description: "Return compact LLM-friendly version (default: false)",
|
|
297
|
+
required: false
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: "limit",
|
|
301
|
+
type: "number",
|
|
302
|
+
description: 'Number of search hits to return (for action="search")',
|
|
303
|
+
required: false
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: "fw_context",
|
|
309
|
+
description: 'Flow Weaver orientation as markdown: the model, the tool loop, which topic answers which task, and every other topic with its size. preset="core" (default) is that map; "authoring", "ops" and "full" bundle whole references.',
|
|
310
|
+
category: "query",
|
|
311
|
+
params: [
|
|
312
|
+
{
|
|
313
|
+
name: "preset",
|
|
314
|
+
type: "string",
|
|
315
|
+
description: "Topic preset",
|
|
316
|
+
required: false,
|
|
317
|
+
enum: ["core", "authoring", "full", "ops"]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: "profile",
|
|
321
|
+
type: "string",
|
|
322
|
+
description: "standalone = full self-contained dump, assistant = assumes MCP tools available",
|
|
323
|
+
required: false,
|
|
324
|
+
enum: ["standalone", "assistant"]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: "topics",
|
|
328
|
+
type: "string",
|
|
329
|
+
description: "Comma-separated topic slugs (overrides preset)",
|
|
330
|
+
required: false
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: "addTopics",
|
|
334
|
+
type: "string",
|
|
335
|
+
description: "Comma-separated slugs to add to preset",
|
|
336
|
+
required: false
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: "includeGrammar",
|
|
340
|
+
type: "boolean",
|
|
341
|
+
description: "Append the generated EBNF grammar (~3 KB), off by default",
|
|
342
|
+
required: false
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: "fw_list_resources",
|
|
348
|
+
description: "List available icons, colors, and annotation tags for use in workflow definitions.",
|
|
349
|
+
category: "query",
|
|
350
|
+
params: [
|
|
351
|
+
{
|
|
352
|
+
name: "type",
|
|
353
|
+
type: "string",
|
|
354
|
+
description: "Resource type to list (default: all)",
|
|
355
|
+
required: false,
|
|
356
|
+
enum: ["icons", "colors", "tags", "all"]
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "fw_modify",
|
|
362
|
+
description: "Modify a workflow file: add/remove/rename nodes, add/remove connections, set labels. Parses the file, applies the mutation, and regenerates annotations in-place. Returns auto-validation results and a text description of the updated workflow.",
|
|
363
|
+
category: "modify",
|
|
364
|
+
params: [
|
|
365
|
+
{
|
|
366
|
+
name: "filePath",
|
|
367
|
+
type: "string",
|
|
368
|
+
description: "Path to the workflow file",
|
|
369
|
+
required: true
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: "workflowName",
|
|
373
|
+
type: "string",
|
|
374
|
+
description: "Specific workflow if file has multiple",
|
|
375
|
+
required: false
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: "operation",
|
|
379
|
+
type: "string",
|
|
380
|
+
description: "The mutation to perform",
|
|
381
|
+
required: true,
|
|
382
|
+
enum: ["addNode", "removeNode", "renameNode", "addConnection", "removeConnection", "setNodeLabel"]
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: "params",
|
|
386
|
+
type: "object",
|
|
387
|
+
description: 'Operation-specific parameters. addNode: {nodeId, nodeType}. removeNode: {nodeId}. renameNode: {oldId, newId}. addConnection: {from, to} ("node.port" format). removeConnection: {from, to} ("node.port" format). setNodeLabel: {nodeId, label}.',
|
|
388
|
+
required: true
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: "preview",
|
|
392
|
+
type: "boolean",
|
|
393
|
+
description: "Preview without writing (default: false)",
|
|
394
|
+
required: false
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "fw_modify_batch",
|
|
400
|
+
description: "Apply multiple modify operations in a single parse/write/validate cycle. More efficient than calling fw_modify multiple times.",
|
|
401
|
+
category: "modify",
|
|
402
|
+
params: [
|
|
403
|
+
{
|
|
404
|
+
name: "filePath",
|
|
405
|
+
type: "string",
|
|
406
|
+
description: "Path to the workflow file",
|
|
407
|
+
required: true
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "workflowName",
|
|
411
|
+
type: "string",
|
|
412
|
+
description: "Specific workflow if file has multiple",
|
|
413
|
+
required: false
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
name: "operations",
|
|
417
|
+
type: "array",
|
|
418
|
+
description: "Array of operations to apply sequentially",
|
|
419
|
+
required: true
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
name: "preview",
|
|
423
|
+
type: "boolean",
|
|
424
|
+
description: "Preview without writing (default: false)",
|
|
425
|
+
required: false
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "fw_migrate",
|
|
431
|
+
description: "Migrate workflow files to current syntax via parse \u2192 regenerate round-trip. The parser adds defaults for missing fields, edge-case migrations transform the AST, and generateInPlace writes current syntax back.",
|
|
432
|
+
category: "modify",
|
|
433
|
+
params: [
|
|
434
|
+
{
|
|
435
|
+
name: "glob",
|
|
436
|
+
type: "string",
|
|
437
|
+
description: 'Glob pattern for workflow files to migrate (e.g., "src/**/*.ts")',
|
|
438
|
+
required: true
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
name: "dryRun",
|
|
442
|
+
type: "boolean",
|
|
443
|
+
description: "Preview changes without writing files (default: false)",
|
|
444
|
+
required: false
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
name: "fw_market_install",
|
|
450
|
+
description: "Install a Flow Weaver marketplace package via npm. After installation, the package's node types, workflows, and patterns become available for use.",
|
|
451
|
+
category: "modify",
|
|
452
|
+
params: [
|
|
453
|
+
{
|
|
454
|
+
name: "package",
|
|
455
|
+
type: "string",
|
|
456
|
+
description: 'Package name or specifier (e.g., "flow-weaver-pack-openai" or "flow-weaver-pack-openai@1.0.0")',
|
|
457
|
+
required: true
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
name: "fw_list_templates",
|
|
463
|
+
description: "List available scaffold templates for workflows and nodes.",
|
|
464
|
+
category: "template",
|
|
465
|
+
params: [
|
|
466
|
+
{
|
|
467
|
+
name: "type",
|
|
468
|
+
type: "string",
|
|
469
|
+
description: "Filter template type (default: all)",
|
|
470
|
+
required: false,
|
|
471
|
+
enum: ["workflow", "node", "all"]
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
name: "fw_scaffold",
|
|
477
|
+
description: "Create a workflow or node from a template.",
|
|
478
|
+
category: "template",
|
|
479
|
+
params: [
|
|
480
|
+
{
|
|
481
|
+
name: "template",
|
|
482
|
+
type: "string",
|
|
483
|
+
description: 'Template name (e.g. "sequential", "validator", "ai-agent"). An existing filePath gets the code appended',
|
|
484
|
+
required: true
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
name: "filePath",
|
|
488
|
+
type: "string",
|
|
489
|
+
description: "Output file path",
|
|
490
|
+
required: true
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: "name",
|
|
494
|
+
type: "string",
|
|
495
|
+
description: "Workflow/node function name",
|
|
496
|
+
required: false
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: "preview",
|
|
500
|
+
type: "boolean",
|
|
501
|
+
description: "Preview only, returning generated code without writing (default: false)",
|
|
502
|
+
required: false
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: "config",
|
|
506
|
+
type: "object",
|
|
507
|
+
description: 'Template configuration (e.g. { nodes: ["fetch", "parse"], input: "rawData" })',
|
|
508
|
+
required: false
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: "fw_find_workflows",
|
|
514
|
+
description: "Scan a directory for workflow files containing @flowWeaver workflow annotations. Returns file paths and workflow metadata.",
|
|
515
|
+
category: "query",
|
|
516
|
+
params: [
|
|
517
|
+
{
|
|
518
|
+
name: "directory",
|
|
519
|
+
type: "string",
|
|
520
|
+
description: "Directory to search for workflow files",
|
|
521
|
+
required: true
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
name: "pattern",
|
|
525
|
+
type: "string",
|
|
526
|
+
description: "Glob pattern (default: **/*.ts)",
|
|
527
|
+
required: false
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
name: "fw_export",
|
|
533
|
+
description: "Export a workflow to a target an installed pack provides: handler code, the target's config files and deploy instructions. Without a target pack installed there is nothing to export to.",
|
|
534
|
+
category: "execution",
|
|
535
|
+
params: [
|
|
536
|
+
{
|
|
537
|
+
name: "filePath",
|
|
538
|
+
type: "string",
|
|
539
|
+
description: "Path to the workflow .ts file",
|
|
540
|
+
required: true
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
name: "target",
|
|
544
|
+
type: "string",
|
|
545
|
+
description: "Deployment target name. Targets come from installed packs. An unknown name returns INVALID_TARGET listing the installed ones.",
|
|
546
|
+
required: true
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
name: "outputDir",
|
|
550
|
+
type: "string",
|
|
551
|
+
description: "Output directory for generated files (default: ./dist relative to workflow)",
|
|
552
|
+
required: false
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
name: "serviceName",
|
|
556
|
+
type: "string",
|
|
557
|
+
description: "Service name (default: derived from filename)",
|
|
558
|
+
required: false
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: "workflows",
|
|
562
|
+
type: "array",
|
|
563
|
+
description: "Specific workflow function names to include (default: all)",
|
|
564
|
+
required: false
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: "nodeTypes",
|
|
568
|
+
type: "array",
|
|
569
|
+
description: "Specific node type names to include",
|
|
570
|
+
required: false
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
name: "includeDocs",
|
|
574
|
+
type: "boolean",
|
|
575
|
+
description: "Include OpenAPI/Swagger routes (default: false, as fw export --docs)",
|
|
576
|
+
required: false
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
name: "production",
|
|
580
|
+
type: "boolean",
|
|
581
|
+
description: "Production code without debug events (default: false, as fw export --production)",
|
|
582
|
+
required: false
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
name: "preview",
|
|
586
|
+
type: "boolean",
|
|
587
|
+
description: "Preview without writing files to disk (default: false)",
|
|
588
|
+
required: false
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: "durableSteps",
|
|
592
|
+
type: "boolean",
|
|
593
|
+
description: "Use deep generator with per-node durable steps",
|
|
594
|
+
required: false
|
|
595
|
+
}
|
|
596
|
+
]
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "fw_run",
|
|
600
|
+
description: "Run a workflow. Returns the result, or pauses at the first gate and returns {runId, gate}. Continue with fw_resume.",
|
|
601
|
+
category: "execution",
|
|
602
|
+
params: [
|
|
603
|
+
{
|
|
604
|
+
name: "filePath",
|
|
605
|
+
type: "string",
|
|
606
|
+
description: "Workflow .ts file",
|
|
607
|
+
required: true
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: "workflowName",
|
|
611
|
+
type: "string",
|
|
612
|
+
description: "Export name if the file has several",
|
|
613
|
+
required: false
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
name: "params",
|
|
617
|
+
type: "object",
|
|
618
|
+
description: "Workflow input parameters",
|
|
619
|
+
required: false
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: "fw_resume",
|
|
625
|
+
description: "Continue a paused run. Give exactly one of answer (the gate's result) or reject (a reason).",
|
|
626
|
+
category: "execution",
|
|
627
|
+
params: [
|
|
628
|
+
{
|
|
629
|
+
name: "runId",
|
|
630
|
+
type: "string",
|
|
631
|
+
description: "Run id returned by fw_run",
|
|
632
|
+
required: true
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
name: "answer",
|
|
636
|
+
type: "object",
|
|
637
|
+
description: "For a single-output gate, the value. For multi-output, an object with every output (any JSON value)",
|
|
638
|
+
required: false
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
name: "reject",
|
|
642
|
+
type: "string",
|
|
643
|
+
description: "Fail the gate with this reason",
|
|
644
|
+
required: false
|
|
645
|
+
}
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
name: "fw_runs",
|
|
650
|
+
description: "List runs, or inspect one. With runId returns the full gate so you can re-read a pause without resuming.",
|
|
651
|
+
category: "execution",
|
|
652
|
+
params: [
|
|
653
|
+
{
|
|
654
|
+
name: "runId",
|
|
655
|
+
type: "string",
|
|
656
|
+
description: "Inspect one run in full",
|
|
657
|
+
required: false
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
name: "filePath",
|
|
661
|
+
type: "string",
|
|
662
|
+
description: "Only runs of this workflow file",
|
|
663
|
+
required: false
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
name: "status",
|
|
667
|
+
type: "string",
|
|
668
|
+
description: "Only runs in this state. waiting is the one that needs you",
|
|
669
|
+
required: false,
|
|
670
|
+
enum: ["waiting", "completed", "failed", "cancelled"]
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: "limit",
|
|
674
|
+
type: "number",
|
|
675
|
+
description: "How many, newest first. Default 20, at most 200",
|
|
676
|
+
required: false
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: "fw_debug_workflow",
|
|
682
|
+
description: "Start a step-through debug session for a workflow. Compiles and executes the workflow, pausing before the first node. Returns a debugId and the initial pause state.",
|
|
683
|
+
category: "debug",
|
|
684
|
+
params: [
|
|
685
|
+
{
|
|
686
|
+
name: "filePath",
|
|
687
|
+
type: "string",
|
|
688
|
+
description: "Path to the workflow .ts file",
|
|
689
|
+
required: true
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: "workflowName",
|
|
693
|
+
type: "string",
|
|
694
|
+
description: "Specific workflow function name (for multi-workflow files)",
|
|
695
|
+
required: false
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
name: "params",
|
|
699
|
+
type: "object",
|
|
700
|
+
description: "Parameters to pass to the workflow",
|
|
701
|
+
required: false
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
name: "breakpoints",
|
|
705
|
+
type: "array",
|
|
706
|
+
description: "Node IDs to set as initial breakpoints",
|
|
707
|
+
required: false
|
|
708
|
+
}
|
|
709
|
+
]
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: "fw_debug_step",
|
|
713
|
+
description: "Step to the next node in a debug session. Executes one node then pauses again.",
|
|
714
|
+
category: "debug",
|
|
715
|
+
params: [
|
|
716
|
+
{
|
|
717
|
+
name: "debugId",
|
|
718
|
+
type: "string",
|
|
719
|
+
description: "The debug session ID from fw_debug_workflow",
|
|
720
|
+
required: true
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: "fw_debug_continue",
|
|
726
|
+
description: "Continue execution from the current pause point. Runs to completion, or stops at the next breakpoint if toBreakpoint is true.",
|
|
727
|
+
category: "debug",
|
|
728
|
+
params: [
|
|
729
|
+
{
|
|
730
|
+
name: "debugId",
|
|
731
|
+
type: "string",
|
|
732
|
+
description: "The debug session ID",
|
|
733
|
+
required: true
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
name: "toBreakpoint",
|
|
737
|
+
type: "boolean",
|
|
738
|
+
description: "If true, pause at the next breakpoint instead of running to completion",
|
|
739
|
+
required: false
|
|
740
|
+
}
|
|
741
|
+
]
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
name: "fw_debug_inspect",
|
|
745
|
+
description: "Inspect the current debug state without advancing execution. Returns all variables, or filter to a specific node.",
|
|
746
|
+
category: "debug",
|
|
747
|
+
params: [
|
|
748
|
+
{
|
|
749
|
+
name: "debugId",
|
|
750
|
+
type: "string",
|
|
751
|
+
description: "The debug session ID",
|
|
752
|
+
required: true
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
name: "nodeId",
|
|
756
|
+
type: "string",
|
|
757
|
+
description: "Filter to show only this node's variables",
|
|
758
|
+
required: false
|
|
759
|
+
}
|
|
760
|
+
]
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
name: "fw_debug_set_variable",
|
|
764
|
+
description: "Modify a variable value in the debug session. The new value will be used by downstream nodes when execution continues.",
|
|
765
|
+
category: "debug",
|
|
766
|
+
params: [
|
|
767
|
+
{
|
|
768
|
+
name: "debugId",
|
|
769
|
+
type: "string",
|
|
770
|
+
description: "The debug session ID",
|
|
771
|
+
required: true
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
name: "nodeId",
|
|
775
|
+
type: "string",
|
|
776
|
+
description: "The node that produced the variable",
|
|
777
|
+
required: true
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
name: "portName",
|
|
781
|
+
type: "string",
|
|
782
|
+
description: "The output port name",
|
|
783
|
+
required: true
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
name: "value",
|
|
787
|
+
type: "object",
|
|
788
|
+
description: "The new value to set (any JSON value)",
|
|
789
|
+
required: true
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
name: "executionIndex",
|
|
793
|
+
type: "number",
|
|
794
|
+
description: "Execution index (defaults to the latest)",
|
|
795
|
+
required: false
|
|
796
|
+
}
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: "fw_debug_breakpoint",
|
|
801
|
+
description: "Add, remove, or list breakpoints in a debug session. Breakpoints cause execution to pause when running with fw_debug_continue(toBreakpoint: true).",
|
|
802
|
+
category: "debug",
|
|
803
|
+
params: [
|
|
804
|
+
{
|
|
805
|
+
name: "debugId",
|
|
806
|
+
type: "string",
|
|
807
|
+
description: "The debug session ID",
|
|
808
|
+
required: true
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
name: "action",
|
|
812
|
+
type: "string",
|
|
813
|
+
description: "Action to perform",
|
|
814
|
+
required: true,
|
|
815
|
+
enum: ["add", "remove", "list"]
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
name: "nodeId",
|
|
819
|
+
type: "string",
|
|
820
|
+
description: "Node ID for add/remove (not needed for list)",
|
|
821
|
+
required: false
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
name: "fw_list_debug_sessions",
|
|
827
|
+
description: "List all active debug sessions.",
|
|
828
|
+
category: "debug",
|
|
829
|
+
params: []
|
|
830
|
+
}
|
|
831
|
+
];
|
|
832
|
+
function extractMcpTools() {
|
|
833
|
+
return MCP_TOOLS;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
// src/doc-metadata/extractors/cli-commands.ts
|
|
837
|
+
var CLI_COMMANDS = [
|
|
838
|
+
// ── Core commands ──────────────────────────────────────────────
|
|
839
|
+
{
|
|
840
|
+
name: "compile",
|
|
841
|
+
syntax: "fw compile <file> [options]",
|
|
842
|
+
description: "Compile workflow source file",
|
|
843
|
+
botCompatible: true,
|
|
844
|
+
options: [
|
|
845
|
+
{ flags: "-o, --output", arg: "<path>", description: "Output file or directory" },
|
|
846
|
+
{ flags: "-p, --production", description: "Production build (no debug events)" },
|
|
847
|
+
{ flags: "-s, --source-map", description: "Generate source maps" },
|
|
848
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Compile only this workflow (default: every workflow in the file)" },
|
|
849
|
+
{ flags: "-f, --format", arg: "esm|cjs|auto", description: "Module format", defaultValue: "auto" },
|
|
850
|
+
{ flags: "--strict", description: "Treat type coercion warnings as errors" },
|
|
851
|
+
{ flags: "--clean", description: "Omit redundant @param/@returns annotations from compiled output" },
|
|
852
|
+
{ flags: "--dry-run", description: "Preview compilation without writing files" },
|
|
853
|
+
{ flags: "--verbose", description: "Detailed output" }
|
|
854
|
+
]
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
name: "validate",
|
|
858
|
+
syntax: "fw validate <file> [options]",
|
|
859
|
+
description: "Validate workflow without compiling",
|
|
860
|
+
botCompatible: true,
|
|
861
|
+
options: [
|
|
862
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Validate only this workflow (default: every workflow in the file)" },
|
|
863
|
+
{ flags: "--json", description: "Output as JSON", exclusive: "output-mode" },
|
|
864
|
+
{ flags: "--verbose", description: "Verbose output", exclusive: "output-mode" },
|
|
865
|
+
{ flags: "-q, --quiet", description: "Suppress warnings", exclusive: "output-mode" },
|
|
866
|
+
{ flags: "--strict", description: "Treat type coercion warnings as errors" }
|
|
867
|
+
]
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
name: "describe",
|
|
871
|
+
syntax: "fw describe <file> [options]",
|
|
872
|
+
description: "Output workflow structure in LLM-friendly formats (JSON, text, mermaid)",
|
|
873
|
+
botCompatible: true,
|
|
874
|
+
options: [
|
|
875
|
+
{ flags: "-f, --format", arg: "json|text|mermaid|paths|ascii|ascii-compact", description: "Output format (paths: enumerate all Start-to-Exit paths via DFS; ascii: a terminal diagram)" },
|
|
876
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Target workflow" },
|
|
877
|
+
{ flags: "-n, --node", arg: "<id>", description: "Focus on specific node" },
|
|
878
|
+
{ flags: "--compile", description: "Also update runtime markers in the source file" }
|
|
879
|
+
]
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
name: "run",
|
|
883
|
+
syntax: "fw run <file> [options]",
|
|
884
|
+
description: "Execute a workflow file directly",
|
|
885
|
+
botCompatible: true,
|
|
886
|
+
options: [
|
|
887
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Specific workflow to run" },
|
|
888
|
+
{ flags: "--params", arg: "<json>", description: "Input parameters as JSON string", exclusive: "params" },
|
|
889
|
+
{ flags: "--params-file", arg: "<path>", description: "Path to JSON file with input parameters", exclusive: "params" },
|
|
890
|
+
{ flags: "-p, --production", description: "Production mode (no trace events)" },
|
|
891
|
+
{ flags: "-t, --trace", description: "Include execution trace events" },
|
|
892
|
+
{ flags: "-s, --stream", description: "Stream trace events in real time" },
|
|
893
|
+
{ flags: "--json", description: "Output result as JSON" },
|
|
894
|
+
{ flags: "--timeout", arg: "<ms>", description: "Execution timeout in milliseconds" },
|
|
895
|
+
{ flags: "--mocks", arg: "<json>", description: "Mock config as JSON: gates (answers by node id), events, agents, invocations, fast", exclusive: "mocks" },
|
|
896
|
+
{ flags: "--mocks-file", arg: "<path>", description: "Path to JSON file with mock config for built-in nodes", exclusive: "mocks" },
|
|
897
|
+
{ flags: "-d, --debug", description: "Start in step-through debug mode" },
|
|
898
|
+
{ flags: "-b, --breakpoint", arg: "<nodeIds...>", description: "Set initial breakpoints (repeatable)" }
|
|
899
|
+
]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
name: "serve",
|
|
903
|
+
syntax: "fw serve [directory] [options]",
|
|
904
|
+
description: "Serve the workflows as HTTP endpoints. Gated runs pause, resume and stream over the same API",
|
|
905
|
+
options: [
|
|
906
|
+
{ flags: "-p, --port", arg: "<port>", description: "Server port", defaultValue: "3000" },
|
|
907
|
+
{ flags: "-H, --host", arg: "<host>", description: "Server host. Beyond loopback it needs --token or --insecure", defaultValue: "127.0.0.1" },
|
|
908
|
+
{ flags: "--token", arg: "<token>", description: "Bearer token every request must carry (also FW_SERVE_TOKEN)" },
|
|
909
|
+
{ flags: "--no-agents", description: "Do not answer agent gates from .flowweaver/agents.yaml" },
|
|
910
|
+
{ flags: "--trace", description: "Keep a step trace for every run and stream it on /runs/:id/events" },
|
|
911
|
+
{ flags: "--dev", description: "Error stacks in responses, and mocks accepted when starting a run" },
|
|
912
|
+
{ flags: "--insecure", description: "Listen beyond loopback without a token" },
|
|
913
|
+
{ flags: "--no-watch", description: "Disable file watching for hot reload" },
|
|
914
|
+
{ flags: "--cors", arg: "<origin>", description: "Send CORS headers for this origin" },
|
|
915
|
+
{ flags: "--swagger", description: "Enable Swagger UI at /docs" },
|
|
916
|
+
{ flags: "--production", description: "Deprecated: the same as leaving --trace off" }
|
|
917
|
+
]
|
|
918
|
+
},
|
|
919
|
+
// ── Create subcommands ─────────────────────────────────────────
|
|
920
|
+
{
|
|
921
|
+
name: "create workflow",
|
|
922
|
+
syntax: "fw create workflow <template> <file> [options]",
|
|
923
|
+
description: "Create new workflow from template",
|
|
924
|
+
botCompatible: true,
|
|
925
|
+
group: "create",
|
|
926
|
+
positionalChoices: {
|
|
927
|
+
template: workflowTemplates.map((t) => ({ id: t.id, label: t.id }))
|
|
928
|
+
},
|
|
929
|
+
options: [
|
|
930
|
+
{ flags: "-p, --preview", description: "Show without writing" },
|
|
931
|
+
{ flags: "--provider", arg: "openai|anthropic|ollama|mock", description: "LLM provider" },
|
|
932
|
+
{ flags: "--model", arg: "<model>", description: "Model identifier" },
|
|
933
|
+
{ flags: "--name", arg: "<name>", description: "Override derived function name" },
|
|
934
|
+
{ flags: "--nodes", arg: "<names>", description: "Comma-separated node function names" },
|
|
935
|
+
{ flags: "--config", arg: "<json>", description: "Configuration as JSON string" },
|
|
936
|
+
{ flags: "--input", arg: "<name>", description: "Custom input port name", defaultValue: "data" },
|
|
937
|
+
{ flags: "--output", arg: "<name>", description: "Custom output port name", defaultValue: "result" },
|
|
938
|
+
{ flags: "-l, --line", arg: "<number>", description: "Insert at specific line number" },
|
|
939
|
+
{ flags: "-a, --async", description: "Generate an async workflow" }
|
|
940
|
+
]
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
name: "create node",
|
|
944
|
+
syntax: "fw create node <name> <file> [options]",
|
|
945
|
+
description: "Create a node type from template",
|
|
946
|
+
botCompatible: true,
|
|
947
|
+
group: "create",
|
|
948
|
+
options: [
|
|
949
|
+
{ flags: "-t, --template", arg: nodeTemplates.map((t) => t.id).join("|"), description: "Node template to use", defaultValue: "transformer" },
|
|
950
|
+
{ flags: "-p, --preview", description: "Preview generated code without writing" },
|
|
951
|
+
{ flags: "-l, --line", arg: "<number>", description: "Insert at specific line number" }
|
|
952
|
+
]
|
|
953
|
+
},
|
|
954
|
+
// ── Templates (generated from registries) ──────────────────────
|
|
955
|
+
{
|
|
956
|
+
name: "templates",
|
|
957
|
+
syntax: "fw templates [--json]",
|
|
958
|
+
description: `List available workflow templates (${workflowTemplates.length} total)`,
|
|
959
|
+
botCompatible: true,
|
|
960
|
+
listStyle: "definition",
|
|
961
|
+
options: [
|
|
962
|
+
{ flags: "--json", description: "Output as JSON" }
|
|
963
|
+
],
|
|
964
|
+
list: workflowTemplates.map((t) => `${t.id} - ${t.description}`)
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
name: "Node Templates",
|
|
968
|
+
syntax: "fw create node <name> <file> --template <type>",
|
|
969
|
+
description: `Create node types from templates (${nodeTemplates.length} total)`,
|
|
970
|
+
listStyle: "definition",
|
|
971
|
+
options: [],
|
|
972
|
+
list: nodeTemplates.map((t) => `${t.id} - ${t.description}`)
|
|
973
|
+
},
|
|
974
|
+
// ── Project & dev commands ─────────────────────────────────────
|
|
975
|
+
{
|
|
976
|
+
name: "init",
|
|
977
|
+
syntax: "fw init [directory] [options]",
|
|
978
|
+
description: "Create a new flow-weaver project with templates and config",
|
|
979
|
+
options: [
|
|
980
|
+
{ flags: "-n, --name", arg: "<name>", description: "Project name (defaults to directory name)" },
|
|
981
|
+
{ flags: "-t, --template", arg: workflowTemplates.map((t) => t.id).join("|"), description: "Workflow template", defaultValue: "sequential" },
|
|
982
|
+
{ flags: "-f, --format", arg: "esm|cjs", description: "Module format", defaultValue: "esm" },
|
|
983
|
+
{ flags: "-y, --yes", description: "Skip prompts, use defaults" },
|
|
984
|
+
{ flags: "--preset", arg: "nocode|vibecoder|lowcode|expert", description: "User preset" },
|
|
985
|
+
{ flags: "--use-case", arg: "data|ai|api|automation|minimal", description: "Use case" },
|
|
986
|
+
{ flags: "--mcp / --no-mcp", description: "Configure MCP for AI editors after scaffolding, or skip the prompt" },
|
|
987
|
+
{ flags: "--no-agent", description: "Skip the post-init agent launch prompt" },
|
|
988
|
+
{ flags: "--install / --no-install", description: "Run npm install after scaffolding" },
|
|
989
|
+
{ flags: "--git / --no-git", description: "Initialize a git repository" },
|
|
990
|
+
{ flags: "--force", description: "Overwrite existing files" },
|
|
991
|
+
{ flags: "--json", description: "Output a report as JSON" }
|
|
992
|
+
]
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
name: "watch",
|
|
996
|
+
syntax: "fw watch <file> [options]",
|
|
997
|
+
description: "Watch workflow files and recompile on changes",
|
|
998
|
+
options: [
|
|
999
|
+
{ flags: "-o, --output", arg: "<path>", description: "Output file or directory" },
|
|
1000
|
+
{ flags: "-p, --production", description: "Production build (no debug events)" },
|
|
1001
|
+
{ flags: "-s, --source-map", description: "Generate source maps" },
|
|
1002
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Target specific workflow" },
|
|
1003
|
+
{ flags: "-f, --format", arg: "esm|cjs|auto", description: "Module format", defaultValue: "auto" },
|
|
1004
|
+
{ flags: "--verbose", description: "Detailed output" }
|
|
1005
|
+
]
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: "doctor",
|
|
1009
|
+
syntax: "fw doctor [--json]",
|
|
1010
|
+
description: "Check project environment and configuration. Validates Node.js version, TypeScript, package installation, and tsconfig.json settings.",
|
|
1011
|
+
botCompatible: true,
|
|
1012
|
+
options: [
|
|
1013
|
+
{ flags: "--json", description: "Output results as JSON" }
|
|
1014
|
+
]
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
name: "agents",
|
|
1018
|
+
syntax: "fw agents [directory] [--init] [--json]",
|
|
1019
|
+
description: "The agent profiles in .flowweaver/agents.yaml that answer agent gates, whether each is ready, and the gate mapping. --init writes the starter file.",
|
|
1020
|
+
botCompatible: true,
|
|
1021
|
+
options: [
|
|
1022
|
+
{ flags: "--init", description: "Write the starter .flowweaver/agents.yaml" },
|
|
1023
|
+
{ flags: "--force", description: "With --init: replace an existing file" },
|
|
1024
|
+
{ flags: "--json", description: "Output as JSON" }
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
// ── Context ─────────────────────────────────────────────────────
|
|
1028
|
+
{
|
|
1029
|
+
name: "context",
|
|
1030
|
+
syntax: "fw context [preset] [options]",
|
|
1031
|
+
description: "Generate LLM context bundle from documentation and grammar",
|
|
1032
|
+
botCompatible: true,
|
|
1033
|
+
options: [
|
|
1034
|
+
{ flags: "--profile", arg: "standalone|assistant", description: "Output profile", defaultValue: "standalone" },
|
|
1035
|
+
{ flags: "--topics", arg: "<slugs>", description: "Comma-separated topic slugs (overrides preset)" },
|
|
1036
|
+
{ flags: "--add", arg: "<slugs>", description: "Extra topic slugs to add to preset" },
|
|
1037
|
+
{ flags: "--no-grammar", description: "Omit EBNF grammar section" },
|
|
1038
|
+
{ flags: "-o, --output", arg: "<path>", description: "Write to file instead of stdout" },
|
|
1039
|
+
{ flags: "--list", description: "List available presets and exit" }
|
|
1040
|
+
],
|
|
1041
|
+
positionalChoices: {
|
|
1042
|
+
preset: [
|
|
1043
|
+
{ id: "core", label: "core" },
|
|
1044
|
+
{ id: "authoring", label: "authoring" },
|
|
1045
|
+
{ id: "ops", label: "ops" },
|
|
1046
|
+
{ id: "full", label: "full" }
|
|
1047
|
+
]
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
// ── Export & generation ────────────────────────────────────────
|
|
1051
|
+
{
|
|
1052
|
+
name: "export",
|
|
1053
|
+
syntax: "fw export <file> -t <target> -o <path> [options]",
|
|
1054
|
+
description: "Export a workflow to a target provided by an installed pack",
|
|
1055
|
+
botCompatible: true,
|
|
1056
|
+
options: [
|
|
1057
|
+
{ flags: "-t, --target", arg: "<target>", description: "Target platform (provided by installed packs)", required: true },
|
|
1058
|
+
{ flags: "-o, --output", arg: "<path>", description: "Output directory", required: true },
|
|
1059
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Specific workflow to export" },
|
|
1060
|
+
{ flags: "-p, --production", description: "Production mode (no debug events)", defaultValue: "false" },
|
|
1061
|
+
{ flags: "--bundle", description: "Bundle node types into the output" },
|
|
1062
|
+
{ flags: "--multi", description: "Export all workflows as single multi-workflow service" },
|
|
1063
|
+
{ flags: "--workflows", arg: "<names>", description: "Comma-separated workflow subset (with --multi)" },
|
|
1064
|
+
{ flags: "--docs", description: "Include API documentation routes (/docs, /openapi.json)" },
|
|
1065
|
+
{ flags: "--durable-steps", description: "Use deep generator with per-node durable steps" },
|
|
1066
|
+
{ flags: "--dry-run", description: "Preview without writing files" }
|
|
1067
|
+
]
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
name: "diff",
|
|
1071
|
+
syntax: "fw diff <file1> <file2> [options]",
|
|
1072
|
+
description: "Semantic diff between two workflow files",
|
|
1073
|
+
botCompatible: true,
|
|
1074
|
+
options: [
|
|
1075
|
+
{ flags: "-f, --format", arg: "text|json|compact", description: "Output format", defaultValue: "text" },
|
|
1076
|
+
{ flags: "-w, --workflow", arg: "<name>", description: "Specific workflow to compare" },
|
|
1077
|
+
{ flags: "--exit-zero", description: "Exit 0 even when differences are found" }
|
|
1078
|
+
]
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
name: "openapi",
|
|
1082
|
+
syntax: "fw openapi <directory> [options]",
|
|
1083
|
+
description: "Generate the OpenAPI specification fw serve publishes: declared @http routes, run resources, run endpoints",
|
|
1084
|
+
options: [
|
|
1085
|
+
{ flags: "-o, --output", arg: "<path>", description: "Output file path" },
|
|
1086
|
+
{ flags: "--title", arg: "<title>", description: "API title", defaultValue: "Flow Weaver API" },
|
|
1087
|
+
{ flags: "--version", arg: "<version>", description: "API version", defaultValue: "1.0.0" },
|
|
1088
|
+
{ flags: "--description", arg: "<desc>", description: "API description" },
|
|
1089
|
+
{ flags: "-f, --format", arg: "json|yaml", description: "Output format", defaultValue: "json" },
|
|
1090
|
+
{ flags: "--server", arg: "<url>", description: "Server URL" },
|
|
1091
|
+
{ flags: "--no-auth", description: "Leave out the bearer scheme, for a server without a token" },
|
|
1092
|
+
{ flags: "--no-legacy", description: "Leave out POST /workflows/<name>, keeping declared @http routes only" }
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
name: "grammar",
|
|
1097
|
+
syntax: "fw grammar [options]",
|
|
1098
|
+
description: "Output JSDoc annotation grammar specification",
|
|
1099
|
+
options: [
|
|
1100
|
+
{ flags: "-f, --format", arg: "html|ebnf", description: "Output format", defaultValue: "html" },
|
|
1101
|
+
{ flags: "-o, --output", arg: "<path>", description: "Write output to file instead of stdout" }
|
|
1102
|
+
]
|
|
1103
|
+
},
|
|
1104
|
+
// ── Integration commands ───────────────────────────────────────
|
|
1105
|
+
{
|
|
1106
|
+
name: "mcp-server",
|
|
1107
|
+
syntax: "fw mcp-server [options]",
|
|
1108
|
+
description: "Start MCP server for Claude Code integration",
|
|
1109
|
+
options: [
|
|
1110
|
+
{ flags: "--stdio", description: "Run in MCP stdio mode (skip interactive registration)" }
|
|
1111
|
+
]
|
|
1112
|
+
},
|
|
1113
|
+
// ── Migration & changelog ──────────────────────────────────────
|
|
1114
|
+
{
|
|
1115
|
+
name: "migrate",
|
|
1116
|
+
syntax: "fw migrate <glob> [options]",
|
|
1117
|
+
description: "Migrate workflow files to current syntax via parse \u2192 regenerate round-trip",
|
|
1118
|
+
botCompatible: true,
|
|
1119
|
+
options: [
|
|
1120
|
+
{ flags: "--dry-run", description: "Preview changes without writing files" },
|
|
1121
|
+
{ flags: "--diff", description: "Show semantic diff before/after" }
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
];
|
|
1125
|
+
function extractCliCommands() {
|
|
1126
|
+
return CLI_COMMANDS;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
// src/doc-metadata/extractors/annotations.ts
|
|
1130
|
+
var CORE_ANNOTATIONS = [
|
|
1131
|
+
{
|
|
1132
|
+
name: "@flowWeaver",
|
|
1133
|
+
category: "marker",
|
|
1134
|
+
syntax: "@flowWeaver nodeType | workflow",
|
|
1135
|
+
description: "Required marker to identify function purpose. Must be first Flow Weaver annotation.",
|
|
1136
|
+
insertText: "@flowWeaver ",
|
|
1137
|
+
insertTextFormat: "plain",
|
|
1138
|
+
ebnf: 'flowWeaverTag ::= "@flowWeaver" ( "nodeType" | "workflow" )',
|
|
1139
|
+
contexts: ["nodeType", "workflow"]
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
name: "@flowWeaver nodeType",
|
|
1143
|
+
category: "marker",
|
|
1144
|
+
syntax: "@flowWeaver nodeType",
|
|
1145
|
+
description: "Marks function as a reusable node type that can be instantiated in workflows.",
|
|
1146
|
+
insertText: "@flowWeaver nodeType",
|
|
1147
|
+
insertTextFormat: "plain",
|
|
1148
|
+
contexts: ["nodeType"]
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
name: "@flowWeaver workflow",
|
|
1152
|
+
category: "marker",
|
|
1153
|
+
syntax: "@flowWeaver workflow",
|
|
1154
|
+
description: "Marks function as a DAG workflow orchestration.",
|
|
1155
|
+
insertText: "@flowWeaver workflow",
|
|
1156
|
+
insertTextFormat: "plain",
|
|
1157
|
+
contexts: ["workflow"]
|
|
1158
|
+
}
|
|
1159
|
+
];
|
|
1160
|
+
var PORT_ANNOTATIONS = [
|
|
1161
|
+
{
|
|
1162
|
+
name: "@input",
|
|
1163
|
+
category: "port",
|
|
1164
|
+
syntax: "@input name [modifiers] - description",
|
|
1165
|
+
description: "Declares an input port for data or control flow. Name required, modifiers in brackets optional (e.g. [type:NUMBER]).",
|
|
1166
|
+
insertText: "@input ${1:name}",
|
|
1167
|
+
insertTextFormat: "snippet",
|
|
1168
|
+
ebnf: `inputTag ::= "@input" ( bracketedInput | plainInput )
|
|
1169
|
+
[ scopeClause ] { metadataBracket } [ descriptionClause ]
|
|
1170
|
+
|
|
1171
|
+
plainInput ::= IDENTIFIER
|
|
1172
|
+
bracketedInput ::= "[" IDENTIFIER [ "=" defaultValue ] "]"
|
|
1173
|
+
|
|
1174
|
+
defaultValue ::= IDENTIFIER | INTEGER | STRING`,
|
|
1175
|
+
examples: [
|
|
1176
|
+
"@input name plain required input",
|
|
1177
|
+
"@input [name] optional input (no connection required)",
|
|
1178
|
+
"@input [name=defaultValue] optional with default (identifier)",
|
|
1179
|
+
"@input [name=42] optional with default (integer)",
|
|
1180
|
+
'@input [name="hello"] optional with default (string)',
|
|
1181
|
+
"@input name scope:myScope scoped input",
|
|
1182
|
+
"@input name [order:2] with ordering metadata",
|
|
1183
|
+
"@input name - Short Label the dash text is the port label (1-2 words), shown in the diagram badge"
|
|
1184
|
+
],
|
|
1185
|
+
contexts: ["nodeType"]
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
name: "@output",
|
|
1189
|
+
category: "port",
|
|
1190
|
+
syntax: "@output name [modifiers] - description",
|
|
1191
|
+
description: "Declares an output port for data or control flow. Name required, modifiers in brackets optional (e.g. [type:NUMBER]).",
|
|
1192
|
+
insertText: "@output ${1:name}",
|
|
1193
|
+
insertTextFormat: "snippet",
|
|
1194
|
+
ebnf: `outputTag ::= "@output" IDENTIFIER
|
|
1195
|
+
[ scopeClause ] { metadataBracket } [ descriptionClause ]`,
|
|
1196
|
+
examples: [
|
|
1197
|
+
"@output result",
|
|
1198
|
+
"@output result scope:myScope",
|
|
1199
|
+
"@output result [order:1, placement:TOP]",
|
|
1200
|
+
"@output result - The computed result"
|
|
1201
|
+
],
|
|
1202
|
+
contexts: ["nodeType"]
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
name: "@step",
|
|
1206
|
+
category: "port",
|
|
1207
|
+
syntax: "@step name - description",
|
|
1208
|
+
description: "Declares a STEP port for control flow. Shorthand for @input name [type:STEP] or @output name [type:STEP].",
|
|
1209
|
+
insertText: "@step ${1:name}",
|
|
1210
|
+
insertTextFormat: "snippet",
|
|
1211
|
+
ebnf: 'stepTag ::= "@step" IDENTIFIER [ descriptionClause ]',
|
|
1212
|
+
examples: ["@step process", "@step process - Runs the processing pipeline"],
|
|
1213
|
+
contexts: ["nodeType"]
|
|
1214
|
+
}
|
|
1215
|
+
];
|
|
1216
|
+
var WORKFLOW_ANNOTATIONS = [
|
|
1217
|
+
{
|
|
1218
|
+
name: "@node",
|
|
1219
|
+
category: "workflow",
|
|
1220
|
+
syntax: "@node instanceId NodeTypeName [parent.scope] [modifiers]",
|
|
1221
|
+
description: "Declares a node instance in the workflow. Can optionally specify parent scope and modifiers.",
|
|
1222
|
+
insertText: "@node ${1:id} ${2:NodeType}",
|
|
1223
|
+
insertTextFormat: "snippet",
|
|
1224
|
+
ebnf: `nodeTag ::= "@node" IDENTIFIER IDENTIFIER [ parentScopeRef ] { attributeBracket }
|
|
1225
|
+
|
|
1226
|
+
parentScopeRef ::= IDENTIFIER "." IDENTIFIER
|
|
1227
|
+
|
|
1228
|
+
attributeBracket ::= "[" nodeAttr { "," nodeAttr } "]"
|
|
1229
|
+
|
|
1230
|
+
nodeAttr ::= labelAttr | exprAttr | portOrderAttr | portLabelAttr
|
|
1231
|
+
| minimizedAttr | pullExecutionAttr | sizeAttr
|
|
1232
|
+
| colorAttr | iconAttr | tagsAttr | customAttr
|
|
1233
|
+
|
|
1234
|
+
customAttr ::= IDENTIFIER ":" STRING
|
|
1235
|
+
labelAttr ::= "label:" STRING
|
|
1236
|
+
exprAttr ::= "expr:" IDENTIFIER "=" STRING { "," IDENTIFIER "=" STRING }
|
|
1237
|
+
portOrderAttr ::= "portOrder:" IDENTIFIER "=" INTEGER { "," IDENTIFIER "=" INTEGER }
|
|
1238
|
+
portLabelAttr ::= "portLabel:" IDENTIFIER "=" STRING { "," IDENTIFIER "=" STRING }
|
|
1239
|
+
minimizedAttr ::= "minimized"
|
|
1240
|
+
pullExecutionAttr ::= "pullExecution:" IDENTIFIER
|
|
1241
|
+
sizeAttr ::= "size:" INTEGER INTEGER
|
|
1242
|
+
colorAttr ::= "color:" STRING
|
|
1243
|
+
iconAttr ::= "icon:" STRING
|
|
1244
|
+
tagsAttr ::= "tags:" tagEntry { "," tagEntry }
|
|
1245
|
+
tagEntry ::= STRING [ STRING ]`,
|
|
1246
|
+
examples: [
|
|
1247
|
+
"@node myAdd Add",
|
|
1248
|
+
'@node myAdd Add [label: "My Adder"]',
|
|
1249
|
+
"@node myAdd Add parent.loopScope",
|
|
1250
|
+
'@node myAdd Add [expr: a="x + 1", b="y * 2"]',
|
|
1251
|
+
'@node myAdd Add [expr: a="Start.value + 1", b="scale.factor * 2"]',
|
|
1252
|
+
"@node myAdd Add [portOrder: a=1, b=2]",
|
|
1253
|
+
'@node myAdd Add [minimized, label: "Compact"]',
|
|
1254
|
+
"@node myAdd Add [pullExecution: trigger]",
|
|
1255
|
+
"@node myAdd Add [size: 200 150]",
|
|
1256
|
+
'@node myAdd Add [color: "#ff0000", icon: "math-plus"]',
|
|
1257
|
+
'@node myAdd Add [tags: "math" "Math operation", "transform"]',
|
|
1258
|
+
'@node myAdd Add [label: "hi"] [color: "#f00"]'
|
|
1259
|
+
],
|
|
1260
|
+
contexts: ["workflow"]
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
name: "@connect",
|
|
1264
|
+
category: "workflow",
|
|
1265
|
+
syntax: "@connect sourceNode.outPort -> targetNode.inPort",
|
|
1266
|
+
description: "Connects an output port to an input port. Use arrow syntax for directionality.",
|
|
1267
|
+
insertText: "@connect ${1:from}.${2:port} -> ${3:to}.${4:port}",
|
|
1268
|
+
insertTextFormat: "snippet",
|
|
1269
|
+
ebnf: `connectTag ::= "@connect" portRef "->" portRef
|
|
1270
|
+
|
|
1271
|
+
portRef ::= IDENTIFIER "." IDENTIFIER [ ":" IDENTIFIER ]`,
|
|
1272
|
+
examples: [
|
|
1273
|
+
"@connect myAdd.result -> myLog.message",
|
|
1274
|
+
"@connect loop.item -> process.input:loopScope"
|
|
1275
|
+
],
|
|
1276
|
+
contexts: ["workflow"]
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
name: "@fwImport",
|
|
1280
|
+
category: "workflow",
|
|
1281
|
+
syntax: '@fwImport nodeName functionName from "packageName"',
|
|
1282
|
+
description: "Imports an npm package function as a node type. Creates expression node with inferred types.",
|
|
1283
|
+
insertText: '@fwImport ${1:nodeName} ${2:functionName} from "${3:package}"',
|
|
1284
|
+
insertTextFormat: "snippet",
|
|
1285
|
+
ebnf: `fwImportTag ::= "@fwImport" IDENTIFIER IDENTIFIER "from" QUOTED_STRING
|
|
1286
|
+
|
|
1287
|
+
QUOTED_STRING ::= STRING | "'" { any character except "'" } "'"`,
|
|
1288
|
+
examples: [
|
|
1289
|
+
'@fwImport npm/lodash/map map from "lodash"',
|
|
1290
|
+
'@fwImport npm/date-fns/format format from "date-fns"',
|
|
1291
|
+
"@fwImport local/utils/helper helper from './utils'"
|
|
1292
|
+
],
|
|
1293
|
+
contexts: ["workflow"]
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
name: "@path",
|
|
1297
|
+
category: "workflow",
|
|
1298
|
+
syntax: "@path Start -> nodeA -> nodeB:fail -> Exit",
|
|
1299
|
+
description: "Declare a complete execution route with scope walking. Steps separated by ->. Suffix :ok (default) or :fail to select onSuccess/onFailure. Data ports, Exit @returns ports included, auto-resolve by walking backward to the nearest ancestor with a same-name output. An explicit @connect wins, and a Start param never passes straight through to Exit.",
|
|
1300
|
+
insertText: "@path Start -> ${1:node1} -> ${2:node2} -> Exit",
|
|
1301
|
+
insertTextFormat: "snippet",
|
|
1302
|
+
ebnf: `pathTag ::= "@path" pathStep ( "->" pathStep )+
|
|
1303
|
+
pathStep ::= IDENTIFIER [ ":" ( "ok" | "fail" ) ]`,
|
|
1304
|
+
examples: [
|
|
1305
|
+
"@path Start -> validator -> classifier -> urgencyRouter:fail -> escalate -> Exit",
|
|
1306
|
+
"@path Start -> validator:ok -> processor -> Exit"
|
|
1307
|
+
],
|
|
1308
|
+
contexts: ["workflow"]
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
name: "@scope",
|
|
1312
|
+
category: "workflow",
|
|
1313
|
+
syntax: "@scope scopeRef [nodes...]",
|
|
1314
|
+
description: "Assigns nodes to a scope in a workflow. The scope ref can be a simple name or parent.child.",
|
|
1315
|
+
insertText: "@scope ${1:scopeRef} [${2:nodes}]",
|
|
1316
|
+
insertTextFormat: "snippet",
|
|
1317
|
+
ebnf: `scopeTag ::= "@scope" scopeRef "[" IDENTIFIER { "," IDENTIFIER } "]"
|
|
1318
|
+
|
|
1319
|
+
scopeRef ::= IDENTIFIER | IDENTIFIER "." IDENTIFIER`,
|
|
1320
|
+
examples: [
|
|
1321
|
+
"@scope loopScope [process, validate]",
|
|
1322
|
+
"@scope container.inner [step1, step2]"
|
|
1323
|
+
],
|
|
1324
|
+
contexts: ["workflow"]
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
name: "@map",
|
|
1328
|
+
category: "workflow",
|
|
1329
|
+
syntax: "@map instanceId ChildType [portMapping] over source.port",
|
|
1330
|
+
description: "Declares a map (iteration) node that processes items from a source array port using a child node type. The optional port mapping overrides the default input/output port wiring.",
|
|
1331
|
+
insertText: "@map ${1:id} ${2:ChildType} over ${3:source}.${4:port}",
|
|
1332
|
+
insertTextFormat: "snippet",
|
|
1333
|
+
ebnf: `mapTag ::= "@map" IDENTIFIER IDENTIFIER [ "(" IDENTIFIER "->" IDENTIFIER ")" ]
|
|
1334
|
+
"over" IDENTIFIER "." IDENTIFIER`,
|
|
1335
|
+
examples: [
|
|
1336
|
+
"@map loop process over scan.files",
|
|
1337
|
+
"@map loop process(inputPort -> outputPort) over scan.files"
|
|
1338
|
+
],
|
|
1339
|
+
contexts: ["workflow"]
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
name: "@fanOut",
|
|
1343
|
+
category: "workflow",
|
|
1344
|
+
syntax: "@fanOut source.port -> target1, target2, target3",
|
|
1345
|
+
description: "Broadcasts a single output port to multiple target nodes/ports. Expands to individual @connect lines during compilation.",
|
|
1346
|
+
insertText: "@fanOut ${1:source}.${2:port} -> ${3:target1}, ${4:target2}",
|
|
1347
|
+
insertTextFormat: "snippet",
|
|
1348
|
+
ebnf: `fanOutTag ::= "@fanOut" portRef "->" portRef { "," portRef }
|
|
1349
|
+
|
|
1350
|
+
portRef ::= IDENTIFIER [ "." IDENTIFIER ]`,
|
|
1351
|
+
examples: [
|
|
1352
|
+
"@fanOut Start.data -> a, b, c",
|
|
1353
|
+
"@fanOut Start.data -> a.input1, b.input2"
|
|
1354
|
+
],
|
|
1355
|
+
contexts: ["workflow"]
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
name: "@fanIn",
|
|
1359
|
+
category: "workflow",
|
|
1360
|
+
syntax: "@fanIn source1.port, source2.port -> target.port",
|
|
1361
|
+
description: "Merges multiple output ports into a single target input. Expands to individual @connect lines during compilation.",
|
|
1362
|
+
insertText: "@fanIn ${1:source1}, ${2:source2} -> ${3:target}.${4:port}",
|
|
1363
|
+
insertTextFormat: "snippet",
|
|
1364
|
+
ebnf: `fanInTag ::= "@fanIn" portRef { "," portRef } "->" portRef
|
|
1365
|
+
|
|
1366
|
+
portRef ::= IDENTIFIER [ "." IDENTIFIER ]`,
|
|
1367
|
+
examples: [
|
|
1368
|
+
"@fanIn a.result, b.result, c.result -> merge.inputs",
|
|
1369
|
+
"@fanIn a, b, c -> merge.data"
|
|
1370
|
+
],
|
|
1371
|
+
contexts: ["workflow"]
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
name: "@coerce",
|
|
1375
|
+
category: "workflow",
|
|
1376
|
+
syntax: "@coerce instanceId source.port -> target.port as TargetType",
|
|
1377
|
+
description: "Inserts an explicit type coercion node between two ports. Expands to a synthetic expression node that performs the conversion inline (e.g. String(), Number()). Works with @strictTypes since both connections are type-safe through the ANY input.",
|
|
1378
|
+
insertText: "@coerce ${1:id} ${2:source}.${3:port} -> ${4:target}.${5:port} as ${6|string,number,boolean,json,object|}",
|
|
1379
|
+
insertTextFormat: "snippet",
|
|
1380
|
+
ebnf: `coerceTag ::= "@coerce" IDENTIFIER portRef "->" portRef "as" targetType
|
|
1381
|
+
|
|
1382
|
+
targetType ::= "string" | "number" | "boolean" | "json" | "object"`,
|
|
1383
|
+
examples: [
|
|
1384
|
+
"@coerce c1 fetch.count -> calc.amount as number",
|
|
1385
|
+
"@coerce toStr llm.response -> logger.message as string",
|
|
1386
|
+
"@coerce parse api.body -> transform.data as object"
|
|
1387
|
+
],
|
|
1388
|
+
contexts: ["workflow"]
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
name: "@autoConnect",
|
|
1392
|
+
category: "workflow",
|
|
1393
|
+
syntax: "@autoConnect",
|
|
1394
|
+
description: "Enables automatic linear connection wiring for the workflow. When present, the compiler automatically wires nodes in declaration order (connecting compatible ports from previous nodes). No value is needed. Its presence enables the feature.",
|
|
1395
|
+
insertText: "@autoConnect",
|
|
1396
|
+
insertTextFormat: "plain",
|
|
1397
|
+
ebnf: 'autoConnectTag ::= "@autoConnect"',
|
|
1398
|
+
examples: ["@autoConnect"],
|
|
1399
|
+
contexts: ["workflow"]
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
name: "@trigger",
|
|
1403
|
+
category: "workflow",
|
|
1404
|
+
syntax: '@trigger event="name" | cron="expr"',
|
|
1405
|
+
description: "Declares an event or cron trigger for the workflow. Can specify event, cron, or both.",
|
|
1406
|
+
insertText: '@trigger event="${1:event/name}"',
|
|
1407
|
+
insertTextFormat: "snippet",
|
|
1408
|
+
ebnf: 'triggerTag ::= "@trigger" ( "event=" STRING | "cron=" STRING )*',
|
|
1409
|
+
examples: [
|
|
1410
|
+
'@trigger event="agent/request"',
|
|
1411
|
+
'@trigger cron="0 9 * * *"',
|
|
1412
|
+
'@trigger event="agent/request" cron="0 9 * * *"'
|
|
1413
|
+
],
|
|
1414
|
+
contexts: ["workflow"]
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
name: "@http",
|
|
1418
|
+
category: "workflow",
|
|
1419
|
+
syntax: "@http METHOD /path [mode=sync|async] [auth=bearer|none] [callback]",
|
|
1420
|
+
description: "Serves the workflow on an HTTP route with fw serve and the embeddable server. Path :params bind to workflow params by name. GET reads the query string, other methods the JSON body. The return ports are the response, onSuccess as 200 and onFailure as 422. A workflow that pauses at a gate answers 202 with a run id. Several tags give several routes.",
|
|
1421
|
+
insertText: "@http POST /${1:path}",
|
|
1422
|
+
insertTextFormat: "snippet",
|
|
1423
|
+
ebnf: 'httpTag ::= "@http" METHOD PATH { "mode=" ("sync"|"async") | "auth=" ("bearer"|"none") | "callback" }',
|
|
1424
|
+
examples: [
|
|
1425
|
+
"@http POST /reviews",
|
|
1426
|
+
"@http GET /reviews/:path",
|
|
1427
|
+
"@http POST /reviews mode=async callback",
|
|
1428
|
+
"@http POST /hooks/github auth=none"
|
|
1429
|
+
],
|
|
1430
|
+
contexts: ["workflow"]
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
name: "@cancelOn",
|
|
1434
|
+
category: "workflow",
|
|
1435
|
+
syntax: '@cancelOn event="name" [match="field"] [timeout="duration"]',
|
|
1436
|
+
description: "Cancels a running workflow execution when a specified event is received.",
|
|
1437
|
+
insertText: '@cancelOn event="${1:event/name}"',
|
|
1438
|
+
insertTextFormat: "snippet",
|
|
1439
|
+
ebnf: 'cancelOnTag ::= "@cancelOn" "event=" STRING [ "match=" STRING ] [ "timeout=" STRING ]',
|
|
1440
|
+
examples: [
|
|
1441
|
+
'@cancelOn event="app/user.deleted"',
|
|
1442
|
+
'@cancelOn event="app/user.deleted" match="data.userId"',
|
|
1443
|
+
'@cancelOn event="x" match="data.id" timeout="1h"'
|
|
1444
|
+
],
|
|
1445
|
+
contexts: ["workflow"]
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
name: "@retries",
|
|
1449
|
+
category: "workflow",
|
|
1450
|
+
syntax: "@retries N",
|
|
1451
|
+
description: "Sets the retry count for the deployed function.",
|
|
1452
|
+
insertText: "@retries ${1:3}",
|
|
1453
|
+
insertTextFormat: "snippet",
|
|
1454
|
+
ebnf: 'retriesTag ::= "@retries" INTEGER',
|
|
1455
|
+
examples: ["@retries 5", "@retries 0"],
|
|
1456
|
+
contexts: ["workflow"]
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
name: "@timeout",
|
|
1460
|
+
category: "workflow",
|
|
1461
|
+
syntax: '@timeout "duration"',
|
|
1462
|
+
description: "Sets the maximum execution time for the deployed function.",
|
|
1463
|
+
insertText: '@timeout "${1:30m}"',
|
|
1464
|
+
insertTextFormat: "snippet",
|
|
1465
|
+
ebnf: 'timeoutTag ::= "@timeout" STRING',
|
|
1466
|
+
examples: ['@timeout "30m"', '@timeout "2h"'],
|
|
1467
|
+
contexts: ["workflow"]
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
name: "@throttle",
|
|
1471
|
+
category: "workflow",
|
|
1472
|
+
syntax: '@throttle limit=N [period="duration"]',
|
|
1473
|
+
description: "Limits concurrent executions of the deployed function.",
|
|
1474
|
+
insertText: "@throttle limit=${1:10}",
|
|
1475
|
+
insertTextFormat: "snippet",
|
|
1476
|
+
ebnf: 'throttleTag ::= "@throttle" "limit=" INTEGER [ "period=" STRING ]',
|
|
1477
|
+
examples: ['@throttle limit=3 period="1m"', "@throttle limit=10"],
|
|
1478
|
+
contexts: ["workflow"]
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
name: "@return",
|
|
1482
|
+
category: "workflow",
|
|
1483
|
+
syntax: "@return name [- description]",
|
|
1484
|
+
description: "Declares a workflow output (Exit port). An alias of @returns; both parse identically.",
|
|
1485
|
+
insertText: "@return ${1:name}",
|
|
1486
|
+
insertTextFormat: "snippet",
|
|
1487
|
+
ebnf: 'returnTag ::= ("@return" | "@returns") IDENTIFIER [ "-" TEXT ]',
|
|
1488
|
+
examples: ["@return result", "@return score - The computed score"],
|
|
1489
|
+
contexts: ["workflow"]
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
name: "@async",
|
|
1493
|
+
category: "workflow",
|
|
1494
|
+
syntax: "@async",
|
|
1495
|
+
description: "Marks a workflow or node type as asynchronous. Async is auto-detected from the TypeScript signature (a function returning a Promise), so this tag is optional; it is accepted as an explicit override and for documentation. Valid on both @flowWeaver workflow and @flowWeaver nodeType blocks.",
|
|
1496
|
+
insertText: "@async",
|
|
1497
|
+
insertTextFormat: "plain",
|
|
1498
|
+
ebnf: 'asyncTag ::= "@async"',
|
|
1499
|
+
examples: ["@async"],
|
|
1500
|
+
contexts: ["workflow", "nodeType"]
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
name: "@deploy",
|
|
1504
|
+
category: "workflow",
|
|
1505
|
+
syntax: "@deploy target [key=value ...]",
|
|
1506
|
+
description: "Attaches deployment options for a named pack target. The default `typescript` compile target ignores it; a pack target reads the keys it supports. Values coerce to boolean/number when unquoted, and a quoted comma-separated value becomes a string array. Valid on both @flowWeaver workflow and @flowWeaver nodeType blocks. Several @deploy lines for the same target merge.",
|
|
1507
|
+
insertText: "@deploy ${1:target} ${2:key}=${3:value}",
|
|
1508
|
+
insertTextFormat: "snippet",
|
|
1509
|
+
ebnf: 'deployTag ::= "@deploy" IDENTIFIER { IDENTIFIER "=" ( STRING | BARE ) }',
|
|
1510
|
+
examples: [
|
|
1511
|
+
"@deploy inngest",
|
|
1512
|
+
"@deploy aws-lambda memory=512 timeout=30",
|
|
1513
|
+
'@deploy vercel regions="iad1,sfo1"'
|
|
1514
|
+
],
|
|
1515
|
+
contexts: ["workflow", "nodeType"]
|
|
1516
|
+
}
|
|
1517
|
+
];
|
|
1518
|
+
var METADATA_ANNOTATIONS = [
|
|
1519
|
+
{
|
|
1520
|
+
name: "@name",
|
|
1521
|
+
category: "metadata",
|
|
1522
|
+
syntax: "@name identifier",
|
|
1523
|
+
description: "Sets the node type identifier. Used to reference this type in @node declarations.",
|
|
1524
|
+
insertText: "@name ${1:identifier}",
|
|
1525
|
+
insertTextFormat: "snippet",
|
|
1526
|
+
contexts: ["nodeType", "workflow"]
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
name: "@label",
|
|
1530
|
+
category: "metadata",
|
|
1531
|
+
syntax: '@label "Display Name"',
|
|
1532
|
+
description: "Sets a human-readable display label for the node or workflow in the UI.",
|
|
1533
|
+
insertText: '@label "${1:Label}"',
|
|
1534
|
+
insertTextFormat: "snippet",
|
|
1535
|
+
contexts: ["nodeType", "workflow"]
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: "@description",
|
|
1539
|
+
category: "metadata",
|
|
1540
|
+
syntax: "@description Text description",
|
|
1541
|
+
description: "Sets a description that appears as hover tooltip in the UI.",
|
|
1542
|
+
insertText: "@description ${1:description}",
|
|
1543
|
+
insertTextFormat: "snippet",
|
|
1544
|
+
contexts: ["nodeType", "workflow"]
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
name: "@scope",
|
|
1548
|
+
category: "metadata",
|
|
1549
|
+
syntax: "@scope scopeName",
|
|
1550
|
+
description: "Declares a scope on a node type for nested nodes. Used for iteration patterns (forEach, map, etc.).",
|
|
1551
|
+
insertText: "@scope ${1:scopeName}",
|
|
1552
|
+
insertTextFormat: "snippet",
|
|
1553
|
+
contexts: ["nodeType"]
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
name: "@executeWhen",
|
|
1557
|
+
category: "metadata",
|
|
1558
|
+
syntax: "@executeWhen CONJUNCTION | DISJUNCTION | CUSTOM",
|
|
1559
|
+
description: "Controls when a node with multiple step inputs executes. CONJUNCTION waits for all, DISJUNCTION fires on first.",
|
|
1560
|
+
insertText: "@executeWhen ${1|CONJUNCTION,DISJUNCTION,CUSTOM|}",
|
|
1561
|
+
insertTextFormat: "snippet",
|
|
1562
|
+
contexts: ["nodeType"]
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
name: "@pullExecution",
|
|
1566
|
+
category: "metadata",
|
|
1567
|
+
syntax: "@pullExecution triggerPort",
|
|
1568
|
+
description: "Enables lazy execution - node runs only when trigger port is pulled.",
|
|
1569
|
+
insertText: "@pullExecution ${1:triggerPort}",
|
|
1570
|
+
insertTextFormat: "snippet",
|
|
1571
|
+
contexts: ["nodeType"]
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
name: "@resilience",
|
|
1575
|
+
category: "metadata",
|
|
1576
|
+
syntax: '@resilience retries=N [fallback="provider"]',
|
|
1577
|
+
description: "Declares retry or fallback behavior implemented inside a shared node adapter so static agent validation can account for it.",
|
|
1578
|
+
insertText: '@resilience retries=${1:3} fallback="${2:provider}"',
|
|
1579
|
+
insertTextFormat: "snippet",
|
|
1580
|
+
examples: [
|
|
1581
|
+
"@resilience retries=3",
|
|
1582
|
+
'@resilience retries=3 fallback="anthropic-backup"',
|
|
1583
|
+
'@resilience fallback="local-model"'
|
|
1584
|
+
],
|
|
1585
|
+
contexts: ["nodeType"]
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
name: "@expression",
|
|
1589
|
+
category: "metadata",
|
|
1590
|
+
syntax: "@expression",
|
|
1591
|
+
description: "Marks node as pure expression node. No control flow ports (execute/onSuccess/onFailure).",
|
|
1592
|
+
insertText: "@expression",
|
|
1593
|
+
insertTextFormat: "plain",
|
|
1594
|
+
contexts: ["nodeType"]
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
name: "@strictTypes",
|
|
1598
|
+
category: "metadata",
|
|
1599
|
+
syntax: "@strictTypes",
|
|
1600
|
+
description: "Promotes type coercion warnings to errors in this workflow.",
|
|
1601
|
+
insertText: "@strictTypes",
|
|
1602
|
+
insertTextFormat: "plain",
|
|
1603
|
+
ebnf: 'strictTypesTag ::= "@strictTypes" [ "false" ]',
|
|
1604
|
+
examples: [
|
|
1605
|
+
"@strictTypes enables strict mode",
|
|
1606
|
+
"@strictTypes false explicitly disables"
|
|
1607
|
+
],
|
|
1608
|
+
contexts: ["workflow"]
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
name: "@color",
|
|
1612
|
+
category: "metadata",
|
|
1613
|
+
syntax: "@color value",
|
|
1614
|
+
description: "Sets a UI color hint for the node type.",
|
|
1615
|
+
insertText: "@color ${1:value}",
|
|
1616
|
+
insertTextFormat: "snippet",
|
|
1617
|
+
contexts: ["nodeType"]
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
name: "@tag",
|
|
1621
|
+
category: "metadata",
|
|
1622
|
+
syntax: '@tag identifier ["description"]',
|
|
1623
|
+
description: "Adds a tag to the node type for categorization. Optional string description.",
|
|
1624
|
+
insertText: "@tag ${1:tagName}",
|
|
1625
|
+
insertTextFormat: "snippet",
|
|
1626
|
+
contexts: ["nodeType"]
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
name: "@icon",
|
|
1630
|
+
category: "metadata",
|
|
1631
|
+
syntax: "@icon text",
|
|
1632
|
+
description: "Sets an icon identifier for the node type in the UI.",
|
|
1633
|
+
insertText: "@icon ${1:iconName}",
|
|
1634
|
+
insertTextFormat: "snippet",
|
|
1635
|
+
contexts: ["nodeType"]
|
|
1636
|
+
},
|
|
1637
|
+
// Durable classification. Once a workflow's reachable closure contains a
|
|
1638
|
+
// gate, every node in it must carry exactly one of these three. The
|
|
1639
|
+
// compiler refuses an unclassified or doubly classified node.
|
|
1640
|
+
{
|
|
1641
|
+
name: "@durablePure",
|
|
1642
|
+
category: "metadata",
|
|
1643
|
+
syntax: "@durablePure",
|
|
1644
|
+
description: "Declares a node with no side effects, safe for the engine to re-run after a durable resume. Required on every non-gate, non-effect node in a workflow that contains a gate.",
|
|
1645
|
+
insertText: "@durablePure",
|
|
1646
|
+
insertTextFormat: "plain",
|
|
1647
|
+
examples: ["@durablePure"],
|
|
1648
|
+
contexts: ["nodeType"]
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
name: "@durableGate",
|
|
1652
|
+
category: "metadata",
|
|
1653
|
+
syntax: "@durableGate approval | input | agent | timer",
|
|
1654
|
+
description: "Declares a durable gate: the workflow yields here with a continuation and resumes later with a supplied resolution. The body is never executed. The kind labels who resolves it.",
|
|
1655
|
+
insertText: "@durableGate ${1|approval,input,agent,timer|}",
|
|
1656
|
+
insertTextFormat: "snippet",
|
|
1657
|
+
ebnf: `durableGateTag ::= "@durableGate" ( "approval" | "input" | "agent" | "timer" )`,
|
|
1658
|
+
examples: ["@durableGate approval", "@durableGate agent"],
|
|
1659
|
+
contexts: ["nodeType"]
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
name: "@durableEffect",
|
|
1663
|
+
category: "metadata",
|
|
1664
|
+
syntax: "@durableEffect",
|
|
1665
|
+
description: "Declares a node that touches the outside world. It receives a trailing operationKey parameter, returns { result, receipt }, and runs only through the effect adapter so a resume never repeats it.",
|
|
1666
|
+
insertText: "@durableEffect",
|
|
1667
|
+
insertTextFormat: "plain",
|
|
1668
|
+
examples: ["@durableEffect"],
|
|
1669
|
+
contexts: ["nodeType"]
|
|
1670
|
+
}
|
|
1671
|
+
];
|
|
1672
|
+
var STANDARD_ANNOTATIONS = [
|
|
1673
|
+
{
|
|
1674
|
+
name: "@param",
|
|
1675
|
+
category: "standard",
|
|
1676
|
+
syntax: "@param {type} name - description",
|
|
1677
|
+
description: "Standard JSDoc parameter documentation. In workflows, defines Start port (workflow input).",
|
|
1678
|
+
insertText: "@param {${1:type}} ${2:name} - ${3:description}",
|
|
1679
|
+
insertTextFormat: "snippet",
|
|
1680
|
+
ebnf: "paramTag ::= IDENTIFIER [ scopeClause ] { metadataBracket } [ descriptionClause ]",
|
|
1681
|
+
contexts: ["workflow"]
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
name: "@returns",
|
|
1685
|
+
category: "standard",
|
|
1686
|
+
syntax: "@returns {type} description",
|
|
1687
|
+
description: "Standard JSDoc return documentation. In workflows, defines Exit port (workflow output).",
|
|
1688
|
+
insertText: "@returns {${1:type}} ${2:description}",
|
|
1689
|
+
insertTextFormat: "snippet",
|
|
1690
|
+
ebnf: "returnsTag ::= IDENTIFIER [ scopeClause ] { metadataBracket } [ descriptionClause ]",
|
|
1691
|
+
contexts: ["workflow"]
|
|
1692
|
+
}
|
|
1693
|
+
];
|
|
1694
|
+
var PORT_MODIFIERS = [
|
|
1695
|
+
{
|
|
1696
|
+
name: "order",
|
|
1697
|
+
syntax: "[order:N]",
|
|
1698
|
+
description: "Sets display order for the port. Lower numbers appear higher."
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
name: "placement",
|
|
1702
|
+
syntax: "[placement:TOP|BOTTOM]",
|
|
1703
|
+
description: "Controls port position on the node.",
|
|
1704
|
+
enum: ["TOP", "BOTTOM"]
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
name: "type",
|
|
1708
|
+
syntax: "[type:TYPE]",
|
|
1709
|
+
description: "Overrides inferred port data type."
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
name: "hidden",
|
|
1713
|
+
syntax: "[hidden]",
|
|
1714
|
+
description: "Hides port from UI display."
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
name: "optional",
|
|
1718
|
+
syntax: "[optional]",
|
|
1719
|
+
description: "Marks input port as optional (alternative to square brackets around name)."
|
|
1720
|
+
}
|
|
1721
|
+
];
|
|
1722
|
+
var NODE_MODIFIERS = [
|
|
1723
|
+
{
|
|
1724
|
+
name: "label",
|
|
1725
|
+
syntax: '[label:"Display Name"]',
|
|
1726
|
+
description: "Override the display label for this instance."
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
name: "expr",
|
|
1730
|
+
syntax: '[expr:port="value"]',
|
|
1731
|
+
description: "Set a port from a JavaScript expression. The expression may reference upstream ports: Start.<param> or <node>.<port>, with any further property access after the port. Each reference becomes a data dependency the graph sees. The expression is the value."
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
name: "minimized",
|
|
1735
|
+
syntax: "[minimized]",
|
|
1736
|
+
description: "Collapse the node in the UI."
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
name: "pullExecution",
|
|
1740
|
+
syntax: "[pullExecution:port]",
|
|
1741
|
+
description: "Enable lazy execution for this instance."
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
name: "portOrder",
|
|
1745
|
+
syntax: "[portOrder:port=N]",
|
|
1746
|
+
description: "Override display order for a specific port."
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
name: "portLabel",
|
|
1750
|
+
syntax: '[portLabel:port="Label"]',
|
|
1751
|
+
description: "Override display label for a specific port."
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
name: "size",
|
|
1755
|
+
syntax: "[size:width,height]",
|
|
1756
|
+
description: "Set custom node dimensions."
|
|
1757
|
+
}
|
|
1758
|
+
];
|
|
1759
|
+
var ALL_ANNOTATIONS = [
|
|
1760
|
+
...CORE_ANNOTATIONS,
|
|
1761
|
+
...PORT_ANNOTATIONS,
|
|
1762
|
+
...WORKFLOW_ANNOTATIONS,
|
|
1763
|
+
...METADATA_ANNOTATIONS,
|
|
1764
|
+
...STANDARD_ANNOTATIONS
|
|
1765
|
+
];
|
|
1766
|
+
|
|
1767
|
+
// src/doc-metadata/extractors/error-codes.ts
|
|
1768
|
+
var VALIDATION_CODES = [
|
|
1769
|
+
// ── Structural ──────────────────────────────────────────────────────
|
|
1770
|
+
{
|
|
1771
|
+
code: "MISSING_WORKFLOW_NAME",
|
|
1772
|
+
severity: "error",
|
|
1773
|
+
title: "Missing Workflow Name",
|
|
1774
|
+
description: "Workflow has no name",
|
|
1775
|
+
category: "structural"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
code: "MISSING_FUNCTION_NAME",
|
|
1779
|
+
severity: "error",
|
|
1780
|
+
title: "Missing Function Name",
|
|
1781
|
+
description: "Workflow has no function name",
|
|
1782
|
+
category: "structural"
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
code: "DUPLICATE_NODE_NAME",
|
|
1786
|
+
severity: "error",
|
|
1787
|
+
title: "Duplicate Node Name",
|
|
1788
|
+
description: "Two node types share a function name",
|
|
1789
|
+
category: "structural"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
code: "MUTABLE_NODE_TYPE_BINDING",
|
|
1793
|
+
severity: "warning",
|
|
1794
|
+
title: "Mutable Node Binding",
|
|
1795
|
+
description: "Node type declared with let/var instead of const",
|
|
1796
|
+
category: "structural"
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
code: "INFERRED_NODE_TYPE",
|
|
1800
|
+
severity: "warning",
|
|
1801
|
+
title: "Inferred Node Type",
|
|
1802
|
+
description: "Node type auto-inferred without explicit annotation",
|
|
1803
|
+
category: "structural"
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
code: "ANNOTATION_SIGNATURE_MISMATCH",
|
|
1807
|
+
severity: "warning",
|
|
1808
|
+
title: "Optional Port Mismatch",
|
|
1809
|
+
description: "Port optionality differs between annotation and sig",
|
|
1810
|
+
category: "structural"
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
code: "ANNOTATION_SIGNATURE_TYPE_MISMATCH",
|
|
1814
|
+
severity: "warning",
|
|
1815
|
+
title: "Annotation Type Mismatch",
|
|
1816
|
+
description: "Port type differs between annotation and signature",
|
|
1817
|
+
category: "structural"
|
|
1818
|
+
},
|
|
1819
|
+
// ── Naming ──────────────────────────────────────────────────────────
|
|
1820
|
+
{
|
|
1821
|
+
code: "RESERVED_NODE_NAME",
|
|
1822
|
+
severity: "error",
|
|
1823
|
+
title: "Reserved Name Used",
|
|
1824
|
+
description: 'Node type uses "Start" or "Exit"',
|
|
1825
|
+
category: "naming"
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
code: "RESERVED_INSTANCE_ID",
|
|
1829
|
+
severity: "error",
|
|
1830
|
+
title: "Reserved Instance ID",
|
|
1831
|
+
description: 'Instance ID is "Start" or "Exit"',
|
|
1832
|
+
category: "naming"
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
code: "INVALID_SCOPE_NAME",
|
|
1836
|
+
severity: "error",
|
|
1837
|
+
title: "Invalid Scope Name",
|
|
1838
|
+
description: "A scoped port names a scope that is not a JavaScript identifier (scope names become identifiers in generated code)",
|
|
1839
|
+
category: "naming"
|
|
1840
|
+
},
|
|
1841
|
+
// ── Connection ──────────────────────────────────────────────────────
|
|
1842
|
+
{
|
|
1843
|
+
code: "UNKNOWN_SOURCE_NODE",
|
|
1844
|
+
severity: "error",
|
|
1845
|
+
title: "Missing Source Node",
|
|
1846
|
+
description: "Connection from nonexistent node",
|
|
1847
|
+
category: "connection"
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
code: "UNKNOWN_TARGET_NODE",
|
|
1851
|
+
severity: "error",
|
|
1852
|
+
title: "Missing Target Node",
|
|
1853
|
+
description: "Connection to nonexistent node",
|
|
1854
|
+
category: "connection"
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
code: "UNKNOWN_SOURCE_PORT",
|
|
1858
|
+
severity: "error",
|
|
1859
|
+
title: "Unknown Output Port",
|
|
1860
|
+
description: "Connection from nonexistent output port",
|
|
1861
|
+
category: "connection"
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
code: "UNKNOWN_TARGET_PORT",
|
|
1865
|
+
severity: "error",
|
|
1866
|
+
title: "Unknown Input Port",
|
|
1867
|
+
description: "Connection to nonexistent input port",
|
|
1868
|
+
category: "connection"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
code: "MULTIPLE_CONNECTIONS_TO_INPUT",
|
|
1872
|
+
severity: "error",
|
|
1873
|
+
title: "Multiple Input Connections",
|
|
1874
|
+
description: "Data input port has more than one source",
|
|
1875
|
+
category: "connection"
|
|
1876
|
+
},
|
|
1877
|
+
// ── Type ────────────────────────────────────────────────────────────
|
|
1878
|
+
{
|
|
1879
|
+
code: "STEP_PORT_TYPE_MISMATCH",
|
|
1880
|
+
severity: "error",
|
|
1881
|
+
title: "Wrong Port Type",
|
|
1882
|
+
description: "STEP port connected to data port or vice versa",
|
|
1883
|
+
category: "type"
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
code: "TYPE_INCOMPATIBLE",
|
|
1887
|
+
severity: "error",
|
|
1888
|
+
title: "Type Incompatible",
|
|
1889
|
+
description: "Type mismatch with @strictTypes enabled",
|
|
1890
|
+
category: "type"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
code: "OBJECT_TYPE_MISMATCH",
|
|
1894
|
+
severity: "warning",
|
|
1895
|
+
title: "Object Shape Mismatch",
|
|
1896
|
+
description: "OBJECT ports have different structural types",
|
|
1897
|
+
category: "type"
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
code: "LOSSY_TYPE_COERCION",
|
|
1901
|
+
severity: "warning",
|
|
1902
|
+
title: "Lossy Type Conversion",
|
|
1903
|
+
description: "Type coercion may lose information",
|
|
1904
|
+
category: "type"
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
code: "UNUSUAL_TYPE_COERCION",
|
|
1908
|
+
severity: "warning",
|
|
1909
|
+
title: "Unusual Type Coercion",
|
|
1910
|
+
description: "Type coercion is semantically unusual",
|
|
1911
|
+
category: "type"
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
code: "TYPE_MISMATCH",
|
|
1915
|
+
severity: "warning",
|
|
1916
|
+
title: "Type Mismatch",
|
|
1917
|
+
description: "Incompatible types, runtime coercion attempted",
|
|
1918
|
+
category: "type"
|
|
1919
|
+
},
|
|
1920
|
+
// ── Node Reference ──────────────────────────────────────────────────
|
|
1921
|
+
{
|
|
1922
|
+
code: "UNKNOWN_NODE_TYPE",
|
|
1923
|
+
severity: "error",
|
|
1924
|
+
title: "Unknown Node Type",
|
|
1925
|
+
description: "Instance references nonexistent node type",
|
|
1926
|
+
category: "node-ref"
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
code: "MISSING_REQUIRED_INPUT",
|
|
1930
|
+
severity: "error",
|
|
1931
|
+
title: "Missing Required Input",
|
|
1932
|
+
description: "Required input has no connection/default/expression",
|
|
1933
|
+
category: "node-ref"
|
|
1934
|
+
},
|
|
1935
|
+
// ── Graph ───────────────────────────────────────────────────────────
|
|
1936
|
+
{
|
|
1937
|
+
code: "CYCLE_DETECTED",
|
|
1938
|
+
severity: "error",
|
|
1939
|
+
title: "Circular Dependency Found",
|
|
1940
|
+
description: "Graph contains a loop",
|
|
1941
|
+
category: "graph"
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
code: "INVALID_EXIT_PORT_TYPE",
|
|
1945
|
+
severity: "error",
|
|
1946
|
+
title: "Invalid Exit Port Type",
|
|
1947
|
+
description: "Exit onSuccess/onFailure is not STEP type",
|
|
1948
|
+
category: "graph"
|
|
1949
|
+
},
|
|
1950
|
+
// ── Data Flow ───────────────────────────────────────────────────────
|
|
1951
|
+
{
|
|
1952
|
+
code: "UNUSED_NODE",
|
|
1953
|
+
severity: "warning",
|
|
1954
|
+
title: "Unused Node",
|
|
1955
|
+
description: "Node defined but not connected",
|
|
1956
|
+
category: "data-flow"
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
code: "NO_START_CONNECTIONS",
|
|
1960
|
+
severity: "warning",
|
|
1961
|
+
title: "No Start Connections",
|
|
1962
|
+
description: "No connections from Start",
|
|
1963
|
+
category: "data-flow"
|
|
1964
|
+
},
|
|
1965
|
+
{
|
|
1966
|
+
code: "NO_EXIT_CONNECTIONS",
|
|
1967
|
+
severity: "warning",
|
|
1968
|
+
title: "No Exit Connections",
|
|
1969
|
+
description: "No connections to Exit",
|
|
1970
|
+
category: "data-flow"
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
code: "UNUSED_OUTPUT_PORT",
|
|
1974
|
+
severity: "warning",
|
|
1975
|
+
title: "Unused Output Port",
|
|
1976
|
+
description: "Output port data is discarded",
|
|
1977
|
+
category: "data-flow"
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
code: "UNREACHABLE_EXIT_PORT",
|
|
1981
|
+
severity: "warning",
|
|
1982
|
+
title: "Unreachable Exit Port",
|
|
1983
|
+
description: "Exit port has no incoming connection",
|
|
1984
|
+
category: "data-flow"
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
code: "HTTP_PARAM_UNKNOWN",
|
|
1988
|
+
severity: "error",
|
|
1989
|
+
title: "HTTP route param is not a workflow param",
|
|
1990
|
+
description: "An @http route has a :param segment that names no parameter of the workflow",
|
|
1991
|
+
category: "data-flow"
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
code: "MULTIPLE_EXIT_CONNECTIONS",
|
|
1995
|
+
severity: "warning",
|
|
1996
|
+
title: "Multiple Exit Connections",
|
|
1997
|
+
description: "Exit port has multiple sources",
|
|
1998
|
+
category: "data-flow"
|
|
1999
|
+
},
|
|
2000
|
+
// ── Scope ───────────────────────────────────────────────────────────
|
|
2001
|
+
{
|
|
2002
|
+
code: "SCOPE_MISSING_REQUIRED_INPUT",
|
|
2003
|
+
severity: "error",
|
|
2004
|
+
title: "Scope Child Missing Input",
|
|
2005
|
+
description: "Required input port on a scoped child has no connection",
|
|
2006
|
+
category: "graph"
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
code: "SCOPE_UNUSED_INPUT",
|
|
2010
|
+
severity: "warning",
|
|
2011
|
+
title: "Scope Input Unused",
|
|
2012
|
+
description: "Scoped input port has no connection from inner nodes",
|
|
2013
|
+
category: "graph"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
code: "SCOPE_WRONG_SCOPE_NAME",
|
|
2017
|
+
severity: "error",
|
|
2018
|
+
title: "Invalid Scope Qualifier",
|
|
2019
|
+
description: "Connection uses a scope name not defined on the node",
|
|
2020
|
+
category: "graph"
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
code: "SCOPE_CONNECTION_OUTSIDE",
|
|
2024
|
+
severity: "error",
|
|
2025
|
+
title: "Scope Connection Leak",
|
|
2026
|
+
description: "Scoped connection references a node outside the scope",
|
|
2027
|
+
category: "graph"
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
code: "SCOPE_PORT_TYPE_MISMATCH",
|
|
2031
|
+
severity: "warning",
|
|
2032
|
+
title: "Scope Port Type Mismatch",
|
|
2033
|
+
description: "Type mismatch between scoped port and connected child port",
|
|
2034
|
+
category: "type"
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
code: "SCOPE_UNKNOWN_PORT",
|
|
2038
|
+
severity: "error",
|
|
2039
|
+
title: "Unknown Scoped Port",
|
|
2040
|
+
description: "Connection references a port that is not a scoped port of the specified scope",
|
|
2041
|
+
category: "connection"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
code: "SCOPE_ORPHANED_CHILD",
|
|
2045
|
+
severity: "warning",
|
|
2046
|
+
title: "Orphaned Scope Child",
|
|
2047
|
+
description: "Child node in scope has no scoped connections to parent",
|
|
2048
|
+
category: "graph"
|
|
2049
|
+
},
|
|
2050
|
+
// ── Agent ───────────────────────────────────────────────────────────
|
|
2051
|
+
{
|
|
2052
|
+
code: "AGENT_LLM_MISSING_ERROR_HANDLER",
|
|
2053
|
+
severity: "error",
|
|
2054
|
+
title: "LLM Missing Error Handler",
|
|
2055
|
+
description: "LLM node's onFailure port is unconnected",
|
|
2056
|
+
category: "agent"
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
code: "AGENT_UNGUARDED_TOOL_EXECUTOR",
|
|
2060
|
+
severity: "warning",
|
|
2061
|
+
title: "Unguarded Tool Executor",
|
|
2062
|
+
description: "Tool executor has no upstream human-approval gate",
|
|
2063
|
+
category: "agent"
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
code: "AGENT_MISSING_MEMORY_IN_LOOP",
|
|
2067
|
+
severity: "warning",
|
|
2068
|
+
title: "No Memory in Agent Loop",
|
|
2069
|
+
description: "Loop has LLM but no conversation memory node",
|
|
2070
|
+
category: "agent"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
code: "AGENT_LLM_NO_FALLBACK",
|
|
2074
|
+
severity: "warning",
|
|
2075
|
+
title: "LLM Failure Goes to Exit",
|
|
2076
|
+
description: "LLM onFailure routes directly to Exit",
|
|
2077
|
+
category: "agent"
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
code: "AGENT_TOOL_NO_OUTPUT_HANDLING",
|
|
2081
|
+
severity: "warning",
|
|
2082
|
+
title: "Tool Results Discarded",
|
|
2083
|
+
description: "Tool executor data outputs all unconnected",
|
|
2084
|
+
category: "agent"
|
|
2085
|
+
},
|
|
2086
|
+
// ── Design ──────────────────────────────────────────────────────────
|
|
2087
|
+
{
|
|
2088
|
+
code: "DESIGN_ASYNC_NO_ERROR_PATH",
|
|
2089
|
+
severity: "warning",
|
|
2090
|
+
title: "Async Node Missing Error Path",
|
|
2091
|
+
description: "Async node has no onFailure connection (durable gates are exempt: their body never runs and their failure arm is the resolver's rejection)",
|
|
2092
|
+
category: "design"
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
code: "DESIGN_SCOPE_NO_FAILURE_EXIT",
|
|
2096
|
+
severity: "warning",
|
|
2097
|
+
title: "Scope Missing Failure Exit",
|
|
2098
|
+
description: "Scope node has no failure path out",
|
|
2099
|
+
category: "design"
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
code: "DESIGN_UNBOUNDED_RETRY",
|
|
2103
|
+
severity: "warning",
|
|
2104
|
+
title: "Unbounded Retry Loop",
|
|
2105
|
+
description: "Retry scope has no visible attempt limit",
|
|
2106
|
+
category: "design"
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
code: "DESIGN_FANOUT_NO_FANIN",
|
|
2110
|
+
severity: "warning",
|
|
2111
|
+
title: "Fan-Out Without Fan-In",
|
|
2112
|
+
description: "Fan-out to multiple step targets with no merge back",
|
|
2113
|
+
category: "design"
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
code: "DESIGN_EXIT_DATA_UNREACHABLE",
|
|
2117
|
+
severity: "warning",
|
|
2118
|
+
title: "Exit Data Unreachable",
|
|
2119
|
+
description: "Exit data port has no connection and no pull-execution provider",
|
|
2120
|
+
category: "design"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
code: "DESIGN_PULL_CANDIDATE",
|
|
2124
|
+
severity: "warning",
|
|
2125
|
+
title: "Pull Execution Candidate",
|
|
2126
|
+
description: "Node has no step trigger but its outputs are consumed downstream",
|
|
2127
|
+
category: "design"
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
code: "DESIGN_PULL_UNUSED",
|
|
2131
|
+
severity: "warning",
|
|
2132
|
+
title: "Unused Pull Execution",
|
|
2133
|
+
description: "Pull-execution node has no downstream consumers",
|
|
2134
|
+
category: "design"
|
|
2135
|
+
},
|
|
2136
|
+
// ── Previously undocumented (emitted by the validator, missing from the catalogue) ──
|
|
2137
|
+
{
|
|
2138
|
+
code: "DUPLICATE_INSTANCE_ID",
|
|
2139
|
+
severity: "error",
|
|
2140
|
+
title: "Duplicate Instance ID",
|
|
2141
|
+
description: "Two @node declarations in one workflow use the same ID. Each instance ID must be unique",
|
|
2142
|
+
category: "structural"
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
code: "STUB_NODE",
|
|
2146
|
+
severity: "error",
|
|
2147
|
+
title: "Stub Node",
|
|
2148
|
+
description: "An instance uses a node type that has no implementation. Implement it, or validate in draft mode to check structure only",
|
|
2149
|
+
category: "node-ref"
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
code: "DUPLICATE_CONNECTION",
|
|
2153
|
+
severity: "error",
|
|
2154
|
+
title: "Duplicate Connection",
|
|
2155
|
+
description: "The same from-port to to-port connection is declared more than once",
|
|
2156
|
+
category: "connection"
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
code: "CROSS_SCOPE_CONNECTION",
|
|
2160
|
+
severity: "error",
|
|
2161
|
+
title: "Cross-Scope Connection",
|
|
2162
|
+
description: "A connection links nodes that live in different scopes. Nodes in different scopes cannot connect directly",
|
|
2163
|
+
category: "connection"
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
code: "SCOPE_INCONSISTENT",
|
|
2167
|
+
severity: "error",
|
|
2168
|
+
title: "Inconsistent Scope Membership",
|
|
2169
|
+
description: "An instance is listed in more than one scope. A node can belong to only one scope",
|
|
2170
|
+
category: "graph"
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
code: "SCOPE_EMPTY",
|
|
2174
|
+
severity: "warning",
|
|
2175
|
+
title: "Empty Scope",
|
|
2176
|
+
description: "A scope declared on a node has no child nodes",
|
|
2177
|
+
category: "graph"
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
code: "COERCE_ON_FUNCTION_PORT",
|
|
2181
|
+
severity: "error",
|
|
2182
|
+
title: "Coercion On Function Port",
|
|
2183
|
+
description: "An `as` coercion is applied to a FUNCTION port. Function values cannot be meaningfully coerced",
|
|
2184
|
+
category: "type"
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
code: "COERCE_TYPE_MISMATCH",
|
|
2188
|
+
severity: "warning",
|
|
2189
|
+
title: "Coercion Type Mismatch",
|
|
2190
|
+
description: "An `as` coercion produces a type the target port does not expect. Use the coercion that matches the target",
|
|
2191
|
+
category: "type"
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
code: "REDUNDANT_COERCE",
|
|
2195
|
+
severity: "warning",
|
|
2196
|
+
title: "Redundant Coercion",
|
|
2197
|
+
description: "An `as` coercion converts between identical source and target types and does nothing",
|
|
2198
|
+
category: "type"
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
code: "INVALID_PORT_TYPE",
|
|
2202
|
+
severity: "warning",
|
|
2203
|
+
title: "Invalid Port Type",
|
|
2204
|
+
description: "A port declares a dataType that is not a recognised Flow Weaver type",
|
|
2205
|
+
category: "type"
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
code: "INVALID_COLOR",
|
|
2209
|
+
severity: "warning",
|
|
2210
|
+
title: "Invalid Color",
|
|
2211
|
+
description: "A node type uses an @color value that is not in the palette. See the visual-reference topic for valid colors",
|
|
2212
|
+
category: "structural"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
code: "INVALID_ICON",
|
|
2216
|
+
severity: "warning",
|
|
2217
|
+
title: "Invalid Icon",
|
|
2218
|
+
description: "A node type uses an @icon value that is not a Material Symbols name (snake_case or camelCase). See the visual-reference topic",
|
|
2219
|
+
category: "structural"
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
code: "INVALID_EXECUTE_WHEN",
|
|
2223
|
+
severity: "warning",
|
|
2224
|
+
title: "Invalid Execute-When Strategy",
|
|
2225
|
+
description: "A node type declares an @executeWhen value that is not a recognised execution strategy",
|
|
2226
|
+
category: "structural"
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
code: "INVALID_PORT_CONFIG_REF",
|
|
2230
|
+
severity: "warning",
|
|
2231
|
+
title: "Invalid Port Config Reference",
|
|
2232
|
+
description: "An instance configures a port (portOrder, portLabel, expr) that does not exist on its node type",
|
|
2233
|
+
category: "structural"
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
code: "EXPRESSION_SYNTAX",
|
|
2237
|
+
severity: "error",
|
|
2238
|
+
title: "Expression Is Not JavaScript",
|
|
2239
|
+
description: `An [expr:] binding or an Expression: default does not parse as a JavaScript expression (text needs quotes inside the attribute: timeout="'24h'"). It would otherwise fail only when the generated file is transpiled`,
|
|
2240
|
+
category: "structural"
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
code: "DURABLE_CLOSURE_INVALID",
|
|
2244
|
+
severity: "error",
|
|
2245
|
+
title: "Invalid Durable Closure",
|
|
2246
|
+
description: "A workflow with a durable gate breaks a durability rule (a gate/effect in more than one branch region or taking data from outside it, pull/lazy execution, an unclassified node, or a bad effect contract). Surfaced at author time. The coordinator would otherwise reject it only at run time.",
|
|
2247
|
+
category: "graph"
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
code: "SUPPRESS_UNKNOWN_CODE",
|
|
2251
|
+
severity: "warning",
|
|
2252
|
+
title: "Unknown Suppress Code",
|
|
2253
|
+
description: 'A [suppress: ...] entry cannot be a validation code, so it suppresses nothing. Codes are separate string literals, e.g. [suppress: "A", "B"], not [suppress: "A,B"]',
|
|
2254
|
+
category: "structural"
|
|
2255
|
+
}
|
|
2256
|
+
];
|
|
2257
|
+
|
|
2258
|
+
// src/doc-metadata/extractors/grammar-rules.ts
|
|
2259
|
+
function extractGrammarEBNF() {
|
|
2260
|
+
const grammars = getAllGrammars();
|
|
2261
|
+
const groups = [];
|
|
2262
|
+
for (const [name, productions] of Object.entries(grammars)) {
|
|
2263
|
+
const ebnf = serializedToEBNF(productions);
|
|
2264
|
+
if (ebnf.trim()) {
|
|
2265
|
+
groups.push({ name, ebnf });
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
return groups;
|
|
2269
|
+
}
|
|
2270
|
+
function extractTerminals() {
|
|
2271
|
+
return [
|
|
2272
|
+
{
|
|
2273
|
+
name: "IDENTIFIER",
|
|
2274
|
+
pattern: "[a-zA-Z_$] [a-zA-Z0-9_$\\/-]*",
|
|
2275
|
+
description: "IDENTIFIER supports `/` and `-` to accommodate npm package naming conventions (e.g., `npm/react-window/areEqual`)."
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
name: "INTEGER",
|
|
2279
|
+
pattern: '"-"? [0-9]+',
|
|
2280
|
+
description: "Signed integer literal."
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
name: "STRING",
|
|
2284
|
+
pattern: `'"' { any character except '"' or '\\', or escape sequence } '"'`,
|
|
2285
|
+
description: "Double-quoted string with escape sequences."
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
name: "TEXT",
|
|
2289
|
+
pattern: "any characters to end of line",
|
|
2290
|
+
description: "Free-form text to end of line (used in descriptions)."
|
|
2291
|
+
}
|
|
2292
|
+
];
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
// src/doc-metadata/extractors/core-metadata.ts
|
|
2296
|
+
var DATA_TYPES = [
|
|
2297
|
+
"STRING",
|
|
2298
|
+
"NUMBER",
|
|
2299
|
+
"BOOLEAN",
|
|
2300
|
+
"OBJECT",
|
|
2301
|
+
"ARRAY",
|
|
2302
|
+
"FUNCTION",
|
|
2303
|
+
"STEP",
|
|
2304
|
+
"ANY"
|
|
2305
|
+
];
|
|
2306
|
+
var MERGE_STRATEGIES = ["FIRST", "LAST", "COLLECT", "MERGE", "CONCAT"];
|
|
2307
|
+
var BRANCHING_STRATEGY_VALUES = ["value-based", "exception-based", "none"];
|
|
2308
|
+
var EXECUTION_STRATEGY_VALUES = ["CONJUNCTION", "DISJUNCTION", "CUSTOM"];
|
|
2309
|
+
var WORKFLOW_TEMPLATES = workflowTemplates.map(
|
|
2310
|
+
({ id, name, description, category }) => ({ id, name, description, category })
|
|
2311
|
+
);
|
|
2312
|
+
var NODE_TEMPLATES = nodeTemplates.map(
|
|
2313
|
+
({ id, name, description, category }) => ({ id, name, description, category })
|
|
2314
|
+
);
|
|
2315
|
+
var PACKAGE_EXPORTS = [
|
|
2316
|
+
{ subpath: ".", description: "Core library (parser, validator, compiler)" },
|
|
2317
|
+
{ subpath: "./runtime", description: "Workflow runtime executor" },
|
|
2318
|
+
{ subpath: "./compiler", description: "Build-only executable artifact compiler" },
|
|
2319
|
+
{ subpath: "./built-in-nodes", description: "Standard node type library" },
|
|
2320
|
+
{ subpath: "./diagram", description: "Diagram rendering (SVG/Mermaid)" },
|
|
2321
|
+
{ subpath: "./describe", description: "Workflow description formatter" },
|
|
2322
|
+
{ subpath: "./doc-metadata", description: "Documentation metadata extractors" },
|
|
2323
|
+
{ subpath: "./docs", description: "Documentation generation utilities" },
|
|
2324
|
+
{ subpath: "./ast", description: "AST type definitions and builders" },
|
|
2325
|
+
{ subpath: "./api", description: "Public API (parseWorkflow, validateWorkflow, etc.)" },
|
|
2326
|
+
{ subpath: "./diff", description: "Workflow semantic diff engine" },
|
|
2327
|
+
{ subpath: "./editor", description: "Editor completions and diagnostics" },
|
|
2328
|
+
{ subpath: "./browser", description: "Browser-compatible JSDoc port sync" },
|
|
2329
|
+
{ subpath: "./generated-branding", description: "Generated branding configuration" },
|
|
2330
|
+
{ subpath: "./npm-packages", description: "NPM package metadata" },
|
|
2331
|
+
{ subpath: "./deployment", description: "Deployment target configurations" },
|
|
2332
|
+
{ subpath: "./marketplace", description: "Extension/pack marketplace APIs" },
|
|
2333
|
+
{ subpath: "./testing", description: "Testing utilities" },
|
|
2334
|
+
{ subpath: "./generator", description: "Code generation" },
|
|
2335
|
+
{ subpath: "./constants", description: "Constants and reserved names" },
|
|
2336
|
+
{ subpath: "./cli", description: "CLI command definitions" },
|
|
2337
|
+
{ subpath: "./version", description: "Package version metadata" },
|
|
2338
|
+
{ subpath: "./context", description: "LLM context generation" },
|
|
2339
|
+
{ subpath: "./agent", description: "Provider-agnostic agent tooling" },
|
|
2340
|
+
{ subpath: "./console", description: "The local operator console server" },
|
|
2341
|
+
{ subpath: "./coordinator", description: "Local run coordinator: start, resume and watch gated workflows from code" },
|
|
2342
|
+
{ subpath: "./server", description: "Workflows as HTTP endpoints: createWorkflowApi with Node, Express and fetch adapters, the handler behind fw serve" }
|
|
2343
|
+
];
|
|
2344
|
+
export {
|
|
2345
|
+
ALL_ANNOTATIONS,
|
|
2346
|
+
BRANCHING_STRATEGIES,
|
|
2347
|
+
BRANCHING_STRATEGY_VALUES,
|
|
2348
|
+
CLI_COMMANDS,
|
|
2349
|
+
DATA_TYPES,
|
|
2350
|
+
EXECUTION_STRATEGIES,
|
|
2351
|
+
EXECUTION_STRATEGY_VALUES,
|
|
2352
|
+
MCP_TOOLS,
|
|
2353
|
+
MERGE_STRATEGIES,
|
|
2354
|
+
NODE_MODIFIERS,
|
|
2355
|
+
NODE_TEMPLATES,
|
|
2356
|
+
PACKAGE_EXPORTS,
|
|
2357
|
+
PORT_MODIFIERS,
|
|
2358
|
+
RESERVED_NODE_NAMES,
|
|
2359
|
+
RESERVED_PORT_NAMES,
|
|
2360
|
+
SCOPED_PORT_NAMES,
|
|
2361
|
+
VALIDATION_CODES,
|
|
2362
|
+
VALID_NODE_COLORS,
|
|
2363
|
+
WORKFLOW_TEMPLATES,
|
|
2364
|
+
extractCliCommands,
|
|
2365
|
+
extractGrammarEBNF,
|
|
2366
|
+
extractMcpTools,
|
|
2367
|
+
extractTerminals
|
|
2368
|
+
};
|