effect-agent 0.1.0-beta.96 → 0.1.0-beta.97
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/{DurableAgentRuntime-BGwGUIT-.mjs → DurableAgentRuntime-DbUvZHDZ.mjs} +34 -30
- package/dist/DurableAgentRuntime-DbUvZHDZ.mjs.map +1 -0
- package/dist/{EventSource-tCO_dAff.d.mts → EventSource-D6PAAEyK.d.mts} +3 -3
- package/dist/{PreparedInputAdmission-CFSddiT8.d.mts → PreparedInputAdmission-omMbwd--.d.mts} +4 -4
- package/dist/{Records-BEz5IFUu.mjs → Records-BAutSSnJ.mjs} +3 -1
- package/dist/Records-BAutSSnJ.mjs.map +1 -0
- package/dist/{Records-CMByd1eD.d.mts → Records-CV49DgQK.d.mts} +37 -9
- package/dist/{RunJournal-B_fxe57c.mjs → RunJournal-DRRRZmG7.mjs} +2 -2
- package/dist/{RunJournal-B_fxe57c.mjs.map → RunJournal-DRRRZmG7.mjs.map} +1 -1
- package/dist/{Schedule-BxCfnYr0.d.mts → Schedule-DePbGfgd.d.mts} +2 -2
- package/dist/{Scheduling-BW6BD_TP.mjs → Scheduling-C3QpYn0W.mjs} +2 -2
- package/dist/{Scheduling-BW6BD_TP.mjs.map → Scheduling-C3QpYn0W.mjs.map} +1 -1
- package/dist/{Subscription-CrTIQKZR.d.mts → Subscription-BR_8Cxh3.d.mts} +3 -3
- package/dist/{SubscriptionInput-BVOeFF1L.d.mts → SubscriptionInput-B95sQbuk.d.mts} +3 -3
- package/dist/{agent-registration-BTa5vmQF.mjs → agent-registration-CXGDwvJH.mjs} +151 -26
- package/dist/agent-registration-CXGDwvJH.mjs.map +1 -0
- package/dist/durable/ActivityStore.d.mts +1 -1
- package/dist/durable/ActivityStore.mjs +1 -1
- package/dist/durable/Admin.d.mts +1 -1
- package/dist/durable/Admin.mjs +1 -1
- package/dist/durable/AgentRegistration.d.mts +2 -2
- package/dist/durable/AgentRegistration.mjs +3 -2
- package/dist/durable/AgentRegistration.mjs.map +1 -1
- package/dist/durable/Certification.d.mts +1 -1
- package/dist/durable/CommittedActivity.d.mts +1 -1
- package/dist/durable/CommittedActivity.mjs +1 -1
- package/dist/durable/Digest.d.mts +1 -1
- package/dist/durable/Digest.mjs +1 -1
- package/dist/durable/DurableAgentRuntime.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.mjs +1 -1
- package/dist/durable/EventSource.d.mts +1 -1
- package/dist/durable/EventSource.mjs +1 -1
- package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
- package/dist/durable/GitHubWorkflowSource.mjs +1 -1
- package/dist/durable/MessageDelivery.d.mts +3 -3
- package/dist/durable/MessageDelivery.mjs +1 -1
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +1 -1
- package/dist/durable/MessageDeliveryStoreConformance.mjs +1 -1
- package/dist/durable/PersistentHistory.d.mts +1 -1
- package/dist/durable/PersistentHistory.mjs +2 -2
- package/dist/durable/PreparedInputAdmission.d.mts +1 -1
- package/dist/durable/Records.d.mts +1 -1
- package/dist/durable/Records.mjs +1 -1
- package/dist/durable/Recovery.d.mts +1 -1
- package/dist/durable/Recovery.mjs +1 -1
- package/dist/durable/RunJournal.d.mts +1 -1
- package/dist/durable/RunJournal.mjs +1 -1
- package/dist/durable/Schedule.d.mts +1 -1
- package/dist/durable/Schedule.mjs +1 -1
- package/dist/durable/ScheduleStoreConformance.d.mts +1 -1
- package/dist/durable/ScheduleStoreConformance.mjs +1 -1
- package/dist/durable/ScheduleTransition.d.mts +1 -1
- package/dist/durable/ScheduleTransition.mjs +1 -1
- package/dist/durable/Scheduling.d.mts +2 -2
- package/dist/durable/Scheduling.mjs +1 -1
- package/dist/durable/SqlStorageV2Upgrade.d.mts +2 -2
- package/dist/durable/SqlStorageV2Upgrade.mjs +1 -1
- package/dist/durable/SqlSubscriptionStore.d.mts +2 -2
- package/dist/durable/SqlSubscriptionStore.mjs +1 -1
- package/dist/durable/SubmissionLedger.d.mts +1 -1
- package/dist/durable/SubmissionLedger.mjs +1 -1
- package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
- package/dist/durable/SubmissionLedgerConformance.mjs +1 -1
- package/dist/durable/SubmissionStatus.d.mts +1 -1
- package/dist/durable/Subscription.d.mts +1 -1
- package/dist/durable/Subscription.mjs +1 -1
- package/dist/durable/SubscriptionInput.d.mts +1 -1
- package/dist/durable/SubscriptionInput.mjs +2 -2
- package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
- package/dist/durable/SubscriptionStoreConformance.mjs +1 -1
- package/dist/durable/SubscriptionTools.d.mts +3 -3
- package/dist/durable/SubscriptionTransition.d.mts +1 -1
- package/dist/durable/SubscriptionTransition.mjs +1 -1
- package/dist/durable/Subscriptions.d.mts +5 -5
- package/dist/durable/Subscriptions.mjs +1 -1
- package/dist/durable/ThreadContextHistory.d.mts +1 -1
- package/dist/durable/ThreadContextHistory.mjs +1 -1
- package/dist/durable/ThreadContextHistoryProjection.d.mts +1 -1
- package/dist/durable/ThreadContextHistoryProjection.mjs +1 -1
- package/dist/durable/ThreadInvariants.d.mts +1 -1
- package/dist/durable/ThreadInvariants.mjs +1 -1
- package/dist/durable/ThreadProjection.d.mts +1 -1
- package/dist/durable/ThreadProjection.mjs +1 -1
- package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
- package/dist/durable/ThreadStore.d.mts +1 -1
- package/dist/durable/ThreadStore.mjs +1 -1
- package/dist/durable/ThreadStoreConformance.d.mts +1 -1
- package/dist/durable/ThreadStoreConformance.mjs +1 -1
- package/dist/durable/ToolReconciler.mjs +1 -1
- package/dist/durable/WorkerHost.d.mts +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
- package/src/durable/AgentRegistration.ts +1 -0
- package/src/durable/DurableAgentRuntime.ts +3 -1
- package/src/durable/Records.ts +2 -0
- package/src/durable/internal/agent-registration.ts +274 -36
- package/src/durable/internal/messaging-host.ts +2 -5
- package/src/durable/internal/worker-host.ts +119 -85
- package/dist/DurableAgentRuntime-BGwGUIT-.mjs.map +0 -1
- package/dist/Records-BEz5IFUu.mjs.map +0 -1
- package/dist/agent-registration-BTa5vmQF.mjs.map +0 -1
|
@@ -381,6 +381,13 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
381
381
|
};
|
|
382
382
|
});
|
|
383
383
|
|
|
384
|
+
const firstThreadInput = (history: Effect.Success<ReturnType<typeof read>>) => {
|
|
385
|
+
const first = history.records.find(({ record }) => record.payload._tag === "UserInputRecorded")
|
|
386
|
+
?.record.payload;
|
|
387
|
+
|
|
388
|
+
return first?._tag === "UserInputRecorded" ? first.input : undefined;
|
|
389
|
+
};
|
|
390
|
+
|
|
384
391
|
const sourceAuthority = Effect.fn("WorkerHost.sourceAuthority")(function* (
|
|
385
392
|
threadId: ThreadId,
|
|
386
393
|
submissionId?: SubmissionId,
|
|
@@ -391,7 +398,9 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
391
398
|
if (created?._tag !== "ThreadCreated") return yield* failure("start", "not-found");
|
|
392
399
|
|
|
393
400
|
const binding = deps.bindings.find(
|
|
394
|
-
(entry) =>
|
|
401
|
+
(entry) =>
|
|
402
|
+
entry.agentId === created.agentId &&
|
|
403
|
+
bindingSupports(entry, created.definitions, undefined, firstThreadInput(current)),
|
|
395
404
|
);
|
|
396
405
|
|
|
397
406
|
const worker = current.records.find(
|
|
@@ -434,10 +443,26 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
434
443
|
return yield* failure("start", "denied");
|
|
435
444
|
}
|
|
436
445
|
|
|
446
|
+
const ownerBinding =
|
|
447
|
+
ownerSubmission === undefined
|
|
448
|
+
? undefined
|
|
449
|
+
: deps.bindings.find(
|
|
450
|
+
(entry) =>
|
|
451
|
+
entry.agentId === ownerSubmission.agentId &&
|
|
452
|
+
bindingSupports(
|
|
453
|
+
entry,
|
|
454
|
+
ownerSubmission.agentDigests,
|
|
455
|
+
undefined,
|
|
456
|
+
ownerSubmission.inputPayload,
|
|
457
|
+
),
|
|
458
|
+
);
|
|
459
|
+
|
|
460
|
+
const selectedBinding = ownerBinding ?? binding;
|
|
461
|
+
|
|
437
462
|
if (worker?._tag === "WorkerOriginRecorded")
|
|
438
463
|
return {
|
|
439
464
|
current,
|
|
440
|
-
binding,
|
|
465
|
+
binding: selectedBinding,
|
|
441
466
|
submission: ownerSubmission,
|
|
442
467
|
policyOverride: Option.none<AgentPolicy>(),
|
|
443
468
|
policy: worker.origin.policy,
|
|
@@ -456,7 +481,7 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
456
481
|
|
|
457
482
|
return {
|
|
458
483
|
current,
|
|
459
|
-
binding,
|
|
484
|
+
binding: selectedBinding,
|
|
460
485
|
submission: ownerSubmission,
|
|
461
486
|
policyOverride: Option.none<AgentPolicy>(),
|
|
462
487
|
policy: attached.policy,
|
|
@@ -467,17 +492,6 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
467
492
|
};
|
|
468
493
|
}
|
|
469
494
|
|
|
470
|
-
const ownerBinding =
|
|
471
|
-
ownerSubmission === undefined
|
|
472
|
-
? undefined
|
|
473
|
-
: deps.bindings.find(
|
|
474
|
-
(entry) =>
|
|
475
|
-
entry.agentId === ownerSubmission.agentId &&
|
|
476
|
-
bindingSupports(entry, ownerSubmission.agentDigests),
|
|
477
|
-
);
|
|
478
|
-
|
|
479
|
-
const selectedBinding = ownerBinding ?? binding;
|
|
480
|
-
|
|
481
495
|
const changedRootAgent =
|
|
482
496
|
ownerSubmission !== undefined && ownerSubmission.agentId !== created.agentId;
|
|
483
497
|
|
|
@@ -497,7 +511,9 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
497
511
|
return yield* failure("start", "declaration-unavailable");
|
|
498
512
|
|
|
499
513
|
const effectiveBinding =
|
|
500
|
-
Option.isSome(selected) || changedRootAgent
|
|
514
|
+
Option.isSome(selected) || changedRootAgent || binding === undefined
|
|
515
|
+
? selectedBinding
|
|
516
|
+
: binding;
|
|
501
517
|
|
|
502
518
|
if (effectiveBinding === undefined) return yield* failure("start", "declaration-unavailable");
|
|
503
519
|
|
|
@@ -766,7 +782,7 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
766
782
|
const targetBinding = deps.bindings.find(
|
|
767
783
|
(entry) =>
|
|
768
784
|
entry.agentId === origin.worker.targetAgentId &&
|
|
769
|
-
bindingSupports(entry, origin.targetDigests),
|
|
785
|
+
bindingSupports(entry, origin.targetDigests, undefined, input),
|
|
770
786
|
);
|
|
771
787
|
|
|
772
788
|
if (sourceBinding === undefined || targetBinding === undefined)
|
|
@@ -1038,15 +1054,42 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
1038
1054
|
if (update.threadId !== submission.threadId || update.agentId !== origin.worker.targetAgentId)
|
|
1039
1055
|
return yield* failure("followUp", "worker-mismatch");
|
|
1040
1056
|
|
|
1057
|
+
const sourceHistory = yield* read(origin.source.threadId, "followUp");
|
|
1058
|
+
|
|
1059
|
+
const first = requests(sourceHistory.records).find(
|
|
1060
|
+
(row) => row.admission.messageId === origin.firstMessageId,
|
|
1061
|
+
);
|
|
1062
|
+
|
|
1063
|
+
if (first === undefined || !sameOrigin(first.admission.origin, origin))
|
|
1064
|
+
return yield* failure("followUp", "corrupt");
|
|
1065
|
+
|
|
1066
|
+
const source = yield* sourceAuthority(
|
|
1067
|
+
origin.source.threadId,
|
|
1068
|
+
first.admission.sourceSubmissionId,
|
|
1069
|
+
);
|
|
1070
|
+
|
|
1071
|
+
if (
|
|
1072
|
+
source.binding === undefined ||
|
|
1073
|
+
source.submission === undefined ||
|
|
1074
|
+
!bindingSupports(
|
|
1075
|
+
source.binding,
|
|
1076
|
+
intent.sourceDigests,
|
|
1077
|
+
undefined,
|
|
1078
|
+
source.submission?.inputPayload,
|
|
1079
|
+
)
|
|
1080
|
+
)
|
|
1081
|
+
return yield* failure("followUp", "declaration-unavailable");
|
|
1082
|
+
|
|
1041
1083
|
const sourceBinding = deps.bindings.find(
|
|
1042
1084
|
(entry) =>
|
|
1043
|
-
entry.agentId === origin.source.agentId &&
|
|
1085
|
+
entry.agentId === origin.source.agentId &&
|
|
1086
|
+
bindingSupports(entry, intent.sourceDigests, undefined, source.submission?.inputPayload),
|
|
1044
1087
|
);
|
|
1045
1088
|
|
|
1046
1089
|
const targetBinding = deps.bindings.find(
|
|
1047
1090
|
(entry) =>
|
|
1048
1091
|
entry.agentId === origin.worker.targetAgentId &&
|
|
1049
|
-
bindingSupports(entry, origin.targetDigests),
|
|
1092
|
+
bindingSupports(entry, origin.targetDigests, undefined, submission.inputPayload),
|
|
1050
1093
|
);
|
|
1051
1094
|
|
|
1052
1095
|
const reports =
|
|
@@ -1063,26 +1106,6 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
1063
1106
|
!definitionDigestsEqual(submission.agentDigests, origin.targetDigests)
|
|
1064
1107
|
)
|
|
1065
1108
|
return yield* failure("followUp", "declaration-unavailable");
|
|
1066
|
-
const sourceHistory = yield* read(origin.source.threadId, "followUp");
|
|
1067
|
-
|
|
1068
|
-
const first = requests(sourceHistory.records).find(
|
|
1069
|
-
(row) => row.admission.messageId === origin.firstMessageId,
|
|
1070
|
-
);
|
|
1071
|
-
|
|
1072
|
-
if (first === undefined || !sameOrigin(first.admission.origin, origin))
|
|
1073
|
-
return yield* failure("followUp", "corrupt");
|
|
1074
|
-
|
|
1075
|
-
const source = yield* sourceAuthority(
|
|
1076
|
-
origin.source.threadId,
|
|
1077
|
-
first.admission.sourceSubmissionId,
|
|
1078
|
-
);
|
|
1079
|
-
|
|
1080
|
-
if (
|
|
1081
|
-
source.binding === undefined ||
|
|
1082
|
-
source.submission === undefined ||
|
|
1083
|
-
!bindingSupports(source.binding, intent.sourceDigests)
|
|
1084
|
-
)
|
|
1085
|
-
return yield* failure("followUp", "declaration-unavailable");
|
|
1086
1109
|
|
|
1087
1110
|
const recorded = source.current.records.find(
|
|
1088
1111
|
({ record }) => record.payload._tag === "WorkerOriginRecorded",
|
|
@@ -1229,39 +1252,6 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
1229
1252
|
const refused = (reason: WorkerReportRefused["reason"]) =>
|
|
1230
1253
|
WorkerReportRefused.make({ runId, messageId, reason });
|
|
1231
1254
|
|
|
1232
|
-
const sourceBinding = deps.bindings.find(
|
|
1233
|
-
(entry) =>
|
|
1234
|
-
entry.agentId === origin.source.agentId && bindingSupports(entry, intent.sourceDigests),
|
|
1235
|
-
);
|
|
1236
|
-
|
|
1237
|
-
const targetBinding = deps.bindings.find(
|
|
1238
|
-
(entry) =>
|
|
1239
|
-
entry.agentId === origin.worker.targetAgentId &&
|
|
1240
|
-
bindingSupports(entry, origin.targetDigests),
|
|
1241
|
-
);
|
|
1242
|
-
|
|
1243
|
-
const reports =
|
|
1244
|
-
sourceBinding?.reporting?.filter(
|
|
1245
|
-
(entry) => entry.delegationId === origin.worker.delegationId,
|
|
1246
|
-
) ?? [];
|
|
1247
|
-
|
|
1248
|
-
const descriptor = reports[0];
|
|
1249
|
-
|
|
1250
|
-
if (
|
|
1251
|
-
sourceBinding === undefined ||
|
|
1252
|
-
targetBinding === undefined ||
|
|
1253
|
-
descriptor === undefined ||
|
|
1254
|
-
reports.length !== 1 ||
|
|
1255
|
-
!Object.is(descriptor.target, targetBinding.definition) ||
|
|
1256
|
-
(descriptor.mode !== "standard" &&
|
|
1257
|
-
!Object.is(descriptor.input, sourceBinding.definition.input)) ||
|
|
1258
|
-
descriptor.mode !== intent.mode ||
|
|
1259
|
-
descriptor.destination?.delegationId !== intent.destinationDelegationId ||
|
|
1260
|
-
(descriptor.destination !== undefined &&
|
|
1261
|
-
!Object.is(descriptor.destination.target, sourceBinding.definition))
|
|
1262
|
-
)
|
|
1263
|
-
return refused("declaration-unavailable");
|
|
1264
|
-
|
|
1265
1255
|
const selected = yield* deps.ledger
|
|
1266
1256
|
.lookup(SubmissionLookupById.make({ submissionId: host.submissionId }))
|
|
1267
1257
|
.pipe(Effect.mapError(storageFailure("inspect")));
|
|
@@ -1293,7 +1283,49 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
1293
1283
|
firstInput.admission.sourceSubmissionId,
|
|
1294
1284
|
);
|
|
1295
1285
|
|
|
1296
|
-
if (
|
|
1286
|
+
if (
|
|
1287
|
+
source.binding === undefined ||
|
|
1288
|
+
!bindingSupports(
|
|
1289
|
+
source.binding,
|
|
1290
|
+
intent.sourceDigests,
|
|
1291
|
+
undefined,
|
|
1292
|
+
source.submission?.inputPayload,
|
|
1293
|
+
)
|
|
1294
|
+
)
|
|
1295
|
+
return refused("declaration-unavailable");
|
|
1296
|
+
|
|
1297
|
+
const sourceBinding = deps.bindings.find(
|
|
1298
|
+
(entry) =>
|
|
1299
|
+
entry.agentId === origin.source.agentId &&
|
|
1300
|
+
bindingSupports(entry, intent.sourceDigests, undefined, source.submission?.inputPayload),
|
|
1301
|
+
);
|
|
1302
|
+
|
|
1303
|
+
const targetBinding = deps.bindings.find(
|
|
1304
|
+
(entry) =>
|
|
1305
|
+
entry.agentId === origin.worker.targetAgentId &&
|
|
1306
|
+
bindingSupports(entry, origin.targetDigests, undefined, hostSubmission.inputPayload),
|
|
1307
|
+
);
|
|
1308
|
+
|
|
1309
|
+
const reports =
|
|
1310
|
+
sourceBinding?.reporting?.filter(
|
|
1311
|
+
(entry) => entry.delegationId === origin.worker.delegationId,
|
|
1312
|
+
) ?? [];
|
|
1313
|
+
|
|
1314
|
+
const descriptor = reports[0];
|
|
1315
|
+
|
|
1316
|
+
if (
|
|
1317
|
+
sourceBinding === undefined ||
|
|
1318
|
+
targetBinding === undefined ||
|
|
1319
|
+
descriptor === undefined ||
|
|
1320
|
+
reports.length !== 1 ||
|
|
1321
|
+
!Object.is(descriptor.target, targetBinding.definition) ||
|
|
1322
|
+
(descriptor.mode !== "standard" &&
|
|
1323
|
+
!Object.is(descriptor.input, sourceBinding.definition.input)) ||
|
|
1324
|
+
descriptor.mode !== intent.mode ||
|
|
1325
|
+
descriptor.destination?.delegationId !== intent.destinationDelegationId ||
|
|
1326
|
+
(descriptor.destination !== undefined &&
|
|
1327
|
+
!Object.is(descriptor.destination.target, sourceBinding.definition))
|
|
1328
|
+
)
|
|
1297
1329
|
return refused("declaration-unavailable");
|
|
1298
1330
|
|
|
1299
1331
|
const sourceOriginRecord = source.current.records.find(
|
|
@@ -1680,7 +1712,7 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
1680
1712
|
target: Agent.AnyDefinition,
|
|
1681
1713
|
operation: WorkerError["operation"],
|
|
1682
1714
|
) {
|
|
1683
|
-
|
|
1715
|
+
yield* binding(target, operation);
|
|
1684
1716
|
|
|
1685
1717
|
if (worker.targetAgentId !== target.id) return yield* failure(operation, "worker-mismatch");
|
|
1686
1718
|
const source = yield* read(context.source.threadId, operation);
|
|
@@ -1690,10 +1722,7 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
1690
1722
|
)?.admission.origin;
|
|
1691
1723
|
|
|
1692
1724
|
if (origin === undefined) return yield* failure(operation, "not-found");
|
|
1693
|
-
if (
|
|
1694
|
-
origin.worker.delegationId !== worker.delegationId ||
|
|
1695
|
-
!bindingSupports(resolved, origin.targetDigests)
|
|
1696
|
-
)
|
|
1725
|
+
if (origin.worker.delegationId !== worker.delegationId)
|
|
1697
1726
|
return yield* failure(operation, "worker-mismatch");
|
|
1698
1727
|
|
|
1699
1728
|
return origin;
|
|
@@ -2398,9 +2427,19 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
2398
2427
|
|
|
2399
2428
|
if (created?._tag !== "ThreadCreated") return yield* failure("context", "not-found");
|
|
2400
2429
|
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
|
|
2430
|
+
const selected =
|
|
2431
|
+
request.sourceSubmissionId === undefined
|
|
2432
|
+
? undefined
|
|
2433
|
+
: yield* sourceAuthority(sourceThreadId, request.sourceSubmissionId);
|
|
2434
|
+
|
|
2435
|
+
const resolved =
|
|
2436
|
+
selected === undefined
|
|
2437
|
+
? deps.bindings.find(
|
|
2438
|
+
(entry) =>
|
|
2439
|
+
entry.agentId === created.agentId &&
|
|
2440
|
+
bindingSupports(entry, created.definitions, undefined, firstThreadInput(current)),
|
|
2441
|
+
)
|
|
2442
|
+
: selected.binding;
|
|
2404
2443
|
|
|
2405
2444
|
if (resolved === undefined) return yield* failure("context", "declaration-unavailable");
|
|
2406
2445
|
|
|
@@ -2419,11 +2458,6 @@ export const makeWorkerRuntime = Effect.fn("WorkerHost.make")(function* (
|
|
|
2419
2458
|
? attached
|
|
2420
2459
|
: undefined;
|
|
2421
2460
|
|
|
2422
|
-
const selected =
|
|
2423
|
-
request.sourceSubmissionId === undefined
|
|
2424
|
-
? undefined
|
|
2425
|
-
: yield* sourceAuthority(sourceThreadId, request.sourceSubmissionId);
|
|
2426
|
-
|
|
2427
2461
|
return facet(
|
|
2428
2462
|
{
|
|
2429
2463
|
source: {
|