chore: move root tool configs

This commit is contained in:
Peter Steinberger
2026-05-03 14:42:47 +01:00
parent 349106065a
commit d0f0fe97a6
9 changed files with 11 additions and 8 deletions

171
config/knip.config.ts Normal file
View File

@@ -0,0 +1,171 @@
const BUNDLED_PLUGIN_ROOT_DIR = "extensions";
function bundledPluginFile(pluginId: string, relativePath: string, suffix = ""): string {
return `${BUNDLED_PLUGIN_ROOT_DIR}/${pluginId}/${relativePath}${suffix}`;
}
const rootEntries = [
"openclaw.mjs!",
"src/index.ts!",
"src/entry.ts!",
"src/cli/daemon-cli.ts!",
"src/infra/warning-filter.ts!",
"src/infra/command-explainer/index.ts!",
bundledPluginFile("telegram", "src/audit.ts", "!"),
bundledPluginFile("telegram", "src/token.ts", "!"),
"src/hooks/bundled/*/handler.ts!",
"src/hooks/llm-slug-generator.ts!",
"src/plugin-sdk/*.ts!",
] as const;
const bundledPluginEntries = [
"*.ts!",
"index.ts!",
"setup-entry.ts!",
"{api,contract-api,helper-api,runtime-api,light-runtime-api,update-offset-runtime-api,channel-plugin-api,provider-plugin-api,setup-api}.ts!",
"subagent-hooks-api.ts!",
"src/{api,runtime-api,light-runtime-api,update-offset-runtime-api,channel-plugin-api,provider-plugin-api,doctor-contract,setup-surface}.ts!",
"src/subagent-hooks-api.ts!",
] as const;
const bundledPluginIgnoredRuntimeDependencies = [
"@agentclientprotocol/claude-agent-acp",
"@azure/identity",
"@clawdbot/lobster",
"@discordjs/opus",
"@homebridge/ciao",
"@matrix-org/matrix-sdk-crypto-wasm",
"@mozilla/readability",
"@openai/codex",
"@pierre/theme",
"@tloncorp/tlon-skill",
"@zed-industries/codex-acp",
"jiti",
"linkedom",
"openclaw",
"pdfjs-dist",
] as const;
const rootBundledPluginRuntimeDependencies = [
"@anthropic-ai/sdk",
"@anthropic-ai/vertex-sdk",
"@aws-sdk/client-bedrock",
"@aws-sdk/client-bedrock-runtime",
"@aws-sdk/credential-provider-node",
"@aws/bedrock-token-generator",
"@google/genai",
"@grammyjs/runner",
"@grammyjs/transformer-throttler",
"@homebridge/ciao",
"@mozilla/readability",
"@slack/bolt",
"@slack/types",
"@slack/web-api",
"grammy",
"linkedom",
"minimatch",
"node-edge-tts",
"openshell",
"pdfjs-dist",
"tokenjuice",
] as const;
const config = {
ignoreFiles: [
"scripts/**",
"**/__tests__/**",
"src/test-utils/**",
"**/test-helpers/**",
"**/test-fixtures/**",
"**/test-support/**",
"**/live-*.ts",
"**/test-*.ts",
"**/vitest*.{ts,mjs}",
"**/*test-helpers.ts",
"**/*test-fixtures.ts",
"**/*test-harness.ts",
"**/*test-utils.ts",
"**/*test-support.ts",
"**/*test-shared.ts",
"**/*mocks.ts",
"**/*.e2e-mocks.ts",
"**/*.e2e-*.ts",
"**/*.fixture-test-support.ts",
"**/*.harness.ts",
"**/*.job-fixtures.ts",
"**/*.mock-harness.ts",
"**/*.menu-test-support.ts",
"**/*.suite-helpers.ts",
"**/*.test-setup.ts",
"**/job-fixtures.ts",
"**/*test-mocks.ts",
"**/*test-runtime*.ts",
"**/*.mock-setup.ts",
"**/*.cases.ts",
"**/*.e2e-harness.ts",
"**/*.fixture.ts",
"**/*.fixtures.ts",
"**/*.mocks.ts",
"**/*.mocks.shared.ts",
"**/*.route-test-support.ts",
"**/*.shared-test.ts",
"**/*.suite.ts",
"**/*.test-runtime.ts",
"**/*.testkit.ts",
"**/*.test-fixtures.ts",
"**/*.test-harness.ts",
"**/*.test-helper.ts",
"**/*.test-helpers.ts",
"**/*.test-mocks.ts",
"**/*.test-utils.ts",
"src/gateway/live-image-probe.ts",
"src/secrets/credential-matrix.ts",
"src/agents/claude-cli-runner.ts",
"src/agents/pi-auth-json.ts",
"src/agents/tool-policy.conformance.ts",
"src/auto-reply/reply/audio-tags.ts",
"src/gateway/live-tool-probe-utils.ts",
"src/gateway/server.auth.shared.ts",
"src/shared/text/assistant-visible-text.ts",
bundledPluginFile("telegram", "src/bot/reply-threading.ts"),
bundledPluginFile("telegram", "src/draft-chunking.ts"),
bundledPluginFile("msteams", "src/conversation-store-memory.ts"),
bundledPluginFile("msteams", "src/polls-store-memory.ts"),
bundledPluginFile("voice-call", "src/providers/index.ts"),
],
workspaces: {
".": {
entry: rootEntries,
ignoreDependencies: [
"@openclaw/*",
"playwright-core",
"sqlite-vec",
"tree-sitter-bash",
...rootBundledPluginRuntimeDependencies,
],
project: [
"src/**/*.ts!",
"scripts/**/*.{js,mjs,cjs,ts,mts,cts}!",
"*.config.{js,mjs,cjs,ts,mts,cts}!",
"*.mjs!",
],
},
ui: {
entry: ["index.html!", "src/main.ts!", "vite.config.ts!", "vitest*.ts!"],
project: ["src/**/*.{ts,tsx}!"],
},
"packages/*": {
entry: ["index.js!", "scripts/postinstall.js!"],
project: ["index.js!", "scripts/**/*.js!"],
},
[`${BUNDLED_PLUGIN_ROOT_DIR}/*`]: {
// Bundled plugins often load their public surface via string specifiers in
// `index.ts` contracts, so Knip needs these convention-based entry files.
entry: bundledPluginEntries,
project: ["index.ts!", "src/**/*.ts!"],
ignoreDependencies: bundledPluginIgnoredRuntimeDependencies,
},
},
} as const;
export default config;

