DeepSeek Harness

DeepSeek Harness: Session Projections and Web Views

· 8 min read · 中文版

In DeepSeek Harness, session projections fold committed session events into whole current domain values on the host; the Web conversation assembler separately turns a loaded event window into target-owned views. Both relate to a session, but neither is a synonym for the other.

DeepSeek Harness: what does a projection provide?

The session projection reference describes an optional capability, ctx.sessionProjections. Domain plugins register pure projection units. The registry subscribes to session/event and folds each committed event through those units. A unit can expose a client-visible whole value through its wire definition; host-only units omit it. The framework drives the fold, while the domain defines the state and transition.

The resulting value is a read-side view of log-derived domain state. It can travel to client carriers in a history tail page and a session/projection push frame. The client receives the finished value rather than folding that domain's events itself. Rendering is owned by the slot system, not by the projection unit. A projection therefore helps a client know the current value of a domain concept; it does not define the complete visible chat transcript.

Committed events feed host projections while the client event window feeds conversation assembly

DeepSeek Harness: what builds the conversation view?

The conversation assembly reference describes a separate, target-neutral layer between a client event window and browser views. The Session Controller owns the contiguous loaded logical-event window. An entry can be a durable SessionEvent or a client-only transient assistant/live-chunk presentation. The conversation assembler consumes those entries without opening another history stream.

ui-conversation owns the shared binding, Turn and Step locations, incremental context assembly, target sources and input orchestration. Target packages such as ui-chat and ui-trajectory own their definitions, final snapshots and rendering. Thus the same event window can support different presentations. A transient live chunk is presentation state; it is not automatically a committed session event. Do not equate a temporarily visible fragment with a durable log entry.

LayerInputOutput or responsibility
Session projectionCommitted events and session metadataWhole current domain values, optionally exposed to clients
Session ControllerSession history and live presentationContiguous loaded logical-event window
Conversation assemblyThat client event windowNodes, locations and target sources
Target viewAssembled target dataChat or trajectory-specific presentation

DeepSeek Harness: how does a projection update?

A ProjectionDefinition has a key, state schema, init, apply, optional wire, and a stateVersion. init receives immutable session metadata and the exact inherited event count. apply is a pure transition from previous state and one committed event. For an event a unit does not care about, it must return the same state reference. The registry uses Object.is to avoid downstream work when the reference is unchanged.

When state changes, the unit can calculate a new client view. The reference says the change feed publishes only when the raw view result changes by Object.is. An object-valued view must reuse its reference when internal-only changes should not publish a new value. These identity rules affect update efficiency and publication; they do not say that every session event must produce a visible change.

Projection cells can build lazily. If a unit registers after events have flowed, or an older session is first touched, the registry folds the in-memory log on first use. The optional cold cache can seed a fold from validated checkpoint rows and skip the already-folded prefix. Its caller supplies the complete log in sequence order; the service does not retrieve persistence itself. stateVersion invalidates old serialized states when state fields or fold semantics change. Cache and projection are derived from the log, not a substitute for the log's authoritative committed events.

DeepSeek Harness: how do you trace a mismatch?

  1. Identify the exact session and the displayed surface. Determine whether the missing or unexpected item is a domain value exposed by a projection, a durable event, or a transient presentation fragment.
  2. For a domain value, check whether the relevant projection unit is registered and client-visible through wire. Compare its current state and view with the committed events it is meant to fold.
  3. Check event order, initialization metadata and inherited prefix where applicable. If inspecting a cold read, verify that the caller supplied the complete ordered log and that the cache state version matches the unit's semantics.
  4. For conversation content, inspect the Session Controller's loaded window and the assembler's target data. A client may have only a loaded window, and the selected target owns the final presentation.
  5. Compare the observed state before and after a committed event. If a projection's internal state changed but its raw view reference did not, the documented feed suppresses publication; determine whether that is appropriate for the unit's contract.

This is a conceptual investigation sequence rather than a universal debugging command. The references define interfaces and ownership; they do not promise a single UI inspector or a particular log message for every deployment. Preserve session identity and event coordinates when gathering evidence, and remove sensitive transcript content before sharing it.

DeepSeek Harness: why can the two views differ?

A projection is a current value computed by a specific domain unit. Conversation assembly processes the currently loaded event window and transient presentation to construct views. Their inputs, ownership and update paths differ. A projection may intentionally ignore an event; a target can present, group or omit nodes according to its own definition. A client-only live chunk can appear while streaming even though the projection registry folds committed events. These differences alone do not establish a defect.

Conversation grouping is also a presentation concern. The reference describes root entries and groups that refer to existing nodes; groups do not own source node data. Group validation checks that referenced nodes exist and prevents conflicting placements. A grouping error therefore should be investigated in assembly and target definitions rather than assumed to be a projection-cache failure. Conversely, a missing whole domain value may require examining the host unit and its wire publication, even when the chat looks correct.

A projection snapshot also has an asOfSeq watermark shared by its client-visible values. The reference says snapshot(session) is synchronous so a carrier can read the page slice in the same tick at one sequence cut. An empty log uses -1. A cached listing is a different observation: it may lag the latest durable checkpoint, and a connected session's value supersedes the cached listing. Comparing a cached listing against a current view without recording the cut can therefore create a false mismatch.

Conversation assembly has its own partial-history behavior. A Definition correlates events with a stable kind and id. If the loaded window contains only updates and the start is not loaded, the Context stays pending until an older page supplies that start. A producer that needs a result visible before that point can provide enough whole fallback state in a terminal or checkpoint event. The assembler should not infer ownership by attaching an update to the latest unfinished item. This is a different problem from a projection unit returning an unchanged view reference.

The shell also resolves a preferred view or Chat fallback and explicitly activates a selected target. Merely creating or reading a target source does not activate it. On first activation the builder receives a replacement from current contexts; later flushes apply changes to active targets. When the same event appears differently in Chat and Trajectory, inspect the target definition and activation state along with the loaded window rather than expecting the projection feed to dictate the renderer.

DeepSeek Harness: what are the limits and safety boundaries?

The projection seam is optional and is not the agent-loop spine. A projection value is derived state; it does not guarantee that all events are visible in a client or that a session's current permissions are appropriate. The conversation view is a presentation of a loaded window, not proof that all history is loaded or that transient content was committed. Use the authoritative event history and the specific domain contract when correctness depends on the distinction.

Session data can contain private prompts, tool output and project details. Restrict diagnostic sharing to the relevant reviewed evidence. Neither a successful rendering nor a valid projection schema establishes that the underlying content is trustworthy or safe to act on.

DeepSeek Harness: what do the terms mean?

  • Committed event: a session event folded by the host projection registry.
  • Projection unit: a domain-owned pure initializer and transition, optionally exposing a client view.
  • Wire view: the whole client-visible value derived from a projection state.
  • Logical-event window: the contiguous loaded client window, including durable and transient entries.
  • Target: a consumer such as chat or trajectory that defines its own final presentation.

Frequently asked questions

Is a projection the chat transcript?

No. It is a whole current domain value; conversation assembly builds target views from the loaded event window.

Can a live chunk be visible before a committed event?

Yes. Client-only live chunks are presentation entries and are distinct from committed events.

What does asOfSeq describe?

It is the shared event watermark of the client-visible projection snapshot.

Sources

Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.

  1. Session projections
  2. Conversation assembly

This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.

← Back to all articles

DeepSeek Harness: Session Projections and Web Views