dsh-dlp 0.1.0 → 0.3.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.
@@ -28,7 +28,7 @@ export declare function newDecisionId(): DecisionId;
28
28
  /** Payload version carried inside every record this plugin writes. */
29
29
  export declare const RECORD_VERSION = 1;
30
30
  /** What produced one audit record. */
31
- export type AuditKind = 'guard-deny' | 'pre-execute-deny' | 'result-redaction' | 'telemetry-redaction' | 'audit-failure';
31
+ export type AuditKind = 'guard-deny' | 'pre-execute-deny' | 'execution-mutation' | 'result-redaction' | 'telemetry-redaction' | 'assistant-image-neutralized' | 'audit-failure';
32
32
  /** One durable record. Never carries matched secret text. */
33
33
  export interface AuditRecord {
34
34
  readonly v: number;
@@ -54,8 +54,25 @@ export interface AuditRecord {
54
54
  readonly spans?: readonly RedactedSpan[];
55
55
  /** Set when the scanned input exceeded the byte cap. */
56
56
  readonly truncatedScan?: boolean;
57
+ /**
58
+ * Runs of each invisible-character class the scanned text carried, by rule
59
+ * id. Counts only: the characters themselves are content, and a hidden
60
+ * instruction is exactly the content this file must not repeat.
61
+ */
62
+ readonly unicode?: Readonly<Record<string, number>>;
57
63
  /** Telemetry record channel, for `telemetry-redaction`. */
58
64
  readonly channel?: string;
65
+ /** Fields another plugin rewrote after the call was logged, for `execution-mutation`. */
66
+ readonly mutatedFields?: readonly string[];
67
+ /** Tool name the session log recorded, when a rewrite changed it. */
68
+ readonly originalTool?: string;
69
+ /**
70
+ * Hostname of a neutralised remote image destination, for
71
+ * `assistant-image-neutralized`. The hostname only: a path and a query
72
+ * string are where an exfiltration payload rides, and this file must not
73
+ * carry it.
74
+ */
75
+ readonly host?: string;
59
76
  }
60
77
  /** Append-only JSONL sink for this plugin's decisions. */
61
78
  export declare class AuditSink {
@@ -25,9 +25,24 @@
25
25
  * workspace path.
26
26
  * @module dsh-dlp/telemetry
27
27
  */
28
- import type { SessionTelemetryRecord } from '@deepseek-ai/dsh-session-telemetry';
28
+ import type { SessionTelemetryRecord, SessionTelemetrySharingStatus } from '@deepseek-ai/dsh-session-telemetry';
29
29
  import type { ResolvedPolicy } from './policy.ts';
30
30
  import { type RedactedSpan, type SpanHasher } from './redaction.ts';
31
+ /**
32
+ * What to tell the operator when the redaction seam will never dispatch.
33
+ *
34
+ * A `session-telemetry/record` listener mounts successfully and never runs
35
+ * unless a backend built a coordinator, and the shipped default builds none:
36
+ * the mode is `DISABLED`, so nothing is exported and nothing is dispatched.
37
+ * That is the safe posture, not a leak — but an operator who mounts a redactor
38
+ * under it sees every signal of success and has verified nothing. The
39
+ * backend's own `sharing` disclosure is the resolved answer, so this never
40
+ * guesses at `DSH_TELEMETRY_MODE`, which is only the base patch's default
41
+ * expression for a `mode` a deployment can also set directly.
42
+ * @param sharing - the mounted backend's disclosure, or `undefined` when no backend is mounted.
43
+ * @returns the line to report, or `undefined` when the seam does dispatch.
44
+ */
45
+ export declare function telemetrySeamNotice(sharing: SessionTelemetrySharingStatus | undefined): string | undefined;
31
46
  /** Rule identity recorded when a workspace path is replaced. */
32
47
  export declare const WORKSPACE_PATH_RULE = "dsh-dlp/telemetry-workspace-path";
33
48
  /** One redacted telemetry record and what was replaced in it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-dlp",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Data-loss-prevention plugin for DeepSeek Harness: a non-configurable tool guard floor, tool-result redaction, and fail-closed telemetry redaction",
5
5
  "license": "MIT",
6
6
  "author": "Ivan Tyshchenko <nsof@protonmail.com>",
@@ -27,6 +27,9 @@
27
27
  "type": "module",
28
28
  "main": "lib/index.js",
29
29
  "types": "lib/types/index.d.ts",
30
+ "bin": {
31
+ "dsh-dlp": "lib/cli.js"
32
+ },
30
33
  "exports": {
31
34
  ".": {
32
35
  "types": "./lib/types/index.d.ts",