fix(pi-embedded-runner): propagate sender identity to fix Feishu doc create auto-grant#32915
Conversation
|
Notes:\n- This fixes Feishu doc create auto-grant failing with "trusted requester identity unavailable" when the run was triggered from a Feishu message but executed via embedded runner (senderId was dropped in run.ts).\n- Low-risk: only adds missing param propagation already present in RunEmbeddedPiAgentParams + attempt.ts + pi-tools.ts plumbing.\n |
Greptile SummaryThis PR fixes a bug where four sender identity fields ( The root cause was a straightforward omission at the call site; The fix:
Why this fix is safe:
Confidence Score: 5/5
Last reviewed commit: 9763c72 |
9b671ad to
fa798db
Compare
fa798db to
efb2293
Compare
…create auto-grant (openclaw#32915) Merged via squash. Prepared head SHA: efb2293 Co-authored-by: cszhouwei <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
…create auto-grant (openclaw#32915) Merged via squash. Prepared head SHA: efb2293 Co-authored-by: cszhouwei <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
…create auto-grant (openclaw#32915) Merged via squash. Prepared head SHA: efb2293 Co-authored-by: cszhouwei <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
…create auto-grant (openclaw#32915) Merged via squash. Prepared head SHA: efb2293 Co-authored-by: cszhouwei <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
…create auto-grant (openclaw#32915) Merged via squash. Prepared head SHA: efb2293 Co-authored-by: cszhouwei <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
…create auto-grant (openclaw#32915) Merged via squash. Prepared head SHA: efb2293 Co-authored-by: cszhouwei <[email protected]> Co-authored-by: jalehman <[email protected]> Reviewed-by: @jalehman
Problem
When running via the embedded runner, sender identity (SenderId/SenderName/etc.) was not propagated from
runEmbeddedPiAgenttorunEmbeddedAttempt.This caused plugin tool contexts to miss
requesterSenderId. In Feishu specifically, it brokefeishu_doc.createauto-grant behavior (returned"trusted requester identity unavailable"and skipped adding edit permission).Root cause
src/agents/pi-embedded-runner/run.tsdropped the following fields when callingrunEmbeddedAttempt({ ... }):senderIdsenderNamesenderUsernamesenderE164Fix
Propagate the sender identity fields to
runEmbeddedAttempt.Reproduction (before fix)
feishu_docis enabled.feishu_doc→{ "action": "create", "title": "Test", "grant_to_requester": true }requester_permission_added: falserequester_permission_skipped_reason: "trusted requester identity unavailable"Verification (after fix)
Repeat the steps above and observe:
requester_permission_added: truerequester_open_idequals the Feishu requesteropen_idFiles
src/agents/pi-embedded-runner/run.ts