Skip to content

Commit f29c8de

Browse files
authored
Merge pull request #9 from AckerlyLau/main
Improve visualizer preview parsing, refresh README messaging, and streamline manual release workflows
2 parents 26e96d7 + 57b59d6 commit f29c8de

32 files changed

+4228
-543
lines changed

.github/workflows/docs-pages.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
name: Deploy VitePress Site to Pages
44

55
on:
6-
push:
7-
branches: [main]
86
workflow_dispatch:
97

108
permissions:
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Publish VS Code Extension
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target:
7+
description: Publish target
8+
required: true
9+
default: both
10+
type: choice
11+
options:
12+
- both
13+
- vscode-marketplace
14+
- open-vsx
15+
dry_run:
16+
description: Package only and skip actual publishing
17+
required: true
18+
default: false
19+
type: boolean
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
publish:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout source
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
cache: npm
37+
cache-dependency-path: |
38+
masfactory-visualizer/package-lock.json
39+
masfactory-visualizer/webview-ui/package-lock.json
40+
41+
- name: Install extension dependencies
42+
working-directory: masfactory-visualizer
43+
run: npm ci
44+
45+
- name: Install webview dependencies
46+
working-directory: masfactory-visualizer/webview-ui
47+
run: npm ci
48+
49+
- name: Run extension tests
50+
working-directory: masfactory-visualizer
51+
run: npm test
52+
53+
- name: Package VSIX
54+
id: package_extension
55+
uses: HaaLeo/publish-vscode-extension@v2
56+
with:
57+
pat: dry-run-token
58+
packagePath: ./masfactory-visualizer
59+
dryRun: true
60+
61+
- name: Upload VSIX artifact
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: masfactory-visualizer-vsix
65+
path: ${{ steps.package_extension.outputs.vsixPath }}
66+
67+
- name: Publish to Open VSX
68+
if: ${{ !inputs.dry_run && (inputs.target == 'both' || inputs.target == 'open-vsx') }}
69+
uses: HaaLeo/publish-vscode-extension@v2
70+
with:
71+
pat: ${{ secrets.OPEN_VSX_TOKEN }}
72+
extensionFile: ${{ steps.package_extension.outputs.vsixPath }}
73+
skipDuplicate: true
74+
75+
- name: Publish to Visual Studio Marketplace
76+
if: ${{ !inputs.dry_run && (inputs.target == 'both' || inputs.target == 'vscode-marketplace') }}
77+
uses: HaaLeo/publish-vscode-extension@v2
78+
with:
79+
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
80+
registryUrl: https://marketplace.visualstudio.com
81+
extensionFile: ${{ steps.package_extension.outputs.vsixPath }}
82+
skipDuplicate: true

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,7 @@ config.local.toml
129129
tmp/
130130
temp/
131131
bug_pic/
132-
test/**
133132
test/
134-
!test/
135-
!test/masfactory-visualizer/
136-
!test/masfactory-visualizer/**
137-
!test/test_*.py
138-
!test/**/test_*.py
139-
test/masfactory-visualizer/**/__pycache__/
140-
test/masfactory-visualizer/**/*.py[cod]
141133
masfactory-visualizer/test/**
142134
masfactory-visualizer/test/
143135
**/tests/

README.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,42 @@
1111
/>
1212
</div>
1313
<p align="center">
14-
【English | <a href="README.zh.md">Chinese</a>】
14+
<a href="README.zh.md">
15+
<img alt="Chinese README" src="https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87-5c7cfa" />
16+
</a>
17+
<a href="http://arxiv.org/abs/2603.06007">
18+
<img alt="Paper" src="https://img.shields.io/badge/Paper%20%7C%20-2603.06007-b31b1b?logo=arxiv&logoColor=white" />
19+
</a>
20+
<a href="https://www.youtube.com/watch?v=QFlQuX_cddk">
21+
<img alt="Video Vibe Graphing" src="https://img.shields.io/badge/Video%20%7C%20-Vibe%20Graphing-ff0000?logo=youtube&logoColor=white" />
22+
</a>
23+
<a href="https://www.youtube.com/watch?v=ANynzVfY32k">
24+
<img alt="Video Demonstration" src="https://img.shields.io/badge/Video%20%7C%20-Demo-d35400?logo=youtube&logoColor=white" />
25+
</a>
26+
<a href="LICENSE">
27+
<img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-5b8c5a" />
28+
</a>
1529
</p>
1630

