Repository navigation
Conversation
- CoreApi.deliveryDrop 声明能力;DeliveryDecision 支持 {action:'drop', reason}
- 丢弃时不写 session、不调模型、不跑 onBatchEnd;仍推进 watermark 并记日志
- World.onEventsSettled 增加 dropped,区分 Persona 丢弃与操作者清空队列
- 补 drop/水位/World 结算与 CoreApi 能力测试,更新 Persona/World 文档
Member
|
谢谢把改法和兼容写得这么清楚。这个 PR 我们不合,#370 一起关,说明一下: Cortico 的分工是:Persona 决定事件怎么摆给模型看(注入提示、交接时留哪些、用 「心」现在的语义沉默(往这一批里注入「不用回」,主模型自己 end_turn)照常可用,就是你们 ADR 0004 写的那条路;前缀命中缓存时,这次调用的成本不高。想少叫醒主模型,可以用 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
中文
Persona.onDelivery现在可在CoreApi.deliveryDrop为 true 时返回{ action: 'drop', reason }。Core 在投递前丢弃整批:不写 session、不调模型、不运行onBatchEnd,钩子期间的injectInternal一并丢弃;游标照常推进,来源 World 的onEventsSettled收到dropped。未声明deliveryDrop的 Core 忽略返回值,旧 Persona 与旧 Core 的行为不变。新增DeliveryDecision类型与四个测试,覆盖丢弃、水位推进、World 结算、不写 session/不调模型,以及action: 'deliver'照常投递。English
Persona.onDeliverymay now return{ action: 'drop', reason }whenCoreApi.deliveryDropis true. Core drops the batch before delivery: no session write, no model call, noonBatchEnd; internal injections made during the hook are dropped too. The watermark still advances and the source World receivesonEventsSettled(..., 'dropped'). A Core that does not declaredeliveryDropignores the return value, so existing Personas and older Cores keep their behavior. Adds theDeliveryDecisiontype and four tests covering the drop path, watermark advancement, World settlement, the absence of a session write or model call, and theaction: 'deliver'path.Checks
pnpm test— Node 22: 287 files, 5186 passed, 3 skippedpnpm run typecheckpnpm typecheck:webCloses #370