@lmzhen/dsh-evolution-approval 0.3.65 → 0.3.67
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 +2 -2
- package/lib/types/index.d.ts +0 -9
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import z from "@deepseek-ai/schemastery";
|
|
|
22
22
|
function effectiveSessionPolicy(ctx, session) {
|
|
23
23
|
const approval = ctx.get("approval");
|
|
24
24
|
if (!approval || session === void 0) return void 0;
|
|
25
|
-
return approval.overrideOf(session) ?? approval.config
|
|
25
|
+
return approval.overrideOf(session) ?? approval.config?.policy ?? "ask";
|
|
26
26
|
}
|
|
27
27
|
var EvolutionApproval = class extends Service {
|
|
28
28
|
static inject = ["evolutionState"];
|
|
@@ -105,7 +105,7 @@ var EvolutionApproval = class extends Service {
|
|
|
105
105
|
id: randomUUID(),
|
|
106
106
|
kind: input.kind,
|
|
107
107
|
summary,
|
|
108
|
-
args: input.args,
|
|
108
|
+
args: input.args === void 0 ? {} : input.args,
|
|
109
109
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
110
110
|
status: "pending",
|
|
111
111
|
origin: input.origin,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -82,15 +82,6 @@ export type ApprovalLike = {
|
|
|
82
82
|
message: string;
|
|
83
83
|
}>;
|
|
84
84
|
};
|
|
85
|
-
/** 0.3.23 (G4.8): the ONE shape of the platform approval-policy probe that
|
|
86
|
-
* `effectiveSessionPolicy` reads. The model tools used to copy this view
|
|
87
|
-
* locally (F-341). */
|
|
88
|
-
export interface ApprovalPolicyLike {
|
|
89
|
-
overrideOf(session: unknown): 'ask' | 'never' | undefined;
|
|
90
|
-
config: {
|
|
91
|
-
policy?: 'ask' | 'never';
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
85
|
/** The requesting session's effective policy (override ?? configured default);
|
|
95
86
|
* undefined when the approval service is not mounted or no session is
|
|
96
87
|
* available — callers keep their previous behavior. Single source (G4.8,
|
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.
|
|
4
|
+
"version": "0.3.67",
|
|
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.
|
|
39
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
38
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.67",
|
|
39
|
+
"@lmzhen/dsh-evolution-state": "^0.3.67"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
43
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.3.
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
45
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-io-node": "^0.3.
|
|
47
|
-
"@lmzhen/dsh-evolution-state-json": "^0.3.
|
|
43
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.67",
|
|
44
|
+
"@lmzhen/dsh-evolution-state": "^0.3.67",
|
|
45
|
+
"@lmzhen/dsh-evolution-io": "^0.3.67",
|
|
46
|
+
"@lmzhen/dsh-evolution-io-node": "^0.3.67",
|
|
47
|
+
"@lmzhen/dsh-evolution-state-json": "^0.3.67"
|
|
48
48
|
}
|
|
49
49
|
}
|