@claude-flow/plugin-gastown-bridge

中文文档
0.1.6发布于 2026/11/09MITTypeScriptESM + CJS近 30 天下载 10.4万

Claude Flow V3 与 WASM 加速公式解析和图表分析的气体镇管弦乐器集成

中文使用文档
文档目录47 节
  1. 快速启动
  2. 导言
  3. 煤气镇是什么?
  4. 为什么是这个插件?
  5. 特征
  6. QQ WASM 加速计算
  7. 20 MCP 工具
  8. 安全第一设计
  9. QQ 双向同步
  10. 增强和比较
  11. 煤气镇诉克洛德福克 V3
  12. 业绩比较
  13. 结构比较
  14. 安装
  15. 使用量
  16. 基本设置
  17. 使用 MCP 工具
  18. WASM 加速操作
  19. 在 Beads 和 AgentDB 之间同步
  20. 教学
  21. 步骤1:核实先决条件
  22. 步骤2: 在您的工程中初始化插件
  23. 步骤 3: 创建您的第一个bead
  24. 步骤4:清单准备工作
  25. 理解公式类型
  26. 创建自定义公式
  27. 制作公式(WASM加速)
  28. 骑兵团是什么?
  29. 创建军团
  30. 跟踪车队的进展
  31. 优化车队执行(WASM)
  32. 煤气镇代理角色
  33. 铺设工作
  34. 列出可用的代理
  35. 同步策略
  36. 解决冲突
  37. 示例:生产同步工作流程
  38. 何时使用 WASM 工具
  39. 最大性能批处理
  40. 剖析WASM 性能
  41. API 参考
  42. 插件配置
  43. 工具参考
  44. 建筑
  45. 相关资源
  46. 捐款
  47. 许可证

@claude-flow/plugin-加斯敦-桥

Animated diagram: an agent calls a gt_ MCP tool, inputs are validated, and the bridge runs the gt or bd CLI against Gas Town

@claude-flow/plugin-加斯敦-桥 —— 允许代理驱动的 Ruflo 插件 天然气镇 通过经过验证的MCP工具调用 gt 财务报告和审定财务报表 bd (原始内容存档于2018-03-26). CLIs.

支持的环境 : 节点:js 20+- 无害环境管理和共同JS- gt编号 :bd 现场通话的CLI

快速启动

npm install @claude-flow/plugin-gastown-bridge
import { GasTownBridgePlugin, validateBeadId } from '@claude-flow/plugin-gastown-bridge';

const plugin = new GasTownBridgePlugin();
console.log('tools:', plugin.getMCPTools().length);
console.log('bead id:', validateBeadId('gt-abc12'));
try {
  validateBeadId('gt-abc; echo injected');
} catch (err) {
  console.log('rejected:', err.code);
}

预期产出:

tools: 20
bead id: gt-abc12
rejected: GT_INVALID_BEAD_ID

安装到 Ruflo 工程中 @claude-flow/cli数字 : npx @claude-flow/cli@latest plugins install -n @claude-flow/plugin-gastown-bridge。 。 。 .

WASM-加速桥通向史蒂夫·耶格的天然气镇多能代理 Orchestrator

npm version License: MIT

导言

这个 煤气镇桥插件 给史蒂夫·耶格带来力量 天然气镇 claude Flow V3的多代理管弦乐手. Gas Town)引入了经过战斗测试的持久工作流程执行概念,以补充克洛德·福林斯(Claude Flow)的群情.

煤气镇是什么?

Gas Town是一个75 000行的Go编码基地,执行:

  • 圆珠 - 以图表语义进行Git后置问题跟踪
  • 公式 - TOML定义的工作流程(召集、工作流程、扩展、方面)
  • 车队 - 追踪代理之间“沉滞”工作的工作订单
  • 几内亚 - Gastown Universal Propulsion 相撞性处决原则
  • 分子/风向 - 链式工作单元,用于持久、可恢复的工作流程

为什么是这个插件?

挑战解决方案
煤气镇只有GOCLI 桥包 gt 财务报告和审定财务报表 bd 命令
无法编译到 WASM( syscalls)混合结构: I/O 的 CLI, WASM 的计算
JS 的公式解析很慢Rust-WASM公司提供 352x 加速
图形操作瓶颈WASM DAG行动是 150个更快

特征

QQ WASM 加速计算

