@nextclaw/ncp-react 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -26,7 +26,6 @@ type UseHydratedNcpAgentOptions = {
26
26
  type UseHydratedNcpAgentResult = UseNcpAgentResult & {
27
27
  isHydrating: boolean;
28
28
  hydrateError: Error | null;
29
- reloadSeed: () => Promise<void>;
30
29
  };
31
30
  declare function useHydratedNcpAgent({ sessionId, client, loadSeed, autoResumeRunningSession, }: UseHydratedNcpAgentOptions): UseHydratedNcpAgentResult;
32
31
 
package/dist/index.js CHANGED
@@ -160,7 +160,7 @@ function useHydratedNcpAgent({
160
160
  const [hydrateError, setHydrateError] = useState2(null);
161
161
  const [hydratedSessionId, setHydratedSessionId] = useState2(null);
162
162
  const loadStateRef = useRef2({ requestId: 0, controller: null });
163
- const reloadSeed = useCallback(async () => {
163
+ const hydrateSeed = useCallback(async () => {
164
164
  loadStateRef.current.controller?.abort();
165
165
  const controller = new AbortController();
166
166
  const requestId = loadStateRef.current.requestId + 1;
@@ -211,12 +211,12 @@ function useHydratedNcpAgent({
211
211
  }
212
212
  }, [autoResumeRunningSession, client, loadSeed, manager, sessionId]);
213
213
  useEffect2(() => {
214
- void reloadSeed();
214
+ void hydrateSeed();
215
215
  return () => {
216
216
  loadStateRef.current.controller?.abort();
217
217
  loadStateRef.current.controller = null;
218
218
  };
219
- }, [reloadSeed]);
219
+ }, [hydrateSeed]);
220
220
  return {
221
221
  ...runtime,
222
222
  isHydrating: resolveSessionHydratingState({
@@ -224,8 +224,7 @@ function useHydratedNcpAgent({
224
224
  hydratedSessionId,
225
225
  isHydrating
226
226
  }),
227
- hydrateError,
228
- reloadSeed
227
+ hydrateError
229
228
  };
230
229
  }
231
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/ncp-react",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "private": false,
5
5
  "description": "React bindings for building NCP-based agent applications.",
6
6
  "type": "module",
@@ -15,8 +15,8 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@nextclaw/ncp": "0.4.1",
19
- "@nextclaw/ncp-toolkit": "0.4.7"
18
+ "@nextclaw/ncp": "0.4.2",
19
+ "@nextclaw/ncp-toolkit": "0.4.9"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": "^18.0.0 || ^19.0.0"