Files
openclaw-zero-token/cli/program/subcli-descriptors.ts
sjhu 571e14a236 feat: upgrade to upstream v2026.3.28
Major upgrade from e26988a38 to upstream v2026.3.28 (f9b107928).
Key changes:
- Upstream src/, ui/, extensions/ (89 bundled extensions)
- Zero-token web providers preserved in src/zero-token/
- AskOnce plugin restored and registered as CLI command
- Added missing packages: @anthropic-ai/vertex-sdk, @modelcontextprotocol/sdk
- Fixed tsconfig rootDir, skipLibCheck for plugin-sdk DTS build
- Added askonce to bundled plugin metadata and package.json exports
- Fixed AskOnce CLI command registration (missing commands metadata)
- Restored AskOnce adapter imports (correct 5-level relative paths)
- Removed stale migration artifacts from root directory
2026-03-30 17:58:12 +08:00

145 lines
3.6 KiB
TypeScript

export type SubCliDescriptor = {
name: string;
description: string;
hasSubcommands: boolean;
};
export const SUB_CLI_DESCRIPTORS = [
{ name: "acp", description: "Agent Control Protocol tools", hasSubcommands: true },
{
name: "gateway",
description: "Run, inspect, and query the WebSocket Gateway",
hasSubcommands: true,
},
{ name: "daemon", description: "Gateway service (legacy alias)", hasSubcommands: true },
{ name: "logs", description: "Tail gateway file logs via RPC", hasSubcommands: false },
{
name: "system",
description: "System events, heartbeat, and presence",
hasSubcommands: true,
},
{
name: "models",
description: "Discover, scan, and configure models",
hasSubcommands: true,
},
{
name: "approvals",
description: "Manage exec approvals (gateway or node host)",
hasSubcommands: true,
},
{
name: "nodes",
description: "Manage gateway-owned node pairing and node commands",
hasSubcommands: true,
},
{
name: "devices",
description: "Device pairing + token management",
hasSubcommands: true,
},
{
name: "node",
description: "Run and manage the headless node host service",
hasSubcommands: true,
},
{
name: "sandbox",
description: "Manage sandbox containers for agent isolation",
hasSubcommands: true,
},
{
name: "tui",
description: "Open a terminal UI connected to the Gateway",
hasSubcommands: false,
},
{
name: "cron",
description: "Manage cron jobs via the Gateway scheduler",
hasSubcommands: true,
},
{
name: "dns",
description: "DNS helpers for wide-area discovery (Tailscale + CoreDNS)",
hasSubcommands: true,
},
{
name: "docs",
description: "Search the live OpenClaw docs",
hasSubcommands: false,
},
{
name: "hooks",
description: "Manage internal agent hooks",
hasSubcommands: true,
},
{
name: "webhooks",
description: "Webhook helpers and integrations",
hasSubcommands: true,
},
{
name: "qr",
description: "Generate iOS pairing QR/setup code",
hasSubcommands: false,
},
{
name: "clawbot",
description: "Legacy clawbot command aliases",
hasSubcommands: true,
},
{
name: "pairing",
description: "Secure DM pairing (approve inbound requests)",
hasSubcommands: true,
},
{
name: "plugins",
description: "Manage OpenClaw plugins and extensions",
hasSubcommands: true,
},
{
name: "channels",
description: "Manage connected chat channels (Telegram, Discord, etc.)",
hasSubcommands: true,
},
{
name: "directory",
description: "Lookup contact and group IDs (self, peers, groups) for supported chat channels",
hasSubcommands: true,
},
{
name: "security",
description: "Security tools and local config audits",
hasSubcommands: true,
},
{
name: "secrets",
description: "Secrets runtime reload controls",
hasSubcommands: true,
},
{
name: "skills",
description: "List and inspect available skills",
hasSubcommands: true,
},
{
name: "update",
description: "Update OpenClaw and inspect update channel status",
hasSubcommands: true,
},
{
name: "completion",
description: "Generate shell completion script",
hasSubcommands: false,
},
] as const satisfies ReadonlyArray<SubCliDescriptor>;
export function getSubCliEntries(): ReadonlyArray<SubCliDescriptor> {
return SUB_CLI_DESCRIPTORS;
}
export function getSubCliCommandsWithSubcommands(): string[] {
return SUB_CLI_DESCRIPTORS.filter((entry) => entry.hasSubcommands).map((entry) => entry.name);
}