integrationv1

package
v0.2.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

FlowBaton Integration Contract v1

This public contract is the only supported boundary between FlowBaton and a separate process such as Studio Core. A proprietary consumer must not import Go packages from internal/..., link private product behavior into FlowBaton, or make FlowBaton depend on the consumer at build or runtime.

schema.json defines the identity and capability handshake emitted before any project, build, or device mutation. It binds the executable version and SHA-256, the Apache-2.0 license, the supported transports, authentication profiles, and the exact versions of the flow, DeviceSession, and report contracts.

CLI/stdio and MCP retain their native invocation security. Authenticated local IPC requires OS peer identity, a per-launch token, endpoint channel binding, nonce, and expiry. Authenticated remote IPC requires mutual TLS, a signed short-lived session token, TLS-exporter channel binding, explicit tenant and principal scope, nonce/expiry, and lease-generation replay protection. A bearer token without channel binding or a caller-supplied tenant ID is insufficient.

All transports preserve the same command, capability, error, and evidence semantics. A remote service must derive tenant and principal from authenticated identity and reject cross-tenant resource IDs before acquisition. Unknown contract/auth versions, identity or digest mismatch, stale/replayed nonce, or an unsupported capability must fail closed before mutation.

JSON Schema closes each advertised profile shape. Cross-array uniqueness and the rule that every advertised authenticated transport has exactly one matching profile are normative semantic checks implemented by ValidateJSON in this directory; schema validation alone is insufficient.

Compatibility policy is N/N-1 within a supported major contract line. Consumers must display the negotiated FlowBaton version and digest and keep bundled OSS notices. FlowBaton remains fully usable without any proprietary consumer.

The Go package exports Document, its component types, normative authentication profiles, and NewDocument. Runtime producers must construct the handshake with NewDocument; it performs the same semantic validation as ValidateJSON before the document can be emitted. flowbaton serve publishes the resulting document at GET /v1/integration before any configured driver opens. Its readiness route stays closed until every driver is open and the database node is active.

Documentation

Overview

Package integrationv1 implements the normative cross-field checks for the public FlowBaton Integration v1 handshake.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateJSON

func ValidateJSON(data []byte) error

ValidateJSON rejects ambiguous or uncovered Integration v1 handshakes. JSON Schema validation remains required for generic consumers; this function is the normative executable check for invariants spanning transports and profiles.

Types

type AuthProfile

type AuthProfile = authProfile

AuthProfile describes one authenticated transport profile.

func LocalCoreProfile

func LocalCoreProfile() AuthProfile

LocalCoreProfile returns the normative authenticated local IPC profile.

func RemoteCloudMacProfile

func RemoteCloudMacProfile() AuthProfile

RemoteCloudMacProfile returns the normative authenticated remote profile.

type Document

type Document = handshakeDocument

Document is the public Integration v1 handshake emitted before mutation.

func NewDocument

func NewDocument(identity Executable, transports []string, protocolVersions Protocols, profiles []AuthProfile, capabilities []string) (Document, error)

NewDocument constructs and semantically validates an Integration v1 handshake. Callers cannot accidentally emit a document the validator rejects.

type Executable

type Executable = executable

Executable identifies the exact FlowBaton process producing the handshake.

type Protocols

type Protocols = protocols

Protocols names the negotiated public contract versions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL