veryfront/events

Import

ts
import {
  acceptAgUiEvent,
  acceptNativeEvent,
  assertEventSchemaValidator,
  createAgUiParser,
  createEventParser,
  parseAgUiEvent,
} from "veryfront/events";

Examples

Validate one event with an injected JSON Schema validator.

ts
import { createEventParser } from "veryfront/events";
import { createZodAdapter } from "@veryfront/ext-schema-zod";

const parser = createEventParser(createZodAdapter());

export function parseEvent(rawEvent: unknown) {
  const event = parser.parseEvent(rawEvent);
  console.log(event.type, event.data);
  return event;
}

Exports

Components

NameDescriptionSource
AG_UI_CORE_PACKAGEsource
AG_UI_CORE_VERSIONsource
AG_UI_EVENT_SCHEMAsource
AG_UI_EVENT_TYPESsource
AG_UI_PROTOCOL_VERSIONsource
AG_UI_RELEASEsource
AG_UI_RELEASE_COMMITsource
EVENT_SCHEMA_BY_TYPEsource
EVENT_SCHEMA_VALIDATOR_CONTRACTsource
EVENT_SCHEMA_VALIDATOR_PACKAGEsource
EVENT_TARGET_CATALOGsource
EVENT_TARGET_ENVELOPE_SCHEMAsource
EVENT_TARGET_PAYLOAD_EXAMPLESsource
EVENT_TARGET_PAYLOAD_SCHEMASsource
EVENT_TYPESsource

Functions

NameDescriptionSource
acceptAgUiEventValidate an occurrence, normalize its frames and return the next stream state.source
acceptNativeEventsource
assertEventSchemaValidatorsource
createAgUiParserCreate an AG-UI 1.0 parser with the supplied schema validator.source
createEventParsersource
parseAgUiEventParse an AG-UI event; throw when it violates the pinned contract.source
parseEventsource
projectAgUiEventProject an accepted occurrence using explicit native identity mappings.source
projectNativeEventsource
registerEventSchemaValidatorsource
safeParseAgUiEventValidate an AG-UI event and return its value or validation issues.source
safeParseEventsource
tryResolveEventSchemaValidatorsource
unregisterEventSchemaValidatorsource

Types

NameDescriptionSource
AcceptAgUiEventInputsource
AcceptAgUiEventResultsource
AcceptNativeEventInputsource
AgUiAcceptedEventsource
AgUiAcceptedEventCommandsource
AgUiEventsource
AgUiEventTypesource
AgUiExpandedEventCommandsource
AgUiJsonValuesource
AgUiMissingFactRequirementCommandsource
AgUiNormalizationCommandsource
AgUiNormalizationStatesource
AgUiParseIssuesource
AgUiParsersource
AgUiParseResultsource
AgUiPendingStreamsource
AgUiProducerOccurrencesource
ChildRunsource
ChildRunReportedsource
CloudEventsExtensionAttributesource
ErrorInfosource
EventDataschemasource
EventEnvelopeAn event envelope with the schema, payload, and identifiers required by its event type.source
EventExtensionAttributessource
EventJsonObjectsource
EventJsonValuesource
EventParseIssuesource
EventParsersource
EventParseResultsource
EventPayloadsource
EventPayloadByTypesource
EventRecordsource
EventTypesource
EventWithExtensionssource
ExtensionsOptional producer-owned absolute URI namespaces, such as https://example.test/extensions or urn:org.example:telemetry. Each value is a JSON object; core fields remain closed. Publishing extensions still requires authorization.source
InputFieldsource
InputRequestChangessource
InputRequestCreatedsource
InputRequestReferencesource
InputRequestSnapshotsource
InputRequestUpdatedsource
JsonObjectAny JSON object carried in an Agent Events Protocol payload.source
JsonValueAny JSON value carried in an Agent Events Protocol payload.source
MessageDocumentReferencedsource
MessageFileAttachedsource
MessageReasoningDeltaEmittedsource
MessageReasoningEndedsource
MessageReasoningStartedsource
MessageTextDeltaEmittedsource
MessageTextEndedsource
MessageTextStartedsource
MessageUrlReferencedsource
ModelCallInputCapturedsource
ModelCallUsageRecordedsource
ModelDescriptorsource
ModelInputFull captured model input or an explicit authorized redaction. Redaction is not missing-input recovery.source
ProjectAgUiEventInputsource
ProjectNativeEventInputsource
RunCancelledsource
RunEnqueuedsource
RunFailedsource
RunLogCapturedsource
RunRequestedsource
RunStartedsource
RunSucceededsource
StepCancelledsource
StepEndedsource
StepFailedsource
StepStartedsource
StepSucceededsource
StreamClosedsource
StreamHeartbeatEmittedsource
TokenUsageInput/output token counts are the base counters. cacheRead and cacheWrite are subsets of input; reasoning is a subset of output. These counters are not additive charges and must not be added to input/output or total. Optional total is actually reported, not synthesized. Cross-field subset bounds are semantic conformance checks.source
ToolCallArgumentsDeltaEmittedsource
ToolCallArgumentsEndedsource
ToolCallRefusedsource
ToolCallResultDeliveryFailedsource
ToolCallResultRecordedsource
ToolCallResultSubmittedsource
ToolCallStartedsource
ToolCallStatusReportedsource

