@deepseek-ai/dsh-storage 0.1.2-alpha.4 → 0.1.2-alpha.5

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.
@@ -56,6 +56,16 @@ export interface KvUnitDescriptor {
56
56
  * foreign documents.
57
57
  */
58
58
  readonly layout?: 'single' | 'per-record';
59
+ /**
60
+ * Older unit versions whose stored records are also readable under the
61
+ * declaring owner's current record schemas (the owner vouches for that —
62
+ * typically by declaring the fields old records lack as optional). Reads of
63
+ * a `per-record` unit accept documents stamped with any listed version, and
64
+ * the legacy whole-unit bootstrap accepts a legacy file stamped with one;
65
+ * writes always stamp {@link version}. `single`-layout reads stay
66
+ * exact-version.
67
+ */
68
+ readonly compatibleVersions?: readonly number[];
59
69
  }
60
70
  /**
61
71
  * One opened unit. Values are opaque JSON to this layer: no schema, no
@@ -93,6 +103,18 @@ export interface KvUnit {
93
103
  * @returns resolution after durability.
94
104
  */
95
105
  deleteRecord(table: string, key: string): Promise<void>;
106
+ /**
107
+ * Move one record's stored document out of the unit's readable set,
108
+ * preserving its bytes for inspection instead of deleting them. Backends
109
+ * whose medium has no per-record document to move (the `single` layout, a
110
+ * row store) omit this member, and the caller falls back to its
111
+ * reject-loud path. Absent after the move: a later {@link loadAll} reads
112
+ * the key as missing and a later {@link putRecord} recreates it fresh.
113
+ * @param table - Declared table name.
114
+ * @param key - Record key.
115
+ * @returns the medium location the document was moved to (diagnostics).
116
+ */
117
+ backupRecord?(table: string, key: string): Promise<string>;
96
118
  /**
97
119
  * Write the global singleton durably. Only valid when the descriptor
98
120
  * declared `hasGlobal`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-storage",
3
3
  "description": "Storage hub (ctx.storage): named backend registry plus mounted data-form facilities for the DeepSeek Harness",
4
- "version": "0.1.2-alpha.4",
4
+ "version": "0.1.2-alpha.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },