乐于分享
好东西不私藏

深入深出openclaw:gateway启动过程代码设计的插桩实验1.md

深入深出openclaw:gateway启动过程代码设计的插桩实验1.md

从本节开始,我们逐步修改gateway执行路径上的代码,输出一些关键对象的信息,帮助我们进一步理解代码的设计思路。首先我们先看src/cli/gateway-cli/register.ts,这个文件的代码主要用来注册gateway进程处于命令行状态下运行时,可以输入命令行窗户的命令。 首先是命令注册函数,代码如下:

exportfunctionregisterGatewayCli(program: Command{
...
}

这个函数的作用是:把一堆子命令挂到 gateway 这个命令组下面。它本身不做任何启动相关的事。例如我们后面要执行的命令:

pnpm openclaw gateway run

其中对命令"run"的处理逻辑就是在上面函数的执行中进行加载的。接下来我们进入到src/cli/gateway-cli/run-command.ts,然后在如下函数添加插桩代码:

exportfunctionaddGatewayRunCommand(cmd: Command): Command{
return cmd
    .option("--port <port>""Port for the gateway WebSocket")
    .option(
"--bind <mode>",
'Bind mode ("loopback"|"lan"|"tailnet"|"auto"|"custom"). Defaults to config gateway.bind (or loopback).',
    )
    .option(
"--token <token>",
"Shared token required in connect.params.auth.token (default: OPENCLAW_GATEWAY_TOKEN env if set)",
    )
    .option("--auth <mode>"`Gateway auth mode (${formatModeChoices(GATEWAY_AUTH_MODES)})`)
    .option("--password <password>""Password for auth mode=password")
    .option("--password-file <path>""Read gateway password from file")
    .option(
"--tailscale <mode>",
`Tailscale exposure mode (${formatModeChoices(GATEWAY_TAILSCALE_MODES)})`,
    )
    .option(
"--tailscale-reset-on-exit",
"Reset Tailscale serve/funnel configuration on shutdown",
false,
    )
    .option(
"--allow-unconfigured",
"Allow gateway start without enforcing gateway.mode=local in config (does not repair config)",
false,
    )
    .option("--dev""Create a dev config + workspace if missing (no BOOTSTRAP.md)"false)
    .option(
"--reset",
"Reset dev config + credentials + sessions + workspace (requires --dev)",
false,
    )
    .option("--force""Kill any existing listener on the target port before starting"false)
    .option("--verbose""Verbose logging to stdout/stderr"false)
    .option(
"--cli-backend-logs",
"Only show CLI backend logs in the console (includes stdout/stderr)",
false,
    )
    .option("--claude-cli-logs""Deprecated alias for --cli-backend-logs"false)
    .option("--ws-log <style>"'WebSocket log style ("auto"|"full"|"compact")'"auto")
    .option("--compact"'Alias for "--ws-log compact"'false)
    .option("--raw-stream""Log raw model stream events to jsonl"false)
    .option("--raw-stream-path <path>""Raw stream jsonl path")
    .action(async (opts, command) => {
// [STEP-2: gateway run action triggered]
// This is the exact point where Commander hands control from the
// "openclaw gateway run" parse to the actual gateway startup code.
console.log("[step2] gateway run action triggered");
console.log("[step2] parsed opts keys:"Object.keys(opts));
console.log("[step2] command name:", command.name());
const { resolveGatewayRunOptions, runGatewayCommand } = awaitimport("./run.js");
await runGatewayCommand(resolveGatewayRunOptions(opts, command));
    });
}

看到上面代码中末尾部分的console.log输出就是我们添加的插桩代码,当执行"pnpm openclaw gateway run"后,上面代码会执行然后输出结果类似下面:

[step2] gateway run action triggered
[step2] parsed opts keys: [
'tailscaleResetOnExit',
'allowUnconfigured',
'dev',
'reset',
'force',
'verbose',
'cliBackendLogs',
'claudeCliLogs',
'wsLog',
'compact',
'rawStream'
]
[step2] command name: run

从上面输出可以看到,addGatewayRunCommand用于注册"run"命令支持的参数,例如"pnpm openclaw gateway run --port 1234",那么gateway进程启动时就会将参数对应的值1234设置为监听端口。如果在命令行窗口执行run命令时没有使用上面对应的参数, 那么参数就会使用配置文件的设置值,或者是默认环境变量的值来作为兜底。同时上面代码中option函数的第三个参数用来设置该参数是否有默认值,如果没有设置第三个参数,那么默认值为undefined,那么在我们输出parsed opts keys时就不会打印没有设置默认值的参数对应的名称。

这里的代码使用到了nodejs的第三方库Commander,这个库主要用来设置命令行参数。它支持把“--allow-unconfigured ”这种形式的字符串自动转换为骆驼格式"allowUnconfigured",这也是为何我们打印出的run命令所支持的命令行参数是骆驼格式,跟代码中设置的有所区别。 Commander库是Nodejs程序常用的用于设计命令行的工具,它能够方便的支持用户输入的命令行命令并将其转换为object对象,例如下面的命令行:

openclaw gateway run --allow-unconfigured --port 1234

Commander解析后就会转换为如下obj:

{
allowUnconfiguredtrue,   // ← Commander 把 --allow-unconfigured 转成 camelCase
port"1234"// ← Commander 把 --port 1234 解析成键值对
}

接下来我们添加的代码在src/cli/gateway-cli/run.ts,首先我们进入函数runGatewayCommand,因为前面我们执行的命令是"pnpm openclaw gateway run",这个函数对应run命令的执行实现。首先我们添加如下输出:

exportasyncfunctionrunGatewayCommand(opts: GatewayRunOpts{
// [STEP-2: runGatewayCommand entry]
// The CLI layer has finished parsing options and is now entering the
// gateway-specific startup orchestration. This is the boundary between
// Commander and the Gateway runtime.
console.log("[step2] runGatewayCommand entered");
console.log("[step2] runGatewayCommand opts:", {
port: opts.port,
bind: opts.bind,
auth: opts.auth,
verbose: opts.verbose,
allowUnconfigured: opts.allowUnconfigured,
  });

  ...
}

上面添加的代码先输出run 命令后面用户配置的后续参数,由于我们执行的命令在run之后没有进行任何设置,因此上面代码输出端口等参数时都会是undefined,运行"pnpm run openclaw gateway run"后上面输出内容如下:

[step2] runGatewayCommand opts: {
portundefined,
bindundefined,
authundefined,
verbosefalse,
allowUnconfiguredfalse
}

因为我们没有在命令行配置port, bind, auth等参数,而这些参数又没有设置默认值,因此缺省取值为undefined,verbose,allowUnconfigured由于前面我们的插桩代码可以看到设置了默认值,因此这里显示他们对应的默认值"false".我们继续在runGatewayCommand函数中继续增加插桩代如下:

exportasyncfunctionrunGatewayCommand(opts: GatewayRunOpts{
    ....
    const startupTrace = createGatewayCliStartupTrace();

// [STEP-2: server module import]
// The heaviest import in the whole CLI: this pulls in the entire Gateway
// server module tree (channels, plugins, HTTP stack, WebSocket runtime).
// The spinner hides the 15-20 s pause on slower hosts.
console.log("[step2] about to import ../../gateway/server.js");

// The heaviest part of gateway startup is loading the server module tree
// (channels, plugins, HTTP stack, etc.). Show a spinner so the user sees
// progress instead of a silent 15-20 s pause (especially on Windows/NTFS).
const { startGatewayServer } = await startupTrace.measure("cli.server-import", () =>
    withProgress(
      { label"Loading gateway modules…"indeterminatetrue },
async () => import("../../gateway/server.js"),
    ),
  );

// [STEP-2: server module imported]
console.log("[step2] startGatewayServer function imported, typeof:"typeof startGatewayServer);
    ....
}

这里插桩代码在运行命令后输出内容如下:

[step2] about to import ../../gateway/server.js

◇  
[step2] startGatewayServer functionimportedtypeoffunction
17:48:02 [gatewayloadingconfiguration
17:48:05 [gatewayresolvingauthentication
17:48:05 [gatewayControlUIassetsaremissingfirststartupmayspendafewsecondsbuildingthembeforethegatewaybinds. `pnpmgateway:watchdoesnotrebuildControlUIassetssorerun `pnpmui:buildafterUIchangesoruse `pnpmui:devwhiledevelopingtheControlUIForafulllocaldistrun `pnpmbuild && pnpmui:build`.
17:48:05 [gatewaystarting...

这里的代码显示gateway是作为一个服务器进程存在,它的主要实现代码在/gateway/server.js这个代码文件里,nodejs会从该文件里读取startGatewayServer函数的实现代码然后加载到内存中,这部分代码就是gateway进程的主要实现,从上面输出我们也可以看到startGatewayServer是一个函数类型的对象,因此它是可执行的。

上面输出内容中"[gateway]"部分的输出是由代码中的函数 gatewayLog.info进行的输出。从以上输出可以看到代码对应的执行流程:

17:48:02 import 完成 整个 Gateway server 模块树加载完毕

17:48:02 loading configuration 开始读配置

17:48:05 resolving authentication 配置读完了,开始解析认证

17:48:05 Control UI assets missing 认证解析完,检查 UI 资源

17:48:05 starting… 一切准备就绪,准备调用 server

在加载gateway服务器进程的主要实现代码后,系统并没有立刻执行,因为它需要确保运行gateway服务进程的相关配置是正确的。首先它先读取openclaw的配置文件,这里对应输出"loading configuration 开始读配置",配置读取完毕后,确认当前运行的权限是否运行执行gateway进程,这里对应"resolving authentication 配置读完了,开始解析认证",接下来查看是否要加载UI用于gateway相关参数的配置或显示,由于我们这里通过命令行来启动gateway,因此在这里不会有UI相关资源的导入,这些用于运行gateway服务器进程的相关配置确定合适后才开始执行gateway进程的主要代码,也就是startGatewayServer函数。

上面插桩代码输出的内容展示了openclaw的设计思想,其中展示了一个很清晰的层次:加载代码 → 读取配置 → 解析认证 → 检查资源 → 启动 Server。 每一层都有明确的职责:

阶段        负责什么                        失败时怎么办 加载代码      把 server 模块 import 进来        报错,提示 build 读取配置       读 openclaw.json                报错, 提示 openclaw setup 解析认证      决定谁可以连 Gateway             报错,提示设 token/password 检查资源      Control UI 是否存在             只警告,不阻止启动 启动 Server  调用 startGatewayServer         在 startGatewayServer 内部报错并清理

上面表格中最后一行值得关注,它表明一旦执行到 startGatewayServer(port, {...}),失败处理就移交给 server.impl.ts 内部了。这个函数里有自己的错误处理:

try {
// ... 所有启动阶段 ...
catch (err) {
await closeOnStartupFailure();
throw err;
}

也就是说,如果 Server 启动过程中任何一步失败(比如端口被占用、TLS 配置错误、插件加载失败),startGatewayServer 会:调用closeOnStartupFailure() 清理已经创建的资源;抛出错误;错误回到 CLI 层,最终显示给用户并退出。

接下来我们进行的代码修改实验在src/gateway/server.impl.ts,这个文件用于实现gateway服务进程的主要逻辑,我们将在下面函数进行关键信息输出:

exportasyncfunctionstartGatewayServer(
  port = 18789,
  opts: GatewayServerOptions = {},
): Promise<GatewayServer
{
// [STEP-3: startGatewayServer entry]
// The CLI layer has handed control to the Gateway server implementation.
// Print the startup contract so we can see what the server received before
// any heavy initialization begins.
console.log("[step3] startGatewayServer entered");
console.log("[step3] port:", port);
console.log("[step3] opts keys:"Object.keys(opts));
console.log("[step3] opts summary:", {
bind: opts.bind,
host: opts.host,
controlUiEnabled: opts.controlUiEnabled,
openAiChatCompletionsEnabled: opts.openAiChatCompletionsEnabled,
openResponsesEnabled: opts.openResponsesEnabled,
hasAuthBoolean(opts.auth),
hasTailscaleBoolean(opts.tailscale),
startupStartedAt: opts.startupStartedAt,
hasStartupConfigSnapshotReadBoolean(opts.startupConfigSnapshotRead),
deferStartupSidecars: opts.deferStartupSidecars,
  });

// [STEP-3: early exit for inspection]
// Stop here so we can inspect the startup contract before any server-side
// initialization (network runtime, config migration, plugin loading, etc.).
  process.exit(0);
  ...
}

上面step3对应部分是我们的插桩代码,执行命令"pnpm openclaw gateway run"后,上面代码输出类似下面的信息:

16:21:43 [step3] startGatewayServer entered
16:21:43 [step3] port: 18789
16:21:43 [step3] opts keys: [
'bind',
'auth',
'tailscale',
'startupStartedAt',
'startupConfigSnapshotRead'
]
16:21:43 [step3] opts summary: {
bind'loopback',
hostundefined,
controlUiEnabledundefined,
openAiChatCompletionsEnabledundefined,
openResponsesEnabledundefined,
hasAuthfalse,
hasTailscalefalse,
startupStartedAt1785831700697,
hasStartupConfigSnapshotReadtrue,
deferStartupSidecarsundefined
}

这段输出是 Gateway Server 层的"入口验收单"。它告诉你:CLI 层已经把整理好的启动合同交给了 Server,Server 一进门看到的就是这些。总结成一句话:Server 拿到了:端口、绑定策略、认证覆盖(无)、Tailscale 覆盖(无)、启动计时起点、配置快照。其他没给的,Server 自己按默认值或配置文件处理。

opts keys输出部分对应CLI层传递给gateway服务进程的参数,这里分为两类: A. 总是传的字段(4 个) bind auth tailscale startupStartedAt 即使值为 undefined,CLI 也显式传过去。这叫 "显式空值",意思是告诉 Server:"用户没覆盖这个选项",而不是"这个选项不存在"。

B. 有条件才传的字段(1 个) ...(startupConfigSnapshotReadForThisStart ? { startupConfigSnapshotRead: startupConfigSnapshotReadForThisStart } : {}),

只有真正读到了配置快照,才传 startupConfigSnapshotRead。这里输出 hasStartupConfigSnapshotRead: true,说明快照成功读取并传递了。

每个字段的设计含义: port: 18789 这是 Server 监听的 WebSocket/HTTP 端口。CLI 层已经把默认值 18789 解析好了,Server 不需要再去猜。

bind: 'loopback' 这是绑定策略,不是具体 IP 地址。loopback 表示 Server 会绑定到 127.0.0.1,只允许本机连接。

设计点:CLI 层把"策略名"传给 Server,Server 内部再解析成具体 IP。这样:CLI 用户只需要说 --bind loopback 或 --bind lan;Server 负责处理 loopback、lan、tailnet、auto、custom 各自的实现细节。

auth: undefined(hasAuth: false) 用户没有通过 --token / --password / --auth 覆盖认证配置。所以 Server 会完全使用配置文件里的 gateway.auth 设置。

tailscale: undefined(hasTailscale: false) 用户没有通过 --tailscale 覆盖 Tailscale 配置。Server 会使用配置文件里的设置,或者默认关闭。

startupStartedAt: 1785831700697 这是毫秒级时间戳,从 CLI 层开始计时。Server 会用它计算"从用户敲命令到 Gateway Ready"的总耗时,最终显示在启动日志里。

startupConfigSnapshotRead: true 这是最重要的设计点之一。含义:CLI 层已经读过 openclaw.json,生成了一个带 hash/来源/元信息的快照,直接传给 Server。好处是Server 不需要再读一次磁盘;热重载时可以用同一个快照做对比;配置错误在 CLI 层就暴露了,不会等 Server 启动一半再失败。

注意到 opts summary 里很多字段都是 undefined,这些字段在 GatewayServerOptions 类型里都有定义,但 CLI 没有传。设计逻辑就是,对于undefined 表示 "使用 Server 内部默认值或读取配置文件"。

这段输出背后的核心设计原则原则 1:Server 不回头问 CLI 问题Server 拿到 opts 后,不会再调用 CLI 层的函数去问"用户传了什么"。所有需要的信息都已经在 opts 里了。这叫 "一次握手,自给自足"。原则 2:默认值下沉默认值不在 CLI 帮助里硬编码,也不在 Commander 里设置,而是在 Server 内部根据配置决定。这样:同一套默认值逻辑可以被测试复用;配置文件可以覆盖默认值;CLI 代码保持简洁。原则 3:快照前置配置快照在 CLI 层生成,传给 Server。这符合 3.2.3 Phase One 的设计:"Read configuration file snapshot (for hot-reload comparison)"。原则 4:安全默认 bind: 'loopback'、hasAuth: false、hasTailscale: false 共同说明:默认配置是安全的。只有当用户显式放宽绑定策略或启用外部暴露时,才会触发额外的安全要求。

我们继续在startGatewayServer函数中添加插桩代码:

exportasyncfunctionstartGatewayServer(
  port = 18789,
  opts: GatewayServerOptions = {},
): Promise<GatewayServer
{
...
 const startupConfigLoad = await startupTrace.measure("config.snapshot", () =>
    loadGatewayStartupConfigSnapshot({
      minimalTestGateway,
      log,
measure(name, run) => startupTrace.measure(name, run),
      ...(opts.startupConfigSnapshotRead
        ? { initialSnapshotRead: opts.startupConfigSnapshotRead }
        : {}),
    }),
  );
const configSnapshot = startupConfigLoad.snapshot;

// [STEP-4: config snapshot loaded]
// Inspect the startup config snapshot structure before it is used to
// bootstrap plugins, runtime state, and network services.
// Only structural metadata is logged; secret values are intentionally omitted.
console.log("[step4] startupConfigLoad keys:"Object.keys(startupConfigLoad));
console.log("[step4] wroteConfig:", startupConfigLoad.wroteConfig);
console.log(
"[step4] has pluginMetadataSnapshot:",
Boolean(startupConfigLoad.pluginMetadataSnapshot),
  );
console.log("[step4] configSnapshot path:", configSnapshot.path);
console.log("[step4] configSnapshot exists:", configSnapshot.exists);
console.log("[step4] configSnapshot valid:", configSnapshot.valid);
console.log("[step4] configSnapshot has raw:"Boolean(configSnapshot.raw));
console.log("[step4] configSnapshot has parsed:"Boolean(configSnapshot.parsed));
console.log("[step4] configSnapshot hash prefix:", configSnapshot.hash?.slice(08));
console.log(
"[step4] configSnapshot sourceConfig top-level keys:",
Object.keys(configSnapshot.sourceConfig ?? {}),
  );
console.log(
"[step4] configSnapshot runtimeConfig top-level keys:",
Object.keys(configSnapshot.runtimeConfig ?? {}),
  );
console.log("[step4] configSnapshot issues count:", configSnapshot.issues?.length);
console.log("[step4] configSnapshot warnings count:", configSnapshot.warnings?.length);
console.log(
"[step4] configSnapshot legacyIssues count:",
    configSnapshot.legacyIssues?.length,
  );
if (startupConfigLoad.pluginMetadataSnapshot) {
console.log(
"[step4] pluginMetadataSnapshot keys:",
Object.keys(startupConfigLoad.pluginMetadataSnapshot),
    );
console.log(
"[step4] pluginMetadataSnapshot manifestRegistry plugins count:",
      startupConfigLoad.pluginMetadataSnapshot.manifestRegistry?.plugins?.length,
    );
  }

// [STEP-4: early exit for inspection]
  process.exit(0);
  ...
}
添加上面代码后执行命令"pnpm openclaw gateway run"会看到类似如下输出:
```js

12:14:37 [step4] startupConfigLoad keys: [ 'snapshot', 'wroteConfig', 'pluginMetadataSnapshot' ]
12:14:37 [step4] wroteConfig: false
12:14:37 [step4] has pluginMetadataSnapshot: true
12:14:37 [step4] configSnapshot path: C:\Users\OseasyVM\.openclaw\openclaw.json
12:14:37 [step4] configSnapshot exists: true
12:14:37 [step4] configSnapshot valid: true
12:14:37 [step4] configSnapshot has raw: true
12:14:37 [step4] configSnapshot has parsed: true
12:14:37 [step4] configSnapshot hash prefix: 630f2500
12:14:37 [step4] configSnapshot sourceConfig top-level keys: [
  'agents',  'gateway',
  'session', 'tools',
  'plugins', 'channels',
  'wizard',  'meta',
  'skills'
]
12:14:37 [step4] configSnapshot runtimeConfig top-level keys: [
  'meta',     'wizard',
  'agents',   'tools',
  'commands', 'session',
  'channels', 'gateway',
  'skills',   'plugins',
  'messages'
]
12:14:37 [step4] configSnapshot issues count: 0
12:14:37 [step4] configSnapshot warnings count: 0
12:14:37 [step4] configSnapshot legacyIssues count: 0
12:14:38 [step4] pluginMetadataSnapshot keys: [
  'policyHash',
  'configFingerprint',
  'workspaceDir',
  'index',
  'registryDiagnostics',
  'manifestRegistry',
  'plugins',
  'diagnostics',
  'byPluginId',
  'normalizePluginId',
  'owners',
  'metrics'
]
12:14:38 [step4] pluginMetadataSnapshot manifestRegistry plugins count: 124

结合上面输出对应的是gateway进程在启动时的快照处理逻辑,Gateway 启动时配置系统的三层数据结构:

startupConfigLoad ├── snapshot: ConfigFileSnapshot      ← 配置文件本身 └── pluginMetadataSnapshot             ← 插件注册表元数据

我们一层一层看。第一层:startupConfigLoad 的结构: [step4] startupConfigLoad keys: [ 'snapshot', 'wroteConfig', 'pluginMetadataSnapshot' ] [step4] wroteConfig: false [step4] has pluginMetadataSnapshot: true 设计点 1:配置加载是一次"结果打包" loadGatewayStartupConfigSnapshot() 不只是读一个 JSON 文件,它返回一个包含三部分的对象:

字段                        含义 snapshot                    配置文件的完整快照 wroteConfig                  启动过程中是否回写了配置文件 pluginMetadataSnapshot      插件注册表索引

设计点 2:wroteConfig: false false 表示这次启动没有修改配置文件。什么时候会是 true?比如:

自动迁移旧版配置格式时 applyPluginAutoEnable 自动启用某些插件并回写配置时 把它单独作为一个字段返回,而不是让调用者去比较文件前后内容,简化了调用方逻辑。

设计点 3:插件元数据和配置快照一起加载 pluginMetadataSnapshot 在配置加载阶段就拿到,因为后续决定"哪些插件要启动"需要它。

第二层:配置文件快照 ConfigFileSnapshot [step4] configSnapshot path: C:\Users\OseasyVM.openclaw\openclaw.json [step4] configSnapshot exists: true [step4] configSnapshot valid: true [step4] configSnapshot has raw: true [step4] configSnapshot has parsed: true [step4] configSnapshot hash prefix: 630f2500

设计点 1:快照是"文件 + 元信息"的组合 配置文件不只是"内容",它还包含:

字段                  作用 path                   文件路径 exists                 文件是否存在 valid                   是否通过 schema 校验 raw                     原始文件字符串 parsed                 解析后的 JSON hash                   内容哈希,用于热重载对比 sourceConfig           用户 authored 配置(含 include 和 env 替换) runtimeConfig           运行时配置(加了内部默认值) issues                   / warnings / legacyIssues 配置问题清单

设计点 2:hash 是热重载的基石 hash prefix: 630f2500 是配置文件内容的 SHA256 摘要。它的用途是:启动时记录基准 hash;运行中如果文件变了,重新读取并比较 hash;只有 hash 变了,才触发配置热重载。

设计点 3:raw 和 parsed 同时保存 字段               用途 raw                 原始文本,用于回写时保留格式和注释 parsed             解析后的对象,用于运行时读取

这样回写配置时不会丢失用户的格式、注释、顺序。

第三层:sourceConfig vs runtimeConfig 这是最关键的设计差异。

[step4] configSnapshot sourceConfig top-level keys: [ 'agents', 'gateway', 'session', 'tools', 'plugins', 'channels', 'wizard', 'meta', 'skills' ] [step4] configSnapshot runtimeConfig top-level keys: [ 'meta', 'wizard', 'agents', 'tools', 'commands', 'session', 'channels', 'gateway', 'skills', 'messages', 'plugins' ] 设计点:sourceConfig 是用户视角,runtimeConfig 是程序视角 配置                 含义 sourceConfig         用户写的配置,经过 {ENV} 替换,但还没加默认值 runtimeConfig         在 sourceConfig 基础上加了大量内部默认值和派生字段,给程序运行时用

输出中的差异runtimeConfig 比 sourceConfig 多了:commands(内部命令默认配置),messages(消息模板默认配置),而顺序也不同——这只是对象属性枚举顺序,不重要。

为什么分成两个?写回配置时用 sourceConfig:不能把内部默认值写进用户的 openclaw.json,否则用户文件会被撑爆。运行时用 runtimeConfig:所有默认值已填充,代码不需要到处判断 if (cfg.xxx === undefined)。热重载对比时用 sourceConfig 或 hash:只关心用户实际改了什么。

第四层:配置健康度 [step4] configSnapshot issues count: 0 [step4] configSnapshot warnings count: 0 [step4] configSnapshot legacyIssues count: 0 设计点:问题分级 级别               含义 issues`             严重错误,通常会导致启动失败 warnings           警告,可以运行但建议修复 legacyIssues       旧版配置需要迁移 0 / 0 / 0            表示你的配置完全干净---

第五层:插件元数据 pluginMetadataSnapshot: [step4] pluginMetadataSnapshot keys: [ 'policyHash', 'configFingerprint', 'workspaceDir', 'index', 'registryDiagnostics', 'manifestRegistry', 'plugins', 'diagnostics', 'byPluginId', 'owners', 'metrics' ] [step4] pluginMetadataSnapshot manifestRegistry plugins count: 124

设计点 1插件系统有自己的"元数据层",插件元数据不是配置文件的一部分,而是根据配置和文件系统扫描出来的。它包含:

字段              含义 manifestRegistry   所有发现的插件清单 plugins`           与当前配置相关的插件集合 byPluginId         按 ID 索引的插件 owners             插件归属信息 metrics             扫描耗时等统计 workspaceDir       插件工作目录 policyHash           / configFingerprint 用于缓存和一致性校验

设计点 2:124 个插件在 manifestRegistry manifestRegistry.plugins: 124 表示系统识别到了 124 个插件。但这不等于全部启动——启动哪些由 startupConfig.config 和 OpenClaw 的启动策略决定。

这段输出揭示的整体设计: 1 配置是"快照驱动"的不是每次需要配置就重新读文件,而是启动时生成一个带 hash 的完整快照。后续所有内部系统都基于这个快照工作,热重载时通过 hash 检测变化。

配置分离为三层:原始文件 (raw) → 用户配置 (sourceConfig) → 运行时配置 (runtimeConfig),每一层服务于不同目的:

raw:回写保留格式:sourceConfig:用户实际配置runtimeConfig:程序运行视图

###3. 插件系统独立索引: 插件元数据(pluginMetadataSnapshot)和配置快照一起加载,但结构独立。这样:配置可以改,插件索引不需要重新扫描;插件决策和配置决策可以分开处理- 扫描结果可以被缓存(policyHash / configFingerprint)。

  1. 启动问题早发现 issues、warnings、legacyIssues 在启动第一阶段就暴露,而不是等某个子系统用到错误配置时才神秘失败---

一句话总结: OpenClaw 的配置系统不是"读一个 JSON 文件",而是构建了一个完整的配置快照:包含文件元信息、内容哈希、用户视图配置、运行时视图配置、问题清单,以及独立的插件注册表索引。这个快照是整个 Gateway 启动的"真相"。

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-12 17:54:12 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/927146.html
  2. 运行时间 : 0.253897s [ 吞吐率:3.94req/s ] 内存消耗:4,970.56kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=e5144ef5e548947ea63ced2f2d3567d6
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 4.22 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.11 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001053s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001741s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000786s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000761s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001616s ]
  6. SELECT * FROM `set` [ RunTime:0.000551s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001432s ]
  8. SELECT * FROM `article` WHERE `id` = 927146 LIMIT 1 [ RunTime:0.008222s ]
  9. UPDATE `article` SET `lasttime` = 1786528452 WHERE `id` = 927146 [ RunTime:0.013876s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000713s ]
  11. SELECT * FROM `article` WHERE `id` < 927146 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001179s ]
  12. SELECT * FROM `article` WHERE `id` > 927146 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.012759s ]
  13. SELECT * FROM `article` WHERE `id` < 927146 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.014101s ]
  14. SELECT * FROM `article` WHERE `id` < 927146 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.005976s ]
  15. SELECT * FROM `article` WHERE `id` < 927146 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002472s ]
0.257794s