mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-12 05:26:09 +00:00
* feat: correlate native search outcomes in audit history Metadata-only audit ledger for agent runs and tool actions in the shared state DB: stable event identity, closed action/status/error vocabularies, one-way-hashed tool-call ids, never-inferred terminal outcomes for native web-search (explicit completed/failed only; otherwise unknown), bounded retention, audit.list gateway RPC and openclaw audit CLI. Squashed from the 82-commit audit stack for replay onto current main. * feat(audit): add audit.enabled config gate (default on) The metadata-only audit ledger records by default: an audit trail enabled only after an incident cannot explain the incident, and the rows are strictly less sensitive than the transcripts every install already stores. audit.enabled=false stops new writes at the gateway subscription seam; audit.list and openclaw audit keep serving existing records until they expire. Documented in the configuration reference, protocol page, and CLI reference. * fix: repair full-matrix CI findings after rebase - break the dynamic-tools/dynamic-tool-execution import cycle by extracting resolveCodexToolAbortTerminalReason into a leaf module - restore main's session-worktree protocol exports lost in the index.ts auto-merge - register the audit event writer worker as a knip entry point - docs table formatting; subagent wait-cancellation test scoped to its audit intent (outcome + timing) and advanced past main's new lifecycle-timeout retry grace
145 lines
4.2 KiB
TypeScript
145 lines
4.2 KiB
TypeScript
// Core root-command descriptor catalog used for help placeholders and lazy registration.
|
|
import { defineCommandDescriptorCatalog } from "./command-descriptor-utils.js";
|
|
import type { NamedCommandDescriptor } from "./command-group-descriptors.js";
|
|
|
|
/** Descriptor shape for root commands owned by the core CLI. */
|
|
export type CoreCliCommandDescriptor = NamedCommandDescriptor;
|
|
|
|
const coreCliCommandCatalog = defineCommandDescriptorCatalog([
|
|
{
|
|
name: "crestodian",
|
|
description: "Open the ring-zero setup and repair helper",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "setup",
|
|
description: "Alias for openclaw onboard",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "onboard",
|
|
description: "Guided setup for auth, models, Gateway, workspace, channels, and skills",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "configure",
|
|
description: "Interactive configuration for credentials, channels, gateway, and agent defaults",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "config",
|
|
description:
|
|
"Non-interactive config helpers (get/set/patch/unset/file/schema/validate). Run without subcommand for guided setup.",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "backup",
|
|
description: "Create and verify local backup archives for OpenClaw state",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "migrate",
|
|
description: "Import state from another agent system",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "doctor",
|
|
description: "Health checks + quick fixes for the gateway and channels",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "dashboard",
|
|
description: "Open the Control UI with your current token",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "reset",
|
|
description: "Reset local config/state (keeps the CLI installed)",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "uninstall",
|
|
description: "Uninstall the gateway service + local data (CLI remains)",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "message",
|
|
description: "Send, read, and manage messages and channel actions",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "mcp",
|
|
description: "Manage OpenClaw mcp.servers config and channel bridge",
|
|
hasSubcommands: true,
|
|
parentDefaultHelp: true,
|
|
},
|
|
{
|
|
name: "transcripts",
|
|
description: "Inspect stored transcripts",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "agent",
|
|
description: "Run an agent turn via the Gateway (use --local for embedded)",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "agents",
|
|
description: "Manage isolated agents (workspaces + auth + routing)",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "status",
|
|
description: "Show channel health and recent session recipients",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "health",
|
|
description: "Fetch health from the running gateway",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "audit",
|
|
description: "Inspect metadata-only agent run and tool action records",
|
|
hasSubcommands: false,
|
|
},
|
|
{
|
|
name: "sessions",
|
|
description: "List stored conversation sessions",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "commitments",
|
|
description: "List and manage inferred follow-up commitments",
|
|
hasSubcommands: true,
|
|
},
|
|
{
|
|
name: "tasks",
|
|
description: "Inspect durable background tasks and TaskFlow state",
|
|
hasSubcommands: true,
|
|
},
|
|
] as const satisfies ReadonlyArray<CoreCliCommandDescriptor>);
|
|
|
|
/** Static root-command descriptors for the core CLI surface. */
|
|
export const CORE_CLI_COMMAND_DESCRIPTORS = coreCliCommandCatalog.descriptors;
|
|
|
|
/** Return core root-command descriptors in help/registration order. */
|
|
export function getCoreCliCommandDescriptors(): ReadonlyArray<CoreCliCommandDescriptor> {
|
|
return coreCliCommandCatalog.getDescriptors();
|
|
}
|
|
|
|
/** Return names for all core root commands. */
|
|
export function getCoreCliCommandNames(): string[] {
|
|
return coreCliCommandCatalog.getNames();
|
|
}
|
|
|
|
/** Return core root commands that own child subcommands. */
|
|
export function getCoreCliCommandsWithSubcommands(): string[] {
|
|
return coreCliCommandCatalog.getCommandsWithSubcommands();
|
|
}
|
|
|
|
/** Return core root commands whose parent action should default to help. */
|
|
export function getCoreCliParentDefaultHelpCommands(): string[] {
|
|
return coreCliCommandCatalog.getParentDefaultHelpCommands();
|
|
}
|