dsh-permission-rules 0.4.2 → 0.5.0

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.es.md +22 -0
  3. package/README.hi.md +22 -0
  4. package/README.md +22 -0
  5. package/README.pt.md +22 -0
  6. package/README.zh.md +22 -0
  7. package/lib/client.js +4696 -0
  8. package/lib/client.js.map +1 -0
  9. package/lib/index.js +1520 -172
  10. package/lib/typert.host.js +4305 -0
  11. package/lib/types/client/index.d.ts +28 -0
  12. package/lib/types/client/index.d.ts.map +1 -0
  13. package/lib/types/client/locales.d.ts +9 -0
  14. package/lib/types/client/locales.d.ts.map +1 -0
  15. package/lib/types/client/remote.d.ts +181 -0
  16. package/lib/types/client/remote.d.ts.map +1 -0
  17. package/lib/types/client/section.d.ts +35 -0
  18. package/lib/types/client/section.d.ts.map +1 -0
  19. package/lib/types/config.d.ts +52 -0
  20. package/lib/types/config.d.ts.map +1 -1
  21. package/lib/types/events.d.ts +45 -0
  22. package/lib/types/events.d.ts.map +1 -1
  23. package/lib/types/index.d.ts +2 -0
  24. package/lib/types/index.d.ts.map +1 -1
  25. package/lib/types/network.d.ts +90 -0
  26. package/lib/types/network.d.ts.map +1 -0
  27. package/lib/types/prose.d.ts +15 -0
  28. package/lib/types/prose.d.ts.map +1 -1
  29. package/lib/types/proxy.d.ts +128 -0
  30. package/lib/types/proxy.d.ts.map +1 -0
  31. package/lib/types/remote-service.d.ts +45 -0
  32. package/lib/types/remote-service.d.ts.map +1 -0
  33. package/lib/types/rules.d.ts +131 -0
  34. package/lib/types/rules.d.ts.map +1 -1
  35. package/lib/types/runtime.d.ts +141 -12
  36. package/lib/types/runtime.d.ts.map +1 -1
  37. package/lib/types/settings.d.ts +28 -0
  38. package/lib/types/settings.d.ts.map +1 -0
  39. package/lib/types/typert.host.d.ts +166 -0
  40. package/lib/types/typert.host.d.ts.map +1 -0
  41. package/lib/types/wire.d.ts +421 -0
  42. package/lib/types/wire.d.ts.map +1 -0
  43. package/package.json +40 -6
  44. package/src/client/index.ts +111 -0
  45. package/src/client/locales.ts +94 -0
  46. package/src/client/remote.ts +41 -0
  47. package/src/client/section.ts +201 -0
  48. package/src/config.ts +111 -0
  49. package/src/events.ts +46 -0
  50. package/src/index.ts +2 -0
  51. package/src/network.ts +177 -0
  52. package/src/prose.ts +85 -10
  53. package/src/proxy.ts +327 -0
  54. package/src/remote-service.ts +109 -0
  55. package/src/rules.ts +424 -5
  56. package/src/runtime.ts +454 -46
  57. package/src/settings.ts +74 -0
  58. package/src/typert.host.ts +25 -0
  59. package/src/wire.ts +239 -0
  60. package/lib/types/config.js +0 -99
  61. package/lib/types/config.js.map +0 -1
  62. package/lib/types/events.js +0 -44
  63. package/lib/types/events.js.map +0 -1
  64. package/lib/types/glob.js +0 -307
  65. package/lib/types/glob.js.map +0 -1
  66. package/lib/types/index.js +0 -27
  67. package/lib/types/index.js.map +0 -1
  68. package/lib/types/prose.js +0 -173
  69. package/lib/types/prose.js.map +0 -1
  70. package/lib/types/rules.js +0 -610
  71. package/lib/types/rules.js.map +0 -1
  72. package/lib/types/runtime.js +0 -818
  73. package/lib/types/runtime.js.map +0 -1
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Host-side settings-namespace wiring: registers the whole plugin config
3
+ * as the `permission-rules` settings section (editable from the Web
4
+ * settings surface, loopback-only), keeps the runtime's config source
5
+ * pointed at the resolved section, and rebinds the network proxy when a
6
+ * bind/env-relevant knob changes live. On hosts without a settings
7
+ * service (the rc.6 line) nothing registers and the composition entry
8
+ * keeps serving the config — the plugin stays fully functional.
9
+ *
10
+ * The registration uses only structural interfaces: `@deepseek-ai/
11
+ * dsh-settings` is not an rc.6 peer, so importing it would hard-fail
12
+ * older hosts; the real service satisfies these shapes.
13
+ * @module dsh-permission-rules/settings
14
+ */
15
+ import type { Context } from '@deepseek-ai/cordis';
16
+ import type { Config as PluginConfig } from './config.ts';
17
+ import type { PermissionRulesRuntime } from './runtime.ts';
18
+ /** The settings namespace this plugin owns (kebab-case, per the provider contract). */
19
+ export declare const SETTINGS_NAMESPACE = "permission-rules";
20
+ /**
21
+ * Register the settings section and bind the runtime's live config
22
+ * source. Runs only where a settings service is composed.
23
+ * @param ctx - the plugin context.
24
+ * @param runtime - the runtime whose config source follows the section.
25
+ * @param entry - the composition entry config (the section's `base` layer).
26
+ */
27
+ export declare function attachSettingsSection(ctx: Context, runtime: PermissionRulesRuntime, entry: PluginConfig): void;
28
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAkB,MAAM,aAAa,CAAA;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAE1D,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,qBAAqB,CAAA;AAkBpD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,CA0B9G"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * The hand-written Typert HOST manifest for `dsh-permission-rules`,
3
+ * exported as `./typert` so the harness's typert-loader registers the
4
+ * `permissionRules` settings-page invocations automatically when this
5
+ * plugin mounts. Same shape as a generator output (validated by the
6
+ * loader): package face, empty model and schemas, and the canonical
7
+ * invocation list shared with the client Remote contribution
8
+ * (`src/wire.ts`).
9
+ * @module dsh-permission-rules/typert
10
+ */
11
+ /** Host Typert manifest (validated by `@deepseek-ai/dsh-typert-loader`). */
12
+ export declare const TYPERT: Readonly<{
13
+ package: "dsh-permission-rules";
14
+ face: "host";
15
+ schemas: readonly never[];
16
+ invocations: readonly (Readonly<{
17
+ readonly id: "dsh-permission-rules#permissionRules/networkStatus";
18
+ readonly service: "permissionRules";
19
+ readonly namespace: "permissionRules";
20
+ readonly method: "networkStatus";
21
+ readonly invocation: Readonly<{
22
+ kind: "direct";
23
+ }>;
24
+ readonly parameters: readonly never[];
25
+ readonly result: Readonly<{
26
+ mode: "strict";
27
+ typeSymbol: "dsh-permission-rules/types#PermissionRulesSnapshot";
28
+ schema: import("zod").ZodObject<{
29
+ enabled: import("zod").ZodBoolean;
30
+ mode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, import("zod").ZodLiteral<"allow-all">]>;
31
+ configuredMode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"auto">, import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, import("zod").ZodLiteral<"allow-all">]>;
32
+ sandboxMode: import("zod").ZodNullable<import("zod").ZodString>;
33
+ proxyPort: import("zod").ZodNumber;
34
+ proxyActive: import("zod").ZodBoolean;
35
+ denied: import("zod").ZodNumber;
36
+ askBlocked: import("zod").ZodNumber;
37
+ recent: import("zod").ZodArray<import("zod").ZodObject<{
38
+ time: import("zod").ZodNumber;
39
+ tool: import("zod").ZodString;
40
+ attributed: import("zod").ZodBoolean;
41
+ domain: import("zod").ZodString;
42
+ scheme: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"http">, import("zod").ZodLiteral<"https">, import("zod").ZodNull]>;
43
+ port: import("zod").ZodNullable<import("zod").ZodNumber>;
44
+ action: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny">, import("zod").ZodLiteral<"ask">]>;
45
+ mode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, import("zod").ZodLiteral<"allow-all">]>;
46
+ matched: import("zod").ZodBoolean;
47
+ source: import("zod").ZodString;
48
+ ruleIndex: import("zod").ZodNullable<import("zod").ZodNumber>;
49
+ reason: import("zod").ZodNullable<import("zod").ZodString>;
50
+ }, import("zod/v4/core").$strip>>;
51
+ sources: import("zod").ZodArray<import("zod").ZodObject<{
52
+ path: import("zod").ZodString;
53
+ exists: import("zod").ZodBoolean;
54
+ cwd: import("zod").ZodNullable<import("zod").ZodString>;
55
+ }, import("zod/v4/core").$strip>>;
56
+ }, import("zod/v4/core").$strip>;
57
+ }>;
58
+ readonly sourceLocation: Readonly<{
59
+ file: "src/wire.ts";
60
+ line: 1;
61
+ column: 1;
62
+ }>;
63
+ }> | Readonly<{
64
+ readonly id: "dsh-permission-rules#permissionRules/rulesRead";
65
+ readonly service: "permissionRules";
66
+ readonly namespace: "permissionRules";
67
+ readonly method: "rulesRead";
68
+ readonly invocation: Readonly<{
69
+ kind: "direct";
70
+ }>;
71
+ readonly parameters: readonly Readonly<{
72
+ name: string;
73
+ wire: string;
74
+ source: "json";
75
+ codec: Readonly<{
76
+ mode: "strict";
77
+ typeSymbol: "dsh-permission-rules/types#RulesReadRequestPath";
78
+ schema: import("zod").ZodString;
79
+ }>;
80
+ }>[];
81
+ readonly result: Readonly<{
82
+ mode: "strict";
83
+ typeSymbol: "dsh-permission-rules/types#RulesReadResult";
84
+ schema: import("zod").ZodObject<{
85
+ path: import("zod").ZodString;
86
+ exists: import("zod").ZodBoolean;
87
+ text: import("zod").ZodString;
88
+ error: import("zod").ZodNullable<import("zod").ZodString>;
89
+ }, import("zod/v4/core").$strip>;
90
+ }>;
91
+ readonly sourceLocation: Readonly<{
92
+ file: "src/wire.ts";
93
+ line: 1;
94
+ column: 1;
95
+ }>;
96
+ }> | Readonly<{
97
+ readonly id: "dsh-permission-rules#permissionRules/rulesSave";
98
+ readonly service: "permissionRules";
99
+ readonly namespace: "permissionRules";
100
+ readonly method: "rulesSave";
101
+ readonly invocation: Readonly<{
102
+ kind: "direct";
103
+ }>;
104
+ readonly parameters: readonly (Readonly<{
105
+ name: string;
106
+ wire: string;
107
+ source: "json";
108
+ codec: Readonly<{
109
+ mode: "strict";
110
+ typeSymbol: "dsh-permission-rules/types#RulesSaveRequestPath";
111
+ schema: import("zod").ZodString;
112
+ }>;
113
+ }> | Readonly<{
114
+ name: string;
115
+ wire: string;
116
+ source: "json";
117
+ codec: Readonly<{
118
+ mode: "strict";
119
+ typeSymbol: "dsh-permission-rules/types#RulesSaveRequestText";
120
+ schema: import("zod").ZodString;
121
+ }>;
122
+ }>)[];
123
+ readonly result: Readonly<{
124
+ mode: "strict";
125
+ typeSymbol: "dsh-permission-rules/types#RulesSaveResult";
126
+ schema: import("zod").ZodObject<{
127
+ ok: import("zod").ZodBoolean;
128
+ error: import("zod").ZodNullable<import("zod").ZodString>;
129
+ reloaded: import("zod").ZodNullable<import("zod").ZodNumber>;
130
+ }, import("zod/v4/core").$strip>;
131
+ }>;
132
+ readonly sourceLocation: Readonly<{
133
+ file: "src/wire.ts";
134
+ line: 1;
135
+ column: 1;
136
+ }>;
137
+ }> | Readonly<{
138
+ readonly id: "dsh-permission-rules#permissionRules/reload";
139
+ readonly service: "permissionRules";
140
+ readonly namespace: "permissionRules";
141
+ readonly method: "reload";
142
+ readonly invocation: Readonly<{
143
+ kind: "direct";
144
+ }>;
145
+ readonly parameters: readonly never[];
146
+ readonly result: Readonly<{
147
+ mode: "strict";
148
+ typeSymbol: "dsh-permission-rules/types#RulesReloadResult";
149
+ schema: import("zod").ZodObject<{
150
+ ok: import("zod").ZodBoolean;
151
+ error: import("zod").ZodNullable<import("zod").ZodString>;
152
+ }, import("zod/v4/core").$strip>;
153
+ }>;
154
+ readonly sourceLocation: Readonly<{
155
+ file: "src/wire.ts";
156
+ line: 1;
157
+ column: 1;
158
+ }>;
159
+ }>)[];
160
+ model: Readonly<{
161
+ services: readonly never[];
162
+ events: readonly never[];
163
+ objects: readonly never[];
164
+ }>;
165
+ }>;
166
+ //# sourceMappingURL=typert.host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typert.host.d.ts","sourceRoot":"","sources":["../../src/typert.host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,4EAA4E;AAC5E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUjB,CAAA"}
@@ -0,0 +1,421 @@
1
+ /**
2
+ * The settings-page wire vocabulary: the snapshot/rule-editor types served
3
+ * over the `permissionRules` Typert Remote namespace, their zod v4
4
+ * validation schemas (the strict codec both Typert faces carry), and the
5
+ * invocation descriptors shared verbatim by the host `./typert` manifest
6
+ * and the client Remote contribution. One canonical source for both faces
7
+ * keeps the host and client codecs from ever drifting apart.
8
+ * @module dsh-permission-rules/wire
9
+ */
10
+ import { z } from 'zod';
11
+ /** The three network policy modes (wire vocabulary). */
12
+ export type NetworkModeWire = 'deny-all' | 'whitelist' | 'allow-all';
13
+ /** One recent proxy-layer block, sanitized for display. */
14
+ export interface NetworkBlockView {
15
+ /** Epoch ms of the block. */
16
+ time: number;
17
+ /** Attributed shell tool (`bash`/`pwsh`) or `subprocess`. */
18
+ tool: string;
19
+ /** Whether an in-flight shell execution could be named. */
20
+ attributed: boolean;
21
+ /** Blocked target host. */
22
+ domain: string;
23
+ scheme: 'http' | 'https' | null;
24
+ port: number | null;
25
+ action: 'deny' | 'ask';
26
+ mode: NetworkModeWire;
27
+ /** Whether a rule (true) or the mode default (false) blocked the target. */
28
+ matched: boolean;
29
+ source: string;
30
+ ruleIndex: number | null;
31
+ reason: string | null;
32
+ }
33
+ /** One rule file the editor may read/write (a known rule source only). */
34
+ export interface RuleSourceView {
35
+ path: string;
36
+ exists: boolean;
37
+ /** The workspace the source belongs to, or null for the deployment fallback. */
38
+ cwd: string | null;
39
+ }
40
+ /** The complete settings-page snapshot served by `permissionRules/networkStatus`. */
41
+ export interface PermissionRulesSnapshot {
42
+ enabled: boolean;
43
+ mode: NetworkModeWire;
44
+ /** The configured mode knob (`auto` or an explicit mode). */
45
+ configuredMode: 'auto' | NetworkModeWire;
46
+ /** The sandbox preset `auto` mapped from, or null. */
47
+ sandboxMode: string | null;
48
+ proxyPort: number;
49
+ proxyActive: boolean;
50
+ denied: number;
51
+ askBlocked: number;
52
+ recent: readonly NetworkBlockView[];
53
+ sources: readonly RuleSourceView[];
54
+ }
55
+ /** Strict wire schema for {@link PermissionRulesSnapshot}. */
56
+ export declare const PERMISSION_RULES_SNAPSHOT_SCHEMA: z.ZodObject<{
57
+ enabled: z.ZodBoolean;
58
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
59
+ configuredMode: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
60
+ sandboxMode: z.ZodNullable<z.ZodString>;
61
+ proxyPort: z.ZodNumber;
62
+ proxyActive: z.ZodBoolean;
63
+ denied: z.ZodNumber;
64
+ askBlocked: z.ZodNumber;
65
+ recent: z.ZodArray<z.ZodObject<{
66
+ time: z.ZodNumber;
67
+ tool: z.ZodString;
68
+ attributed: z.ZodBoolean;
69
+ domain: z.ZodString;
70
+ scheme: z.ZodUnion<readonly [z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodNull]>;
71
+ port: z.ZodNullable<z.ZodNumber>;
72
+ action: z.ZodUnion<readonly [z.ZodLiteral<"deny">, z.ZodLiteral<"ask">]>;
73
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
74
+ matched: z.ZodBoolean;
75
+ source: z.ZodString;
76
+ ruleIndex: z.ZodNullable<z.ZodNumber>;
77
+ reason: z.ZodNullable<z.ZodString>;
78
+ }, z.core.$strip>>;
79
+ sources: z.ZodArray<z.ZodObject<{
80
+ path: z.ZodString;
81
+ exists: z.ZodBoolean;
82
+ cwd: z.ZodNullable<z.ZodString>;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
85
+ /** Result of `permissionRules/rulesRead`. */
86
+ export interface RulesReadResult {
87
+ path: string;
88
+ exists: boolean;
89
+ text: string;
90
+ error: string | null;
91
+ }
92
+ /** Strict wire schema for {@link RulesReadResult}. */
93
+ export declare const RULES_READ_SCHEMA: z.ZodObject<{
94
+ path: z.ZodString;
95
+ exists: z.ZodBoolean;
96
+ text: z.ZodString;
97
+ error: z.ZodNullable<z.ZodString>;
98
+ }, z.core.$strip>;
99
+ /** Result of `permissionRules/rulesSave`. */
100
+ export interface RulesSaveResult {
101
+ ok: boolean;
102
+ error: string | null;
103
+ reloaded: number | null;
104
+ }
105
+ /** Strict wire schema for {@link RulesSaveResult}. */
106
+ export declare const RULES_SAVE_SCHEMA: z.ZodObject<{
107
+ ok: z.ZodBoolean;
108
+ error: z.ZodNullable<z.ZodString>;
109
+ reloaded: z.ZodNullable<z.ZodNumber>;
110
+ }, z.core.$strip>;
111
+ /** Result of `permissionRules/reload`. */
112
+ export interface RulesReloadResult {
113
+ ok: boolean;
114
+ error: string | null;
115
+ }
116
+ /** Strict wire schema for {@link RulesReloadResult}. */
117
+ export declare const RULES_RELOAD_SCHEMA: z.ZodObject<{
118
+ ok: z.ZodBoolean;
119
+ error: z.ZodNullable<z.ZodString>;
120
+ }, z.core.$strip>;
121
+ /** The `permissionRules/networkStatus` invocation descriptor (no parameters). */
122
+ export declare const NETWORK_STATUS_DESCRIPTOR: Readonly<{
123
+ readonly id: "dsh-permission-rules#permissionRules/networkStatus";
124
+ readonly service: "permissionRules";
125
+ readonly namespace: "permissionRules";
126
+ readonly method: "networkStatus";
127
+ readonly invocation: Readonly<{
128
+ kind: "direct";
129
+ }>;
130
+ readonly parameters: readonly never[];
131
+ readonly result: Readonly<{
132
+ mode: "strict";
133
+ typeSymbol: "dsh-permission-rules/types#PermissionRulesSnapshot";
134
+ schema: z.ZodObject<{
135
+ enabled: z.ZodBoolean;
136
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
137
+ configuredMode: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
138
+ sandboxMode: z.ZodNullable<z.ZodString>;
139
+ proxyPort: z.ZodNumber;
140
+ proxyActive: z.ZodBoolean;
141
+ denied: z.ZodNumber;
142
+ askBlocked: z.ZodNumber;
143
+ recent: z.ZodArray<z.ZodObject<{
144
+ time: z.ZodNumber;
145
+ tool: z.ZodString;
146
+ attributed: z.ZodBoolean;
147
+ domain: z.ZodString;
148
+ scheme: z.ZodUnion<readonly [z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodNull]>;
149
+ port: z.ZodNullable<z.ZodNumber>;
150
+ action: z.ZodUnion<readonly [z.ZodLiteral<"deny">, z.ZodLiteral<"ask">]>;
151
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
152
+ matched: z.ZodBoolean;
153
+ source: z.ZodString;
154
+ ruleIndex: z.ZodNullable<z.ZodNumber>;
155
+ reason: z.ZodNullable<z.ZodString>;
156
+ }, z.core.$strip>>;
157
+ sources: z.ZodArray<z.ZodObject<{
158
+ path: z.ZodString;
159
+ exists: z.ZodBoolean;
160
+ cwd: z.ZodNullable<z.ZodString>;
161
+ }, z.core.$strip>>;
162
+ }, z.core.$strip>;
163
+ }>;
164
+ readonly sourceLocation: Readonly<{
165
+ file: "src/wire.ts";
166
+ line: 1;
167
+ column: 1;
168
+ }>;
169
+ }>;
170
+ /** The `permissionRules/rulesRead` invocation descriptor. */
171
+ export declare const RULES_READ_DESCRIPTOR: Readonly<{
172
+ readonly id: "dsh-permission-rules#permissionRules/rulesRead";
173
+ readonly service: "permissionRules";
174
+ readonly namespace: "permissionRules";
175
+ readonly method: "rulesRead";
176
+ readonly invocation: Readonly<{
177
+ kind: "direct";
178
+ }>;
179
+ readonly parameters: readonly Readonly<{
180
+ name: string;
181
+ wire: string;
182
+ source: "json";
183
+ codec: Readonly<{
184
+ mode: "strict";
185
+ typeSymbol: "dsh-permission-rules/types#RulesReadRequestPath";
186
+ schema: z.ZodString;
187
+ }>;
188
+ }>[];
189
+ readonly result: Readonly<{
190
+ mode: "strict";
191
+ typeSymbol: "dsh-permission-rules/types#RulesReadResult";
192
+ schema: z.ZodObject<{
193
+ path: z.ZodString;
194
+ exists: z.ZodBoolean;
195
+ text: z.ZodString;
196
+ error: z.ZodNullable<z.ZodString>;
197
+ }, z.core.$strip>;
198
+ }>;
199
+ readonly sourceLocation: Readonly<{
200
+ file: "src/wire.ts";
201
+ line: 1;
202
+ column: 1;
203
+ }>;
204
+ }>;
205
+ /** The `permissionRules/rulesSave` invocation descriptor. */
206
+ export declare const RULES_SAVE_DESCRIPTOR: Readonly<{
207
+ readonly id: "dsh-permission-rules#permissionRules/rulesSave";
208
+ readonly service: "permissionRules";
209
+ readonly namespace: "permissionRules";
210
+ readonly method: "rulesSave";
211
+ readonly invocation: Readonly<{
212
+ kind: "direct";
213
+ }>;
214
+ readonly parameters: readonly (Readonly<{
215
+ name: string;
216
+ wire: string;
217
+ source: "json";
218
+ codec: Readonly<{
219
+ mode: "strict";
220
+ typeSymbol: "dsh-permission-rules/types#RulesSaveRequestPath";
221
+ schema: z.ZodString;
222
+ }>;
223
+ }> | Readonly<{
224
+ name: string;
225
+ wire: string;
226
+ source: "json";
227
+ codec: Readonly<{
228
+ mode: "strict";
229
+ typeSymbol: "dsh-permission-rules/types#RulesSaveRequestText";
230
+ schema: z.ZodString;
231
+ }>;
232
+ }>)[];
233
+ readonly result: Readonly<{
234
+ mode: "strict";
235
+ typeSymbol: "dsh-permission-rules/types#RulesSaveResult";
236
+ schema: z.ZodObject<{
237
+ ok: z.ZodBoolean;
238
+ error: z.ZodNullable<z.ZodString>;
239
+ reloaded: z.ZodNullable<z.ZodNumber>;
240
+ }, z.core.$strip>;
241
+ }>;
242
+ readonly sourceLocation: Readonly<{
243
+ file: "src/wire.ts";
244
+ line: 1;
245
+ column: 1;
246
+ }>;
247
+ }>;
248
+ /** The `permissionRules/reload` invocation descriptor (no parameters). */
249
+ export declare const RULES_RELOAD_DESCRIPTOR: Readonly<{
250
+ readonly id: "dsh-permission-rules#permissionRules/reload";
251
+ readonly service: "permissionRules";
252
+ readonly namespace: "permissionRules";
253
+ readonly method: "reload";
254
+ readonly invocation: Readonly<{
255
+ kind: "direct";
256
+ }>;
257
+ readonly parameters: readonly never[];
258
+ readonly result: Readonly<{
259
+ mode: "strict";
260
+ typeSymbol: "dsh-permission-rules/types#RulesReloadResult";
261
+ schema: z.ZodObject<{
262
+ ok: z.ZodBoolean;
263
+ error: z.ZodNullable<z.ZodString>;
264
+ }, z.core.$strip>;
265
+ }>;
266
+ readonly sourceLocation: Readonly<{
267
+ file: "src/wire.ts";
268
+ line: 1;
269
+ column: 1;
270
+ }>;
271
+ }>;
272
+ /**
273
+ * The canonical invocation list both Typert faces register — the host
274
+ * manifest and the client contribution share these exact descriptor
275
+ * objects, so the two wire codecs can never drift apart.
276
+ */
277
+ export declare const PERMISSION_RULES_INVOCATIONS: readonly (Readonly<{
278
+ readonly id: "dsh-permission-rules#permissionRules/networkStatus";
279
+ readonly service: "permissionRules";
280
+ readonly namespace: "permissionRules";
281
+ readonly method: "networkStatus";
282
+ readonly invocation: Readonly<{
283
+ kind: "direct";
284
+ }>;
285
+ readonly parameters: readonly never[];
286
+ readonly result: Readonly<{
287
+ mode: "strict";
288
+ typeSymbol: "dsh-permission-rules/types#PermissionRulesSnapshot";
289
+ schema: z.ZodObject<{
290
+ enabled: z.ZodBoolean;
291
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
292
+ configuredMode: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
293
+ sandboxMode: z.ZodNullable<z.ZodString>;
294
+ proxyPort: z.ZodNumber;
295
+ proxyActive: z.ZodBoolean;
296
+ denied: z.ZodNumber;
297
+ askBlocked: z.ZodNumber;
298
+ recent: z.ZodArray<z.ZodObject<{
299
+ time: z.ZodNumber;
300
+ tool: z.ZodString;
301
+ attributed: z.ZodBoolean;
302
+ domain: z.ZodString;
303
+ scheme: z.ZodUnion<readonly [z.ZodLiteral<"http">, z.ZodLiteral<"https">, z.ZodNull]>;
304
+ port: z.ZodNullable<z.ZodNumber>;
305
+ action: z.ZodUnion<readonly [z.ZodLiteral<"deny">, z.ZodLiteral<"ask">]>;
306
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"deny-all">, z.ZodLiteral<"whitelist">, z.ZodLiteral<"allow-all">]>;
307
+ matched: z.ZodBoolean;
308
+ source: z.ZodString;
309
+ ruleIndex: z.ZodNullable<z.ZodNumber>;
310
+ reason: z.ZodNullable<z.ZodString>;
311
+ }, z.core.$strip>>;
312
+ sources: z.ZodArray<z.ZodObject<{
313
+ path: z.ZodString;
314
+ exists: z.ZodBoolean;
315
+ cwd: z.ZodNullable<z.ZodString>;
316
+ }, z.core.$strip>>;
317
+ }, z.core.$strip>;
318
+ }>;
319
+ readonly sourceLocation: Readonly<{
320
+ file: "src/wire.ts";
321
+ line: 1;
322
+ column: 1;
323
+ }>;
324
+ }> | Readonly<{
325
+ readonly id: "dsh-permission-rules#permissionRules/rulesRead";
326
+ readonly service: "permissionRules";
327
+ readonly namespace: "permissionRules";
328
+ readonly method: "rulesRead";
329
+ readonly invocation: Readonly<{
330
+ kind: "direct";
331
+ }>;
332
+ readonly parameters: readonly Readonly<{
333
+ name: string;
334
+ wire: string;
335
+ source: "json";
336
+ codec: Readonly<{
337
+ mode: "strict";
338
+ typeSymbol: "dsh-permission-rules/types#RulesReadRequestPath";
339
+ schema: z.ZodString;
340
+ }>;
341
+ }>[];
342
+ readonly result: Readonly<{
343
+ mode: "strict";
344
+ typeSymbol: "dsh-permission-rules/types#RulesReadResult";
345
+ schema: z.ZodObject<{
346
+ path: z.ZodString;
347
+ exists: z.ZodBoolean;
348
+ text: z.ZodString;
349
+ error: z.ZodNullable<z.ZodString>;
350
+ }, z.core.$strip>;
351
+ }>;
352
+ readonly sourceLocation: Readonly<{
353
+ file: "src/wire.ts";
354
+ line: 1;
355
+ column: 1;
356
+ }>;
357
+ }> | Readonly<{
358
+ readonly id: "dsh-permission-rules#permissionRules/rulesSave";
359
+ readonly service: "permissionRules";
360
+ readonly namespace: "permissionRules";
361
+ readonly method: "rulesSave";
362
+ readonly invocation: Readonly<{
363
+ kind: "direct";
364
+ }>;
365
+ readonly parameters: readonly (Readonly<{
366
+ name: string;
367
+ wire: string;
368
+ source: "json";
369
+ codec: Readonly<{
370
+ mode: "strict";
371
+ typeSymbol: "dsh-permission-rules/types#RulesSaveRequestPath";
372
+ schema: z.ZodString;
373
+ }>;
374
+ }> | Readonly<{
375
+ name: string;
376
+ wire: string;
377
+ source: "json";
378
+ codec: Readonly<{
379
+ mode: "strict";
380
+ typeSymbol: "dsh-permission-rules/types#RulesSaveRequestText";
381
+ schema: z.ZodString;
382
+ }>;
383
+ }>)[];
384
+ readonly result: Readonly<{
385
+ mode: "strict";
386
+ typeSymbol: "dsh-permission-rules/types#RulesSaveResult";
387
+ schema: z.ZodObject<{
388
+ ok: z.ZodBoolean;
389
+ error: z.ZodNullable<z.ZodString>;
390
+ reloaded: z.ZodNullable<z.ZodNumber>;
391
+ }, z.core.$strip>;
392
+ }>;
393
+ readonly sourceLocation: Readonly<{
394
+ file: "src/wire.ts";
395
+ line: 1;
396
+ column: 1;
397
+ }>;
398
+ }> | Readonly<{
399
+ readonly id: "dsh-permission-rules#permissionRules/reload";
400
+ readonly service: "permissionRules";
401
+ readonly namespace: "permissionRules";
402
+ readonly method: "reload";
403
+ readonly invocation: Readonly<{
404
+ kind: "direct";
405
+ }>;
406
+ readonly parameters: readonly never[];
407
+ readonly result: Readonly<{
408
+ mode: "strict";
409
+ typeSymbol: "dsh-permission-rules/types#RulesReloadResult";
410
+ schema: z.ZodObject<{
411
+ ok: z.ZodBoolean;
412
+ error: z.ZodNullable<z.ZodString>;
413
+ }, z.core.$strip>;
414
+ }>;
415
+ readonly sourceLocation: Readonly<{
416
+ file: "src/wire.ts";
417
+ line: 1;
418
+ column: 1;
419
+ }>;
420
+ }>)[];
421
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/wire.ts"],"names":[],"mappings":"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"}