mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 04:15:48 -06:00
3d76246792
* refactor: resolve final export name collisions * refactor: update remaining collision rename consumers * style: format rebased auth helpers * test: update remaining session entry mocks * test: update remaining runtime mock exports * test: update delivery info path mock * refactor: reconcile combined collision sweeps * chore: regenerate collision and sdk baselines
25 lines
899 B
TypeScript
25 lines
899 B
TypeScript
// Session-envelope context resolver for inbound channel turns.
|
|
import { resolveEnvelopeFormatOptions } from "../auto-reply/envelope.js";
|
|
import { resolveSessionStorePathCore } from "../config/sessions.js";
|
|
import { readSessionUpdatedAtCore } from "../config/sessions/session-accessor.js";
|
|
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
|
|
|
/** Resolves envelope options and previous timestamp for one inbound channel session. */
|
|
export function resolveInboundSessionEnvelopeContext(params: {
|
|
cfg: OpenClawConfig;
|
|
agentId: string;
|
|
sessionKey: string;
|
|
}) {
|
|
const storePath = resolveSessionStorePathCore(params.cfg.session?.store, {
|
|
agentId: params.agentId,
|
|
});
|
|
return {
|
|
storePath,
|
|
envelopeOptions: resolveEnvelopeFormatOptions(params.cfg),
|
|
previousTimestamp: readSessionUpdatedAtCore({
|
|
storePath,
|
|
sessionKey: params.sessionKey,
|
|
}),
|
|
};
|
|
}
|