Commit graph

2 commits

Author SHA1 Message Date
jinye
58797088be
feat(external-context): Add submitted-prompt auto recall (#7877)
* feat(external-context): add submitted-prompt auto recall

Add an opt-in Hook-only profile that derives bounded retrieval queries from submitted prompt provenance while preserving the existing on-demand MCP contract.

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

* fix(external-context): harden auto recall query sanitization (#7877)

Address review feedback on the submitted-prompt auto recall Hook:

- Bound the sanitizer input before the redaction regexes run so a
  worst-case prompt cannot drive the assignment regex into quadratic
  backtracking that blocks the event loop past the wall-clock budget.
- Test the whole assignment for secret names so a leading label such as
  "Deploy failed:" can no longer claim the match and leak an api_key=.
- Skip the interactive E2E under container sandboxes (docker/podman),
  matching the cron-interactive precedent.
- Restore real undici coverage for a malformed proxy environment value.
- Make the wall-clock-budget test exercise the internal timer rather than
  the provider timeout, and give the backtracking regression test a shape
  that actually backtracks.
- Clarify that the v2 top-level timeoutMs applies only to the on-demand
  MCP path, and note session-lifetime context accumulation in the design
  doc.

* fix(external-context): complete secret redaction, guard MCP config version (#7877)

Anchor the secret keyword to the name that owns the separator so a leading
prose label can no longer claim the match. This redacts spaced separators
(api_key = sk-...) and inline JSON ({"api_key": "..."}), and stops
over-redacting ordinary prose such as "readme: token refresh flow".

Also reject non-version-1 configs in runMcp with a clear startup error so an
auto-recall (v2) config cannot silently expose a second retrieval surface.

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-07-29 05:21:29 +00:00
jinye
8f667f5bdc
feat(integrations): add retrieval-only external context search (#7586)
* feat(integrations): add direct external context provider

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

* fix(integrations): harden external context failure handling

Preserve provider timeout classification, reject ambiguous Mem0 statuses, release rejected response bodies, and clarify credential and workspace deployment boundaries.

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

* refactor(integrations): narrow external context to retrieval

Limit Phase 1 to one provider-bound search tool, remove hooks and writes, and document the direct profile's actual permission and isolation boundaries.

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

* fix(integrations): harden external context deployment

Pin the managed MCP source through an administrator-owned command-line configuration, document the Direct Profile trust boundary, and remove unused logging/runtime abstractions.

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

* fix(integrations): preserve external context results

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

* fix(integrations): honor provider proxy settings

Install an environment-aware dispatcher before the external context MCP server starts so enterprise egress proxy and NO_PROXY settings apply to provider requests. Document the managed launcher environment and cover startup wiring.

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

* fix(integrations): diagnose invalid proxy settings

Classify proxy dispatcher construction failures as sanitized configuration errors so managed deployments can identify an invalid proxy environment without exposing proxy credentials.

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-07-25 08:18:27 +00:00