agent-first-data 0.26.2__tar.gz → 0.27.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/PKG-INFO +3 -3
  2. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/README.md +2 -2
  3. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data/__init__.py +0 -2
  4. agent_first_data-0.27.0/agent_first_data/assets/cli-help-v2.schema.json +115 -0
  5. agent_first_data-0.27.0/agent_first_data/assets/cli-spec-v1.schema.json +334 -0
  6. agent_first_data-0.27.0/agent_first_data/assets/protocol-v1.schema.json +178 -0
  7. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data/cli.py +15 -162
  8. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data/format.py +204 -60
  9. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data.egg-info/PKG-INFO +3 -3
  10. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data.egg-info/SOURCES.txt +4 -2
  11. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/pyproject.toml +1 -1
  12. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/tests/test_cli.py +0 -268
  13. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/tests/test_format.py +246 -3
  14. agent_first_data-0.27.0/tests/test_requires_python_floor.py +385 -0
  15. agent_first_data-0.26.2/agent_first_data/assets/cli-help-v1.schema.json +0 -227
  16. agent_first_data-0.26.2/agent_first_data/assets/protocol-v1.schema.json +0 -67
  17. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data/assets/registry.json +0 -0
  18. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data.egg-info/dependency_links.txt +0 -0
  19. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/agent_first_data.egg-info/top_level.txt +0 -0
  20. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/setup.cfg +0 -0
  21. {agent_first_data-0.26.2 → agent_first_data-0.27.0}/tests/test_no_stderr_policy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-first-data
3
- Version: 0.26.2
3
+ Version: 0.27.0
4
4
  Summary: 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.
5
5
  License-Expression: MIT
6
6
  Project-URL: Repository, https://github.com/agentfirstkit/agent-first-data
@@ -28,7 +28,7 @@ print(render(value, OutputFormat.JSON))
28
28
  print(render(value, OutputFormat.PLAIN))
29
29
  ```
30
30
 
31
- Useful names use Python casing: `render` (the single value x format x options -> str entry point; takes an `OutputFormat` and an optional keyword-only `options=`), `redacted_value`, `redact_url_secrets`, `redact_argv`, `normalize_utc_offset`, `is_valid_rfc3339_date`, `is_valid_rfc3339_time`, `is_valid_rfc3339`, `is_valid_bcp47`, `cli_parse_output`, `build_cli_error`, `build_cli_version`, `cli_handle_version_or_continue`, `decode_protocol_event`.
31
+ Useful names use Python casing: `render` (the single value x format x options -> str entry point; takes an `OutputFormat` and an optional keyword-only `options=`), `redacted_value`, `redact_url_secrets`, `redact_argv`, `normalize_utc_offset`, `is_valid_rfc3339_date`, `is_valid_rfc3339_time`, `is_valid_rfc3339`, `is_valid_bcp47`, `cli_parse_output`, `build_cli_error`, `build_cli_version`, `decode_protocol_event`.
32
32
 
33
33
  ## Behavior Notes
34
34
 
@@ -37,7 +37,7 @@ Useful names use Python casing: `render` (the single value x format x options ->
37
37
  - YAML keeps original keys and values (structure-preserving, like JSON), sorting keys by UTF-16 code unit order and quoting/escaping unsafe keys and string scalars. Plain strips formatting suffixes, formats values, sorts the same way, and renders nested objects/arrays as canonical JSON.
38
38
  - Logging records use `kind:"log"` with a nested `log` payload and a separate `level` field, so error-level logs are not terminal protocol errors.
39
39
  - `build_cli_error(message, hint?)` returns a strict-ready CLI error with `error.retryable:false` and `trace:{}`.
40
- - Use `cli_handle_version_or_continue()` before argument parsing so `--version` always answers with a structured protocol-v1 `kind:"result"` version event. An explicit `--output` wins; pass the command's normal output as `default_format` (JSON when omitted), plus its value-taking global flag names.
40
+ - Do not add a raw version/help pre-parser. Until the Python `CliSpec` compiler lands, applications should keep lifecycle parsing in their own parser rather than claim AFDATA closed-world help compatibility.
41
41
 
42
42
  ## Reference
43
43
 
@@ -19,7 +19,7 @@ print(render(value, OutputFormat.JSON))
19
19
  print(render(value, OutputFormat.PLAIN))
20
20
  ```
