Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract

# Conflicts:
#	docs/cordis-catalog/services.md
#	packages/llm/llm-pi-ai/README.md
#	packages/support/llm-replay/tests/llm-replay.spec.ts
This commit is contained in:
Tianyi Cui
2026-07-18 11:55:12 +08:00
678 changed files with 37644 additions and 8578 deletions

View File

@@ -36,6 +36,7 @@ export class BlockAssembler {
private order: number[] = []
private _usage: TokenUsage | undefined
private _finish: FinishReason | undefined
private _replayState: unknown = undefined
/**
* Feed one chunk into the assembly state.
@@ -83,6 +84,7 @@ export class BlockAssembler {
}
case 'finish': {
this._finish = chunk.reason
this._replayState = chunk.replayState
return
}
default: return assertNever(chunk, 'BlockAssembler.push')
@@ -140,6 +142,11 @@ export class BlockAssembler {
return this._finish ?? { kind: 'stop' }
}
/** Adapter-private replay state from the terminal finish chunk, if any. */
get replayState(): unknown {
return this._replayState
}
/**
* The assembled assistant message.
* @returns an assistant-role message over `blocks()` (same open-block assembly rules).