{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ScratchInitEvent",
"description": "NDJSON success event for `scratch init`.",
"type": "object",
"properties": {
"type": {
"description": "Event type discriminator: `\"scratch_init\"`.",
"type": "string"
},
"ok": {
"description": "Always true on success.",
"type": "boolean"
},
"status": {
"description": "Agent success sentinel.",
"type": "string"
},
"command": {
"description": "Subcommand name.",
"type": "string"
},
"action": {
"description": "Action name.",
"type": "string"
},
"path": {
"description": "Absolute path created.",
"type": "string"
},
"relative": {
"description": "Relative path under workspace.",
"type": "string"
},
"already_existed": {
"description": "True when directory already existed.",
"type": "boolean"
},
"code": {
"description": "Machine error code, present when ok is false",
"type": "string"
},
"exit": {
"description": "Process exit status, present when ok is false",
"type": "integer",
"minimum": 0
},
"target_resolved": {
"description": "Absolute target the run resolved, or `-` for standard input; several subjects are joined with `,` in invocation order",
"type": "string"
},
"target_source": {
"description": "Where the target came from: named in the invocation line, inherited from the workspace slot, or the standard-input stream",
"type": "string",
"enum": [
"argv",
"workspace",
"stdin"
]
},
"workspace_source": {
"description": "Where the workspace root came from: the `--workspace` flag or the process working directory",
"type": "string",
"enum": [
"argv",
"cwd"
]
},
"records_suppressed": {
"description": "Records the writer dropped before the terminal event: `--filter` rejections, `--select` projections that emptied the record, dedupe duplicates and `--limit` cuts. It counts records, never files, so it does not compare with `files_matched`: one file can contribute several records",
"type": "integer",
"minimum": 0
},
"files_budget_dropped": {
"description": "Entries the `--limit` budget dropped, in the unit the verb produces: files for walking verbs, records for streaming ones; a floor, because workers may stop before producing the rest",
"type": "integer",
"minimum": 0
},
"files_planned": {
"description": "Files the run would have modified in `--dry-run` or `--preview`; absent from a run that really wrote",
"type": "integer",
"minimum": 0
},
"truncated": {
"description": "The record itself was cut by `--truncate-content` or `--max-output-bytes`, so the fields are shorter than the source",
"type": "boolean"
},
"truncated_records": {
"description": "Records the writer cut this run, counted once per record",
"type": "integer",
"minimum": 0
}
},
"required": [
"type",
"ok",
"status",
"command",
"action",
"path",
"relative",
"already_existed"
]
}