dsh-permission-rules 0.4.2 → 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 +34 -0
- package/README.es.md +160 -117
- package/README.hi.md +162 -119
- package/README.md +133 -90
- package/README.pt.md +161 -118
- package/README.zh.md +162 -119
- package/docs/rule-test-vectors/README.md +28 -0
- package/docs/rule-test-vectors/corpus.json +109 -0
- package/lib/client.js +4693 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1530 -179
- package/lib/typert.host.js +4305 -0
- package/lib/types/client/index.d.ts +28 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +9 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/remote.d.ts +181 -0
- package/lib/types/client/remote.d.ts.map +1 -0
- package/lib/types/client/section.d.ts +35 -0
- package/lib/types/client/section.d.ts.map +1 -0
- package/lib/types/config.d.ts +54 -2
- package/lib/types/config.d.ts.map +1 -1
- package/lib/types/events.d.ts +45 -0
- package/lib/types/events.d.ts.map +1 -1
- package/lib/types/index.d.ts +8 -6
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/network.d.ts +90 -0
- package/lib/types/network.d.ts.map +1 -0
- package/lib/types/prose.d.ts +15 -0
- package/lib/types/prose.d.ts.map +1 -1
- package/lib/types/proxy.d.ts +128 -0
- package/lib/types/proxy.d.ts.map +1 -0
- package/lib/types/remote-service.d.ts +45 -0
- package/lib/types/remote-service.d.ts.map +1 -0
- package/lib/types/rules.d.ts +131 -0
- package/lib/types/rules.d.ts.map +1 -1
- package/lib/types/runtime.d.ts +153 -21
- package/lib/types/runtime.d.ts.map +1 -1
- package/lib/types/settings.d.ts +28 -0
- package/lib/types/settings.d.ts.map +1 -0
- package/lib/types/typert.host.d.ts +166 -0
- package/lib/types/typert.host.d.ts.map +1 -0
- package/lib/types/wire.d.ts +421 -0
- package/lib/types/wire.d.ts.map +1 -0
- package/package.json +182 -144
- package/scripts/repair-session-logs.mjs +7 -2
- package/src/client/index.ts +111 -0
- package/src/client/locales.ts +94 -0
- package/src/client/remote.ts +41 -0
- package/src/client/section.ts +201 -0
- package/src/config.ts +111 -0
- package/src/events.ts +46 -0
- package/src/index.ts +2 -0
- package/src/network.ts +177 -0
- package/src/prose.ts +85 -10
- package/src/proxy.ts +327 -0
- package/src/remote-service.ts +109 -0
- package/src/rules.ts +424 -5
- package/src/runtime.ts +464 -53
- package/src/settings.ts +74 -0
- package/src/typert.host.ts +25 -0
- package/src/wire.ts +239 -0
- package/lib/types/config.js +0 -99
- package/lib/types/config.js.map +0 -1
- package/lib/types/events.js +0 -44
- package/lib/types/events.js.map +0 -1
- package/lib/types/glob.js +0 -307
- package/lib/types/glob.js.map +0 -1
- package/lib/types/index.js +0 -27
- package/lib/types/index.js.map +0 -1
- package/lib/types/prose.js +0 -173
- package/lib/types/prose.js.map +0 -1
- package/lib/types/rules.js +0 -610
- package/lib/types/rules.js.map +0 -1
- package/lib/types/runtime.js +0 -818
- package/lib/types/runtime.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dsh-permission-rules`, browser half: mounts the `permissionRules`
|
|
3
|
+
* Remote contribution, then registers the "Permission Rules" settings
|
|
4
|
+
* page (`settings.section`, id `permission-rules`) with the network-policy
|
|
5
|
+
* summary, block counters, the recent interception list, and the rule
|
|
6
|
+
* editor. All data arrives through the `remote.permissionRules`
|
|
7
|
+
* namespace — the page issues no other RPC.
|
|
8
|
+
*
|
|
9
|
+
* The slot and remote services are accessed structurally (through
|
|
10
|
+
* `ctx.get`/`ctx.inject`) so this bundle compiles against the published
|
|
11
|
+
* rc.6 client peers without hard value imports beyond the platform
|
|
12
|
+
* modules.
|
|
13
|
+
* @module dsh-permission-rules/client
|
|
14
|
+
*/
|
|
15
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
16
|
+
/** Dictionary namespace owned by this plugin. */
|
|
17
|
+
export declare const NS = "settings.permissionRules";
|
|
18
|
+
/** Plugin name: matches the package name, the graph row id, and the bundle id. */
|
|
19
|
+
export declare const name = "dsh-permission-rules";
|
|
20
|
+
/** Services the page reads; `remote.permissionRules` appears once this plugin mounts its contribution. */
|
|
21
|
+
export declare const inject: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Browser plugin body: dictionaries, the Remote contribution mount, and
|
|
24
|
+
* the settings-section registration.
|
|
25
|
+
* @param ctx - client root context.
|
|
26
|
+
*/
|
|
27
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAQlD,iDAAiD;AACjD,eAAO,MAAM,EAAE,6BAA6B,CAAA;AAE5C,kFAAkF;AAClF,eAAO,MAAM,IAAI,yBAAyB,CAAA;AAE1C,0GAA0G;AAC1G,eAAO,MAAM,MAAM,UAAgC,CAAA;AAmBnD;;;;GAIG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDvD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings-page copy for `dsh-permission-rules`, `en`/`zh` (the two UI
|
|
3
|
+
* language codes the harness locale registry accepts today).
|
|
4
|
+
* @module dsh-permission-rules/client/locales
|
|
5
|
+
*/
|
|
6
|
+
export type PermissionRulesLocaleKey = 'nav' | 'policyTitle' | 'mode' | 'preset' | 'configured' | 'proxy' | 'proxyActive' | 'proxyInactive' | 'proxyDisabled' | 'counters' | 'denied' | 'askBlocked' | 'recentTitle' | 'noBlocks' | 'blockBy' | 'blockDefault' | 'blockUnattributed' | 'editorTitle' | 'editorPath' | 'editorLoad' | 'editorSave' | 'editorReload' | 'editorEmpty' | 'editorSaved' | 'editorFailed' | 'editorUntitled' | 'unknown';
|
|
7
|
+
export declare const en: Record<PermissionRulesLocaleKey, string>;
|
|
8
|
+
export declare const zh: Record<PermissionRulesLocaleKey, string>;
|
|
9
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,wBAAwB,GAChC,KAAK,GACL,aAAa,GACb,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,OAAO,GACP,aAAa,GACb,eAAe,GACf,eAAe,GACf,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,aAAa,GACb,UAAU,GACV,SAAS,GACT,cAAc,GACd,mBAAmB,GACnB,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,aAAa,GACb,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,SAAS,CAAA;AAEb,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,CA4BvD,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,CA4BvD,CAAA"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The client-side Remote face of the `permissionRules` namespace: the
|
|
3
|
+
* hand-written `TypertRemoteContribution` mounted through
|
|
4
|
+
* `ctx.remote.$mount`, plus the declaration merging that types
|
|
5
|
+
* `ctx.remote.permissionRules`. The descriptor list is shared with the
|
|
6
|
+
* host `./typert` manifest (`../wire.ts`), so the two faces can never
|
|
7
|
+
* drift.
|
|
8
|
+
* @module dsh-permission-rules/client/remote
|
|
9
|
+
*/
|
|
10
|
+
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
11
|
+
import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.js';
|
|
12
|
+
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
13
|
+
interface TypertRemoteNamespace$permissionRules {
|
|
14
|
+
/** Read the network-policy snapshot (mode, counters, recent blocks, editable rule sources). */
|
|
15
|
+
networkStatus: () => Promise<RemoteResult<PermissionRulesSnapshot>>;
|
|
16
|
+
/** Read one known rule file for the editor. */
|
|
17
|
+
rulesRead: (path: string) => Promise<RemoteResult<RulesReadResult>>;
|
|
18
|
+
/** Validate and write one known rule file. */
|
|
19
|
+
rulesSave: (path: string, text: string) => Promise<RemoteResult<RulesSaveResult>>;
|
|
20
|
+
/** Re-read every cached workspace chain. */
|
|
21
|
+
reload: () => Promise<RemoteResult<RulesReloadResult>>;
|
|
22
|
+
}
|
|
23
|
+
interface TypertRemoteMap {
|
|
24
|
+
'permissionRules/networkStatus': () => Promise<RemoteResult<PermissionRulesSnapshot>>;
|
|
25
|
+
'permissionRules/rulesRead': (path: string) => Promise<RemoteResult<RulesReadResult>>;
|
|
26
|
+
'permissionRules/rulesSave': (path: string, text: string) => Promise<RemoteResult<RulesSaveResult>>;
|
|
27
|
+
'permissionRules/reload': () => Promise<RemoteResult<RulesReloadResult>>;
|
|
28
|
+
}
|
|
29
|
+
interface TypertRemoteNamespaceMap {
|
|
30
|
+
permissionRules: TypertRemoteNamespace$permissionRules;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** The client Remote contribution for the `permissionRules` namespace. */
|
|
34
|
+
export declare const PERMISSION_RULES_REMOTE: Readonly<{
|
|
35
|
+
package: string;
|
|
36
|
+
descriptors: readonly (Readonly<{
|
|
37
|
+
readonly id: "dsh-permission-rules#permissionRules/networkStatus";
|
|
38
|
+
readonly service: "permissionRules";
|
|
39
|
+
readonly namespace: "permissionRules";
|
|
40
|
+
readonly method: "networkStatus";
|
|
41
|
+
readonly invocation: Readonly<{
|
|
42
|
+
kind: "direct";
|
|
43
|
+
}>;
|
|
44
|
+
readonly parameters: readonly never[];
|
|
45
|
+
readonly result: Readonly<{
|
|
46
|
+
mode: "strict";
|
|
47
|
+
typeSymbol: "dsh-permission-rules/types#PermissionRulesSnapshot";
|
|
48
|
+
schema: import("zod").ZodObject<{
|
|
49
|
+
enabled: import("zod").ZodBoolean;
|
|
50
|
+
mode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, import("zod").ZodLiteral<"allow-all">]>;
|
|
51
|
+
configuredMode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"auto">, import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, import("zod").ZodLiteral<"allow-all">]>;
|
|
52
|
+
sandboxMode: import("zod").ZodNullable<import("zod").ZodString>;
|
|
53
|
+
proxyPort: import("zod").ZodNumber;
|
|
54
|
+
proxyActive: import("zod").ZodBoolean;
|
|
55
|
+
denied: import("zod").ZodNumber;
|
|
56
|
+
askBlocked: import("zod").ZodNumber;
|
|
57
|
+
recent: import("zod").ZodArray<import("zod").ZodObject<{
|
|
58
|
+
time: import("zod").ZodNumber;
|
|
59
|
+
tool: import("zod").ZodString;
|
|
60
|
+
attributed: import("zod").ZodBoolean;
|
|
61
|
+
domain: import("zod").ZodString;
|
|
62
|
+
scheme: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"http">, import("zod").ZodLiteral<"https">, import("zod").ZodNull]>;
|
|
63
|
+
port: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
64
|
+
action: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny">, import("zod").ZodLiteral<"ask">]>;
|
|
65
|
+
mode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, import("zod").ZodLiteral<"allow-all">]>;
|
|
66
|
+
matched: import("zod").ZodBoolean;
|
|
67
|
+
source: import("zod").ZodString;
|
|
68
|
+
ruleIndex: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
69
|
+
reason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
70
|
+
}, import("zod/v4/core").$strip>>;
|
|
71
|
+
sources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
72
|
+
path: import("zod").ZodString;
|
|
73
|
+
exists: import("zod").ZodBoolean;
|
|
74
|
+
cwd: import("zod").ZodNullable<import("zod").ZodString>;
|
|
75
|
+
}, import("zod/v4/core").$strip>>;
|
|
76
|
+
}, import("zod/v4/core").$strip>;
|
|
77
|
+
}>;
|
|
78
|
+
readonly sourceLocation: Readonly<{
|
|
79
|
+
file: "src/wire.ts";
|
|
80
|
+
line: 1;
|
|
81
|
+
column: 1;
|
|
82
|
+
}>;
|
|
83
|
+
}> | Readonly<{
|
|
84
|
+
readonly id: "dsh-permission-rules#permissionRules/rulesRead";
|
|
85
|
+
readonly service: "permissionRules";
|
|
86
|
+
readonly namespace: "permissionRules";
|
|
87
|
+
readonly method: "rulesRead";
|
|
88
|
+
readonly invocation: Readonly<{
|
|
89
|
+
kind: "direct";
|
|
90
|
+
}>;
|
|
91
|
+
readonly parameters: readonly Readonly<{
|
|
92
|
+
name: string;
|
|
93
|
+
wire: string;
|
|
94
|
+
source: "json";
|
|
95
|
+
codec: Readonly<{
|
|
96
|
+
mode: "strict";
|
|
97
|
+
typeSymbol: "dsh-permission-rules/types#RulesReadRequestPath";
|
|
98
|
+
schema: import("zod").ZodString;
|
|
99
|
+
}>;
|
|
100
|
+
}>[];
|
|
101
|
+
readonly result: Readonly<{
|
|
102
|
+
mode: "strict";
|
|
103
|
+
typeSymbol: "dsh-permission-rules/types#RulesReadResult";
|
|
104
|
+
schema: import("zod").ZodObject<{
|
|
105
|
+
path: import("zod").ZodString;
|
|
106
|
+
exists: import("zod").ZodBoolean;
|
|
107
|
+
text: import("zod").ZodString;
|
|
108
|
+
error: import("zod").ZodNullable<import("zod").ZodString>;
|
|
109
|
+
}, import("zod/v4/core").$strip>;
|
|
110
|
+
}>;
|
|
111
|
+
readonly sourceLocation: Readonly<{
|
|
112
|
+
file: "src/wire.ts";
|
|
113
|
+
line: 1;
|
|
114
|
+
column: 1;
|
|
115
|
+
}>;
|
|
116
|
+
}> | Readonly<{
|
|
117
|
+
readonly id: "dsh-permission-rules#permissionRules/rulesSave";
|
|
118
|
+
readonly service: "permissionRules";
|
|
119
|
+
readonly namespace: "permissionRules";
|
|
120
|
+
readonly method: "rulesSave";
|
|
121
|
+
readonly invocation: Readonly<{
|
|
122
|
+
kind: "direct";
|
|
123
|
+
}>;
|
|
124
|
+
readonly parameters: readonly (Readonly<{
|
|
125
|
+
name: string;
|
|
126
|
+
wire: string;
|
|
127
|
+
source: "json";
|
|
128
|
+
codec: Readonly<{
|
|
129
|
+
mode: "strict";
|
|
130
|
+
typeSymbol: "dsh-permission-rules/types#RulesSaveRequestPath";
|
|
131
|
+
schema: import("zod").ZodString;
|
|
132
|
+
}>;
|
|
133
|
+
}> | Readonly<{
|
|
134
|
+
name: string;
|
|
135
|
+
wire: string;
|
|
136
|
+
source: "json";
|
|
137
|
+
codec: Readonly<{
|
|
138
|
+
mode: "strict";
|
|
139
|
+
typeSymbol: "dsh-permission-rules/types#RulesSaveRequestText";
|
|
140
|
+
schema: import("zod").ZodString;
|
|
141
|
+
}>;
|
|
142
|
+
}>)[];
|
|
143
|
+
readonly result: Readonly<{
|
|
144
|
+
mode: "strict";
|
|
145
|
+
typeSymbol: "dsh-permission-rules/types#RulesSaveResult";
|
|
146
|
+
schema: import("zod").ZodObject<{
|
|
147
|
+
ok: import("zod").ZodBoolean;
|
|
148
|
+
error: import("zod").ZodNullable<import("zod").ZodString>;
|
|
149
|
+
reloaded: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
150
|
+
}, import("zod/v4/core").$strip>;
|
|
151
|
+
}>;
|
|
152
|
+
readonly sourceLocation: Readonly<{
|
|
153
|
+
file: "src/wire.ts";
|
|
154
|
+
line: 1;
|
|
155
|
+
column: 1;
|
|
156
|
+
}>;
|
|
157
|
+
}> | Readonly<{
|
|
158
|
+
readonly id: "dsh-permission-rules#permissionRules/reload";
|
|
159
|
+
readonly service: "permissionRules";
|
|
160
|
+
readonly namespace: "permissionRules";
|
|
161
|
+
readonly method: "reload";
|
|
162
|
+
readonly invocation: Readonly<{
|
|
163
|
+
kind: "direct";
|
|
164
|
+
}>;
|
|
165
|
+
readonly parameters: readonly never[];
|
|
166
|
+
readonly result: Readonly<{
|
|
167
|
+
mode: "strict";
|
|
168
|
+
typeSymbol: "dsh-permission-rules/types#RulesReloadResult";
|
|
169
|
+
schema: import("zod").ZodObject<{
|
|
170
|
+
ok: import("zod").ZodBoolean;
|
|
171
|
+
error: import("zod").ZodNullable<import("zod").ZodString>;
|
|
172
|
+
}, import("zod/v4/core").$strip>;
|
|
173
|
+
}>;
|
|
174
|
+
readonly sourceLocation: Readonly<{
|
|
175
|
+
file: "src/wire.ts";
|
|
176
|
+
line: 1;
|
|
177
|
+
column: 1;
|
|
178
|
+
}>;
|
|
179
|
+
}>)[];
|
|
180
|
+
}>;
|
|
181
|
+
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../src/client/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAA4B,MAAM,kCAAkC,CAAA;AAE9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE9G,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,qCAAqC;QAC7C,+FAA+F;QAC/F,aAAa,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC,CAAA;QACnE,+CAA+C;QAC/C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAA;QACnE,8CAA8C;QAC9C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAA;QACjF,4CAA4C;QAC5C,MAAM,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAA;KACvD;IACD,UAAU,eAAe;QACvB,+BAA+B,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC,CAAA;QACrF,2BAA2B,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAA;QACrF,2BAA2B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAA;QACnG,wBAAwB,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAA;KACzE;IACD,UAAU,wBAAwB;QAChC,eAAe,EAAE,qCAAqC,CAAA;KACvD;CACF;AAED,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Permission Rules" settings page: network-policy summary (mode
|
|
3
|
+
* mapping, proxy liveness), block counters, the recent interception list
|
|
4
|
+
* (source tool + target domain), and the rule editor over known rule
|
|
5
|
+
* sources. All data arrives through the `permissionRules` Remote
|
|
6
|
+
* namespace; the page holds no state beyond the selected file and the
|
|
7
|
+
* draft text. Written with `React.createElement` only — the client
|
|
8
|
+
* bundle is plain JavaScript.
|
|
9
|
+
* @module dsh-permission-rules/client/section
|
|
10
|
+
*/
|
|
11
|
+
import type { ReactElement } from 'react';
|
|
12
|
+
import type { PermissionRulesLocaleKey } from './locales.js';
|
|
13
|
+
import type { PermissionRulesSnapshot, RulesReadResult, RulesReloadResult, RulesSaveResult } from '../wire.js';
|
|
14
|
+
/** Functions the registration injects (wired to the Remote namespace in `./index.ts`). */
|
|
15
|
+
export interface PermissionRulesSectionInjected {
|
|
16
|
+
/** Read the network-policy snapshot. */
|
|
17
|
+
status: () => Promise<PermissionRulesSnapshot>;
|
|
18
|
+
/** Read one known rule file. */
|
|
19
|
+
rulesRead: (path: string) => Promise<RulesReadResult>;
|
|
20
|
+
/** Validate and write one known rule file. */
|
|
21
|
+
rulesSave: (path: string, text: string) => Promise<RulesSaveResult>;
|
|
22
|
+
/** Re-read every cached workspace chain. */
|
|
23
|
+
reload: () => Promise<RulesReloadResult>;
|
|
24
|
+
/** The locale-bound translator. */
|
|
25
|
+
t: T;
|
|
26
|
+
}
|
|
27
|
+
/** One bound dictionary. */
|
|
28
|
+
export type T = (key: PermissionRulesLocaleKey, vars?: Record<string, string | number>) => string;
|
|
29
|
+
/** The shell supplies `close`; everything else arrives through the slot injection. */
|
|
30
|
+
export type PermissionRulesSectionProps = PermissionRulesSectionInjected & {
|
|
31
|
+
close: () => void;
|
|
32
|
+
};
|
|
33
|
+
/** The settings section component. */
|
|
34
|
+
export declare function PermissionRulesSection({ close, t, ...injected }: PermissionRulesSectionProps): ReactElement;
|
|
35
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../src/client/section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE9G,0FAA0F;AAC1F,MAAM,WAAW,8BAA8B;IAC7C,wCAAwC;IACxC,MAAM,EAAE,MAAM,OAAO,CAAC,uBAAuB,CAAC,CAAA;IAC9C,gCAAgC;IAChC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;IACrD,8CAA8C;IAC9C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;IACnE,4CAA4C;IAC5C,MAAM,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;IACxC,mCAAmC;IACnC,CAAC,EAAE,CAAC,CAAA;CACL;AAED,4BAA4B;AAC5B,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,wBAAwB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAA;AAEjG,sFAAsF;AACtF,MAAM,MAAM,2BAA2B,GAAG,8BAA8B,GAAG;IACzE,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAmBD,sCAAsC;AACtC,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE,EAAE,2BAA2B,GAAG,YAAY,CAgJ3G"}
|
package/lib/types/config.d.ts
CHANGED
|
@@ -6,12 +6,48 @@
|
|
|
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 {
|
|
9
|
+
import type { PatternMode } from './rules.js';
|
|
10
|
+
import type { NetworkMode, UnlistedAction } from './network.js';
|
|
11
|
+
import type { UiLanguage } from './prose.js';
|
|
11
12
|
/** What happens when a discovered rule file exists but cannot be parsed or compiled. */
|
|
12
13
|
export type BadFilePolicy = 'fail' | 'ignore-with-warning';
|
|
13
14
|
/** Which decisions are audit-logged: every call, or only rule hits. */
|
|
14
15
|
export type AuditGranularity = 'all' | 'hits';
|
|
16
|
+
/** Loopback-target handling at the proxy layer. */
|
|
17
|
+
export type LoopbackPolicy = 'allow' | 'policy';
|
|
18
|
+
/** NO_PROXY handling for policy-injected subprocess environment. */
|
|
19
|
+
export type NoProxyPolicy = 'clear' | 'preserve';
|
|
20
|
+
/**
|
|
21
|
+
* The process-level network policy block. Every field is optional —
|
|
22
|
+
* {@link ResolvedConfig} supplies the defaults. `mode: 'auto'` maps the
|
|
23
|
+
* official sandbox preset onto the three network modes (read-only →
|
|
24
|
+
* deny-all, workspace-write → whitelist, danger-full-access → allow-all);
|
|
25
|
+
* on hosts without the sandbox-policy service `auto` resolves to
|
|
26
|
+
* `autoFallback` (`allow-all` by default, so pre-network hosts keep their
|
|
27
|
+
* permissive behavior until configured).
|
|
28
|
+
*/
|
|
29
|
+
export interface NetworkConfig {
|
|
30
|
+
/** Master switch: `false` disables the proxy, the env injection, and the web-tool mode defaults. */
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
/** Policy mode: `auto` follows the sandbox preset, or an explicit mode. */
|
|
33
|
+
mode?: 'auto' | NetworkMode;
|
|
34
|
+
/** Mode used when `mode: 'auto'` and the sandbox-policy service is absent or unknown. */
|
|
35
|
+
autoFallback?: NetworkMode;
|
|
36
|
+
/** Whitelist-mode handling of targets no rule matched: `ask` (default) or `deny`. */
|
|
37
|
+
unlisted?: UnlistedAction;
|
|
38
|
+
/** Local proxy bind address (loopback only — the proxy never listens publicly). */
|
|
39
|
+
proxyBind?: string;
|
|
40
|
+
/** Local proxy port; `0` picks a free ephemeral port. */
|
|
41
|
+
proxyPort?: number;
|
|
42
|
+
/** Cap on recent-block records kept for the settings page. */
|
|
43
|
+
proxyMaxRecent?: number;
|
|
44
|
+
/** Loopback targets: `allow` (default, Codex parity) or `policy` (evaluated like any target). */
|
|
45
|
+
loopback?: LoopbackPolicy;
|
|
46
|
+
/** Whether proxy environment variables are injected for subprocesses. */
|
|
47
|
+
injectEnv?: boolean;
|
|
48
|
+
/** Subprocess NO_PROXY handling: `clear` enforces the policy (default) or `preserve` keeps ambient values. */
|
|
49
|
+
noProxy?: NoProxyPolicy;
|
|
50
|
+
}
|
|
15
51
|
/** Raw plugin config — every field optional; {@link Config} supplies the defaults. */
|
|
16
52
|
export interface Config {
|
|
17
53
|
/**
|
|
@@ -70,6 +106,21 @@ export interface Config {
|
|
|
70
106
|
* `scripts/repair-session-logs.mjs` before loading on a newer harness).
|
|
71
107
|
*/
|
|
72
108
|
allowUnmarkedAudit?: boolean;
|
|
109
|
+
/** Process-level network policy (all optional; defaults inside). */
|
|
110
|
+
network?: NetworkConfig;
|
|
111
|
+
}
|
|
112
|
+
/** Network config after {@link resolveConfig}: every optional field has its explicit default. */
|
|
113
|
+
export interface ResolvedNetworkConfig {
|
|
114
|
+
readonly enabled: boolean;
|
|
115
|
+
readonly mode: 'auto' | NetworkMode;
|
|
116
|
+
readonly autoFallback: NetworkMode;
|
|
117
|
+
readonly unlisted: UnlistedAction;
|
|
118
|
+
readonly proxyBind: string;
|
|
119
|
+
readonly proxyPort: number;
|
|
120
|
+
readonly proxyMaxRecent: number;
|
|
121
|
+
readonly loopback: LoopbackPolicy;
|
|
122
|
+
readonly injectEnv: boolean;
|
|
123
|
+
readonly noProxy: NoProxyPolicy;
|
|
73
124
|
}
|
|
74
125
|
/** Config after {@link resolveConfig}: every optional field has its explicit default. */
|
|
75
126
|
export interface ResolvedConfig {
|
|
@@ -88,6 +139,7 @@ export interface ResolvedConfig {
|
|
|
88
139
|
readonly maxGlobStars: number;
|
|
89
140
|
readonly enforce: boolean;
|
|
90
141
|
readonly allowUnmarkedAudit: boolean;
|
|
142
|
+
readonly network: ResolvedNetworkConfig;
|
|
91
143
|
}
|
|
92
144
|
/** Schemastery schema: the loader validates and fills defaults before `apply`. */
|
|
93
145
|
export declare const Config: z<Config>;
|
|
@@ -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AS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;CAChC;AAED,yFAAyF;AACzF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAA;IAC1C,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAA;IAC7B,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAA;IACpC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;CACxC;AAED,kFAAkF;AAClF,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CA4B3B,CAAA;AAEF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,MAAW,GAAG,cAAc,CAkDjE"}
|
package/lib/types/events.d.ts
CHANGED
|
@@ -55,6 +55,34 @@ declare module '@deepseek-ai/dsh-session/types' {
|
|
|
55
55
|
cwd: string;
|
|
56
56
|
dryRun?: true;
|
|
57
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* One process-level network block (proxy layer), appended when the
|
|
60
|
+
* block can be attributed to a session — log-only audit with the same
|
|
61
|
+
* `ignorable` marker discipline as `permissionRules/decision`. `tool`
|
|
62
|
+
* is the attributed shell tool (`bash`/`pwsh`) or `'subprocess'` when
|
|
63
|
+
* no in-flight shell execution could be named; `attributed` records
|
|
64
|
+
* which case. `domain`/`scheme`/`port` name the blocked target,
|
|
65
|
+
* `action` is `deny` or `ask` (an ask at the proxy cannot ride the
|
|
66
|
+
* approval seam — no session context — and blocks with a message),
|
|
67
|
+
* `mode` is the network policy mode in effect, and `ruleIndex`/`reason`
|
|
68
|
+
* appear only on rule hits.
|
|
69
|
+
*/
|
|
70
|
+
'permissionRules/network': {
|
|
71
|
+
kind: 'block';
|
|
72
|
+
tool: string;
|
|
73
|
+
attributed: boolean;
|
|
74
|
+
callId?: CallId;
|
|
75
|
+
domain: string;
|
|
76
|
+
scheme?: 'http' | 'https';
|
|
77
|
+
port?: number;
|
|
78
|
+
action: 'deny' | 'ask';
|
|
79
|
+
mode: string;
|
|
80
|
+
matched: boolean;
|
|
81
|
+
source: string;
|
|
82
|
+
ruleIndex?: number;
|
|
83
|
+
reason?: string;
|
|
84
|
+
time: number;
|
|
85
|
+
};
|
|
58
86
|
}
|
|
59
87
|
}
|
|
60
88
|
/** Every action a decision event can carry. */
|
|
@@ -75,6 +103,23 @@ export interface AuditDecision {
|
|
|
75
103
|
/** `true` on dry-run records (`enforce: false`) — matched but never enforced. */
|
|
76
104
|
dryRun?: true;
|
|
77
105
|
}
|
|
106
|
+
/** The payload of one `permissionRules/network` audit record. */
|
|
107
|
+
export interface AuditNetworkBlock {
|
|
108
|
+
kind: 'block';
|
|
109
|
+
tool: string;
|
|
110
|
+
attributed: boolean;
|
|
111
|
+
callId?: CallId;
|
|
112
|
+
domain: string;
|
|
113
|
+
scheme?: 'http' | 'https';
|
|
114
|
+
port?: number;
|
|
115
|
+
action: 'deny' | 'ask';
|
|
116
|
+
mode: string;
|
|
117
|
+
matched: boolean;
|
|
118
|
+
source: string;
|
|
119
|
+
ruleIndex?: number;
|
|
120
|
+
reason?: string;
|
|
121
|
+
time: number;
|
|
122
|
+
}
|
|
78
123
|
/**
|
|
79
124
|
* `Session.append` narrowed to this plugin's audit event. The options bag
|
|
80
125
|
* exists only on host builds that expose the `ignorable` envelope-marker
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,eAAe;QACvB;;;;;;;;;;WAUG;QACH,0BAA0B,EAAE;YAC1B,QAAQ,EAAE,MAAM,CAAA;YAChB,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,MAAM,EAAE,MAAM,CAAA;YACd,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,aAAa,CAAA;YAChD,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;YAClC,SAAS,CAAC,EAAE,MAAM,CAAA;YAClB,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,GAAG,EAAE,MAAM,CAAA;YACX,MAAM,CAAC,EAAE,IAAI,CAAA;SACd,CAAA;KACF;CACF;AAED,+CAA+C;AAC/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,aAAa,CAAA;AAErE,iEAAiE;AACjE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AAErD,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,CAAC,EAAE,e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ACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,GAAG,KAAK,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,IAAI,EAAE,0BAA0B,EAChC,IAAI,EAAE,aAAa,EACnB,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,IAAI,CAAA;CAAE,KAC3B,OAAO,CAAA;AAEZ;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAE3D"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,13 +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.
|
|
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';
|
|
27
29
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,eAAO,MAAM,IAAI,qBAAqB,CAAA;AACtC,eAAO,MAAM,MAAM,UAAwB,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAChB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAC5E,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,eAAO,MAAM,IAAI,qBAAqB,CAAA;AACtC,eAAO,MAAM,MAAM,UAAwB,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAChB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAC5E,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure network-policy orchestration shared by the `tools/pre-execute` gate
|
|
3
|
+
* and the local HTTP/CONNECT proxy: the three policy modes mapped onto the
|
|
4
|
+
* official sandbox presets, proxy-layer first-match evaluation over the
|
|
5
|
+
* loaded rule chains, and the mode-default fallback decision. No I/O, no
|
|
6
|
+
* process state — unit-testable and replayable.
|
|
7
|
+
* @module dsh-permission-rules/network
|
|
8
|
+
*/
|
|
9
|
+
import type { CompiledRule, CompiledRuleset, NetworkTarget } from './rules.js';
|
|
10
|
+
import type { MatchContext } from './rules.js';
|
|
11
|
+
/** The three network policy modes. */
|
|
12
|
+
export type NetworkMode = 'deny-all' | 'whitelist' | 'allow-all';
|
|
13
|
+
/** Closed mode list for runtime normalization of untrusted values. */
|
|
14
|
+
export declare const NETWORK_MODES: readonly NetworkMode[];
|
|
15
|
+
/** The official file-sandbox presets the `auto` mode maps onto. */
|
|
16
|
+
export type SandboxModeName = 'read-only' | 'workspace-write' | 'danger-full-access';
|
|
17
|
+
/** How a whitelist-mode unlisted target is handled: ask (blocked at the proxy, approval seam for web tools) or deny. */
|
|
18
|
+
export type UnlistedAction = 'ask' | 'deny';
|
|
19
|
+
/**
|
|
20
|
+
* Map one official sandbox preset onto its network mode, Codex-style:
|
|
21
|
+
* `read-only` defaults to no network (whitelist only), `workspace-write`
|
|
22
|
+
* keeps a whitelist with ask/deny for unlisted targets, and
|
|
23
|
+
* `danger-full-access` opens everything (rules can still narrow it). Any
|
|
24
|
+
* other value falls back to `fallback` — hosts without the sandbox-policy
|
|
25
|
+
* service therefore stay permissive, preserving pre-network behavior.
|
|
26
|
+
* @param sandbox - the resolved sandbox mode, or undefined.
|
|
27
|
+
* @param fallback - the mode used when the preset is unknown/absent.
|
|
28
|
+
* @returns the effective network mode.
|
|
29
|
+
*/
|
|
30
|
+
export declare function networkModeForSandbox(sandbox: string | undefined, fallback: NetworkMode): NetworkMode;
|
|
31
|
+
/** One rule chain the proxy evaluates (ruleset + its source-file paths for attribution). */
|
|
32
|
+
export interface NetworkChain {
|
|
33
|
+
readonly ruleset: CompiledRuleset;
|
|
34
|
+
readonly sources: readonly string[];
|
|
35
|
+
}
|
|
36
|
+
/** Proxy-layer evaluation options. */
|
|
37
|
+
export interface NetworkDecisionOptions {
|
|
38
|
+
/** The policy mode in effect (already resolved by the runtime). */
|
|
39
|
+
readonly mode: NetworkMode;
|
|
40
|
+
/** Whitelist-mode handling of unlisted targets. */
|
|
41
|
+
readonly unlisted: UnlistedAction;
|
|
42
|
+
/** `allow` short-circuits loopback targets before rules; `policy` evaluates them normally. */
|
|
43
|
+
readonly loopback: 'allow' | 'policy';
|
|
44
|
+
/** Host facts for `when` evaluation (proxy has no agent identity). */
|
|
45
|
+
readonly context?: MatchContext;
|
|
46
|
+
}
|
|
47
|
+
/** One network decision: a rule hit or the mode-default fallback. */
|
|
48
|
+
export interface NetworkDecision {
|
|
49
|
+
readonly action: 'allow' | 'deny' | 'ask';
|
|
50
|
+
/** Whether a rule (true) or the mode default (false) produced the decision. */
|
|
51
|
+
readonly matched: boolean;
|
|
52
|
+
/** The mode the fallback was computed from. */
|
|
53
|
+
readonly mode: NetworkMode;
|
|
54
|
+
readonly ruleIndex?: number;
|
|
55
|
+
readonly rule?: CompiledRule;
|
|
56
|
+
/** Source file of the matched rule, for audit attribution. */
|
|
57
|
+
readonly source?: string;
|
|
58
|
+
}
|
|
59
|
+
/** The default decision a mode yields for a target no rule matched. */
|
|
60
|
+
export declare function defaultDecision(mode: NetworkMode, unlisted: UnlistedAction): NetworkDecision;
|
|
61
|
+
/**
|
|
62
|
+
* Evaluate the network policy for one target across the loaded rule
|
|
63
|
+
* chains (nearest workspace first, first match wins). Proxy-layer tool
|
|
64
|
+
* attribution: a shell subprocess connection counts as `bash`/`pwsh`
|
|
65
|
+
* candidates, so a rule scoped to either shell tool can fire and one
|
|
66
|
+
* scoped to web tools never does. Agent identity is unknown at the proxy,
|
|
67
|
+
* so agent-scoped network rules fail closed there (the pre-execute path
|
|
68
|
+
* is where agents are known). Loopback targets short-circuit before any
|
|
69
|
+
* rule when `loopback: 'allow'` (Codex parity: local dev servers stay
|
|
70
|
+
* reachable in the read-only default).
|
|
71
|
+
* @param chains - the loaded chains, insertion (nearest) order first.
|
|
72
|
+
* @param target - the parsed connection/URL target.
|
|
73
|
+
* @param options - mode, unlisted handling, loopback policy, host facts.
|
|
74
|
+
* @returns the decision.
|
|
75
|
+
*/
|
|
76
|
+
export declare function decideNetworkTarget(chains: readonly NetworkChain[], target: NetworkTarget, options: NetworkDecisionOptions): NetworkDecision;
|
|
77
|
+
/** Whether a target addresses the loopback range. */
|
|
78
|
+
export declare function isLoopbackTarget(target: NetworkTarget): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The short structured message a blocked proxy connection receives (403
|
|
81
|
+
* body for plain HTTP, CONNECT error body for tunnels). Clients such as
|
|
82
|
+
* curl print it verbatim, so the model sees the reason through the shell
|
|
83
|
+
* tool output. An `ask` at the proxy layer is worded as a pending-approval
|
|
84
|
+
* block because the proxy has no session context for the interactive
|
|
85
|
+
* approval seam.
|
|
86
|
+
* @param decision - the decision that blocked the connection.
|
|
87
|
+
* @returns a short text/plain message.
|
|
88
|
+
*/
|
|
89
|
+
export declare function blockMessage(decision: NetworkDecision): string;
|
|
90
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAEhE,sEAAsE;AACtE,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAA2C,CAAA;AAE3F,mEAAmE;AACnE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAA;AAEpF,wHAAwH;AACxH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,WAAW,GAAG,WAAW,CAOrG;AAED,4FAA4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,GAAG,MAAM,CAmB9D"}
|
package/lib/types/prose.d.ts
CHANGED
|
@@ -56,6 +56,16 @@ export interface UiProse {
|
|
|
56
56
|
unreachableWarning: (numbers: readonly number[]) => string;
|
|
57
57
|
/** Empty-source placeholder in the rules header. */
|
|
58
58
|
emptySource: string;
|
|
59
|
+
/** Line shown when the network policy is disabled (`network.enabled: false`). */
|
|
60
|
+
networkDisabled: string;
|
|
61
|
+
/** Header naming the network mode, its sandbox preset, and proxy liveness. */
|
|
62
|
+
networkHeader: (mode: string, sandboxMode: string | undefined, configuredMode: string, proxyActive: boolean, proxyPort: number) => string;
|
|
63
|
+
/** Cumulative block counters line. */
|
|
64
|
+
networkCounters: (denied: number, askBlocked: number) => string;
|
|
65
|
+
/** Line shown when no proxy blocks were recorded yet. */
|
|
66
|
+
noNetworkBlocks: string;
|
|
67
|
+
/** One recent proxy-block row. */
|
|
68
|
+
networkBlockLine: (time: number, tool: string, attributed: boolean, domain: string, scheme: string | undefined, port: number | undefined, action: string, matched: boolean, ruleIndex: number | undefined, reason: string | undefined) => string;
|
|
59
69
|
}
|
|
60
70
|
/** Tokens `describeRule` uses for its match-dimension prefixes. */
|
|
61
71
|
export interface DescribeTokens {
|
|
@@ -67,6 +77,11 @@ export interface DescribeTokens {
|
|
|
67
77
|
absent: string;
|
|
68
78
|
when: string;
|
|
69
79
|
platform: string;
|
|
80
|
+
network: string;
|
|
81
|
+
domains: string;
|
|
82
|
+
ips: string;
|
|
83
|
+
ports: string;
|
|
84
|
+
schemes: string;
|
|
70
85
|
disabled: string;
|
|
71
86
|
tags: string;
|
|
72
87
|
/** Prefix of the per-rule source-file attribution. */
|
package/lib/types/prose.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../src/prose.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,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