@cadenza.io/service 2.20.0 → 2.21.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/README.md CHANGED
@@ -103,6 +103,23 @@ await browserRuntime.waitUntilReady();
103
103
 
104
104
  Use `createCadenzaService(..., { isFrontend: true })` directly when you only need the lower-level frontend transport/bootstrap behavior. Use `createBrowserRuntimeActor(...)` when the frontend also needs actor-owned readiness and projected browser runtime state.
105
105
 
106
+ ### Layer-scoped tools in distributed manifests
107
+
108
+ `@cadenza.io/service` treats helpers and globals as structural sync material.
109
+
110
+ - `service_manifest` now includes `helpers`, `globals`, `taskToHelperMaps`, `helperToHelperMaps`, `taskToGlobalMaps`, and `helperToGlobalMaps`
111
+ - helper/global rows are structural catalog data, not live remote execution membership
112
+ - local `GraphMetadataController` fans out direct helper/global events as:
113
+ - `global.meta.graph_metadata.helper_created`
114
+ - `global.meta.graph_metadata.helper_updated`
115
+ - `global.meta.graph_metadata.global_created`
116
+ - `global.meta.graph_metadata.global_updated`
117
+ - `global.meta.graph_metadata.task_helper_associated`
118
+ - `global.meta.graph_metadata.helper_helper_associated`
119
+ - `global.meta.graph_metadata.task_global_associated`
120
+ - `global.meta.graph_metadata.helper_global_associated`
121
+ - bootstrap full sync carries these rows so authority can rebuild persistence, but remote helper/global definitions are not exposed as executable local `tools`
122
+
106
123
  ### Creating a Nuxt runtime wrapper
107
124
  If your frontend is Nuxt, use `@cadenza.io/service/nuxt` on top of the shared browser actor. The Nuxt layer keeps the core runtime framework agnostic while hiding `useState`, plugin injection, and subscription wiring.
108
125
 
