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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
爱范儿
爱范儿
量子位
Martin Fowler
Martin Fowler
V
V2EX
博客园 - 三生石上(FineUI控件)
I
InfoQ
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
Engineering at Meta
Engineering at Meta

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
refactor: share live transport QA CLI helpers · openclaw/...
vincentkoc · 2026-05-29 · via Recent Commits to openclaw:main

@@ -1,147 +1,27 @@

1-

import type { Command } from "commander";

2-

import { collectString } from "../../cli-options.js";

1+

import {

2+

createLiveTransportQaCliRegistration as createSharedLiveTransportQaCliRegistration,

3+

type LiveTransportQaCliRegistrationOptions,

4+

} from "openclaw/plugin-sdk/qa-runtime";

35

import { DEFAULT_QA_LIVE_PROVIDER_MODE, formatQaProviderModeHelp } from "../../providers/index.js";

4-

import type { QaProviderModeInput } from "../../run-config.js";

566-

export type LiveTransportQaCommandOptions = {

7-

repoRoot?: string;

8-

outputDir?: string;

9-

providerMode?: QaProviderModeInput;

10-

primaryModel?: string;

11-

alternateModel?: string;

12-

fastMode?: boolean;

13-

allowFailures?: boolean;

14-

scenarioIds?: string[];

15-

listScenarios?: boolean;

16-

sutAccountId?: string;

17-

credentialSource?: string;

18-

credentialRole?: string;

19-

};

20-21-

type LiveTransportQaCommanderOptions = {

22-

repoRoot?: string;

23-

outputDir?: string;

24-

providerMode?: QaProviderModeInput;

25-

model?: string;

26-

altModel?: string;

27-

scenario?: string[];

28-

listScenarios?: boolean;

29-

fast?: boolean;

30-

allowFailures?: boolean;

31-

sutAccount?: string;

32-

credentialSource?: string;

33-

credentialRole?: string;

34-

};

35-36-

export type LiveTransportQaCliRegistration = {

37-

commandName: string;

38-

register(qa: Command): void;

39-

};

40-41-

type LiveTransportQaCredentialCliOptions = {

42-

sourceDescription?: string;

43-

roleDescription?: string;

44-

};

45-46-

export function createLazyCliRuntimeLoader<T>(load: () => Promise<T>) {

47-

let promise: Promise<T> | null = null;

48-

return async () => {

49-

promise ??= load();

50-

return await promise;

51-

};

52-

}

53-54-

function mapLiveTransportQaCommanderOptions(

55-

opts: LiveTransportQaCommanderOptions,

56-

): LiveTransportQaCommandOptions {

57-

return {

58-

repoRoot: opts.repoRoot,

59-

outputDir: opts.outputDir,

60-

providerMode: opts.providerMode,

61-

primaryModel: opts.model,

62-

alternateModel: opts.altModel,

63-

fastMode: opts.fast,

64-

allowFailures: opts.allowFailures,

65-

scenarioIds: opts.scenario,

66-

listScenarios: opts.listScenarios,

67-

sutAccountId: opts.sutAccount,

68-

credentialSource: opts.credentialSource,

69-

credentialRole: opts.credentialRole,

70-

};

71-

}

72-73-

function registerLiveTransportQaCli(params: {

74-

qa: Command;

75-

commandName: string;

76-

credentialOptions?: LiveTransportQaCredentialCliOptions;

77-

description: string;

78-

listScenariosHelp?: string;

79-

outputDirHelp: string;

80-

scenarioHelp: string;

81-

sutAccountHelp: string;

82-

run: (opts: LiveTransportQaCommandOptions) => Promise<void>;

83-

}) {

84-

const command = params.qa

85-

.command(params.commandName)

86-

.description(params.description)

87-

.option("--repo-root <path>", "Repository root to target when running from a neutral cwd")

88-

.option("--output-dir <path>", params.outputDirHelp)

89-

.option("--provider-mode <mode>", formatQaProviderModeHelp(), DEFAULT_QA_LIVE_PROVIDER_MODE)

90-

.option("--model <ref>", "Primary provider/model ref")

91-

.option("--alt-model <ref>", "Alternate provider/model ref")

92-

.option("--scenario <id>", params.scenarioHelp, collectString, [])

93-

.option("--fast", "Enable provider fast mode where supported", false)

94-

.option(

95-

"--allow-failures",

96-

"Write artifacts without setting a failing exit code when scenarios fail",

97-

false,

98-

)

99-

.option("--sut-account <id>", params.sutAccountHelp, "sut");

100-101-

if (params.listScenariosHelp) {

102-

command.option("--list-scenarios", params.listScenariosHelp, false);

103-

}

104-105-

if (params.credentialOptions) {

106-

command.option(

107-

"--credential-source <source>",

108-

params.credentialOptions.sourceDescription ??

109-

"Credential source for live lanes: env or convex (default: env)",

110-

);

111-

if (params.credentialOptions.roleDescription) {

112-

command.option("--credential-role <role>", params.credentialOptions.roleDescription);

113-

}

114-

}

115-116-

command.action(async (opts: LiveTransportQaCommanderOptions) => {

117-

await params.run(mapLiveTransportQaCommanderOptions(opts));

7+

export {

8+

createLazyCliRuntimeLoader,

9+

type LiveTransportQaCliRegistration,

10+

type LiveTransportQaCommandOptions,

11+

} from "openclaw/plugin-sdk/qa-runtime";

12+13+

type QaLabLiveTransportQaCliRegistrationOptions = Omit<

14+

LiveTransportQaCliRegistrationOptions,

15+

"allowFailuresHelp" | "defaultProviderMode" | "providerModeHelp"

16+

>;

17+18+

export function createLiveTransportQaCliRegistration(

19+

params: QaLabLiveTransportQaCliRegistrationOptions,

20+

) {

21+

return createSharedLiveTransportQaCliRegistration({

22+

...params,

23+

allowFailuresHelp: "Write artifacts without setting a failing exit code when scenarios fail",

24+

defaultProviderMode: DEFAULT_QA_LIVE_PROVIDER_MODE,

25+

providerModeHelp: formatQaProviderModeHelp(),

11826

});

11927

}

120-121-

export function createLiveTransportQaCliRegistration(params: {

122-

commandName: string;

123-

credentialOptions?: LiveTransportQaCredentialCliOptions;

124-

description: string;

125-

listScenariosHelp?: string;

126-

outputDirHelp: string;

127-

scenarioHelp: string;

128-

sutAccountHelp: string;

129-

run: (opts: LiveTransportQaCommandOptions) => Promise<void>;

130-

}): LiveTransportQaCliRegistration {

131-

return {

132-

commandName: params.commandName,

133-

register(qa: Command) {

134-

registerLiveTransportQaCli({

135-

qa,

136-

commandName: params.commandName,

137-

credentialOptions: params.credentialOptions,

138-

description: params.description,

139-

listScenariosHelp: params.listScenariosHelp,

140-

outputDirHelp: params.outputDirHelp,

141-

scenarioHelp: params.scenarioHelp,

142-

sutAccountHelp: params.sutAccountHelp,

143-

run: params.run,

144-

});

145-

},

146-

};

147-

}