Commit Graph

2 Commits (37837c00a92d976efe2373c74bd3c232bea8a2aa)

Author SHA1 Message Date
wizardchen 6663268504 refactor(modelcontext): unify handle terminology and document the merged package
Internal-only rename of the remaining alias-era names (ChunkAlias ->
ChunkHandle, aliasForRealValue -> handleForDurable, realForAlias ->
durableForHandle, OrphanAliases -> OrphanHandles, shortSourceAliasRE ->
shortSourceHandleRE, locals and comments). Exported API names are
unchanged. The README now describes the single-package layout, the
handleTable/streamHold primitives and the sourceKeySpaces policy table.
2026-07-27 11:05:43 +08:00
wizardchen 69b792398e refactor(modelcontext): consolidate stream decoding on one suffix-hold primitive
streamHold captures the shared shape of streaming-safe handle decoding
(withhold a trailing byte run that could still become a handle, decode
what is released, decide the fate of a held tail at close). The resource
decoder, HandleStreamDecoder and the orphan-resource filter become
instances whose hold/flush functions are the original logic moved
verbatim; the citation stream expander stays a dedicated tag parser.

The duplicate res://\d+ regexes merge into resourceHandleShapeRE, all
stream types now live in stream.go, and orphan_stream.go is removed.
2026-07-27 11:05:43 +08:00