BYOA — Reference Adapter (TypeScript)
Public TypeScript sketch of the BYOA adapter boundary: a user-selected model or tool runs only with an explicit consent receipt.
TL;DR: Reference TypeScript BYOA adapter interface + two implementations (OpenAI HTTPS, Local MLX). Concept v0.X.
Summary
Status as of 2026-05-27: public reference excerpt.
This TypeScript sketch shows the BYOA adapter boundary: each adapter declares a runtime, checks whether it can handle an input, and runs only with an explicit consent receipt.
byoa-reference-adapter-typescript.tstypescript · 28 lines
export type ConsentScope = "profile.read" | "portfolio.read" | "context.write";
export interface ConsentReceipt {
receiptId: string;
subject: string;
scope: ConsentScope;
grantedAt: string;
expiresAt?: string;
}
Full artifact
Public reference excerpt rendered inline above. The working implementation should be regenerated as a public artifact before any production code sample is distributed externally.
Cross-referenced from
- BYOA - parent concept.
Relations
- PCHP
- Mlx ON One Surfaces
- One
- BYOA — Bring Your Own AI / API / computer / system — Reference adapter (TypeScript)
Sources
- Internal Hussh source note - BYOA reference adapter code artifact artifact synthesis and public wiki publication context.