qwen-code/packages/cli/tsconfig.json
易良 56db17bd4c
refactor(cli): enforce utils leaf-layer dependency direction (#9146) (#9737)
* refactor(cli): enforce utils leaf-layer dependency direction (#9146)

Move domain-coupled modules out of packages/cli/src/utils into the
directories that own them: config/ (dialogScopeUtils, settingsUtils),
i18n/ (languageUtils), ui/ (handleAutoUpdate, standalone-update,
systemInfo, systemInfoFields, update-relaunch, commands, doctorChecks),
nonInteractive/ (nonInteractiveHelpers, chat-recording-failure,
tool-result-boundary-diagnostics, permission-suggestions), serve/
(sandbox), services/housekeeping/ (scheduler, non-interactive-scheduler),
and commands/review/ (findings).

Extract the generic normalizePartList helper into
utils/normalize-part-list.ts so utils consumers keep importing downward,
and move the MergeStrategy enum into utils/deepMerge.ts (its owner).

Add an eslint architecture rule (no-utils-upward-import) that forbids
value imports from utils/ back up into a domain directory. Type-only
imports stay exempt: they are erased at compile time and cannot create a
runtime cycle (Settings in modelConfigUtils, CommandContext in
sessionPaths).

No behavior change: typecheck, build, and the affected unit tests pass.

* fix: use Qwen Team 2026 license header on new files (#9146)

* chore: refresh stale utils/ path references after leaf-layer move (#9146)

* docs: reconcile no-utils-upward-import header with the allowed type-only set (#9146)

* fix(cli): allowlist sandbox process.env accesses after leaf-layer move (#9146)

* chore(ci): re-record qwen-autofix.yml size baseline after #9677 (#9146)

#9677 recorded qwen-autofix.yml at 392111 bytes while the file it
committed was already 397656, so every PR that merged main after it
tripped the growth ratchet. Re-record the actual size; the file itself
is unchanged by this PR.

* fix(review): drop the stale utils/findings.ts digest root after the leaf-layer move (#9146)

The #9146 move returned findings.ts to commands/review/, but the digest
root lists merged from main still pinned it under utils/, where the file
no longer exists — the absent root darkened every review's staleness
check and failed review-source-digest.test.ts. Drop the stale file-shaped
root from both digest copies and their pins; the commands/review/
directory root covers the validator at its new home, and the two utils
helpers keep their file-shaped roots.

* fix(review): colocate seatbelt profiles with the sandbox module (#9146)

* fix(review): exempt inline type-only specifiers from the utils upward-import rule (#9146)

* fix(review): report upward inline type-specifier imports under verbatimModuleSyntax (#9146)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(review): pin mixed-specifier and zero-specifier upward imports in the utils rule (#9146)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(review): anchor the nested-checkout utils rule fixture on the last marker (#9146)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(review): pin that the utils/findings.ts digest root stays removed (#9146)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(review): reword stale-bundle SCOPE header to the post-move helper shape (#9146)

* test(review): drop the pre-move utils/findings.ts from the skill-parity fixture (#9146)

* test(serve): derive the seatbelt colocation tripwire from BUILTIN_SEATBELT_PROFILES (#9146)

* fix(architecture): fail closed on computed dynamic imports in the utils leaf rule (#9146)

* fix(cli): point settings.test.ts at the post-move settingsUtils path (#9146)

main updated settings.test.ts after this branch moved settingsUtils.ts
from utils/ into config/, and the merge kept main's old import
specifier, which vite fails to resolve. Repoint it at ./settingsUtils.js;
every other consumer already uses the new path.

* fix(cli): close utils boundary review gaps

* test(cli): cover utils boundary allow paths

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-23 14:41:49 +00:00

129 lines
4.9 KiB
JSON

{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"jsx": "react-jsx",
"baseUrl": ".",
"lib": ["DOM", "DOM.Iterable", "ES2023"],
"types": ["node", "vitest/globals"],
"paths": {
"@qwen-code/qwen-code-core": ["../core/src/index.ts"],
"@qwen-code/qwen-code-core/subSessionConstants": [
"../core/src/tools/sub-session-constants.ts"
],
"@qwen-code/qwen-code-core/transcriptRecords": [
"../core/src/utils/transcript-records.ts"
],
"@qwen-code/qwen-code-core/*": ["../core/src/*"],
"@qwen-code/acp-bridge": ["../acp-bridge/src/index.ts"],
"@qwen-code/acp-bridge/transcriptReplay": [
"../acp-bridge/src/transcript-replay.ts"
],
"@qwen-code/acp-bridge/daemonMemoryBudget": [
"../acp-bridge/src/daemon-memory-budget.ts"
],
"@qwen-code/acp-bridge/*": ["../acp-bridge/src/*"],
"@qwen-code/audio-capture": ["../audio-capture/src/index.ts"],
"@qwen-code/audio-capture/*": ["../audio-capture/src/*"],
"@qwen-code/sdk": ["../sdk-typescript/src/index.ts"],
"@qwen-code/sdk/daemon/ui/transcript": [
"../sdk-typescript/src/daemon/ui/transcript.ts"
],
"@qwen-code/sdk/daemon/types": ["../sdk-typescript/src/daemon/types.ts"],
"@qwen-code/sdk/*": ["../sdk-typescript/src/*"]
}
},
"include": [
"index.ts",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.json",
"./package.json",
"../core/src/utils/toml-to-markdown-converter.test.ts",
"../core/src/utils/toml-to-markdown-converter.ts"
],
"exclude": [
"node_modules",
"dist",
// TODO(5691): Fix type errors and remove excludes.
"src/commands/mcp.test.ts",
"src/commands/mcp/add.test.ts",
"src/commands/mcp/list.test.ts",
"src/commands/mcp/remove.test.ts",
"src/commands/mcp/reconnect.test.ts",
"src/config/config.integration.test.ts",
"src/config/config.test.ts",
"src/config/extension.test.ts",
"src/config/settings.test.ts",
"src/nonInteractiveCli.test.ts",
"src/services/FileCommandLoader.test.ts",
"src/services/prompt-processors/argumentProcessor.test.ts",
"src/serve/auth.test.ts",
"src/serve/server.test.ts",
"src/utils/cleanup.test.ts",
"src/ui/handleAutoUpdate.test.ts",
"src/utils/startupWarnings.test.ts",
"src/ui/App.test.tsx",
"src/ui/commands/aboutCommand.test.ts",
"src/ui/commands/authCommand.test.ts",
"src/ui/commands/bugCommand.test.ts",
"src/ui/commands/clearCommand.test.ts",
"src/ui/commands/compressCommand.test.ts",
"src/ui/commands/copyCommand.test.ts",
"src/ui/commands/docsCommand.test.ts",
"src/ui/commands/editorCommand.test.ts",
"src/ui/commands/extensionsCommand.test.ts",
"src/ui/commands/helpCommand.test.ts",
"src/ui/commands/restoreCommand.test.ts",
"src/ui/commands/settingsCommand.test.ts",
"src/ui/commands/themeCommand.test.ts",
"src/ui/commands/chatCommand.test.ts",
"src/ui/commands/directoryCommand.test.tsx",
"src/ui/commands/ideCommand.test.ts",
"src/ui/commands/initCommand.test.ts",
"src/ui/commands/quitCommand.test.ts",
"src/ui/commands/mcpCommand.test.ts",
"src/ui/commands/memoryCommand.test.ts",
"src/ui/commands/statsCommand.test.ts",
"src/ui/commands/terminalSetupCommand.test.ts",
"src/ui/commands/toolsCommand.test.ts",
"src/ui/components/ContextSummaryDisplay.test.tsx",
"src/ui/components/Footer.test.tsx",
"src/ui/components/InputPrompt.test.tsx",
"src/ui/components/ModelStatsDisplay.test.tsx",
"src/ui/components/SessionSummaryDisplay.test.tsx",
"src/ui/components/shared/text-buffer.test.ts",
"src/ui/components/shared/vim-buffer-actions.test.ts",
"src/ui/components/StatsDisplay.test.tsx",
"src/ui/components/ToolStatsDisplay.test.tsx",
"src/ui/components/WarningMessage.test.tsx",
"src/ui/contexts/SessionContext.test.tsx",
"src/ui/hooks/slashCommandProcessor.test.ts",
"src/ui/hooks/useAtCompletion.test.ts",
"src/ui/hooks/useConsoleMessages.test.ts",
"src/ui/hooks/useCommandCompletion.test.ts",
"src/ui/hooks/useFocus.test.ts",
"src/ui/hooks/useFolderTrust.test.ts",
"src/ui/hooks/useGeminiStream.test.tsx",
"src/ui/hooks/useKeypress.test.ts",
"src/ui/hooks/usePhraseCycler.test.ts",
"src/ui/utils/computeStats.test.ts",
"src/ui/themes/theme.test.ts",
"src/validateNonInterActiveAuth.test.ts",
"src/services/prompt-processors/shellProcessor.test.ts",
"src/commands/extensions/examples/**"
],
"references": [
{ "path": "../core" },
{ "path": "../acp-bridge" },
{ "path": "../audio-capture" },
{ "path": "../sdk-typescript/tsconfig.reference.json" },
{ "path": "../channels/base" },
{ "path": "../channels/telegram" },
{ "path": "../channels/weixin" },
{ "path": "../channels/dingtalk" },
{ "path": "../channels/wecom" },
{ "path": "../channels/feishu" },
{ "path": "../channels/gitlab" }
]
}