@yadsh/dsh-prompt-firewall 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,3 +15,4 @@ export declare class AuditStore {
15
15
  entries(): PromptAuditResult[];
16
16
  knownSections(): KnownSection[];
17
17
  }
18
+ //# sourceMappingURL=audit.d.ts.map
@@ -2,3 +2,4 @@ import type { Context } from '@deepseek-ai/cordis';
2
2
  export declare const inject: string[];
3
3
  /** Mount the generated Remote contribution and register the native Settings card. */
4
4
  export declare function apply(ctx: Context): Promise<() => Promise<void>>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ import type { PromptFirewallConfig, PromptFirewallInspectorSnapshot, SectionPolicy } from '../types.js';
2
+ export type RuleField = 'allowedSections' | 'blockedSections' | 'protectedSections' | 'allowedPrefixes' | 'blockedPrefixes' | 'allowedPatterns' | 'blockedPatterns';
3
+ export declare function Toggle(props: {
4
+ checked: boolean;
5
+ disabled: boolean;
6
+ label: string;
7
+ hint: string;
8
+ onChange(checked: boolean): void;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ type ConfigSetter = (path: string[], value: unknown) => void;
11
+ export declare function PolicySection(props: {
12
+ config: PromptFirewallConfig | undefined;
13
+ writable: boolean;
14
+ setPath: ConfigSetter;
15
+ unsetPreset(): void;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export declare function LastRequestSection(props: {
18
+ config: PromptFirewallConfig | undefined;
19
+ inspector: PromptFirewallInspectorSnapshot | null;
20
+ refreshing: boolean;
21
+ onRefresh(): void;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export declare function RulesSection(props: {
24
+ config: PromptFirewallConfig | undefined;
25
+ writable: boolean;
26
+ setPath: ConfigSetter;
27
+ }): import("react/jsx-runtime").JSX.Element;
28
+ export declare function AuditSection(props: {
29
+ config: PromptFirewallConfig | undefined;
30
+ writable: boolean;
31
+ setPath: ConfigSetter;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ export declare function InspectorSection(props: {
34
+ inspector: PromptFirewallInspectorSnapshot | null;
35
+ writable: boolean;
36
+ setPolicy(name: string, policy: SectionPolicy): Promise<void>;
37
+ }): import("react/jsx-runtime").JSX.Element;
38
+ export {};
39
+ //# sourceMappingURL=sections.d.ts.map
@@ -1 +1,2 @@
1
1
  export declare const styles: string;
2
+ //# sourceMappingURL=styles.d.ts.map
@@ -6,3 +6,4 @@ export declare const DEFAULT_CONFIG: ResolvedPromptFirewallConfig;
6
6
  /** Runtime schema consumed by the Cordis loader. */
7
7
  export declare const ConfigSchema: z<PromptFirewallConfig>;
8
8
  export declare function resolveConfig(config?: PromptFirewallConfig): ResolvedPromptFirewallConfig;
9
+ //# sourceMappingURL=config.d.ts.map
@@ -15,3 +15,4 @@ export interface ApplyFirewallOptions {
15
15
  * returns the exact original object (fail-open).
16
16
  */
17
17
  export declare function applyFirewall(assembly: PromptAssembly, options: ApplyFirewallOptions): PromptAssembly;
18
+ //# sourceMappingURL=firewall.d.ts.map
@@ -45,3 +45,4 @@ export declare class PromptFirewall extends TypertRemoteService implements Promp
45
45
  reloadRules(): void;
46
46
  }
47
47
  export default PromptFirewall;
48
+ //# sourceMappingURL=index.d.ts.map
@@ -14,3 +14,4 @@ export declare class FirewallMetrics {
14
14
  snapshot(): PromptFirewallMetricsSnapshot;
15
15
  namedSnapshot(): Readonly<Record<PromptFirewallMetricName, number>>;
16
16
  }
17
+ //# sourceMappingURL=metrics.d.ts.map
@@ -2,3 +2,4 @@ import type { FirewallPreset, PromptFirewallConfig } from './types.js';
2
2
  export declare const CLEAN_BLOCKED_SECTIONS: readonly ["plugin:dsh-liangshen", "plugin:dsh-ssh", "plugin:task-board", "plugin:dsh-desktop-launcher"];
3
3
  export declare const PRESETS: Readonly<Record<FirewallPreset, Readonly<PromptFirewallConfig>>>;
4
4
  export declare function getPreset(name: FirewallPreset | undefined): Readonly<PromptFirewallConfig>;
5
+ //# sourceMappingURL=presets.d.ts.map
@@ -23,3 +23,4 @@ export declare function globToRegExp(glob: string): RegExp;
23
23
  export declare function compileRules(config: ResolvedPromptFirewallConfig): CompiledRules;
24
24
  export declare function evaluateSection(section: FirewallSection, rules: CompiledRules): FirewallDecision;
25
25
  export {};
26
+ //# sourceMappingURL=rules.d.ts.map
@@ -123,3 +123,4 @@ export type FirewallSection = AssembledSection & {
123
123
  export type FirewallAssembly = PromptAssembly & {
124
124
  sections: FirewallSection[];
125
125
  };
126
+ //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yadsh/dsh-prompt-firewall",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Prompt hygiene, observability, and policy middleware for DeepSeek Harness",
5
5
  "repository": {
6
6
  "type": "git",
@@ -60,7 +60,9 @@
60
60
  "lib/**/*.d.ts",
61
61
  "lib/client.js",
62
62
  "cordis.patch.yml",
63
- "README.md"
63
+ "compatibility.json",
64
+ "README.md",
65
+ "LICENSE"
64
66
  ],
65
67
  "keywords": [
66
68
  "deepseek-harness",
@@ -81,15 +83,14 @@
81
83
  "@deepseek-ai/dsh-settings": ">=0.1.1-rc.2 <0.2.0",
82
84
  "@deepseek-ai/dsh-system-prompt": ">=0.1.1-rc.2 <0.2.0",
83
85
  "@deepseek-ai/dsh-typert-protocol": ">=0.1.1-rc.2 <0.2.0",
84
- "react": ">=18.2.0 <20"
86
+ "react": "^18.2.0"
85
87
  },
86
88
  "dependencies": {
87
89
  "zod": "^4.4.3",
88
- "@yadsh/dsh-plugin-log": "^0.2.0"
90
+ "@yadsh/dsh-plugin-log": "^0.2.1"
89
91
  },
90
92
  "devDependencies": {
91
93
  "@deepseek-ai/cordis": "4.0.1",
92
- "@deepseek-ai/schemastery": "3.18.1",
93
94
  "@deepseek-ai/dsh-api-gateway": "0.1.1-rc.2",
94
95
  "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
95
96
  "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
@@ -99,13 +100,17 @@
99
100
  "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
100
101
  "@deepseek-ai/dsh-typert-generator": "0.1.1-rc.2",
101
102
  "@deepseek-ai/dsh-typert-protocol": "0.1.1-rc.2",
103
+ "@deepseek-ai/schemastery": "3.18.1",
102
104
  "@types/node": "^26.4.0",
103
105
  "@types/react": "18.3.28",
104
- "react": "18.3.1",
105
106
  "eslint": "10.9.1",
107
+ "react": "18.3.1",
106
108
  "tsdown": "^0.22.14",
107
109
  "typescript": "^7.0.2",
108
- "vitest": "^4.1.11"
110
+ "vitest": "^4.1.11",
111
+ "@yadsh/dsh-config": "^0.0.0",
112
+ "@yadsh/dsh-plugin-scripts": "^0.0.0",
113
+ "@yadsh/dsh-plugin-kit": "^0.1.0"
109
114
  },
110
115
  "engines": {
111
116
  "node": ">=20"
@@ -1,11 +0,0 @@
1
- /**
2
- * React invokes external-store callbacks as plain functions. SettingsScope's
3
- * methods depend on their receiver, so forward calls through stable wrappers.
4
- */
5
- export function bindSettingsExternalStore(scope) {
6
- return {
7
- subscribe: listener => scope.subscribe(listener),
8
- getSnapshot: () => scope.getSnapshot(),
9
- };
10
- }
11
- //# sourceMappingURL=settings-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings-store.js","sourceRoot":"","sources":["../../src/client/settings-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAY,KAGpD;IAIC,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;QAChD,WAAW,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE;KACvC,CAAA;AACH,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * React invokes external-store callbacks as plain functions. SettingsScope's
3
- * methods depend on their receiver, so forward calls through stable wrappers.
4
- */
5
- export declare function bindSettingsExternalStore<TSnapshot>(scope: {
6
- subscribe(listener: () => void): () => void;
7
- getSnapshot(): TSnapshot;
8
- }): {
9
- subscribe(listener: () => void): () => void;
10
- getSnapshot(): TSnapshot;
11
- };