@deepseek-ai/dsh-attachment 0.1.1-rc.1 → 0.1.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/lib/index.js +29 -2
- package/lib/types/brand.d.ts +8 -0
- package/lib/types/brand.js +8 -0
- package/lib/types/error.d.ts +1 -1
- package/lib/types/index.d.ts +22 -5
- package/lib/types/index.js +23 -2
- package/lib/types/types.d.ts +36 -2
- package/package.json +6 -6
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/attachment/attachment/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 3ad568c7308f1ab85cb4af3fcc2afd3cba9a611a
|
|
6
|
+
README.zh.md: fadbb1c5bbf097c599da651055d63a1ed64cd579
|
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
The durable attachment seam. `ctx.attachments` validates and durably commits
|
|
5
|
+
The durable attachment seam. `ctx.attachments` validates and durably commits a provider-independent normalized image, then returns a serializable `ImageAttachmentRef`; consumers never persist browser paths, object URLs, provider URLs, or base64 in session events.
|
|
6
6
|
|
|
7
|
-
Unsent composer images remain browser-owned temporary drafts. `validateImage` runs the
|
|
7
|
+
Unsent composer images remain browser-owned temporary drafts. `validateImage` runs the complete admission policy without persisting. `saveImages` owns batch count and aggregate-byte limits, prepares every normalized attachment before publishing any member, then commits in order and returns references only after the complete batch succeeds. A later storage failure returns no partial references, although an earlier immutable content-addressed object may remain unreachable until reference-aware garbage collection exists. `AttachmentError.code` uses the closed `AttachmentErrorCode` string union. Its `ImageAdmissionErrorCode` subset marks caller-correctable image-input failures; `isImageAdmissionError` recognizes that subset at runtime so each protocol adapter can map its own error vocabulary. `saveImage` commits one accepted image before any model-visible session event is published and returns its `ImageAttachmentRef`. When normalization reduces the raster, the reference records the orientation-applied input size in `originalDimensions`. `readImage` verifies the normalized attachment against its logged metadata. `readImageRequest` deterministically derives a route-sized request version whose identity covers the attachment id, transform version, pixel and byte budgets, and encoder settings. Callers compose ordered batches with `Promise.all(refs.map(...))`; the local implementation still bounds compression through its instance limiter, cache, and singleflight. Callers may cancel reads and projections; implementations preserve cancellation instead of translating it into a storage failure.
|
|
8
8
|
|
|
9
9
|
`admitEncodedImages(attachments, images)` is the shared wire entry used by every RPC endpoint that accepts browser uploads (the session prompt endpoint and the command executor): it enforces canonical base64 on every member, then delegates batch admission — limits, validation, ordered commit — to `saveImages`. The base64 upload form is `EncodedImageAttachment`, exported from `@deepseek-ai/dsh-attachment/types` so wire contracts can reference it.
|
|
10
10
|
|
|
11
11
|
## Model Experience
|
|
12
12
|
|
|
13
|
-
Indirectly, through the role-neutral core `ImageBlock` and provider adapters that resolve its durable reference.
|
|
13
|
+
Indirectly, through the role-neutral core `ImageBlock` and provider adapters that resolve its durable reference into an exact request version. Request descriptors expose the complete attachment id and actual request dimensions.
|
|
14
14
|
|
|
15
15
|
#### KV Cache effect
|
|
16
16
|
|
package/README.zh.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
持久附件服务边界。`ctx.attachments`
|
|
5
|
+
持久附件服务边界。`ctx.attachments` 校验并持久提交提供方无关的规范化图片,随后返回可序列化的 `ImageAttachmentRef`;消费方绝不会在会话事件中持久保存浏览器路径、对象 URL、提供方 URL 或 base64。
|
|
6
6
|
|
|
7
|
-
未发送的输入区图片仍是由浏览器持有的临时草稿。`validateImage`
|
|
7
|
+
未发送的输入区图片仍是由浏览器持有的临时草稿。`validateImage` 运行完整准入策略但不执行持久化。`saveImages` 负责批次图片数量和总字节限制,在发布任何成员前准备全部规范化附件,然后按顺序提交,并且只在完整批次成功后返回引用。后续存储失败不会返回部分引用,但较早写入的不可变内容寻址对象可能保持不可达,直至具备按引用感知的垃圾回收。`AttachmentError.code` 使用封闭的 `AttachmentErrorCode` 字符串联合类型。其 `ImageAdmissionErrorCode` 子集标记可由调用方修正的图片输入失败;`isImageAdmissionError` 在运行时识别该子集,使每个协议适配器可以映射自己的错误词汇。`saveImage` 会在发布任何模型可见的会话事件前提交一张已接受的图片,并直接返回 `ImageAttachmentRef`。规范化过程缩小图片时,引用会通过 `originalDimensions` 记录应用方向后的输入尺寸。`readImage` 根据已记录的元数据校验规范化附件。`readImageRequest` 确定性派生路由所需的请求版本,其身份覆盖附件 ID、变换策略版本、像素和字节预算及编码参数。调用方通过 `Promise.all(refs.map(...))` 组合有序批次,本地实现仍通过实例级限流器、缓存和 singleflight 限制压缩并发。调用方可以取消读取和投影;实现保留取消结果,不把它转换为存储失败。
|
|
8
8
|
|
|
9
9
|
`admitEncodedImages(attachments, images)` 是每个接受浏览器上传的 RPC 端点(会话 prompt 端点与命令执行器)共用的 wire 入口:它对每个成员强制执行规范 base64,随后把批量准入——限额、校验、有序提交——委托给 `saveImages`。base64 上传形式为 `EncodedImageAttachment`,从 `@deepseek-ai/dsh-attachment/types` 导出,供 wire 契约引用。
|
|
10
10
|
|
|
11
11
|
## 模型体验
|
|
12
12
|
|
|
13
|
-
该包通过角色无关的核心 `ImageBlock
|
|
13
|
+
该包通过角色无关的核心 `ImageBlock`,以及把持久引用解析为确定请求版本的提供方适配器,间接影响模型。请求描述会公开完整附件 ID 和实际请求尺寸。
|
|
14
14
|
|
|
15
15
|
#### KV 缓存影响
|
|
16
16
|
|
package/lib/index.js
CHANGED
|
@@ -55,6 +55,14 @@ function isImageAdmissionError(error) {
|
|
|
55
55
|
function AttachmentId(value) {
|
|
56
56
|
return value;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Brand a validated request-image transformation identifier.
|
|
60
|
+
* @param value - attachment-provider-produced opaque identifier.
|
|
61
|
+
* @returns the branded identifier.
|
|
62
|
+
*/
|
|
63
|
+
function ImageVariantId(value) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
58
66
|
//#endregion
|
|
59
67
|
//#region lib/types/admission.js
|
|
60
68
|
/** Wire-form admission of base64-encoded image uploads. @module @deepseek-ai/dsh-attachment/admission */
|
|
@@ -101,16 +109,35 @@ var AttachmentStore = class extends Service {
|
|
|
101
109
|
* @param inputs - encoded images in their owning message order.
|
|
102
110
|
* @returns durable references in the exact input order.
|
|
103
111
|
*/
|
|
104
|
-
|
|
112
|
+
validateImageBatch(inputs) {
|
|
105
113
|
const { maxImagesPerMessage, maxMessageImageBytes, mediaTypes } = this.imageLimits;
|
|
106
114
|
if (inputs.length > maxImagesPerMessage) throw new AttachmentError("Image batch exceeds the configured image-count limit.", "TOO_MANY_IMAGES");
|
|
107
115
|
if (inputs.reduce((sum, input) => sum + input.data.byteLength, 0) > maxMessageImageBytes) throw new AttachmentError("Image batch exceeds the configured aggregate image-byte limit.", "IMAGES_TOO_LARGE");
|
|
108
116
|
for (const input of inputs) if (!mediaTypes.includes(input.mediaType)) throw new AttachmentError(`Image type ${input.mediaType} is not accepted by this deployment.`, "UNSUPPORTED_IMAGE_TYPE");
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Validate and durably commit one ordered image batch.
|
|
120
|
+
* @param inputs - encoded images in owning-message order.
|
|
121
|
+
* @returns durable normalized attachment references in the same order after every member succeeds.
|
|
122
|
+
*/
|
|
123
|
+
async saveImages(inputs) {
|
|
124
|
+
this.validateImageBatch(inputs);
|
|
109
125
|
for (const input of inputs) await this.validateImage(input);
|
|
110
126
|
const refs = [];
|
|
111
127
|
for (const input of inputs) refs.push(await this.saveImage(input));
|
|
112
128
|
return refs;
|
|
113
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Generate or read one deterministic model-request version from the stored normalized image.
|
|
132
|
+
* @param ref - durable provider-independent normalized attachment reference.
|
|
133
|
+
* @param policy - exact route pixel and encoded-byte budget.
|
|
134
|
+
* @param signal - optional cancellation.
|
|
135
|
+
* @returns request bytes and the cache/upload identity covering every transform input.
|
|
136
|
+
*/
|
|
137
|
+
readImageRequest(ref, policy, signal) {
|
|
138
|
+
signal?.throwIfAborted();
|
|
139
|
+
return Promise.reject(new AttachmentError("The mounted attachment provider cannot derive model-request images.", "ATTACHMENT_PROJECTION_UNSUPPORTED"));
|
|
140
|
+
}
|
|
114
141
|
};
|
|
115
142
|
//#endregion
|
|
116
|
-
export { AttachmentError, AttachmentId, AttachmentStore, AttachmentStore as default, admitEncodedImages, isImageAdmissionError };
|
|
143
|
+
export { AttachmentError, AttachmentId, AttachmentStore, AttachmentStore as default, ImageVariantId, admitEncodedImages, isImageAdmissionError };
|
package/lib/types/brand.d.ts
CHANGED
|
@@ -8,4 +8,12 @@ export type AttachmentId = Branded<'AttachmentId'>;
|
|
|
8
8
|
* @returns the branded identifier.
|
|
9
9
|
*/
|
|
10
10
|
export declare function AttachmentId(value: string): AttachmentId;
|
|
11
|
+
/** Opaque deterministic identity for one request-image transformation. */
|
|
12
|
+
export type ImageVariantId = Branded<'ImageVariantId'>;
|
|
13
|
+
/**
|
|
14
|
+
* Brand a validated request-image transformation identifier.
|
|
15
|
+
* @param value - attachment-provider-produced opaque identifier.
|
|
16
|
+
* @returns the branded identifier.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ImageVariantId(value: string): ImageVariantId;
|
|
11
19
|
//# sourceMappingURL=brand.d.ts.map
|
package/lib/types/brand.js
CHANGED
|
@@ -7,4 +7,12 @@
|
|
|
7
7
|
export function AttachmentId(value) {
|
|
8
8
|
return value;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Brand a validated request-image transformation identifier.
|
|
12
|
+
* @param value - attachment-provider-produced opaque identifier.
|
|
13
|
+
* @returns the branded identifier.
|
|
14
|
+
*/
|
|
15
|
+
export function ImageVariantId(value) {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
10
18
|
//# sourceMappingURL=brand.js.map
|
package/lib/types/error.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare const IMAGE_ADMISSION_ERROR_CODES: readonly ["TOO_MANY_IMAGES", "IMAGES_
|
|
|
3
3
|
/** Caller-correctable attachment failure codes raised while admitting image input. */
|
|
4
4
|
export type ImageAdmissionErrorCode = typeof IMAGE_ADMISSION_ERROR_CODES[number];
|
|
5
5
|
/** Stable attachment failure codes used for protocol error routing. */
|
|
6
|
-
export type AttachmentErrorCode = ImageAdmissionErrorCode | 'INVALID_ATTACHMENT_REF' | 'ATTACHMENT_CORRUPT' | 'ATTACHMENT_WRITE_FAILED' | 'ATTACHMENT_NOT_FOUND' | 'ATTACHMENT_READ_FAILED';
|
|
6
|
+
export type AttachmentErrorCode = ImageAdmissionErrorCode | 'INVALID_ATTACHMENT_REF' | 'ATTACHMENT_CORRUPT' | 'ATTACHMENT_WRITE_FAILED' | 'ATTACHMENT_NOT_FOUND' | 'ATTACHMENT_READ_FAILED' | 'ATTACHMENT_PROJECTION_UNSUPPORTED';
|
|
7
7
|
/**
|
|
8
8
|
* Stable failures suitable for host RPC error mapping.
|
|
9
9
|
*
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Durable attachment storage seam (`ctx.attachments`). @module @deepseek-ai/dsh-attachment */
|
|
2
2
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
3
|
-
import type { ImageAttachmentLimits, ImageAttachmentRef, SaveImageAttachment, StoredImageAttachment } from './types.ts';
|
|
4
|
-
export { AttachmentId } from './brand.ts';
|
|
3
|
+
import type { ImageAttachmentLimits, ImageAttachmentRef, ImageRequestPolicy, RequestImageAttachment, SaveImageAttachment, StoredImageAttachment } from './types.ts';
|
|
4
|
+
export { AttachmentId, ImageVariantId } from './brand.ts';
|
|
5
5
|
export { AttachmentError, isImageAdmissionError } from './error.ts';
|
|
6
6
|
export type { AttachmentErrorCode, ImageAdmissionErrorCode } from './error.ts';
|
|
7
7
|
export { admitEncodedImages } from './admission.ts';
|
|
8
|
-
export type { AttachmentId as AttachmentIdType, EncodedImageAttachment, ImageAttachmentLimits, ImageAttachmentRef, ImageMediaType, SaveImageAttachment, StoredImageAttachment, } from './types.ts';
|
|
8
|
+
export type { AttachmentId as AttachmentIdType, EncodedImageAttachment, ImageAttachmentLimits, ImageAttachmentRef, ImageRequestPolicy, ImageMediaType, RequestImageAttachment, SaveImageAttachment, StoredImageAttachment, } from './types.ts';
|
|
9
9
|
declare module '@deepseek-ai/cordis' {
|
|
10
10
|
interface Context {
|
|
11
11
|
attachments: AttachmentStore;
|
|
@@ -31,21 +31,38 @@ export declare abstract class AttachmentStore extends Service {
|
|
|
31
31
|
* @param inputs - encoded images in their owning message order.
|
|
32
32
|
* @returns durable references in the exact input order.
|
|
33
33
|
*/
|
|
34
|
+
protected validateImageBatch(inputs: readonly SaveImageAttachment[]): void;
|
|
35
|
+
/**
|
|
36
|
+
* Validate and durably commit one ordered image batch.
|
|
37
|
+
* @param inputs - encoded images in owning-message order.
|
|
38
|
+
* @returns durable normalized attachment references in the same order after every member succeeds.
|
|
39
|
+
*/
|
|
34
40
|
saveImages(inputs: readonly SaveImageAttachment[]): Promise<readonly ImageAttachmentRef[]>;
|
|
35
41
|
/**
|
|
36
42
|
* Validate and durably commit one image before its owning session event is appended.
|
|
43
|
+
* The returned reference describes the persisted normalized image. When
|
|
44
|
+
* normalization reduces the raster, its `originalDimensions` records the
|
|
45
|
+
* orientation-applied input dimensions.
|
|
37
46
|
* @param input - encoded bytes, declared media type, and optional display name.
|
|
38
|
-
* @returns
|
|
47
|
+
* @returns the durable content-addressed normalized image reference.
|
|
39
48
|
*/
|
|
40
49
|
abstract saveImage(input: SaveImageAttachment): Promise<ImageAttachmentRef>;
|
|
41
50
|
/**
|
|
42
51
|
* Read one image and verify that bytes still match the recorded reference.
|
|
43
52
|
* @param ref - durable reference from the session log.
|
|
44
53
|
* @param signal - optional cancellation for backend read and verification work.
|
|
45
|
-
* @returns the verified bytes and
|
|
54
|
+
* @returns the verified bytes and normalized attachment reference.
|
|
46
55
|
* @throws the signal reason when aborted, or a storage error when verification fails.
|
|
47
56
|
*/
|
|
48
57
|
abstract readImage(ref: ImageAttachmentRef, signal?: AbortSignal): Promise<StoredImageAttachment>;
|
|
58
|
+
/**
|
|
59
|
+
* Generate or read one deterministic model-request version from the stored normalized image.
|
|
60
|
+
* @param ref - durable provider-independent normalized attachment reference.
|
|
61
|
+
* @param policy - exact route pixel and encoded-byte budget.
|
|
62
|
+
* @param signal - optional cancellation.
|
|
63
|
+
* @returns request bytes and the cache/upload identity covering every transform input.
|
|
64
|
+
*/
|
|
65
|
+
readImageRequest(ref: ImageAttachmentRef, policy: ImageRequestPolicy, signal?: AbortSignal): Promise<RequestImageAttachment>;
|
|
49
66
|
}
|
|
50
67
|
export default AttachmentStore;
|
|
51
68
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Durable attachment storage seam (`ctx.attachments`). @module @deepseek-ai/dsh-attachment */
|
|
2
2
|
import { Service } from '@deepseek-ai/cordis';
|
|
3
3
|
import { AttachmentError } from "./error.js";
|
|
4
|
-
export { AttachmentId } from "./brand.js";
|
|
4
|
+
export { AttachmentId, ImageVariantId } from "./brand.js";
|
|
5
5
|
export { AttachmentError, isImageAdmissionError } from "./error.js";
|
|
6
6
|
export { admitEncodedImages } from "./admission.js";
|
|
7
7
|
/** Immutable binary attachment service. Implementations validate bytes before publishing a reference. */
|
|
@@ -17,7 +17,7 @@ export class AttachmentStore extends Service {
|
|
|
17
17
|
* @param inputs - encoded images in their owning message order.
|
|
18
18
|
* @returns durable references in the exact input order.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
validateImageBatch(inputs) {
|
|
21
21
|
const { maxImagesPerMessage, maxMessageImageBytes, mediaTypes } = this.imageLimits;
|
|
22
22
|
if (inputs.length > maxImagesPerMessage) {
|
|
23
23
|
throw new AttachmentError('Image batch exceeds the configured image-count limit.', 'TOO_MANY_IMAGES');
|
|
@@ -31,6 +31,14 @@ export class AttachmentStore extends Service {
|
|
|
31
31
|
throw new AttachmentError(`Image type ${input.mediaType} is not accepted by this deployment.`, 'UNSUPPORTED_IMAGE_TYPE');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Validate and durably commit one ordered image batch.
|
|
37
|
+
* @param inputs - encoded images in owning-message order.
|
|
38
|
+
* @returns durable normalized attachment references in the same order after every member succeeds.
|
|
39
|
+
*/
|
|
40
|
+
async saveImages(inputs) {
|
|
41
|
+
this.validateImageBatch(inputs);
|
|
34
42
|
for (const input of inputs)
|
|
35
43
|
await this.validateImage(input);
|
|
36
44
|
const refs = [];
|
|
@@ -38,6 +46,19 @@ export class AttachmentStore extends Service {
|
|
|
38
46
|
refs.push(await this.saveImage(input));
|
|
39
47
|
return refs;
|
|
40
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Generate or read one deterministic model-request version from the stored normalized image.
|
|
51
|
+
* @param ref - durable provider-independent normalized attachment reference.
|
|
52
|
+
* @param policy - exact route pixel and encoded-byte budget.
|
|
53
|
+
* @param signal - optional cancellation.
|
|
54
|
+
* @returns request bytes and the cache/upload identity covering every transform input.
|
|
55
|
+
*/
|
|
56
|
+
readImageRequest(ref, policy, signal) {
|
|
57
|
+
signal?.throwIfAborted();
|
|
58
|
+
void ref;
|
|
59
|
+
void policy;
|
|
60
|
+
return Promise.reject(new AttachmentError('The mounted attachment provider cannot derive model-request images.', 'ATTACHMENT_PROJECTION_UNSUPPORTED'));
|
|
61
|
+
}
|
|
41
62
|
}
|
|
42
63
|
export default AttachmentStore;
|
|
43
64
|
//# sourceMappingURL=index.js.map
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Durable attachment vocabulary. @module @deepseek-ai/dsh-attachment/types */
|
|
2
|
-
import type { AttachmentId } from './brand.ts';
|
|
2
|
+
import type { AttachmentId, ImageVariantId } from './brand.ts';
|
|
3
3
|
export type { AttachmentId } from './brand.ts';
|
|
4
4
|
/** Raster image formats accepted by the version-one attachment path. */
|
|
5
5
|
export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';
|
|
6
|
-
/** Durable, serializable
|
|
6
|
+
/** Durable, serializable reference to one immutable normalized image. */
|
|
7
7
|
export interface ImageAttachmentRef {
|
|
8
8
|
/** Opaque storage identifier; never a filesystem path or bearer URL. */
|
|
9
9
|
attachmentId: AttachmentId;
|
|
@@ -17,6 +17,14 @@ export interface ImageAttachmentRef {
|
|
|
17
17
|
height: number;
|
|
18
18
|
/** Optional display name stripped of local path information. */
|
|
19
19
|
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Input dimensions after applying EXIF orientation and before normalization
|
|
22
|
+
* scaling. Present only when normalization reduced the image.
|
|
23
|
+
*/
|
|
24
|
+
originalDimensions?: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
20
28
|
}
|
|
21
29
|
/** Deployment-resolved limits used by upload admission and request buffering. */
|
|
22
30
|
export interface ImageAttachmentLimits {
|
|
@@ -50,4 +58,30 @@ export interface StoredImageAttachment {
|
|
|
50
58
|
ref: ImageAttachmentRef;
|
|
51
59
|
data: Uint8Array;
|
|
52
60
|
}
|
|
61
|
+
/** Deterministic request-image policy selected by one exact model route. */
|
|
62
|
+
export interface ImageRequestPolicy {
|
|
63
|
+
/** Maximum width multiplied by height after aspect-preserving projection. */
|
|
64
|
+
maxPixels: number;
|
|
65
|
+
/** Encoded-byte cap before base64 expansion or Files API upload. */
|
|
66
|
+
maxBytes: number;
|
|
67
|
+
}
|
|
68
|
+
/** Cached request version derived from one provider-independent normalized attachment. */
|
|
69
|
+
export interface RequestImageAttachment {
|
|
70
|
+
/** Cache and upload-index key over the attachment id, policy, and fixed encoder parameters. */
|
|
71
|
+
variantId: ImageVariantId;
|
|
72
|
+
/** Durable normalized attachment from which this request version was derived. */
|
|
73
|
+
attachment: ImageAttachmentRef;
|
|
74
|
+
/** Encoded request bytes. */
|
|
75
|
+
data: Uint8Array;
|
|
76
|
+
mediaType: ImageMediaType;
|
|
77
|
+
bytes: number;
|
|
78
|
+
width: number;
|
|
79
|
+
height: number;
|
|
80
|
+
/** Provider-compatible sample depth proven after request encoding. */
|
|
81
|
+
depth: 'uchar';
|
|
82
|
+
/** Provider-compatible color space proven after request encoding. */
|
|
83
|
+
space: 'srgb';
|
|
84
|
+
/** Whether the encoded request version retains an alpha channel. */
|
|
85
|
+
hasAlpha: boolean;
|
|
86
|
+
}
|
|
53
87
|
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-attachment",
|
|
3
3
|
"description": "Durable immutable attachment storage seam for the DeepSeek Harness",
|
|
4
|
-
"version": "0.1.1-rc.
|
|
4
|
+
"version": "0.1.1-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
],
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@deepseek-ai/dsh-brand": "^0.1.1-rc.
|
|
41
|
-
"@deepseek-ai/
|
|
42
|
-
"@deepseek-ai/
|
|
40
|
+
"@deepseek-ai/dsh-brand": "^0.1.1-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
42
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@deepseek-ai/dsh-brand": "^0.1.1-rc.
|
|
46
|
-
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.
|
|
45
|
+
"@deepseek-ai/dsh-brand": "^0.1.1-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
47
47
|
"@deepseek-ai/cordis": "^4.0.1"
|
|
48
48
|
}
|
|
49
49
|
}
|