@@ -38,6 +38,7 @@ declare class DeputyTask extends Task {
38
38
  * @return {void} This constructor does not return a value.
39
39
  */
40
40
  constructor(name: string, remoteRoutineName: string, serviceName?: string | undefined, description?: string, concurrency?: number, timeout?: number, register?: boolean, isUnique?: boolean, isMeta?: boolean, isSubMeta?: boolean, isHidden?: boolean, getTagCallback?: ThrottleTagGetter | undefined, inputSchema?: Schema | undefined, validateInputContext?: boolean, outputSchema?: Schema | undefined, validateOutputContext?: boolean, retryCount?: number, retryDelay?: number, retryDelayMax?: number, retryDelayFactor?: number);
41
+ clone(): never;
41
42
  /**
42
43
  * Executes the specified task function within the provided execution context.
43
44
  *
@@ -142,6 +143,7 @@ declare class DatabaseTask extends DeputyTask {
142
143
  * @return {void}
143
144
  */
144
145
  constructor(name: string, taskName: string, serviceName: string | undefined, description: string | undefined, queryData: DbOperationPayload, concurrency?: number, timeout?: number, register?: boolean, isUnique?: boolean, isMeta?: boolean, isSubMeta?: boolean, isHidden?: boolean, getTagCallback?: ThrottleTagGetter | undefined, inputSchema?: Schema | undefined, validateInputContext?: boolean, outputSchema?: Schema | undefined, validateOutputContext?: boolean, retryCount?: number, retryDelay?: number, retryDelayMax?: number, retryDelayFactor?: number);
146
+ clone(): never;
145
147
  /**
146
148
  * Executes the specified task within the given context.
147
149
  *
@@ -235,6 +237,14 @@ interface ServiceInstanceDescriptor {
235
237
  serviceName: string;
236
238
  numberOfRunningGraphs?: number;
237
239
  isPrimary: boolean;
240
+ leaseStatus?: "active" | "non_responsive" | "inactive" | "deleted";
241
+ leaseExpiresAt?: string;
242
+ lastLeaseRenewedAt?: string;
243
+ isReady?: boolean;
244
+ readinessReason?: string | null;
245
+ lastReadyAt?: string | null;
246
+ lastObservedTransportAt?: string | null;
247
+ shutdownRequestedAt?: string | null;
238
248
  isActive: boolean;
239
249
  isNonResponsive: boolean;
240
250
  isBlocked: boolean;
@@ -331,6 +341,7 @@ declare class ServiceRegistry {
331
341
  private readonly runtimeStatusHeartbeatIntervalMs;
332
342
  private readonly runtimeMetricsSampleIntervalMs;
333
343
  private readonly runtimeStatusRestRefreshIntervalMs;
344
+ private readonly runtimeStatusLoopJitterRatio;
334
345
  private readonly runtimeStatusMissThreshold;
335
346
  private readonly runtimeStatusFallbackTimeoutMs;
336
347
  private readonly runtimeStatusAuthorityReportTimeoutMs;
@@ -343,6 +354,8 @@ declare class ServiceRegistry {
343
354
  private readonly routeFailurePenaltyMs;
344
355
  private readonly degradedGraphThreshold;
345
356
  private readonly overloadedGraphThreshold;
357
+ private readonly bootstrapFullSyncRetryJitterRatio;
358
+ private readonly serviceCommunicationRetryJitterRatio;
346
359
  serviceName: string | null;
347
360
  serviceInstanceId: string | null;
348
361
  numberOfRunningGraphs: number;
@@ -410,6 +423,9 @@ declare class ServiceRegistry {
410
423
  ensureBootstrapAuthorityControlPlaneForInquiry(intentName: string, ctx?: AnyObject): boolean;
411
424
  private ensureBootstrapAuthorityControlPlane;
412
425
  private hasBootstrapFullSyncDeputies;
426
+ private buildDeterministicInstanceJitterKey;
427
+ private buildJitteredIntervalStartDate;
428
+ private buildJitteredBootstrapRetryDelayMs;
413
429
  private ensureAuthorityBootstrapSignalTransmissions;
414
430
  private clearBootstrapFullSyncRetryTimer;
415
431
  private invalidateBootstrapFullSyncRetryState;
@@ -896,6 +912,190 @@ interface BrowserRuntimeActorHandle<TProjectionState extends Record<string, any>
896
912
  subscribe: (listener: (state: BrowserRuntimeActorRuntimeState<TProjectionState>) => void) => () => void;
897
913
  }
898
914
 
915
+ type ServiceManifestPublicationLayer = "routing_capability" | "business_structural" | "local_meta_structural";
916
+ type ServiceManifestTaskDefinition = {
917
+ name: string;
918
+ version: number;
919
+ description: string;
920
+ service_name: string;
921
+ is_meta: boolean;
922
+ is_sub_meta: boolean;
923
+ is_hidden: boolean;
924
+ is_ephemeral: boolean;
925
+ is_signal: boolean;
926
+ concurrency: number;
927
+ timeout: number;
928
+ retry_count: number;
929
+ retry_delay: number;
930
+ retry_delay_max: number;
931
+ retry_delay_factor: number;
932
+ validate_input_context: boolean;
933
+ validate_output_context: boolean;
934
+ input_context_schema: Record<string, unknown>;
935
+ output_context_schema: Record<string, unknown>;
936
+ signals: {
937
+ emits: string[];
938
+ emits_after: string[];
939
+ emits_on_fail: string[];
940
+ observed: string[];
941
+ };
942
+ intents: {
943
+ handles: string[];
944
+ inquires: string[];
945
+ };
946
+ };
947
+ type ServiceManifestSignalDefinition = {
948
+ name: string;
949
+ is_global: boolean;
950
+ domain: string | null;
951
+ action: string;
952
+ is_meta: boolean;
953
+ delivery_mode: "single" | "broadcast";
954
+ broadcast_filter: Record<string, unknown> | null;
955
+ };
956
+ type ServiceManifestIntentDefinition = {
957
+ name: string;
958
+ description: string;
959
+ input: Record<string, unknown>;
960
+ output: Record<string, unknown>;
961
+ is_meta: boolean;
962
+ };
963
+ type ServiceManifestActorDefinition = {
964
+ name: string;
965
+ version: number;
966
+ description: string;
967
+ service_name: string;
968
+ default_key: string;
969
+ load_policy: string;
970
+ write_contract: string;
971
+ runtime_read_guard: string;
972
+ consistency_profile: string | null;
973
+ key_definition: Record<string, unknown> | null;
974
+ state_definition: Record<string, unknown>;
975
+ retry_policy: Record<string, unknown>;
976
+ idempotency_policy: Record<string, unknown>;
977
+ session_policy: Record<string, unknown>;
978
+ is_meta: boolean;
979
+ };
980
+ type ServiceManifestRoutineDefinition = {
981
+ name: string;
982
+ version: number;
983
+ description: string;
984
+ service_name: string;
985
+ is_meta: boolean;
986
+ };
987
+ type ServiceManifestHelperDefinition = {
988
+ name: string;
989
+ version: number;
990
+ description: string;
991
+ service_name: string;
992
+ is_meta: boolean;
993
+ handler_source: string;
994
+ language: "js" | "ts";
995
+ };
996
+ type ServiceManifestGlobalDefinition = {
997
+ name: string;
998
+ version: number;
999
+ description: string;
1000
+ service_name: string;
1001
+ is_meta: boolean;
1002
+ value: unknown;
1003
+ };
1004
+ type ServiceManifestDirectionalTaskMap = {
1005
+ task_name: string;
1006
+ task_version: number;
1007
+ predecessor_task_name: string;
1008
+ predecessor_task_version: number;
1009
+ service_name: string;
1010
+ predecessor_service_name: string;
1011
+ };
1012
+ type ServiceManifestSignalTaskMap = {
1013
+ signal_name: string;
1014
+ is_global: boolean;
1015
+ task_name: string;
1016
+ task_version: number;
1017
+ service_name: string;
1018
+ };
1019
+ type ServiceManifestIntentTaskMap = {
1020
+ intent_name: string;
1021
+ task_name: string;
1022
+ task_version: number;
1023
+ service_name: string;
1024
+ };
1025
+ type ServiceManifestActorTaskMap = {
1026
+ actor_name: string;
1027
+ actor_version: number;
1028
+ task_name: string;
1029
+ task_version: number;
1030
+ service_name: string;
1031
+ mode: "read" | "write" | "meta";
1032
+ description: string;
1033
+ is_meta: boolean;
1034
+ };
1035
+ type ServiceManifestTaskRoutineMap = {
1036
+ task_name: string;
1037
+ task_version: number;
1038
+ routine_name: string;
1039
+ routine_version: number;
1040
+ service_name: string;
1041
+ };
1042
+ type ServiceManifestTaskHelperMap = {
1043
+ task_name: string;
1044
+ task_version: number;
1045
+ service_name: string;
1046
+ alias: string;
1047
+ helper_name: string;
1048
+ helper_version: number;
1049
+ };
1050
+ type ServiceManifestHelperHelperMap = {
1051
+ helper_name: string;
1052
+ helper_version: number;
1053
+ service_name: string;
1054
+ alias: string;
1055
+ dependency_helper_name: string;
1056
+ dependency_helper_version: number;
1057
+ };
1058
+ type ServiceManifestTaskGlobalMap = {
1059
+ task_name: string;
1060
+ task_version: number;
1061
+ service_name: string;
1062
+ alias: string;
1063
+ global_name: string;
1064
+ global_version: number;
1065
+ };
1066
+ type ServiceManifestHelperGlobalMap = {
1067
+ helper_name: string;
1068
+ helper_version: number;
1069
+ service_name: string;
1070
+ alias: string;
1071
+ global_name: string;
1072
+ global_version: number;
1073
+ };
1074
+ type ServiceManifestSnapshot = {
1075
+ serviceName: string;
1076
+ serviceInstanceId: string;
1077
+ revision: number;
1078
+ manifestHash: string;
1079
+ publishedAt: string;
1080
+ publicationLayer: ServiceManifestPublicationLayer;
1081
+ tasks: ServiceManifestTaskDefinition[];
1082
+ signals: ServiceManifestSignalDefinition[];
1083
+ intents: ServiceManifestIntentDefinition[];
1084
+ actors: ServiceManifestActorDefinition[];
1085
+ routines: ServiceManifestRoutineDefinition[];
1086
+ helpers: ServiceManifestHelperDefinition[];
1087
+ globals: ServiceManifestGlobalDefinition[];
1088
+ directionalTaskMaps: ServiceManifestDirectionalTaskMap[];
1089
+ signalToTaskMaps: ServiceManifestSignalTaskMap[];
1090
+ intentToTaskMaps: ServiceManifestIntentTaskMap[];
1091
+ actorTaskMaps: ServiceManifestActorTaskMap[];
1092
+ taskToRoutineMaps: ServiceManifestTaskRoutineMap[];
1093
+ taskToHelperMaps: ServiceManifestTaskHelperMap[];
1094
+ helperToHelperMaps: ServiceManifestHelperHelperMap[];
1095
+ taskToGlobalMaps: ServiceManifestTaskGlobalMap[];
1096
+ helperToGlobalMaps: ServiceManifestHelperGlobalMap[];
1097
+ };
1098
+
899
1099
  type SecurityProfile = "low" | "medium" | "high";
900
1100
  type NetworkMode = "internal" | "exposed" | "exposed-high-sec" | "auto" | "dev";
901
1101
  type ServerOptions = {
@@ -948,9 +1148,10 @@ declare class CadenzaService {
948
1148
  protected static hydratedInquiryResults: Map<string, AnyObject>;
949
1149
  protected static frontendSyncScheduled: boolean;
950
1150
  protected static serviceManifestRevision: number;
951
- protected static lastPublishedServiceManifestHash: string | null;
1151
+ protected static lastPublishedServiceManifestHashes: Partial<Record<ServiceManifestPublicationLayer, string>>;
952
1152
  protected static serviceManifestPublicationInFlight: boolean;
953
1153
  protected static serviceManifestPublicationPendingReason: string | null;
1154
+ protected static serviceManifestPublicationPendingLayer: ServiceManifestPublicationLayer | null;
954
1155
  private static shutdownHandlersRegistered;
955
1156
  private static shutdownInFlight;
956
1157
  private static shutdownHandlerCleanup;
@@ -959,6 +1160,8 @@ declare class CadenzaService {
959
1160
  private static replayRegisteredTaskIntentAssociations;
960
1161
  private static replayRegisteredTaskSignalObservations;
961
1162
  private static replayRegisteredTaskGraphMetadata;
1163
+ private static normalizeServiceManifestPublicationLayer;
1164
+ private static mergeServiceManifestPublicationRequest;
962
1165
  private static requestServiceManifestPublication;
963
1166
  private static scheduleServiceManifestPublicationRetry;
964
1167
  private static publishServiceManifestIfNeeded;
@@ -1664,4 +1867,4 @@ declare class CadenzaService {
1664
1867
  static reset(): void;
1665
1868
  }
1666
1869
 
1667
- export { AUTHORITY_RUNTIME_STATUS_REPORT_INTENT as A, type BootstrapOptions as B, CadenzaService as C, type DatabaseSchemaDefinition as D, type ServiceInstanceDescriptor as E, type FieldDefinition as F, type ServiceTransportConfig as G, type HydrationOptions as H, type InquiryResponderDescriptor as I, type JoinDefinition as J, type ServiceTransportDescriptor as K, type ServiceTransportProtocol as L, type ServiceTransportRole as M, type NetworkMode as N, type OpEffect as O, type ServiceTransportSecurityProfile as P, type QueryMode as Q, RUNTIME_STATUS_AUTHORITY_SYNC_REQUESTED_SIGNAL as R, type ServerOptions as S, SignalTransmissionTask as T, type SortDirection as U, type SubOperationType as V, type TableDefinition as W, type ValueOrSubOp as X, buildAuthorityRuntimeStatusSignature as Y, normalizeAuthorityRuntimeStatusReport as Z, type DatabaseOptions as a, type DbOperationPayload as b, type SubOperation as c, type DistributedInquiryOptions as d, ServiceRegistry as e, type AggregateDefinition as f, type AggregateFunction as g, type AuthorityRuntimeStatusReport as h, type BrowserRuntimeActorHandle as i, type BrowserRuntimeActorOptions as j, type BrowserRuntimeActorRuntimeState as k, type BrowserRuntimeProjectionBinding as l, type BrowserRuntimeServiceOptions as m, type DatabaseMigrationConstraintDefinition as n, type DatabaseMigrationDefinition as o, type DatabaseMigrationPolicy as p, type DatabaseMigrationStep as q, DatabaseTask as r, type DbOperationType$1 as s, type DeputyDescriptor as t, DeputyTask as u, type DistributedInquiryMeta as v, type InquiryResponderStatus as w, type ResolvedBootstrapEndpoint as x, type RuntimeMetricsHealthDetail as y, type SecurityProfile as z };
1870
+ export { RUNTIME_STATUS_AUTHORITY_SYNC_REQUESTED_SIGNAL as $, AUTHORITY_RUNTIME_STATUS_REPORT_INTENT as A, type BootstrapOptions as B, CadenzaService as C, type DatabaseSchemaDefinition as D, type BrowserRuntimeActorHandle as E, type BrowserRuntimeActorOptions as F, type BrowserRuntimeActorRuntimeState as G, type HydrationOptions as H, type BrowserRuntimeProjectionBinding as I, type JoinDefinition as J, type BrowserRuntimeServiceOptions as K, type DatabaseMigrationConstraintDefinition as L, type DatabaseMigrationDefinition as M, type DatabaseMigrationPolicy as N, type DatabaseMigrationStep as O, DatabaseTask as P, type DbOperationType$1 as Q, type DeputyDescriptor as R, type ServerOptions as S, DeputyTask as T, type DistributedInquiryMeta as U, type FieldDefinition as V, type InquiryResponderDescriptor as W, type InquiryResponderStatus as X, type NetworkMode as Y, type OpEffect as Z, type QueryMode as _, type DatabaseOptions as a, type ResolvedBootstrapEndpoint as a0, type RuntimeMetricsHealthDetail as a1, type SecurityProfile as a2, type ServiceInstanceDescriptor as a3, type ServiceTransportConfig as a4, type ServiceTransportDescriptor as a5, type ServiceTransportProtocol as a6, type ServiceTransportRole as a7, type ServiceTransportSecurityProfile as a8, SignalTransmissionTask as a9, type SortDirection as aa, type SubOperationType as ab, type TableDefinition as ac, type ValueOrSubOp as ad, buildAuthorityRuntimeStatusSignature as ae, normalizeAuthorityRuntimeStatusReport as af, type DbOperationPayload as b, type SubOperation as c, type DistributedInquiryOptions as d, type ServiceManifestSnapshot as e, type ServiceManifestPublicationLayer as f, type ServiceManifestTaskDefinition as g, type ServiceManifestSignalDefinition as h, type ServiceManifestIntentDefinition as i, type ServiceManifestActorDefinition as j, type ServiceManifestRoutineDefinition as k, type ServiceManifestHelperDefinition as l, type ServiceManifestGlobalDefinition as m, type ServiceManifestDirectionalTaskMap as n, type ServiceManifestSignalTaskMap as o, type ServiceManifestIntentTaskMap as p, type ServiceManifestActorTaskMap as q, type ServiceManifestTaskRoutineMap as r, type ServiceManifestTaskHelperMap as s, type ServiceManifestHelperHelperMap as t, type ServiceManifestTaskGlobalMap as u, type ServiceManifestHelperGlobalMap as v, ServiceRegistry as w, type AggregateDefinition as x, type AggregateFunction as y, type AuthorityRuntimeStatusReport as z };
@@ -38,6 +38,7 @@ declare class DeputyTask extends Task {
38
38
  * @return {void} This constructor does not return a value.
39
39
  */
40
40
  constructor(name: string, remoteRoutineName: string, serviceName?: string | undefined, description?: string, concurrency?: number, timeout?: number, register?: boolean, isUnique?: boolean, isMeta?: boolean, isSubMeta?: boolean, isHidden?: boolean, getTagCallback?: ThrottleTagGetter | undefined, inputSchema?: Schema | undefined, validateInputContext?: boolean, outputSchema?: Schema | undefined, validateOutputContext?: boolean, retryCount?: number, retryDelay?: number, retryDelayMax?: number, retryDelayFactor?: number);
41
+ clone(): never;
41
42
  /**
42
43
  * Executes the specified task function within the provided execution context.
43
44
  *
@@ -142,6 +143,7 @@ declare class DatabaseTask extends DeputyTask {
142
143
  * @return {void}
143
144
  */
144
145
  constructor(name: string, taskName: string, serviceName: string | undefined, description: string | undefined, queryData: DbOperationPayload, concurrency?: number, timeout?: number, register?: boolean, isUnique?: boolean, isMeta?: boolean, isSubMeta?: boolean, isHidden?: boolean, getTagCallback?: ThrottleTagGetter | undefined, inputSchema?: Schema | undefined, validateInputContext?: boolean, outputSchema?: Schema | undefined, validateOutputContext?: boolean, retryCount?: number, retryDelay?: number, retryDelayMax?: number, retryDelayFactor?: number);
146
+ clone(): never;
145
147
  /**
146
148
  * Executes the specified task within the given context.
147
149
  *
@@ -235,6 +237,14 @@ interface ServiceInstanceDescriptor {
235
237
  serviceName: string;
236
238
  numberOfRunningGraphs?: number;
237
239
  isPrimary: boolean;
240
+ leaseStatus?: "active" | "non_responsive" | "inactive" | "deleted";
241
+ leaseExpiresAt?: string;
242
+ lastLeaseRenewedAt?: string;
243
+ isReady?: boolean;
244
+ readinessReason?: string | null;
245
+ lastReadyAt?: string | null;
246
+ lastObservedTransportAt?: string | null;
247
+ shutdownRequestedAt?: string | null;
238
248
  isActive: boolean;
239
249
  isNonResponsive: boolean;
240
250
  isBlocked: boolean;
@@ -331,6 +341,7 @@ declare class ServiceRegistry {
331
341
  private readonly runtimeStatusHeartbeatIntervalMs;
332
342
  private readonly runtimeMetricsSampleIntervalMs;
333
343
  private readonly runtimeStatusRestRefreshIntervalMs;
344
+ private readonly runtimeStatusLoopJitterRatio;
334
345
  private readonly runtimeStatusMissThreshold;
335
346
  private readonly runtimeStatusFallbackTimeoutMs;
336
347
  private readonly runtimeStatusAuthorityReportTimeoutMs;
@@ -343,6 +354,8 @@ declare class ServiceRegistry {
343
354
  private readonly routeFailurePenaltyMs;
344
355
  private readonly degradedGraphThreshold;
345
356
  private readonly overloadedGraphThreshold;
357
+ private readonly bootstrapFullSyncRetryJitterRatio;
358
+ private readonly serviceCommunicationRetryJitterRatio;
346
359
  serviceName: string | null;
347
360
  serviceInstanceId: string | null;
348
361
  numberOfRunningGraphs: number;
@@ -410,6 +423,9 @@ declare class ServiceRegistry {
410
423
  ensureBootstrapAuthorityControlPlaneForInquiry(intentName: string, ctx?: AnyObject): boolean;
411
424
  private ensureBootstrapAuthorityControlPlane;
412
425
  private hasBootstrapFullSyncDeputies;
426
+ private buildDeterministicInstanceJitterKey;
427
+ private buildJitteredIntervalStartDate;
428
+ private buildJitteredBootstrapRetryDelayMs;
413
429
  private ensureAuthorityBootstrapSignalTransmissions;
414
430
  private clearBootstrapFullSyncRetryTimer;
415
431
  private invalidateBootstrapFullSyncRetryState;
@@ -896,6 +912,190 @@ interface BrowserRuntimeActorHandle<TProjectionState extends Record<string, any>
896
912
  subscribe: (listener: (state: BrowserRuntimeActorRuntimeState<TProjectionState>) => void) => () => void;
897
913
  }
898
914
 
915
+ type ServiceManifestPublicationLayer = "routing_capability" | "business_structural" | "local_meta_structural";
916
+ type ServiceManifestTaskDefinition = {
917
+ name: string;
918
+ version: number;
919
+ description: string;
920
+ service_name: string;
921
+ is_meta: boolean;
922
+ is_sub_meta: boolean;
923
+ is_hidden: boolean;
924
+ is_ephemeral: boolean;
925
+ is_signal: boolean;
926
+ concurrency: number;
927
+ timeout: number;
928
+ retry_count: number;
929
+ retry_delay: number;
930
+ retry_delay_max: number;
931
+ retry_delay_factor: number;
932
+ validate_input_context: boolean;
933
+ validate_output_context: boolean;
934
+ input_context_schema: Record<string, unknown>;
935
+ output_context_schema: Record<string, unknown>;
936
+ signals: {
937
+ emits: string[];
938
+ emits_after: string[];
939
+ emits_on_fail: string[];
940
+ observed: string[];
941
+ };
942
+ intents: {
943
+ handles: string[];
944
+ inquires: string[];
945
+ };
946
+ };
947
+ type ServiceManifestSignalDefinition = {
948
+ name: string;
949
+ is_global: boolean;
950
+ domain: string | null;
951
+ action: string;
952
+ is_meta: boolean;
953
+ delivery_mode: "single" | "broadcast";
954
+ broadcast_filter: Record<string, unknown> | null;
955
+ };
956
+ type ServiceManifestIntentDefinition = {
957
+ name: string;
958
+ description: string;
959
+ input: Record<string, unknown>;
960
+ output: Record<string, unknown>;
961
+ is_meta: boolean;
962
+ };
963
+ type ServiceManifestActorDefinition = {
964
+ name: string;
965
+ version: number;
966
+ description: string;
967
+ service_name: string;
968
+ default_key: string;
969
+ load_policy: string;
970
+ write_contract: string;
971
+ runtime_read_guard: string;
972
+ consistency_profile: string | null;
973
+ key_definition: Record<string, unknown> | null;
974
+ state_definition: Record<string, unknown>;
975
+ retry_policy: Record<string, unknown>;
976
+ idempotency_policy: Record<string, unknown>;
977
+ session_policy: Record<string, unknown>;
978
+ is_meta: boolean;
979
+ };
980
+ type ServiceManifestRoutineDefinition = {
981
+ name: string;
982
+ version: number;
983
+ description: string;
984
+ service_name: string;
985
+ is_meta: boolean;
986
+ };
987
+ type ServiceManifestHelperDefinition = {
988
+ name: string;
989
+ version: number;
990
+ description: string;
991
+ service_name: string;
992
+ is_meta: boolean;
993
+ handler_source: string;
994
+ language: "js" | "ts";
995
+ };
996
+ type ServiceManifestGlobalDefinition = {
997
+ name: string;
998
+ version: number;
999
+ description: string;
1000
+ service_name: string;
1001
+ is_meta: boolean;
1002
+ value: unknown;
1003
+ };
1004
+ type ServiceManifestDirectionalTaskMap = {
1005
+ task_name: string;
1006
+ task_version: number;
1007
+ predecessor_task_name: string;
1008
+ predecessor_task_version: number;
1009
+ service_name: string;
1010
+ predecessor_service_name: string;
1011
+ };
1012
+ type ServiceManifestSignalTaskMap = {
1013
+ signal_name: string;
1014
+ is_global: boolean;
1015
+ task_name: string;
1016
+ task_version: number;
1017
+ service_name: string;
1018
+ };
1019
+ type ServiceManifestIntentTaskMap = {
1020
+ intent_name: string;
1021
+ task_name: string;
1022
+ task_version: number;
1023
+ service_name: string;
1024
+ };
1025
+ type ServiceManifestActorTaskMap = {
1026
+ actor_name: string;
1027
+ actor_version: number;
1028
+ task_name: string;
1029
+ task_version: number;
1030
+ service_name: string;
1031
+ mode: "read" | "write" | "meta";
1032
+ description: string;
1033
+ is_meta: boolean;
1034
+ };
1035
+ type ServiceManifestTaskRoutineMap = {
1036
+ task_name: string;
1037
+ task_version: number;
1038
+ routine_name: string;
1039
+ routine_version: number;
1040
+ service_name: string;
1041
+ };
1042
+ type ServiceManifestTaskHelperMap = {
1043
+ task_name: string;
1044
+ task_version: number;
1045
+ service_name: string;
1046
+ alias: string;
1047
+ helper_name: string;
1048
+ helper_version: number;
1049
+ };
1050
+ type ServiceManifestHelperHelperMap = {
1051
+ helper_name: string;
1052
+ helper_version: number;
1053
+ service_name: string;
1054
+ alias: string;
1055
+ dependency_helper_name: string;
1056
+ dependency_helper_version: number;
1057
+ };
1058
+ type ServiceManifestTaskGlobalMap = {
1059
+ task_name: string;
1060
+ task_version: number;
1061
+ service_name: string;
1062
+ alias: string;
1063
+ global_name: string;
1064
+ global_version: number;
1065
+ };
1066
+ type ServiceManifestHelperGlobalMap = {
1067
+ helper_name: string;
1068
+ helper_version: number;
1069
+ service_name: string;
1070
+ alias: string;
1071
+ global_name: string;
1072
+ global_version: number;
1073
+ };
1074
+ type ServiceManifestSnapshot = {
1075
+ serviceName: string;
1076
+ serviceInstanceId: string;
1077
+ revision: number;
1078
+ manifestHash: string;
1079
+ publishedAt: string;
1080
+ publicationLayer: ServiceManifestPublicationLayer;
1081
+ tasks: ServiceManifestTaskDefinition[];
1082
+ signals: ServiceManifestSignalDefinition[];
1083
+ intents: ServiceManifestIntentDefinition[];
1084
+ actors: ServiceManifestActorDefinition[];
1085
+ routines: ServiceManifestRoutineDefinition[];
1086
+ helpers: ServiceManifestHelperDefinition[];
1087
+ globals: ServiceManifestGlobalDefinition[];
1088
+ directionalTaskMaps: ServiceManifestDirectionalTaskMap[];
1089
+ signalToTaskMaps: ServiceManifestSignalTaskMap[];
1090
+ intentToTaskMaps: ServiceManifestIntentTaskMap[];
1091
+ actorTaskMaps: ServiceManifestActorTaskMap[];
1092
+ taskToRoutineMaps: ServiceManifestTaskRoutineMap[];
1093
+ taskToHelperMaps: ServiceManifestTaskHelperMap[];
1094
+ helperToHelperMaps: ServiceManifestHelperHelperMap[];
1095
+ taskToGlobalMaps: ServiceManifestTaskGlobalMap[];
1096
+ helperToGlobalMaps: ServiceManifestHelperGlobalMap[];
1097
+ };
1098
+
899
1099
  type SecurityProfile = "low" | "medium" | "high";
900
1100
  type NetworkMode = "internal" | "exposed" | "exposed-high-sec" | "auto" | "dev";
901
1101
  type ServerOptions = {
@@ -948,9 +1148,10 @@ declare class CadenzaService {
948
1148
  protected static hydratedInquiryResults: Map<string, AnyObject>;
949
1149
  protected static frontendSyncScheduled: boolean;
950
1150
  protected static serviceManifestRevision: number;
951
- protected static lastPublishedServiceManifestHash: string | null;
1151
+ protected static lastPublishedServiceManifestHashes: Partial<Record<ServiceManifestPublicationLayer, string>>;
952
1152
  protected static serviceManifestPublicationInFlight: boolean;
953
1153
  protected static serviceManifestPublicationPendingReason: string | null;
1154
+ protected static serviceManifestPublicationPendingLayer: ServiceManifestPublicationLayer | null;
954
1155
  private static shutdownHandlersRegistered;
955
1156
  private static shutdownInFlight;
956
1157
  private static shutdownHandlerCleanup;
@@ -959,6 +1160,8 @@ declare class CadenzaService {
959
1160
  private static replayRegisteredTaskIntentAssociations;
960
1161
  private static replayRegisteredTaskSignalObservations;
961
1162
  private static replayRegisteredTaskGraphMetadata;
1163
+ private static normalizeServiceManifestPublicationLayer;
1164
+ private static mergeServiceManifestPublicationRequest;
962
1165
  private static requestServiceManifestPublication;
963
1166
  private static scheduleServiceManifestPublicationRetry;
964
1167
  private static publishServiceManifestIfNeeded;
@@ -1664,4 +1867,4 @@ declare class CadenzaService {
1664
1867
  static reset(): void;
1665
1868
  }
1666
1869
 
1667
- export { AUTHORITY_RUNTIME_STATUS_REPORT_INTENT as A, type BootstrapOptions as B, CadenzaService as C, type DatabaseSchemaDefinition as D, type ServiceInstanceDescriptor as E, type FieldDefinition as F, type ServiceTransportConfig as G, type HydrationOptions as H, type InquiryResponderDescriptor as I, type JoinDefinition as J, type ServiceTransportDescriptor as K, type ServiceTransportProtocol as L, type ServiceTransportRole as M, type NetworkMode as N, type OpEffect as O, type ServiceTransportSecurityProfile as P, type QueryMode as Q, RUNTIME_STATUS_AUTHORITY_SYNC_REQUESTED_SIGNAL as R, type ServerOptions as S, SignalTransmissionTask as T, type SortDirection as U, type SubOperationType as V, type TableDefinition as W, type ValueOrSubOp as X, buildAuthorityRuntimeStatusSignature as Y, normalizeAuthorityRuntimeStatusReport as Z, type DatabaseOptions as a, type DbOperationPayload as b, type SubOperation as c, type DistributedInquiryOptions as d, ServiceRegistry as e, type AggregateDefinition as f, type AggregateFunction as g, type AuthorityRuntimeStatusReport as h, type BrowserRuntimeActorHandle as i, type BrowserRuntimeActorOptions as j, type BrowserRuntimeActorRuntimeState as k, type BrowserRuntimeProjectionBinding as l, type BrowserRuntimeServiceOptions as m, type DatabaseMigrationConstraintDefinition as n, type DatabaseMigrationDefinition as o, type DatabaseMigrationPolicy as p, type DatabaseMigrationStep as q, DatabaseTask as r, type DbOperationType$1 as s, type DeputyDescriptor as t, DeputyTask as u, type DistributedInquiryMeta as v, type InquiryResponderStatus as w, type ResolvedBootstrapEndpoint as x, type RuntimeMetricsHealthDetail as y, type SecurityProfile as z };
1870
+ export { RUNTIME_STATUS_AUTHORITY_SYNC_REQUESTED_SIGNAL as $, AUTHORITY_RUNTIME_STATUS_REPORT_INTENT as A, type BootstrapOptions as B, CadenzaService as C, type DatabaseSchemaDefinition as D, type BrowserRuntimeActorHandle as E, type BrowserRuntimeActorOptions as F, type BrowserRuntimeActorRuntimeState as G, type HydrationOptions as H, type BrowserRuntimeProjectionBinding as I, type JoinDefinition as J, type BrowserRuntimeServiceOptions as K, type DatabaseMigrationConstraintDefinition as L, type DatabaseMigrationDefinition as M, type DatabaseMigrationPolicy as N, type DatabaseMigrationStep as O, DatabaseTask as P, type DbOperationType$1 as Q, type DeputyDescriptor as R, type ServerOptions as S, DeputyTask as T, type DistributedInquiryMeta as U, type FieldDefinition as V, type InquiryResponderDescriptor as W, type InquiryResponderStatus as X, type NetworkMode as Y, type OpEffect as Z, type QueryMode as _, type DatabaseOptions as a, type ResolvedBootstrapEndpoint as a0, type RuntimeMetricsHealthDetail as a1, type SecurityProfile as a2, type ServiceInstanceDescriptor as a3, type ServiceTransportConfig as a4, type ServiceTransportDescriptor as a5, type ServiceTransportProtocol as a6, type ServiceTransportRole as a7, type ServiceTransportSecurityProfile as a8, SignalTransmissionTask as a9, type SortDirection as aa, type SubOperationType as ab, type TableDefinition as ac, type ValueOrSubOp as ad, buildAuthorityRuntimeStatusSignature as ae, normalizeAuthorityRuntimeStatusReport as af, type DbOperationPayload as b, type SubOperation as c, type DistributedInquiryOptions as d, type ServiceManifestSnapshot as e, type ServiceManifestPublicationLayer as f, type ServiceManifestTaskDefinition as g, type ServiceManifestSignalDefinition as h, type ServiceManifestIntentDefinition as i, type ServiceManifestActorDefinition as j, type ServiceManifestRoutineDefinition as k, type ServiceManifestHelperDefinition as l, type ServiceManifestGlobalDefinition as m, type ServiceManifestDirectionalTaskMap as n, type ServiceManifestSignalTaskMap as o, type ServiceManifestIntentTaskMap as p, type ServiceManifestActorTaskMap as q, type ServiceManifestTaskRoutineMap as r, type ServiceManifestTaskHelperMap as s, type ServiceManifestHelperHelperMap as t, type ServiceManifestTaskGlobalMap as u, type ServiceManifestHelperGlobalMap as v, ServiceRegistry as w, type AggregateDefinition as x, type AggregateFunction as y, type AuthorityRuntimeStatusReport as z };