@cosmicdrift/kumiko-types 0.352.0 → 0.353.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/dist/agent-exposure.d.ts +2 -2
- package/dist/entity-handlers.d.ts +3 -0
- package/dist/fields.d.ts +5 -1
- package/dist/fields.js +1 -0
- package/dist/handlers.d.ts +3 -1
- package/dist/kms-adapter-types.d.ts +1 -0
- package/dist/kms-adapter-types.js +3 -0
- package/dist/screen.d.ts +13 -12
- package/package.json +1 -1
package/dist/agent-exposure.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentExposure, AgentHandlerHints } from "./handlers.js";
|
|
1
|
+
import type { AgentExposure, AgentHandlerHints, AgentScreenHints } from "./handlers.js";
|
|
2
2
|
/** Fail-closed: a handler without a `description` stays invisible to the agent
|
|
3
3
|
* unless it opts in explicitly. `kind` is a parameter because write and query
|
|
4
4
|
* handler definitions are structurally indistinguishable at runtime. */
|
|
@@ -11,5 +11,5 @@ export declare function resolveAgentExposure(def: {
|
|
|
11
11
|
* Reusing `resolveAgentExposure`'s fail-closed default here would silently
|
|
12
12
|
* drop every screen without a description from the agent's view. */
|
|
13
13
|
export declare function isAgentVisibleScreen(screen: {
|
|
14
|
-
readonly agent?:
|
|
14
|
+
readonly agent?: AgentScreenHints;
|
|
15
15
|
}): boolean;
|
|
@@ -43,6 +43,9 @@ export type RegisterEntityCrudOptions = {
|
|
|
43
43
|
* manifest exposes only the verbs described here (fail-closed, same rule as
|
|
44
44
|
* hand-written handlers). Falls back to `write.description`/`read.description`. */
|
|
45
45
|
readonly descriptions?: Partial<Record<EntityCrudVerb, string>>;
|
|
46
|
+
/** Per-verb agent hints; win over `write.agent`/`read.agent`, so one irreversible
|
|
47
|
+
* verb (e.g. a hard delete) can be `risk: "high"` without raising create/update. */
|
|
48
|
+
readonly agents?: Partial<Record<EntityCrudVerb, AgentHandlerHints>>;
|
|
46
49
|
/** Per-verb `excludeFields` for the generic create/update handlers — see
|
|
47
50
|
* EntityWriteHandlerOptions. */
|
|
48
51
|
readonly excludeFields?: Partial<Record<"create" | "update", readonly string[]>>;
|
package/dist/fields.d.ts
CHANGED
|
@@ -80,6 +80,9 @@ export type TextFieldDef = {
|
|
|
80
80
|
* the i18n label is what users see. */
|
|
81
81
|
readonly description?: string;
|
|
82
82
|
readonly maxLength?: number;
|
|
83
|
+
/** Lower bound enforced by the generated write schema, so short input is
|
|
84
|
+
* rejected by validation instead of reaching the handler. */
|
|
85
|
+
readonly minLength?: number;
|
|
83
86
|
readonly required?: boolean;
|
|
84
87
|
readonly searchable?: boolean;
|
|
85
88
|
readonly sortable?: boolean;
|
|
@@ -171,7 +174,8 @@ export type BooleanFieldDef = {
|
|
|
171
174
|
readonly default?: boolean;
|
|
172
175
|
readonly access?: FieldAccess;
|
|
173
176
|
};
|
|
174
|
-
export
|
|
177
|
+
export declare const SELECT_OPTION_TONES: readonly ["ok", "warn", "bad", "neutral"];
|
|
178
|
+
export type SelectOptionTone = (typeof SELECT_OPTION_TONES)[number];
|
|
175
179
|
/** One `optionsQueryPayload` entry: a literal, or `{ field }` = the current value of
|
|
176
180
|
* a sibling field of the same form (config keys: another key of the owner feature). */
|
|
177
181
|
export type OptionsQueryPayloadValue = string | number | boolean | {
|
package/dist/fields.js
CHANGED
package/dist/handlers.d.ts
CHANGED
|
@@ -404,7 +404,7 @@ export type EventDef<TPayload = unknown, TName extends string = string> = {
|
|
|
404
404
|
readonly name: TName;
|
|
405
405
|
readonly schema: ZodType<TPayload>;
|
|
406
406
|
readonly version: number;
|
|
407
|
-
readonly piiFields
|
|
407
|
+
readonly piiFields: EventPiiStance;
|
|
408
408
|
};
|
|
409
409
|
export type AppendEventArgs = {
|
|
410
410
|
readonly aggregateId: string;
|
|
@@ -499,6 +499,8 @@ export type AgentHandlerHints = {
|
|
|
499
499
|
readonly expose?: boolean;
|
|
500
500
|
readonly risk?: AgentRisk;
|
|
501
501
|
};
|
|
502
|
+
/** Screens only read `expose`; `risk` ranks handler tool calls, so it is not offered here. */
|
|
503
|
+
export type AgentScreenHints = Pick<AgentHandlerHints, "expose">;
|
|
502
504
|
export type AgentExposure = {
|
|
503
505
|
readonly expose: boolean;
|
|
504
506
|
readonly risk: AgentRisk;
|
|
@@ -13,6 +13,7 @@ export type SubjectId = {
|
|
|
13
13
|
export type SubjectKey = string;
|
|
14
14
|
export declare function subjectKeyForUser(userId: string): SubjectKey;
|
|
15
15
|
export declare function subjectKeyForTenant(tenantId: TenantId): SubjectKey;
|
|
16
|
+
export declare const PII_ERASED_SENTINEL = "[[erased]]";
|
|
16
17
|
export declare const RECORD_ENTITY_PATTERN: RegExp;
|
|
17
18
|
export declare function subjectKeyForRecord(entity: string, id: string): SubjectKey;
|
|
18
19
|
export declare function subjectIdToKey(subject: SubjectId): SubjectKey;
|
|
@@ -4,6 +4,9 @@ export function subjectKeyForUser(userId) {
|
|
|
4
4
|
export function subjectKeyForTenant(tenantId) {
|
|
5
5
|
return `tenant:${tenantId}`;
|
|
6
6
|
}
|
|
7
|
+
// Stands in for a PII value whose subject key was erased; clients map it to a
|
|
8
|
+
// translated label instead of showing it.
|
|
9
|
+
export const PII_ERASED_SENTINEL = "[[erased]]";
|
|
7
10
|
// Registry entity names are identifier-shaped; a free-form aggregate_type
|
|
8
11
|
// (events-schema.ts is a plain text column) could otherwise mint a record
|
|
9
12
|
// key that subjectIdSchema (forget-subject.write.ts) later refuses to
|
package/dist/screen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FieldIconKey } from "./field-icon.js";
|
|
2
2
|
import type { FieldDefinition, FormFieldDefinition, SelectOptionTone } from "./fields.js";
|
|
3
|
-
import type { AccessRule,
|
|
3
|
+
import type { AccessRule, AgentScreenHints } from "./handlers.js";
|
|
4
4
|
import type { IconKey, NavIconKey } from "./nav-icon.js";
|
|
5
5
|
export type { FieldIconKey } from "./field-icon.js";
|
|
6
6
|
export type PlatformComponent = {
|
|
@@ -395,7 +395,7 @@ export type EntityListScreenDefinition = {
|
|
|
395
395
|
readonly nav?: ScreenNavSugar;
|
|
396
396
|
readonly detailFor?: string;
|
|
397
397
|
readonly description?: string;
|
|
398
|
-
readonly agent?:
|
|
398
|
+
readonly agent?: AgentScreenHints;
|
|
399
399
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
400
400
|
* app); exempts it from the nav-area boot check. */
|
|
401
401
|
readonly dormant?: boolean;
|
|
@@ -504,7 +504,7 @@ export type ProjectionListScreenDefinition = {
|
|
|
504
504
|
readonly nav?: ScreenNavSugar;
|
|
505
505
|
readonly detailFor?: string;
|
|
506
506
|
readonly description?: string;
|
|
507
|
-
readonly agent?:
|
|
507
|
+
readonly agent?: AgentScreenHints;
|
|
508
508
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
509
509
|
* app); exempts it from the nav-area boot check. */
|
|
510
510
|
readonly dormant?: boolean;
|
|
@@ -598,7 +598,7 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
598
598
|
readonly nav?: ScreenNavSugar;
|
|
599
599
|
readonly detailFor?: string;
|
|
600
600
|
readonly description?: string;
|
|
601
|
-
readonly agent?:
|
|
601
|
+
readonly agent?: AgentScreenHints;
|
|
602
602
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
603
603
|
* app); exempts it from the nav-area boot check. */
|
|
604
604
|
readonly dormant?: boolean;
|
|
@@ -785,6 +785,8 @@ export type DashboardChartPanel = DashboardPanelQueryOptions & DashboardPanelEmp
|
|
|
785
785
|
readonly legendTotals?: boolean;
|
|
786
786
|
/** Only for chart "stacked-area": range switch in the panel header. */
|
|
787
787
|
readonly ranges?: DashboardChartRanges;
|
|
788
|
+
/** Only for chart "stacked-area": scrubber under the plot to drag the visible window; starts at today. */
|
|
789
|
+
readonly brush?: boolean;
|
|
788
790
|
};
|
|
789
791
|
export type DashboardListPanel = DashboardPanelQueryOptions & DashboardPanelEmptyState & DashboardPanelGate & {
|
|
790
792
|
readonly kind: "list";
|
|
@@ -871,7 +873,7 @@ export type DashboardScreenDefinition = {
|
|
|
871
873
|
readonly nav?: ScreenNavSugar;
|
|
872
874
|
readonly detailFor?: string;
|
|
873
875
|
readonly description?: string;
|
|
874
|
-
readonly agent?:
|
|
876
|
+
readonly agent?: AgentScreenHints;
|
|
875
877
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
876
878
|
* app); exempts it from the nav-area boot check. */
|
|
877
879
|
readonly dormant?: boolean;
|
|
@@ -1205,7 +1207,7 @@ export type EntityEditScreenDefinition = {
|
|
|
1205
1207
|
readonly nav?: ScreenNavSugar;
|
|
1206
1208
|
readonly detailFor?: string;
|
|
1207
1209
|
readonly description?: string;
|
|
1208
|
-
readonly agent?:
|
|
1210
|
+
readonly agent?: AgentScreenHints;
|
|
1209
1211
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
1210
1212
|
* app); exempts it from the nav-area boot check. */
|
|
1211
1213
|
readonly dormant?: boolean;
|
|
@@ -1301,7 +1303,7 @@ export type ActionFormScreenDefinition = {
|
|
|
1301
1303
|
readonly nav?: ScreenNavSugar;
|
|
1302
1304
|
readonly detailFor?: string;
|
|
1303
1305
|
readonly description?: string;
|
|
1304
|
-
readonly agent?:
|
|
1306
|
+
readonly agent?: AgentScreenHints;
|
|
1305
1307
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
1306
1308
|
* app); exempts it from the nav-area boot check. */
|
|
1307
1309
|
readonly dormant?: boolean;
|
|
@@ -1469,7 +1471,7 @@ export type SecretMintScreenDefinition = {
|
|
|
1469
1471
|
readonly nav?: ScreenNavSugar;
|
|
1470
1472
|
readonly detailFor?: string;
|
|
1471
1473
|
readonly description?: string;
|
|
1472
|
-
readonly agent?:
|
|
1474
|
+
readonly agent?: AgentScreenHints;
|
|
1473
1475
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
1474
1476
|
* app); exempts it from the nav-area boot check. */
|
|
1475
1477
|
readonly dormant?: boolean;
|
|
@@ -1508,8 +1510,7 @@ export type CustomScreenDefinition = {
|
|
|
1508
1510
|
readonly nav?: ScreenNavSugar;
|
|
1509
1511
|
readonly detailFor?: string;
|
|
1510
1512
|
readonly description?: string;
|
|
1511
|
-
|
|
1512
|
-
readonly agent?: AgentHandlerHints;
|
|
1513
|
+
readonly agent?: AgentScreenHints;
|
|
1513
1514
|
readonly renderer: PlatformComponent;
|
|
1514
1515
|
readonly routes?: readonly CustomScreenRoute[];
|
|
1515
1516
|
/** Parent list screen for breadcrumb when this detail is not in nav. */
|
|
@@ -1540,7 +1541,7 @@ export type ConfigEditScreenDefinition = {
|
|
|
1540
1541
|
readonly nav?: ScreenNavSugar;
|
|
1541
1542
|
readonly detailFor?: string;
|
|
1542
1543
|
readonly description?: string;
|
|
1543
|
-
readonly agent?:
|
|
1544
|
+
readonly agent?: AgentScreenHints;
|
|
1544
1545
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
1545
1546
|
* app); exempts it from the nav-area boot check. */
|
|
1546
1547
|
readonly dormant?: boolean;
|
|
@@ -1590,7 +1591,7 @@ export type SecretsEditScreenDefinition = {
|
|
|
1590
1591
|
readonly nav?: ScreenNavSugar;
|
|
1591
1592
|
readonly detailFor?: string;
|
|
1592
1593
|
readonly description?: string;
|
|
1593
|
-
readonly agent?:
|
|
1594
|
+
readonly agent?: AgentScreenHints;
|
|
1594
1595
|
/** Screen has no nav entry by design (opened via link or navved by the
|
|
1595
1596
|
* app); exempts it from the nav-area boot check. */
|
|
1596
1597
|
readonly dormant?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.353.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>",
|