mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-05 05:59:14 +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
17 lines
686 B
JavaScript
17 lines
686 B
JavaScript
const { createSubagentThreadTurnGuard, GenerationJobManager } = require('@librechat/api');
|
|
const subagentThreadTaskStore = require('~/server/services/Endpoints/agents/subagentThreadStore');
|
|
const db = require('~/models');
|
|
|
|
module.exports = createSubagentThreadTurnGuard({
|
|
getConvo: db.getConvo,
|
|
getEventBinding: db.getAgentEventBinding,
|
|
isHumanResumeAllowed: async ({ userId, tenantId, conversationId }) => {
|
|
const job = await GenerationJobManager.getJob(conversationId);
|
|
return (
|
|
job?.status === 'requires_action' &&
|
|
job.metadata?.userId === userId &&
|
|
(job.metadata?.tenantId ?? undefined) === tenantId
|
|
);
|
|
},
|
|
store: subagentThreadTaskStore,
|
|
});
|