@nextclaw/ui 0.12.20-beta.6 → 0.12.21

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.
Files changed (76) hide show
  1. package/CHANGELOG.md +322 -0
  2. package/dist/assets/api-lwyw9j7i.js +15 -0
  3. package/dist/assets/{app-manager-provider-BZr5VxCe.js → app-manager-provider-C0ONQxUg.js} +1 -1
  4. package/dist/assets/{app-navigation.config-BjIj_FLm.js → app-navigation.config-DgiR0c5_.js} +1 -1
  5. package/dist/assets/{channels-list-page-L6FFtRYn.js → channels-list-page-Dl839n02.js} +1 -1
  6. package/dist/assets/{chat-ZQIVJChB.js → chat-DwUf7AKR.js} +36 -36
  7. package/dist/assets/chat-page-B-FvPmA7.js +1 -0
  8. package/dist/assets/{desktop-update-config-AXzb7OEa.js → desktop-update-config-D5g_gPak.js} +1 -1
  9. package/dist/assets/{dialog-DgybjpeU.js → dialog-CdtCU2xX.js} +1 -1
  10. package/dist/assets/{dist-CxcPOISF.js → dist-CuqvE--P.js} +1 -1
  11. package/dist/assets/{es2015-BVRlEE06.js → es2015-yYU5Ad5w.js} +1 -1
  12. package/dist/assets/{index-B7RsQ-ne.js → index-Doxyk7L2.js} +2 -2
  13. package/dist/assets/marketplace-page-BRHkZaO5.js +1 -0
  14. package/dist/assets/{marketplace-page-ClRW-W3g.js → marketplace-page-CawcdL6Y.js} +1 -1
  15. package/dist/assets/mcp-marketplace-page-CL7BF4dD.js +1 -0
  16. package/dist/assets/{mcp-marketplace-page-DtngnIi0.js → mcp-marketplace-page-DEGfJ_70.js} +1 -1
  17. package/dist/assets/{model-config-D_y8F0j6.js → model-config-r-1RPSrZ.js} +1 -1
  18. package/dist/assets/{notice-card-uzwjFyML.js → notice-card-BPtCVEKW.js} +1 -1
  19. package/dist/assets/{popover-C8tMB7tR.js → popover-jbfQhYQh.js} +1 -1
  20. package/dist/assets/{provider-scoped-model-input-ORZutTDv.js → provider-scoped-model-input-gdk2lmRi.js} +1 -1
  21. package/dist/assets/{providers-list-DSc3d8me.js → providers-list-DpISIr3M.js} +1 -1
  22. package/dist/assets/remote-BnRNqMlb.js +1 -0
  23. package/dist/assets/{runtime-config-page-B4uSax1I.js → runtime-config-page-DQ8YY8Lc.js} +1 -1
  24. package/dist/assets/{search-config-CaqqlsdW.js → search-config-BWqz8nqY.js} +1 -1
  25. package/dist/assets/{secrets-config-llf5ROde.js → secrets-config-CjzSNg0Y.js} +1 -1
  26. package/dist/assets/{select-uO-zhYsH.js → select-Cw5Zkb1w.js} +1 -1
  27. package/dist/assets/{sessions-config-page-BqOXte9x.js → sessions-config-page-beoDPtII.js} +2 -2
  28. package/dist/assets/{setting-row-BIiXR4hx.js → setting-row-Cjl2d40s.js} +1 -1
  29. package/dist/assets/{tag-chip-DVbgpsYW.js → tag-chip-CoWHxYJj.js} +1 -1
  30. package/dist/assets/{theme-provider-BU77FNSB.js → theme-provider-B5XReW_-.js} +1 -1
  31. package/dist/assets/{tooltip-CvAtG-kT.js → tooltip-GYzH-Hfq.js} +1 -1
  32. package/dist/assets/{use-config-D2QgG7qc.js → use-config-BhJHD3-G.js} +1 -1
  33. package/dist/assets/{use-confirm-dialog-BBClFV8E.js → use-confirm-dialog-Bqgy3Gi-.js} +1 -1
  34. package/dist/assets/{use-infinite-scroll-loader-CWzpUecQ.js → use-infinite-scroll-loader-BfexitoF.js} +1 -1
  35. package/dist/assets/{use-viewport-layout-C6EN0_eq.js → use-viewport-layout-D33zVbr5.js} +1 -1
  36. package/dist/index.html +15 -15
  37. package/dist/sw.js +4 -7
  38. package/package.json +9 -9
  39. package/public/sw.js +4 -7
  40. package/src/app/hooks/use-app-event-consumers.ts +1 -1
  41. package/src/features/agents/components/agents-page.test.tsx +34 -19
  42. package/src/features/agents/components/agents-page.tsx +6 -18
  43. package/src/features/channels/components/config/channel-form.tsx +6 -2
  44. package/src/features/chat/index.ts +1 -1
  45. package/src/features/chat/managers/chat-session-list.manager.test.ts +24 -0
  46. package/src/features/chat/managers/chat-session-list.manager.ts +7 -0
  47. package/src/features/pwa/managers/pwa-service-worker-cache.manager.test.ts +16 -0
  48. package/src/features/system-status/components/desktop-update-config.tsx +1 -1
  49. package/src/features/system-status/managers/runtime-update.manager.ts +1 -3
  50. package/src/features/system-status/stores/runtime-update.store.ts +1 -1
  51. package/src/platforms/desktop/types/desktop-update.types.ts +1 -1
  52. package/src/shared/components/common/brand-header.tsx +1 -1
  53. package/src/shared/lib/api/README.md +4 -0
  54. package/src/shared/lib/api/index.ts +12 -12
  55. package/src/shared/lib/api/{services/client.service.ts → managers/client.manager.ts} +2 -2
  56. package/src/shared/lib/api/ncp-session.test.ts +3 -3
  57. package/src/shared/lib/api/{services/runtime-update.service.ts → runtime-update.utils.ts} +2 -2
  58. package/src/shared/lib/api/{services/agents.service.ts → utils/agents.utils.ts} +1 -1
  59. package/src/shared/lib/api/{services/channel-auth.service.ts → utils/channel-auth.utils.ts} +1 -1
  60. package/src/shared/lib/api/{services/config.service.ts → utils/config.utils.ts} +1 -1
  61. package/src/shared/lib/api/{services/marketplace.service.ts → utils/marketplace.utils.ts} +1 -1
  62. package/src/shared/lib/api/{services/mcp-marketplace.service.ts → utils/mcp-marketplace.utils.ts} +1 -1
  63. package/src/shared/lib/api/{services/ncp-attachments.service.ts → utils/ncp-attachments.utils.ts} +1 -1
  64. package/src/shared/lib/api/{services/ncp-session.service.ts → utils/ncp-session.utils.ts} +1 -1
  65. package/src/shared/lib/api/{services/remote.service.ts → utils/remote.utils.ts} +1 -1
  66. package/src/shared/lib/api/{services/runtime-control.service.ts → utils/runtime-control.utils.ts} +1 -1
  67. package/src/shared/lib/api/{services/server-path.service.ts → utils/server-path.utils.ts} +1 -1
  68. package/src/shared/lib/transport/transport.types.ts +1 -1
  69. package/tsconfig.json +2 -3
  70. package/vite.config.ts +1 -2
  71. package/vitest.config.ts +1 -2
  72. package/dist/assets/api-Dai6UR3J.js +0 -15
  73. package/dist/assets/chat-page-CR1yI96r.js +0 -1
  74. package/dist/assets/marketplace-page-Bj55-6F2.js +0 -1
  75. package/dist/assets/mcp-marketplace-page-_Wu2VnHy.js +0 -1
  76. package/dist/assets/remote-rWiu3cys.js +0 -1
