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

@openclaw-harness/core

v0.1.0

Published

OpenClaw Harness Core - Workflow engine and state management for Agent orchestration

Readme

@openclaw-harness/core

npm version License: MIT

English | 中文

用于 Agent 编排的工作流引擎和状态管理

特性

  • 🔄 工作流引擎 - 定义复杂的多阶段工作流
  • 🗃️ 状态管理 - 用于稳健控制的有限状态机
  • 📡 事件系统 - 解耦的、事件驱动的架构
  • 🎯 多种阶段类型 - Agent、工具、条件、并行、循环、等待

安装

npm install @openclaw-harness/core

快速开始

import { HarnessCorePlugin } from '@openclaw-harness/core';

const plugin = new HarnessCorePlugin();

// 使用 OpenClaw 上下文初始化
await plugin.init(openClawContext);

// 获取工作流服务
const workflowService = openClawContext.api.getService('harness:workflow');

// 创建工作流
const workflow = workflowService.create({
  id: 'my-workflow',
  name: '我的工作流',
  version: '1.0.0',
  stages: [
    {
      id: 'stage1',
      name: '第一阶段',
      type: 'tool',
      tool: { name: 'echo', parameters: { message: 'Hello' } },
      transitions: []
    }
  ]
});

// 执行工作流
const result = await workflowService.execute('my-workflow', {});

CLI 命令

# 列出所有工作流
openclaw harness:workflow:list

# 从 JSON 文件创建工作流
openclaw harness:workflow:create ./my-workflow.json

# 运行工作流
openclaw harness:workflow:run my-workflow '{"input": "test"}'

# 查看执行状态
openclaw harness:execution:status <execution-id>

HTTP API

# 列出工作流
curl http://localhost:3000/harness/workflows

# 创建工作流
curl -X POST http://localhost:3000/harness/workflows \
  -H "Content-Type: application/json" \
  -d @workflow-config.json

# 执行工作流
curl -X POST http://localhost:3000/harness/workflows/<id>/execute \
  -H "Content-Type: application/json" \
  -d '{"input": "test"}'

工作流配置示例

{
  "id": "customer-support",
  "name": "客户支持工作流",
  "version": "1.0.0",
  "triggers": [
    { "type": "webhook", "config": { "endpoint": "/support" } }
  ],
  "stages": [
    {
      "id": "intake",
      "name": "工单录入",
      "type": "agent",
      "agent": { "agentId": "classifier", "maxTurns": 3 },
      "transitions": [{ "to": "routing" }]
    },
    {
      "id": "routing",
      "name": "路由分配",
      "type": "condition",
      "condition": {
        "expression": "${category} === \"technical\"",
        "branches": [
          { "condition": "true", "next": "tech-support" },
          { "condition": "false", "next": "general-support" }
        ]
      }
    },
    {
      "id": "tech-support",
      "name": "技术支持",
      "type": "agent",
      "agent": { "agentId": "tech-agent", "maxTurns": 10 },
      "transitions": []
    }
  ]
}

文档

查看 完整文档 获取更多详情。

许可证

MIT © OpenClaw Harness Team