7 Commits

Author SHA1 Message Date
xiaomo a7fd543648 feat(pulseflare): complete D1 event store Worker
CI / test (push) Has been cancelled
- Add Bearer token auth (API_TOKEN secret)
- Add POST /events/batch (max 100)
- Add GET /events?after_id= for cursor-based pagination
- Add POST/GET /instances for object instances
- Add POST /maintenance/archive for event cleanup
- Add D1 migration (0001_init)
- D1PulseStore fully implements PulseStore interface
- Type checks pass
2026-04-20 01:38:03 +00:00
xiaomo 6c3888af48 feat: add Durable Objects delete migration for pulseflare
CI / test (push) Has been cancelled
- Add v2 migration with deleted_classes = ["PulseTick"]
- Required to deploy after removing DO from index.ts
2026-04-18 10:06:36 +00:00
xiaomo 5609cd36f4 refactor: pulseflare as passive event store + projection API (refs #5)
CI / test (push) Has been cancelled
- Remove durable-tick.ts and executor-sigil.ts (no more active ticking)
- Remove Durable Objects bindings from wrangler.toml
- Add CAS objects table to schema.sql
- Rewrite index.ts as pure API service:
  * POST /events - push events with auto-generated occurredAt
  * GET /events?kind&key&since&limit - query events
  * GET /projections/:key - get latest collect event meta for key
  * POST /objects - CAS store objects, return hash
  * GET /objects/:hash - retrieve objects by hash
  * GET /health - service health check
- No more /tick, /start, /configure, /status endpoints
- Pure passive event store, no rules engine or Sigil integration
2026-04-18 10:04:11 +00:00
xiaomo 25591e2c21 fix: D1 bind params must be spread, not chained (refs #5)
CI / test (push) Has been cancelled
2026-04-18 08:12:37 +00:00
xiaomo 1ba77929e6 feat: pulseflare real tick logic — rules + snapshot + sigil executor (refs #5)
CI / test (push) Has been cancelled
- Implement real Pulse tick logic in durable-tick.ts
- Add snapshot rebuild from D1 collect events
- Add pulse() method with demo rules (CPU spike detection, heartbeat)
- Add adaptive tick logic (30s base, up to 5min backoff)
- Add /configure endpoint for senseKeys and configuration
- Add CAS object storage in store-d1.ts
- Update index.ts with /configure route
- Persist prev snapshot in DO storage
- Execute effects through Sigil with error handling
2026-04-18 08:09:04 +00:00
xiaomo 70be73efde chore: update pulseflare D1 database_id (refs #5)
CI / test (push) Has been cancelled
2026-04-18 07:54:05 +00:00
xiaomo 272aa9728a feat: pulseflare package — CF Workers + D1 runtime (refs #5)
CI / test (push) Has been cancelled
2026-04-18 07:51:37 +00:00