Deep imports

These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.

veryfront/events/ag-ui

Public AG-UI interoperability helpers. This entry point exposes the pinned AG-UI 1.0 parser, pure/stateful normalization helpers, and the schema-validated native-profile dispatcher used by API and Studio integration. Durable persistence belongs to API receipt checkpoints. Lower-level family helpers and generated read-frame constructors stay internal while the profile contracts settle.

ts
import { acceptAgUiEvent, createAgUiParser, parseAgUiEvent } from "veryfront/events/ag-ui";

Components

NameDescriptionSource
AG_UI_CORE_PACKAGEsource
AG_UI_CORE_VERSIONsource
AG_UI_EVENT_SCHEMAsource
AG_UI_EVENT_TYPESsource
AG_UI_PROTOCOL_VERSIONsource
AG_UI_RELEASEsource
AG_UI_RELEASE_COMMITsource

Functions

NameDescriptionSource
acceptAgUiEventValidate an occurrence, normalize its frames and return the next stream state.source
createAgUiParserCreate an AG-UI 1.0 parser with the supplied schema validator.source
parseAgUiEventParse an AG-UI event; throw when it violates the pinned contract.source
parseNativeProfileRecordValidate a native interoperability record against its family schema.source
projectAgUiEventProject an accepted occurrence using explicit native identity mappings.source
projectAgUiNativeProfileEventMap an AG-UI event to a native record with explicit occurrence and ownership context.source
projectNativeProfileEventConvert a native interoperability record into its AG-UI event.source
safeParseAgUiEventValidate an AG-UI event and return its value or validation issues.source

Types

NameDescriptionSource
AcceptAgUiEventInputsource
AcceptAgUiEventResultsource
AgUiAcceptedEventsource
AgUiAcceptedEventCommandsource
AgUiEventsource
AgUiEventByTypesource
AgUiEventOfsource
AgUiEventTypesource
AgUiEventWithExtensionssource
AgUiExpandedEventCommandsource
AgUiJsonValuesource
AgUiMissingFactRequirementCommandsource
AgUiNativeProfileContextsource
AgUiNativeProfileFamilysource
AgUiNativeProfileProjectionCommandsource
AgUiNativeProfileRecordsource
AgUiNativeProfileSupportedEventsource
AgUiNormalizationCommandsource
AgUiNormalizationStatesource
AgUiParseIssuesource
AgUiParsersource
AgUiParseResultsource
AgUiPendingStreamsource
AgUiProducerOccurrencesource
ProjectAgUiEventInputsource
ProjectAgUiNativeProfileInputsource
ProjectNativeProfileInputsource

veryfront/events/canonical-v1

Explicit canonical-v1 read contracts. Existing pilot event parsers are unchanged.

ts
import {
  decodeDescendantCursorV1,
  parseDescendantRunReadPageV1,
  parseEventDiscoveryV1,
} from "veryfront/events/canonical-v1";

Functions

NameDescriptionSource
decodeDescendantCursorV1Validate a bounded descendant token without replacing server scope authorization.source
parseDescendantRunReadPageV1Validate an explicit cross-store descendant history page.source
parseEventDiscoveryV1Validate the canonical event discovery contract.source
parseEventErrorV1Validate a content-free canonical protocol error.source
parseRunReadMemberV1Validate one canonical or authorized legacy history member.source
parseRunReadPageV1Validate a canonical history page without dropping legacy members.source
parseStreamMemberV1Validate a durable or transient canonical stream member.source

Types

NameDescriptionSource
CanonicalEventV1source
CanonicalMemberV1source
DescendantCursorV1source
DescendantRunReadPageV1Additive cross-store descendant history profile; single-run pages remain unchanged.source
EventDiscoveryV1source
EventViewV1Caller-authorized canonical-v1 read values. Legacy payloads remain opaque JSON.source
LegacyMemberV1source
LegacyReasonV1source
RunReadMemberV1source
RunReadMetadataV1source
RunReadPageV1source
StreamMemberV1source
TransientMemberV1source