运行Java 脚本刚才加速
公式解析( TOML- AST)53分钟0.15毫米口径352辆
可变烹饪35分钟0.1毫米口径350辆
批量厨师(10个配方)350毫米口径1分钟350辆
DAG 地理学类75分钟0.5ms (单位:千米)150辆
循环检测45分钟0.3 分钟150辆
关键路径分析120毫米口径0.8毫米口径150辆
模式搜索( HNSW)5000亿5分钟1000x- 12500x 车型

20 MCP 工具

┌─────────────────────────────────────────────────────────────┐
│                    MCP Tool Categories                       │
├─────────────────┬─────────────────┬─────────────────────────┤
│  Beads (5)      │  Convoy (3)     │  Formula (4)            │
│  ├─ create      │  ├─ create      │  ├─ list                │
│  ├─ ready       │  ├─ status      │  ├─ cook (WASM)         │
│  ├─ show        │  └─ track       │  ├─ execute             │
│  ├─ dep         │                 │  └─ create              │
│  └─ sync        │                 │                         │
├─────────────────┼─────────────────┼─────────────────────────┤
│  Orchestration  │  WASM (5)       │                         │
│  ├─ sling       │  ├─ parse       │                         │
│  ├─ agents      │  ├─ resolve     │                         │
│  └─ mail        │  ├─ cook_batch  │                         │
│                 │  ├─ match       │                         │
│                 │  └─ optimize    │                         │
└─────────────────┴─────────────────┴─────────────────────────┘

安全第一设计

  • 输入验证: 所有参数的 Zod 计划
  • 指令注射预防: 只允许列表的 CLI 执行
  • 路径倾覆保护: 严格路径验证
  • 不执行贝壳: 用途 execFile 与 shell: false

QQ 双向同步

Gas Town's Beads和克洛德·福福德的代理DB之间无缝同步:

┌──────────────┐     SyncBridge      ┌──────────────┐
│              │  ←───────────────→  │              │
│    Beads     │   Conflict Res.     │   AgentDB    │
│   (JSONL)    │   • beads-wins      │   (SQLite)   │
│              │   • newest-wins     │              │
│              │   • merge           │              │
└──────────────┘                     └──────────────┘

增强和比较

煤气镇诉克洛德福克 V3

特性天然气镇克洛德·福克通 V3使用此插件
问题跟踪圆珠( 吉特后置)代理数据库统一同步
工作流量TOML 公式类型脚本两者均获得支持
代理角色市长,波兰猫,船员等级组合互可操作
崩溃恢复GUPP 钩持续会期合并
工作分布铃声任务协调通过吊桥工具
模式搜索不详HNSW(慢联署材料)HNSW WASM(1 000x更快)

业绩比较

度量衡纯 Java 脚本此插件( WASM)改进
公式解析53分钟0.15毫米口径352转快
百节点 DAG 排序75分钟0.5ms (单位:千米)150个更快
模式搜索( 10k)5000亿5分钟1000个更快
内存使用情况48MB (英语)12MB (英语)减少4倍
启动时间850毫米口径120毫米口径7个更快

结构比较

方针专业计数此插件
完整类型脚本端口原生,无道具75克到端口的线路❌
Go WASM 编译重用代码Syscalls 挡住它❌
纯 CLI 桥简单计算慢部分内容
混合CLI+WASM两者中最好的两个密码库选中

安装

# Install via Claude Flow CLI (recommended)
npx claude-flow@latest plugins install -n @claude-flow/plugin-gastown-bridge

# Or install directly via npm
npm install @claude-flow/plugin-gastown-bridge

# Prerequisites: Gas Town and Beads CLI (optional - for full CLI integration)
# See: https://github.com/steveyegge/gastown
go install github.com/steveyegge/gastown/cmd/gt@latest
go install github.com/steveyegge/beads/cmd/bd@latest

使用量

基本设置

import { GasTownBridgePlugin } from '@claude-flow/plugin-gastown-bridge';

// Initialize the plugin
const plugin = new GasTownBridgePlugin({
  gtPath: '/usr/local/bin/gt',  // Optional: path to gt CLI
  bdPath: '/usr/local/bin/bd',  // Optional: path to bd CLI
  wasmEnabled: true,             // Enable WASM acceleration
});

// Register with Claude Flow
await claudeFlow.registerPlugin(plugin);

使用 MCP 工具