View File

@@ -0,0 +1,60 @@
{
"globs": ["docs/**/*.md", "docs/**/*.mdx", "README.md"],
"ignores": ["docs/zh-CN/**", "docs/.i18n/**", "docs/reference/templates/**", "**/.local/**"],
"config": {
"default": true,
"MD013": false,
"MD025": false,
"MD029": false,
"MD033": {
"allowed_elements": [
"Note",
"Info",
"Tip",
"Warning",
"Card",
"CardGroup",
"Columns",
"Steps",
"Step",
"Tabs",
"Tab",
"Accordion",
"AccordionGroup",
"CodeGroup",
"Frame",
"Callout",
"ParamField",
"ResponseField",
"RequestExample",
"ResponseExample",
"img",
"a",
"br",
"table",
"tr",
"td",
"details",
"summary",
"p",
"div",
"strong",
"span",
"iframe",
"h2",
"h3",
"picture",
"source",
"Tooltip",
"Check",
],
},
"MD036": false,
"MD040": false,
"MD041": false,
"MD046": false,
},
}

25
config/shellcheckrc Normal file
View File

@@ -0,0 +1,25 @@
# ShellCheck configuration
# https://www.shellcheck.net/wiki/
# Disable common false positives and style suggestions
# SC2034: Variable appears unused (often exported or used indirectly)
disable=SC2034
# SC2155: Declare and assign separately (common idiom, rarely causes issues)
disable=SC2155
# SC2295: Expansions inside ${..} need quoting (info-level, rarely causes issues)
disable=SC2295
# SC1012: \r is literal (tr -d '\r' works as intended on most systems)
disable=SC1012
# SC2026: Word outside quotes (info-level, often intentional)
disable=SC2026
# SC2016: Expressions don't expand in single quotes (often intentional in sed/awk)
disable=SC2016
# SC2129: Consider using { cmd1; cmd2; } >> file (style preference)
disable=SC2129