dsh-permission-rules 0.5.0 → 0.5.2
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/CHANGELOG.md +17 -0
- package/README.es.md +139 -118
- package/README.hi.md +141 -120
- package/README.md +111 -90
- package/README.pt.md +140 -119
- package/README.zh.md +158 -137
- package/docs/rule-test-vectors/README.md +28 -0
- package/docs/rule-test-vectors/corpus.json +109 -0
- package/lib/client.js +4 -7
- package/lib/client.js.map +1 -1
- package/lib/index.js +10 -7
- package/lib/types/client/remote.d.ts +1 -1
- package/lib/types/client/section.d.ts +2 -2
- package/lib/types/config.d.ts +3 -3
- package/lib/types/index.d.ts +8 -8
- package/lib/types/network.d.ts +2 -2
- package/lib/types/proxy.d.ts +2 -2
- package/lib/types/remote-service.d.ts +2 -2
- package/lib/types/runtime.d.ts +14 -11
- package/lib/types/runtime.d.ts.map +1 -1
- package/lib/types/settings.d.ts +2 -2
- package/package.json +182 -178
- package/scripts/repair-session-logs.mjs +7 -2
- package/src/client/index.ts +5 -5
- package/src/runtime.ts +10 -7
package/lib/index.js
CHANGED
|
@@ -3280,18 +3280,21 @@ 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:
|
|
3284
|
-
* silently
|
|
3285
|
-
*
|
|
3286
|
-
*
|
|
3287
|
-
*
|
|
3283
|
+
* `ignorable` envelope-marker surface: every released rc line through
|
|
3284
|
+
* `0.1.0-rc.7` silently drops the marker from `Session.append` options
|
|
3285
|
+
* (the stamping fix exists on harness master only — no release carries it
|
|
3286
|
+
* yet), so audit events written by those builds land unmarked and break
|
|
3287
|
+
* resume on stricter hosts. Extend the bound when a new rc line ships that
|
|
3288
|
+
* still drops the marker. Non-matching (later rc, stable, or unresolvable)
|
|
3289
|
+
* versions are treated as possibly-marker-aware and verified by the
|
|
3290
|
+
* append probe.
|
|
3288
3291
|
* @param version - the installed peer version string.
|
|
3289
|
-
* @returns true for the known-unmarked rc.1–rc.
|
|
3292
|
+
* @returns true for the known-unmarked rc.1–rc.7 lines.
|
|
3290
3293
|
*/
|
|
3291
3294
|
function isUnmarkedHostVersion(version) {
|
|
3292
3295
|
const match = /^0\.1\.0-rc\.(\d+)$/.exec(version.trim());
|
|
3293
3296
|
if (match === null) return false;
|
|
3294
|
-
return Number(match[1]) <=
|
|
3297
|
+
return Number(match[1]) <= 7;
|
|
3295
3298
|
}
|
|
3296
3299
|
/**
|
|
3297
3300
|
* 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.
|
|
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.
|
|
13
|
-
import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.
|
|
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. */
|
package/lib/types/config.d.ts
CHANGED
|
@@ -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.
|
|
10
|
-
import type { NetworkMode, UnlistedAction } from './network.
|
|
11
|
-
import type { UiLanguage } from './prose.
|
|
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. */
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
* `name`/`inject`/`Config`/`apply`).
|
|
16
16
|
* @module dsh-permission-rules
|
|
17
17
|
*/
|
|
18
|
-
import { apply } from './runtime.
|
|
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.
|
|
23
|
-
export * from './config.
|
|
24
|
-
export * from './events.
|
|
25
|
-
export * from './rules.
|
|
26
|
-
export * from './glob.
|
|
27
|
-
export * from './network.
|
|
28
|
-
export * from './proxy.
|
|
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
|
package/lib/types/network.d.ts
CHANGED
|
@@ -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.
|
|
10
|
-
import type { MatchContext } from './rules.
|
|
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. */
|
package/lib/types/proxy.d.ts
CHANGED
|
@@ -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.
|
|
19
|
-
import type { NetworkTarget, SchemeName } from './rules.
|
|
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.
|
|
13
|
-
import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from './wire.
|
|
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). */
|
package/lib/types/runtime.d.ts
CHANGED
|
@@ -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.
|
|
17
|
-
import type { CompiledRuleset, RuleHit } from './rules.
|
|
18
|
-
import type { NetworkMode } from './network.
|
|
19
|
-
import type { NetworkBlockRecord } from './proxy.
|
|
20
|
-
import type { DecisionOutcome } from './events.
|
|
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,16 @@ 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:
|
|
385
|
-
* silently
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
384
|
+
* `ignorable` envelope-marker surface: every released rc line through
|
|
385
|
+
* `0.1.0-rc.7` silently drops the marker from `Session.append` options
|
|
386
|
+
* (the stamping fix exists on harness master only — no release carries it
|
|
387
|
+
* yet), so audit events written by those builds land unmarked and break
|
|
388
|
+
* resume on stricter hosts. Extend the bound when a new rc line ships that
|
|
389
|
+
* still drops the marker. Non-matching (later rc, stable, or unresolvable)
|
|
390
|
+
* versions are treated as possibly-marker-aware and verified by the
|
|
391
|
+
* append probe.
|
|
389
392
|
* @param version - the installed peer version string.
|
|
390
|
-
* @returns true for the known-unmarked rc.1–rc.
|
|
393
|
+
* @returns true for the known-unmarked rc.1–rc.7 lines.
|
|
391
394
|
*/
|
|
392
395
|
export declare function isUnmarkedHostVersion(version: string): boolean;
|
|
393
396
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE5E,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEzD,OAAO,KAAK,EAAkB,eAAe,EAA+B,OAAO,EAAE,MAAM,YAAY,CAAA;AAIvG,OAAO,KAAK,EAAiC,WAAW,EAAE,MAAM,cAAc,CAAA;AAE9E,OAAO,KAAK,EAAE,kBAAkB,EAAoB,MAAM,YAAY,CAAA;AAItE,OAAO,KAAK,EAAiD,eAAe,EAAE,MAAM,aAAa,CAAA;AAEjG,eAAO,MAAM,IAAI,qBAAqB,CAAA;AAEtC,kDAAkD;AAClD,eAAO,MAAM,MAAM,UAAwB,CAAA;AAE3C,iDAAiD;AACjD,UAAU,WAAW;IACnB,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,wFAAwF;IACxF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;IAClC,iGAAiG;IACjG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,MA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ASnB,0FAA0F;IAC1F,OAAO,CAAC,qBAAqB;IAM7B;;;;;;;;;OASG;IACH,OAAO,CAAC,UAAU,EAAE,iBAAiB,GAAG,aAAa;IA4DrD;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,WAAW;IA0DnB,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;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI9D"}
|
package/lib/types/settings.d.ts
CHANGED
|
@@ -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.
|
|
17
|
-
import type { PermissionRulesRuntime } from './runtime.
|
|
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,182 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-permission-rules",
|
|
3
|
-
"version": "0.5.
|
|
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.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"dsh
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"network
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"@deepseek-ai/
|
|
124
|
-
"@deepseek-ai/dsh-
|
|
125
|
-
"@deepseek-ai/dsh-
|
|
126
|
-
"@deepseek-ai/dsh-
|
|
127
|
-
"@deepseek-ai/dsh-
|
|
128
|
-
"@deepseek-ai/dsh-
|
|
129
|
-
"@deepseek-ai/
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"@deepseek-ai/
|
|
143
|
-
"@deepseek-ai/
|
|
144
|
-
"@deepseek-ai/dsh-
|
|
145
|
-
"@deepseek-ai/dsh-client-
|
|
146
|
-
"@deepseek-ai/dsh-client-
|
|
147
|
-
"@deepseek-ai/dsh-client-
|
|
148
|
-
"@deepseek-ai/dsh-
|
|
149
|
-
"@deepseek-ai/dsh-
|
|
150
|
-
"@deepseek-ai/dsh-
|
|
151
|
-
"@deepseek-ai/dsh-
|
|
152
|
-
"@deepseek-ai/dsh-
|
|
153
|
-
"@deepseek-ai/dsh-
|
|
154
|
-
"@deepseek-ai/dsh-
|
|
155
|
-
"@deepseek-ai/
|
|
156
|
-
"@
|
|
157
|
-
"@
|
|
158
|
-
"@
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-permission-rules",
|
|
3
|
+
"version": "0.5.2",
|
|
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
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"capability": {
|
|
85
|
+
"id": "rules",
|
|
86
|
+
"kind": "command",
|
|
87
|
+
"invocation": "/rules",
|
|
88
|
+
"expected": "lists the active permission rules with their source files"
|
|
89
|
+
},
|
|
90
|
+
"evidence": {
|
|
91
|
+
"install": null,
|
|
92
|
+
"failureIsolation": null,
|
|
93
|
+
"hotReload": null,
|
|
94
|
+
"remove": null
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"keywords": [
|
|
98
|
+
"dsh",
|
|
99
|
+
"dsh-plugin",
|
|
100
|
+
"deepseek-harness",
|
|
101
|
+
"permission",
|
|
102
|
+
"policy",
|
|
103
|
+
"allow-deny-ask",
|
|
104
|
+
"approval",
|
|
105
|
+
"safety",
|
|
106
|
+
"network",
|
|
107
|
+
"network-policy",
|
|
108
|
+
"proxy"
|
|
109
|
+
],
|
|
110
|
+
"author": "dsh-permission-rules contributors",
|
|
111
|
+
"repository": {
|
|
112
|
+
"type": "git",
|
|
113
|
+
"url": "git+https://github.com/PerryLink/dsh-permission-rules.git"
|
|
114
|
+
},
|
|
115
|
+
"homepage": "https://github.com/PerryLink/dsh-permission-rules#readme",
|
|
116
|
+
"bugs": {
|
|
117
|
+
"url": "https://github.com/PerryLink/dsh-permission-rules/issues"
|
|
118
|
+
},
|
|
119
|
+
"engines": {
|
|
120
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
121
|
+
},
|
|
122
|
+
"peerDependencies": {
|
|
123
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
124
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.7",
|
|
125
|
+
"@deepseek-ai/dsh-commands": "0.1.0-rc.7",
|
|
126
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.7",
|
|
127
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.7",
|
|
128
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.7",
|
|
129
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.7",
|
|
130
|
+
"@deepseek-ai/schemastery": "^3.18.0",
|
|
131
|
+
"react": "^18.2.0"
|
|
132
|
+
},
|
|
133
|
+
"dependencies": {
|
|
134
|
+
"@types/react": "18.3.31",
|
|
135
|
+
"chokidar": "^5.0.0",
|
|
136
|
+
"tsdown": "^0.22.14",
|
|
137
|
+
"typescript": "^5.9.0",
|
|
138
|
+
"yaml": "^2.8.0",
|
|
139
|
+
"zod": "^4.4.3"
|
|
140
|
+
},
|
|
141
|
+
"devDependencies": {
|
|
142
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
143
|
+
"@deepseek-ai/cordis-plugin-loader": "1.0.2",
|
|
144
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.7",
|
|
145
|
+
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.7",
|
|
146
|
+
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.7",
|
|
147
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.7",
|
|
148
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.7",
|
|
149
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.7",
|
|
150
|
+
"@deepseek-ai/dsh-commands": "0.1.0-rc.7",
|
|
151
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.7",
|
|
152
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.7",
|
|
153
|
+
"@deepseek-ai/dsh-subagent": "0.1.0-rc.7",
|
|
154
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.7",
|
|
155
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.7",
|
|
156
|
+
"@deepseek-ai/dsh-user-approval": "0.1.0-rc.7",
|
|
157
|
+
"@deepseek-ai/schemastery": "^3.18.0",
|
|
158
|
+
"@eslint/js": "^10.0.1",
|
|
159
|
+
"@types/node": "^22.19.0",
|
|
160
|
+
"@vitest/coverage-v8": "^3.2.0",
|
|
161
|
+
"dsh-auto-review": "file:vendor/dsh-auto-review-0.5.1.tgz",
|
|
162
|
+
"eslint": "^10.8.1",
|
|
163
|
+
"globals": "^17.11.0",
|
|
164
|
+
"react": "18.3.1",
|
|
165
|
+
"react-dom": "18.3.1",
|
|
166
|
+
"typescript-eslint": "^8.67.0",
|
|
167
|
+
"vitest": "^3.2.0"
|
|
168
|
+
},
|
|
169
|
+
"scripts": {
|
|
170
|
+
"build": "node scripts/prepare.mjs",
|
|
171
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
172
|
+
"lint": "eslint src test scripts",
|
|
173
|
+
"test": "vitest run",
|
|
174
|
+
"test:coverage": "vitest run --coverage",
|
|
175
|
+
"check:readmes": "node scripts/check-readme-sync.mjs",
|
|
176
|
+
"verify:self-contained": "node scripts/verify-self-contained.mjs",
|
|
177
|
+
"pack:check": "node scripts/prepare.mjs && pnpm pack",
|
|
178
|
+
"prepare": "node scripts/prepare.mjs"
|
|
179
|
+
},
|
|
180
|
+
"packageManager": "pnpm@11.7.0",
|
|
181
|
+
"license": "Apache-2.0"
|
|
182
|
+
}
|
|
@@ -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
|
|
28
|
-
*
|
|
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). */
|
package/src/client/index.ts
CHANGED
|
@@ -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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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.
|