interop-promise
OfficialDebug and bridge ETS/JS Promise interop reliably.
Software Engineering#javascript#arkts#promise interop#arkcompiler#interop debugging#coroutine await#napi deferred
Authoropenharmonyinsight
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you understand and troubleshoot cross-language Promise bridging between ETS (ArkTS) and JavaScript in ArkCompiler’s hybrid runtime, so resolved/rejected async results propagate correctly across VM boundaries.
Core Features & Use Cases
- Promise Bridging (Wrap/Unwrap): Convert JS Promise ↔ ETS Promise proxy/wrapper with correct identity reuse and state handling (pending/linked/settled).
- Await & Coroutine Safety: Diagnose stuck awaits by validating proxy detection, coroutine scheduling (yield-before-wait), and callback queue execution.
- Interop State Machine Debugging: Trace fast-path vs slow-path behavior for JSCONVERT_WRAP(Promise) and JSCONVERT_UNWRAP(Promise), including SettleJsPromise and PromiseInterop.connectPromise.
- Targets & Hotspots to Inspect: JSConvertPromise in js_convert.h, EtsPromise/EtsPromiseRef in ets_promise(.h/.cpp)/ets_promise_ref.h, JsJobQueue/Promise link in js_job_queue, and PromiseInterop.ets.
Quick Start
Use the interop-promise skill to diagnose why an awaited ArkTS Promise never resolves when it wraps a JavaScript Promise by reviewing EtsPromise proxy state, JsJobQueue callback wiring, and SettleJsPromise execution.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: interop-promise Download link: https://github.com/openharmonyinsight/openharmony-skills/archive/main.zip#interop-promise Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.