// Create a bead (issue)
const bead = await plugin.tools.gt_beads_create({
  title: 'Implement feature X',
  description: 'Full description here',
  priority: 2,
  labels: ['feature', 'v3'],
});

// List ready beads (no blockers)
const ready = await plugin.tools.gt_beads_ready({
  limit: 10,
  rig: 'main',
});

// Cook a formula (WASM-accelerated, 352x faster)
const cooked = await plugin.tools.gt_formula_cook({
  formula: 'implement-feature',
  vars: {
    feature_name: 'Authentication',
    target_module: 'src/auth',
  },
});

// Sling work to an agent
await plugin.tools.gt_sling({
  bead_id: 'gt-abc123',
  target: 'polecat',
  formula: 'code-review',
});

WASM 加速操作

// Parse formula (352x faster than JS)
const ast = await plugin.tools.gt_wasm_parse_formula({
  content: `
    [formula]
    name = "deploy-service"
    type = "convoy"

    [[legs]]
    id = "build"
    title = "Build the service"
  `,
});

// Resolve dependencies (150x faster)
const sorted = await plugin.tools.gt_wasm_resolve_deps({
  beads: beadList,
  action: 'topo_sort',
});

// Batch cook formulas (352x faster)
const cooked = await plugin.tools.gt_wasm_cook_batch({
  formulas: formulaList,
  vars: [{ env: 'prod' }, { env: 'staging' }],
});

// Find similar patterns (1000x-12500x faster)
const matches = await plugin.tools.gt_wasm_match_pattern({
  query: 'authentication flow',
  candidates: formulaNames,
  k: 5,
});

在 Beads 和 AgentDB 之间同步

// Sync beads to AgentDB
await plugin.tools.gt_beads_sync({
  direction: 'push',
  rig: 'main',
  namespace: 'project-x',
});

// Pull from AgentDB to Beads
await plugin.tools.gt_beads_sync({
  direction: 'pull',
  conflictStrategy: 'newest-wins',
});

// Bidirectional sync
await plugin.tools.gt_beads_sync({
  direction: 'both',
  conflictStrategy: 'merge',
});

教学

* 教导1:你的第一气镇一体化

步骤1:核实先决条件

# Check Gas Town CLI
gt --version

# Check Beads CLI
bd --version

# Both should output version numbers

步骤2: 在您的工程中初始化插件

// claude-flow.config.ts
import { defineConfig } from 'claude-flow';
import { GasTownBridgePlugin } from '@claude-flow/plugin-gastown-bridge';

export default defineConfig({
  plugins: [
    new GasTownBridgePlugin({
      wasmEnabled: true,
    }),
  ],
});

步骤 3: 创建您的第一个bead

const bead = await claudeFlow.mcp.call('gt_beads_create', {
  title: 'Hello Gas Town',
  description: 'My first bead from Claude Flow!',
  priority: 3,
  labels: ['tutorial'],
});

console.log(`Created bead: ${bead.id}`);
// Output: Created bead: gt-a1b2c3

步骤4:清单准备工作

const ready = await claudeFlow.mcp.call('gt_beads_ready', {
  limit: 5,
});

console.log('Ready beads:', ready.beads.map(b => b.title));
辅导2:与公式合作

理解公式类型

类型目的示例
convoy多腿工作订单特性实施
workflow逐步进程CI/CD管道
expansion生成多颗珠测试套件创建
aspect贯穿各领域的关切问题伐木、计量

创建自定义公式

// Create a code review formula
await claudeFlow.mcp.call('gt_formula_create', {
  name: 'code-review-flow',
  type: 'workflow',
  steps: [
    {
      id: 'checkout',
      title: 'Checkout branch',
      description: 'Clone and checkout the PR branch',
    },
    {
      id: 'lint',
      title: 'Run linters',
      description: 'Execute ESLint and Prettier',
      needs: ['checkout'],
    },
    {
      id: 'test',
      title: 'Run tests',
      description: 'Execute test suite',
      needs: ['checkout'],
    },
    {
      id: 'review',
      title: 'Code review',
      description: 'Manual code review',
      needs: ['lint', 'test'],
    },
  ],
  vars: {
    branch: { type: 'string', required: true },
    reviewer: { type: 'string', default: 'auto' },
  },
});

制作公式(WASM加速)

// Cook the formula with variables
const cooked = await claudeFlow.mcp.call('gt_formula_cook', {
  formula: 'code-review-flow',
  vars: {
    branch: 'feature/auth',
    reviewer: '@alice',
  },
});

