Skip to content

02 — Expand versioned cultivation event intake #3

Description

@XMethues

Parent

#1

What to build

Add the versioned, normalized cultivation-event intake for direct tool activity. Migrate tool start and completion hooks onto it while leaving the old path temporarily available only for hook categories not yet migrated.

Acceptance criteria

  • Documented pre-tool and post-tool hooks emit normalized, versioned tool activities and tolerate additional keyword arguments from Hermes.
  • The envelope validates schema version, unique opaque event ID, occurrence time, and event kind; legacy payloads and unsupported schema versions are rejected.
  • A successful direct POST atomically persists cultivation changes and commits the corresponding in-memory activity state.
  • The response is a minimal acknowledgement distinguishing accepted and duplicate events without returning a full state snapshot.
  • Reposting the same event ID is acknowledged without applying it again.
  • A unique event with an older timestamp is accepted; timestamps are not used as a rejection or deduplication key.
  • If persistence fails, neither cultivation progress nor in-memory activity is committed.
  • Tool activities no longer use the legacy path, while unmigrated activity categories can temporarily continue using it without duplicating tool events.
  • Real-HTTP integration tests and fake Hermes hook-context tests cover validation, atomicity, and deduplication.

Blocked by

#2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified and ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions