@lmzhen/dsh-evolution-approval 0.3.18 → 0.3.20

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/README.md CHANGED
@@ -4,8 +4,10 @@ Stage/pending approval service for Hermes-style self-evolution writes.
4
4
 
5
5
  DSH native approval is one-shot; this service adds the Hermes staged queue:
6
6
  `request()` stores background writes, `approve()` replays them through a runner,
7
- and `reject()` discards them. The core evolution plugin registers memory/skill
8
- runners when both plugins are composed.
7
+ and `reject()` discards them. The model-facing write tools register their own
8
+ runners `tool-memory` via `registerRunner('memory', …)` and
9
+ `tool-skill-manage` via `registerRunner('skill', …)` — so staged writes are
10
+ replayable only when the corresponding tool package is composed.
9
11
 
10
12
  Run the companion invariant and tests:
11
13
 
@@ -40,6 +40,33 @@ export interface ApprovalDecision {
40
40
  pendingId?: string;
41
41
  message: string;
42
42
  }
43
+ /** 0.3.19 (W1.2): the ONE consumer-facing shape of the approval seam. Every
44
+ * package that probes `ctx.get('evolutionApproval')` imports this instead of
45
+ * declaring a local sub-interface (previously 5 duplicated local views that
46
+ * drifted — the learning-graph one omitted isEnabled, commands' used a wider
47
+ * status union). Optional members stay optional: capabilities that need the
48
+ * fail-closed distinction read `isEnabled`, others may ignore it. */
49
+ export type ApprovalLike = {
50
+ request(input: ApprovalRequest): Promise<ApprovalDecision>;
51
+ run(kind: PendingKind, args: unknown, intent?: {
52
+ interface: 'background_review';
53
+ }): Promise<{
54
+ ok: boolean;
55
+ message: string;
56
+ }>;
57
+ hasRunner(kind: PendingKind): boolean;
58
+ isEnabled?: boolean;
59
+ registerRunner(kind: PendingKind, runner: WriteRunner): () => void;
60
+ list(status?: PendingStatus): Promise<PendingRecord[]>;
61
+ approve(id: string): Promise<{
62
+ ok: boolean;
63
+ message: string;
64
+ }>;
65
+ reject(id: string): Promise<{
66
+ ok: boolean;
67
+ message: string;
68
+ }>;
69
+ };
43
70
  declare module '@deepseek-ai/cordis' {
44
71
  interface Context {
45
72
  evolutionApproval: EvolutionApproval;
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.18",
4
+ "version": "0.3.20",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -37,15 +37,15 @@
37
37
  "peerDependencies": {
38
38
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
39
39
  "@deepseek-ai/cordis": "^4.0.1",
40
- "@lmzhen/dsh-evolution-state-storage": "^0.3.18",
41
- "@lmzhen/dsh-evolution-state": "^0.3.18"
40
+ "@lmzhen/dsh-evolution-state-storage": "^0.3.20",
41
+ "@lmzhen/dsh-evolution-state": "^0.3.20"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
45
- "@lmzhen/dsh-evolution-state-storage": "^0.3.18",
46
- "@lmzhen/dsh-evolution-state": "^0.3.18",
47
- "@lmzhen/dsh-evolution-io": "^0.3.18",
48
- "@lmzhen/dsh-evolution-io-node": "^0.3.18",
49
- "@lmzhen/dsh-evolution-state-json": "^0.3.18"
45
+ "@lmzhen/dsh-evolution-state-storage": "^0.3.20",
46
+ "@lmzhen/dsh-evolution-state": "^0.3.20",
47
+ "@lmzhen/dsh-evolution-io": "^0.3.20",
48
+ "@lmzhen/dsh-evolution-io-node": "^0.3.20",
49
+ "@lmzhen/dsh-evolution-state-json": "^0.3.20"
50
50
  }
51
51
  }