@lmzhen/dsh-evolution-approval 0.1.0-rc.22 → 0.1.0-rc.24
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 +4 -0
- package/lib/types/index.d.ts +9 -0
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -57,6 +57,10 @@ var EvolutionApproval = class extends Service {
|
|
|
57
57
|
action: "allow",
|
|
58
58
|
message: "Approval disabled."
|
|
59
59
|
};
|
|
60
|
+
if (input.sessionPolicy === "never") return {
|
|
61
|
+
action: "allow",
|
|
62
|
+
message: "Session approval policy is \"never\"; write allowed without staging."
|
|
63
|
+
};
|
|
60
64
|
if (input.origin === "background_review" || this.stageForeground) {
|
|
61
65
|
const record = {
|
|
62
66
|
id: randomUUID(),
|
package/lib/types/index.d.ts
CHANGED
|
@@ -22,6 +22,15 @@ export interface ApprovalRequest {
|
|
|
22
22
|
summary: string;
|
|
23
23
|
args: unknown;
|
|
24
24
|
origin: 'foreground' | 'background_review';
|
|
25
|
+
/**
|
|
26
|
+
* The requesting session's effective approval policy (platform vocabulary:
|
|
27
|
+
* 'ask' | 'never' — see `dsh-user-approval`). When 'never', the session has
|
|
28
|
+
* declared the deterministic unattended stance (CI, cron, automated runs),
|
|
29
|
+
* so the write is allowed instead of staging an unanswerable pending record
|
|
30
|
+
* (claw alignment: "skip approval for non-interactive contexts"). Absent
|
|
31
|
+
* (no session / no approval service) keeps the previous behavior.
|
|
32
|
+
*/
|
|
33
|
+
sessionPolicy?: 'ask' | 'never';
|
|
25
34
|
}
|
|
26
35
|
export interface ApprovalDecision {
|
|
27
36
|
action: 'allow' | 'staged';
|
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.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.24",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.
|
|
41
|
-
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.
|
|
40
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.24",
|
|
41
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.24"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
45
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.
|
|
46
|
-
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.
|
|
47
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
48
|
-
"@lmzhen/dsh-evolution-io-node": "^0.1.0-rc.
|
|
49
|
-
"@lmzhen/dsh-evolution-state-json": "^0.1.0-rc.
|
|
45
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.1.0-rc.24",
|
|
46
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.24",
|
|
47
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.24",
|
|
48
|
+
"@lmzhen/dsh-evolution-io-node": "^0.1.0-rc.24",
|
|
49
|
+
"@lmzhen/dsh-evolution-state-json": "^0.1.0-rc.24"
|
|
50
50
|
}
|
|
51
51
|
}
|