17-
## 📖 Overview
18-
1931
**MASFactory** is a graph-centric framework for orchestrating Multi-Agent Systems with **Vibe Graphing**:
20-
start from intent, generate a graph design, preview and refine it in a visual environment, compile it into an executable workflow, and trace node states, messages, and shared state at runtime.
2132

22-
Documentation: https://bupt-gamma.github.io/MASFactory/
33+
Start from intent, generate a graph design, preview and refine it in a visual environment, compile it into an executable workflow, and trace node states, messages, and shared state at runtime.
2334

24-
Key capabilities:
35+
- Paper: http://arxiv.org/abs/2603.06007
36+
- Documentation: https://bupt-gamma.github.io/MASFactory/
37+
- Demonstration Video: https://www.youtube.com/watch?v=ANynzVfY32k
38+
- Vibe Graphing explainer (Discover AI): https://www.youtube.com/watch?v=QFlQuX_cddk
2539

26-
- **Vibe Graphing (intent → graph):** turn natural-language intent into a structural design, then iteratively converge to an executable, reusable workflow.
27-
- **Graph-style composition:** describe workflow and field contracts explicitly with `Node` / `Edge`; supports subgraphs, loops, branches, and composite components.
28-
- **Visualization and observability:** **MASFactory Visualizer** provides topology preview, runtime tracing, and human-in-the-loop interaction.
29-
- **Context protocol (`ContextBlock`):** organize Memory / RAG / MCP context sources in a structured way, with automatic injection and on-demand retrieval.
40+
## ✨ Key Features
41+
42+
- 🪄 **Vibe Graphing (intent → graph)**
43+
Turn natural-language intent into a structural design, then iteratively converge to an executable, reusable workflow.
44+
- 🧱 **Graph-style composition**
45+
Describe workflow and field contracts explicitly with `Node` / `Edge`; supports subgraphs, loops, branches, and composite components.
46+
- 👁️ **Visualization and observability**
47+
**MASFactory Visualizer** provides topology preview, runtime tracing, and human-in-the-loop interaction.
48+
- 🧠 **Context protocol (`ContextBlock`)**
49+
Organize Memory / RAG / MCP context sources in a structured way, with automatic injection and on-demand retrieval.
3050

3151
## 🧭 Why Choose MASFactory
3252

@@ -44,10 +64,10 @@ This shifts human effort away from low-level wiring and repetitive configuration
4464

4565
Viewed more directly, today's multi-agent development frameworks roughly fall into the following categories:
4666

47-
| Platform Type | Representative Products | Positioning | Support for Multi-Agent Systems |
67+
| Platform | Products | Focus | Strength & Limits |
4868
| --- | --- | --- | --- |
49-
| **Code frameworks** | `MASFactory`, ChatDev2(DevAll), LangGraph, AutoGen | Build complex multi-agent systems | Still highly dependent on handwritten code and engineering implementation |
50-
| **Low-code workflow platforms** | `MASFactory`, ChatDev2(DevAll), Coze, Dify | Lower the barrier to building multi-agent systems with low-code workflows | Difficult to support deep customization and complex topologies for advanced systems |
69+
| **Code frameworks** | `MASFactory`, ChatDev2(DevAll), LangGraph, AutoGen | Build complex multi-agent systems | Offer extremely high flexibility and extensibility, but have a higher entry barrier, require learning a DSL, and usually involve substantial development cost |
70+
| **Low-code workflow platforms** | `MASFactory`, ChatDev2(DevAll), Coze, Dify | Lower the barrier to building multi-agent systems with low-code workflows | Lower the development barrier, but still rely heavily on manual human orchestration |
5171
| **Vibe Graphing orchestration frameworks** | `MASFactory` | Rapidly design and iterate multi-agent systems with lower human cost | Humans do not need to spend much effort on coding or dragging nodes, only on clearly describing needs and refining the design through dialogue |
5272

5373
## 🏗️ System Architecture
@@ -251,8 +271,6 @@ Documentation: https://bupt-gamma.github.io/MASFactory/
251271

252272
## 📄 Citation
253273

