refactor: integrate OpenClaw API for configuration management and CLI registration

This commit is contained in:
Lauren ten Hoor
2026-02-11 23:40:22 +08:00
parent aaf7818c33
commit 31849489a8
7 changed files with 47 additions and 88 deletions

View File

@@ -4,13 +4,14 @@
* Uses Commander.js (provided by OpenClaw plugin SDK context).
*/
import type { Command } from "commander";
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
import { runSetup } from "./setup/index.js";
import { DEV_LEVELS, QA_LEVELS, DEFAULT_MODELS } from "./tiers.js";
/**
* Register the `devclaw` CLI command group on a Commander program.
*/
export function registerCli(program: Command): void {
export function registerCli(program: Command, api: OpenClawPluginApi): void {
const devclaw = program
.command("devclaw")
.description("DevClaw development pipeline tools");
@@ -41,6 +42,7 @@ export function registerCli(program: Command): void {
: undefined;
const result = await runSetup({
api,
newAgentName: opts.newAgent,
agentId: opts.agent,
workspacePath: opts.workspace,