Files
deepseek-harness/packages/attachment/attachment
Yichen Jiang b599d1d0af Merge remote-tracking branch 'origin/master' into worktree/web-multimodal-image-input
# Conflicts:
#	.gitignore
#	apps/cli/package.json
#	apps/cli/src/web.ts
#	docs/architecture.i18n.yaml
#	docs/config-catalog.md
#	docs/module-graph.md
#	packages/client/connection/README.md
#	packages/client/connection/src/client/api.ts
#	packages/client/connection/src/client/fixture.ts
#	packages/client/runtime/README.md
#	packages/client/runtime/src/client/sessions/service.ts
#	packages/client/runtime/src/client/sessions/session.ts
#	packages/client/runtime/src/client/workspaces/service.ts
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/MessageItem.tsx
#	packages/client/ui-conversation/src/client/contract/slots.ts
#	packages/client/ui-conversation/src/client/index.ts
#	packages/client/ui-conversation/src/client/service.ts
#	packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx
#	packages/client/ui-conversation/src/client/skeleton/EmptyHero.tsx
#	packages/client/ui-conversation/src/client/skeleton/EmptyState.tsx
#	packages/client/ui-conversation/src/client/skeleton/InputBar.module.css
#	packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
#	packages/client/ui-conversation/tests/apply-inject.spec.tsx
#	packages/client/ui-conversation/tests/input-bar.spec.tsx
#	packages/client/ui-conversation/tests/skeleton.spec.tsx
#	packages/client/ui-trajectory/tests/views.spec.tsx
#	packages/host/apiproxy/src/api-proxy.ts
#	pnpm-lock.yaml
2026-07-27 12:27:30 +08:00
..

@deepseek-ai/dsh-attachment

English | 中文

The durable attachment seam. 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.

Unsent composer images remain browser-owned temporary drafts. saveImage is called only at message submission or while committing structured provider output, before any model-visible session event is published. validateImage runs the same admission policy without persisting; batch writers validate every member first so one malformed member cannot strand earlier members as unreferenced objects (there is no garbage collection). readImage verifies the content-addressed object against its logged metadata.

Model Experience

Indirectly, through the role-neutral core ImageBlock and provider adapters that resolve its durable reference.

KV Cache effect

Adding an image changes the provider request and therefore invalidates the affected request suffix.

Known Limitations and Deferred Work

  • Version one accepts PNG, JPEG, WebP, and GIF only.
  • Retention and garbage collection are deferred because resumed and forked sessions may share immutable objects.
  • Generic files, audio, video, and persistent unsent drafts require separate lifecycle and provider contracts.