Skip to content

feat: add internal event journal - #28

Merged
minixalpha merged 8 commits into
mainfrom
codex/event-journal-foundation
Aug 26, 2026
Merged

feat: add internal event journal#28
minixalpha merged 8 commits into
mainfrom
codex/event-journal-foundation

Conversation

@minixalpha

@minixalpha minixalpha commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add schema-versioned Native Events and a per-run append-only Event Journal.
  • Project the existing text output from the same user, model, tool, and terminal runtime facts without changing CLI output.
  • Document the v1 protocol, security boundary, and the future Event Journal-to-ATIF implementation path.

Implementation

  • Persist replayable JSONL entries with run IDs, sequence numbers, UTC timestamps, producer provenance, model/tool correlation IDs, usage, durations, provider response metadata, and explicit truncation metadata.
  • Store journals under ~/.nanoPyCodeAgent/journals/ with user-only directory and file permissions.
  • Preserve complete-line append semantics, tolerate only an interrupted trailing record, and fail closed on invalid schemas, events, JSON values, truncation envelopes, or contradictory tool failures.
  • Keep model content discriminator fields replayable even at the minimum truncation limit.
  • Measure model duration when the final message and response headers become available, before local normalization.
  • Emit and journal run, user, model, streaming delta, tool, completion, and failure events while preserving current stdout behavior.

Documentation

  • Add English and Chinese Event Journal protocol v1 documentation.
  • Update the bilingual README, 0.8.x dev notes, changelog, and bilingual Event Journal/ATIF research notes.

Testing

  • Cover append order, replay, torn tails, permissions, truncation, strict JSON/schema validation, producer provenance, nested model facts, tool exceptions, duration boundaries, and exact stdout projection.
  • uv run pytest -q — 165 passed locally.

@minixalpha
minixalpha merged commit 332ac09 into main Aug 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant