Skip to content

Three small, cross-cutting concerns share this page: who the installation is (identity), what durable user content a session can carry (attachments), and how users grade the product (feedback). None of them is a capability seam with providers — each is a focused package with a clear ownership boundary.

PackageRole
@deepseek-ai/dsh-anonymous-user-idShared anonymous UUID v4 per harness home
@deepseek-ai/dsh-attachmentDurable attachment seam: ctx.attachments
@deepseek-ai/dsh-attachment-localLocal-file provider for attachments
@deepseek-ai/dsh-message-feedbackHost-owned editable per-message feedback sidecar
@deepseek-ai/dsh-command-feedbackLog-only feedback/record events and the /feedback command

Identity: dsh-anonymous-user-id

getOrCreateAnonymousUserId() returns a random UUID v4 scoped to one harness home, persisted as the bare line $DSH_HOME/.anonymous-user-id (~/.dsh/.anonymous-user-id when DSH_HOME is unset). It is never derived from the hostname, network address, git remote, or any other identifying source; deleting the file resets the identity on the next launch, and separate harness homes have separate identities.

The identity serves three consumers:

ConsumerUse
OpenTelemetry backendReports it as Resource user.id
/feedback acknowledgementEchoes it back so users can correlate
dsh-llm-deepseekSends it as x-deepseek-harness-user-id so receiving systems correlate records without independently generated identities

Reads and writes are synchronous because both boot-time telemetry construction and direct command execution need one API; the result is memoized per resolved file path for the process lifetime. A first writer uses exclusive creation and a concurrent loser adopts the persisted winner; a corrupt file is replaced; persistence is best-effort, so an unwritable home still receives a process-local UUID. This package is a shared library, not a Cordis plugin — consumers import the function directly. DSH_TELEMETRY_DISABLED stops telemetry export only; it does not suppress direct feedback acknowledgement or the provider header.

Attachments: dsh-attachment

ctx.attachments validates and atomically commits immutable image bytes, then returns a serializable ImageAttachmentRef. Consumers never persist browser paths, object URLs, provider URLs, or base64 in session events — the ref is the only thing that travels. From packages/attachment/attachment/README.md:

  • validateImage runs the same admission policy without persisting (unsent composer images remain browser-owned temporary drafts).
  • saveImage commits each accepted image before any model-visible session event is published; batch writers validate every member first so a malformed member cannot strand earlier members as unreferenced objects.
  • readImage verifies the content-addressed object against its logged metadata; callers may cancel it, and implementations observe cancellation around backend and verification work.
  • The model experience is indirect: the role-neutral core ImageBlock and provider adapters resolve the durable reference into provider requests. Adding an image changes the provider request and therefore invalidates the affected KV-cache request suffix.

The local provider (dsh-attachment-local) stores bytes under the harness home.

Feedback: two systems, one boundary

The repo deliberately has two feedback mechanisms with different durability:

1. dsh-message-feedback — editable, per-message sidecar. Host-owned editable feedback for one finalized assistant message. It registers ctx.messageFeedback, persists one lifecycle-bound sidecar row per Session in a storage domain, and publishes the Host messageFeedback.list / messageFeedback.put / messageFeedback.delete unary Remote contract (see API Gateway). It is separate from the immutable Session-level feedback/record event and performs no telemetry handoff.

Configuration: maxNoteBytes (required positive safe integer). Notes must contain at least one non-whitespace character; accepted text is stored verbatim rather than trimmed. Omitting note means the desired value has no note, so a version-matched put clears an existing note. Note validation precedes session lookup.

2. dsh-command-feedback — immutable log events. Trigger-independent session feedback plus the human-facing /feedback capture. recordFeedback(session, text) appends one log-only feedback/record event; the plugin registers one global command through ctx.commands (see Interactions), so every composed command adapter discovers it — the shipped Web client executes it without a model turn.

The command contract: /feedback <text> appends feedback/record and acknowledges with Feedback recorded for session {sessionId}, Anonymous user: {userId}, plus the session-sharing disclosure; bare /feedback returns a direct usage error, and whitespace-only input is treated as empty.

Key source files

Repo-relative pathWhat it provides
packages/identity/anonymous-user-id/src/getOrCreateAnonymousUserId, file storage contract
packages/attachment/attachment/src/ctx.attachments, ImageAttachmentRef, admission policy
packages/attachment/attachment-local/src/Local-file attachment provider
packages/feedback/message-feedback/src/ctx.messageFeedback, sidecar persistence, Remote contract
packages/feedback/command-feedback/src/recordFeedback, /feedback command
.agents/notes/implemented/architecture/2026-08-10-message-feedback-sidecar.mdThe sidecar design boundary

Further reading