mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-23 17:05:28 +08:00
feat(persistence): enforce image reference storage contract
- Reject structured inline images on ORM and Core writes - Route plugin run results through the media-aware journal - Redact legacy inline images before merging run metadata - Cover storage contracts and regressions on SQLite and PostgreSQL
This commit is contained in:
@@ -469,12 +469,16 @@ def register(h):
|
||||
if payload_error:
|
||||
return handler.ActionResponse.error(message=payload_error)
|
||||
|
||||
event = await store.append_event(
|
||||
from ..agent.runner.run_journal import AgentRunJournal
|
||||
|
||||
event = await AgentRunJournal(h.ap).append_run_result(
|
||||
run_id=str(target_run_id),
|
||||
sequence=sequence,
|
||||
event_type=str(event_type),
|
||||
data=event_payload,
|
||||
usage=usage if isinstance(usage, dict) else None,
|
||||
result_dict={
|
||||
'type': str(event_type),
|
||||
'data': event_payload,
|
||||
'usage': usage if isinstance(usage, dict) else None,
|
||||
},
|
||||
source=str(data.get('source') or result.get('source') or 'runner'),
|
||||
metadata=metadata,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user