You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: reapOrphanBlocks should live in acp-kernel, not the proxy #12
reapOrphanBlocks (src/orphan-gc.ts) deactivates compression blocks whose effectiveMessageIds are no longer present in the visible context. This is block lifecycle / context-management logic — it belongs in acp-kernel, not the proxy adapter.
Tracks an orphanStreak counter on each block via a WeakMap<object, number> (attaching undocumented state to a foreign type)
Calls deactivateBlock on kernel state
This violates the principle: the proxy is a pure adapter (format conversion + stream routing); all compression/context-management logic lives in acp-kernel.
Why it was put here
The kernel had no "reap orphan" capability. When a client (e.g. opencode) deletes history, a block's summary loses its anchor and floats to the top of context as an orphan, polluting the model's view.
Proposed fix
Move the capability into acp-kernel:
// in acp-kernelcore.reapOrphans(state: CompressionState,visible: CoreMessage[]): CompressionState
The kernel already owns state.blocks and effectiveMessageIds — it is the natural owner of this decision. The proxy reduces to a one-liner:
Activity
fix(loop): remove one-compress/readOnly guards — failure is the tool …
fix: harden context window, prefix reattach, loop system block, upstr…
fix: harden context window, prefix reattach, loop system block, upstr…
fix: harden context window, prefix reattach, loop system block, upstr…
fix: retain behavioral subset of #1064 after mechanical split into #1113
order-primary session resolution: order+id claim, shape guard rails (#…