openvibers/openvibe.events Commits

Events: svc:run may publish run.* (OpenVibe.Run, plan T14); README lists every default source. (#18)

OP OpenVibers committed 7 Oct 2026 · d86bb7d569 · 2 files, +4 −2

Events accepts run.* from svc:run: `run` joins DEFAULT_SOURCES (server/config.js) for OpenVibe.Run (plan T14: run.job.queued|started|succeeded|failed|cancelled|expired). README source-prefix list now names every default source (it had stopped at bot.*: watch, run and the publication products were missing). Tests: ov test test/publish.test.js passed.

Changes

ddiff --git a/README.md b/README.md
iindex 4c851be..15245b8 100644
---- a/README.md
++++ b/README.md
@@@ -75,7 +75,7 @@ project's hourly publishing and delivery rollup, for Network; never visible to a
`POST /api/v1/events` takes one `events.event-envelope@1` envelope, or `{ "events": [ … ] }` (up to 100, stored atomically).
--- `source` must be the calling service (`svc:live` publishes `source: "live"`), and `event_type` must start with a prefix that source owns (`live.*`, `media.*`, `network.*`, `community.*`, `chat.*`, `openre.*`, `billing.*`, `tips.*`, `vip.*`, `ai.*`, `games.*`, `tools.*`, `codes.*`, `host.*`, `bot.*`; `EVENTS_SOURCE_PREFIXES` overrides). A network-wide prefix may be published by any first-party service: `provider.*` carries storage provider health/capacity telemetry (`provider.health.degraded`, `provider.capacity.warning`), so whichever service observes a provider can report it; `EVENTS_SHARED_PREFIXES` overrides.
++- `source` must be the calling service (`svc:live` publishes `source: "live"`), and `event_type` must start with a prefix that source owns (`live.*`, `media.*`, `network.*`, `community.*`, `chat.*`, `openre.*`, `billing.*`, `tips.*`, `vip.*`, `ai.*`, `games.*`, `tools.*`, `codes.*`, `host.*`, `bot.*`, `watch.*`, `run.*`, and the publication products (`wiki.*`, `blog.*`, `news.*`, `reviews.*`, `deals.*`, `coupons.*`, `trade.*`, `sources.*`, `search.*`); `EVENTS_SOURCE_PREFIXES` overrides). A network-wide prefix may be published by any first-party service: `provider.*` carries storage provider health/capacity telemetry (`provider.health.degraded`, `provider.capacity.warning`), so whichever service observes a provider can report it; `EVENTS_SHARED_PREFIXES` overrides.
- Idempotent on `event_id`: a repeat answers `200 { event_id, seq, duplicate: true }` and is never stored twice (even after retention, for `EVENTS_RECEIPT_RETENTION_DAYS`).
- Missing `trace_id` is taken from the request's `traceparent`; `priority` defaults to `important`, `visibility` to `internal`.
- Loop guard: an event whose trace already carries 8 hops (the cross-service chain depth, or the same source/type/subject repeating in the trace) is refused with `409 events.loop_detected`. The chain depth of a first-party publish counts first-party events only (developer-app events in the same trace never count toward it), so an app cannot poison a trace it has seen.
ddiff --git a/server/config.js b/server/config.js
iindex f876d85..1639fda 100644
---- a/server/config.js
++++ b/server/config.js
@@@ -23,7 +23,9 @@ const DEFAULT_SOURCES = ['live', 'media', 'network', 'community', 'chat', 'openr
// Robot control (OpenVibe.Bot): bot.robot.*, bot.estop.*, bot.command.*
'bot',
// Watch (OpenVibe.Watch): watch.observation.recorded, watch.watch.triggered, watch.check.failed
-- 'watch'];
++ 'watch',
++ // Run (OpenVibe.Run, plan T14): run.job.queued|started|succeeded|failed|cancelled|expired
++ 'run'];
/**
* Namespaces that belong to the network rather than to one service. `provider.*` carries storage