DSH / Atlas
2026-09-19proposedsimplification

Retire the prompt registry change event

停用提示词注册表变更事件

[`SystemPrompt`](../../../../packages/core/system-prompt/src/index.ts) emits `system-prompt/change` when providers register or dispose. Repository searches find no executing product listener, but generated Host discovery advertises the event. Tests maintain notification counts and rollback after listener exceptions. This is a public extension with maintenance obligations, even without a first-party subscriber. The ac

English

Problem

SystemPrompt emits system-prompt/change when providers register or dispose. Repository searches find no executing product listener, but generated Host discovery advertises the event. Tests maintain notification counts and rollback after listener exceptions. This is a public extension with maintenance obligations, even without a first-party subscriber.

The active Remote event delivery reference explicitly retains this extension despite having no shipped consumer. Per-step assembly predates that promise and serves a different purpose: rebuilding model input does not replace push observation of registry changes.

Proposal

Retire system-prompt/change and accept the loss of prompt-registry push observation for installed and dynamically authored Host plugins. Remove its declaration, emitter, current documentation, generated discovery entries, and notification-specific tests. No currently supported product path requires this extension.

Make ScopedLayers's constructor notification callback optional and omit it for SystemPrompt; do not supply a no-op callback. Remove the existing no-op arguments in jobs-local and mcp-resources when updating this shared constructor, and update jobs-local's adjacent notification explanation. Preserve shared effects, action rollback, undo ordering, layer reclamation, and tools/change with its production consumers. Keep prompt-provider evaluation, scope shadowing, and assembly invariants.

Implementation must amend the active Remote event delivery note to state that this proposal supersedes only its promise to retain system-prompt/change. Remove that event from the retained-extension statement and link the implemented retirement decision. Keep the Remote delivery note active and cross-linked: its forwarding policy and other extensions remain independently useful. Do not rewrite or archive that entire decision.

Alternatives considered

Keep the extension for future dashboards or plugins. Push observation could support a real consumer, but none is identified in supported product paths. Retention preserves notification and listener-failure behavior that the package otherwise does not need.

Treat per-step assembly as proof of compatibility. Rejected because model-input reconstruction and registry notifications are different behaviors. This proposal deliberately changes the extension promise rather than claiming the earlier reconstruction decision already removed it.

Acceptance criteria

  • Remove the event from source and current generated inventories, and amend the active retention promise in the implementation change.
  • Remove notification-count and notification-failure tests; retain provider-membership, disposer, duplicate-registration, shadowing, and HMR coverage. Keep mixed tests' independent assertions.
  • Run focused scope, tools, system-prompt, jobs-local, and mcp-resources tests, loop request-reconstruction coverage, a relevant keyless recording, catalog generation, typecheck, lint, and doc-sync. Prompt/log output remains unchanged.

Risks

Installed plugins may depend on notifications or on listener exceptions rejecting registration. They lose both behaviors; repository searches cannot establish their absence. A future push consumer needs an explicit registration-observation requirement and ownership design before reintroducing an event. Source savings are small; the benefit is retiring the public notification and failure obligation.

中文

问题

SystemPrompt 在提供方注册或 dispose(资源释放)时发出 system-prompt/change。仓库搜索未找到执行的产品监听者,但生成的 Host 发现目录会展示该事件。测试维护通知次数及监听者抛出异常后的回滚行为。即使没有第一方订阅者,它仍是具有维护义务的公开扩展。

活动的 Remote 事件投递参考 明确保留了这一扩展,尽管没有随产品提供的消费方。逐步骤组装早于该承诺,且用途不同:重新构建模型输入不能替代注册表变更的推送观测。

提案

停用 system-prompt/change,接受已安装及动态编写的 Host 插件失去提示词注册表推送观测的代价。删除其声明、发出点、当前文档、生成的发现条目和通知专属测试。当前受支持的产品路径均不依赖此扩展。

将 ScopedLayers 构造函数的通知回调改为可选,并让 SystemPrompt 省略它;不提供无操作回调。更新此共享构造函数时,同时删除 jobs-local 和 mcp-resources 中现有的无操作实参,并更新 jobs-local 相邻的通知说明。保留共享 effect、操作回滚、撤销顺序、层回收,以及 tools/change 及其生产消费方。保留提示词提供方求值、作用域覆盖和组装 invariant。

实现时必须修订活动的 Remote 事件投递记录,说明本提案只取代其中保留 system-prompt/change 的承诺。从保留扩展的陈述中移除该事件,并链接到已实现的停用决策。让 Remote 投递记录保持活动并相互链接:其转发策略和其他扩展仍具有独立价值。不要重写或归档整个决策。

考虑过的替代方案

为未来仪表盘或插件保留扩展。 推送观测可能服务于真实消费方,但受支持的产品路径中尚未找到这样的消费方。保留它会维持这个包原本不需要的通知及监听者失败行为。

将逐步骤组装视为兼容性证据。 不采用,因为模型输入重建和注册表通知是不同的行为。本提案有意改变扩展承诺,而不声称早先的重建决策已经删除了它。

验收标准

  • 从源代码和当前生成目录中删除该事件,并在实现变更中修订活动记录中的保留承诺。
  • 删除通知次数和通知失败测试;保留提供方成员关系、disposer、重复注册、作用域覆盖及 HMR(热模块替换)覆盖。保留混合测试中的独立断言。
  • 运行针对作用域、工具、系统提示词、jobs-local 和 mcp-resources 的测试、循环请求重建覆盖、相关无密钥录制回放、目录生成、类型检查、lint 和 doc-sync(文档同步门禁)。提示词和日志输出保持不变。

风险

已安装插件可能依赖通知,或依赖监听者异常使注册失败。这两种行为都会消失;仓库搜索无法确认此类插件不存在。未来的推送消费方需要先明确注册观测需求和所有权设计,才能重新引入事件。源代码节省不多;收益在于停用公开通知及其失败义务。