agent-first-data 0.26.2

A naming convention that lets AI agents understand your data without being told what it means, plus a CLI and library for reading and safely editing structured JSON, TOML, YAML, dotenv, and INI documents.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
{
  "$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"
    }
  ]
}