dsh-permission-rules 0.5.0 → 0.5.3

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
@@ -3280,18 +3280,20 @@ async function apply(ctx, config) {
3280
3280
  }
3281
3281
  /**
3282
3282
  * Whether a `@deepseek-ai/dsh-session` version line predates the
3283
- * `ignorable` envelope-marker surface: the `0.1.0-rc.6` line and earlier
3284
- * silently drop the marker from `Session.append` options, so audit events
3285
- * written by those builds land unmarked and break resume on stricter
3286
- * hosts. Non-matching (post-rc.6, stable, or unresolvable) versions are
3287
- * treated as possibly-marker-aware and verified by the append probe.
3283
+ * `ignorable` envelope-marker surface: the released `0.1.0-rc.1`–`0.1.0-rc.7`
3284
+ * lines silently drop the marker from `Session.append` options, so audit
3285
+ * events written by those builds land unmarked and break resume on
3286
+ * stricter hosts. `0.1.0-rc.8` and later stamp the marker. Extend the
3287
+ * bound if a future rc line regresses. Non-matching (later rc, stable, or
3288
+ * unresolvable) versions are treated as possibly-marker-aware and verified
3289
+ * by the append probe.
3288
3290
  * @param version - the installed peer version string.
3289
- * @returns true for the known-unmarked rc.1–rc.6 lines.
3291
+ * @returns true for the known-unmarked rc.1–rc.7 lines.
3290
3292
  */
3291
3293
  function isUnmarkedHostVersion(version) {
3292
3294
  const match = /^0\.1\.0-rc\.(\d+)$/.exec(version.trim());
3293
3295
  if (match === null) return false;
3294
- return Number(match[1]) <= 6;
3296
+ return Number(match[1]) <= 7;
3295
3297
  }
3296
3298
  /**
3297
3299
  * Identity candidates for the `agents` match dimension, derived from the
@@ -8,7 +8,7 @@
8
8
  * @module dsh-permission-rules/client/remote
9
9
  */
10
10
  import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
