mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-16 20:40:45 +00:00
* refactor: remove channel shim directories, point all imports to extensions
Delete the 6 backward-compat shim directories (src/telegram, src/discord,
src/slack, src/signal, src/imessage, src/web) that were re-exporting from
extensions. Update all 112+ source files to import directly from
extensions/{channel}/src/ instead of through the shims.
Also:
- Move src/channels/telegram/ (allow-from, api) to extensions/telegram/src/
- Fix outbound adapters to use resolveOutboundSendDep (fixes 5 pre-existing TS errors)
- Update cross-extension imports (src/web/media.js → extensions/whatsapp/src/media.js)
- Update vitest, tsdown, knip, labeler, and script configs for new paths
- Update guard test allowlists for extension paths
After this, src/ has zero channel-specific implementation code — only the
generic plugin framework remains.
* fix: update raw-fetch guard allowlist line numbers after shim removal
* refactor: document direct extension channel imports
* test: mock transcript module in delivery helpers
106 lines
3.0 KiB
TypeScript
106 lines
3.0 KiB
TypeScript
const rootEntries = [
|
|
"openclaw.mjs!",
|
|
"src/index.ts!",
|
|
"src/entry.ts!",
|
|
"src/cli/daemon-cli.ts!",
|
|
"src/extensionAPI.ts!",
|
|
"src/infra/warning-filter.ts!",
|
|
"src/channels/plugins/agent-tools/whatsapp-login.ts!",
|
|
"src/channels/plugins/actions/discord.ts!",
|
|
"src/channels/plugins/actions/signal.ts!",
|
|
"src/channels/plugins/actions/telegram.ts!",
|
|
"extensions/telegram/src/audit.ts!",
|
|
"extensions/telegram/src/token.ts!",
|
|
"src/line/accounts.ts!",
|
|
"src/line/send.ts!",
|
|
"src/line/template-messages.ts!",
|
|
"src/hooks/bundled/*/handler.ts!",
|
|
"src/hooks/llm-slug-generator.ts!",
|
|
"src/plugin-sdk/*.ts!",
|
|
] as const;
|
|
|
|
const config = {
|
|
ignoreFiles: [
|
|
"scripts/**",
|
|
"**/__tests__/**",
|
|
"src/test-utils/**",
|
|
"**/test-helpers/**",
|
|
"**/test-fixtures/**",
|
|
"**/live-*.ts",
|
|
"**/test-*.ts",
|
|
"**/*test-helpers.ts",
|
|
"**/*test-fixtures.ts",
|
|
"**/*test-harness.ts",
|
|
"**/*test-utils.ts",
|
|
"**/*mocks.ts",
|
|
"**/*.e2e-mocks.ts",
|
|
"**/*.e2e-*.ts",
|
|
"**/*.harness.ts",
|
|
"**/*.job-fixtures.ts",
|
|
"**/*.mock-harness.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",
|
|
"**/*.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",
|
|
"extensions/telegram/src/bot/reply-threading.ts",
|
|
"extensions/telegram/src/draft-chunking.ts",
|
|
"extensions/msteams/src/conversation-store-memory.ts",
|
|
"extensions/msteams/src/polls-store-memory.ts",
|
|
"extensions/voice-call/src/providers/index.ts",
|
|
"extensions/voice-call/src/providers/tts-openai.ts",
|
|
],
|
|
workspaces: {
|
|
".": {
|
|
entry: rootEntries,
|
|
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!"],
|
|
},
|
|
"extensions/*": {
|
|
entry: ["index.ts!"],
|
|
project: ["index.ts!", "src/**/*.ts!"],
|
|
ignoreDependencies: ["openclaw"],
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export default config;
|