@cadenza.io/service 2.17.52 → 2.17.54
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/browser/index.js +508 -441
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +508 -441
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.js +508 -441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +508 -441
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -436,16 +436,16 @@ function normalizeServiceTransportConfig(value) {
|
|
|
436
436
|
}
|
|
437
437
|
function normalizeServiceTransportDescriptor(value) {
|
|
438
438
|
const raw = value ?? {};
|
|
439
|
-
const
|
|
439
|
+
const uuid7 = normalizeString(raw.uuid);
|
|
440
440
|
const serviceInstanceId = normalizeString(
|
|
441
441
|
raw.serviceInstanceId ?? raw.service_instance_id
|
|
442
442
|
);
|
|
443
443
|
const config = normalizeServiceTransportConfig(raw);
|
|
444
|
-
if (!
|
|
444
|
+
if (!uuid7 || !serviceInstanceId || !config) {
|
|
445
445
|
return null;
|
|
446
446
|
}
|
|
447
447
|
return {
|
|
448
|
-
uuid:
|
|
448
|
+
uuid: uuid7,
|
|
449
449
|
serviceInstanceId,
|
|
450
450
|
role: config.role,
|
|
451
451
|
origin: config.origin,
|
|
@@ -507,14 +507,14 @@ function normalizeTransportArray(value, serviceInstanceId) {
|
|
|
507
507
|
}
|
|
508
508
|
function normalizeServiceInstanceDescriptor(value) {
|
|
509
509
|
const raw = value ?? {};
|
|
510
|
-
const
|
|
510
|
+
const uuid7 = normalizeString2(raw.uuid);
|
|
511
511
|
const serviceName = normalizeString2(raw.serviceName ?? raw.service_name);
|
|
512
|
-
if (!
|
|
512
|
+
if (!uuid7 || !serviceName) {
|
|
513
513
|
return null;
|
|
514
514
|
}
|
|
515
|
-
const transports = normalizeTransportArray(raw.transports,
|
|
515
|
+
const transports = normalizeTransportArray(raw.transports, uuid7);
|
|
516
516
|
return {
|
|
517
|
-
uuid:
|
|
517
|
+
uuid: uuid7,
|
|
518
518
|
serviceName,
|
|
519
519
|
numberOfRunningGraphs: Math.max(
|
|
520
520
|
0,
|
|
@@ -1155,15 +1155,15 @@ var ServiceRegistry = class _ServiceRegistry {
|
|
|
1155
1155
|
if (!serviceInstance) {
|
|
1156
1156
|
return false;
|
|
1157
1157
|
}
|
|
1158
|
-
const
|
|
1158
|
+
const uuid7 = serviceInstance.uuid;
|
|
1159
1159
|
const serviceName = serviceInstance.serviceName;
|
|
1160
1160
|
const deleted = Boolean(
|
|
1161
1161
|
ctx.deleted ?? ctx.serviceInstance?.deleted ?? ctx.data?.deleted
|
|
1162
1162
|
);
|
|
1163
|
-
if (
|
|
1163
|
+
if (uuid7 === this.serviceInstanceId) return;
|
|
1164
1164
|
if (deleted) {
|
|
1165
|
-
const existingInstance = this.instances.get(serviceName)?.find((instance) => instance.uuid ===
|
|
1166
|
-
const indexToDelete = this.instances.get(serviceName)?.findIndex((i) => i.uuid ===
|
|
1165
|
+
const existingInstance = this.instances.get(serviceName)?.find((instance) => instance.uuid === uuid7);
|
|
1166
|
+
const indexToDelete = this.instances.get(serviceName)?.findIndex((i) => i.uuid === uuid7) ?? -1;
|
|
1167
1167
|
if (indexToDelete >= 0 && existingInstance) {
|
|
1168
1168
|
this.instances.get(serviceName)?.splice(indexToDelete, 1);
|
|
1169
1169
|
for (const transport of existingInstance.transports) {
|
|
@@ -1175,13 +1175,13 @@ var ServiceRegistry = class _ServiceRegistry {
|
|
|
1175
1175
|
if (this.instances.get(serviceName)?.length === 0) {
|
|
1176
1176
|
this.instances.delete(serviceName);
|
|
1177
1177
|
}
|
|
1178
|
-
this.unregisterDependee(
|
|
1178
|
+
this.unregisterDependee(uuid7, serviceName);
|
|
1179
1179
|
return;
|
|
1180
1180
|
}
|
|
1181
1181
|
if (!this.instances.has(serviceName))
|
|
1182
1182
|
this.instances.set(serviceName, []);
|
|
1183
1183
|
const instances = this.instances.get(serviceName);
|
|
1184
|
-
const existing = instances.find((i) => i.uuid ===
|
|
1184
|
+
const existing = instances.find((i) => i.uuid === uuid7);
|
|
1185
1185
|
if (existing) {
|
|
1186
1186
|
Object.assign(existing, {
|
|
1187
1187
|
...serviceInstance,
|
|
@@ -1191,7 +1191,7 @@ var ServiceRegistry = class _ServiceRegistry {
|
|
|
1191
1191
|
} else {
|
|
1192
1192
|
instances.push(serviceInstance);
|
|
1193
1193
|
}
|
|
1194
|
-
const trackedInstance = existing ?? instances.find((instance) => instance.uuid ===
|
|
1194
|
+
const trackedInstance = existing ?? instances.find((instance) => instance.uuid === uuid7);
|
|
1195
1195
|
if (trackedInstance) {
|
|
1196
1196
|
const snapshot = this.resolveRuntimeStatusSnapshot(
|
|
1197
1197
|
trackedInstance.numberOfRunningGraphs ?? 0,
|
|
@@ -1204,7 +1204,7 @@ var ServiceRegistry = class _ServiceRegistry {
|
|
|
1204
1204
|
trackedInstance.reportedAt = trackedInstance.reportedAt ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
1205
1205
|
}
|
|
1206
1206
|
if (!serviceInstance.isBootstrapPlaceholder) {
|
|
1207
|
-
this.reconcileBootstrapPlaceholderInstance(serviceName,
|
|
1207
|
+
this.reconcileBootstrapPlaceholderInstance(serviceName, uuid7, emit);
|
|
1208
1208
|
}
|
|
1209
1209
|
if (this.serviceName === serviceName) {
|
|
1210
1210
|
return false;
|
|
@@ -1233,7 +1233,7 @@ var ServiceRegistry = class _ServiceRegistry {
|
|
|
1233
1233
|
if (!clientCreated) {
|
|
1234
1234
|
emit("meta.service_registry.dependee_registered", {
|
|
1235
1235
|
serviceName,
|
|
1236
|
-
serviceInstanceId:
|
|
1236
|
+
serviceInstanceId: uuid7,
|
|
1237
1237
|
serviceTransportId: trackedTransport.uuid,
|
|
1238
1238
|
serviceOrigin: trackedTransport.origin,
|
|
1239
1239
|
transportProtocols: trackedTransport.protocols,
|
|
@@ -1247,7 +1247,7 @@ var ServiceRegistry = class _ServiceRegistry {
|
|
|
1247
1247
|
} else {
|
|
1248
1248
|
emit("meta.service_registry.routeable_transport_missing", {
|
|
1249
1249
|
serviceName,
|
|
1250
|
-
serviceInstanceId:
|
|
1250
|
+
serviceInstanceId: uuid7,
|
|
1251
1251
|
requiredRole: this.getRoutingTransportRole(),
|
|
1252
1252
|
isFrontend: this.isFrontend
|
|
1253
1253
|
});
|
|
@@ -4122,6 +4122,9 @@ var dynamicImport = new Function(
|
|
|
4122
4122
|
async function importNodeModule(specifier) {
|
|
4123
4123
|
return dynamicImport(specifier);
|
|
4124
4124
|
}
|
|
4125
|
+
function isSocketAckCallback(value) {
|
|
4126
|
+
return typeof value === "function";
|
|
4127
|
+
}
|
|
4125
4128
|
var SocketController = class _SocketController {
|
|
4126
4129
|
constructor() {
|
|
4127
4130
|
this.diagnosticsErrorHistoryLimit = 100;
|
|
@@ -4574,22 +4577,26 @@ var SocketController = class _SocketController {
|
|
|
4574
4577
|
});
|
|
4575
4578
|
ws.on("signal", (ctx, callback) => {
|
|
4576
4579
|
if (CadenzaService.signalBroker.listObservedSignals().includes(ctx.__signalName)) {
|
|
4577
|
-
callback
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4580
|
+
if (isSocketAckCallback(callback)) {
|
|
4581
|
+
callback({
|
|
4582
|
+
__status: "success",
|
|
4583
|
+
__signalName: ctx.__signalName
|
|
4584
|
+
});
|
|
4585
|
+
}
|
|
4581
4586
|
CadenzaService.emit(ctx.__signalName, ctx);
|
|
4582
4587
|
} else {
|
|
4583
4588
|
CadenzaService.log(
|
|
4584
4589
|
`No such signal ${ctx.__signalName} on ${ctx.__serviceName}`,
|
|
4585
4590
|
"warning"
|
|
4586
4591
|
);
|
|
4587
|
-
callback
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4592
|
+
if (isSocketAckCallback(callback)) {
|
|
4593
|
+
callback({
|
|
4594
|
+
...ctx,
|
|
4595
|
+
__status: "error",
|
|
4596
|
+
__error: `No such signal: ${ctx.__signalName}`,
|
|
4597
|
+
errored: true
|
|
4598
|
+
});
|
|
4599
|
+
}
|
|
4593
4600
|
}
|
|
4594
4601
|
});
|
|
4595
4602
|
ws.on(
|
|
@@ -5021,19 +5028,23 @@ var SocketController = class _SocketController {
|
|
|
5021
5028
|
});
|
|
5022
5029
|
socket.on("signal", (signalCtx, callback) => {
|
|
5023
5030
|
if (CadenzaService.signalBroker.listObservedSignals().includes(signalCtx.__signalName)) {
|
|
5024
|
-
callback
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5031
|
+
if (isSocketAckCallback(callback)) {
|
|
5032
|
+
callback({
|
|
5033
|
+
__status: "success",
|
|
5034
|
+
__signalName: signalCtx.__signalName
|
|
5035
|
+
});
|
|
5036
|
+
}
|
|
5028
5037
|
CadenzaService.emit(signalCtx.__signalName, signalCtx);
|
|
5029
5038
|
return;
|
|
5030
5039
|
}
|
|
5031
|
-
callback
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5040
|
+
if (isSocketAckCallback(callback)) {
|
|
5041
|
+
callback({
|
|
5042
|
+
...signalCtx,
|
|
5043
|
+
__status: "error",
|
|
5044
|
+
__error: `No such signal: ${signalCtx.__signalName}`,
|
|
5045
|
+
errored: true
|
|
5046
|
+
});
|
|
5047
|
+
}
|
|
5037
5048
|
});
|
|
5038
5049
|
socket.on("status_check", (statusCtx, callback) => {
|
|
5039
5050
|
callback(CadenzaService.serviceRegistry.resolveLocalStatusCheck(statusCtx));
|
|
@@ -6111,11 +6122,10 @@ var DatabaseController = class _DatabaseController {
|
|
|
6111
6122
|
};
|
|
6112
6123
|
|
|
6113
6124
|
// src/Cadenza.ts
|
|
6114
|
-
var
|
|
6125
|
+
var import_uuid5 = require("uuid");
|
|
6115
6126
|
|
|
6116
6127
|
// src/graph/controllers/GraphSyncController.ts
|
|
6117
6128
|
var import_core4 = require("@cadenza.io/core");
|
|
6118
|
-
var import_uuid5 = require("uuid");
|
|
6119
6129
|
var ACTOR_TASK_METADATA = /* @__PURE__ */ Symbol.for("@cadenza.io/core/actor-task-meta");
|
|
6120
6130
|
function getActorTaskRuntimeMetadata(taskFunction) {
|
|
6121
6131
|
if (typeof taskFunction !== "function") {
|
|
@@ -6243,6 +6253,64 @@ function buildSyncInsertQueryData(ctx, queryData = {}) {
|
|
|
6243
6253
|
}
|
|
6244
6254
|
return nextQueryData;
|
|
6245
6255
|
}
|
|
6256
|
+
function wireSyncTaskGraph(predecessorTask, graph, ...completionTasks) {
|
|
6257
|
+
if (!graph) {
|
|
6258
|
+
return void 0;
|
|
6259
|
+
}
|
|
6260
|
+
predecessorTask.then(graph.entryTask);
|
|
6261
|
+
if (completionTasks.length > 0) {
|
|
6262
|
+
graph.completionTask.then(...completionTasks);
|
|
6263
|
+
}
|
|
6264
|
+
return graph.completionTask;
|
|
6265
|
+
}
|
|
6266
|
+
function resolveLocalDatabaseTaskIntent(task, operation, tableName) {
|
|
6267
|
+
if (!task) {
|
|
6268
|
+
return void 0;
|
|
6269
|
+
}
|
|
6270
|
+
const expectedPrefix = `${operation}-pg-`;
|
|
6271
|
+
const expectedSuffix = `-${tableName}`;
|
|
6272
|
+
const handledIntents = Array.from(task.handlesIntents ?? []);
|
|
6273
|
+
const directMatch = handledIntents.find(
|
|
6274
|
+
(intent) => typeof intent === "string" && intent.startsWith(expectedPrefix) && intent.endsWith(expectedSuffix)
|
|
6275
|
+
);
|
|
6276
|
+
if (directMatch) {
|
|
6277
|
+
return directMatch;
|
|
6278
|
+
}
|
|
6279
|
+
return handledIntents.find(
|
|
6280
|
+
(intent) => typeof intent === "string" && intent.startsWith(expectedPrefix)
|
|
6281
|
+
);
|
|
6282
|
+
}
|
|
6283
|
+
function createLocalDatabaseInquiryTask(localTask, operation, tableName, options = {}) {
|
|
6284
|
+
const intentName = resolveLocalDatabaseTaskIntent(localTask, operation, tableName);
|
|
6285
|
+
return CadenzaService.createMetaTask(
|
|
6286
|
+
`Execute local graph sync ${operation} for ${tableName}`,
|
|
6287
|
+
async (ctx, _emit, inquire) => {
|
|
6288
|
+
if (!intentName) {
|
|
6289
|
+
return {
|
|
6290
|
+
...ctx,
|
|
6291
|
+
errored: true,
|
|
6292
|
+
__success: false,
|
|
6293
|
+
__error: `No local ${operation} intent found for ${tableName}`
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
const inquiryContext = {
|
|
6297
|
+
...ctx,
|
|
6298
|
+
queryData: ctx.queryData && typeof ctx.queryData === "object" ? ctx.queryData : {}
|
|
6299
|
+
};
|
|
6300
|
+
const result = await inquire(intentName, inquiryContext, {});
|
|
6301
|
+
return {
|
|
6302
|
+
...ctx,
|
|
6303
|
+
...result
|
|
6304
|
+
};
|
|
6305
|
+
},
|
|
6306
|
+
`Executes the local ${tableName} ${operation} operation through the generated database intent.`,
|
|
6307
|
+
{
|
|
6308
|
+
...options,
|
|
6309
|
+
register: false,
|
|
6310
|
+
isHidden: true
|
|
6311
|
+
}
|
|
6312
|
+
);
|
|
6313
|
+
}
|
|
6246
6314
|
function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, options = {}) {
|
|
6247
6315
|
const localInsertTask = CadenzaService.getLocalCadenzaDBInsertTask(tableName);
|
|
6248
6316
|
const remoteInsertTask = isCadenzaDBReady ? CadenzaService.createCadenzaDBInsertTask(tableName, queryData, options) : void 0;
|
|
@@ -6250,7 +6318,7 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
|
|
|
6250
6318
|
if (!localInsertTask && !remoteInsertTask) {
|
|
6251
6319
|
return void 0;
|
|
6252
6320
|
}
|
|
6253
|
-
const targetTask = localInsertTask
|
|
6321
|
+
const targetTask = localInsertTask ? createLocalDatabaseInquiryTask(localInsertTask, "insert", tableName, options) : remoteInsertTask;
|
|
6254
6322
|
if (debugTable) {
|
|
6255
6323
|
logSyncDebug("insert_task_resolved", {
|
|
6256
6324
|
tableName,
|
|
@@ -6261,21 +6329,14 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
|
|
|
6261
6329
|
options
|
|
6262
6330
|
});
|
|
6263
6331
|
}
|
|
6264
|
-
const executionRequestedSignal = `meta.sync_controller.insert_execution_requested:${tableName}`;
|
|
6265
|
-
const executionResolvedSignal = `meta.sync_controller.insert_execution_resolved:${tableName}`;
|
|
6266
|
-
const executionFailedSignal = `meta.sync_controller.insert_execution_failed:${tableName}`;
|
|
6267
|
-
const pendingResolverContexts = /* @__PURE__ */ new Map();
|
|
6268
6332
|
const prepareExecutionTask = CadenzaService.createMetaTask(
|
|
6269
6333
|
`Prepare graph sync insert for ${tableName}`,
|
|
6270
6334
|
(ctx) => {
|
|
6271
6335
|
const originalContext = { ...ctx };
|
|
6272
|
-
const originalQueryData = buildSyncInsertQueryData(
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
originalQueryData
|
|
6277
|
-
});
|
|
6278
|
-
}
|
|
6336
|
+
const originalQueryData = buildSyncInsertQueryData(
|
|
6337
|
+
ctx,
|
|
6338
|
+
queryData
|
|
6339
|
+
);
|
|
6279
6340
|
return {
|
|
6280
6341
|
...ctx,
|
|
6281
6342
|
__resolverOriginalContext: originalContext,
|
|
@@ -6288,7 +6349,7 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
|
|
|
6288
6349
|
register: false,
|
|
6289
6350
|
isHidden: true
|
|
6290
6351
|
}
|
|
6291
|
-
)
|
|
6352
|
+
);
|
|
6292
6353
|
if (debugTable) {
|
|
6293
6354
|
prepareExecutionTask.then(
|
|
6294
6355
|
CadenzaService.createMetaTask(
|
|
@@ -6322,15 +6383,9 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
|
|
|
6322
6383
|
}
|
|
6323
6384
|
const finalizeExecutionTask = CadenzaService.createMetaTask(
|
|
6324
6385
|
`Finalize graph sync insert for ${tableName}`,
|
|
6325
|
-
(ctx
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
}
|
|
6329
|
-
const pendingResolverContext = pendingResolverContexts.get(
|
|
6330
|
-
ctx.__resolverRequestId
|
|
6331
|
-
);
|
|
6332
|
-
const originalContext = ctx.__resolverOriginalContext && typeof ctx.__resolverOriginalContext === "object" ? ctx.__resolverOriginalContext : pendingResolverContext?.originalContext ? { ...pendingResolverContext.originalContext } : {};
|
|
6333
|
-
const originalQueryData = ctx.__resolverQueryData && typeof ctx.__resolverQueryData === "object" ? ctx.__resolverQueryData : pendingResolverContext?.originalQueryData;
|
|
6386
|
+
(ctx) => {
|
|
6387
|
+
const originalContext = ctx.__resolverOriginalContext && typeof ctx.__resolverOriginalContext === "object" ? ctx.__resolverOriginalContext : {};
|
|
6388
|
+
const originalQueryData = ctx.__resolverQueryData && typeof ctx.__resolverQueryData === "object" ? ctx.__resolverQueryData : void 0;
|
|
6334
6389
|
const normalizedContext = {
|
|
6335
6390
|
...originalContext,
|
|
6336
6391
|
...ctx,
|
|
@@ -6355,8 +6410,6 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
|
|
|
6355
6410
|
});
|
|
6356
6411
|
}
|
|
6357
6412
|
}
|
|
6358
|
-
pendingResolverContexts.delete(ctx.__resolverRequestId);
|
|
6359
|
-
emit(executionResolvedSignal, normalizedContext);
|
|
6360
6413
|
return normalizedContext;
|
|
6361
6414
|
},
|
|
6362
6415
|
`Finalizes ${tableName} graph-sync insert execution after the authority task finishes.`,
|
|
@@ -6365,95 +6418,12 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
|
|
|
6365
6418
|
isHidden: true
|
|
6366
6419
|
}
|
|
6367
6420
|
);
|
|
6368
|
-
targetTask.then(finalizeExecutionTask).emitsOnFail(executionFailedSignal);
|
|
6369
6421
|
prepareExecutionTask.then(targetTask);
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
if (shouldDebugTaskSyncPayload(ctx) || shouldDebugSyncTaskName(ctx.__taskName)) {
|
|
6376
|
-
logSyncDebug("insert_failed", {
|
|
6377
|
-
tableName,
|
|
6378
|
-
targetTaskName: targetTask.name,
|
|
6379
|
-
payload: buildTaskSyncDebugPayload({
|
|
6380
|
-
...ctx,
|
|
6381
|
-
__taskName: ctx.__taskName
|
|
6382
|
-
})
|
|
6383
|
-
});
|
|
6384
|
-
}
|
|
6385
|
-
} else {
|
|
6386
|
-
logSyncDebug("insert_failed", {
|
|
6387
|
-
tableName,
|
|
6388
|
-
targetTaskName: targetTask.name,
|
|
6389
|
-
ctx
|
|
6390
|
-
});
|
|
6391
|
-
}
|
|
6392
|
-
if (typeof ctx.__resolverRequestId === "string") {
|
|
6393
|
-
pendingResolverContexts.delete(ctx.__resolverRequestId);
|
|
6394
|
-
}
|
|
6395
|
-
return false;
|
|
6396
|
-
},
|
|
6397
|
-
`Logs failed ${tableName} sync insert executions.`,
|
|
6398
|
-
{
|
|
6399
|
-
register: false,
|
|
6400
|
-
isHidden: true
|
|
6401
|
-
}
|
|
6402
|
-
).doOn(executionFailedSignal);
|
|
6403
|
-
}
|
|
6404
|
-
return CadenzaService.createMetaTask(
|
|
6405
|
-
`Resolve graph sync insert for ${tableName}`,
|
|
6406
|
-
(ctx, emit) => new Promise((resolve) => {
|
|
6407
|
-
const resolverRequestId = (0, import_uuid5.v4)();
|
|
6408
|
-
const resolvedContext = {
|
|
6409
|
-
...ctx,
|
|
6410
|
-
__resolverRequestId: resolverRequestId
|
|
6411
|
-
};
|
|
6412
|
-
if (debugTable) {
|
|
6413
|
-
if (tableName === "task") {
|
|
6414
|
-
if (shouldDebugTaskSyncPayload(resolvedContext)) {
|
|
6415
|
-
logSyncDebug("insert_resolver_request", {
|
|
6416
|
-
tableName,
|
|
6417
|
-
targetTaskName: targetTask.name,
|
|
6418
|
-
payload: buildTaskSyncDebugPayload(resolvedContext)
|
|
6419
|
-
});
|
|
6420
|
-
}
|
|
6421
|
-
} else {
|
|
6422
|
-
logSyncDebug("insert_resolver_request", {
|
|
6423
|
-
tableName,
|
|
6424
|
-
targetTaskName: targetTask.name,
|
|
6425
|
-
ctx: resolvedContext
|
|
6426
|
-
});
|
|
6427
|
-
}
|
|
6428
|
-
}
|
|
6429
|
-
CadenzaService.createEphemeralMetaTask(
|
|
6430
|
-
`Resolve graph sync insert execution for ${tableName} (${resolverRequestId})`,
|
|
6431
|
-
(resultCtx) => {
|
|
6432
|
-
if (resultCtx.__resolverRequestId !== resolverRequestId) {
|
|
6433
|
-
return false;
|
|
6434
|
-
}
|
|
6435
|
-
const normalizedResult = {
|
|
6436
|
-
...resultCtx
|
|
6437
|
-
};
|
|
6438
|
-
delete normalizedResult.__resolverRequestId;
|
|
6439
|
-
pendingResolverContexts.delete(resolverRequestId);
|
|
6440
|
-
resolve(normalizedResult);
|
|
6441
|
-
return normalizedResult;
|
|
6442
|
-
},
|
|
6443
|
-
`Waits for ${tableName} graph-sync insert execution.`,
|
|
6444
|
-
{
|
|
6445
|
-
register: false
|
|
6446
|
-
}
|
|
6447
|
-
).doOn(executionResolvedSignal, executionFailedSignal);
|
|
6448
|
-
emit(executionRequestedSignal, resolvedContext);
|
|
6449
|
-
}),
|
|
6450
|
-
`Routes graph sync inserts for ${tableName} through the local authority task when available.`,
|
|
6451
|
-
{
|
|
6452
|
-
...options,
|
|
6453
|
-
register: false,
|
|
6454
|
-
isHidden: true
|
|
6455
|
-
}
|
|
6456
|
-
);
|
|
6422
|
+
targetTask.then(finalizeExecutionTask);
|
|
6423
|
+
return {
|
|
6424
|
+
entryTask: prepareExecutionTask,
|
|
6425
|
+
completionTask: finalizeExecutionTask
|
|
6426
|
+
};
|
|
6457
6427
|
}
|
|
6458
6428
|
var CADENZA_DB_REQUIRED_LOCAL_SYNC_INSERT_TABLES = [
|
|
6459
6429
|
"intent_registry",
|
|
@@ -6614,8 +6584,8 @@ function resolveSyncQueryTask(isCadenzaDBReady, tableName, queryData = {}, optio
|
|
|
6614
6584
|
if (!localQueryTask && !remoteQueryTask) {
|
|
6615
6585
|
return void 0;
|
|
6616
6586
|
}
|
|
6617
|
-
const targetTask = localQueryTask
|
|
6618
|
-
|
|
6587
|
+
const targetTask = localQueryTask ? createLocalDatabaseInquiryTask(localQueryTask, "query", tableName, options) : remoteQueryTask;
|
|
6588
|
+
const prepareQueryTask = CadenzaService.createMetaTask(
|
|
6619
6589
|
`Prepare graph sync query for ${tableName}`,
|
|
6620
6590
|
(ctx) => ({
|
|
6621
6591
|
...ctx,
|
|
@@ -6629,7 +6599,22 @@ function resolveSyncQueryTask(isCadenzaDBReady, tableName, queryData = {}, optio
|
|
|
6629
6599
|
register: false,
|
|
6630
6600
|
isHidden: true
|
|
6631
6601
|
}
|
|
6632
|
-
)
|
|
6602
|
+
);
|
|
6603
|
+
const finalizeQueryTask = CadenzaService.createMetaTask(
|
|
6604
|
+
`Finalize graph sync query for ${tableName}`,
|
|
6605
|
+
(ctx) => ctx,
|
|
6606
|
+
`Finalizes ${tableName} graph-sync query payloads after authority lookup.`,
|
|
6607
|
+
{
|
|
6608
|
+
register: false,
|
|
6609
|
+
isHidden: true
|
|
6610
|
+
}
|
|
6611
|
+
);
|
|
6612
|
+
prepareQueryTask.then(targetTask);
|
|
6613
|
+
targetTask.then(finalizeQueryTask);
|
|
6614
|
+
return {
|
|
6615
|
+
entryTask: prepareQueryTask,
|
|
6616
|
+
completionTask: finalizeQueryTask
|
|
6617
|
+
};
|
|
6633
6618
|
}
|
|
6634
6619
|
function getRegistrableTasks() {
|
|
6635
6620
|
return Array.from(CadenzaService.registry.tasks.values()).filter(
|
|
@@ -6756,25 +6741,25 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6756
6741
|
},
|
|
6757
6742
|
{ concurrency: 30 }
|
|
6758
6743
|
);
|
|
6759
|
-
const
|
|
6744
|
+
const authoritativeTaskQueryGraph = resolveSyncQueryTask(
|
|
6760
6745
|
this.isCadenzaDBReady,
|
|
6761
6746
|
"task",
|
|
6762
6747
|
{},
|
|
6763
6748
|
{ concurrency: 10 }
|
|
6764
6749
|
);
|
|
6765
|
-
const
|
|
6750
|
+
const authoritativeRoutineQueryGraph = resolveSyncQueryTask(
|
|
6766
6751
|
this.isCadenzaDBReady,
|
|
6767
6752
|
"routine",
|
|
6768
6753
|
{},
|
|
6769
6754
|
{ concurrency: 10 }
|
|
6770
6755
|
);
|
|
6771
|
-
const
|
|
6756
|
+
const authoritativeSignalQueryGraph = resolveSyncQueryTask(
|
|
6772
6757
|
this.isCadenzaDBReady,
|
|
6773
6758
|
"signal_registry",
|
|
6774
6759
|
{},
|
|
6775
6760
|
{ concurrency: 10 }
|
|
6776
6761
|
);
|
|
6777
|
-
const
|
|
6762
|
+
const authoritativeIntentQueryGraph = resolveSyncQueryTask(
|
|
6778
6763
|
this.isCadenzaDBReady,
|
|
6779
6764
|
"intent_registry",
|
|
6780
6765
|
{},
|
|
@@ -6945,32 +6930,30 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
6945
6930
|
}
|
|
6946
6931
|
}.bind(this)
|
|
6947
6932
|
);
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
{
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
do: "nothing"
|
|
6957
|
-
}
|
|
6958
|
-
}
|
|
6959
|
-
},
|
|
6960
|
-
{ concurrency: 30 }
|
|
6961
|
-
)?.then(
|
|
6962
|
-
CadenzaService.createMetaTask("Register routine", (ctx) => {
|
|
6963
|
-
if (!didSyncInsertSucceed(ctx)) {
|
|
6964
|
-
return;
|
|
6933
|
+
const routineRegistrationGraph = resolveSyncInsertTask(
|
|
6934
|
+
this.isCadenzaDBReady,
|
|
6935
|
+
"routine",
|
|
6936
|
+
{
|
|
6937
|
+
onConflict: {
|
|
6938
|
+
target: ["name", "version", "service_name"],
|
|
6939
|
+
action: {
|
|
6940
|
+
do: "nothing"
|
|
6965
6941
|
}
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
CadenzaService.getRoutine(ctx.__routineName).registered = true;
|
|
6970
|
-
return true;
|
|
6971
|
-
}).then(gatherRoutineRegistrationTask)
|
|
6972
|
-
)
|
|
6942
|
+
}
|
|
6943
|
+
},
|
|
6944
|
+
{ concurrency: 30 }
|
|
6973
6945
|
);
|
|
6946
|
+
const registerRoutineTask = CadenzaService.createMetaTask("Register routine", (ctx) => {
|
|
6947
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
6948
|
+
return;
|
|
6949
|
+
}
|
|
6950
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
6951
|
+
delayMs: 3e3
|
|
6952
|
+
});
|
|
6953
|
+
CadenzaService.getRoutine(ctx.__routineName).registered = true;
|
|
6954
|
+
return true;
|
|
6955
|
+
}).then(gatherRoutineRegistrationTask);
|
|
6956
|
+
wireSyncTaskGraph(this.splitRoutinesTask, routineRegistrationGraph, registerRoutineTask);
|
|
6974
6957
|
this.splitTasksInRoutines = CadenzaService.createMetaTask(
|
|
6975
6958
|
"Split tasks in routines",
|
|
6976
6959
|
function* (ctx) {
|
|
@@ -7023,7 +7006,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7023
7006
|
}
|
|
7024
7007
|
}
|
|
7025
7008
|
);
|
|
7026
|
-
const
|
|
7009
|
+
const registerTaskToRoutineMapGraph = resolveSyncInsertTask(
|
|
7027
7010
|
this.isCadenzaDBReady,
|
|
7028
7011
|
"task_to_routine_map",
|
|
7029
7012
|
{
|
|
@@ -7041,8 +7024,10 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7041
7024
|
}
|
|
7042
7025
|
},
|
|
7043
7026
|
{ concurrency: 30 }
|
|
7044
|
-
)
|
|
7045
|
-
|
|
7027
|
+
);
|
|
7028
|
+
const registerTaskToRoutineMapTask = CadenzaService.createMetaTask(
|
|
7029
|
+
"Register routine task",
|
|
7030
|
+
(ctx) => {
|
|
7046
7031
|
if (!didSyncInsertSucceed(ctx)) {
|
|
7047
7032
|
return;
|
|
7048
7033
|
}
|
|
@@ -7052,11 +7037,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7052
7037
|
CadenzaService.getRoutine(ctx.__routineName).registeredTasks.add(
|
|
7053
7038
|
ctx.__taskName
|
|
7054
7039
|
);
|
|
7055
|
-
}
|
|
7040
|
+
}
|
|
7041
|
+
);
|
|
7042
|
+
wireSyncTaskGraph(
|
|
7043
|
+
this.splitTasksInRoutines,
|
|
7044
|
+
registerTaskToRoutineMapGraph,
|
|
7045
|
+
registerTaskToRoutineMapTask
|
|
7056
7046
|
);
|
|
7057
|
-
if (registerTaskToRoutineMapTask) {
|
|
7058
|
-
this.splitTasksInRoutines.then(registerTaskToRoutineMapTask);
|
|
7059
|
-
}
|
|
7060
7047
|
this.splitSignalsTask = CadenzaService.createMetaTask(
|
|
7061
7048
|
"Split signals for registration",
|
|
7062
7049
|
function* (ctx) {
|
|
@@ -7085,30 +7072,35 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7085
7072
|
}
|
|
7086
7073
|
}.bind(this)
|
|
7087
7074
|
);
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
{
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
do: "nothing"
|
|
7097
|
-
}
|
|
7098
|
-
}
|
|
7099
|
-
},
|
|
7100
|
-
{ concurrency: 30 }
|
|
7101
|
-
)?.then(
|
|
7102
|
-
CadenzaService.createMetaTask("Process signal registration", (ctx) => {
|
|
7103
|
-
if (!didSyncInsertSucceed(ctx)) {
|
|
7104
|
-
return;
|
|
7075
|
+
const signalRegistrationGraph = resolveSyncInsertTask(
|
|
7076
|
+
this.isCadenzaDBReady,
|
|
7077
|
+
"signal_registry",
|
|
7078
|
+
{
|
|
7079
|
+
onConflict: {
|
|
7080
|
+
target: ["name"],
|
|
7081
|
+
action: {
|
|
7082
|
+
do: "nothing"
|
|
7105
7083
|
}
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7084
|
+
}
|
|
7085
|
+
},
|
|
7086
|
+
{ concurrency: 30 }
|
|
7087
|
+
);
|
|
7088
|
+
const processSignalRegistrationTask = CadenzaService.createMetaTask(
|
|
7089
|
+
"Process signal registration",
|
|
7090
|
+
(ctx) => {
|
|
7091
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
7092
|
+
return;
|
|
7093
|
+
}
|
|
7094
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7095
|
+
delayMs: 3e3
|
|
7096
|
+
});
|
|
7097
|
+
return { signalName: ctx.__signal };
|
|
7098
|
+
}
|
|
7099
|
+
).then(CadenzaService.signalBroker.registerSignalTask).then(gatherSignalRegistrationTask);
|
|
7100
|
+
wireSyncTaskGraph(
|
|
7101
|
+
this.splitSignalsTask,
|
|
7102
|
+
signalRegistrationGraph,
|
|
7103
|
+
processSignalRegistrationTask
|
|
7112
7104
|
);
|
|
7113
7105
|
this.splitTasksForRegistration = CadenzaService.createMetaTask(
|
|
7114
7106
|
"Split tasks for registration",
|
|
@@ -7177,7 +7169,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7177
7169
|
}
|
|
7178
7170
|
}.bind(this)
|
|
7179
7171
|
);
|
|
7180
|
-
const
|
|
7172
|
+
const registerTaskGraph = resolveSyncInsertTask(
|
|
7181
7173
|
this.isCadenzaDBReady,
|
|
7182
7174
|
"task",
|
|
7183
7175
|
{
|
|
@@ -7189,8 +7181,10 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7189
7181
|
}
|
|
7190
7182
|
},
|
|
7191
7183
|
{ concurrency: 30 }
|
|
7192
|
-
)
|
|
7193
|
-
|
|
7184
|
+
);
|
|
7185
|
+
const registerTaskTask = CadenzaService.createMetaTask(
|
|
7186
|
+
"Record registration",
|
|
7187
|
+
(ctx, emit) => {
|
|
7194
7188
|
if (shouldDebugSyncTaskName(ctx.__taskName)) {
|
|
7195
7189
|
logSyncDebug("task_registration_result", {
|
|
7196
7190
|
taskName: ctx.__taskName,
|
|
@@ -7210,11 +7204,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7210
7204
|
task: CadenzaService.get(ctx.__taskName)
|
|
7211
7205
|
});
|
|
7212
7206
|
return true;
|
|
7213
|
-
}
|
|
7214
|
-
);
|
|
7215
|
-
|
|
7216
|
-
this.splitTasksForRegistration.then(registerTaskTask);
|
|
7217
|
-
}
|
|
7207
|
+
}
|
|
7208
|
+
).then(gatherTaskRegistrationTask);
|
|
7209
|
+
wireSyncTaskGraph(this.splitTasksForRegistration, registerTaskGraph, registerTaskTask);
|
|
7218
7210
|
CadenzaService.createMetaTask(
|
|
7219
7211
|
"Prepare created task for immediate sync",
|
|
7220
7212
|
(ctx) => {
|
|
@@ -7273,31 +7265,37 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7273
7265
|
};
|
|
7274
7266
|
}
|
|
7275
7267
|
}.bind(this)
|
|
7276
|
-
)
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
}
|
|
7286
|
-
}
|
|
7287
|
-
},
|
|
7288
|
-
{ concurrency: 30 }
|
|
7289
|
-
)?.then(
|
|
7290
|
-
CadenzaService.createMetaTask("Record actor registration", (ctx) => {
|
|
7291
|
-
if (!didSyncInsertSucceed(ctx)) {
|
|
7292
|
-
return;
|
|
7268
|
+
);
|
|
7269
|
+
const actorRegistrationGraph = resolveSyncInsertTask(
|
|
7270
|
+
this.isCadenzaDBReady,
|
|
7271
|
+
"actor",
|
|
7272
|
+
{
|
|
7273
|
+
onConflict: {
|
|
7274
|
+
target: ["name", "service_name", "version"],
|
|
7275
|
+
action: {
|
|
7276
|
+
do: "nothing"
|
|
7293
7277
|
}
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
)
|
|
7278
|
+
}
|
|
7279
|
+
},
|
|
7280
|
+
{ concurrency: 30 }
|
|
7281
|
+
);
|
|
7282
|
+
const recordActorRegistrationTask = CadenzaService.createMetaTask(
|
|
7283
|
+
"Record actor registration",
|
|
7284
|
+
(ctx) => {
|
|
7285
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
7286
|
+
return;
|
|
7287
|
+
}
|
|
7288
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7289
|
+
delayMs: 3e3
|
|
7290
|
+
});
|
|
7291
|
+
this.registeredActors.add(ctx.__actorRegistrationKey);
|
|
7292
|
+
return true;
|
|
7293
|
+
}
|
|
7294
|
+
).then(gatherActorRegistrationTask);
|
|
7295
|
+
wireSyncTaskGraph(
|
|
7296
|
+
this.splitActorsForRegistration,
|
|
7297
|
+
actorRegistrationGraph,
|
|
7298
|
+
recordActorRegistrationTask
|
|
7301
7299
|
);
|
|
7302
7300
|
this.registerActorTaskMapTask = CadenzaService.createMetaTask(
|
|
7303
7301
|
"Split actor task maps",
|
|
@@ -7335,36 +7333,42 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7335
7333
|
__actorTaskMapRegistrationKey: registrationKey
|
|
7336
7334
|
};
|
|
7337
7335
|
}.bind(this)
|
|
7338
|
-
)
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
}
|
|
7354
|
-
}
|
|
7355
|
-
},
|
|
7356
|
-
{ concurrency: 30 }
|
|
7357
|
-
)?.then(
|
|
7358
|
-
CadenzaService.createMetaTask("Record actor task map registration", (ctx) => {
|
|
7359
|
-
if (!didSyncInsertSucceed(ctx)) {
|
|
7360
|
-
return;
|
|
7336
|
+
);
|
|
7337
|
+
const actorTaskMapRegistrationGraph = resolveSyncInsertTask(
|
|
7338
|
+
this.isCadenzaDBReady,
|
|
7339
|
+
"actor_task_map",
|
|
7340
|
+
{
|
|
7341
|
+
onConflict: {
|
|
7342
|
+
target: [
|
|
7343
|
+
"actor_name",
|
|
7344
|
+
"actor_version",
|
|
7345
|
+
"task_name",
|
|
7346
|
+
"task_version",
|
|
7347
|
+
"service_name"
|
|
7348
|
+
],
|
|
7349
|
+
action: {
|
|
7350
|
+
do: "nothing"
|
|
7361
7351
|
}
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7352
|
+
}
|
|
7353
|
+
},
|
|
7354
|
+
{ concurrency: 30 }
|
|
7355
|
+
);
|
|
7356
|
+
const recordActorTaskMapRegistrationTask = CadenzaService.createMetaTask(
|
|
7357
|
+
"Record actor task map registration",
|
|
7358
|
+
(ctx) => {
|
|
7359
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
7360
|
+
return;
|
|
7361
|
+
}
|
|
7362
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7363
|
+
delayMs: 3e3
|
|
7364
|
+
});
|
|
7365
|
+
this.registeredActorTaskMaps.add(ctx.__actorTaskMapRegistrationKey);
|
|
7366
|
+
}
|
|
7367
|
+
);
|
|
7368
|
+
wireSyncTaskGraph(
|
|
7369
|
+
this.registerActorTaskMapTask,
|
|
7370
|
+
actorTaskMapRegistrationGraph,
|
|
7371
|
+
recordActorTaskMapRegistrationTask
|
|
7368
7372
|
);
|
|
7369
7373
|
const registerSignalTask = CadenzaService.createMetaTask(
|
|
7370
7374
|
"Record signal registration",
|
|
@@ -7423,25 +7427,32 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7423
7427
|
return emittedCount > 0;
|
|
7424
7428
|
}
|
|
7425
7429
|
);
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7430
|
+
const processSplitSignalToTaskMapTask = CadenzaService.createMetaTask(
|
|
7431
|
+
"Process split signal-to-task map",
|
|
7432
|
+
(ctx) => ctx
|
|
7433
|
+
).doOn("meta.sync_controller.signal_task_map_split");
|
|
7434
|
+
const signalToTaskMapGraph = resolveSyncInsertTask(
|
|
7435
|
+
this.isCadenzaDBReady,
|
|
7436
|
+
"signal_to_task_map",
|
|
7437
|
+
{
|
|
7438
|
+
onConflict: {
|
|
7439
|
+
target: [
|
|
7440
|
+
"task_name",
|
|
7441
|
+
"task_version",
|
|
7442
|
+
"service_name",
|
|
7443
|
+
"signal_name"
|
|
7444
|
+
],
|
|
7445
|
+
action: {
|
|
7446
|
+
do: "nothing"
|
|
7441
7447
|
}
|
|
7442
|
-
}
|
|
7443
|
-
|
|
7444
|
-
|
|
7448
|
+
}
|
|
7449
|
+
},
|
|
7450
|
+
{ concurrency: 30 }
|
|
7451
|
+
);
|
|
7452
|
+
wireSyncTaskGraph(
|
|
7453
|
+
processSplitSignalToTaskMapTask,
|
|
7454
|
+
signalToTaskMapGraph,
|
|
7455
|
+
registerSignalTask
|
|
7445
7456
|
);
|
|
7446
7457
|
this.splitIntentsTask = CadenzaService.createMetaTask(
|
|
7447
7458
|
"Split intents for registration",
|
|
@@ -7467,19 +7478,23 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7467
7478
|
}
|
|
7468
7479
|
}.bind(this)
|
|
7469
7480
|
);
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7481
|
+
const recordIntentDefinitionRegistrationTask = CadenzaService.createMetaTask(
|
|
7482
|
+
"Record intent definition registration",
|
|
7483
|
+
(ctx) => {
|
|
7484
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
7485
|
+
return;
|
|
7486
|
+
}
|
|
7487
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7488
|
+
delayMs: 3e3
|
|
7489
|
+
});
|
|
7490
|
+
this.registeredIntentDefinitions.add(ctx.__intentName);
|
|
7491
|
+
return true;
|
|
7492
|
+
}
|
|
7493
|
+
).then(gatherIntentRegistrationTask);
|
|
7494
|
+
wireSyncTaskGraph(
|
|
7495
|
+
this.splitIntentsTask,
|
|
7496
|
+
insertIntentRegistryTask,
|
|
7497
|
+
recordIntentDefinitionRegistrationTask
|
|
7483
7498
|
);
|
|
7484
7499
|
const registerIntentTask = CadenzaService.createMetaTask(
|
|
7485
7500
|
"Record intent registration",
|
|
@@ -7561,67 +7576,82 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7561
7576
|
return true;
|
|
7562
7577
|
}.bind(this)
|
|
7563
7578
|
);
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7579
|
+
const processSplitIntentToTaskMapTask = CadenzaService.createMetaTask(
|
|
7580
|
+
"Process split intent-to-task map",
|
|
7581
|
+
(ctx) => ctx
|
|
7582
|
+
).doOn("meta.sync_controller.intent_task_map_split");
|
|
7583
|
+
const prepareIntentDefinitionForIntentMapTask = CadenzaService.createMetaTask(
|
|
7584
|
+
"Prepare intent definition for intent-to-task map",
|
|
7585
|
+
(ctx) => {
|
|
7586
|
+
if (!ctx.__intentDefinition || !ctx.__intentMapData) {
|
|
7587
|
+
return false;
|
|
7588
|
+
}
|
|
7589
|
+
if (shouldDebugSyncTaskName(ctx.__taskName) || shouldDebugSyncIntentName(ctx.__intent)) {
|
|
7590
|
+
logSyncDebug("intent_definition_prepare", {
|
|
7591
|
+
taskName: ctx.__taskName,
|
|
7592
|
+
intentName: ctx.__intent,
|
|
7593
|
+
intentDefinition: ctx.__intentDefinition
|
|
7594
|
+
});
|
|
7595
|
+
}
|
|
7596
|
+
return {
|
|
7597
|
+
...ctx,
|
|
7598
|
+
data: ctx.__intentDefinition
|
|
7599
|
+
};
|
|
7600
|
+
}
|
|
7601
|
+
);
|
|
7602
|
+
const restoreIntentToTaskMapPayloadTask = CadenzaService.createMetaTask(
|
|
7603
|
+
"Restore intent-to-task map payload",
|
|
7604
|
+
(ctx) => {
|
|
7605
|
+
if (!ctx.__intentMapData) {
|
|
7606
|
+
return false;
|
|
7607
|
+
}
|
|
7608
|
+
if (shouldDebugSyncTaskName(ctx.__taskName) || shouldDebugSyncIntentName(ctx.__intent)) {
|
|
7609
|
+
logSyncDebug("intent_map_payload_restore", {
|
|
7610
|
+
taskName: ctx.__taskName,
|
|
7611
|
+
intentName: ctx.__intent,
|
|
7612
|
+
intentMapData: ctx.__intentMapData
|
|
7613
|
+
});
|
|
7614
|
+
}
|
|
7615
|
+
return {
|
|
7616
|
+
...ctx,
|
|
7617
|
+
data: ctx.__intentMapData
|
|
7618
|
+
};
|
|
7619
|
+
}
|
|
7620
|
+
);
|
|
7621
|
+
const intentToTaskMapGraph = resolveSyncInsertTask(
|
|
7622
|
+
this.isCadenzaDBReady,
|
|
7623
|
+
"intent_to_task_map",
|
|
7624
|
+
{
|
|
7625
|
+
onConflict: {
|
|
7626
|
+
target: [
|
|
7627
|
+
"intent_name",
|
|
7628
|
+
"task_name",
|
|
7629
|
+
"task_version",
|
|
7630
|
+
"service_name"
|
|
7631
|
+
],
|
|
7632
|
+
action: {
|
|
7633
|
+
do: "nothing"
|
|
7577
7634
|
}
|
|
7578
|
-
return {
|
|
7579
|
-
...ctx,
|
|
7580
|
-
data: ctx.__intentDefinition
|
|
7581
|
-
};
|
|
7582
7635
|
}
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
}
|
|
7603
|
-
).then(
|
|
7604
|
-
resolveSyncInsertTask(
|
|
7605
|
-
this.isCadenzaDBReady,
|
|
7606
|
-
"intent_to_task_map",
|
|
7607
|
-
{
|
|
7608
|
-
onConflict: {
|
|
7609
|
-
target: [
|
|
7610
|
-
"intent_name",
|
|
7611
|
-
"task_name",
|
|
7612
|
-
"task_version",
|
|
7613
|
-
"service_name"
|
|
7614
|
-
],
|
|
7615
|
-
action: {
|
|
7616
|
-
do: "nothing"
|
|
7617
|
-
}
|
|
7618
|
-
}
|
|
7619
|
-
},
|
|
7620
|
-
{ concurrency: 30 }
|
|
7621
|
-
)?.then(registerIntentTask)
|
|
7622
|
-
)
|
|
7623
|
-
)
|
|
7624
|
-
)
|
|
7636
|
+
},
|
|
7637
|
+
{ concurrency: 30 }
|
|
7638
|
+
);
|
|
7639
|
+
processSplitIntentToTaskMapTask.then(prepareIntentDefinitionForIntentMapTask);
|
|
7640
|
+
if (ensureIntentRegistryBeforeIntentMapTask) {
|
|
7641
|
+
wireSyncTaskGraph(
|
|
7642
|
+
prepareIntentDefinitionForIntentMapTask,
|
|
7643
|
+
ensureIntentRegistryBeforeIntentMapTask,
|
|
7644
|
+
restoreIntentToTaskMapPayloadTask
|
|
7645
|
+
);
|
|
7646
|
+
} else {
|
|
7647
|
+
prepareIntentDefinitionForIntentMapTask.then(
|
|
7648
|
+
restoreIntentToTaskMapPayloadTask
|
|
7649
|
+
);
|
|
7650
|
+
}
|
|
7651
|
+
wireSyncTaskGraph(
|
|
7652
|
+
restoreIntentToTaskMapPayloadTask,
|
|
7653
|
+
intentToTaskMapGraph,
|
|
7654
|
+
registerIntentTask
|
|
7625
7655
|
);
|
|
7626
7656
|
this.registerTaskMapTask = CadenzaService.createMetaTask(
|
|
7627
7657
|
"Register task map to DB",
|
|
@@ -7657,39 +7687,45 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7657
7687
|
};
|
|
7658
7688
|
}
|
|
7659
7689
|
}
|
|
7660
|
-
)
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
}
|
|
7677
|
-
}
|
|
7678
|
-
},
|
|
7679
|
-
{ concurrency: 30 }
|
|
7680
|
-
)?.then(
|
|
7681
|
-
CadenzaService.createMetaTask("Record task map registration", (ctx) => {
|
|
7682
|
-
if (!didSyncInsertSucceed(ctx)) {
|
|
7683
|
-
return;
|
|
7690
|
+
);
|
|
7691
|
+
const taskMapRegistrationGraph = resolveSyncInsertTask(
|
|
7692
|
+
this.isCadenzaDBReady,
|
|
7693
|
+
"directional_task_graph_map",
|
|
7694
|
+
{
|
|
7695
|
+
onConflict: {
|
|
7696
|
+
target: [
|
|
7697
|
+
"task_name",
|
|
7698
|
+
"predecessor_task_name",
|
|
7699
|
+
"task_version",
|
|
7700
|
+
"predecessor_task_version",
|
|
7701
|
+
"service_name",
|
|
7702
|
+
"predecessor_service_name"
|
|
7703
|
+
],
|
|
7704
|
+
action: {
|
|
7705
|
+
do: "nothing"
|
|
7684
7706
|
}
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7707
|
+
}
|
|
7708
|
+
},
|
|
7709
|
+
{ concurrency: 30 }
|
|
7710
|
+
);
|
|
7711
|
+
const recordTaskMapRegistrationTask = CadenzaService.createMetaTask(
|
|
7712
|
+
"Record task map registration",
|
|
7713
|
+
(ctx) => {
|
|
7714
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
7715
|
+
return;
|
|
7716
|
+
}
|
|
7717
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7718
|
+
delayMs: 3e3
|
|
7719
|
+
});
|
|
7720
|
+
CadenzaService.get(ctx.__taskName)?.taskMapRegistration.add(
|
|
7721
|
+
ctx.__nextTaskName
|
|
7722
|
+
);
|
|
7723
|
+
}
|
|
7724
|
+
);
|
|
7725
|
+
wireSyncTaskGraph(
|
|
7726
|
+
this.registerTaskMapTask,
|
|
7727
|
+
taskMapRegistrationGraph,
|
|
7728
|
+
recordTaskMapRegistrationTask
|
|
7693
7729
|
);
|
|
7694
7730
|
this.registerDeputyRelationshipTask = CadenzaService.createMetaTask(
|
|
7695
7731
|
"Register deputy relationship",
|
|
@@ -7716,40 +7752,43 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7716
7752
|
};
|
|
7717
7753
|
}
|
|
7718
7754
|
}
|
|
7719
|
-
)
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
}
|
|
7736
|
-
}
|
|
7737
|
-
},
|
|
7738
|
-
{ concurrency: 30 }
|
|
7739
|
-
)?.then(
|
|
7740
|
-
CadenzaService.createMetaTask(
|
|
7741
|
-
"Record deputy relationship registration",
|
|
7742
|
-
(ctx) => {
|
|
7743
|
-
if (!didSyncInsertSucceed(ctx)) {
|
|
7744
|
-
return;
|
|
7745
|
-
}
|
|
7746
|
-
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7747
|
-
delayMs: 3e3
|
|
7748
|
-
});
|
|
7749
|
-
CadenzaService.get(ctx.__taskName).registeredDeputyMap = true;
|
|
7755
|
+
);
|
|
7756
|
+
const deputyRelationshipRegistrationGraph = resolveSyncInsertTask(
|
|
7757
|
+
this.isCadenzaDBReady,
|
|
7758
|
+
"directional_task_graph_map",
|
|
7759
|
+
{
|
|
7760
|
+
onConflict: {
|
|
7761
|
+
target: [
|
|
7762
|
+
"task_name",
|
|
7763
|
+
"predecessor_task_name",
|
|
7764
|
+
"task_version",
|
|
7765
|
+
"predecessor_task_version",
|
|
7766
|
+
"service_name",
|
|
7767
|
+
"predecessor_service_name"
|
|
7768
|
+
],
|
|
7769
|
+
action: {
|
|
7770
|
+
do: "nothing"
|
|
7750
7771
|
}
|
|
7751
|
-
|
|
7752
|
-
|
|
7772
|
+
}
|
|
7773
|
+
},
|
|
7774
|
+
{ concurrency: 30 }
|
|
7775
|
+
);
|
|
7776
|
+
const recordDeputyRelationshipRegistrationTask = CadenzaService.createMetaTask(
|
|
7777
|
+
"Record deputy relationship registration",
|
|
7778
|
+
(ctx) => {
|
|
7779
|
+
if (!didSyncInsertSucceed(ctx)) {
|
|
7780
|
+
return;
|
|
7781
|
+
}
|
|
7782
|
+
CadenzaService.debounce("meta.sync_controller.synced_resource", {
|
|
7783
|
+
delayMs: 3e3
|
|
7784
|
+
});
|
|
7785
|
+
CadenzaService.get(ctx.__taskName).registeredDeputyMap = true;
|
|
7786
|
+
}
|
|
7787
|
+
);
|
|
7788
|
+
wireSyncTaskGraph(
|
|
7789
|
+
this.registerDeputyRelationshipTask,
|
|
7790
|
+
deputyRelationshipRegistrationGraph,
|
|
7791
|
+
recordDeputyRelationshipRegistrationTask
|
|
7753
7792
|
);
|
|
7754
7793
|
const reconcileTaskRegistrationFromAuthorityTask = CadenzaService.createMetaTask(
|
|
7755
7794
|
"Reconcile task registration from authority",
|
|
@@ -7881,7 +7920,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7881
7920
|
isHidden: true
|
|
7882
7921
|
}
|
|
7883
7922
|
);
|
|
7884
|
-
const
|
|
7923
|
+
const skipAuthoritativeTaskReconciliationTask = CadenzaService.createMetaTask(
|
|
7885
7924
|
"Skip authoritative task reconciliation",
|
|
7886
7925
|
() => false,
|
|
7887
7926
|
"Skips task reconciliation when no authority query task is available.",
|
|
@@ -7890,7 +7929,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7890
7929
|
isHidden: true
|
|
7891
7930
|
}
|
|
7892
7931
|
);
|
|
7893
|
-
const
|
|
7932
|
+
const skipAuthoritativeRoutineReconciliationTask = CadenzaService.createMetaTask(
|
|
7894
7933
|
"Skip authoritative routine reconciliation",
|
|
7895
7934
|
() => false,
|
|
7896
7935
|
"Skips routine reconciliation when no authority query task is available.",
|
|
@@ -7899,7 +7938,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7899
7938
|
isHidden: true
|
|
7900
7939
|
}
|
|
7901
7940
|
);
|
|
7902
|
-
const
|
|
7941
|
+
const skipAuthoritativeSignalReconciliationTask = CadenzaService.createMetaTask(
|
|
7903
7942
|
"Skip authoritative signal reconciliation",
|
|
7904
7943
|
() => false,
|
|
7905
7944
|
"Skips signal reconciliation when no authority query task is available.",
|
|
@@ -7908,7 +7947,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7908
7947
|
isHidden: true
|
|
7909
7948
|
}
|
|
7910
7949
|
);
|
|
7911
|
-
const
|
|
7950
|
+
const skipAuthoritativeIntentReconciliationTask = CadenzaService.createMetaTask(
|
|
7912
7951
|
"Skip authoritative intent reconciliation",
|
|
7913
7952
|
() => false,
|
|
7914
7953
|
"Skips intent reconciliation when no authority query task is available.",
|
|
@@ -7917,6 +7956,26 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7917
7956
|
isHidden: true
|
|
7918
7957
|
}
|
|
7919
7958
|
);
|
|
7959
|
+
if (authoritativeTaskQueryGraph) {
|
|
7960
|
+
authoritativeTaskQueryGraph.completionTask.then(
|
|
7961
|
+
reconcileTaskRegistrationFromAuthorityTask
|
|
7962
|
+
);
|
|
7963
|
+
}
|
|
7964
|
+
if (authoritativeRoutineQueryGraph) {
|
|
7965
|
+
authoritativeRoutineQueryGraph.completionTask.then(
|
|
7966
|
+
reconcileRoutineRegistrationFromAuthorityTask
|
|
7967
|
+
);
|
|
7968
|
+
}
|
|
7969
|
+
if (authoritativeSignalQueryGraph) {
|
|
7970
|
+
authoritativeSignalQueryGraph.completionTask.then(
|
|
7971
|
+
reconcileSignalRegistrationFromAuthorityTask
|
|
7972
|
+
);
|
|
7973
|
+
}
|
|
7974
|
+
if (authoritativeIntentQueryGraph) {
|
|
7975
|
+
authoritativeIntentQueryGraph.completionTask.then(
|
|
7976
|
+
reconcileIntentRegistrationFromAuthorityTask
|
|
7977
|
+
);
|
|
7978
|
+
}
|
|
7920
7979
|
const authoritativeRegistrationTriggers = [
|
|
7921
7980
|
"meta.service_registry.initial_sync_complete",
|
|
7922
7981
|
"meta.sync_requested",
|
|
@@ -7949,7 +8008,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7949
8008
|
register: false,
|
|
7950
8009
|
isHidden: true
|
|
7951
8010
|
}
|
|
7952
|
-
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8011
|
+
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8012
|
+
authoritativeTaskQueryGraph?.entryTask ?? skipAuthoritativeTaskReconciliationTask
|
|
8013
|
+
);
|
|
7953
8014
|
CadenzaService.createMetaTask(
|
|
7954
8015
|
"Prepare authoritative routine registration query",
|
|
7955
8016
|
(ctx) => {
|
|
@@ -7976,7 +8037,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7976
8037
|
register: false,
|
|
7977
8038
|
isHidden: true
|
|
7978
8039
|
}
|
|
7979
|
-
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8040
|
+
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8041
|
+
authoritativeRoutineQueryGraph?.entryTask ?? skipAuthoritativeRoutineReconciliationTask
|
|
8042
|
+
);
|
|
7980
8043
|
CadenzaService.createMetaTask(
|
|
7981
8044
|
"Prepare authoritative signal registration query",
|
|
7982
8045
|
(ctx) => {
|
|
@@ -7995,7 +8058,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7995
8058
|
register: false,
|
|
7996
8059
|
isHidden: true
|
|
7997
8060
|
}
|
|
7998
|
-
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8061
|
+
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8062
|
+
authoritativeSignalQueryGraph?.entryTask ?? skipAuthoritativeSignalReconciliationTask
|
|
8063
|
+
);
|
|
7999
8064
|
CadenzaService.createMetaTask(
|
|
8000
8065
|
"Prepare authoritative intent registration query",
|
|
8001
8066
|
(ctx) => {
|
|
@@ -8014,7 +8079,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
8014
8079
|
register: false,
|
|
8015
8080
|
isHidden: true
|
|
8016
8081
|
}
|
|
8017
|
-
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8082
|
+
).doOn(...authoritativeRegistrationTriggers).then(
|
|
8083
|
+
authoritativeIntentQueryGraph?.entryTask ?? skipAuthoritativeIntentReconciliationTask
|
|
8084
|
+
);
|
|
8018
8085
|
CadenzaService.signalBroker.getSignalsTask.clone().doOn(
|
|
8019
8086
|
"meta.sync_controller.sync_tick",
|
|
8020
8087
|
"meta.service_registry.initial_sync_complete",
|
|
@@ -8449,7 +8516,7 @@ var CadenzaService = class {
|
|
|
8449
8516
|
).map((transport) => ({
|
|
8450
8517
|
...transport,
|
|
8451
8518
|
protocols: transport.protocols && transport.protocols.length > 0 ? transport.protocols : useSocket ? ["rest", "socket"] : ["rest"],
|
|
8452
|
-
uuid: (0,
|
|
8519
|
+
uuid: (0, import_uuid5.v4)()
|
|
8453
8520
|
}));
|
|
8454
8521
|
}
|
|
8455
8522
|
static createBootstrapTransport(serviceInstanceId, role, endpoint) {
|
|
@@ -8701,7 +8768,7 @@ var CadenzaService = class {
|
|
|
8701
8768
|
}
|
|
8702
8769
|
for (const responder of responders) {
|
|
8703
8770
|
const { task, descriptor } = responder;
|
|
8704
|
-
const inquiryId = (0,
|
|
8771
|
+
const inquiryId = (0, import_uuid5.v4)();
|
|
8705
8772
|
startTimeByTask.set(task, Date.now());
|
|
8706
8773
|
const resolverTask = this.createEphemeralMetaTask(
|
|
8707
8774
|
`Resolve inquiry ${inquiry} for ${descriptor.localTaskName}`,
|
|
@@ -9209,7 +9276,7 @@ var CadenzaService = class {
|
|
|
9209
9276
|
this.bootstrap();
|
|
9210
9277
|
this.validateName(serviceName);
|
|
9211
9278
|
this.validateServiceName(serviceName);
|
|
9212
|
-
const serviceId = options.customServiceId ?? (0,
|
|
9279
|
+
const serviceId = options.customServiceId ?? (0, import_uuid5.v4)();
|
|
9213
9280
|
this.serviceRegistry.serviceName = serviceName;
|
|
9214
9281
|
this.serviceRegistry.serviceInstanceId = serviceId;
|
|
9215
9282
|
this.setHydrationResults(options.hydration);
|
|
@@ -10054,7 +10121,7 @@ CadenzaService.frontendSyncScheduled = false;
|
|
|
10054
10121
|
var import_core6 = require("@cadenza.io/core");
|
|
10055
10122
|
|
|
10056
10123
|
// src/ssr/createSSRInquiryBridge.ts
|
|
10057
|
-
var
|
|
10124
|
+
var import_uuid6 = require("uuid");
|
|
10058
10125
|
function ensureFetch() {
|
|
10059
10126
|
if (typeof globalThis.fetch !== "function") {
|
|
10060
10127
|
throw new Error("SSR inquiry bridge requires global fetch support.");
|
|
@@ -10143,7 +10210,7 @@ function createSSRInquiryBridge(options = {}) {
|
|
|
10143
10210
|
__remoteRoutineName: remoteRoutineName,
|
|
10144
10211
|
__metadata: {
|
|
10145
10212
|
...context.__metadata ?? {},
|
|
10146
|
-
__deputyExecId: (0,
|
|
10213
|
+
__deputyExecId: (0, import_uuid6.v4)()
|
|
10147
10214
|
}
|
|
10148
10215
|
}),
|
|
10149
10216
|
signal
|