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

atm-channel-openclaw

v0.1.4

Published

OpenClaw channel plugin for ATM: pulls tasks via HSF HTTP gateway, processes them, and feeds back logs

Readme

claw-task-ops-channel-openclaw

OpenClaw 渠道插件:从 Agent Task Ops 拉取任务,交由 OpenClaw Agent 处理,并将处理结果和日志反馈回去。

  • 入站:轮询 HSF HTTP 网关拉取 pending 任务,自动更新为 processing
  • 出站:Agent 处理结果通过 HSF 反馈,日志写入 claw_task_log
  • 自动注册:插件启动时自动注册实例,定时心跳更新在线状态

安装

openclaw plugins install claw-task-ops-channel-openclaw

安装后重启网关:

openclaw gateway restart

更新

openclaw plugins update claw-task-ops-channel-openclaw
openclaw gateway restart

卸载

openclaw plugins uninstall claw-task-ops-channel-openclaw
openclaw gateway restart

配置(channels.claw-task-ops)

{
  "channels": {
    "claw-task-ops": {
      "gatewayBaseUrl": "https://pre-clawtask.alibaba-inc.com",
      "instanceId": "billing_sunfire_agent",
      "instanceName": "计费结算域告警处理 Agent",
      "instanceDescription": "通过对接 Sunfire 平台,获取告警信息进行处理",
      "adminUser": "12345"
    }
  }
}

| 参数 | 必填 | 默认值 | 说明 | |------|------|--------|------| | gatewayBaseUrl | 是 | - | HSF HTTP 网关地址 | | instanceId | 是 | - | 实例唯一标识 | | instanceName | 否 | = instanceId | 实例显示名称 | | instanceDescription | 否 | 空 | 实例描述 | | adminUser | 否 | 空 | 管理员工号,首次注册时自动加入授权列表 |

Token 和授权用户在控制台「实例配置」中管理,无需在插件配置中指定。

自动注册

插件启动后会自动向后端注册实例。如果 instanceId 对应的实例不存在,后端会自动创建并生成 Token;如果已存在,则更新状态为 running 并刷新 lastOnlineTime。此后每次轮询都会更新 lastOnlineTime 作为心跳。

投递任务

通过 HTTP 内网投递

curl -X POST 'https://pre-clawtask.alibaba-inc.com/luyou/public/gateway/executeHsf.json' \
  -H 'Content-Type: application/json' \
  -d '{
  "appName": "onetouch-logistics-operation",
  "hsfName": "com.alibaba.onetouch.logistics.compass.service.ClawTaskOpsRemoteService#submitTask(com.alibaba.onetouch.logistics.compass.dto.claw.ClawTaskSubmitRequestDTO)~com.alibaba.onetouch.basedata.api.Result",
  "args": [{
    "instanceId": "your_instance_id",
    "taskName": "数据同步任务",
    "taskType": "data_sync",
    "priority": "high",
    "payload": { "sourceTable": "orders", "targetTable": "orders_backup" },
    "operator": "张三",
    "operatorId": "12345",
    "accessToken": "在控制台实例配置中获取"
  }]
}'

Token 在控制台「实例配置」中获取。taskIdstatus 可不传,后端自动生成。

通过 HSF 接口投递(Java)

引入 compass-sdk 依赖(查询最新版本):

<dependency>
    <groupId>com.alibaba.onetouch</groupId>
    <artifactId>compass-sdk</artifactId>
    <version>最新版本</version>
</dependency>

配置 HSF Consumer 并调用:

@HSFConsumer(serviceInterface = ClawTaskOpsRemoteService.class, serviceVersion = "1.0.0")
private ClawTaskOpsRemoteService clawTaskOpsRemoteService;

public String deliverTask() {
    ClawTaskSubmitRequestDTO request = new ClawTaskSubmitRequestDTO();
    request.setInstanceId("your_instance_id");
    request.setTaskName("报表生成任务");
    request.setTaskType("report");
    request.setPriority("medium");
    request.setPayload(Map.of("reportType", "daily"));
    request.setOperator("系统");
    request.setOperatorId("system");
    request.setAccessToken("在控制台实例配置中获取");

    Result<ClawTaskDTO> result = clawTaskOpsRemoteService.submitTask(request);
    return result.getData().getTaskId();
}

处理流程

1. 投递任务 (HTTP / HSF / 管理界面)
       ↓
2. 进入队列 (status = pending)
       ↓
3. 插件拉取 (状态变更为 processing)
       ↓
4. Agent 处理 (OpenClaw 执行任务)
       ↓
5. 写入日志 (过程记录到跟进日志)
       ↓
6. 反馈结果 (status → completed / failed)

HSF 接口一览

接口:com.alibaba.onetouch.logistics.compass.service.ClawTaskOpsRemoteService HSF 版本:1.0.0 | 应用:onetouch-logistics-operation

| 方法 | 参数 | 说明 | |------|------|------| | submitTask | ClawTaskSubmitRequestDTO | 投递任务(需携带 Token) | | queryInstances | ClawInstanceQueryRequestDTO | 分页查询实例列表 | | queryTasks | ClawTaskQueryRequestDTO | 分页查询任务列表 | | queryTaskLogs | ClawTaskLogQueryRequestDTO | 分页查询任务日志 | | getInstanceDetail | String instanceId | 查询实例详情 | | getTaskDetail | String taskId | 查询任务详情 | | updateTask | ClawTaskDTO | 更新任务 | | pullTasks | String instanceId, int limit | 拉取 pending 任务(插件用) | | feedbackTask | ClawTaskFeedbackRequestDTO | 反馈任务结果 | | addTaskLog | ClawTaskLogDTO | 添加任务处理日志 | | registerInstance | ClawInstanceRegisterRequestDTO | 注册/心跳实例 |