// cooked.steps now have variables substituted
console.log(cooked.steps[3].description);
// Output: "Manual code review by @alice"
教习3:旅社管理

骑兵团是什么?

一个车队是一个"工作令",它追踪一系列相关的珠子,贯穿其生命周期. 把它当作短跑或里程碑.

创建军团

// Create convoy for a feature
const convoy = await claudeFlow.mcp.call('gt_convoy_create', {
  name: 'v2.0-release',
  description: 'Version 2.0 release convoy',
  issues: ['gt-abc1', 'gt-abc2', 'gt-abc3'],
});

console.log(`Convoy created: ${convoy.id}`);

跟踪车队的进展

// Check convoy status
const status = await claudeFlow.mcp.call('gt_convoy_status', {
  convoy_id: convoy.id,
  detailed: true,
});

console.log(`Progress: ${status.progress}%`);
console.log(`Completed: ${status.completed}/${status.total}`);

优化车队执行(WASM)

// Get optimal execution order (150x faster with WASM)
const optimized = await claudeFlow.mcp.call('gt_wasm_optimize_convoy', {
  convoy_id: convoy.id,
  strategy: 'parallel', // or 'serial', 'hybrid'
});

console.log('Execution plan:', optimized.plan);
// Output shows which beads can run in parallel
4: 向特工工作

煤气镇代理角色

作用目的
mayor协调员,分配工作
polecat一般工人代理人
crew专门小组成员
refinery处理和转化
witness核查和审定
deacon行政任务
dog警卫职责,警卫

铺设工作

// Sling a bead to a polecat for coding
await claudeFlow.mcp.call('gt_sling', {
  bead_id: 'gt-abc123',
  target: 'polecat',
  formula: 'implement-feature',
});

// The work is now "on the polecat's hook"
// GUPP: "If work is on your hook, YOU MUST RUN IT"

列出可用的代理

const agents = await claudeFlow.mcp.call('gt_agents', {
  rig: 'main',
  role: 'polecat',
  include_inactive: false,
});

agents.forEach(agent => {
  console.log(`${agent.name}: ${agent.status} (${agent.workload} tasks)`);
});
教程 : Beads- AgentDB 同步

同步策略

战略使用大小写
push导出珠到代理数据库
pull从代理数据库导入到贝兹
both双向同步

解决冲突

决议行为
beads-winsBads 数据覆盖代理数据库
agentdb-wins代理DB 数据覆盖光标
newest-wins最新修改获胜
merge合并非冲突领域
manual将冲突排入手动解决

示例:生产同步工作流程

// Morning: Pull overnight changes from shared AgentDB
await claudeFlow.mcp.call('gt_beads_sync', {
  direction: 'pull',
  rig: 'production',
  conflictStrategy: 'newest-wins',
});

// During work: Push local changes
await claudeFlow.mcp.call('gt_beads_sync', {
  direction: 'push',
  rig: 'production',
  namespace: 'team-alpha',
});

// End of day: Full bidirectional sync
const result = await claudeFlow.mcp.call('gt_beads_sync', {
  direction: 'both',
  conflictStrategy: 'merge',
});

console.log(`Synced: ${result.pushed} pushed, ${result.pulled} pulled`);
console.log(`Conflicts: ${result.conflicts.length}`);
6:WASM 性能优化

何时使用 WASM 工具

使用 WASM 软件使用 CLI
解析公式创建珠子
图表操作文件一/O
模式匹配SQLite 查询
批处理代理通讯

最大性能批处理

// Instead of this (slow):
for (const formula of formulas) {
  await claudeFlow.mcp.call('gt_formula_cook', {
    formula: formula.name,
    vars: formula.vars,
  });
}

// Do this (352x faster):
const results = await claudeFlow.mcp.call('gt_wasm_cook_batch', {
  formulas: formulas.map(f => f.name),
  vars: formulas.map(f => f.vars),
});

剖析WASM 性能

// All WASM tools return timing metrics
const result = await claudeFlow.mcp.call('gt_wasm_parse_formula', {
  content: formulaToml,
});

console.log(`Parse time: ${result.durationMs}ms`);
// Output: Parse time: 0.14ms

API 参考

插件配置

interface GasTownBridgeConfig {
  /** Path to gt CLI (default: auto-detect) */
  gtPath?: string;

  /** Path to bd CLI (default: auto-detect) */
  bdPath?: string;