254-
If you use MASFactory in your research, please cite:
255-
256274
```bibtex
257275
@article{liu2026masfactory,
258276
title = {MASFactory: A Graph-centric Framework for Orchestrating LLM-Based Multi-Agent Systems with Vibe Graphing},

README.zh.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,42 @@
1111
/>
1212
</div>
1313
<p align="center">
14-
【<a href="README.md">English</a> | Chinese】
14+
<a href="README.md">
15+
<img alt="English README" src="https://img.shields.io/badge/README-English-4c6ef5" />
16+
</a>
17+
<a href="http://arxiv.org/abs/2603.06007">
18+
<img alt="Paper" src="https://img.shields.io/badge/Paper%20%7C%20-2603.06007-b31b1b?logo=arxiv&logoColor=white" />
19+
</a>
20+
<a href="https://www.youtube.com/watch?v=QFlQuX_cddk">
21+
<img alt="Video Vibe Graphing" src="https://img.shields.io/badge/Video%20%7C%20-Vibe%20Graphing-ff0000?logo=youtube&logoColor=white" />
22+
</a>
23+
<a href="https://www.youtube.com/watch?v=ANynzVfY32k">
24+
<img alt="Video Demonstration" src="https://img.shields.io/badge/Video%20%7C%20-Demo-d35400?logo=youtube&logoColor=white" />
25+
</a>
26+
<a href="LICENSE">
27+
<img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-5b8c5a" />
28+
</a>
1529
</p>
1630

17-
## 📖 概述
31+
**MASFactory** 是一个以图结构为核心的 Multi‑Agent Orchestration 框架,面向 **Vibe Graphing** 场景打造:
1832

19-
**MASFactory** 是一个以图结构为核心的 Multi‑Agent Orchestration 框架,面向 **Vibe Graphing** 场景打造:从意图出发生成图结构设计,在可视化环境中预览与编辑迭代收敛,最终编译为可运行的工作流,并在运行时追踪节点状态、消息与共享状态变化。
33+
从意图出发生成图结构设计,在可视化环境中预览与编辑迭代收敛,最终编译为可运行的工作流,并在运行时追踪节点状态、消息与共享状态变化。
2034

21-
在线文档:https://bupt-gamma.github.io/MASFactory/
35+
- Paper: http://arxiv.org/abs/2603.06007
36+
- Documentation: https://bupt-gamma.github.io/MASFactory/
37+
- Demonstration Video: https://www.youtube.com/watch?v=ANynzVfY32k
38+
- Vibe Graphing 讲解(Discover AI): https://www.youtube.com/watch?v=QFlQuX_cddk
2239

23-
核心能力:
40+
## ✨ Key Features
2441

25-
- **Vibe Graphing(intent → graph):** 从自然语言意图形成结构设计,并迭代收敛到可执行、可复用的工作流。
26-
- **Graph 积木式搭建:**`Node/Edge` 显式描述流程与字段契约,支持子图、循环、分支与复合组件。
27-
- **可视化与可观测:** 配套 **MASFactory Visualizer** 提供拓扑预览、运行追踪与人机交互能力。
28-
- **上下文协议(ContextBlock):** 以结构化方式组织 Memory / RAG / MCP 等上下文源,支持自动注入与按需检索。
42+
- 🪄 **Vibe Graphing(intent → graph)**
43+
从自然语言意图形成结构设计,并迭代收敛到可执行、可复用的工作流。
44+
- 🧱 **Graph 积木式搭建**
45+
`Node/Edge` 显式描述流程与字段契约,支持子图、循环、分支与复合组件。
46+
- 👁️ **可视化与可观测**
47+
配套 **MASFactory Visualizer** 提供拓扑预览、运行追踪与人机交互能力。
48+
- 🧠 **上下文协议(ContextBlock)**
49+
以结构化方式组织 Memory / RAG / MCP 等上下文源,支持自动注入与按需检索。
2950

3051
## 🧭 为什么选择 MASFactory
3152

@@ -43,10 +64,10 @@
4364

4465
如果用更直观的方式来看今天的多智能体开发工具,大致可以分成下面几类:
4566

46-
| 平台类型 | 代表产品 | 定位 | 对多智能体的支持 |
67+
| 平台 | 产品 | 侧重点 | 优势与局限 |
4768
| -------------------------- | -------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------ |
48-
| **代码框架** | `MASFactory`、ChatDev2(DevAll)、LangGraph、AutoGen | 构建复杂多智能体系统 | 高度依赖手写代码与工程实现 |
49-
| **低代码工作流平台** | `MASFactory`、ChatDev2(DevAll)、Coze、Dify | 低门槛低代码开发多智能体系统 | 难以支撑复杂多智能体系统的深度定制与复杂拓扑 |
69+
| **代码框架** | `MASFactory`、ChatDev2(DevAll)、LangGraph、AutoGen | 构建复杂多智能体系统 | 具备极高的灵活性和扩展性,但门槛较高,需要学习 DSL,并且存在较高的开发成本 |
70+
| **低代码工作流平台** | `MASFactory`、ChatDev2(DevAll)、Coze、Dify | 低门槛低代码开发多智能体系统 | 降低了开发门槛,但依然依赖大量人力手动编排 |
5071
| **Vibe Graphing 编排框架** | `MASFactory` | 低人力成本实现多智能体系统快速设计和迭代 | 人类无需付出过多的开发、拖拽的操作,只需要将自己的需求描述清楚,并在对话中细化设计细节。 |
5172

5273
## 🏗️ 系统框架图
@@ -246,8 +267,6 @@ python applications/camel/main.py "Create a sample adder by using python"
246267

247268
## 📄 引用
248269

249-
如果 MASFactory 对你的研究有帮助,欢迎引用:
250-
251270
```bibtex
252271
@article{liu2026masfactory,
253272
title = {MASFactory: A Graph-centric Framework for Orchestrating LLM-Based Multi-Agent Systems with Vibe Graphing},

masfactory-visualizer/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

masfactory-visualizer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"publisher": "GammaLab",
55
"description": "Visualize, edit, and debug MASFactory workflows in VS Code with realtime graph preview and HITL support.",
66
"icon": "media/icon.png",
7-
"version": "1.0.1",
7+
"version": "1.0.2",
88
"repository": {
99
"type": "git",
1010
"url": "https://github.com/BUPT-GAMMA/MASFactory.git"

masfactory-visualizer/src/parser/astUtils.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ export function getBaseClasses(classNode: TSNode): string[] {
5555
return bases;
5656
}
5757

58+
/**
59+
* Collect local class -> base class mappings from a module.
60+
*/
61+
export function collectClassBases(rootNode: TSNode, code: string): { [name: string]: string[] } {
62+
const out: { [name: string]: string[] } = {};
63+
for (const classNode of queryNodes(rootNode, 'class_definition')) {
64+
const nameNode = classNode.childForFieldName('name');
65+
const className = getNodeText(nameNode, code).trim();
66+
if (!className) continue;
67+
out[className] = getBaseClasses(classNode);
68+
}
69+
return out;
70+
}
71+
5872
/**
5973
* Parse dictionary argument (for keys, pull_keys, push_keys)
6074
*/

masfactory-visualizer/src/parser/buildMethodParser.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,17 @@ export function findBuildMethodAndBaseType(node: TSNode): BuildMethodInfo {
3434
const bases = getBaseClasses(classNode);
3535
const nameNode = classNode.childForFieldName('name');
3636
const currentClassName = nameNode ? nameNode.text : '';
37+
let candidateBaseType: string = BASE_TYPES.NONE;
3738

3839
// Check if this class inherits from a graph base type
3940
for (const base of bases) {
4041
if (GRAPH_BASE_TYPES.some(t => base.includes(t))) {
41-
className = currentClassName;
42-
4342
if (base.includes('Loop')) {
44-
baseType = BASE_TYPES.LOOP;
43+
candidateBaseType = BASE_TYPES.LOOP;
4544
} else if (base.includes('RootGraph')) {
46-
baseType = BASE_TYPES.ROOT_GRAPH;
45+
candidateBaseType = BASE_TYPES.ROOT_GRAPH;
4746
} else if (base.includes('Graph')) {
48-
baseType = BASE_TYPES.GRAPH;
47+
candidateBaseType = BASE_TYPES.GRAPH;
4948
}
5049

5150
// Find build method in this class
@@ -75,7 +74,11 @@ export function findBuildMethodAndBaseType(node: TSNode): BuildMethodInfo {
7574
}
7675
}
7776

78-
if (buildMethod) break;
77+
if (buildMethod) {
78+
className = currentClassName;
79+
baseType = candidateBaseType;
80+
break;
81+
}
7982
}
8083
}
8184

@@ -447,6 +450,18 @@ function parseAssignment(
447450
if (parsed) {
448451
nodeCtx.templates[parsed.templateName] = parsed;
449452
}
453+
} else if (nodeCtx.resolveTemplateAssignment) {
454+
const leftText = getNodeText(leftSide, code).trim();
455+
const resolved = nodeCtx.resolveTemplateAssignment(
456+
leftText,
457+
rightSide,
458+
code,
459+
nodeCtx.templates,
460+
nodeCtx.literalValues
461+
);
462+
if (resolved) {
463+
nodeCtx.templates[resolved.templateName] = resolved;
464+
}
450465
}
451466

452467
if (functionText.endsWith('.create_node')) {

0 commit comments

Comments
 (0)