@cosmicdrift/kumiko-types 0.335.0 → 0.336.1

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.
@@ -47,6 +47,10 @@ export type QueryHandlerDefinition<TName extends string = string, TSchema extend
47
47
  * that want boot-time column checks declare `outputSchema` explicitly,
48
48
  * same as `schema` for the input side. */
49
49
  readonly outputSchema?: ZodType;
50
+ /** Entities whose changes this query reflects. Anonymous callers with
51
+ * access to this query receive /api/sse change signals (no field values)
52
+ * for these entities. Every name must be a registered entity. */
53
+ readonly liveEntities?: readonly string[];
50
54
  };
51
55
  export type StreamHandlerDefinition<TName extends string = string, TSchema extends ZodType = ZodType, TChunk = unknown, TMap extends object = KumikoEventTypeMap> = {
52
56
  readonly name: TName;
@@ -22,7 +22,10 @@ export type EntityWriteHandlerOptions = EntityHandlerOptions & {
22
22
  /** Fields this handler never writes. They leave the payload schema as
23
23
  * "must be absent": a payload that still carries one fails validation
24
24
  * instead of being stripped silently. create rejects a required field
25
- * without default here, since the row could never be created. */
25
+ * without default here, since the row could never be created. A readAsInstruction
26
+ * field excluded here but derived by a preSave hook is invisible to the
27
+ * define-time risk floor: declare `agent: { risk: "high" }` explicitly, or the
28
+ * executor gate rejects every call. */
26
29
  readonly excludeFields?: readonly string[];
27
30
  };
28
31
  export type EntityQueryHandlerOptions = EntityHandlerOptions;
package/dist/feature.d.ts CHANGED
@@ -225,6 +225,7 @@ export type FeatureRegistrar<TFeature extends string = string> = {
225
225
  access: AccessRule;
226
226
  rateLimit?: RateLimitDeclaration;
227
227
  outputSchema?: ZodType;
228
+ liveEntities?: readonly string[];
228
229
  description?: string;
229
230
  agent?: AgentHandlerHints;
230
231
  escapeHatch?: EscapeHatchDeclaration;
@@ -480,6 +480,10 @@ export type QueryHandlerDef = {
480
480
  * `header`/`metrics`, dashboard `valueField`/`subField`/etc.) rather
481
481
  * than requiring it retroactively. See fw#2493. */
482
482
  readonly outputSchema?: ZodType;
483
+ /** Entities whose changes this query reflects. Anonymous callers with
484
+ * access to this query receive /api/sse change signals (no field values)
485
+ * for these entities. Every name must be a registered entity. */
486
+ readonly liveEntities?: readonly string[];
483
487
  readonly escapeHatch?: EscapeHatchDeclaration;
484
488
  };
485
489
  export type StreamHandlerDef = {
package/dist/screen.d.ts CHANGED
@@ -969,7 +969,8 @@ export type EditRelatedListSection = {
969
969
  readonly itemNoun?: string;
970
970
  readonly pageSize?: number;
971
971
  /** Initial sort on mount, applied client-side over the already-loaded rows
972
- * (this section has no pager, so there is no "loaded subset" to mislead).
972
+ * (this section has no pager; if the fetch is truncated, `nextCursor !== null`,
973
+ * the section shows a hint banner that the sort covers only the loaded rows).
973
974
  * `field` must name a column with `sortable: true` — boot-validator pins
974
975
  * that, same as `entityList.defaultSort`. */
975
976
  readonly defaultSort?: ListSortSpec;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.335.0",
3
+ "version": "0.336.1",
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,11 @@
1
1
  [
2
+ {
3
+ "version": "0.336.0",
4
+ "type": "improvement",
5
+ "title": "Query handlers can declare liveEntities",
6
+ "detail": "`QueryHandlerDefinition` and the inline `queryHandler` options accept `liveEntities`, the entities whose changes the query reflects. Anonymous callers with access to the query receive /api/sse change signals for them.",
7
+ "migration": "No code change needed."
8
+ },
2
9
  {
3
10
  "version": "0.335.0",
4
11
  "type": "improvement",