  /** Enable WASM acceleration (default: true) */
  wasmEnabled?: boolean;

  /** Default rig for operations */
  defaultRig?: string;

  /** Sync conflict resolution strategy */
  conflictStrategy?: 'beads-wins' | 'agentdb-wins' | 'newest-wins' | 'merge' | 'manual';

  /** CLI execution timeout in ms (default: 30000) */
  timeout?: number;
}

工具参考

见 MCP 工具文档 用于完整的 API 参考.

建筑

┌─────────────────────────────────────────────────────────────────────┐
│                      Claude Flow V3 Plugin Host                      │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│  ┌─────────────────────┐    ┌─────────────────────────────────────┐ │
│  │    CLI Bridge       │    │         WASM Computation Layer       │ │
│  │  (I/O Operations)   │    │           (352x faster)              │ │
│  │                     │    │                                      │ │
│  │  • gt commands      │    │  ┌──────────────┐ ┌──────────────┐  │ │
│  │  • bd commands      │    │  │ gastown-     │ │ ruvector-    │  │ │
│  │  • File read/write  │    │  │ formula-wasm │ │ gnn-wasm     │  │ │
│  │  • SQLite queries   │    │  │              │ │              │  │ │
│  │                     │    │  │ • TOML parse │ │ • DAG ops    │  │ │
│  │  [Node.js FFI]      │    │  │ • Variable   │ │ • Topo sort  │  │ │
│  │                     │    │  │   cooking    │ │ • Cycle      │  │ │
│  └─────────────────────┘    │  │ • Molecule   │ │   detection  │  │ │
│                             │  │   generation │ │ • Critical   │  │ │
│                             │  └──────────────┘ │   path       │  │ │
│                             │                   └──────────────┘  │ │
│                             │                                      │ │
│                             │  ┌──────────────┐ ┌──────────────┐  │ │
│                             │  │ micro-hnsw-  │ │ ruvector-    │  │ │
│                             │  │ wasm         │ │ learning-wasm│  │ │
│                             │  │              │ │              │  │ │
│                             │  │ • Pattern    │ │ • SONA       │  │ │
│                             │  │   search     │ │   patterns   │  │ │
│                             │  │ • 1000x+     │ │ • MoE routing│  │ │
│                             │  │   speedup    │ │ • EWC++      │  │ │
│                             │  └──────────────┘ └──────────────┘  │ │
│                             │                                      │ │
│                             │  [wasm-bindgen interface]            │ │
│                             └─────────────────────────────────────┘ │
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘

捐款

见 捐款额 (c) 发展结构和准则.

许可证

麻省理工学院执照 - 看 自由主义 详细情况.


由克洛德·福克(Claude Flow)团队建造


由 尔 紫外线 • 妇女 卢夫.io • 妇女 来源

版本与发布记录

@claude-flow/plugin-gastown-bridge 共发布 7 个版本,首次发布于 2026/01/24;过去 12 个月发布了 7 个版本。

版本发布日期距今
0.1.6latest2026/11/09今天
0.1.52026/11/063 天前
0.1.42026/05/125 个月前
0.1.32026/02/148 个月前
0.1.22026/02/029 个月前
0.1.12026/01/249 个月前

关于 @claude-flow/plugin-gastown-bridge 的常见问题

@claude-flow/plugin-gastown-bridge 是什么?

Claude Flow V3 与 WASM 加速公式解析和图表分析的气体镇管弦乐器集成

如何安装 @claude-flow/plugin-gastown-bridge?

在项目目录运行 npm install @claude-flow/plugin-gastown-bridge,或使用 pnpm add / yarn add / bun add。

@claude-flow/plugin-gastown-bridge 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@claude-flow/plugin-gastown-bridge 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@claude-flow/plugin-gastown-bridge 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@claude-flow/plugin-gastown-bridge 可以商用吗?

@claude-flow/plugin-gastown-bridge 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@claude-flow/plugin-gastown-bridge 的下载量有多少?

根据 npm 官方下载统计,@claude-flow/plugin-gastown-bridge 在 2026/10/10 – 2026/11/08 这 30 天内被下载 103,502 次,日均约 3,450 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@claude-flow/plugin-gastown-bridge 还在维护吗?

最新版本 0.1.6 发布于 2026/11/09(今天);至今共发布 7 个版本,其中过去 12 个月发布了 7 个;首次发布于 2026/01/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。