11
- import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.ts';
11
+ import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.js';
12
12
  declare module '@deepseek-ai/dsh-typert-protocol' {
13
13
  interface TypertRemoteNamespace$permissionRules {
14
14
  /** Read the network-policy snapshot (mode, counters, recent blocks, editable rule sources). */
@@ -9,8 +9,8 @@
9
9
  * @module dsh-permission-rules/client/section
10
10
  */
11
11
  import type { ReactElement } from 'react';
12
- import type { PermissionRulesLocaleKey } from './locales.ts';
13
- import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.ts';
12
+ import type { PermissionRulesLocaleKey } from './locales.js';
13
+ import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.js';
14
14
  /** Functions the registration injects (wired to the Remote namespace in `./index.ts`). */
15
15
  export interface PermissionRulesSectionInjected {
16
16
  /** Read the network-policy snapshot. */
@@ -6,9 +6,9 @@
6
6
  * @module dsh-permission-rules/config
7
7
  */
8
8
  import z from '@deepseek-ai/schemastery';
9
- import type { PatternMode } from './rules.ts';
10
- import type { NetworkMode, UnlistedAction } from './network.ts';
11
- import type { UiLanguage } from './prose.ts';
9
+ import type { PatternMode } from './rules.js';
10
+ import type { NetworkMode, UnlistedAction } from './network.js';
11
+ import type { UiLanguage } from './prose.js';
12
12
  /** What happens when a discovered rule file exists but cannot be parsed or compiled. */
13
13
  export type BadFilePolicy = 'fail' | 'ignore-with-warning';
14
14
  /** Which decisions are audit-logged: every call, or only rule hits. */
@@ -15,15 +15,15 @@
15
15
  * `name`/`inject`/`Config`/`apply`).
16
16
  * @module dsh-permission-rules
17
17
  */
18
- import { apply } from './runtime.ts';
18
+ import { apply } from './runtime.js';
19
19
  export declare const name = "permission-rules";
20
20
  export declare const inject: string[];
21
21
  export { apply };
22
- export { PermissionRulesRuntime, isUnmarkedHostVersion } from './runtime.ts';
23
- export * from './config.ts';
24
- export * from './events.ts';
25
- export * from './rules.ts';
26
- export * from './glob.ts';
27
- export * from './network.ts';
28
- export * from './proxy.ts';
22
+ export { PermissionRulesRuntime, isUnmarkedHostVersion } from './runtime.js';
23
+ export * from './config.js';
24
+ export * from './events.js';
25
+ export * from './rules.js';
26
+ export * from './glob.js';
27
+ export * from './network.js';
28
+ export * from './proxy.js';
29
29
  //# sourceMappingURL=index.d.ts.map
@@ -6,8 +6,8 @@
6
6
  * process state — unit-testable and replayable.
7
7
  * @module dsh-permission-rules/network
8
8
  */
9
- import type { CompiledRule, CompiledRuleset, NetworkTarget } from './rules.ts';
10
- import type { MatchContext } from './rules.ts';
9
+ import type { CompiledRule, CompiledRuleset, NetworkTarget } from './rules.js';
10
+ import type { MatchContext } from './rules.js';
11
11
  /** The three network policy modes. */
12
12
  export type NetworkMode = 'deny-all' | 'whitelist' | 'allow-all';
13
13
  /** Closed mode list for runtime normalization of untrusted values. */
@@ -15,8 +15,8 @@
15
15
  * @module dsh-permission-rules/proxy
16
16
  */
17
17
  import type { CallId } from '@deepseek-ai/dsh-llm';
18
- import type { NetworkDecision, NetworkMode } from './network.ts';
19
- import type { NetworkTarget, SchemeName } from './rules.ts';
18
+ import type { NetworkDecision, NetworkMode } from './network.js';
19
+ import type { NetworkTarget, SchemeName } from './rules.js';
20
20
  /** Proxy environment variable names the injector sets/restores (uppercase + lowercase for mixed-ecosystem CLIs). */
21
21
  export declare const PROXY_ENV_NAMES: readonly string[];
22
22
  /** NO_PROXY names cleared (or preserved) by the injector. */
@@ -9,8 +9,8 @@
9
9
  */
10
10
  import type { Context } from '@deepseek-ai/cordis';
11
11
  import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
12
- import type { PermissionRulesRuntime } from './runtime.ts';
13
- import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from './wire.ts';
12
+ import type { PermissionRulesRuntime } from './runtime.js';
13
+ import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from './wire.js';
14
14
  declare module '@deepseek-ai/cordis' {
15
15
  interface Context {
16
16
  /** Settings-page snapshot + rule-editor bridge (this package). */
@@ -13,11 +13,11 @@
13
13
  import type { Context } from '@deepseek-ai/cordis';
14
14
  import type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands';
15
15
  import type { PreToolDecision, ToolExecution } from '@deepseek-ai/dsh-tools';
16
- import type { Config, ResolvedConfig } from './config.ts';
17
- import type { CompiledRuleset, RuleHit } from './rules.ts';
18
- import type { NetworkMode } from './network.ts';
19
- import type { NetworkBlockRecord } from './proxy.ts';
20
- import type { DecisionOutcome } from './events.ts';
16
+ import type { Config, ResolvedConfig } from './config.js';
17
+ import type { CompiledRuleset, RuleHit } from './rules.js';
18
+ import type { NetworkMode } from './network.js';
19
+ import type { NetworkBlockRecord } from './proxy.js';
20
+ import type { DecisionOutcome } from './events.js';
21
21
  export declare const name = "permission-rules";
22
22
  /** Services required before the plugin mounts. */
23
23
  export declare const inject: string[];
@@ -381,13 +381,15 @@ export declare class PermissionRulesRuntime {
381
381
  export declare function apply(ctx: Context, config: Config): Promise<void>;
382
382
  /**
383
383
  * Whether a `@deepseek-ai/dsh-session` version line predates the
384
- * `ignorable` envelope-marker surface: the `0.1.0-rc.6` line and earlier
385
- * silently drop the marker from `Session.append` options, so audit events
386
- * written by those builds land unmarked and break resume on stricter
387
- * hosts. Non-matching (post-rc.6, stable, or unresolvable) versions are
388
- * treated as possibly-marker-aware and verified by the append probe.
384
+ * `ignorable` envelope-marker surface: the released `0.1.0-rc.1`–`0.1.0-rc.7`
385
+ * lines silently drop the marker from `Session.append` options, so audit
386
+ * events written by those builds land unmarked and break resume on
387
+ * stricter hosts. `0.1.0-rc.8` and later stamp the marker. Extend the
388
+ * bound if a future rc line regresses. Non-matching (later rc, stable, or
389
+ * unresolvable) versions are treated as possibly-marker-aware and verified
390
+ * by the append probe.
389
391
  * @param version - the installed peer version string.
390
- * @returns true for the known-unmarked rc.1–rc.6 lines.
392
+ * @returns true for the known-unmarked rc.1–rc.7 lines.
391
393
  */
392
394
  export declare function isUnmarkedHostVersion(version: string): boolean;
393
395
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"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,mHAAmH;IACnH,OAAO,CAAC,aAAa;IAMrB,gFAAgF;IAChF,OAAO,CAAC,gBAAgB;IAiBxB,8FAA8F;IAC9F,OAAO,CAAC,cAAc;IAmBtB;;;;;;OAMG;IACH,uBAAuB,IAAI,IAAI;IAa/B,0EAA0E;IAC1E,OAAO,CAAC,iBAAiB;IAUzB,+EAA+E;IAC/E,OAAO,CAAC,WAAW;IAmCnB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,cAAc;IAetB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAyC5B,qHAAqH;IACrH,OAAO,CAAC,kBAAkB;IAU1B,8FAA8F;IAC9F,OAAO,CAAC,aAAa;IAarB;;;;;;OAMG;IACH,OAAO,CAAC,WAAW;IAYnB,4DAA4D;IAC5D,kBAAkB,IAAI,MAAM;IAI5B,sEAAsE;IACtE,kBAAkB,IAAI,MAAM;IAI5B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAevB;AAED;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BvE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI9D"}
@@ -13,8 +13,8 @@
13
13
  * @module dsh-permission-rules/settings
14
14
  */
15
15
  import type { Context } from '@deepseek-ai/cordis';
16
- import type { Config as PluginConfig } from './config.ts';
17
- import type { PermissionRulesRuntime } from './runtime.ts';
16
+ import type { Config as PluginConfig } from './config.js';
17
+ import type { PermissionRulesRuntime } from './runtime.js';
18
18
  /** The settings namespace this plugin owns (kebab-case, per the provider contract). */
19
19
  export declare const SETTINGS_NAMESPACE = "permission-rules";
20
20
  /**
package/package.json CHANGED
@@ -1,178 +1,183 @@
1
- {
2
- "name": "dsh-permission-rules",
3
- "version": "0.5.0",
4
- "description": "Declarative Claude Code-style permission rules plus a Codex-style process-level network policy for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), workspace-path, and network-target (domain/ip/port/scheme) matching on the tools/pre-execute waterfall, a built-in local HTTP/CONNECT proxy governing shell subprocess traffic, three network modes mapped onto the official sandbox presets, full session-log audit, HMR rule reload, and a settings page with a rule editor, block counters, and recent interception lists.",
5
- "private": false,
6
- "type": "module",
7
- "main": "./lib/index.js",
8
- "types": "./lib/types/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./lib/types/index.d.ts",
12
- "default": "./lib/index.js"
13
- },
14
- "./typert": {
15
- "types": "./lib/types/typert.host.d.ts",
16
- "default": "./lib/typert.host.js"
17
- },
18
- "./client": {
19
- "types": "./lib/types/client/index.d.ts",
20
- "default": "./lib/client.js"
21
- },
22
- "./package.json": "./package.json"
23
- },
24
- "files": [
25
- "lib",
26
- "src",
27
- "cordis.patch.yml",
28
- "docs",
29
- "scripts/repair-session-logs.mjs",
30
- "README.md",
31
- "README.zh.md",
32
- "README.es.md",
33
- "README.pt.md",
34
- "README.hi.md",
35
- "CHANGELOG.md",
36
- "LICENSE"
37
- ],
38
- "sideEffects": false,
39
- "dsh": {
40
- "bundle": {
41
- "patch": "./cordis.patch.yml"
42
- },
43
- "client": {
44
- "platform": "web",
45
- "inject": [
46
- "@deepseek-ai/dsh-client-connection",
47
- "@deepseek-ai/dsh-client-runtime",
48
- "@deepseek-ai/dsh-client-locale",
49
- "@deepseek-ai/dsh-client-ui-settings"
50
- ]
51
- }
52
- },
53
- "dshWorkshop": {
54
- "schema": "omdsh-workshop-package/v1",
55
- "type": "plugin",
56
- "integration": {
57
- "protocol": "harness-profile",
58
- "artifact": "cordis.patch.yml"
59
- },
60
- "install": {
61
- "mode": "transactional",
62
- "adapter": "profile-bundle",
63
- "failurePolicy": "generation-rollback",
64
- "touchesCurrentBeforeActivation": false
65
- },
66
- "lifecycle": {
67
- "activation": "restart-profile",
68
- "dispose": "supported"
69
- },
70
- "permissions": [
71
- "files:read",
72
- "files:watch",
73
- "files:write",
74
- "session:append",
75
- "network:outbound"
76
- ],
77
- "compatibility": {
78
- "dshVersions": [
79
- "0.1.0-rc.5",
80
- "0.1.0-rc.6"
81
- ]
82
- },
83
- "capability": {
84
- "id": "rules",
85
- "kind": "command",
86
- "invocation": "/rules",
87
- "expected": "lists the active permission rules with their source files"
88
- },
89
- "evidence": {
90
- "install": null,
91
- "failureIsolation": null,
92
- "hotReload": null,
93
- "remove": null
94
- }
95
- },
96
- "keywords": [
97
- "dsh",
98
- "dsh-plugin",
99
- "deepseek-harness",
100
- "permission",
101
- "policy",
102
- "allow-deny-ask",
103
- "approval",
104
- "safety",
105
- "network",
106
- "network-policy",
107
- "proxy"
108
- ],
109
- "author": "dsh-permission-rules contributors",
110
- "repository": {
111
- "type": "git",
112
- "url": "git+https://github.com/PerryLink/dsh-permission-rules.git"
113
- },
114
- "homepage": "https://github.com/PerryLink/dsh-permission-rules#readme",
115
- "bugs": {
116
- "url": "https://github.com/PerryLink/dsh-permission-rules/issues"
117
- },
118
- "engines": {
119
- "node": "^22.19.0 || >=24.0.0"
120
- },
121
- "peerDependencies": {
122
- "@deepseek-ai/cordis": "^4.0.1",
123
- "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
124
- "@deepseek-ai/dsh-commands": "0.1.0-rc.6",
125
- "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
126
- "@deepseek-ai/dsh-session": "0.1.0-rc.6",
127
- "@deepseek-ai/dsh-tools": "0.1.0-rc.6",
128
- "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
129
- "@deepseek-ai/schemastery": "^3.18.0",
130
- "react": "^18.2.0"
131
- },
132
- "dependencies": {
133
- "@types/react": "18.3.31",
134
- "chokidar": "^5.0.0",
135
- "tsdown": "^0.22.14",
136
- "typescript": "^5.9.0",
137
- "yaml": "^2.8.0",
138
- "zod": "^4.4.3"
139
- },
140
- "devDependencies": {
141
- "@deepseek-ai/cordis": "^4.0.1",
142
- "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
143
- "@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
144
- "@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
145
- "@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
146
- "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
147
- "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
148
- "@deepseek-ai/dsh-commands": "0.1.0-rc.6",
149
- "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
150
- "@deepseek-ai/dsh-session": "0.1.0-rc.6",
151
- "@deepseek-ai/dsh-subagent": "0.1.0-rc.6",
152
- "@deepseek-ai/dsh-tools": "0.1.0-rc.6",
153
- "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
154
- "@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
155
- "@deepseek-ai/schemastery": "^3.18.0",
156
- "@eslint/js": "^10.0.1",
157
- "@types/node": "^22.19.0",
158
- "@vitest/coverage-v8": "^3.2.0",
159
- "dsh-auto-review": "file:vendor/dsh-auto-review-0.4.0.tgz",
160
- "eslint": "^10.8.1",
161
- "globals": "^17.11.0",
162
- "react": "18.3.1",
163
- "react-dom": "18.3.1",
164
- "typescript-eslint": "^8.67.0",
165
- "vitest": "^3.2.0"
166
- },
167
- "scripts": {
168
- "build": "node scripts/prepare.mjs",
169
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
170
- "lint": "eslint src test scripts",
171
- "test": "vitest run",
172
- "test:coverage": "vitest run --coverage",
173
- "pack:check": "node scripts/prepare.mjs && pnpm pack",
174
- "prepare": "node scripts/prepare.mjs"
175
- },
176
- "packageManager": "pnpm@11.7.0",
177
- "license": "Apache-2.0"
178
- }
1
+ {
2
+ "name": "dsh-permission-rules",
3
+ "version": "0.5.3",
4
+ "description": "Declarative Claude Code-style permission rules plus a Codex-style process-level network policy for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), workspace-path, and network-target (domain/ip/port/scheme) matching on the tools/pre-execute waterfall, a built-in local HTTP/CONNECT proxy governing shell subprocess traffic, three network modes mapped onto the official sandbox presets, full session-log audit, HMR rule reload, and a settings page with a rule editor, block counters, and recent interception lists.",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "./lib/index.js",
8
+ "types": "./lib/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/types/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./typert": {
15
+ "types": "./lib/types/typert.host.d.ts",
16
+ "default": "./lib/typert.host.js"
17
+ },
18
+ "./client": {
19
+ "types": "./lib/types/client/index.d.ts",
20
+ "default": "./lib/client.js"
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
24
+ "files": [
25
+ "lib",
26
+ "src",
27
+ "cordis.patch.yml",
28
+ "docs",
29
+ "scripts/repair-session-logs.mjs",
30
+ "README.md",
31
+ "README.zh.md",
32
+ "README.es.md",
33
+ "README.pt.md",
34
+ "README.hi.md",
35
+ "CHANGELOG.md",
36
+ "LICENSE"
37
+ ],
38
+ "sideEffects": false,
39
+ "dsh": {
40
+ "bundle": {
41
+ "patch": "./cordis.patch.yml"
42
+ },
43
+ "client": {
44
+ "platform": "web",
45
+ "inject": [
46
+ "@deepseek-ai/dsh-client-connection",
47
+ "@deepseek-ai/dsh-client-runtime",
48
+ "@deepseek-ai/dsh-client-locale",
49
+ "@deepseek-ai/dsh-client-ui-settings"
50
+ ]
51
+ }
52
+ },
53
+ "dshWorkshop": {
54
+ "schema": "omdsh-workshop-package/v1",
55
+ "type": "plugin",
56
+ "integration": {
57
+ "protocol": "harness-profile",
58
+ "artifact": "cordis.patch.yml"
59
+ },
60
+ "install": {
61
+ "mode": "transactional",
62
+ "adapter": "profile-bundle",
63
+ "failurePolicy": "generation-rollback",
64
+ "touchesCurrentBeforeActivation": false
65
+ },
66
+ "lifecycle": {
67
+ "activation": "restart-profile",
68
+ "dispose": "supported"
69
+ },
70
+ "permissions": [
71
+ "files:read",
72
+ "files:watch",
73
+ "files:write",
74
+ "session:append",
75
+ "network:outbound"
76
+ ],
77
+ "compatibility": {
78
+ "dshVersions": [
79
+ "0.1.0-rc.5",
80
+ "0.1.0-rc.7",
81
+ "0.1.0-rc.7",
82
+ "0.1.0-rc.8"
83
+ ]
84
+ },
85
+ "capability": {
86
+ "id": "rules",
87
+ "kind": "command",
88
+ "invocation": "/rules",
89
+ "expected": "lists the active permission rules with their source files"
90
+ },
91
+ "evidence": {
92
+ "install": null,
93
+ "failureIsolation": null,
94
+ "hotReload": null,
95
+ "remove": null
96
+ }
97
+ },
98
+ "keywords": [
99
+ "dsh",
100
+ "dsh-plugin",
101
+ "deepseek-harness",
102
+ "permission",
103
+ "policy",
104
+ "allow-deny-ask",
105
+ "approval",
106
+ "safety",
107
+ "network",
108
+ "network-policy",
109
+ "proxy"
110
+ ],
111
+ "author": "dsh-permission-rules contributors",
112
+ "repository": {
113
+ "type": "git",
114
+ "url": "git+https://github.com/PerryLink/dsh-permission-rules.git"
115
+ },
116
+ "homepage": "https://github.com/PerryLink/dsh-permission-rules#readme",
117
+ "bugs": {
118
+ "url": "https://github.com/PerryLink/dsh-permission-rules/issues"
119
+ },
120
+ "engines": {
121
+ "node": "^22.19.0 || >=24.0.0"
122
+ },
123
+ "peerDependencies": {
124
+ "@deepseek-ai/cordis": "^4.0.1",
125
+ "@deepseek-ai/dsh-agent": ">=0.1.0-rc.8 <0.2.0",
126
+ "@deepseek-ai/dsh-commands": ">=0.1.0-rc.8 <0.2.0",
127
+ "@deepseek-ai/dsh-llm": ">=0.1.0-rc.8 <0.2.0",
128
+ "@deepseek-ai/dsh-session": ">=0.1.0-rc.8 <0.2.0",
129
+ "@deepseek-ai/dsh-tools": ">=0.1.0-rc.8 <0.2.0",
130
+ "@deepseek-ai/dsh-typert-protocol": ">=0.1.0-rc.8 <0.2.0",
131
+ "@deepseek-ai/schemastery": "^3.18.0",
132
+ "react": "^18.2.0"
133
+ },
134
+ "dependencies": {
135
+ "@types/react": "18.3.31",
136
+ "chokidar": "^5.0.0",
137
+ "tsdown": "^0.22.14",
138
+ "typescript": "^5.9.0",
139
+ "yaml": "^2.8.0",
140
+ "zod": "^4.4.3"
141
+ },
142
+ "devDependencies": {
143
+ "@deepseek-ai/cordis": "^4.0.1",
144
+ "@deepseek-ai/cordis-plugin-loader": "1.0.2",
145
+ "@deepseek-ai/dsh-agent": "0.1.0-rc.8",
146
+ "@deepseek-ai/dsh-client-connection": "0.1.0-rc.8",
147
+ "@deepseek-ai/dsh-client-locale": "0.1.0-rc.8",
148
+ "@deepseek-ai/dsh-client-runtime": "0.1.0-rc.8",
149
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.8",
150
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.8",
151
+ "@deepseek-ai/dsh-commands": "0.1.0-rc.8",
152
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.8",
153
+ "@deepseek-ai/dsh-session": "0.1.0-rc.8",
154
+ "@deepseek-ai/dsh-subagent": "0.1.0-rc.8",
155
+ "@deepseek-ai/dsh-tools": "0.1.0-rc.8",
156
+ "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.8",
157
+ "@deepseek-ai/dsh-user-approval": "0.1.0-rc.8",
158
+ "@deepseek-ai/schemastery": "^3.18.0",
159
+ "@eslint/js": "^10.0.1",
160
+ "@types/node": "^22.19.0",
161
+ "@vitest/coverage-v8": "^3.2.0",
162
+ "dsh-auto-review": "file:vendor/dsh-auto-review-0.5.2.tgz",
163
+ "eslint": "^10.8.1",
164
+ "globals": "^17.11.0",
165
+ "react": "18.3.1",
166
+ "react-dom": "18.3.1",
167
+ "typescript-eslint": "^8.67.0",
168
+ "vitest": "^3.2.0"
169
+ },
170
+ "scripts": {
171
+ "build": "node scripts/prepare.mjs",
172
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
173
+ "lint": "eslint src test scripts",
174
+ "test": "vitest run",
175
+ "test:coverage": "vitest run --coverage",
176
+ "check:readmes": "node scripts/check-readme-sync.mjs",
177
+ "verify:self-contained": "node scripts/verify-self-contained.mjs",
178
+ "pack:check": "node scripts/prepare.mjs && pnpm pack",
179
+ "prepare": "node scripts/prepare.mjs"
180
+ },
181
+ "packageManager": "pnpm@11.7.0",
182
+ "license": "Apache-2.0"
183
+ }
@@ -24,8 +24,10 @@
24
24
  *
25
25
  * `--home` defaults to `$env:DSH_HOME/sessions` or `~/.dsh/sessions`.
26
26
  * The default target set is the log-only audit vocabulary owned by the
27
- * dsh-permission-rules / dsh-auto-review plugins; only types you understand
28
- * to be reconstruction-safe may be added via `--types`.
27
+ * dsh-permission-rules / dsh-auto-review plugins (all five `autoReview/*`
28
+ * event types — `state`, `verdict`, `circuit`, `override`, `rejection`);
29
+ * only types you understand to be reconstruction-safe may be added via
30
+ * `--types`.
29
31
  */
30
32
 
31
33
  import { constants, zstdCompressSync, zstdDecompressSync } from 'node:zlib'
@@ -40,6 +42,9 @@ const DEFAULT_TARGET_TYPES = [
40
42
  'permissionRules/decision',
41
43
  'autoReview/verdict',
42
44
  'autoReview/state',
45
+ 'autoReview/circuit',
46
+ 'autoReview/override',
47
+ 'autoReview/rejection',
43
48
  ]
44
49
 
45
50
  /** Row types that are storage records, never session events (leave untouched). */
@@ -32,7 +32,7 @@ export const inject = ['slots', 'locale', 'remote']
32
32
 
33
33
  /** The locale registry face (structural; the real `ctx.locale` satisfies it). */
34
34
  interface LocaleLike {
35
- register(namespace: string, dictionaries: { en: Record<string, string>; zh: Record<string, string> }): void
35
+ register(namespace: string, dictionaries: { en: Record<string, string>; zh: Record<string, string> }): () => void
36
36
  bind(namespace: string): (key: PermissionRulesLocaleKey, vars?: Record<string, string | number>) => string
37
37
  }
38
38
 
@@ -58,10 +58,10 @@ export async function apply(ctx: Context): Promise<void> {
58
58
  const slots = ctx.get('slots') as SlotsLike | undefined
59
59
  if (locale === undefined || remote === undefined || slots === undefined) return
60
60
 
61
- ctx.effect(() => {
62
- locale.register(NS, { zh, en })
63
- return () => {}
64
- })
61
+ // locale.register returns the only unregister disposer and throws on a
62
+ // duplicate namespace: ride this fiber's effect so unload/reload cycles
63
+ // can re-register the dictionaries.
64
+ ctx.effect(() => locale.register(NS, { zh, en }), 'dsh-permission-rules: dictionaries')
65
65
 
66
66
  // $mount registers the 'remote.permissionRules' namespace service and owns
67
67
  // its removal for this fiber's lifetime.