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.
| Package | Role |
|---|---|
@deepseek-ai/dsh-anonymous-user-id | Shared anonymous UUID v4 per harness home |
@deepseek-ai/dsh-attachment | Durable attachment seam: ctx.attachments |
@deepseek-ai/dsh-attachment-local | Local-file provider for attachments |
@deepseek-ai/dsh-message-feedback | Host-owned editable per-message feedback sidecar |
@deepseek-ai/dsh-command-feedback | Log-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:
| Consumer | Use |
|---|---|
| OpenTelemetry backend | Reports it as Resource user.id |
/feedback acknowledgement | Echoes it back so users can correlate |
dsh-llm-deepseek | Sends 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:
validateImageruns the same admission policy without persisting (unsent composer images remain browser-owned temporary drafts).saveImagecommits 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.readImageverifies 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
ImageBlockand 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 path | What 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.md | The sidecar design boundary |
Further reading
- API Gateway — how
messageFeedback.*reaches the client - Interactions: Commands — the command plane
/feedbackrides on - The DeepSeek Provider — the
x-deepseek-harness-user-idheader - Storage & Persistence — storage domains behind the sidecar
- Repo:
packages/identity/anonymous-user-id/README.md,packages/attachment/attachment/README.md,packages/feedback/*/README.md