@cosmicdrift/kumiko-framework 0.331.0 → 0.333.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/db/blind-index-cleanup.d.ts +1 -0
- package/dist/db/blind-index-cleanup.js +12 -0
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/queries/event-consumer.d.ts +2 -1
- package/dist/db/queries/event-consumer.js +12 -2
- package/dist/engine/boot-validator/index.js +2 -0
- package/dist/engine/boot-validator/query-output-columns.js +15 -2
- package/dist/engine/boot-validator/query-refs.d.ts +2 -1
- package/dist/engine/boot-validator/query-refs.js +1 -1
- package/dist/engine/boot-validator/screens.d.ts +3 -1
- package/dist/engine/boot-validator/screens.js +33 -2
- package/dist/engine/boot-validator/selector-owner-panels.d.ts +2 -0
- package/dist/engine/boot-validator/selector-owner-panels.js +25 -0
- package/dist/engine/boot-validator/url-prefill-fields.js +7 -0
- package/dist/engine/build-config-feature-schema.js +31 -6
- package/dist/engine/changeset-changes.js +6 -0
- package/dist/engine/entity-handlers.js +1 -1
- package/dist/engine/extension-names.d.ts +12 -1
- package/dist/engine/extension-names.js +7 -0
- package/dist/engine/feature-ast/extractors/index.d.ts +1 -1
- package/dist/engine/feature-ast/extractors/index.js +1 -1
- package/dist/engine/feature-ast/extractors/round5.d.ts +1 -0
- package/dist/engine/feature-ast/extractors/round5.js +5 -0
- package/dist/engine/feature-ast/parse.js +3 -1
- package/dist/engine/feature-ui-extensions.d.ts +4 -2
- package/dist/engine/feature-ui-extensions.js +40 -3
- package/dist/engine/index.d.ts +4 -3
- package/dist/engine/index.js +2 -2
- package/dist/engine/project-app-schema-for-roles.js +20 -1
- package/dist/engine/registry-facade.js +3 -0
- package/dist/engine/registry-ingest.js +2 -0
- package/dist/engine/registry-state.d.ts +2 -1
- package/dist/engine/registry-state.js +1 -0
- package/dist/engine/role-assignment.d.ts +11 -1
- package/dist/engine/role-assignment.js +64 -3
- package/dist/engine/schema-builder.d.ts +3 -1
- package/dist/engine/schema-builder.js +5 -6
- package/dist/engine/types/index.d.ts +2 -2
- package/dist/errors/reasons.js +7 -6
- package/dist/i18n/required-surface-keys.js +19 -3
- package/dist/pipeline/dispatch-write.js +26 -2
- package/dist/pipeline/event-consumer-state.js +6 -0
- package/dist/pipeline/event-dispatcher-admin.js +36 -16
- package/dist/pipeline/event-dispatcher-delivery.d.ts +2 -0
- package/dist/pipeline/event-dispatcher-delivery.js +22 -2
- package/dist/pipeline/event-dispatcher.js +1 -0
- package/dist/ui-types/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/changes.json +40 -0
|
@@ -171,6 +171,7 @@ export async function deliverEvents(consumer, events, context, maxAttempts, stat
|
|
|
171
171
|
const effectiveMaxAttempts = consumer.errorPolicy?.maxAttempts ?? maxAttempts;
|
|
172
172
|
let processed = 0;
|
|
173
173
|
let failed = 0;
|
|
174
|
+
let failedEventId = null;
|
|
174
175
|
const resolvedPendingIds = [];
|
|
175
176
|
// A pending row sits below startCursor: it resolves its gap but never moves
|
|
176
177
|
// the cursor backward. ORDER BY id walks all pending rows first.
|
|
@@ -188,7 +189,16 @@ export async function deliverEvents(consumer, events, context, maxAttempts, stat
|
|
|
188
189
|
for (const row of events)
|
|
189
190
|
resolve(row.id);
|
|
190
191
|
processed = events.length;
|
|
191
|
-
return {
|
|
192
|
+
return {
|
|
193
|
+
cursor,
|
|
194
|
+
attempts,
|
|
195
|
+
lastError,
|
|
196
|
+
deadLettered,
|
|
197
|
+
processed,
|
|
198
|
+
failed,
|
|
199
|
+
failedEventId,
|
|
200
|
+
resolvedPendingIds,
|
|
201
|
+
};
|
|
192
202
|
}
|
|
193
203
|
// fall through to the per-event loop below; the batch failure itself
|
|
194
204
|
// does NOT bump attempts — only a per-event failure does.
|
|
@@ -209,12 +219,22 @@ export async function deliverEvents(consumer, events, context, maxAttempts, stat
|
|
|
209
219
|
}
|
|
210
220
|
attempts += 1;
|
|
211
221
|
lastError = errMessage;
|
|
222
|
+
failedEventId = row.id;
|
|
212
223
|
if (attempts >= effectiveMaxAttempts)
|
|
213
224
|
deadLettered = true;
|
|
214
225
|
break;
|
|
215
226
|
}
|
|
216
227
|
}
|
|
217
|
-
return {
|
|
228
|
+
return {
|
|
229
|
+
cursor,
|
|
230
|
+
attempts,
|
|
231
|
+
lastError,
|
|
232
|
+
deadLettered,
|
|
233
|
+
processed,
|
|
234
|
+
failed,
|
|
235
|
+
failedEventId,
|
|
236
|
+
resolvedPendingIds,
|
|
237
|
+
};
|
|
218
238
|
}
|
|
219
239
|
// Shared requestContext scope for one apply — event-derived fields
|
|
220
240
|
// (correlationId, causationId, writeOrigin) come from `causationSource`;
|
package/dist/ui-types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { BooleanFieldDef, DateFieldDef, EmbeddedDerivedCellDef, EntityDefin
|
|
|
9
9
|
export type { AccessRule, OpenToAllAccessRule, OpenToAllDeclaration, OpenToAllPersonalData, RoleAccessPersonalData, RoleAccessRule, } from "../engine/types/handlers.js";
|
|
10
10
|
export { isOpenToAllGranted, isUiAccessGranted } from "../engine/types/handlers.js";
|
|
11
11
|
export type { IconKey, NavDefinition, NavIconKey } from "../engine/types/nav.js";
|
|
12
|
-
export type { ActionFormRedirect, ActionFormScreenDefinition, ConfigEditScreenDefinition, CustomScreenDefinition, CustomScreenRoute, DashboardChartKind, DashboardChartPanel, DashboardChartTone, DashboardCustomPanel, DashboardFeedPanel, DashboardFilterDefinition, DashboardListPanel, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupPanel, DashboardStatPanel, DashboardTimeRangeDefinition, EditExtensionSection, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditWriteFormSection, EntityEditScreenDefinition, EntityListExpandableRow, EntityListScreenDefinition, FieldCondition, FieldIconKey, FieldRenderer, FormWidth, ListBadgeTone, ListColumnDisplay, ListColumnSpec, ListFacetSpec, ListSortSpec, MetricNavigate, MetricSpec, PlatformComponent, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RelatedListToolbarAction, RowAction, RowActionDrawer, RowActionNavigate, RowActionWriteHandler, RowFieldExtractor, ScreenDefinition, ScreenFilter, ScreenFilterOp, ScreenSlots, SecretMintConfirmStep, SecretMintScreenDefinition, SecretReveal, SecretRevealField, SecretsEditScreenDefinition, SecretsEditSection, ToolbarAction, } from "../engine/types/screen.js";
|
|
12
|
+
export type { ActionFormFooterAction, ActionFormRedirect, ActionFormScreenDefinition, ConfigEditScreenDefinition, CustomScreenDefinition, CustomScreenRoute, DashboardChartKind, DashboardChartPanel, DashboardChartTone, DashboardCustomPanel, DashboardFeedPanel, DashboardFilterDefinition, DashboardListPanel, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupPanel, DashboardStatPanel, DashboardTimeRangeDefinition, EditExtensionSection, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditWriteFormSection, EntityEditScreenDefinition, EntityListExpandableRow, EntityListFacetConfig, EntityListFacetExtraOption, EntityListScreenDefinition, FieldCondition, FieldIconKey, FieldRenderer, FormWidth, ListBadgeTone, ListColumnDisplay, ListColumnSpec, ListFacetSpec, ListSortSpec, MetricNavigate, MetricSpec, PlatformComponent, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RecordHeaderSubtitlePart, RelatedListGroupBy, RelatedListRowTone, RelatedListToolbarAction, RowAction, RowActionDisplay, RowActionDrawer, RowActionMode, RowActionNavigate, RowActionWriteHandler, RowFieldExtractor, ScreenDefinition, ScreenFilter, ScreenFilterOp, ScreenSlots, SecretMintConfirmStep, SecretMintScreenDefinition, SecretReveal, SecretRevealField, SecretsEditScreenDefinition, SecretsEditSection, ToolbarAction, } from "../engine/types/screen.js";
|
|
13
13
|
export { metricField } from "../engine/types/screen.js";
|
|
14
14
|
export type { TargetRef } from "../engine/types/target-ref.js";
|
|
15
15
|
export type { TreeAction, TreeNode, TreeNodeState } from "../engine/types/tree-node.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.333.0",
|
|
4
4
|
"description": "Framework core — engine, pipeline, API, DB, and every other bit that makes Kumiko go.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -206,8 +206,8 @@
|
|
|
206
206
|
"./package.json": "./package.json"
|
|
207
207
|
},
|
|
208
208
|
"dependencies": {
|
|
209
|
-
"@cosmicdrift/kumiko-http": "0.
|
|
210
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
209
|
+
"@cosmicdrift/kumiko-http": "0.333.0",
|
|
210
|
+
"@cosmicdrift/kumiko-types": "0.333.0",
|
|
211
211
|
"bullmq": "^5.76.7",
|
|
212
212
|
"bun-types": "^1.3.13",
|
|
213
213
|
"hono": "^4.13.1",
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
"zod": "^4.4.3"
|
|
224
224
|
},
|
|
225
225
|
"devDependencies": {
|
|
226
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.
|
|
226
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.333.0",
|
|
227
227
|
"bun-types": "^1.3.13",
|
|
228
228
|
"pino-pretty": "^13.1.3"
|
|
229
229
|
},
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,44 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.332.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "agent reason developer texts match the actual error types"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"version": "0.332.0",
|
|
9
|
+
"type": "breaking",
|
|
10
|
+
"title": "buildInsertSchema strips id again; caller-chosen ids need { allowCallerId: true }",
|
|
11
|
+
"migration": "Custom-Create-Handler, die eine caller-gewaehlte id brauchen, uebergeben { allowCallerId: true } und erlauben sie nur System-Identities."
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"version": "0.332.0",
|
|
15
|
+
"type": "fix",
|
|
16
|
+
"title": "early-closed kumiko-changes blocks fail with a clear error"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"version": "0.332.0",
|
|
20
|
+
"type": "improvement",
|
|
21
|
+
"title": "A selector owner can add its own custom or screen panels to the generated settings page (extensionSelector panels)",
|
|
22
|
+
"detail": "`r.extensionSelector(extension, key, { panels })` lets the selector owner add its own `custom` or `screen` panels to the generated `<ownerGroup>-tenant` settings dashboard, after the selection panel and before the plugin panels. Short `screen` refs resolve against the declaring feature. Dead screen or `visibleWhen` query refs, empty, duplicate or `selection` panel ids fail at boot or declaration.",
|
|
23
|
+
"migration": "No code change needed."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"version": "0.332.0",
|
|
27
|
+
"type": "breaking",
|
|
28
|
+
"title": "ctx.fetchForWriting scopes handle.events to the aggregateType since the #2979 release (correction, not purely additive)",
|
|
29
|
+
"detail": "The #2979 changeset described the `aggregateType` filter as \"purely additive\". For `ctx.fetchForWriting` that was wrong: since that release, `handle.events` only contains events of the fetched aggregateType, even when a handler never passed an `aggregateType` option. Events of another aggregateType on the same aggregateId are no longer part of the handle. `loadAggregate` without `aggregateType` is unchanged.",
|
|
30
|
+
"migration": "handle.events von ctx.fetchForWriting ist seit Einführung des aggregateType-Filters\ntyp-gescoped; Handler prüfen, die Events eines anderen aggregateType auf derselben\naggregateId erwartet haben, und diese per loadAggregate ohne aggregateType lesen."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"version": "0.332.0",
|
|
34
|
+
"type": "fix",
|
|
35
|
+
"title": "Nested-write parent tenant check fails closed for parent rows without tenantId"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"version": "0.332.0",
|
|
39
|
+
"type": "fix",
|
|
40
|
+
"title": "skipPoisonEvent skips the actually failed event via kumiko_event_consumers.last_failed_event_id"
|
|
41
|
+
},
|
|
2
42
|
{
|
|
3
43
|
"version": "0.331.0",
|
|
4
44
|
"type": "fix",
|