@lmzhen/dsh-evolution-state-domain 0.1.0-rc.63 → 0.1.0-rc.64

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.
Files changed (2) hide show
  1. package/lib/index.js +7 -5
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { defineDomain, domainTable } from "@deepseek-ai/dsh-storage-domain";
2
+ import { DomainError, defineDomain, domainTable } from "@deepseek-ai/dsh-storage-domain";
3
3
  //#region lib/types/index.js
4
4
  /**
5
5
  * storage-domain provider for evolution state.
@@ -126,8 +126,9 @@ function apply(ctx) {
126
126
  return slot.record;
127
127
  });
128
128
  return slot.record;
129
- } catch {
130
- return null;
129
+ } catch (error) {
130
+ if (error instanceof DomainError && error.code === "missing-key") return null;
131
+ throw error;
131
132
  }
132
133
  },
133
134
  async releasePendingClaim(id, claimId) {
@@ -162,11 +163,12 @@ function apply(ctx) {
162
163
  record: resolved.record,
163
164
  applied: true
164
165
  };
165
- } catch {
166
- return {
166
+ } catch (error) {
167
+ if (error instanceof DomainError && error.code === "missing-key") return {
167
168
  record: null,
168
169
  applied: false
169
170
  };
171
+ throw error;
170
172
  }
171
173
  }
172
174
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-state-domain",
3
3
  "description": "storage-domain provider for evolution state (community build)",
4
- "version": "0.1.0-rc.63",
4
+ "version": "0.1.0-rc.64",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -38,11 +38,11 @@
38
38
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
39
39
  "@deepseek-ai/cordis": "^4.0.1",
40
40
  "@deepseek-ai/dsh-storage-domain": "^0.1.1-rc.2",
41
- "@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.63"
41
+ "@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.64"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
45
45
  "@deepseek-ai/dsh-storage-domain": "^0.1.1-rc.2",
46
- "@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.63"
46
+ "@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.64"
47
47
  }
48
48
  }