Skip to content

Schema: file_action

A file operation, as metadata only (LW-04/LW-11): operation, path (and rename destination), size deltas. There is deliberately no ``contents`` field — file contents are never observable work, and ``contents`` is a :data:`FORBIDDEN_WORK_KEYS` member enforced at the envelope level as defense in depth. ``operation`` names what happened (read/edit/create/delete/rename); ``destination_path`` carries the rename's destination and is valid only for ``operation='rename'``. ``path``/``destination_path`` are repository-relative and may contain spaces and Unicode — validated by :func:`_validate_repository_relative_path`, not the ``_REF`` grammar.

A shared building block of the event model.

Generated from src/spec_kitty_events/schemas/file_action.schema.json by scripts/schema_pages.py; never hand-edit (C-001).

Family

Listed on the Shared event-model types hub.

Diagram

FileActionStructure of the JSON Schema FileAction.$defs   $idspec-kitty-events/file_action$schemahttps://json-schema.org/draft/2020-12/schemaadditionalProperties☐ falsedescriptionA file operation, as metadata only (LW-04/LW-11): operation, path (and rename destination), size deltas. There is deliberately no ``contents`` field — file contents are never observable work, and ``contents`` is a :data:`FORBIDDEN_WORK_KEYS` member enforced at the envelope level as defense in depth. ``operation`` names what happened (read/edit/create/delete/rename); ``destination_path`` carries the rename's destination and is valid only for ``operation='rename'``. ``path``/``destination_p ath`` are repository-relative and may contain spaces and Unicode — validated by :func:`_validate_repository_relative_path`, not the ``_REF`` grammar.properties   required   titleFileActiontypeobjectFileOperation   descriptionThe operation a file observation records (LW-04: read/edit/create/ delete/rename are all supported observations — a byte-delta alone cannot distinguish them).enum   titleFileOperationtypestringreadeditcreatedeleterenamebytes_added   bytes_removed   destination_path   language   operation   path   minimum0titleBytes Addedtypeintegerminimum0titleBytes RemovedtypeintegeranyOf   default␀titleDestination Path      maxLength240minLength1typestringtypenullanyOf   default␀titleLanguage      maxLength32minLength1pattern^[A-Za-z0-9][A-Za-z0-9._@+-]{0,63}$typestringtypenull$ref#/$defs/FileOperationmaxLength240minLength1titlePathtypestringoperationpathbytes_addedbytes_removed
Structure of the JSON Schema FileAction.

Properties

  • bytes_added (integer, required)
  • bytes_removed (integer, required)
  • destination_path (string | null)
  • language (string | null)
  • operation (enum: read, edit, create, delete, rename, required): The operation a file observation records (LW-04: read/edit/create/ delete/rename are all supported observations — a byte-delta alone cannot distinguish them).
  • path (string, required)

Source

Schema file: schemas/file_action.schema.json