
























@@ -4,6 +4,7 @@ import type {
44ChatCommandDefinition,
55CommandCategory,
66CommandScope,
7+CommandTier,
78} from "./commands-registry.types.js";
89import { listThinkingLevels } from "./thinking.js";
910@@ -20,6 +21,8 @@ type DefineChatCommandInput = {
2021textAliases?: string[];
2122scope?: CommandScope;
2223category?: CommandCategory;
24+/** Progressive disclosure tier. Defaults to "standard". */
25+tier?: CommandTier;
2326};
24272528export function defineChatCommand(command: DefineChatCommandInput): ChatCommandDefinition {
@@ -42,6 +45,7 @@ export function defineChatCommand(command: DefineChatCommandInput): ChatCommandD
4245textAliases: aliases,
4346 scope,
4447category: command.category,
48+tier: command.tier,
4549};
4650}
4751@@ -129,13 +133,15 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
129133description: "Show available commands.",
130134textAlias: "/help",
131135category: "status",
136+tier: "essential",
132137}),
133138defineChatCommand({
134139key: "commands",
135140nativeName: "commands",
136141description: "List all slash commands.",
137142textAlias: "/commands",
138143category: "status",
144+tier: "power",
139145}),
140146defineChatCommand({
141147key: "tools",
@@ -152,13 +158,15 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
152158},
153159],
154160argsMenu: "auto",
161+tier: "standard",
155162}),
156163defineChatCommand({
157164key: "skill",
158165nativeName: "skill",
159166description: "Run a skill by name.",
160167textAlias: "/skill",
161168category: "tools",
169+tier: "standard",
162170args: [
163171{
164172name: "name",
@@ -180,13 +188,15 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
180188description: "Show current status.",
181189textAlias: "/status",
182190category: "status",
191+tier: "essential",
183192}),
184193defineChatCommand({
185194key: "tasks",
186195nativeName: "tasks",
187196description: "List background tasks for this session.",
188197textAlias: "/tasks",
189198category: "status",
199+tier: "standard",
190200}),
191201defineChatCommand({
192202key: "allowlist",
@@ -195,6 +205,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
195205acceptsArgs: true,
196206scope: "text",
197207category: "management",
208+tier: "power",
198209}),
199210defineChatCommand({
200211key: "approve",
@@ -203,6 +214,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
203214textAlias: "/approve",
204215acceptsArgs: true,
205216category: "management",
217+tier: "power",
206218}),
207219defineChatCommand({
208220key: "context",
@@ -211,6 +223,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
211223textAlias: "/context",
212224acceptsArgs: true,
213225category: "status",
226+tier: "standard",
214227}),
215228defineChatCommand({
216229key: "btw",
@@ -219,6 +232,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
219232textAlias: "/btw",
220233acceptsArgs: true,
221234category: "tools",
235+tier: "standard",
222236}),
223237defineChatCommand({
224238key: "export-session",
@@ -227,6 +241,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
227241textAliases: ["/export-session", "/export"],
228242acceptsArgs: true,
229243category: "status",
244+tier: "essential",
230245args: [
231246{
232247name: "path",
@@ -242,6 +257,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
242257description: "Control text-to-speech (TTS).",
243258textAlias: "/tts",
244259category: "media",
260+tier: "standard",
245261args: [
246262{
247263name: "action",
@@ -285,13 +301,15 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
285301description: "Show your sender id.",
286302textAlias: "/whoami",
287303category: "status",
304+tier: "power",
288305}),
289306defineChatCommand({
290307key: "session",
291308nativeName: "session",
292309description: "Manage session-level settings (for example /session idle).",
293310textAlias: "/session",
294311category: "session",
312+tier: "power",
295313args: [
296314{
297315name: "action",
@@ -314,6 +332,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
314332description: "List, kill, log, spawn, or steer subagent runs for this session.",
315333textAlias: "/subagents",
316334category: "management",
335+tier: "standard",
317336args: [
318337{
319338name: "action",
@@ -341,6 +360,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
341360description: "Manage ACP sessions and runtime options.",
342361textAlias: "/acp",
343362category: "management",
363+tier: "power",
344364args: [
345365{
346366name: "action",
@@ -382,6 +402,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
382402"Bind this thread (Discord) or topic/conversation (Telegram) to a session target.",
383403textAlias: "/focus",
384404category: "management",
405+tier: "power",
385406args: [
386407{
387408name: "target",
@@ -397,20 +418,23 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
397418description: "Remove the current thread (Discord) or topic/conversation (Telegram) binding.",
398419textAlias: "/unfocus",
399420category: "management",
421+tier: "power",
400422}),
401423defineChatCommand({
402424key: "agents",
403425nativeName: "agents",
404426description: "List thread-bound agents for this session.",
405427textAlias: "/agents",
406428category: "management",
429+tier: "standard",
407430}),
408431defineChatCommand({
409432key: "kill",
410433nativeName: "kill",
411434description: "Kill a running subagent (or all).",
412435textAlias: "/kill",
413436category: "management",
437+tier: "standard",
414438args: [
415439{
416440name: "target",
@@ -426,6 +450,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
426450description: "Send guidance to a running subagent.",
427451textAlias: "/steer",
428452category: "management",
453+tier: "standard",
429454args: [
430455{
431456name: "target",
@@ -446,6 +471,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
446471description: "Show or set config values.",
447472textAlias: "/config",
448473category: "management",
474+tier: "power",
449475args: [
450476{
451477name: "action",
@@ -474,6 +500,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
474500description: "Show or set OpenClaw MCP servers.",
475501textAlias: "/mcp",
476502category: "management",
503+tier: "power",
477504args: [
478505{
479506name: "action",
@@ -502,6 +529,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
502529description: "List, show, enable, or disable plugins.",
503530textAliases: ["/plugins", "/plugin"],
504531category: "management",
532+tier: "power",
505533args: [
506534{
507535name: "action",
@@ -524,6 +552,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
524552description: "Set runtime debug overrides.",
525553textAlias: "/debug",
526554category: "management",
555+tier: "power",
527556args: [
528557{
529558name: "action",
@@ -552,6 +581,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
552581description: "Usage footer or cost summary.",
553582textAlias: "/usage",
554583category: "options",
584+tier: "standard",
555585args: [
556586{
557587name: "mode",
@@ -568,20 +598,23 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
568598description: "Stop the current run.",
569599textAlias: "/stop",
570600category: "session",
601+tier: "essential",
571602}),
572603defineChatCommand({
573604key: "restart",
574605nativeName: "restart",
575606description: "Restart OpenClaw.",
576607textAlias: "/restart",
577608category: "tools",
609+tier: "power",
578610}),
579611defineChatCommand({
580612key: "activation",
581613nativeName: "activation",
582614description: "Set group activation mode.",
583615textAlias: "/activation",
584616category: "management",
617+tier: "power",
585618args: [
586619{
587620name: "mode",
@@ -598,6 +631,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
598631description: "Set send policy.",
599632textAlias: "/send",
600633category: "management",
634+tier: "power",
601635args: [
602636{
603637name: "mode",
@@ -615,6 +649,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
615649textAlias: "/reset",
616650acceptsArgs: true,
617651category: "session",
652+tier: "essential",
618653}),
619654defineChatCommand({
620655key: "new",
@@ -623,13 +658,15 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
623658textAlias: "/new",
624659acceptsArgs: true,
625660category: "session",
661+tier: "essential",
626662}),
627663defineChatCommand({
628664key: "compact",
629665nativeName: "compact",
630666description: "Compact the session context.",
631667textAlias: "/compact",
632668category: "session",
669+tier: "essential",
633670args: [
634671{
635672name: "instructions",
@@ -645,6 +682,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
645682description: "Set thinking level.",
646683textAlias: "/think",
647684category: "options",
685+tier: "essential",
648686args: [
649687{
650688name: "level",
@@ -661,6 +699,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
661699description: "Toggle verbose mode.",
662700textAlias: "/verbose",
663701category: "options",
702+tier: "standard",
664703args: [
665704{
666705name: "mode",
@@ -677,6 +716,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
677716description: "Toggle plugin trace lines.",
678717textAlias: "/trace",
679718category: "options",
719+tier: "power",
680720args: [
681721{
682722name: "mode",
@@ -693,6 +733,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
693733description: "Toggle fast mode.",
694734textAlias: "/fast",
695735category: "options",
736+tier: "standard",
696737args: [
697738{
698739name: "mode",
@@ -709,6 +750,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
709750description: "Toggle reasoning visibility.",
710751textAlias: "/reasoning",
711752category: "options",
753+tier: "standard",
712754args: [
713755{
714756name: "mode",
@@ -725,6 +767,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
725767description: "Toggle elevated mode.",
726768textAlias: "/elevated",
727769category: "options",
770+tier: "power",
728771args: [
729772{
730773name: "mode",
@@ -741,6 +784,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
741784description: "Set exec defaults for this session.",
742785textAlias: "/exec",
743786category: "options",
787+tier: "power",
744788args: [
745789{
746790name: "host",
@@ -775,6 +819,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
775819description: "Show or set the model.",
776820textAlias: "/model",
777821category: "options",
822+tier: "essential",
778823args: [
779824{
780825name: "model",
@@ -788,6 +833,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
788833nativeName: "models",
789834description: "List model providers or provider models.",
790835textAlias: "/models",
836+tier: "standard",
791837argsParsing: "none",
792838acceptsArgs: true,
793839category: "options",
@@ -798,6 +844,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
798844description: "Adjust queue settings.",
799845textAlias: "/queue",
800846category: "options",
847+tier: "power",
801848args: [
802849{
803850name: "mode",
@@ -831,6 +878,7 @@ export function buildBuiltinChatCommands(): ChatCommandDefinition[] {
831878textAlias: "/bash",
832879scope: "text",
833880category: "tools",
881+tier: "power",
834882args: [
835883{
836884name: "command",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。