mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-04 06:31:13 +00:00
Introduce remote object references (refId) and deep proxy support across client, server, serializer and types. Key changes: - Add refId propagation in client proxies so child proxies inherit and include refId on RPC requests. - Extend serializer to handle a new SerializedValueType.OBJECT_REF, add refResolver and pass refId to proxyCreator. - Server: store object references in a Map with generated ref IDs, resolve paths with optional refId, serialize results to OBJECT_REF when shouldProxyResult returns true, and release cleans up references. Add defaultShouldProxyResult heuristic to decide which return values should remain proxied (class instances and objects with methods). - Types: add refId fields and ObjectRef shape, expose shouldProxyResult option on RpcServerOptions, and include refId in ProxyMeta and serialized values. - Tests updated across the suite to expect proxied return values (arrays/objects/class instances) and to await property access or method calls; add comprehensive tests for deep return value proxying, chained calls, callbacks, constructors on returned proxies, and lifecycle of remote object proxies. These changes enable returning live/proxied remote objects (including class instances and objects with methods) from RPC calls, preserving remote behavior and allowing subsequent operations to target the same server-side object. |
||
|---|---|---|
| .. | ||
| napcat-adapter | ||
| napcat-common | ||
| napcat-core | ||
| napcat-develop | ||
| napcat-framework | ||
| napcat-image-size | ||
| napcat-napi-loader | ||
| napcat-native | ||
| napcat-onebot | ||
| napcat-plugin-builtin | ||
| napcat-protobuf | ||
| napcat-protocol | ||
| napcat-pty | ||
| napcat-qrcode | ||
| napcat-rpc | ||
| napcat-schema | ||
| napcat-shell | ||
| napcat-shell-loader | ||
| napcat-test | ||
| napcat-types | ||
| napcat-universal | ||
| napcat-vite | ||
| napcat-webui-backend | ||
| napcat-webui-frontend | ||