/** * Schemastery configuration schema and defaults. The public defaults follow the * design document: observe first (`monitor`), fail closed on evaluation errors, * and deny high-risk credential paths by default when enforcement is enabled. * @module dsh-sensitive-guard/config */ import Schema from '@deepseek-ai/schemastery'; /** Files that are examples, not live credentials, and stay readable by default. */ export declare const DEFAULT_ALLOW_PATHS: readonly ['**/.env.example', '**/.env.sample', '**/.env.template']; /** Credential-bearing paths denied by default in `enforce` mode. */ export declare const DEFAULT_DENY_PATHS: readonly ['**/.env', '**/.env.*', '**/.ssh/**', '**/.aws/**', '**/.gnupg/**', '**/.kube/**', '**/.npmrc', '**/.netrc', '**/*.pem', '**/*.key', '**/id_rsa*', '**/id_ed25519*', '**/.dsh/.credentials.yaml']; export declare const Config: Schema; /** Decision when no rule matches. */ defaultDecision: Schema<"allow" | "ask" | "deny", "allow" | "ask" | "deny", "defined">; /** Deny (instead of ask) when rule evaluation throws. */ failClosed: Schema; redact: Schema; /** Redact tool results at `tools/post-execute`. */ toolResults: Schema; /** Redact prompt sections, runtime contexts, and variables. */ systemPrompt: Schema; /** Redact the durable copy of PTC sub-call logs. */ ptcLog: Schema; /** Append a count-only notice message when a step is redacted. */ notify: Schema; }>>, Schemastery.ObjectT; /** Redact tool results at `tools/post-execute`. */ toolResults: Schema; /** Redact prompt sections, runtime contexts, and variables. */ systemPrompt: Schema; /** Redact the durable copy of PTC sub-call logs. */ ptcLog: Schema; /** Append a count-only notice message when a step is redacted. */ notify: Schema; }>>, "plain">; levels: Schema; output: Schema<"aggressive" | "balanced" | "minimal", "aggressive" | "balanced" | "minimal", "defined">; }>>, Schemastery.ObjectT; output: Schema<"aggressive" | "balanced" | "minimal", "aggressive" | "balanced" | "minimal", "defined">; }>>, "plain">; policy: Schema; /** Append the vendored high-risk baseline after user rules. */ builtin: Schema; /** Upper bound on loaded rules (user + baseline + generated path rules). */ maxRules: Schema; }>>, Schemastery.ObjectT; /** Append the vendored high-risk baseline after user rules. */ builtin: Schema; /** Upper bound on loaded rules (user + baseline + generated path rules). */ maxRules: Schema; }>>, "plain">; paths: Schema; allow: Schema; }>>, Schemastery.ObjectT; allow: Schema; }>>, "plain">; network: Schema; /** Decision for outbound URLs with credential-like query parameters. */ default: Schema<"allow" | "ask" | "deny", "allow" | "ask" | "deny", "defined">; }>>, Schemastery.ObjectT; /** Decision for outbound URLs with credential-like query parameters. */ default: Schema<"allow" | "ask" | "deny", "allow" | "ask" | "deny", "defined">; }>>, "plain">; egress: Schema; /** Fixed loopback port; the launch environment must name this exact port. */ port: Schema; /** Refuse to mount when `enforce` cannot bind the listener. */ failClosed: Schema; /** * Decision for a destination that matches no rule. `allow` keeps the guard * auditable and quiet (default); `deny` turns the lists into an allowlist. */ unknown: Schema<"allow" | "deny", "allow" | "deny", "defined">; /** Allowed `host` or `host:port` entries; globs are accepted in the host. */ allow: Schema; /** Denied `host` or `host:port` entries; evaluated before `allow`. */ deny: Schema; /** Optional upstream proxy to chain CONNECT tunnels through. */ upstream: Schema; /** Probe the listener at mount and record the result in the audit log. */ canary: Schema; }>>, Schemastery.ObjectT; /** Fixed loopback port; the launch environment must name this exact port. */ port: Schema; /** Refuse to mount when `enforce` cannot bind the listener. */ failClosed: Schema; /** * Decision for a destination that matches no rule. `allow` keeps the guard * auditable and quiet (default); `deny` turns the lists into an allowlist. */ unknown: Schema<"allow" | "deny", "allow" | "deny", "defined">; /** Allowed `host` or `host:port` entries; globs are accepted in the host. */ allow: Schema; /** Denied `host` or `host:port` entries; evaluated before `allow`. */ deny: Schema; /** Optional upstream proxy to chain CONNECT tunnels through. */ upstream: Schema; /** Probe the listener at mount and record the result in the audit log. */ canary: Schema; }>>, "plain">; pii: Schema; /** Empty means `$DSH_HOME/sensitive-guard-pii.key`. */ keyFile: Schema; /** Reserved for the restore command; unsupported in this version. */ restore: Schema; }>>, Schemastery.ObjectT; /** Empty means `$DSH_HOME/sensitive-guard-pii.key`. */ keyFile: Schema; /** Reserved for the restore command; unsupported in this version. */ restore: Schema; }>>, "plain">; limits: Schema; maxArgsBytes: Schema; }>>, Schemastery.ObjectT; maxArgsBytes: Schema; }>>, "plain">; audit: Schema; path: Schema; rotateBytes: Schema; }>>, Schemastery.ObjectT; path: Schema; rotateBytes: Schema; }>>, "plain">; }>>, Schemastery.ObjectT; /** Decision when no rule matches. */ defaultDecision: Schema<"allow" | "ask" | "deny", "allow" | "ask" | "deny", "defined">; /** Deny (instead of ask) when rule evaluation throws. */ failClosed: Schema; redact: Schema; /** Redact tool results at `tools/post-execute`. */ toolResults: Schema; /** Redact prompt sections, runtime contexts, and variables. */ systemPrompt: Schema; /** Redact the durable copy of PTC sub-call logs. */ ptcLog: Schema; /** Append a count-only notice message when a step is redacted. */ notify: Schema; }>>, Schemastery.ObjectT; /** Redact tool results at `tools/post-execute`. */ toolResults: Schema; /** Redact prompt sections, runtime contexts, and variables. */ systemPrompt: Schema; /** Redact the durable copy of PTC sub-call logs. */ ptcLog: Schema; /** Append a count-only notice message when a step is redacted. */ notify: Schema; }>>, "plain">; levels: Schema; output: Schema<"aggressive" | "balanced" | "minimal", "aggressive" | "balanced" | "minimal", "defined">; }>>, Schemastery.ObjectT; output: Schema<"aggressive" | "balanced" | "minimal", "aggressive" | "balanced" | "minimal", "defined">; }>>, "plain">; policy: Schema; /** Append the vendored high-risk baseline after user rules. */ builtin: Schema; /** Upper bound on loaded rules (user + baseline + generated path rules). */ maxRules: Schema; }>>, Schemastery.ObjectT; /** Append the vendored high-risk baseline after user rules. */ builtin: Schema; /** Upper bound on loaded rules (user + baseline + generated path rules). */ maxRules: Schema; }>>, "plain">; paths: Schema; allow: Schema; }>>, Schemastery.ObjectT; allow: Schema; }>>, "plain">; network: Schema; /** Decision for outbound URLs with credential-like query parameters. */ default: Schema<"allow" | "ask" | "deny", "allow" | "ask" | "deny", "defined">; }>>, Schemastery.ObjectT; /** Decision for outbound URLs with credential-like query parameters. */ default: Schema<"allow" | "ask" | "deny", "allow" | "ask" | "deny", "defined">; }>>, "plain">; egress: Schema; /** Fixed loopback port; the launch environment must name this exact port. */ port: Schema; /** Refuse to mount when `enforce` cannot bind the listener. */ failClosed: Schema; /** * Decision for a destination that matches no rule. `allow` keeps the guard * auditable and quiet (default); `deny` turns the lists into an allowlist. */ unknown: Schema<"allow" | "deny", "allow" | "deny", "defined">; /** Allowed `host` or `host:port` entries; globs are accepted in the host. */ allow: Schema; /** Denied `host` or `host:port` entries; evaluated before `allow`. */ deny: Schema; /** Optional upstream proxy to chain CONNECT tunnels through. */ upstream: Schema; /** Probe the listener at mount and record the result in the audit log. */ canary: Schema; }>>, Schemastery.ObjectT; /** Fixed loopback port; the launch environment must name this exact port. */ port: Schema; /** Refuse to mount when `enforce` cannot bind the listener. */ failClosed: Schema; /** * Decision for a destination that matches no rule. `allow` keeps the guard * auditable and quiet (default); `deny` turns the lists into an allowlist. */ unknown: Schema<"allow" | "deny", "allow" | "deny", "defined">; /** Allowed `host` or `host:port` entries; globs are accepted in the host. */ allow: Schema; /** Denied `host` or `host:port` entries; evaluated before `allow`. */ deny: Schema; /** Optional upstream proxy to chain CONNECT tunnels through. */ upstream: Schema; /** Probe the listener at mount and record the result in the audit log. */ canary: Schema; }>>, "plain">; pii: Schema; /** Empty means `$DSH_HOME/sensitive-guard-pii.key`. */ keyFile: Schema; /** Reserved for the restore command; unsupported in this version. */ restore: Schema; }>>, Schemastery.ObjectT; /** Empty means `$DSH_HOME/sensitive-guard-pii.key`. */ keyFile: Schema; /** Reserved for the restore command; unsupported in this version. */ restore: Schema; }>>, "plain">; limits: Schema; maxArgsBytes: Schema; }>>, Schemastery.ObjectT; maxArgsBytes: Schema; }>>, "plain">; audit: Schema; path: Schema; rotateBytes: Schema; }>>, Schemastery.ObjectT; path: Schema; rotateBytes: Schema; }>>, "plain">; }>>, "plain">; /** Validated, default-filled configuration passed to `apply`. */ export type GuardConfig = ReturnType; /** * Normalize a partial plugin config (tests, loader re-validation) into the * complete shape. Invalid values throw here, which is the intended fail-loud * startup behaviour. */ export declare function resolveConfig(input?: unknown): GuardConfig; //# sourceMappingURL=config.d.ts.map