qwen-code/packages/core/src
qqqys 7189a68334
fix(serve): isolate managed memory by selected workspace (#8056)
* fix(serve): isolate managed memory by workspace

* feat(serve): add memory project scope option

* test(serve): fix clean build type assertion

* test(serve): cover untrusted workspace memory tasks

* test(memory): cover remaining workspace paths

* test(serve): cover unavailable memory lanes

* test(memory): isolate default scope

* fix(serve): address review feedback on workspace memory isolation (#8056)

- Create secondary ACP mounts on demand for dynamically-registered
  workspaces so the qualified memory routes work beyond boot-time
  runtimes (rename getWorkspaceRememberLane → ensureWorkspaceRememberLane)
- Remove the symlink-alias machinery from getAutoMemoryRoot: it had no
  producer, relaxed a documented invariant, and could throw on the
  per-turn hot path; workspace mode now uses the same plain path.join
  as git-root mode
- Move memoryProjectScope validation into the pre-listen block
- Use the shared sendWorkspaceRuntimeUnavailable helper in server.ts
- Revert an unrelated test mock change; fix misleading 'compatibility
  fallback' wording in ServeOptions
- Add workspace_qualified_memory capability tag, docs for the new flag
  and env var

* docs(serve): add workspace_qualified_memory to conditional features table (#8056)

* fix(serve): address follow-up review feedback on workspace memory isolation (#8056)

* fix(serve): address follow-up review feedback on workspace memory isolation (#8056)

Extract MEMORY_PROJECT_SCOPES const and MemoryProjectScope type in core
so yargs choices, ServeOptions, ServeArgs, and the runQwenServe guard
share one source of truth (reduces drift risk from five to three edit
points; the fast-path guard keeps inline comparisons because an import
boundary test forbids core imports on the lightweight startup path).

Document memory-project-scope caveats in the user-facing docs: daemon
vs standalone CLI split-brain, sanitizeCwd punctuation collisions, and
flag vs env normalization differences. Add the per-lane MAX_PENDING
resource note to the developer configuration reference.

* fix(cli): add missing sessionRuntimeBaseDir to late-add workspace test (#8056)

* test(serve): cover untrusted forget/dream and no-lane memory poll (#8056)

* fix(core): extract MEMORY_PROJECT_SCOPES into zero-import leaf module (#8056)

Importing the constant as a value from the core barrel turned it into a
real static edge that pulled the entire 5.6 MB barrel into the serve
pre-listen bundle closure, breaking the fast-path gate.

Move MEMORY_PROJECT_SCOPES and MemoryProjectScope into a new
memory/scopes.ts with no imports of its own, re-export from paths.ts so
the barrel surface is unchanged, add a ./memoryScopes subpath export,
and switch run-qwen-serve.ts to the narrow import.

Also derive the unknown-scope guard in resolveWorkspaceProjectScope()
from the constant instead of hardcoding 'git-root'.

* test(cli): pin non-allocating contract in workspace memory poll test (#8056)

---------

Co-authored-by: qwen-code-dev-bot <269191875+qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Qwen Autofix <qwen-autofix@users.noreply.github.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-07-31 15:06:38 +00:00
..
__mocks__/fs pre-release commit 2025-07-22 23:26:01 +08:00
agents fix(core): prevent subagents from asking users (#8219) 2026-07-31 12:39:04 +00:00
config feat(core): add a host tool invocation guard (#8032) 2026-07-31 13:46:29 +00:00
confirmation-bus perf(startup): lazy-load Google GenAI SDK on first use (#7512) 2026-07-23 02:07:39 +00:00
core feat(core): add GenAI time-to-first-chunk tracing (#8150) 2026-07-31 13:46:46 +00:00
extension fix(serve): Prevent repeated workspace skill rescans (#8080) 2026-07-30 12:52:37 +00:00
followup feat(core): add a host tool invocation guard (#8032) 2026-07-31 13:46:29 +00:00
goals feat(hooks): add security.allowPrivateNetworkHooks to bypass SSRF range checks for trusted scopes (#7968) 2026-07-29 13:04:45 +00:00
hooks feat(hooks): add SessionDelete event (#8059) 2026-07-31 13:05:44 +00:00
ide perf(startup): Load undici lazily behind package-local dynamic imports (#7455) 2026-07-22 00:25:52 +00:00
lsp Feat: LSP Server support hot reload (#5953) 2026-07-05 13:50:00 +00:00
mcp fix(mcp): harden OAuth callback handling (#7510) 2026-07-25 03:56:27 +00:00
memory fix(serve): isolate managed memory by selected workspace (#8056) 2026-07-31 15:06:38 +00:00
mocks chore(usage telemetry): Freshen up Clearcut logging (#6013) 2025-08-12 18:31:59 +00:00
models feat(anthropic): support extended 1h cache_control TTL (#8048) 2026-07-31 08:33:42 +00:00
output chore(core): drop tool token usage tracking (#3727) 2026-04-30 15:35:01 +08:00
permissions fix(core): treat a bare & as a command boundary in splitCompoundCommand (#7864) 2026-07-31 13:17:24 +00:00
prompts test: add tests for confirmation-bus, prompt-registry, and cli/core modules (#2272) 2026-04-09 13:54:59 +08:00
providers feat(core): add configurable image generation models (#7607) 2026-07-24 09:03:18 +00:00
qwen feat(core): emit OAuth login URL as a single OSC 8 hyperlink (#7255) 2026-07-24 01:13:47 +00:00
resources feat(mcp): support MCP resources and reliably surface prompts (#5544) 2026-06-21 19:04:52 +08:00
services fix(test): isolate the worktree symlink test's temporary sibling directory (#8228) 2026-07-31 12:33:45 +00:00
skills feat(review): statement-level mutation probes in test-efficacy (#8020) 2026-07-30 13:06:35 +00:00
subagents fix(core): prevent subagents from asking users (#8219) 2026-07-31 12:39:04 +00:00
telemetry feat(core): add GenAI time-to-first-chunk tracing (#8150) 2026-07-31 13:46:46 +00:00
test-utils chore: fix typos in code comments and a Java SDK example (#7059) 2026-07-17 16:21:47 +00:00
tools fix(core): prevent subagents from asking users (#8219) 2026-07-31 12:39:04 +00:00
utils fix(cli): pick the memory unit from the rounded figure, not the raw bytes (#7871) 2026-07-31 12:36:52 +00:00
index.test.ts pre-release commit 2025-07-22 23:26:01 +08:00
index.ts feat(core): add a host tool invocation guard (#8032) 2026-07-31 13:46:29 +00:00