@@ -1,5 +1,4 @@
1
1
  import { useMemo, useState } from "react";
2
- import { useNavigate } from "react-router-dom";
3
2
  import {
4
3
  useCreateAgent,
5
4
  useDeleteAgent,
@@ -19,8 +18,7 @@ import {
19
18
  normalizeSessionType,
20
19
  resolveAgentRuntimeSessionType,
21
20
  resolveSessionTypeLabel,
22
- useChatInputStore,
23
- useChatSessionListStore,
21
+ usePresenter,
24
22
  useNcpChatSessionTypes,
25
23
  } from "@/features/chat";
26
24
  import { AgentAvatar } from "@/shared/components/common/agent-avatar";
@@ -247,7 +245,7 @@ function AgentListCard(props: {
247
245
  }
248
246
 
249
247
  export function AgentsPage() {
250
- const navigate = useNavigate();
248
+ const presenter = usePresenter();
251
249
  const agentsQuery = useAgents();
252
250
  const configQuery = useConfig();
253
251
  const configMetaQuery = useConfigMeta();
@@ -259,10 +257,6 @@ export function AgentsPage() {
259
257
  const [editingAgent, setEditingAgent] = useState<AgentProfileView | null>(
260
258
  null,
261
259
  );
262
- const setSessionListSnapshot = useChatSessionListStore(
263
- (state) => state.setSnapshot,
264
- );
265
-
266
260
  const agents = useMemo(
267
261
  () => agentsQuery.data?.agents ?? [],
268
262
  [agentsQuery.data?.agents],
@@ -340,16 +334,10 @@ export function AgentsPage() {
340
334
  };
341
335
 
342
336
  const startChatWithAgent = (agent: AgentProfileView) => {
343
- setSessionListSnapshot({
344
- selectedAgentId: agent.id,
345
- selectedSessionKey: null,
346
- });
347
- useChatInputStore.getState().setSnapshot({
348
- pendingSessionType: resolveAgentRuntimeSessionType(agent, defaultRuntime),
349
- pendingProjectRoot: null,
350
- pendingProjectRootSessionKey: null,
351
- });
352
- navigate("/chat");
337
+ presenter.chatSessionListManager.startAgentDraftChat(
338
+ agent.id,
339
+ resolveAgentRuntimeSessionType(agent, defaultRuntime),
340
+ );
353
341
  };
354
342
 
355
343
  return (
@@ -1,6 +1,6 @@
1
1
  import { useMemo, useState, useSyncExternalStore } from 'react';
2
2
  import type { Dispatch, FormEvent, SetStateAction } from 'react';
3
- import { eventKeys } from '@nextclaw/kernel';
3
+ import { eventKeys } from '@nextclaw/shared';
4
4
  import { BookOpen, ChevronDown } from 'lucide-react';
5
5
  import { toast } from 'sonner';
6
6
  import { LogoBadge } from '@/shared/components/common/logo-badge';
@@ -285,7 +285,11 @@ function ChannelFormEditor(props: ChannelFormEditorProps) {
285
285
  }
286
286
  const result = await executeAction.mutateAsync({ actionId: action.id, data: { scope, draftConfig: buildScopeDraft(scope, nextData) } });
287
287
  applyActionPatchToForm(result.patch);
288
- result.ok ? toast.success(result.message || t('success')) : toast.error(result.message || t('error'));
288
+ if (result.ok) {
289
+ toast.success(result.message || t('success'));
290
+ } else {
291
+ toast.error(result.message || t('error'));
292
+ }
289
293
  } catch (error) {
290
294
  toast.error(`${t('error')}: ${error instanceof Error ? error.message : String(error)}`);
291
295
  } finally {
@@ -1,4 +1,4 @@
1
- export * from "./components/chat-sidebar-list-mode-switch"; export * from "./components/chat-sidebar-project-groups"; export * from "./components/chat-sidebar-session-item"; export * from "./components/chat-welcome";
1
+ export * from "./components/chat-sidebar-list-mode-switch"; export * from "./components/chat-sidebar-project-groups"; export * from "./components/chat-sidebar-session-item"; export * from "./components/chat-welcome"; export * from "./components/providers/chat-presenter.provider";
2
2
  export * from "./components/conversation/chat-conversation-panel"; export * from "./components/layout/chat-sidebar";
3
3
  export * from "./components/chat-session-type-option-item"; export * from "./components/chat-session-workspace-file-preview"; export * from "./components/chat-session-workspace-panel"; export * from "./components/chat-session-workspace-panel-nav";
4
4
  export * from "./hooks/use-chat-session-type-state"; export * from "./hooks/use-ncp-chat-session-types"; export * from "./hooks/use-ncp-session-list-view";
@@ -71,6 +71,30 @@ describe('ChatSessionListManager', () => {
71
71
  expect(useChatInputStore.getState().snapshot.pendingProjectRootSessionKey).toBeNull();
72
72
  });
73
73
 
74
+ it('starts an agent draft chat through one owner state transition', () => {
75
+ const uiManager = {
76
+ goToChatRoot: vi.fn(),
77
+ goToSession: vi.fn(),
78
+ isAtChatRoot: vi.fn(() => true),
79
+ } as unknown as ConstructorParameters<typeof ChatSessionListManager>[0];
80
+ const streamActionsManager = {
81
+ resetStreamState: vi.fn()
82
+ } as unknown as ConstructorParameters<typeof ChatSessionListManager>[1];
83
+
84
+ const manager = new ChatSessionListManager(uiManager, streamActionsManager);
85
+ const sessionKey = manager.startAgentDraftChat('researcher', 'codex');
86
+
87
+ expect(streamActionsManager.resetStreamState).toHaveBeenCalledTimes(1);
88
+ expect(uiManager.goToChatRoot).toHaveBeenCalledTimes(1);
89
+ expect(useChatSessionListStore.getState().snapshot.selectedAgentId).toBe('researcher');
90
+ expect(useChatSessionListStore.getState().snapshot.selectedSessionKey).toBeNull();
91
+ expect(useChatSessionListStore.getState().snapshot.draftSessionKey).toBe(sessionKey);
92
+ expect(useChatThreadStore.getState().snapshot.sessionKey).toBe(sessionKey);
93
+ expect(useChatInputStore.getState().snapshot.pendingSessionType).toBe('codex');
94
+ expect(useChatInputStore.getState().snapshot.pendingProjectRoot).toBeNull();
95
+ expect(useChatInputStore.getState().snapshot.pendingProjectRootSessionKey).toBeNull();
96
+ });
97
+
74
98
  it('hydrates the draft project root when creating a session inside a project group', () => {
75
99
  const uiManager = {
76
100
  goToChatRoot: vi.fn(),
@@ -122,6 +122,13 @@ export class ChatSessionListManager {
122
122
  return nextSessionKey;
123
123
  };
124
124
 
125
+ startAgentDraftChat = (agentId: string, sessionType: string): string => {
126
+ const normalizedAgentId = agentId.trim() || 'main';
127
+ const nextSessionKey = this.createSession(sessionType);
128
+ this.setSelectedAgentId(normalizedAgentId);
129
+ return nextSessionKey;
130
+ };
131
+
125
132
  ensureDraftSession = (sessionType?: string): string => {
126
133
  const { snapshot } = useChatSessionListStore.getState();
127
134
  if (snapshot.selectedSessionKey) {
@@ -0,0 +1,16 @@
1
+ import serviceWorkerSource from '../../../../public/sw.js?raw';
2
+
3
+ describe('NextClaw service worker cache policy', () => {
4
+ it('does not precache the app shell entrypoint', () => {
5
+ expect(serviceWorkerSource).not.toContain("'/'");
6
+ });
7
+
8
+ it('does not fall back to stale navigation responses', () => {
9
+ const navigationHandler = serviceWorkerSource.slice(
10
+ serviceWorkerSource.indexOf('async function handleNavigation'),
11
+ serviceWorkerSource.indexOf('async function handleStaticAsset')
12
+ );
13
+
14
+ expect(navigationHandler).not.toContain('caches.match(request)');
15
+ });
16
+ });
@@ -1,4 +1,4 @@
1
- import type { UpdateSnapshot } from '@nextclaw/kernel';
1
+ import type { UpdateSnapshot } from '@nextclaw/shared';
2
2
  import { runtimeUpdateManager, useRuntimeUpdateStore } from '@/features/system-status';
3
3
  import { Button } from '@/shared/components/ui/button';
4
4
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/shared/components/ui/card';
@@ -1,12 +1,10 @@
1
- import type { UpdatePreferences, UpdateSnapshot } from '@nextclaw/kernel';
1
+ import type { UpdatePreferences, UpdateSnapshot } from '@nextclaw/shared';
2
2
  import { applyRuntimeUpdate, checkRuntimeUpdate, downloadRuntimeUpdate, fetchRuntimeUpdate, updateRuntimeUpdateChannel, updateRuntimeUpdatePreferences } from '@/shared/lib/api';
3
3
  import type { NextClawDesktopBridge } from '@/platforms/desktop';
4
4
  import { t } from '@/shared/lib/i18n';
5
5
  import { toast } from 'sonner';
6
6
  import { useRuntimeUpdateStore, type RuntimeUpdateBusyAction } from '@/features/system-status/stores/runtime-update.store';
7
7
 
8
- type RuntimeUpdateSourceKind = 'desktop-bridge' | 'runtime-host';
9
-
10
8
  interface RuntimeUpdateSourceBase {
11
9
  getState: () => Promise<UpdateSnapshot>;
12
10
  checkForUpdates: () => Promise<UpdateSnapshot>;
@@ -1,4 +1,4 @@
1
- import type { UpdateSnapshot } from '@nextclaw/kernel';
1
+ import type { UpdateSnapshot } from '@nextclaw/shared';
2
2
  import { create } from 'zustand';
3
3
 
4
4
  export type RuntimeUpdateBusyAction =
@@ -5,7 +5,7 @@ import type {
5
5
  UpdateProgress,
6
6
  UpdateSnapshot,
7
7
  UpdateStatus,
8
- } from '@nextclaw/kernel';
8
+ } from '@nextclaw/shared';
9
9
 
10
10
  export type DesktopUpdateStatus = Extract<
11
11
  UpdateStatus,
@@ -1,4 +1,4 @@
1
- import type { UpdateSnapshot } from '@nextclaw/kernel';
1
+ import type { UpdateSnapshot } from '@nextclaw/shared';
2
2
  import { runtimeUpdateManager, useRuntimeUpdateStore } from '@/features/system-status';
3
3
  import { useAppMeta } from '@/shared/hooks/use-config';
4
4
  import { type ReactNode, useState } from 'react';
@@ -1,3 +1,7 @@
1
+ ## 目录预算豁免
2
+
3
+ - 原因:`shared/lib/api` 是历史形成的前端 API facade 根边界,当前仍需要保留若干公共导出、类型、query cache、runtime update helper 与测试入口。新的 endpoint 薄封装已收敛到 `utils/` 子目录,后续继续治理时应优先减少根目录直接文件,而不是继续新增 root 文件。
4
+
1
5
  ## 子树边界豁免
2
6
 
3
7
  - 原因:`shared/lib/api` 是历史形成的前端 API facade,当前同时承载 client、endpoint wrapper、query cache、transport helper 与 response view types。本次新增 `ncp-session.types.ts` 是为了把会话类型从超大的 `types.ts` 中拆出,实际降低核心类型文件体积;完整子树化需要同步改造大量公共导出和调用方,适合单独结构治理批次推进。
@@ -1,22 +1,22 @@
1
- export * from './services/agents.service';
1
+ export * from './utils/agents.utils';
2
2
  export * from './api-base';
3
3
  export * from './auth.types';
4
- export * from './services/channel-auth.service';
4
+ export * from './utils/channel-auth.utils';
5
5
  export * from './channel-auth.types';
6
6
  export * from './chat-session-type.types';
7
- export * from './services/client.service';
8
- export * from './services/config.service';
9
- export * from './services/marketplace.service';
10
- export * from './services/mcp-marketplace.service';
11
- export * from './services/ncp-attachments.service';
12
- export * from './services/ncp-session.service';
7
+ export * from './managers/client.manager';
8
+ export * from './utils/config.utils';
9
+ export * from './utils/marketplace.utils';
10
+ export * from './utils/mcp-marketplace.utils';
11
+ export * from './utils/ncp-attachments.utils';
12
+ export * from './utils/ncp-session.utils';
13
13
  export * from './ncp-session.types';
14
14
  export * from './ncp-session-query-cache';
15
15
  export * from './raw-client.utils';
16
- export * from './services/remote.service';
16
+ export * from './utils/remote.utils';
17
17
  export * from './remote.types';
18
- export * from './services/runtime-control.service';
18
+ export * from './utils/runtime-control.utils';
19
19
  export * from './runtime-control.types';
20
- export * from './services/runtime-update.service';
21
- export * from './services/server-path.service';
20
+ export * from './runtime-update.utils';
21
+ export * from './utils/server-path.utils';
22
22
  export * from './types';
@@ -1,5 +1,5 @@
1
1
  import {
2
- createNextClawClient,
2
+ NextClawClient,
3
3
  type NextClawRealtimeEvent,
4
4
  type NextClawTransport,
5
5
  type NextClawTransportRequestInput,
@@ -36,7 +36,7 @@ const nextclawUiTransport: NextClawTransport = {
36
36
  subscribe: (handler: (event: NextClawRealtimeEvent) => void) => appClient.subscribe(handler)
37
37
  };
38
38
 
39
- export const nextclawClient = createNextClawClient({
39
+ export const nextclawClient = new NextClawClient({
40
40
  baseUrl: API_BASE,
41
41
  transport: nextclawUiTransport
42
42
  });
@@ -1,7 +1,7 @@
1
- import { fetchNcpSessionSkills } from './services/ncp-session.service';
2
- import { nextclawClient } from './services/client.service';
1
+ import { fetchNcpSessionSkills } from './utils/ncp-session.utils';
2
+ import { nextclawClient } from './managers/client.manager';
3
3
 
4
- vi.mock('./services/client.service', () => ({
4
+ vi.mock('./managers/client.manager', () => ({
5
5
  nextclawClient: {
6
6
  sessions: {
7
7
  listSkills: vi.fn()
@@ -1,5 +1,5 @@
1
- import type { UpdatePreferences, UpdateSnapshot } from '@nextclaw/kernel';
2
- import { nextclawClient } from './client.service';
1
+ import type { UpdatePreferences, UpdateSnapshot } from '@nextclaw/shared';
2
+ import { nextclawClient } from './managers/client.manager';
3
3
 
4
4
  export async function fetchRuntimeUpdate(): Promise<UpdateSnapshot> {
5
5
  return await nextclawClient.runtimeUpdate.fetch();
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from "./client.service";
1
+ import { nextclawClient } from "../managers/client.manager";
2
2
  import type { AgentCreateRequest, AgentDeleteResult, AgentProfileView, AgentUpdateRequest } from "@/shared/lib/api/types";
3
3
 
4
4
  export async function fetchAgents(): Promise<{ agents: AgentProfileView[] }> {
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type {
3
3
  ChannelAuthPollRequest,
4
4
  ChannelAuthPollResult,
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type {
3
3
  AuthEnabledUpdateRequest,
4
4
  AuthLoginRequest,
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type {
3
3
  MarketplaceInstallRequest,
4
4
  MarketplaceInstallResult,
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type {
3
3
  MarketplaceInstalledView,
4
4
  MarketplaceItemView,
@@ -1,5 +1,5 @@
1
1
  import type { NcpDraftAttachment } from "@nextclaw/ncp-react";
2
- import { nextclawClient } from "./client.service";
2
+ import { nextclawClient } from "../managers/client.manager";
3
3
 
4
4
  export async function uploadNcpAssets(files: File[]): Promise<NcpDraftAttachment[]> {
5
5
  const payload = await nextclawClient.sessions.uploadAssets(files);
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type {
3
3
  NcpSessionMessagesView,
4
4
  NcpSessionSkillsView,
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type {
3
3
  RemoteAccessView,
4
4
  RemoteAccountProfileUpdateRequest,
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type { RuntimeControlActionResult, RuntimeControlView } from '@/shared/lib/api/runtime-control.types';
3
3
 
4
4
  export async function fetchRuntimeControl(): Promise<RuntimeControlView> {
@@ -1,4 +1,4 @@
1
- import { nextclawClient } from './client.service';
1
+ import { nextclawClient } from '../managers/client.manager';
2
2
  import type { ServerPathBrowseView, ServerPathReadView } from '@/shared/lib/api/types';
3
3
 
4
4
  export async function fetchServerPathBrowse(params?: {
@@ -1,4 +1,4 @@
1
- import type { AppEvent as KernelAppEvent } from '@nextclaw/kernel';
1
+ import type { AppEvent as KernelAppEvent } from '@nextclaw/shared';
2
2
 
3
3
  export type RequestMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
4
4
 
package/tsconfig.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "extends": "../../tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "target": "ES2020",
5
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
5
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
6
  "module": "ESNext",
7
7
  "moduleResolution": "bundler",
8
8
  "jsx": "react-jsx",
@@ -35,8 +35,7 @@
35
35
  "@nextclaw/agent-chat": ["../nextclaw-agent-chat/src/index.ts"],
36
36
  "@nextclaw/agent-chat-ui": ["../nextclaw-agent-chat-ui/src/index.ts"],
37
37
  "@nextclaw/client-sdk": ["../nextclaw-client-sdk/src/index.ts"],
38
- "@nextclaw/kernel": ["../nextclaw-kernel/src/index.ts"],
39
- "@kernel/*": ["../nextclaw-kernel/src/*"],
38
+ "@nextclaw/shared": ["../nextclaw-shared/src/index.ts"],
40
39
  "@nextclaw/ncp": ["../ncp-packages/nextclaw-ncp/src/index.ts"],
41
40
  "@nextclaw/ncp-http-agent-client": ["../ncp-packages/nextclaw-ncp-http-agent-client/src/index.ts"],
42
41
  "@nextclaw/ncp-react": ["../ncp-packages/nextclaw-ncp-react/src/index.ts"]
package/vite.config.ts CHANGED
@@ -33,8 +33,7 @@ export default defineConfig({
33
33
  '@nextclaw/agent-chat': path.resolve(__dirname, '../nextclaw-agent-chat/src/index.ts'),
34
34
  '@nextclaw/agent-chat-ui': path.resolve(__dirname, '../nextclaw-agent-chat-ui/src/index.ts'),
35
35
  '@nextclaw/client-sdk': path.resolve(__dirname, '../nextclaw-client-sdk/src/index.ts'),
36
- '@nextclaw/kernel': path.resolve(__dirname, '../nextclaw-kernel/src/index.ts'),
37
- '@kernel': path.resolve(__dirname, '../nextclaw-kernel/src')
36
+ '@nextclaw/shared': path.resolve(__dirname, '../nextclaw-shared/src/index.ts')
38
37
  }
39
38
  },
40
39
  server: {
package/vitest.config.ts CHANGED
@@ -28,8 +28,7 @@ export default defineConfig({
28
28
  '@nextclaw/agent-chat': path.resolve(__dirname, '../nextclaw-agent-chat/src/index.ts'),
29
29
  '@nextclaw/agent-chat-ui': path.resolve(__dirname, '../nextclaw-agent-chat-ui/src/index.ts'),
30
30
  '@nextclaw/client-sdk': path.resolve(__dirname, '../nextclaw-client-sdk/src/index.ts'),
31
- '@nextclaw/kernel': path.resolve(__dirname, '../nextclaw-kernel/src/index.ts'),
32
- '@kernel': path.resolve(__dirname, '../nextclaw-kernel/src')
31
+ '@nextclaw/shared': path.resolve(__dirname, '../nextclaw-shared/src/index.ts')
33
32
  }
34
33
  },
35
34
  test: {