Skip to content

API Reference parrot_formdesigner.services.sandbox.projector

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.services.sandbox.projector

View source

Live FormEventContext -> serialisable SandboxContext (FEAT-459 / M7).

Resolves OQ-5: token/headers NEVER cross the sandbox boundary at any tier (structurally — SandboxContext has no such field to populate). Tier 1 receives no identity at all. Tiers 2-4 receive an identical projected identity set — the governing invariant is that MORE TIER NEVER MEANS MORE SECRETS, only more brokered actions (enforced elsewhere, by the host broker, TASK-3171).

Alias AuthContext

Re-exported from parrot_formdesigner.services.auth_context.AuthContext.

Alias CapabilityTier

Re-exported from parrot_formdesigner.core.snippets.CapabilityTier.

Class ContextProjector

Converts a live FormEventContext into a serialisable SandboxContext.

Method ContextProjector.project

Project ctx down to exactly what bundle's tier is allowed to see.

project(ctx: FormEventContext, bundle: SnippetBundle) -> SandboxContext

Parameter Type Default Description
ctx FormEventContext The live dispatch-time context. ctx.auth_context is read ONLY for .scheme and .claims (never .token, never .headers) and only at tier >= 2.
bundle SnippetBundle Supplies the tier (via bundle.manifest.tier) and the declared auth_claims allowlist.

Returns: SandboxContext — A SandboxContext safe to serialise across the worker boundary.

Raises:

  • TypeError — ctx.payload or ctx.schema_dump is not JSON-serialisable.

Alias FormEventContext

Re-exported from parrot_formdesigner.core.events.FormEventContext.

Attribute SAFE_CLAIM_KEYS

Type: frozenset[str]

Alias SandboxContext

Re-exported from parrot_formdesigner.core.snippets.SandboxContext.

Alias SnippetBundle

Re-exported from parrot_formdesigner.core.snippets.SnippetBundle.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally