Skip to content

[agency] Harden CLJS blink agency and worker protocol parity #5

Description

@meekmachine

Goal

Finish Blink as the first small, clean ClojureScript agency proving the worker protocol and planner/host split.

Current state

Polyester already has src-cljs/latticework/blink.cljs, in-process creation, and worker client methods. It builds AU 43 snippets and manages auto-blink timers outside pure planner state.

This mirrors the Latticework research issue: meekmachine/Latticework#31.

Clojure-way direction

  • Keep blink config/state as serializable CLJS data.
  • Keep randomness, interval calculation, and AU 43 curve planning testable and deterministic when seeded or overridden.
  • Keep timer ownership at the runtime/host edge, with planner commands deciding when a blink should be emitted.
  • Preserve the current JS API while exposing data-first commands/events.

Acceptance criteria

  • Manual blink emits the expected AU 43 seven-point curve within tolerance.
  • Scheduled snippets keep category blink, priority 100, autoplay, playback rate 1.0, and intensity scale 1.0.
  • Auto-blink can run through both in-process and worker clients without leaking timers on disable/dispose.
  • Worker code has no window.anim, engine, DOM, or Loom3 references.
  • Add CLJS parity tests covering configure, enable/disable, trigger, reset, frequency, duration, intensity, and randomness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions