360 Secure SkillHub
360 安全技能中心

ACT Runtime

该 Skill 说明如何使用 act CLI 运行自包含的 WebAssembly 组件工具:先用 act info 查看组件元数据与工具参数 schema,再用 act call 传入 JSON 参数与配置执行,并可按需通过 --allow-dir/--allow-fs 授予文件访问;组件在沙箱中运行,无需系统依赖或 Docker。

actcore
热度 37.93
最近更新 2026-05-11 17:37:48
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 工作流 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add act-cli
Metadata
name
act
description
Run ACT WebAssembly component tools via `act call`. Use when the user asks to use an ACT component, run a .wasm tool, or needs sandboxed tools (SQLite, HTTP, filesystem, etc.) without system dependencies. Also use when you see references to ghcr.io/actpkg/ or .wasm component files.
license
MIT-0
compatibility
Requires act CLI (npm i -g @actcore/act) and shell/terminal access.
allowed-tools
Bash(act:*)
metadata
{"author":"actcore","version":"0.1.0","openclaw":{"requires":{"bins":["act"]}}}

ACT Tools

Run self-contained WebAssembly component tools via the act CLI. No system dependencies, no Docker, no language runtimes — just .wasm binaries in a sandbox.

Prerequisites

Check if act is available:

act --help

If not installed:

npm i -g @actcore/act

Step 1: Discover tools

act info --tools --format json <component>

<component> is one of:

  • OCI registry ref: ghcr.io/actpkg/sqlite:0.1.0
  • HTTP URL: https://example.com/component.wasm
  • Local file: ./component.wasm

The output contains:

  • metadata_schema — required configuration keys (pass via --metadata)
  • tools — list of tool names, descriptions, and parameters_schema

Use --format text for a human-readable summary instead of JSON.

Step 2: Call a tool

act call <component> <tool-name> --args '<json>' [options]
Option Purpose
--args '<json>' Tool parameters (matches parameters_schema)
--metadata '<json>' Component config (matches metadata_schema)
--allow-dir guest:host Grant directory access to the sandbox
--allow-fs Grant full filesystem access

Output is JSON on stdout. Logs go to stderr.

Remote components are cached locally after first download.

Example: SQLite

# Create a table
act call ghcr.io/actpkg/sqlite:0.1.0 execute-batch \
  --args '{"sql":"CREATE TABLE notes (id INTEGER PRIMARY KEY, text TEXT, created_at TEXT DEFAULT CURRENT_TIMESTAMP)"}' \
  --metadata '{"database_path":"/data/notes.db"}' \
  --allow-dir /data:/tmp/act-data

# Insert
act call ghcr.io/actpkg/sqlite:0.1.0 execute \
  --args '{"sql":"INSERT INTO notes (text) VALUES (?1)","params":["Hello from ACT"]}' \
  --metadata '{"database_path":"/data/notes.db"}' \
  --allow-dir /data:/tmp/act-data

# Query
act call ghcr.io/actpkg/sqlite:0.1.0 query \
  --args '{"sql":"SELECT * FROM notes"}' \
  --metadata '{"database_path":"/data/notes.db"}' \
  --allow-dir /data:/tmp/act-data

Important

  • Always run act info --tools first to discover tool names and schemas
  • Pass --metadata on every call (stateless — no session)
  • Use --allow-dir guest:host only when the component needs filesystem access
  • Components run sandboxed in WebAssembly — no host access unless explicitly granted