mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-22 21:48:20 +08:00
* feat(agent): add cross-platform interactive card tool * fix(agent): create pipelines with selected runner defaults * fix(agent): enable reliable cross-platform card interactions * feat(dingtalk): deliver A2UI cards and restore agent replies * Fix DingTalk A2UI form submissions and agent replies * Restore LangBot branding on DingTalk A2UI cards * Use compatible Markdown link in DingTalk A2UI branding * Place LangBot branding above DingTalk card content * Stream DingTalk replies without a source message * Move DingTalk branding into compact card footer * fix(wecombot): handle native select card callbacks * fix(wecombot): stream replies after HITL cards * fix(dingtalk): show submitted HITL choices in cards * fix(lark): stream replies after HITL submissions * fix(plugins): refresh LocalAgent source hashes * fix(dify): merge HITL resume streaming into in-tree plugin * feat(interactions): resume runner in place after card submission * fix(interactions): respect live adapter APIs and preserve deadlines * fix(ci): lock blocking interaction SDK for dependent checks * test(runner): keep legacy SDK probe importable * fix(interactions): align adapter manifests and close timed-out streams * fix(agent): avoid duplicate replies and enable LocalAgent cards * chore(plugins): sync LocalAgent catalog version * refactor(agent): unify blocking interaction callbacks and adapters * chore(deps): pin blocking interaction SDK revision * test(agent): remove obsolete async fixture mark * test(interaction): update legacy admission assertions * fix(qqofficial): keep card callbacks responsive * fix(runner): keep blocking card interactions alive * ci(plugins): expect SDK 0.7.20 in Runner workflows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> * ci(plugins): test coding Runners against SDK 0.7.20 Claude Code and Codex now call ctx.request_interaction, first released in 0.7.20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> * fix(discord): deliver guild interaction cards to the originating channel Pipeline group conversations are keyed by guild id, so send_interaction targeted the guild and Discord returned Unknown Channel. Resolve the channel from the message being answered, edit cards in that channel, and report the card's conversation on callbacks so the Host scope check matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: RockChinQ <rockchinq@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
2.3 KiB
2.3 KiB
Interaction Callback Lifecycle: Follow-up Design
Current Issue
The DingTalk A2UI adapter stores outTrackId callback context only in process
memory. The callback is ignored after an adapter restart even though the
interaction request and hashed callback token are persisted. The in-memory
context uses a fixed 30-minute expiry, while a Host interaction may remain
valid for up to 24 hours. Expired contexts are pruned only when another card is
sent, and there is no capacity limit.
The legacy DingTalk Dify form path has separate in-memory card_state and
requires its own migration assessment.
Intended Contract
InteractionStoreremains authoritative for callback token, request, delivery target, status, and expiry. An in-memory cache miss must never invalidate a pending card.- Parse the callback token and
outTrackIdfrom DingTalk's card callback. Resolve the stored request and delivery result, then validate the bot, conversation, actor, and card identity before consuming the submission. Reconstruct field types and option values from the stored request. - If profiling justifies a cache, bound it globally and per bot, cache only small derived metadata, and use a short TTL with LRU eviction. Starting limits to evaluate: 4,096 entries per process, 512 per bot, and five minutes. Cache eviction affects performance only.
- Waiting cards are database records, not queued in-memory tasks. Bound concurrent callback execution separately. Persist callback admission and the resume intent atomically before acknowledging delivery; a durable worker queue with leases can then resume after process restart. A bounded in-memory queue alone cannot close the crash gap after submission commit.
- Track pending-card count, callback backlog, processing latency, cache occupancy, and expired/rejected callbacks. Apply workspace-level admission limits and database retention separately from the cache bounds.
Verification Needed
- A pending card still submits after adapter restart and after cache eviction.
- A card remains usable until its actual persisted expiry, including when other cards are sent.
- Replayed callbacks resume the processor once; crashes between admission and execution recover the queued work once.
- Forged card, conversation, actor, or option identifiers are rejected.