惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
DataBreaches.Net
B
Blog RSS Feed
博客园_首页
The GitHub Blog
The GitHub Blog
I
InfoQ
L
LangChain Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
美团技术团队
腾讯CDC
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs: document cli startup helpers · openclaw/openclaw@20...
steipete · 2026-06-04 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Main CLI startup policy helpers for fast paths, proxy startup, aliases, and missing commands.

12

import {

23

normalizeLowercaseStringOrEmpty,

34

normalizeOptionalLowercaseString,

@@ -82,6 +83,7 @@ function isBareParentDefaultHelpArgv(argv: string[]): boolean {

8283

}

8384
8485

export function rewriteUpdateFlagArgv(argv: string[]): string[] {

86+

// Preserve the old root --update spelling by rewriting before Commander registration.

8587

const index = argv.indexOf("--update");

8688

if (index === -1) {

8789

return argv;

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Main CLI entry orchestration: fast paths, env setup, plugin aliases, and Commander dispatch.

12

import { existsSync } from "node:fs";

23

import path from "node:path";

34

import process from "node:process";

@@ -79,6 +80,7 @@ const loadCrestodianModule = async () => await import("../crestodian/crestodian.

7980

const loadProgressModule = async () => await import("./progress.js");

8081
8182

function createGatewayCliMainStartupTrace(argv: string[]) {

83+

// Startup trace is scoped to gateway invocations to avoid routine CLI stderr noise.

8284

const enabled =

8385

isTruthyEnvValue(process.env.OPENCLAW_GATEWAY_STARTUP_TRACE) &&

8486

argv.slice(2).includes("gateway");

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Commander registration for sandbox container list, recreate, and explain commands.

12

import type { Command } from "commander";

23

import { formatDocsLink } from "../../packages/terminal-core/src/links.js";

34

import { theme } from "../../packages/terminal-core/src/theme.js";

@@ -44,6 +45,7 @@ const SANDBOX_EXAMPLES = {

4445

function createRunner(

4546

commandFn: (opts: CommandOptions, runtime: typeof defaultRuntime) => Promise<void>,

4647

) {

48+

// Sandbox commands share the default runtime error/exit behavior.

4749

return async (opts: CommandOptions) => {

4850

try {

4951

await commandFn(opts, defaultRuntime);

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Secrets CLI for reload, audit, configure, and apply workflows.

12

import type { Command } from "commander";

23

import { formatDocsLink } from "../../packages/terminal-core/src/links.js";

34

import { theme } from "../../packages/terminal-core/src/theme.js";

@@ -46,6 +47,7 @@ const secretsApplyLoader = createLazyImportLoader<SecretsApplyModule>(

4647

);

4748
4849

async function readPlanFile(pathname: string): Promise<SecretsApplyPlan> {

50+

// Apply consumes a generated plan shape, not arbitrary JSON.

4951

const [{ readFileSync }, { isSecretsApplyPlan }] = await Promise.all([

5052

fsModuleLoader.load(),

5153

import("../secrets/plan.js"),

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Security CLI for local/deep audits and safe remediation.

12

import {

23

normalizeOptionalLowercaseString,

34

normalizeOptionalString,

@@ -43,6 +44,7 @@ function buildAuditGatewayAuthOverride(params: {

4344

token?: string;

4445

password?: string;

4546

}) {

47+

// Explicit runtime auth overrides must include the matching credential.

4648

if (!params.mode) {

4749

return undefined;

4850

}

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Fast help renderer for setup/onboard/configure without loading full CLI startup.

12

import { Command } from "commander";

23

import { VERSION } from "../version.js";

34

import { resolveCliArgvInvocation } from "./argv-invocation.js";

@@ -66,6 +67,7 @@ async function registerHelpCommand(

6667

}

6768
6869

export async function tryOutputSetupOnboardConfigureHelp(argv: string[]): Promise<boolean> {

70+

// Register only the requested command so help stays quick and avoids config/plugin startup.

6971

const command = resolveSetupOnboardConfigureHelpCommand(argv);

7072

if (!command) {

7173

return false;

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Skills CLI for workspace status, install/update, ClawHub verification, and workshop proposals.

12

import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";

23

import type { Command } from "commander";

34

import { formatDocsLink } from "../../packages/terminal-core/src/links.js";

@@ -72,6 +73,7 @@ function resolveSkillsWorkspace(options?: ResolveSkillsWorkspaceOptions): {

7273

workspaceDir: string;

7374

agentId: string;

7475

} {

76+

// Prefer explicit --agent, then infer from cwd, then fall back to configured default agent.

7577

const config = getRuntimeConfig();

7678

const explicitAgentId = normalizeOptionalString(options?.agentId);

7779

const inferredAgentId = explicitAgentId

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Reader/cache for generated CLI startup metadata used by help and completion fast paths.

12

import fs from "node:fs";

23

import path from "node:path";

34

import { fileURLToPath } from "node:url";

@@ -14,6 +15,7 @@ function resolveStartupMetadataPathCandidates(moduleUrl: string): string[] {

1415

}

1516
1617

export function readCliStartupMetadata(moduleUrl: string): Record<string, unknown> | null {

18+

// Check both source and bundled layouts; cache misses too so repeated help stays cheap.

1719

for (const metadataPath of resolveStartupMetadataPathCandidates(moduleUrl)) {

1820

const cached = startupMetadataByPath.get(metadataPath);

1921

if (cached !== undefined) {

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// CLI tagline selection helpers, including deterministic random/default/holiday modes.

12

import { parseStrictNonNegativeInteger } from "../infra/parse-finite-number.js";

23
34

const DEFAULT_TAGLINE = "All your chats, one OpenClaw.";

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// Shared Vitest runtime capture helpers for CLI command output assertions.

12

import { vi } from "vitest";

23

import type { OutputRuntimeEnv } from "../runtime.js";

34

import type { MockFn } from "../test-utils/vitest-mock-fn.js";

@@ -32,6 +33,7 @@ function stringifyRuntimeJson(value: unknown, space = 2): string {

3233

}

3334
3435

export function createCliRuntimeCapture(): CliRuntimeCapture {

36+

// Capture output in arrays while preserving vi mock call inspection.

3537

const runtimeLogs: string[] = [];

3638

const runtimeErrors: string[] = [];

3739

const stringifyArgs = (args: unknown[]) => args.map((value) => String(value)).join(" ");