← 返回
未分类 中文

claw-code

TypeScript runtime port of Claude Code's AI agent harness for running commands, routing prompts, managing sessions, and auditing tool/command registries.
Claude Code AI Agent 框架的 TypeScript 运行时版本,支持命令运行、提示词路由、会话管理和工具/命令注册表审计。
dae-xiaoe dae-xiaoe 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 389
下载
💾 1
安装
1
版本
#latest

概述

claw-code — AI Agent Harness Runtime

TypeScript port of Claude Code's harness system, compiled and ready to run.

Quick Start

cd C:\Users\dae\.openclaw\workspace\skills\claw-code\scripts
node dist/main.js <command> [options]

Or build from source:

cd C:\Users\dae\.openclaw\workspace\skills\claw-code\scripts
npm install
npm run build

Available Commands

Info & Audit

node dist/main.js summary                          # Render workspace summary
node dist/main.js manifest                         # Print workspace manifest
node dist/main.js parity-audit                     # Compare against archive
node dist/main.js setup-report                     # Startup/prefetch report
node dist/main.js command-graph                    # Show command graph
node dist/main.js tool-pool                        # Show tool pool
node dist/main.js bootstrap-graph                  # Show bootstrap stages

Query Registries

node dist/main.js subsystems --limit 16             # List Python modules
node dist/main.js commands --limit 20             # List mirrored commands
node dist/main.js commands --query <keyword>      # Search commands
node dist/main.js tools --limit 20                 # List mirrored tools
node dist/main.js tools --query <keyword>          # Search tools
node dist/main.js tools --simple-mode             # Core tools only
node dist/main.js tools --no-mcp                   # Exclude MCP tools
node dist/main.js show-command <name>               # Show one command
node dist/main.js show-tool <name>                 # Show one tool

Runtime Execution

node dist/main.js route "<prompt>" --limit 5      # Route prompt to commands/tools
node dist/main.js bootstrap "<prompt>" --limit 5   # Bootstrap a session
node dist/main.js turn-loop "<prompt>" --max-turns 3   # Run turn loop
node dist/main.js flush-transcript "<prompt>"      # Persist session
node dist/main.js load-session <session_id>        # Load saved session

Remote Modes

node dist/main.js remote-mode <target>
node dist/main.js ssh-mode <target>
node dist/main.js teleport-mode <target>
node dist/main.js direct-connect-mode <target>
node dist/main.js deep-link-mode <target>

Execution

node dist/main.js exec-command <name> "<prompt>"   # Execute mirrored command
node dist/main.js exec-tool <name> <payload>       # Execute mirrored tool

Project Structure

claw-code/
├── SKILL.md              # This file
└── scripts/
    ├── dist/             # Compiled JavaScript (ready to run)
    │   └── main.js       # CLI entry point
    ├── src/              # TypeScript source
    │   └── reference_data/  # Snapshot data
    ├── package.json
    └── tsconfig.json

Architecture

  • Runtime Core (runtime.ts) — PortRuntime class: route_prompt, bootstrap_session, run_turn_loop
  • Tool/Command Registries — loaded from reference_data/*.json snapshots
  • Session Management — session_store.ts, history.ts
  • Query Engine — query_engine.ts with streaming support
  • Graphs — bootstrap_graph.ts, command_graph.ts
  • Remote Modes — remote_runtime.ts, direct_modes.ts

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 09:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,242 📥 271,101
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 843 📥 322,809
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,406 📥 324,521