{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Canonical cross-SDK API surface for the shared AFDATA contract (protocol builders/reader, output, redaction, CLI helpers, core types). The four SDKs synchronize on exactly two things: this core contract and the CLI helpers (the `cli` surface). Everything else is Rust-only: cli-help, skill-admin, tracing, and stream-redirect are implementation utilities that live only in the Rust crate; the Go/Python/TypeScript SDKs do not ship them. A `null` entry for a language means the symbol is intentionally absent there; add a `note` explaining why. Validated by scripts/validate_api_surface.py, wired into scripts/test.sh's static phase.",
"groups": [
{
"id": "json_result",
"kind": "fn",
"rust": "json_result",
"python": "json_result",
"typescript": "jsonResult",
"go": "NewJSONResult"
},
{
"id": "json_error",
"kind": "fn",
"rust": "json_error",
"python": "json_error",
"typescript": "jsonError",
"go": "NewJSONError"
},
{
"id": "json_progress",
"kind": "fn",
"rust": "json_progress",
"python": "json_progress",
"typescript": "jsonProgress",
"go": "NewJSONProgress"
},
{
"id": "json_log",
"kind": "fn",
"rust": "json_log",
"python": "json_log",
"typescript": "jsonLog",
"go": "NewJSONLog"
},
{
"id": "result_builder",
"kind": "type",
"rust": "ResultBuilder",
"python": "ResultBuilder",
"typescript": "JsonResultBuilder",
"go": "JSONResultBuilder"
},
{
"id": "error_builder",
"kind": "type",
"rust": "ErrorBuilder",
"python": "ErrorBuilder",
"typescript": "JsonErrorBuilder",
"go": "JSONErrorBuilder"
},
{
"id": "progress_builder",
"kind": "type",
"rust": "ProgressBuilder",
"python": "ProgressBuilder",
"typescript": "JsonProgressBuilder",
"go": "JSONProgressBuilder"
},
{
"id": "log_builder",
"kind": "type",
"rust": "LogBuilder",
"python": "LogBuilder",
"typescript": "JsonLogBuilder",
"go": "JSONLogBuilder"
},
{
"id": "event",
"kind": "type",
"rust": "Event",
"python": "Event",
"typescript": "Event",
"go": "Event"
},
{
"id": "event_build_error",
"kind": "type",
"rust": "BuildError",
"python": "EventBuildError",
"typescript": "EventBuildError",
"go": "BuilderError"
},
{
"id": "log_level",
"kind": "type",
"rust": "LogLevel",
"python": "LogLevel",
"typescript": "LogLevel",
"go": "LogLevel"
},
{
"id": "validate_protocol_event",
"kind": "fn",
"rust": "validate_protocol_event",
"python": "validate_protocol_event",
"typescript": "validateProtocolEvent",
"go": "ValidateProtocolEvent"
},
{
"id": "validate_protocol_stream",
"kind": "fn",
"rust": "validate_protocol_stream",
"python": "validate_protocol_stream",
"typescript": "validateProtocolStream",
"go": "ValidateProtocolStream"
},
{
"id": "protocol_violation",
"kind": "type",
"rust": "ProtocolViolation",
"python": null,
"typescript": null,
"go": null,
"note": "Rust-only typed protocol-validation error (stable rule slug + JSON pointer + message) returned by validate_protocol_event/validate_protocol_stream. Python/TS/Go SDKs still surface validation failures as a plain message (ValueError / Error / error), not yet upgraded to the typed violation \u2014 a tracked cross-SDK gap."
},
{
"id": "build_cli_error",
"kind": "fn",
"rust": "build_cli_error",
"python": "build_cli_error",
"typescript": "buildCliError",
"go": "BuildCLIError"
},
{
"id": "decode_protocol_event",
"kind": "fn",
"rust": "decode_protocol_event",
"python": "decode_protocol_event",
"typescript": "decodeProtocolEvent",
"go": "DecodeProtocolEvent"
},
{
"id": "event_decode_error",
"kind": "type",
"rust": "EventDecodeError",
"python": "EventDecodeError",
"typescript": "EventDecodeError",
"go": "EventDecodeError"
},
{
"id": "decoded_event",
"kind": "type",
"rust": "DecodedEvent",
"python": null,
"typescript": "DecodedEvent",
"go": "DecodedEvent",
"note": "Rust/TS/Go use a decoded-event enum/union/interface; Python returns one of DecodedResult/DecodedError/DecodedProgress/DecodedLog directly without a wrapping union type."
},
{
"id": "decoded_result",
"kind": "type",
"rust": "DecodedResult",
"python": "DecodedResult",
"typescript": "DecodedResult",
"go": "DecodedResult"
},
{
"id": "decoded_error",
"kind": "type",
"rust": "DecodedError",
"python": "DecodedError",
"typescript": "DecodedError",
"go": "DecodedError"
},
{
"id": "decoded_progress",
"kind": "type",
"rust": "DecodedProgress",
"python": "DecodedProgress",
"typescript": "DecodedProgress",
"go": "DecodedProgress"
},
{
"id": "decoded_log",
"kind": "type",
"rust": "DecodedLog",
"python": "DecodedLog",
"typescript": "DecodedLog",
"go": "DecodedLog"
},
{
"id": "render",
"kind": "fn",
"rust": "render",
"python": "render",
"typescript": "render",
"go": "Render",
"note": "The single value \u00d7 format \u00d7 options \u2192 String entry point. Replaces the former output_json/output_yaml/output_plain (+ _with_options) and cli_output/cli_output_with_options families. Rust/Go take an explicit OutputOptions argument (OutputOptions: Default); Python/TS keep it an optional keyword/parameter."
},
{
"id": "redacted_value",
"kind": "fn",
"rust": "redacted_value",
"python": "redacted_value",
"typescript": "redactedValue",
"go": "RedactedValue"
},
{
"id": "redact_url_secrets",
"kind": "fn",
"rust": "redact_url_secrets",
"python": "redact_url_secrets",
"typescript": "redactUrlSecrets",
"go": "RedactURLSecrets"
},
{
"id": "redact_argv",
"kind": "fn",
"rust": "redact_argv",
"python": "redact_argv",
"typescript": "redactArgv",
"go": "RedactArgv",
"note": "Rust/Go also expose it as a configured Redactor method (.argv()/.Argv()) for custom secret_names/policy; Python/TS take secret_names/policy as keyword arguments, matching redacted_value/redact_url_secrets."
},
{
"id": "redactor",
"kind": "type",
"rust": "Redactor",
"python": null,
"typescript": null,
"go": "Redactor",
"note": "Rust/Go use a configured Redactor value (.value()/.url() or .Value()/.URL()) for custom secret_names/policy; Python/TS take secret_names/policy as keyword arguments directly on redacted_value/redact_url_secrets/OutputOptions instead of a separate type."
},
{
"id": "redaction_policy",
"kind": "type",
"rust": "RedactionPolicy",
"python": "RedactionPolicy",
"typescript": "RedactionPolicy",
"go": "RedactionPolicy"
},
{
"id": "plain_style",
"kind": "type",
"rust": "PlainStyle",
"python": "PlainStyle",
"typescript": "PlainStyle",
"go": "PlainStyle"
},
{
"id": "output_options",
"kind": "type",
"rust": "OutputOptions",
"python": "OutputOptions",
"typescript": "OutputOptions",
"go": "OutputOptions"
},
{
"id": "normalize_utc_offset",
"kind": "fn",
"rust": "normalize_utc_offset",
"python": "normalize_utc_offset",
"typescript": "normalizeUtcOffset",
"go": "NormalizeUTCOffset"
},
{
"id": "is_valid_rfc3339_date",
"kind": "fn",
"rust": "is_valid_rfc3339_date",
"python": "is_valid_rfc3339_date",
"typescript": "isValidRfc3339Date",
"go": "IsValidRFC3339Date"
},
{
"id": "is_valid_rfc3339_time",
"kind": "fn",
"rust": "is_valid_rfc3339_time",
"python": "is_valid_rfc3339_time",
"typescript": "isValidRfc3339Time",
"go": "IsValidRFC3339Time"
},
{
"id": "is_valid_rfc3339",
"kind": "fn",
"rust": "is_valid_rfc3339",
"python": "is_valid_rfc3339",
"typescript": "isValidRfc3339",
"go": "IsValidRFC3339"
},
{
"id": "is_valid_bcp47",
"kind": "fn",
"rust": "is_valid_bcp47",
"python": "is_valid_bcp47",
"typescript": "isValidBcp47",
"go": "IsValidBCP47"
},
{
"id": "output_format",
"kind": "type",
"rust": "OutputFormat",
"python": "OutputFormat",
"typescript": "OutputFormat",
"go": "OutputFormat"
},
{
"id": "log_filters",
"kind": "type",
"rust": "LogFilters",
"python": "LogFilters",
"typescript": "LogFilters",
"go": "LogFilters"
},
{
"id": "cli_parse_output",
"kind": "fn",
"rust": "cli_parse_output",
"python": "cli_parse_output",
"typescript": "cliParseOutput",
"go": "CliParseOutput"
},
{
"id": "cli_parse_log_filters",
"kind": "fn",
"rust": "cli_parse_log_filters",
"python": "cli_parse_log_filters",
"typescript": "cliParseLogFilters",
"go": "CliParseLogFilters"
},
{
"id": "cli_emitter",
"kind": "type",
"rust": "CliEmitter",
"python": "CliEmitter",
"typescript": "CliEmitter",
"go": "CliEmitter"
},
{
"id": "cli_emitter_new",
"kind": "fn",
"rust": null,
"python": null,
"typescript": null,
"go": "NewCliEmitter",
"note": "Rust/Python/TS construct via CliEmitter's own constructor (CliEmitter::new / CliEmitter(...) / new CliEmitter(...)), not a separate top-level export. Go has no constructor methods, so this is a free function."
},
{
"id": "cli_emitter_new_with_options",
"kind": "fn",
"rust": null,
"python": null,
"typescript": null,
"go": "NewCliEmitterWithOptions",
"note": "Go-only free constructor (Go has no constructor methods); Rust/Python/TS use CliEmitter::with_options / CliEmitter(..., options=...) / new CliEmitter(..., options) instead."
},
{
"id": "output_to",
"kind": "type",
"rust": "OutputTo",
"python": "OutputTo",
"typescript": "OutputTo",
"go": "OutputTo"
},
{
"id": "parse_output_to",
"kind": "fn",
"rust": null,
"python": null,
"typescript": "parseOutputTo",
"go": "ParseOutputTo",
"note": "Rust/Python expose this as the OutputTo::parse associated function / OutputTo.parse classmethod, not a separate top-level export; Go/TS provide it as a free function."
},
{
"id": "cli_emitter_finite",
"kind": "fn",
"rust": null,
"python": null,
"typescript": null,
"go": "NewCliEmitterFinite",
"note": "Go-only free constructor for a finite one-shot emitter (result to stdout, error/progress/log to stderr); Rust/Python/TS construct via CliEmitter methods (finite / finite_with / finiteWith), not separate top-level exports."
},
{
"id": "cli_emitter_finite_with_options",
"kind": "fn",
"rust": null,
"python": null,
"typescript": null,
"go": "NewCliEmitterFiniteWithOptions",
"note": "Go-only free constructor: finite one-shot emitter with explicit output options; Rust/Python/TS use CliEmitter's finite constructor with an options argument instead."
},
{
"id": "cli_emitter_from_output_to",
"kind": "fn",
"rust": null,
"python": null,
"typescript": null,
"go": "NewCliEmitterFromOutputTo",
"note": "Go-only free constructor that builds a finite (split) or unified emitter from a parsed OutputTo selector, wired to the process streams; Rust/Python/TS use CliEmitter::from_output_to / from_output_to / fromOutputTo methods."
},
{
"id": "cli_emitter_from_output_to_with_options",
"kind": "fn",
"rust": null,
"python": null,
"typescript": null,
"go": "NewCliEmitterFromOutputToWithOptions",
"note": "Go-only free constructor: from-OutputTo with explicit output options; Rust/Python/TS use the from_output_to method with an options argument instead."
},
{
"id": "output_options_for_policy",
"kind": "fn",
"rust": null,
"python": null,
"typescript": "outputOptionsForPolicy",
"go": "OutputOptionsForPolicy",
"note": "Rust/Python expose this as an associated function/classmethod (OutputOptions::for_policy / OutputOptions.for_policy), not a separate top-level export. Go/TS don't have that pattern, so it's a free function."
},
{
"id": "cli_event_writer",
"kind": "type",
"rust": null,
"python": null,
"typescript": "CliEventWriter",
"go": null,
"note": "TS-only structural type for the writer CliEmitter accepts; Rust expresses the equivalent as a generic bound (W: Write), Python/Go accept any writable/file-like object without naming the shape."
},
{
"id": "json_value",
"kind": "type",
"rust": null,
"python": null,
"typescript": "JsonValue",
"go": null,
"note": "TS-only exported type alias for a JSON value. Rust uses serde_json::Value (from the serde_json crate, not this crate's own naming); Python/Go use the host language's dynamic Any/any."
},
{
"id": "cli_emitter_error",
"kind": "type",
"rust": "CliEmitterError",
"python": null,
"typescript": null,
"go": null,
"note": "Rust-only: a typed write-failure error for CliEmitter. Python/TS/Go raise/return the host language's native I/O error instead."
},
{
"id": "build_cli_version",
"kind": "fn",
"rust": "build_cli_version",
"python": "build_cli_version",
"typescript": "buildCliVersion",
"go": "BuildCliVersion"
},
{
"id": "cli_render_version",
"kind": "fn",
"rust": "cli_render_version",
"python": "cli_render_version",
"typescript": "cliRenderVersion",
"go": "CliRenderVersion"
},
{
"id": "cli_handle_version_or_continue",
"kind": "fn",
"rust": "cli_handle_version_or_continue",
"python": "cli_handle_version_or_continue",
"typescript": "cliHandleVersionOrContinue",
"go": "CliHandleVersionOrContinue"
}
]
}