mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-13 01:51:51 +00:00
* feat: add authenticated agent event ingress * style: sort agent ingress imports * fix: harden agent event ingress * fix: bind event provenance to API keys * fix: inspect event input with legacy PII filters * fix: scope event status reads to source keys * fix: bind event status reads to remote sources * feat: add bound event-driven child turns * fix: harden event-bound child continuations * fix: satisfy event binding type contracts * fix: close event actor lifecycle races * fix: harden event actor dispatch continuity * fix: fence event actor resume lifecycle * fix: bind event actor state to lifecycle * fix: preserve cascade write outcomes * test: type cascade failure injection * style: sort cascade test imports * fix: harden event child lifecycle boundaries * fix: make event cleanup retryable * fix: annotate event retention clock * fix: reconcile partial cascade metadata * fix: recheck event binding expiry on resume * fix: fence event actors by retention deadline * fix: close event actor lifecycle races * fix: harden event child lease acquisition * fix: lazy-load event child lease adapter
24 lines
672 B
JavaScript
24 lines
672 B
JavaScript
const librechatApi = require('@librechat/api');
|
|
const { GenerationJobManager } = librechatApi;
|
|
const {
|
|
acquireSubagentThreadLease,
|
|
renewSubagentThreadLease,
|
|
releaseSubagentThreadLease,
|
|
} = require('~/models');
|
|
|
|
let acquireLease;
|
|
|
|
function acquireEventChildGenerationLease(input) {
|
|
acquireLease ??= librechatApi.createEventChildGenerationLeaseAcquirer({
|
|
methods: {
|
|
acquireSubagentThreadLease,
|
|
renewSubagentThreadLease,
|
|
releaseSubagentThreadLease,
|
|
},
|
|
abortGeneration: (streamId, options) => GenerationJobManager.abortJob(streamId, options),
|
|
});
|
|
|
|
return acquireLease(input);
|
|
}
|
|
|
|
module.exports = { acquireEventChildGenerationLease };
|