21
21
 
22
- Useful names use Python casing: `render` (the single value x format x options -> str entry point; takes an `OutputFormat` and an optional keyword-only `options=`), `redacted_value`, `redact_url_secrets`, `redact_argv`, `normalize_utc_offset`, `is_valid_rfc3339_date`, `is_valid_rfc3339_time`, `is_valid_rfc3339`, `is_valid_bcp47`, `cli_parse_output`, `build_cli_error`, `build_cli_version`, `cli_handle_version_or_continue`, `decode_protocol_event`.
22
+ Useful names use Python casing: `render` (the single value x format x options -> str entry point; takes an `OutputFormat` and an optional keyword-only `options=`), `redacted_value`, `redact_url_secrets`, `redact_argv`, `normalize_utc_offset`, `is_valid_rfc3339_date`, `is_valid_rfc3339_time`, `is_valid_rfc3339`, `is_valid_bcp47`, `cli_parse_output`, `build_cli_error`, `build_cli_version`, `decode_protocol_event`.
23
23
 
24
24
  ## Behavior Notes
25
25
 
@@ -28,7 +28,7 @@ Useful names use Python casing: `render` (the single value x format x options ->
28
28
  - YAML keeps original keys and values (structure-preserving, like JSON), sorting keys by UTF-16 code unit order and quoting/escaping unsafe keys and string scalars. Plain strips formatting suffixes, formats values, sorts the same way, and renders nested objects/arrays as canonical JSON.
29
29
  - Logging records use `kind:"log"` with a nested `log` payload and a separate `level` field, so error-level logs are not terminal protocol errors.
30
30
  - `build_cli_error(message, hint?)` returns a strict-ready CLI error with `error.retryable:false` and `trace:{}`.
31
- - Use `cli_handle_version_or_continue()` before argument parsing so `--version` always answers with a structured protocol-v1 `kind:"result"` version event. An explicit `--output` wins; pass the command's normal output as `default_format` (JSON when omitted), plus its value-taking global flag names.
31
+ - Do not add a raw version/help pre-parser. Until the Python `CliSpec` compiler lands, applications should keep lifecycle parsing in their own parser rather than claim AFDATA closed-world help compatibility.
32
32
 
33
33
  ## Reference
34
34
 
@@ -44,7 +44,6 @@ from agent_first_data.cli import (
44
44
  build_cli_error,
45
45
  build_cli_version,
46
46
  cli_render_version,
47
- cli_handle_version_or_continue,
48
47
  )
49
48
 
50
49
  __all__ = [
@@ -88,5 +87,4 @@ __all__ = [
88
87
  "build_cli_error",
89
88
  "build_cli_version",
90
89
  "cli_render_version",
91
- "cli_handle_version_or_continue",
92
90
  ]
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentfirstkit.org/schemas/agent-first-data/cli-help-v2.schema.json",
4
+ "title": "AFDATA CLI help v2 event",
5
+ "description": "One command's complete invocation help, carried by an AFDATA result event. Domain outcomes, side effects, and runtime error catalogs remain in the owning tool's documentation.",
6
+ "type": "object",
7
+ "required": [
8
+ "kind",
9
+ "result",
10
+ "trace"
11
+ ],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "kind": {
15
+ "const": "result"
16
+ },
17
+ "result": {
18
+ "type": "object",
19
+ "required": [
20
+ "code",
21
+ "help"
22
+ ],
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "code": {
26
+ "const": "help"
27
+ },
28
+ "help": {
29
+ "$ref": "#/$defs/help"
30
+ }
31
+ }
32
+ },
33
+ "trace": {
34
+ "type": "object"
35
+ }
36
+ },
37
+ "$defs": {
38
+ "oneLine": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "pattern": "^[^\\n\\r]+$"
42
+ },
43
+ "nonEmptyStringMap": {
44
+ "type": "object",
45
+ "minProperties": 1,
46
+ "additionalProperties": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ }
50
+ },
51
+ "help": {
52
+ "type": "object",
53
+ "required": [
54
+ "schema",
55
+ "command_path"
56
+ ],
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "schema": {
60
+ "const": "cli-help-v2"
61
+ },
62
+ "command_path": {
63
+ "$ref": "#/$defs/oneLine"
64
+ },
65
+ "about": {
66
+ "$ref": "#/$defs/oneLine"
67
+ },
68
+ "shapes": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "items": {
72
+ "$ref": "#/$defs/shape"
73
+ },
74
+ "description": "Every legal shape of this command, each complete. Help answers in one round trip; a second level could only pay off by omitting the optional arguments, which would then be undiscoverable."
75
+ },
76
+ "subcommands": {
77
+ "type": "array",
78
+ "minItems": 1,
79
+ "items": {
80
+ "$ref": "#/$defs/oneLine"
81
+ }
82
+ },
83
+ "notes": {
84
+ "$ref": "#/$defs/nonEmptyStringMap",
85
+ "description": "Argument meanings. Arguments belong to the command rather than to one shape, so they are stated once."
86
+ },
87
+ "defaults": {
88
+ "type": "object",
89
+ "minProperties": 1,
90
+ "additionalProperties": true
91
+ }
92
+ }
93
+ },
94
+ "shape": {
95
+ "type": "object",
96
+ "required": [
97
+ "id",
98
+ "usage"
99
+ ],
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "id": {
103
+ "$ref": "#/$defs/oneLine"
104
+ },
105
+ "about": {
106
+ "$ref": "#/$defs/oneLine",
107
+ "description": "How this shape differs from its siblings. Absent when the command has only one shape, because its own description already covers it."
108
+ },
109
+ "usage": {
110
+ "$ref": "#/$defs/oneLine"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,334 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentfirstkit.org/schemas/agent-first-data/cli-spec-v1.schema.json",
4
+ "title": "AFDATA closed-world CLI spec v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema",
8
+ "name",
9
+ "version",
10
+ "lifecycle_output",
11
+ "commands"
12
+ ],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "schema": {
16
+ "const": "cli-spec-v1"
17
+ },
18
+ "name": {
19
+ "$ref": "#/$defs/nonEmpty"
20
+ },
21
+ "version": {
22
+ "$ref": "#/$defs/nonEmpty"
23
+ },
24
+ "display_name": {
25
+ "$ref": "#/$defs/nonEmpty",
26
+ "description": "Human-facing product name, distinct from the binary identity in `name`."
27
+ },
28
+ "build": {
29
+ "$ref": "#/$defs/nonEmpty",
30
+ "description": "Opaque build identifier, such as a git commit SHA. Its meaning is the host's."
31
+ },
32
+ "about": {
33
+ "$ref": "#/$defs/nonEmpty"
34
+ },
35
+ "lifecycle_output": {
36
+ "$ref": "#/$defs/output"
37
+ },
38
+ "commands": {
39
+ "type": "array",
40
+ "minItems": 1,
41
+ "items": {
42
+ "$ref": "#/$defs/command"
43
+ }
44
+ }
45
+ },
46
+ "$defs": {
47
+ "nonEmpty": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "argumentId": {
52
+ "type": "string",
53
+ "pattern": "^[a-z][a-z0-9_]*$"
54
+ },
55
+ "command": {
56
+ "type": "object",
57
+ "required": [
58
+ "command_path",
59
+ "arguments",
60
+ "combinations"
61
+ ],
62
+ "additionalProperties": false,
63
+ "properties": {
64
+ "command_path": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string",
68
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
69
+ }
70
+ },
71
+ "about": {
72
+ "$ref": "#/$defs/nonEmpty"
73
+ },
74
+ "arguments": {
75
+ "type": "array",
76
+ "items": {
77
+ "$ref": "#/$defs/argument"
78
+ }
79
+ },
80
+ "combinations": {
81
+ "type": "array",
82
+ "items": {
83
+ "$ref": "#/$defs/combination"
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "argument": {
89
+ "type": "object",
90
+ "required": [
91
+ "argument_id",
92
+ "syntax",
93
+ "value_type"
94
+ ],
95
+ "additionalProperties": false,
96
+ "properties": {
97
+ "argument_id": {
98
+ "$ref": "#/$defs/argumentId"
99
+ },
100
+ "syntax": {
101
+ "oneOf": [
102
+ {
103
+ "type": "object",
104
+ "required": [
105
+ "kind",
106
+ "name"
107
+ ],
108
+ "additionalProperties": false,
109
+ "properties": {
110
+ "kind": {
111
+ "const": "long"
112
+ },
113
+ "name": {
114
+ "type": "string",
115
+ "pattern": "^--[a-z0-9][a-z0-9-]*$"
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "type": "object",
121
+ "required": [
122
+ "kind",
123
+ "index"
124
+ ],
125
+ "additionalProperties": false,
126
+ "properties": {
127
+ "kind": {
128
+ "const": "positional"
129
+ },
130
+ "index": {
131
+ "type": "integer",
132
+ "minimum": 0
133
+ }
134
+ }
135
+ }
136
+ ]
137
+ },
138
+ "value_type": {
139
+ "enum": [
140
+ "flag",
141
+ "string",
142
+ "i64",
143
+ "finite_f64",
144
+ "enum",
145
+ "json"
146
+ ]
147
+ },
148
+ "value_name": {
149
+ "$ref": "#/$defs/nonEmpty"
150
+ },
151
+ "enum_values": {
152
+ "type": "array",
153
+ "minItems": 1,
154
+ "uniqueItems": true,
155
+ "items": {
156
+ "$ref": "#/$defs/nonEmpty"
157
+ }
158
+ },
159
+ "default": true,
160
+ "repeatable": {
161
+ "const": true
162
+ },
163
+ "sensitive": {
164
+ "type": "boolean",
165
+ "description": "This argument's value must never be echoed back in help, errors, or logs."
166
+ },
167
+ "about": {
168
+ "$ref": "#/$defs/nonEmpty"
169
+ }
170
+ }
171
+ },
172
+ "combination": {
173
+ "type": "object",
174
+ "required": [
175
+ "combination_id",
176
+ "action_id",
177
+ "output"
178
+ ],
179
+ "additionalProperties": false,
180
+ "properties": {
181
+ "combination_id": {
182
+ "$ref": "#/$defs/nonEmpty"
183
+ },
184
+ "action_id": {
185
+ "$ref": "#/$defs/nonEmpty"
186
+ },
187
+ "about": {
188
+ "$ref": "#/$defs/nonEmpty"
189
+ },
190
+ "fixed": {
191
+ "type": "object",
192
+ "additionalProperties": {
193
+ "oneOf": [
194
+ {
195
+ "$ref": "#/$defs/nonEmpty"
196
+ },
197
+ {
198
+ "type": "object",
199
+ "required": [
200
+ "one_of"
201
+ ],
202
+ "additionalProperties": false,
203
+ "properties": {
204
+ "one_of": {
205
+ "type": "array",
206
+ "minItems": 1,
207
+ "uniqueItems": true,
208
+ "items": {
209
+ "$ref": "#/$defs/nonEmpty"
210
+ }
211
+ }
212
+ }
213
+ }
214
+ ]
215
+ }
216
+ },
217
+ "required": {
218
+ "type": "array",
219
+ "minItems": 1,
220
+ "uniqueItems": true,
221
+ "items": {
222
+ "$ref": "#/$defs/argumentId"
223
+ }
224
+ },
225
+ "optional": {
226
+ "type": "array",
227
+ "minItems": 1,
228
+ "uniqueItems": true,
229
+ "items": {
230
+ "$ref": "#/$defs/argumentId"
231
+ }
232
+ },
233
+ "output": {
234
+ "$ref": "#/$defs/output"
235
+ }
236
+ }
237
+ },
238
+ "fileSinks": {
239
+ "type": "array",
240
+ "uniqueItems": true,
241
+ "items": {
242
+ "enum": [
243
+ "stdout",
244
+ "stderr"
245
+ ]
246
+ }
247
+ },
248
+ "output": {
249
+ "oneOf": [
250
+ {
251
+ "type": "object",
252
+ "required": [
253
+ "kind",
254
+ "file_sinks"
255
+ ],
256
+ "additionalProperties": false,
257
+ "properties": {
258
+ "kind": {
259
+ "const": "raw"
260
+ },
261
+ "file_sinks": {
262
+ "$ref": "#/$defs/fileSinks"
263
+ }
264
+ }
265
+ },
266
+ {
267
+ "type": "object",
268
+ "required": [
269
+ "kind",
270
+ "lifecycle",
271
+ "formats",
272
+ "destinations",
273
+ "default_format",
274
+ "default_destination",
275
+ "file_sinks"
276
+ ],
277
+ "additionalProperties": false,
278
+ "properties": {
279
+ "kind": {
280
+ "const": "protocol"
281
+ },
282
+ "lifecycle": {
283
+ "enum": [
284
+ "finite",
285
+ "stream"
286
+ ]
287
+ },
288
+ "formats": {
289
+ "type": "array",
290
+ "minItems": 1,
291
+ "uniqueItems": true,
292
+ "items": {
293
+ "enum": [
294
+ "json",
295
+ "yaml",
296
+ "plain"
297
+ ]
298
+ }
299
+ },
300
+ "destinations": {
301
+ "type": "array",
302
+ "minItems": 1,
303
+ "uniqueItems": true,
304
+ "items": {
305
+ "enum": [
306
+ "split",
307
+ "stdout",
308
+ "stderr"
309
+ ]
310
+ }
311
+ },
312
+ "default_format": {
313
+ "enum": [
314
+ "json",
315
+ "yaml",
316
+ "plain"
317
+ ]
318
+ },
319
+ "default_destination": {
320
+ "enum": [
321
+ "split",
322
+ "stdout",
323
+ "stderr"
324
+ ]
325
+ },
326
+ "file_sinks": {
327
+ "$ref": "#/$defs/fileSinks"
328
+ }
329
+ }
330
+ }
331
+ ]
332
+ }
333
+ }
334
+ }
@@ -0,0 +1,178 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentfirstkit.org/schemas/agent-first-data/protocol-v1.schema.json",
4
+ "title": "Agent-First Data Protocol v1 Event (base profile)",
5
+ "description": "One protocol v1 event. The document root is the BASE profile: the mandatory MUST rules only — envelope shape and error payload requirements. Validate against the root unless you are claiming strict conformance; rejecting a base-conformant event is a false negative. The STRICT profile is `#/$defs/strictEvent`: it additionally requires the two recommendations (an object `trace` on every event, a boolean `error.retryable`). Stream lifecycle — (log | progress)* then exactly one result | error — is not expressible per event; validate a whole stream with `afdata validate` or `validate_protocol_stream`.",
6
+ "$ref": "#/$defs/event",
7
+ "$defs": {
8
+ "event": {
9
+ "title": "Protocol v1 event, base profile",
10
+ "description": "Top-level fields are closed: `kind`, the payload field whose name equals `kind`, and an optional `trace`.",
11
+ "type": "object",
12
+ "oneOf": [
13
+ {
14
+ "$ref": "#/$defs/resultEvent"
15
+ },
16
+ {
17
+ "$ref": "#/$defs/errorEvent"
18
+ },
19
+ {
20
+ "$ref": "#/$defs/progressEvent"
21
+ },
22
+ {
23
+ "$ref": "#/$defs/logEvent"
24
+ }
25
+ ]
26
+ },
27
+ "strictEvent": {
28
+ "title": "Protocol v1 event, strict profile",
29
+ "description": "The base profile plus the recommendations of the spec's `Validation profiles` section. Equivalent to `validate_protocol_event(event, strict = true)`.",
30
+ "allOf": [
31
+ {
32
+ "$ref": "#/$defs/event"
33
+ },
34
+ {
35
+ "$ref": "#/$defs/strictRecommendations"
36
+ }
37
+ ]
38
+ },
39
+ "strictRecommendations": {
40
+ "description": "What the strict profile adds on top of the base profile, and nothing else.",
41
+ "type": "object",
42
+ "required": [
43
+ "trace"
44
+ ],
45
+ "properties": {
46
+ "trace": {
47
+ "$ref": "#/$defs/trace"
48
+ }
49
+ },
50
+ "if": {
51
+ "type": "object",
52
+ "properties": {
53
+ "kind": {
54
+ "const": "error"
55
+ }
56
+ },
57
+ "required": [
58
+ "kind"
59
+ ]
60
+ },
61
+ "then": {
62
+ "properties": {
63
+ "error": {
64
+ "type": "object",
65
+ "required": [
66
+ "retryable"
67
+ ],
68
+ "properties": {
69
+ "retryable": {
70
+ "type": "boolean"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "trace": {
78
+ "description": "Execution context. Recommended on every event, required by the strict profile. Its fields are owned by the emitting tool.",
79
+ "type": "object"
80
+ },
81
+ "resultEvent": {
82
+ "type": "object",
83
+ "properties": {
84
+ "kind": {
85
+ "const": "result"
86
+ },
87
+ "result": true,
88
+ "trace": {
89
+ "$ref": "#/$defs/trace"
90
+ }
91
+ },
92
+ "required": [
93
+ "kind",
94
+ "result"
95
+ ],
96
+ "additionalProperties": false
97
+ },
98
+ "errorEvent": {
99
+ "type": "object",
100
+ "properties": {
101
+ "kind": {
102
+ "const": "error"
103
+ },
104
+ "error": {
105
+ "$ref": "#/$defs/errorPayload"
106
+ },
107
+ "trace": {
108
+ "$ref": "#/$defs/trace"
109
+ }
110
+ },
111
+ "required": [
112
+ "kind",
113
+ "error"
114
+ ],
115
+ "additionalProperties": false
116
+ },
117
+ "progressEvent": {
118
+ "type": "object",
119
+ "properties": {
120
+ "kind": {
121
+ "const": "progress"
122
+ },
123
+ "progress": true,
124
+ "trace": {
125
+ "$ref": "#/$defs/trace"
126
+ }
127
+ },
128
+ "required": [
129
+ "kind",
130
+ "progress"
131
+ ],
132
+ "additionalProperties": false
133
+ },
134
+ "logEvent": {
135
+ "type": "object",
136
+ "properties": {
137
+ "kind": {
138
+ "const": "log"
139
+ },
140
+ "log": true,
141
+ "trace": {
142
+ "$ref": "#/$defs/trace"
143
+ }
144
+ },
145
+ "required": [
146
+ "kind",
147
+ "log"
148
+ ],
149
+ "additionalProperties": false
150
+ },
151
+ "errorPayload": {
152
+ "description": "Extension fields go directly on this object; there is no `details` wrapper.",
153
+ "type": "object",
154
+ "properties": {
155
+ "code": {
156
+ "type": "string",
157
+ "minLength": 1
158
+ },
159
+ "message": {
160
+ "type": "string",
161
+ "minLength": 1
162
+ },
163
+ "hint": {
164
+ "description": "Actionable remediation. Omit it when there is none.",
165
+ "type": "string"
166
+ },
167
+ "retryable": {
168
+ "description": "Whether retrying the same call can succeed. Recommended, and left unconstrained by the base profile — the strict profile (`#/$defs/strictEvent`) requires it and requires a boolean."
169
+ }
170
+ },
171
+ "required": [
172
+ "code",
173
+ "message"
174
+ ],
175
+ "additionalProperties": true
176
+ }
177
+ }
178
+ }