Blekline uses one field — maskBackend — so clients cannot accidentally call hosted /api/mask while also using an in-cluster sidecar.
| Backend | Plan shell | Where mask runs | Hosted /api/mask |
|---|---|---|---|
local | Local | IDE hooks + stdio MCP | No |
hosted | Mark | Blekline cloud proxy | Yes (3M guarded tokens / mo) |
sidecar | Redact / Enterprise | NHIM sidecar in your cluster | Never |
Parity (G3): Sidecar, hooks, and hosted pre-Azure paths share @blekline/contracts runLocalMaskPipeline — deterministic secrets, finance regional (EMŠO, OIB, IBAN checksum), and discovery regex rules.
Sidecar Azure (shipped): NHIM sidecar runs @blekline/mask-pipeline runFullMaskPipeline with customer Azure NER when BLEKLINE_MASK_NER_MODE=azure (banking default in deploy/k8s/sidecar/values-production.yaml). Same fail-closed semantics as hosted Mark.
Optional customer Azure NER on sidecar: mount AZURE_LANGUAGE_ENDPOINT + AZURE_LANGUAGE_KEY on the sidecar Deployment — see deploy/k8s/sidecar/README.md and docs/enterprise-private/CUSTOMER_AZURE_RESIDENCY.md.
Policy file
.blekline/policy.json:
{
"maskBackend": "local",
"apiUrl": "https://app.blekline.com",
"workspaceToken": "blw_..."
}
Set via init:
npx @blekline/init --path local # maskBackend local
npx @blekline/init --path mark # maskBackend hosted
npx @blekline/init --path redact # maskBackend sidecar
npx @blekline/init --path enterprise # maskBackend sidecar
Legacy paths hosted, fleet, and in_vpc still work and map to the same backends.
Or explicitly: --mask-backend local|hosted|sidecar.
Cursor hooks
.blekline/cursor.json is derived from maskBackend:
| Backend | promptMaskSource | Notes |
|---|---|---|
| local | local | IDE hooks call @blekline/contracts pipeline directly |
| sidecar | sidecar | Hooks POST to sidecar /v1/mask when sidecarUrl set (BLEKLINE_SIDECAR_URL); promptGuardMode: always |
| hosted | cloud | Calls hosted /api/mask with azure_first when promptGuardMode: always |
Native Cursor chat stays block + clipboard — not silent auto-send — on every backend.
Deploy guides
Billing honesty
- Mark hosted path increments guarded tokens (character-based). Enclave sidecar traffic does not.
- Redact production agents use the sidecar only — no hosted GT on the Enclave ingress path.
- See Pricing FAQ for overage and spend-cap behavior.