@hiai-gg/docsmint 2.1.9 → 2.2.1

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/dist/types.d.ts CHANGED
@@ -344,11 +344,15 @@ export interface DocsAttachmentListResponse {
344
344
  items: DocsAttachment[];
345
345
  }
346
346
  export interface DocsAttachmentPresignInput {
347
+ /** Optional original-byte SHA-256 for WebP finalization. */
348
+ sourceSha256?: string;
347
349
  filename: string;
348
350
  contentType: string;
349
351
  size: number;
350
352
  }
351
353
  export interface DocsAttachmentPresignResponse {
354
+ /** A completed replay. Skip PUT and repeat confirmAttachment. */
355
+ alreadyConfirmed?: boolean;
352
356
  url: string;
353
357
  key: string;
354
358
  /** Signed, exact admission identity required by confirmAttachment. */
@@ -498,8 +502,8 @@ export interface DocsRequestContext {
498
502
  signal?: AbortSignal;
499
503
  /** Per-request timeout in milliseconds, overriding the client default. */
500
504
  timeoutMs?: number;
501
- /** Idempotency key forwarded as the standard Idempotency-Key header. */
502
- idempotencyKey?: string;
505
+ /** Idempotency key forwarded as a header. Null clears any inherited key. */
506
+ idempotencyKey?: string | null;
503
507
  }
504
508
  /** Additive page-based list filters. All filters are applied server-side. */
505
509
  export interface DocsListOptions {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hiai-gg/docsmint",
3
3
  "mcpName": "io.github.HiAi-gg/docsmint",
4
- "version": "2.1.9",
4
+ "version": "2.2.1",
5
5
  "type": "module",
6
6
  "browser": {
7
7
  "./dist/backend-launcher.js": false,
@@ -386,7 +386,8 @@
386
386
  "commander": "^15.0.0",
387
387
  "ioredis": "^6.0.0",
388
388
  "zod": "4.6.7",
389
- "happy-dom": "21.0.4"
389
+ "happy-dom": "21.0.4",
390
+ "sharp": "0.35.5"
390
391
  },
391
392
  "peerDependencies": {
392
393
  "drizzle-orm": "^0.45.2",
@@ -25,7 +25,7 @@ import { registerSearch } from './commands/search.js';
25
25
  import { registerSnapshot } from './commands/snapshot.js';
26
26
  import { registerUpdate } from './commands/update.js';
27
27
 
28
- const VERSION = '2.1.9';
28
+ const VERSION = '2.2.1';
29
29
 
30
30
  const program = new Command();
31
31
  program.name('docsmint').description('CLI for the DocsMint knowledge workspace').version(VERSION);
@@ -695,6 +695,41 @@ export const pendingAttachmentUploads = pgTable(
695
695
  // DB-authoritative intents for object removal and quota release. Source rows
696
696
  // are deleted in the same transaction that inserts an intent; S3 and quota
697
697
  // effects happen only after commit and remain recoverable across crashes.
698
+ export const attachmentUploadOperations = pgTable(
699
+ "attachment_upload_operations",
700
+ {
701
+ id: uuid("id").primaryKey().defaultRandom(),
702
+ workspaceId: text("workspace_id").notNull(),
703
+ actorUserId: uuid("actor_user_id")
704
+ .notNull()
705
+ .references(() => users.id, { onDelete: "cascade" }),
706
+ documentId: uuid("document_id")
707
+ .notNull()
708
+ .references(() => documents.id, { onDelete: "cascade" }),
709
+ idempotencyKey: text("idempotency_key").notNull(),
710
+ requestFingerprint: text("request_fingerprint").notNull(),
711
+ sourceSha256: text("source_sha256").notNull(),
712
+ storageKey: text("storage_key").notNull(),
713
+ expiresAt: timestamp("expires_at").notNull(),
714
+ createdAt: timestamp("created_at").defaultNow().notNull(),
715
+ },
716
+ (table) => [
717
+ uniqueIndex("attachment_upload_operations_actor_document_key_unique").on(
718
+ table.workspaceId,
719
+ table.actorUserId,
720
+ table.documentId,
721
+ table.idempotencyKey,
722
+ ),
723
+ uniqueIndex("attachment_upload_operations_storage_key_unique").on(
724
+ table.storageKey,
725
+ ),
726
+ ],
727
+ );
728
+
729
+ // DB-authoritative intents for object removal and quota release. Source rows
730
+ // are deleted in the same transaction that inserts an intent; S3 and quota
731
+ // effects happen only after commit and remain recoverable across crashes.
732
+
698
733
  export const attachmentStorageCleanupOutbox = pgTable(
699
734
  "attachment_storage_cleanup_outbox",
700
735
  {
package/server.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "id": "1249550690",
11
11
  "subfolder": "packages/mcp-server"
12
12
  },
13
- "version": "2.1.9",
13
+ "version": "2.2.1",
14
14
  "icons": [
15
15
  {
16
16
  "src": "https://raw.githubusercontent.com/HiAi-gg/docsmint/main/frontend/static/logo-dark.png",
@@ -34,7 +34,7 @@
34
34
  "registryType": "npm",
35
35
  "registryBaseUrl": "https://registry.npmjs.org",
36
36
  "identifier": "@hiai-gg/docsmint",
37
- "version": "2.1.9",
37
+ "version": "2.2.1",
38
38
  "runtimeHint": "npx",
39
39
  "transport": {
40
40
  "type": "stdio"