Bug Report
Problem
The main entry point /src/index.ts does not export client hooks and client types, making them inaccessible to users even though they are built and included in the npm package.
Current /src/index.ts
export * from './error';
export * from './request';
export * from './schema/manifest';
export * from './schema/market';
export * from './types';
Missing Exports
/src/client/hooks/index.ts - contains useOnStandalonePluginInit, usePluginSettings, usePluginState, useWatchPluginMessage
/src/client/index.ts - contains main client exports
/src/openapi/index.ts - OpenAPI related exports
/src/schema/index.ts - Schema exports
Impact
Users cannot import hooks:
// This fails - hooks not exported
import { usePluginSettings } from '@lobehub/chat-plugin-sdk';
Evidence
package.json lists "client.d.ts" and "client.js" in files array
client.ts re-exports from /src/client
- But
/src/index.ts (main entry) doesn't export from /src/client
Fix Required
Update /src/index.ts to include:
export * from './client';
export * from './openapi';
export * from './schema';
Environment
- SDK Version: 1.32.4
- TypeScript
- React 18+
Bug Report
Problem
The main entry point
/src/index.tsdoes not export client hooks and client types, making them inaccessible to users even though they are built and included in the npm package.Current
/src/index.tsMissing Exports
/src/client/hooks/index.ts- containsuseOnStandalonePluginInit,usePluginSettings,usePluginState,useWatchPluginMessage/src/client/index.ts- contains main client exports/src/openapi/index.ts- OpenAPI related exports/src/schema/index.ts- Schema exportsImpact
Users cannot import hooks:
Evidence
package.jsonlists"client.d.ts"and"client.js"infilesarrayclient.tsre-exports from/src/client/src/index.ts(main entry) doesn't export from/src/clientFix Required
Update
/src/index.tsto include:Environment