* refactor(core): make utils/ a leaf layer
Eliminate every runtime (value) upward import from
packages/core/src/utils production modules so utils/ can become a leaf
layer with no runtime dependency on the rest of core.
Two mechanisms, no behavior change:
- Relocate domain-coupled modules out of utils/ into their owning
module (agents, config, core, memory, services, tools), and move
generic constants/types that live elsewhere into utils/. All
`git mv` moves keep history; every import that pointed at a moved
file is rewritten.
- Extract the remaining value imports as small leaf modules inside
utils/ (AuthType, isTool, ToolErrorType, DEFAULT_QWEN_MODEL) and
re-export them from their original owners so cross-package consumers
are unaffected. doesToolInvocationMatch moves into shell-utils, its
only production consumer.
Only type-only imports now cross the utils/ boundary. The two deferred
inversions in debugLogger (Storage, getTraceContext) are stateful and
left for a follow-up.
* chore(core): enforce utils/ leaf layer with lint rule
Add architecture/no-core-utils-upward-import, which flags runtime
(value) imports that leave packages/core/src/utils. Type-only imports,
sibling utils imports, and external package specifiers stay allowed;
the two deferred debugLogger inversions (config/storage,
telemetry/trace-context) are carried on an explicit allowlist.
Enable the rule as an error on core sources and cover it with
Linter-based tests.
* fix(core): restore iconv-lite tree-shaking for sync-file-encoding
The utils leaf-layer refactor moved sync-file-encoding from utils/ to services/, but the esbuild tree-shake plugin still matched the old ./utils/ specifier, so its sideEffects:false marker no longer applied and the ACP startup closure regained a static iconv-lite import. Point the onResolve filter at the new ./services/ path.
* fix(ci): catch stale integration imports earlier
* fix(core): close utils boundary review gaps
* fix(core): close self-reference boundary gaps
* ci: re-trigger after self-hosted runner checkout EACCES