npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dommaker/runtime

v0.0.5

Published

AI Agent 工作流执行引擎 - npm 包 + CLI

Downloads

578

Readme

@dommaker/runtime

AI Agent 工作流执行引擎 - npm 包 + CLI

安装

# npm
npm install @dommaker/runtime

# 或直接使用
npx @dommaker/runtime --version

CLI 使用

# 查看版本
agent-runtime --version

# 列出能力
agent-runtime list workflows     # 列出工作流
agent-runtime list tools         # 列出工具
agent-runtime list steps         # 列出步骤

# 执行工作流(多种参数格式)
agent-runtime run wf-dev --project ~/myapp
agent-runtime run wf-dev --input project_path=~/myapp
agent-runtime run wf-dev --input '{"project_path": "~/myapp"}'
agent-runtime run wf-dev -p ~/myapp -r "实现登录"

# 执行单个步骤
agent-runtime step analyze-codebase -p ~/myapp

# 查询执行状态
agent-runtime status <executionId>

# 验证工作流
agent-runtime validate wf-dev

# 调试参数(不执行)
agent-runtime run wf-dev --project ~/myapp --dry-run

# 启动 HTTP API Server
agent-runtime server --port 3001

环境变量配置

# 工作流路径(默认使用 npm 包)
AGENT_WORKFLOWS_PATH=/path/to/workflows

# API 配置
CODING_API_KEY=xxx              # Codex API Key
ANTHROPIC_API_KEY=xxx           # Claude API Key

# 执行配置
DEFAULT_TIMEOUT=1800000         # 默认超时(30分钟)
MAX_RETRIES=3                   # 最大重试次数
MAX_CONCURRENT=5                # 最大并发数

# 服务配置
AGENT_STUDIO_URL=http://localhost:13101
PROMETHEUS_URL=http://localhost:9090

核心 API

import {
  executeWorkflow,
  listWorkflows,
  listTools,
  listSteps,
  validateWorkflow,
  getWorkflowStatus
} from '@dommaker/runtime';

// 执行工作流
const result = await executeWorkflow('wf-dev', {
  project_path: '~/myapp',
  requirement: '实现登录功能'
});

console.log(result.executionId);
console.log(result.outputs);

// 列出工作流
const workflows = await listWorkflows();
// [{id: 'wf-dev', name: '开发工作流', ...}]

// 查询状态
const status = await getWorkflowStatus('exec-xxx');

HTTP API

# 启动服务器
agent-runtime server --port 3001

| 端点 | 说明 | |------|------| | GET /health | 健康检查 | | GET /api/workflows | 列出工作流 | | GET /api/tools | 列出工具 | | POST /api/execute | 执行工作流 | | GET /api/executions/:id | 获取执行状态 | | POST /api/executions/:id/stop | 停止执行 |

特性

  • ✅ Phase 划分执行
  • ✅ Session 上下文传递
  • ✅ 变量解析 ${steps.xxx.output}
  • ✅ 断点续传
  • ✅ 实时进度追踪
  • ✅ 多 Agent 支持(Codex, Claude Code)
  • ✅ Token 使用追踪
  • ✅ 智能通知(Discord/Webhook/企业微信/Telegram)

License

MIT