CloudArch Codeflow

v0.1.1
ru.cloud-arch/cloudarch-codeflow Checked 2 days ago Published 3 months ago

Turn a TypeScript codebase into a live animated call-flow diagram on CloudArch.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

analyze_codeflow

Analyse a TypeScript project and visualise the call flow from a given entry method/function as an animated CloudArch diagram. Walks the AST, builds a unified call graph (class methods AND module-level functions), reachability-traces from the entry, lays it out by architectural layer (controllers/services/repos/infra) detected from file paths, and publishes it. Detects Promise.all (rendered as parallel block) and try/catch (catch path rendered as showError). Returns the diagram URL. Out of scope for now: if/else branching, super/inheritance, decorator-based DI, non-TS languages.

ParameterTypeDescription
entry *stringEntry point. Accepts: 'ClassName.methodName' (single class method), 'ClassName.*' (all public methods of class as scenarios), 'moduleName:funcName' (single function), 'moduleName:*' (all functions of…
projectPath *stringAbsolute path to a directory containing tsconfig.json (the root of the TS project to analyse).
additionalEntriesarrayExtra entries (same syntax as `entry`) rendered as additional scenarios on the same diagram. Use this when you want to compare or co-visualise several flows that share infrastructure.
isPublicbooleanWhether the diagram is publicly visible. Defaults to false (your own code is usually private).
namestringName for the published diagram. Auto-generated from entry if omitted.
slugstringURL slug for the diagram. Auto-generated if omitted.

list_entry_candidates

Suggest analyse-able entry points for a TypeScript project. Scans all classes and module-level functions, ranks them by 'how likely is this a flow start' — controllers/routes score highest, repos/infra lowest, action-style names (create*/update*/process*/handle*/...) get a bump, and entries with a richer reachable subgraph beat leaves. Use this BEFORE `analyze_codeflow` when you don't know the project's structure — pick a candidate from the result and pass its `entry` field to the analyser. Returns a ranked list with file paths and reasons.

ParameterTypeDescription
projectPath *stringAbsolute path to a directory containing tsconfig.json (the root of the TS project to inspect).
limitnumberMax candidates to return (default 20). Lower for a quick overview, higher to see everything.