fix(feishu): lazy-load setup client to avoid missing staged runtime deps during onboard#70339
Conversation
Greptile SummaryThis PR converts static imports of Confidence Score: 5/5Safe to merge — all changes are consistent, call sites are properly awaited, and runtime behavior is unchanged once deps are present. All eight changed files follow the same correct pattern: static import removed, dynamic import added inside the async function body, and every call site updated with No files require special attention. Reviews (1): Last reviewed commit: "fix(feishu): lazy-load client in setup p..." | Re-trigger Greptile |
steipete
left a comment
There was a problem hiding this comment.
No blocking findings. This is a focused Feishu hardening patch: it removes setup/tool registration-time static imports of , makes client acquisition dynamic at actual tool/runtime use, and updates the affected async call sites consistently. CI is green and the change is worth landing as defense-in-depth even though already fixes the broader bundled-deps cluster.
|
Clarifying my approval text: the intended references were static imports of |
3c3948c to
c2c6a59
Compare
c2c6a59 to
479abfc
Compare
479abfc to
77cb656
Compare
77cb656 to
4d82d5e
Compare
|
Landed via squash after rewriting this to the setup-only barrel shape.\n\nProof:\n- local: |
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <[email protected]>
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <[email protected]>
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <[email protected]>
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <[email protected]>
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <[email protected]>
Load Feishu setup surfaces through a setup-only barrel so onboarding does not import the Lark SDK before bundled runtime deps are staged.\n\nThanks @andrejtr.\n\nCo-authored-by: andrejtr <[email protected]>
Summary
This fixes onboarding failures where Feishu setup paths eagerly loaded
@larksuiteoapi/node-sdkbefore staged runtime dependencies were installed.The fix makes Feishu client loading lazy in setup/tool-registration code paths, so
openclaw onboardcan load plugin setup surfaces without requiring Feishu runtime deps up front.Fixes #70338, #70346, #70343
Root Cause
onboardloads bundled setup entries, which pulled Feishu modules with static imports of./client.js, which in turn statically imported@larksuiteoapi/node-sdk.Because this dependency is staged runtime-owned, it may not exist yet at setup-load time.
What Changed
awaitasync client getters.Validation
pnpm tsgo:prodpassed.pnpm openclaw onboard --helpnow starts successfully without module-load failure.Cannot find module '@larksuiteoapi/node-sdk'in onboard setup load path.