Merge remote-tracking branch 'origin/master' into fix/subagent-depth-budget

# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/persistence-catalog.md
#	website/zh-CN/api/harness/sessions.md
This commit is contained in:
Tianyi Cui
2026-07-20 17:14:24 +08:00
49 changed files with 385 additions and 615 deletions

View File

@@ -252,7 +252,6 @@ export class ReactLoopAgent implements Agent {
const context = {
content,
source,
...options?.envelope !== undefined ? { envelope: options.envelope } : {},
...options?.meta !== undefined ? { meta: options.meta } : {},
}
if (isTurnOpen(this.session)) {

View File

@@ -260,11 +260,10 @@ async function runTurn(
session.append('user/message', { content, source: message.source }, { surfaceOp: 'append' })
// Every `allow.additionalContexts` entry is a separate context/message the
// next request also sees. The turn is open, so inject() appends each one
// into THIS turn without flattening provenance, framing, or metadata.
// into THIS turn without flattening provenance or metadata.
for (const context of decision.additionalContexts ?? []) {
agent.inject(context.content, {
source: context.source,
...context.envelope !== undefined ? { envelope: context.envelope } : {},
...context.meta !== undefined ? { meta: context.meta } : {},
})
}