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

推荐订阅源

Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
GbyAI
GbyAI
博客园 - 司徒正美
美团技术团队
Vercel News
Vercel News
IT之家
IT之家
U
Unit 42
Y
Y Combinator Blog
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
V
Visual Studio Blog
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MyScale Blog
MyScale Blog
博客园 - 叶小钗
A
About on SuperTechFans
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed

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 runner shared helpers · openclaw/openc...
steipete · 2026-06-04 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,6 @@

1+

/**

2+

* Manages reusable Claude CLI stdio sessions for CLI-backed agent turns.

3+

*/

14

import crypto from "node:crypto";

25

import type { ReplyBackendHandle } from "../../auto-reply/reply/reply-run-registry.js";

36

import type { CliBackendConfig } from "../../config/types.js";

@@ -32,12 +35,6 @@ import { FailoverError, resolveFailoverStatus } from "../failover-error.js";

3235

import { cliBackendLog, formatCliBackendOutputDigest } from "./log.js";

3336

import type { PreparedCliRunContext } from "./types.js";

3437
35-

/**

36-

* Live Claude CLI stdio session manager.

37-

*

38-

* This keeps a bounded pool of long-lived Claude CLI processes and routes individual turns through

39-

* stream-json stdin/stdout while preserving exec permission state and diagnostic tool events.

40-

*/

4138

type ProcessSupervisor = ReturnType<

4239

typeof import("../../process/supervisor/index.js").getProcessSupervisor

4340

>;

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,6 @@

1+

/**

2+

* Materializes selected OpenClaw skills as a temporary Claude CLI plugin.

3+

*/

14

import { accessSync } from "node:fs";

25

import fs from "node:fs/promises";

36

import path from "node:path";

@@ -6,9 +9,6 @@ import { resolvePreferredOpenClawTmpDir } from "../../infra/tmp-openclaw-dir.js"

69

import type { SkillSnapshot } from "../../skills/types.js";

710

import { cliBackendLog } from "./log.js";

811
9-

/**

10-

* Materializes selected OpenClaw skills as a temporary Claude CLI plugin.

11-

*/

1212

const CLAUDE_CLI_BACKEND_ID = "claude-cli";

1313

const OPENCLAW_CLAUDE_PLUGIN_NAME = "openclaw-skills";

1414
Original file line numberDiff line numberDiff line change

@@ -1,9 +1,14 @@

1+

/**

2+

* Shared logging helpers for CLI backend diagnostics.

3+

*/

14

import crypto from "node:crypto";

25

import { createSubsystemLogger } from "../../logging/subsystem.js";

36
4-

// Shared logging helpers for CLI backend diagnostics.

7+

/** Subsystem logger for CLI backend execution diagnostics. */

58

export const cliBackendLog = createSubsystemLogger("agent/cli-backend");

9+

/** Env var that enables CLI backend output logging. */

610

export const CLI_BACKEND_LOG_OUTPUT_ENV = "OPENCLAW_CLI_BACKEND_LOG_OUTPUT";

11+

/** Legacy env var accepted for Claude CLI output logging. */

712

export const LEGACY_CLAUDE_CLI_LOG_OUTPUT_ENV = "OPENCLAW_CLAUDE_CLI_LOG_OUTPUT";

813
914

/** Return a compact byte/hash summary for CLI backend output. */

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,6 @@

1+

/**

2+

* Shared types for preparing and executing CLI-backed agent runs.

3+

*/

14

import type { SourceReplyDeliveryMode } from "../../auto-reply/get-reply-options.types.js";

25

import type { ReplyOperation } from "../../auto-reply/reply/reply-run-registry.js";

36

import type { ThinkLevel } from "../../auto-reply/thinking.js";

@@ -26,6 +29,7 @@ import type {

2629

} from "../embedded-agent-runner/run/params.js";

2730

import type { SilentReplyPromptMode } from "../system-prompt.types.js";

2831
32+

/** Input contract for one CLI-backed agent run. */

2933

export type RunCliAgentParams = {

3034

sessionId: string;

3135

sessionKey?: string;

@@ -112,6 +116,7 @@ export type RunCliAgentParams = {

112116

cleanupBundleMcpOnRunEnd?: boolean;

113117

};

114118
119+

/** Backend config after MCP, skill, env, and cleanup preparation. */

115120

export type CliPreparedBackend = {

116121

backend: CliBackendConfig;

117122

cleanup?: () => Promise<void>;

@@ -120,6 +125,7 @@ export type CliPreparedBackend = {

120125

env?: Record<string, string>;

121126

};

122127
128+

/** Reusable CLI session id and the reason it was rejected, when any. */

123129

export type CliReusableSession = {

124130

sessionId?: string;

125131

invalidatedReason?:

@@ -132,6 +138,7 @@ export type CliReusableSession = {

132138

| "orphaned-tool-use";

133139

};

134140
141+

/** Fully prepared execution context consumed by the CLI runner executor. */

135142

export type PreparedCliRunContext = {

136143

params: RunCliAgentParams;

137144

effectiveAuthProfileId?: string;