@lmzhen/dsh-evolution-approval 0.3.36 → 0.3.38

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/lib/index.js CHANGED
@@ -155,16 +155,20 @@ var EvolutionApproval = class extends Service {
155
155
  }
156
156
  /**
157
157
  * 0.3.17 (S3.1): platform-side session policy derivation — the platform's
158
- * approval service (`overrideOf`) is the authority; a caller's self-reported
159
- * sessionPolicy is a fallback only without it (E-22). The mount check is
160
- * lazy: the platform service can start before or after this plugin.
158
+ * approval service (`overrideOf`) is the authority; a deployment-level
159
+ * `config.policy` is the fallback (V6-27, 0.3.37: the deploy default used to
160
+ * be ignored here, so a `policy: 'never'` deployment still staged writes for
161
+ * sessions without an override — same chain as the exported
162
+ * `effectiveSessionPolicy`, overrideOf ?? config.policy ?? 'ask'). The mount
163
+ * check is lazy: the platform service can start before or after this plugin.
161
164
  */
162
165
  deriveSessionPolicy(sessionId) {
163
166
  if (!sessionId) return void 0;
164
167
  const platformApproval = this.ctx.get("approval");
165
168
  if (!platformApproval) return void 0;
166
- const override = platformApproval.overrideOf?.(sessionId);
167
- return override === "never" || override === "ask" ? override : void 0;
169
+ const override = platformApproval.overrideOf(sessionId);
170
+ if (override === "never" || override === "ask") return override;
171
+ return platformApproval.config?.policy ?? "ask";
168
172
  }
169
173
  dedupe(id, task) {
170
174
  const existing = this.inFlight.get(id);
@@ -140,9 +140,12 @@ export declare class EvolutionApproval extends Service {
140
140
  }>;
141
141
  /**
142
142
  * 0.3.17 (S3.1): platform-side session policy derivation — the platform's
143
- * approval service (`overrideOf`) is the authority; a caller's self-reported
144
- * sessionPolicy is a fallback only without it (E-22). The mount check is
145
- * lazy: the platform service can start before or after this plugin.
143
+ * approval service (`overrideOf`) is the authority; a deployment-level
144
+ * `config.policy` is the fallback (V6-27, 0.3.37: the deploy default used to
145
+ * be ignored here, so a `policy: 'never'` deployment still staged writes for
146
+ * sessions without an override — same chain as the exported
147
+ * `effectiveSessionPolicy`, overrideOf ?? config.policy ?? 'ask'). The mount
148
+ * check is lazy: the platform service can start before or after this plugin.
146
149
  */
147
150
  private deriveSessionPolicy;
148
151
  private dedupe;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-approval",
3
3
  "description": "Stage/pending approval service for Hermes-style self-evolution writes (community build)",
4
- "version": "0.3.36",
4
+ "version": "0.3.38",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -35,15 +35,15 @@
35
35
  "peerDependencies": {
36
36
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
37
37
  "@deepseek-ai/cordis": "^4.0.1",
38
- "@lmzhen/dsh-evolution-state-storage": "^0.3.36",
39
- "@lmzhen/dsh-evolution-state": "^0.3.36"
38
+ "@lmzhen/dsh-evolution-state-storage": "^0.3.38",
39
+ "@lmzhen/dsh-evolution-state": "^0.3.38"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
43
- "@lmzhen/dsh-evolution-state-storage": "^0.3.36",
44
- "@lmzhen/dsh-evolution-state": "^0.3.36",
45
- "@lmzhen/dsh-evolution-io": "^0.3.36",
46
- "@lmzhen/dsh-evolution-io-node": "^0.3.36",
47
- "@lmzhen/dsh-evolution-state-json": "^0.3.36"
43
+ "@lmzhen/dsh-evolution-state-storage": "^0.3.38",
44
+ "@lmzhen/dsh-evolution-state": "^0.3.38",
45
+ "@lmzhen/dsh-evolution-io": "^0.3.38",
46
+ "@lmzhen/dsh-evolution-io-node": "^0.3.38",
47
+ "@lmzhen/dsh-evolution-state-json": "^0.3.38"
48
48
  }
49
49
  }