@cosmicdrift/kumiko-types 0.289.0 → 0.290.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.289.0",
3
+ "version": "0.290.0",
4
4
  "description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
package/src/changes.json CHANGED
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.290.0",
4
+ "type": "improvement",
5
+ "title": "EventMetadata: feature + handler + UNATTRIBUTED_ORIGIN",
6
+ "detail": "EventMetadata traegt zwei neue optionale Felder (feature, handler) und exportiert die Sentinel-Konstante UNATTRIBUTED_ORIGIN fuer Appends ausserhalb eines attribuierten Ausfuehrungsscopes. Additiv, bestehende Zeilen bleiben ohne Backfill lesbar."
7
+ },
2
8
  {
3
9
  "version": "0.289.0",
4
10
  "type": "improvement",
@@ -37,8 +37,21 @@ export type EventMetadata = {
37
37
  // app reads them when filtering/auditing. Keep values JSON-primitive
38
38
  // (string|number|boolean) so JSON serialization stays bulletproof.
39
39
  readonly headers?: Readonly<Record<string, string | number | boolean>>;
40
+ // Feature that owned the execution scope which wrote this event, and the
41
+ // qualified name of the handler/consumer/job inside it. Derived in
42
+ // event-store.append() from the ambient request scope, never passed in by
43
+ // the writer — attribution handed over can lie, attribution derived cannot.
44
+ // Optional so rows written before #3043 stay readable without a backfill;
45
+ // every new row carries both, falling back to UNATTRIBUTED_ORIGIN.
46
+ readonly feature?: string;
47
+ readonly handler?: string;
40
48
  };
41
49
 
50
+ // Stamped when an append runs outside any attributed scope (seed scripts,
51
+ // tests, direct event-store use). A distinct value, not an omission —
52
+ // omitted would be indistinguishable from a pre-#3043 row.
53
+ export const UNATTRIBUTED_ORIGIN = "unknown";
54
+
42
55
  // Generic over the payload shape. Default = Record<string, unknown> keeps
43
56
  // all existing consumers backwards-compatible; annotate `StoredEvent<MyEventPayload>`
44
57
  // where a typed payload read is needed.