Core concepts

Mask backends

local, hosted, and sidecar mask paths — one field drives init, Cursor hooks, and billing honesty.

View as Markdown

Blekline uses one field — maskBackend — so clients cannot accidentally call hosted /api/mask while also using an in-cluster sidecar.

BackendPlan shellWhere mask runsHosted /api/mask
localLocalIDE hooks + stdio MCPNo
hostedMarkBlekline cloud proxyYes (3M guarded tokens / mo)
sidecarRedact / EnterpriseNHIM sidecar in your clusterNever

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:

BackendpromptMaskSourceNotes
locallocalIDE hooks call @blekline/contracts pipeline directly
sidecarsidecarHooks POST to sidecar /v1/mask when sidecarUrl set (BLEKLINE_SIDECAR_URL); promptGuardMode: always
hostedcloudCalls 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.