@cosmicdrift/kumiko-types 0.236.1 → 0.237.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 +1 -1
- package/src/entity-handlers.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.237.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/entity-handlers.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { EntityDefinition } from "./fields";
|
|
2
|
-
import type { AccessRule, QueryHandlerDef, WriteHandlerDef } from "./handlers";
|
|
2
|
+
import type { AccessRule, AgentHandlerHints, QueryHandlerDef, WriteHandlerDef } from "./handlers";
|
|
3
3
|
|
|
4
|
-
export type EntityHandlerOptions = {
|
|
4
|
+
export type EntityHandlerOptions = {
|
|
5
|
+
readonly access?: AccessRule;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
readonly agent?: AgentHandlerHints;
|
|
8
|
+
};
|
|
5
9
|
|
|
6
10
|
export type EntityQueryHandlerOptions = EntityHandlerOptions & {
|
|
7
11
|
/** Reads across every tenant instead of the caller's own — for a
|
|
@@ -20,6 +24,10 @@ export type RegisterEntityCrudOptions = {
|
|
|
20
24
|
readonly verbs?: Partial<Record<EntityCrudVerb, boolean>>;
|
|
21
25
|
/** Per-verb access override — falls back to `write.access`/`read.access` when unset for a verb. */
|
|
22
26
|
readonly verbAccess?: Partial<Record<EntityCrudVerb, AccessRule>>;
|
|
27
|
+
/** Per-verb `description` — the author writes one sentence per verb; the AI-agent
|
|
28
|
+
* manifest exposes only the verbs described here (fail-closed, same rule as
|
|
29
|
+
* hand-written handlers). Falls back to `write.description`/`read.description`. */
|
|
30
|
+
readonly descriptions?: Partial<Record<EntityCrudVerb, string>>;
|
|
23
31
|
/** Default true. Set false when the entity was already registered (e.g. before r.relation). */
|
|
24
32
|
readonly registerEntity?: boolean;
|
|
25
33
|
};
|