mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 20:11:37 +00:00
* refactor(channels): table-drive setup credentials, config schemas, doctor detectors, status issues * refactor(channels): control-plane tables (rest) * fix(plugin-sdk): refresh surface budgets after rebase * style(plugin-sdk): format credential helpers * fix(channels): preserve generic schema refinement types * fix(channels): preserve schema input and output inference * fix(clickclack): forward credential patch fields * test(plugin-sdk): use redacted credential fixtures * fix(plugin-sdk): refresh API baseline after inference fix * fix(channels): keep multi-account envelope optional * fix(channels): preserve policy validation invariants * fix(extensions): remove stale awaits from file checks * style(qqbot): format synchronous file check * fix(config): refresh bundled channel metadata * fix(qqbot): reject unsupported pairing policy
83 lines
2.8 KiB
TypeScript
83 lines
2.8 KiB
TypeScript
/**
|
|
* @deprecated Broad public SDK barrel. Prefer focused security/SSRF/secret
|
|
* subpaths and avoid adding new imports here.
|
|
*/
|
|
|
|
import { statRegularFileSync as inspectRegularFileSync } from "../infra/fs-safe.js";
|
|
|
|
/** Return whether a path resolves to a regular file, treating filesystem errors as missing. */
|
|
export function fileExists(filePath: string): boolean {
|
|
try {
|
|
return !inspectRegularFileSync(filePath).missing;
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
export { buildUntrustedChannelMetadata } from "../security/channel-metadata.js";
|
|
export {
|
|
evaluateSupplementalContextVisibility,
|
|
filterSupplementalContextItems,
|
|
shouldIncludeSupplementalContext,
|
|
} from "../security/context-visibility.js";
|
|
export type { ContextVisibilityDecision } from "../security/context-visibility.js";
|
|
|
|
export {
|
|
expandAllowFromWithAccessGroups,
|
|
parseAccessGroupAllowFromEntry,
|
|
} from "./access-groups.js";
|
|
export { wrapExternalContent, wrapWebContent } from "../security/external-content.js";
|
|
export { compileSafeRegexDetailed } from "../security/safe-regex.js";
|
|
export type { SafeRegexRejectReason } from "../security/safe-regex.js";
|
|
export {
|
|
appendRegularFile,
|
|
FsSafeError,
|
|
openLocalFileSafely,
|
|
pathExists,
|
|
pathExistsSync,
|
|
readRegularFile,
|
|
resolveLocalPathFromRootsSync,
|
|
readRegularFileSync,
|
|
root,
|
|
statRegularFile,
|
|
statRegularFileSync,
|
|
writeExternalFileWithinRoot,
|
|
withTimeout,
|
|
} from "../infra/fs-safe.js";
|
|
|
|
export { extractErrorCode, formatErrorMessage } from "../infra/errors.js";
|
|
export { hasProxyEnvConfigured } from "../infra/net/proxy-env.js";
|
|
export { normalizeHostname } from "../infra/net/hostname.js";
|
|
export {
|
|
SsrFBlockedError,
|
|
isPrivateNetworkAllowedByPolicy,
|
|
matchesHostnameAllowlist,
|
|
resolvePinnedHostnameWithPolicy,
|
|
} from "../infra/net/ssrf.js";
|
|
export type { LookupFn, SsrFPolicy } from "../infra/net/ssrf.js";
|
|
export { isPathInside } from "../infra/path-guards.js";
|
|
export {
|
|
canonicalPathFromExistingAncestor,
|
|
findExistingAncestor,
|
|
resolveAbsolutePathForRead,
|
|
resolveAbsolutePathForWrite,
|
|
} from "../infra/fs-safe.js";
|
|
export { sanitizeUntrustedFileName } from "../infra/fs-safe-advanced.js";
|
|
export { privateFileStoreSync } from "../infra/private-file-store.js";
|
|
export { movePathWithCopyFallback, replaceFileAtomic } from "../infra/replace-file.js";
|
|
|
|
export { assertNoSymlinkParents, assertNoSymlinkParentsSync } from "../infra/fs-safe-advanced.js";
|
|
export { ensurePortAvailable } from "../infra/ports.js";
|
|
|
|
export {
|
|
resolveExistingPathsWithinRoot,
|
|
pathScope,
|
|
resolveStrictExistingPathsWithinRoot,
|
|
} from "../infra/root-paths.js";
|
|
|
|
export { resolvePreferredOpenClawTmpDir } from "../infra/tmp-openclaw-dir.js";
|
|
export { redactSensitiveText } from "../logging/redact.js";
|
|
export { safeEqualSecret } from "../security/secret-equal.js";
|
|
|
|
export { resolvePinnedMainDmOwnerFromAllowlist } from "../security/dm-policy-shared.js";
|