Guard Stream Args

Validates b.agent.stream.create opts (and the operator-supplied stream args). Refuses non-positive batch sizes, non-integer batch sizes (silent shard-style routing drift class — same shape Codex caught on v0.9.21), oversized batch sizes (back-pressure becomes meaningless), and structured-clone-unsafe filter shapes (functions / regex / Buffer in the cursor opts — same shape b.guardMailQuery refuses).

b.guardStreamArgs.validate(args, opts?) #

stable0.9.24
{
  profile:   "strict" | "balanced" | "permissive",
  posture:   "hipaa" | "pci-dss" | "gdpr" | "soc2",
}

Validate b.agent.stream.create opts shape. Returns the input on success; throws GuardStreamArgsError on refusal.

b.guardStreamArgs.validate({
  batchSize: 256,
  kind:      "search",
});

b.guardStreamArgs.compliancePosture(name) #

stable0.9.24hipaapci-dssgdprsoc2

Return the effective profile NAME for a compliance posture, or null for a name this parser does not map. Unlike the content-guard variant this returns the resolved profile string (every line-protocol parser composes gateContract.ALL_STRICT_POSTURES, so "hipaa" / "pci-dss" / "gdpr" / "soc2" all resolve to "strict") and never throws — the parser shape carries no overlay-clone, no buildProfile, and no loadRulePack. Wired by gateContract.defineParser.

b.guardStreamArgs.compliancePosture("hipaa");                   // → "strict"
b.guardStreamArgs.compliancePosture("not-a-regime");            // → null

Last updated 2026-08-08T16:39:49.652Z by seeder.