fix(plugin-sdk): stabilize surface report after builds · openclaw/openclaw@86fea26
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -203,9 +203,25 @@ function hasDeprecatedTag(symbol) {
|
203 | 203 | return symbol.getJsDocTags().some((tag) => tag.name === "deprecated"); |
204 | 204 | } |
205 | 205 | |
| 206 | +const generatedLlmCoreValidatorExports = new Set(["validateToolArguments", "validateToolCall"]); |
| 207 | + |
| 208 | +function isGeneratedLlmCoreValidatorDeclaration(exportName, declaration) { |
| 209 | +if (!generatedLlmCoreValidatorExports.has(exportName)) { |
| 210 | +return false; |
| 211 | +} |
| 212 | +const relative = path.relative(repoRoot, declaration.getSourceFile().fileName); |
| 213 | +const relativePath = relative.split(path.sep).join(path.posix.sep); |
| 214 | +// Build artifacts can make agent-core's package-name validator reexports look |
| 215 | +// newly callable. Keep this source report independent of generated dist state. |
| 216 | +return relativePath.includes("llm-core/dist/validation.d."); |
| 217 | +} |
| 218 | + |
206 | 219 | function isCallableExport(checker, symbol, sourceFile) { |
207 | 220 | const target = unwrapAlias(checker, symbol); |
208 | 221 | const declaration = target.valueDeclaration ?? target.declarations?.[0] ?? sourceFile; |
| 222 | +if (isGeneratedLlmCoreValidatorDeclaration(symbol.getName(), declaration)) { |
| 223 | +return false; |
| 224 | +} |
209 | 225 | const type = checker.getTypeOfSymbolAtLocation(target, declaration); |
210 | 226 | return checker.getSignaturesOfType(type, ts.SignatureKind.Call).length > 0; |
211 | 227 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。