nextclaw 0.16.13 → 0.16.15
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/cli/index.js +225 -103
- package/package.json +11 -11
- package/ui-dist/assets/{ChannelsList-XGMfinnc.js → ChannelsList-C63gOoYI.js} +3 -3
- package/ui-dist/assets/ChatPage-Ci3Gz0qh.js +37 -0
- package/ui-dist/assets/{DocBrowser-DTRCNsSM.js → DocBrowser-CI4jOzJY.js} +1 -1
- package/ui-dist/assets/{LogoBadge-CPMOwWdA.js → LogoBadge-DImV63-L.js} +1 -1
- package/ui-dist/assets/{MarketplacePage-De2qZ9C0.js → MarketplacePage-B360oSAV.js} +1 -1
- package/ui-dist/assets/{McpMarketplacePage-cjVKSQ2f.js → McpMarketplacePage-KIQgx_7h.js} +2 -2
- package/ui-dist/assets/{ModelConfig-CMn3-VZk.js → ModelConfig-Ben3tQoX.js} +1 -1
- package/ui-dist/assets/{ProvidersList-CArDOswN.js → ProvidersList-DE-S9mq0.js} +1 -1
- package/ui-dist/assets/RemoteAccessPage-DxUia6R-.js +1 -0
- package/ui-dist/assets/RuntimeConfig-CQcGfNZT.js +1 -0
- package/ui-dist/assets/{SearchConfig-a38m8Ynx.js → SearchConfig-DeOa-M6j.js} +1 -1
- package/ui-dist/assets/{SecretsConfig-B6mf4JY9.js → SecretsConfig-Ci8pJmzd.js} +2 -2
- package/ui-dist/assets/{SessionsConfig-B_WQ1lVd.js → SessionsConfig-B6zq55yu.js} +2 -2
- package/ui-dist/assets/chat-session-display--oo5yuIw.js +1 -0
- package/ui-dist/assets/{index-D-wEIgPn.js → index-LhlkB00c.js} +4 -4
- package/ui-dist/assets/{label-usOOP7mv.js → label-3TKt0PoZ.js} +1 -1
- package/ui-dist/assets/{page-layout-CuIf20mx.js → page-layout-CopkIM3Q.js} +1 -1
- package/ui-dist/assets/{popover-CTtTCP5d.js → popover-CUx8uRJw.js} +1 -1
- package/ui-dist/assets/security-config-BL29kTzz.js +1 -0
- package/ui-dist/assets/{skeleton-BNUaFYE7.js → skeleton-Bs4zvcql.js} +1 -1
- package/ui-dist/assets/{status-dot-BeHTBy9k.js → status-dot-D6vJMwD7.js} +1 -1
- package/ui-dist/assets/{switch-CtNnWZpa.js → switch-A3-ClT1P.js} +1 -1
- package/ui-dist/assets/{tabs-custom-Dz_4tV62.js → tabs-custom-BVSd5urq.js} +1 -1
- package/ui-dist/assets/{useConfirmDialog-C_n_JIEq.js → useConfirmDialog-ChPriea6.js} +1 -1
- package/ui-dist/index.html +1 -1
- package/ui-dist/assets/ChatPage-DYTcCRPp.js +0 -37
- package/ui-dist/assets/RemoteAccessPage-C0I4tHey.js +0 -1
- package/ui-dist/assets/RuntimeConfig-B4o6uJq9.js +0 -1
- package/ui-dist/assets/ncp-session-adapter-DSacECph.js +0 -1
- package/ui-dist/assets/security-config-Bxrrv8Ac.js +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -6586,6 +6586,7 @@ function createUiNcpAgentHandle(params) {
|
|
|
6586
6586
|
basePath: "/api/ncp/agent",
|
|
6587
6587
|
agentClientEndpoint: createAgentClientFromServer(params.backend),
|
|
6588
6588
|
streamProvider: params.backend,
|
|
6589
|
+
sessionApi: params.backend,
|
|
6589
6590
|
listSessionTypes: (describeParams) => {
|
|
6590
6591
|
params.refreshPluginRuntimeRegistrations();
|
|
6591
6592
|
return params.runtimeRegistry.listSessionTypes(describeParams);
|
|
@@ -6645,95 +6646,6 @@ async function createUiNcpAgent(params) {
|
|
|
6645
6646
|
});
|
|
6646
6647
|
}
|
|
6647
6648
|
|
|
6648
|
-
// src/cli/commands/ncp/ui-session-service.ts
|
|
6649
|
-
function applyLimit(items, limit) {
|
|
6650
|
-
if (!Number.isFinite(limit) || typeof limit !== "number" || limit <= 0) {
|
|
6651
|
-
return items;
|
|
6652
|
-
}
|
|
6653
|
-
return items.slice(0, Math.trunc(limit));
|
|
6654
|
-
}
|
|
6655
|
-
function now() {
|
|
6656
|
-
return (/* @__PURE__ */ new Date()).toISOString();
|
|
6657
|
-
}
|
|
6658
|
-
function toSessionSummary(params) {
|
|
6659
|
-
return {
|
|
6660
|
-
sessionId: params.sessionId,
|
|
6661
|
-
messageCount: params.messages.length,
|
|
6662
|
-
updatedAt: params.updatedAt,
|
|
6663
|
-
status: "idle",
|
|
6664
|
-
...params.metadata ? { metadata: structuredClone(params.metadata) } : {}
|
|
6665
|
-
};
|
|
6666
|
-
}
|
|
6667
|
-
function buildUpdatedMetadata(params) {
|
|
6668
|
-
if (params.patch.metadata === null) {
|
|
6669
|
-
return {};
|
|
6670
|
-
}
|
|
6671
|
-
if (params.patch.metadata) {
|
|
6672
|
-
return structuredClone(params.patch.metadata);
|
|
6673
|
-
}
|
|
6674
|
-
return structuredClone(params.existingMetadata ?? {});
|
|
6675
|
-
}
|
|
6676
|
-
var UiSessionService = class {
|
|
6677
|
-
sessionStore;
|
|
6678
|
-
constructor(sessionManager, options = {}) {
|
|
6679
|
-
this.sessionStore = new NextclawAgentSessionStore(sessionManager, {
|
|
6680
|
-
onSessionUpdated: options.onSessionUpdated
|
|
6681
|
-
});
|
|
6682
|
-
}
|
|
6683
|
-
async listSessions(options) {
|
|
6684
|
-
const sessions = await this.sessionStore.listSessions();
|
|
6685
|
-
return applyLimit(
|
|
6686
|
-
sessions.map(
|
|
6687
|
-
(session) => toSessionSummary({
|
|
6688
|
-
sessionId: session.sessionId,
|
|
6689
|
-
messages: session.messages,
|
|
6690
|
-
updatedAt: session.updatedAt,
|
|
6691
|
-
metadata: session.metadata
|
|
6692
|
-
})
|
|
6693
|
-
),
|
|
6694
|
-
options?.limit
|
|
6695
|
-
);
|
|
6696
|
-
}
|
|
6697
|
-
async listSessionMessages(sessionId, options) {
|
|
6698
|
-
const session = await this.sessionStore.getSession(sessionId);
|
|
6699
|
-
if (!session) {
|
|
6700
|
-
return [];
|
|
6701
|
-
}
|
|
6702
|
-
return applyLimit(session.messages.map((message) => structuredClone(message)), options?.limit);
|
|
6703
|
-
}
|
|
6704
|
-
async getSession(sessionId) {
|
|
6705
|
-
const session = await this.sessionStore.getSession(sessionId);
|
|
6706
|
-
if (!session) {
|
|
6707
|
-
return null;
|
|
6708
|
-
}
|
|
6709
|
-
return toSessionSummary({
|
|
6710
|
-
sessionId,
|
|
6711
|
-
messages: session.messages,
|
|
6712
|
-
updatedAt: session.updatedAt,
|
|
6713
|
-
metadata: session.metadata
|
|
6714
|
-
});
|
|
6715
|
-
}
|
|
6716
|
-
async updateSession(sessionId, patch) {
|
|
6717
|
-
const session = await this.sessionStore.getSession(sessionId);
|
|
6718
|
-
if (!session) {
|
|
6719
|
-
return null;
|
|
6720
|
-
}
|
|
6721
|
-
await this.sessionStore.saveSession({
|
|
6722
|
-
sessionId,
|
|
6723
|
-
messages: session.messages.map((message) => structuredClone(message)),
|
|
6724
|
-
updatedAt: now(),
|
|
6725
|
-
metadata: buildUpdatedMetadata({
|
|
6726
|
-
existingMetadata: session.metadata,
|
|
6727
|
-
patch
|
|
6728
|
-
})
|
|
6729
|
-
});
|
|
6730
|
-
return await this.getSession(sessionId);
|
|
6731
|
-
}
|
|
6732
|
-
async deleteSession(sessionId) {
|
|
6733
|
-
await this.sessionStore.deleteSession(sessionId);
|
|
6734
|
-
}
|
|
6735
|
-
};
|
|
6736
|
-
|
|
6737
6649
|
// src/cli/commands/service-gateway-context.ts
|
|
6738
6650
|
import * as NextclawCore from "@nextclaw/core";
|
|
6739
6651
|
import { getPluginChannelBindings as getPluginChannelBindings3, resolvePluginChannelMessageToolHints } from "@nextclaw/openclaw-compat";
|
|
@@ -7749,6 +7661,11 @@ var {
|
|
|
7749
7661
|
saveConfig: saveConfig9,
|
|
7750
7662
|
SessionManager
|
|
7751
7663
|
} = NextclawCore;
|
|
7664
|
+
function applyGatewayCapabilityState(gateway, next) {
|
|
7665
|
+
gateway.pluginRegistry = next.pluginRegistry;
|
|
7666
|
+
gateway.pluginChannelBindings = next.pluginChannelBindings;
|
|
7667
|
+
gateway.extensionRegistry = next.extensionRegistry;
|
|
7668
|
+
}
|
|
7752
7669
|
function createGatewayShellContext(params) {
|
|
7753
7670
|
const runtimeConfigPath = getConfigPath9();
|
|
7754
7671
|
const config2 = resolveConfigSecrets2(loadConfig16(), { configPath: runtimeConfigPath });
|
|
@@ -8065,10 +7982,11 @@ async function startDeferredGatewayStartup(params) {
|
|
|
8065
7982
|
gatewayController: params.gatewayController,
|
|
8066
7983
|
getConfig: params.getConfig,
|
|
8067
7984
|
getExtensionRegistry: params.getExtensionRegistry,
|
|
8068
|
-
onSessionUpdated:
|
|
7985
|
+
onSessionUpdated: params.publishSessionChange,
|
|
8069
7986
|
resolveMessageToolHints: ({ channel, accountId }) => params.resolveMessageToolHints({ channel, accountId })
|
|
8070
7987
|
})
|
|
8071
7988
|
);
|
|
7989
|
+
params.deferredNcpSessionService.activate(ncpAgent.sessionApi);
|
|
8072
7990
|
params.onNcpAgentReady(ncpAgent);
|
|
8073
7991
|
params.uiStartup.deferredNcpAgent.activate(ncpAgent);
|
|
8074
7992
|
console.log("\u2713 UI NCP agent: ready");
|
|
@@ -8100,6 +8018,194 @@ async function runGatewayRuntimeLoop(params) {
|
|
|
8100
8018
|
}
|
|
8101
8019
|
}
|
|
8102
8020
|
|
|
8021
|
+
// src/cli/commands/ncp/ncp-session-realtime-change.ts
|
|
8022
|
+
function toNcpSessionRealtimeEvent(change) {
|
|
8023
|
+
if (change.kind === "upsert") {
|
|
8024
|
+
return {
|
|
8025
|
+
type: "session.summary.upsert",
|
|
8026
|
+
payload: {
|
|
8027
|
+
summary: change.summary
|
|
8028
|
+
}
|
|
8029
|
+
};
|
|
8030
|
+
}
|
|
8031
|
+
return {
|
|
8032
|
+
type: "session.summary.delete",
|
|
8033
|
+
payload: {
|
|
8034
|
+
sessionKey: change.sessionKey
|
|
8035
|
+
}
|
|
8036
|
+
};
|
|
8037
|
+
}
|
|
8038
|
+
function createNcpSessionRealtimeChangePublisher(params) {
|
|
8039
|
+
return {
|
|
8040
|
+
publishSessionChange: async (sessionKey) => {
|
|
8041
|
+
const normalizedSessionKey = sessionKey.trim();
|
|
8042
|
+
if (!normalizedSessionKey) {
|
|
8043
|
+
return;
|
|
8044
|
+
}
|
|
8045
|
+
const summary = await params.sessionApi.getSession(normalizedSessionKey);
|
|
8046
|
+
params.publishUiEvent?.(
|
|
8047
|
+
toNcpSessionRealtimeEvent(
|
|
8048
|
+
summary ? {
|
|
8049
|
+
kind: "upsert",
|
|
8050
|
+
summary
|
|
8051
|
+
} : {
|
|
8052
|
+
kind: "delete",
|
|
8053
|
+
sessionKey: normalizedSessionKey
|
|
8054
|
+
}
|
|
8055
|
+
)
|
|
8056
|
+
);
|
|
8057
|
+
}
|
|
8058
|
+
};
|
|
8059
|
+
}
|
|
8060
|
+
|
|
8061
|
+
// src/cli/commands/ncp/ncp-session-summary.ts
|
|
8062
|
+
function createNcpSessionSummary(params) {
|
|
8063
|
+
return {
|
|
8064
|
+
sessionId: params.sessionId,
|
|
8065
|
+
messageCount: params.messages.length,
|
|
8066
|
+
updatedAt: params.updatedAt,
|
|
8067
|
+
status: params.status,
|
|
8068
|
+
...params.metadata ? { metadata: structuredClone(params.metadata) } : {}
|
|
8069
|
+
};
|
|
8070
|
+
}
|
|
8071
|
+
|
|
8072
|
+
// src/cli/commands/ncp/ui-session-service.ts
|
|
8073
|
+
function applyLimit(items, limit) {
|
|
8074
|
+
if (!Number.isFinite(limit) || typeof limit !== "number" || limit <= 0) {
|
|
8075
|
+
return items;
|
|
8076
|
+
}
|
|
8077
|
+
return items.slice(0, Math.trunc(limit));
|
|
8078
|
+
}
|
|
8079
|
+
function now() {
|
|
8080
|
+
return (/* @__PURE__ */ new Date()).toISOString();
|
|
8081
|
+
}
|
|
8082
|
+
function buildUpdatedMetadata(params) {
|
|
8083
|
+
if (params.patch.metadata === null) {
|
|
8084
|
+
return {};
|
|
8085
|
+
}
|
|
8086
|
+
if (params.patch.metadata) {
|
|
8087
|
+
return structuredClone(params.patch.metadata);
|
|
8088
|
+
}
|
|
8089
|
+
return structuredClone(params.existingMetadata ?? {});
|
|
8090
|
+
}
|
|
8091
|
+
var UiSessionService = class {
|
|
8092
|
+
sessionStore;
|
|
8093
|
+
constructor(sessionManager, options = {}) {
|
|
8094
|
+
this.sessionStore = new NextclawAgentSessionStore(sessionManager, {
|
|
8095
|
+
onSessionUpdated: options.onSessionUpdated
|
|
8096
|
+
});
|
|
8097
|
+
}
|
|
8098
|
+
async listSessions(options) {
|
|
8099
|
+
const sessions = await this.sessionStore.listSessions();
|
|
8100
|
+
return applyLimit(
|
|
8101
|
+
sessions.map(
|
|
8102
|
+
(session) => createNcpSessionSummary({
|
|
8103
|
+
sessionId: session.sessionId,
|
|
8104
|
+
messages: session.messages,
|
|
8105
|
+
updatedAt: session.updatedAt,
|
|
8106
|
+
status: "idle",
|
|
8107
|
+
metadata: session.metadata
|
|
8108
|
+
})
|
|
8109
|
+
),
|
|
8110
|
+
options?.limit
|
|
8111
|
+
);
|
|
8112
|
+
}
|
|
8113
|
+
async listSessionMessages(sessionId, options) {
|
|
8114
|
+
const session = await this.sessionStore.getSession(sessionId);
|
|
8115
|
+
if (!session) {
|
|
8116
|
+
return [];
|
|
8117
|
+
}
|
|
8118
|
+
return applyLimit(session.messages.map((message) => structuredClone(message)), options?.limit);
|
|
8119
|
+
}
|
|
8120
|
+
async getSession(sessionId) {
|
|
8121
|
+
const session = await this.sessionStore.getSession(sessionId);
|
|
8122
|
+
if (!session) {
|
|
8123
|
+
return null;
|
|
8124
|
+
}
|
|
8125
|
+
return createNcpSessionSummary({
|
|
8126
|
+
sessionId,
|
|
8127
|
+
messages: session.messages,
|
|
8128
|
+
updatedAt: session.updatedAt,
|
|
8129
|
+
status: "idle",
|
|
8130
|
+
metadata: session.metadata
|
|
8131
|
+
});
|
|
8132
|
+
}
|
|
8133
|
+
async updateSession(sessionId, patch) {
|
|
8134
|
+
const session = await this.sessionStore.getSession(sessionId);
|
|
8135
|
+
if (!session) {
|
|
8136
|
+
return null;
|
|
8137
|
+
}
|
|
8138
|
+
await this.sessionStore.saveSession({
|
|
8139
|
+
sessionId,
|
|
8140
|
+
messages: session.messages.map((message) => structuredClone(message)),
|
|
8141
|
+
updatedAt: now(),
|
|
8142
|
+
metadata: buildUpdatedMetadata({
|
|
8143
|
+
existingMetadata: session.metadata,
|
|
8144
|
+
patch
|
|
8145
|
+
})
|
|
8146
|
+
});
|
|
8147
|
+
return await this.getSession(sessionId);
|
|
8148
|
+
}
|
|
8149
|
+
async deleteSession(sessionId) {
|
|
8150
|
+
await this.sessionStore.deleteSession(sessionId);
|
|
8151
|
+
}
|
|
8152
|
+
};
|
|
8153
|
+
|
|
8154
|
+
// src/cli/commands/service-deferred-ncp-session-service.ts
|
|
8155
|
+
function createDeferredUiNcpSessionService(fallbackService) {
|
|
8156
|
+
let activeService = null;
|
|
8157
|
+
const resolveService = () => activeService ?? fallbackService;
|
|
8158
|
+
const service = {
|
|
8159
|
+
listSessions: (options) => resolveService().listSessions(options),
|
|
8160
|
+
listSessionMessages: (sessionId, options) => resolveService().listSessionMessages(sessionId, options),
|
|
8161
|
+
getSession: (sessionId) => resolveService().getSession(sessionId),
|
|
8162
|
+
updateSession: (sessionId, patch) => resolveService().updateSession(sessionId, patch),
|
|
8163
|
+
deleteSession: (sessionId) => resolveService().deleteSession(sessionId)
|
|
8164
|
+
};
|
|
8165
|
+
return {
|
|
8166
|
+
service,
|
|
8167
|
+
activate(nextService) {
|
|
8168
|
+
activeService = nextService;
|
|
8169
|
+
},
|
|
8170
|
+
clear() {
|
|
8171
|
+
activeService = null;
|
|
8172
|
+
},
|
|
8173
|
+
isReady() {
|
|
8174
|
+
return activeService !== null;
|
|
8175
|
+
}
|
|
8176
|
+
};
|
|
8177
|
+
}
|
|
8178
|
+
|
|
8179
|
+
// src/cli/commands/service-ncp-session-realtime-bridge.ts
|
|
8180
|
+
function createServiceNcpSessionRealtimeBridge(params) {
|
|
8181
|
+
let publishUiEvent = params.publishUiEvent;
|
|
8182
|
+
let publishSessionChange = async (_sessionKey) => {
|
|
8183
|
+
};
|
|
8184
|
+
const persistedSessionService = new UiSessionService(params.sessionManager, {
|
|
8185
|
+
onSessionUpdated: (sessionKey) => {
|
|
8186
|
+
void publishSessionChange(sessionKey);
|
|
8187
|
+
}
|
|
8188
|
+
});
|
|
8189
|
+
const deferredSessionService = createDeferredUiNcpSessionService(persistedSessionService);
|
|
8190
|
+
publishSessionChange = async (sessionKey) => {
|
|
8191
|
+
await createNcpSessionRealtimeChangePublisher({
|
|
8192
|
+
sessionApi: deferredSessionService.service,
|
|
8193
|
+
publishUiEvent
|
|
8194
|
+
}).publishSessionChange(sessionKey);
|
|
8195
|
+
};
|
|
8196
|
+
return {
|
|
8197
|
+
sessionService: deferredSessionService.service,
|
|
8198
|
+
deferredSessionService,
|
|
8199
|
+
publishSessionChange,
|
|
8200
|
+
setUiEventPublisher(nextPublishUiEvent) {
|
|
8201
|
+
publishUiEvent = nextPublishUiEvent;
|
|
8202
|
+
},
|
|
8203
|
+
clear() {
|
|
8204
|
+
deferredSessionService.clear();
|
|
8205
|
+
}
|
|
8206
|
+
};
|
|
8207
|
+
}
|
|
8208
|
+
|
|
8103
8209
|
// src/cli/commands/plugin-registry-loader.ts
|
|
8104
8210
|
import {
|
|
8105
8211
|
discoverPluginStatusReport,
|
|
@@ -8394,6 +8500,11 @@ async function hydrateServiceCapabilities(params) {
|
|
|
8394
8500
|
currentExtensionChannels: params.state.extensionRegistry.channels,
|
|
8395
8501
|
nextExtensionChannels: nextExtensionRegistry.channels
|
|
8396
8502
|
});
|
|
8503
|
+
applyGatewayCapabilityState(params.gateway, {
|
|
8504
|
+
pluginRegistry: nextPluginRegistry,
|
|
8505
|
+
extensionRegistry: nextExtensionRegistry,
|
|
8506
|
+
pluginChannelBindings: nextPluginChannelBindings
|
|
8507
|
+
});
|
|
8397
8508
|
params.state.pluginRegistry = nextPluginRegistry;
|
|
8398
8509
|
params.state.extensionRegistry = nextExtensionRegistry;
|
|
8399
8510
|
params.state.pluginChannelBindings = nextPluginChannelBindings;
|
|
@@ -8591,6 +8702,12 @@ function createGatewayRuntimeState(gateway) {
|
|
|
8591
8702
|
pluginGatewayHandles: []
|
|
8592
8703
|
};
|
|
8593
8704
|
}
|
|
8705
|
+
function applyGatewayRuntimeCapabilityState(params) {
|
|
8706
|
+
applyGatewayCapabilityState(params.gateway, params.next);
|
|
8707
|
+
params.state.pluginRegistry = params.next.pluginRegistry;
|
|
8708
|
+
params.state.extensionRegistry = params.next.extensionRegistry;
|
|
8709
|
+
params.state.pluginChannelBindings = params.next.pluginChannelBindings;
|
|
8710
|
+
}
|
|
8594
8711
|
function configureGatewayPluginRuntime(params) {
|
|
8595
8712
|
params.gateway.reloader.setApplyAgentRuntimeConfig((nextConfig) => params.gateway.runtimePool.applyRuntimeConfig(nextConfig));
|
|
8596
8713
|
params.gateway.reloader.setReloadPlugins(async ({ config: nextConfig, changedPaths }) => {
|
|
@@ -8604,9 +8721,15 @@ function configureGatewayPluginRuntime(params) {
|
|
|
8604
8721
|
pluginGatewayLogger,
|
|
8605
8722
|
logPluginGatewayDiagnostics
|
|
8606
8723
|
});
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8724
|
+
applyGatewayRuntimeCapabilityState({
|
|
8725
|
+
gateway: params.gateway,
|
|
8726
|
+
state: params.state,
|
|
8727
|
+
next: {
|
|
8728
|
+
pluginRegistry: result.pluginRegistry,
|
|
8729
|
+
extensionRegistry: result.extensionRegistry,
|
|
8730
|
+
pluginChannelBindings: result.pluginChannelBindings
|
|
8731
|
+
}
|
|
8732
|
+
});
|
|
8610
8733
|
params.state.pluginUiMetadata = getPluginUiMetadataFromRegistry2(result.pluginRegistry);
|
|
8611
8734
|
params.state.pluginGatewayHandles = result.pluginGatewayHandles;
|
|
8612
8735
|
params.gateway.runtimePool.applyExtensionRegistry(result.extensionRegistry);
|
|
@@ -8705,7 +8828,7 @@ var ServiceCommands = class {
|
|
|
8705
8828
|
};
|
|
8706
8829
|
let runtimeState = null;
|
|
8707
8830
|
const bootstrapStatus = createBootstrapStatus(shellContext.config.remote.enabled);
|
|
8708
|
-
const
|
|
8831
|
+
const ncpSessionRealtimeBridge = createServiceNcpSessionRealtimeBridge({ sessionManager: shellContext.sessionManager });
|
|
8709
8832
|
const marketplaceInstaller = new ServiceMarketplaceInstaller({ applyLiveConfigReload, runCliSubcommand: (args) => this.runCliSubcommand(args), installBuiltinSkill: (slug, force) => this.installBuiltinMarketplaceSkill(slug, force) }).createInstaller();
|
|
8710
8833
|
const remoteAccess = createRemoteAccessHost({ serviceCommands: this, requestRestart: this.deps.requestRestart, uiConfig: shellContext.uiConfig, remoteModule: shellContext.remoteModule });
|
|
8711
8834
|
const uiStartup = await measureStartupAsync(
|
|
@@ -8724,9 +8847,10 @@ var ServiceCommands = class {
|
|
|
8724
8847
|
getBootstrapStatus: () => bootstrapStatus.getStatus(),
|
|
8725
8848
|
openBrowserWindow: shellContext.uiConfig.open,
|
|
8726
8849
|
applyLiveConfigReload,
|
|
8727
|
-
ncpSessionService
|
|
8850
|
+
ncpSessionService: ncpSessionRealtimeBridge.sessionService
|
|
8728
8851
|
})
|
|
8729
8852
|
);
|
|
8853
|
+
ncpSessionRealtimeBridge.setUiEventPublisher(uiStartup?.publish);
|
|
8730
8854
|
bootstrapStatus.markShellReady();
|
|
8731
8855
|
await waitForNextTick();
|
|
8732
8856
|
const gateway = measureStartupSync(
|
|
@@ -8748,10 +8872,7 @@ var ServiceCommands = class {
|
|
|
8748
8872
|
uiStartup?.publish({ type: "config.updated", payload: { path: "channels" } });
|
|
8749
8873
|
uiStartup?.publish({ type: "config.updated", payload: { path: "plugins" } });
|
|
8750
8874
|
configureGatewayPluginRuntime({ gateway, state: gatewayRuntimeState, getLiveUiNcpAgent: () => this.liveUiNcpAgent });
|
|
8751
|
-
wireSystemSessionUpdatedPublisher({
|
|
8752
|
-
runtimePool: gateway.runtimePool,
|
|
8753
|
-
publishUiEvent: uiStartup?.publish
|
|
8754
|
-
});
|
|
8875
|
+
wireSystemSessionUpdatedPublisher({ runtimePool: gateway.runtimePool, publishUiEvent: uiStartup?.publish });
|
|
8755
8876
|
console.log("\u2713 Capability hydration: scheduled in background");
|
|
8756
8877
|
await measureStartupAsync(
|
|
8757
8878
|
"service.start_gateway_support_services",
|
|
@@ -8772,15 +8893,14 @@ var ServiceCommands = class {
|
|
|
8772
8893
|
setLiveUiNcpAgent: (ncpAgent) => {
|
|
8773
8894
|
this.liveUiNcpAgent = ncpAgent;
|
|
8774
8895
|
},
|
|
8775
|
-
wakeFromRestartSentinel: async () => {
|
|
8776
|
-
await this.wakeFromRestartSentinel({ bus: gateway.bus, sessionManager: gateway.sessionManager });
|
|
8777
|
-
}
|
|
8896
|
+
wakeFromRestartSentinel: async () => await this.wakeFromRestartSentinel({ bus: gateway.bus, sessionManager: gateway.sessionManager })
|
|
8778
8897
|
});
|
|
8779
8898
|
logStartupTrace("service.start_gateway.runtime_loop_begin");
|
|
8780
8899
|
await runGatewayRuntimeLoop({
|
|
8781
8900
|
runtimePool: gateway.runtimePool,
|
|
8782
8901
|
startDeferredStartup: () => startDeferredGatewayStartup({
|
|
8783
8902
|
uiStartup,
|
|
8903
|
+
deferredNcpSessionService: ncpSessionRealtimeBridge.deferredSessionService,
|
|
8784
8904
|
bus: gateway.bus,
|
|
8785
8905
|
sessionManager: gateway.sessionManager,
|
|
8786
8906
|
providerManager: gateway.providerManager,
|
|
@@ -8798,7 +8918,8 @@ var ServiceCommands = class {
|
|
|
8798
8918
|
startPluginGateways: deferredGatewayStartupHooks.startPluginGateways,
|
|
8799
8919
|
startChannels: deferredGatewayStartupHooks.startChannels,
|
|
8800
8920
|
wakeFromRestartSentinel: deferredGatewayStartupHooks.wakeFromRestartSentinel,
|
|
8801
|
-
onNcpAgentReady: deferredGatewayStartupHooks.onNcpAgentReady
|
|
8921
|
+
onNcpAgentReady: deferredGatewayStartupHooks.onNcpAgentReady,
|
|
8922
|
+
publishSessionChange: ncpSessionRealtimeBridge.publishSessionChange
|
|
8802
8923
|
}),
|
|
8803
8924
|
onDeferredStartupError: (error) => {
|
|
8804
8925
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -8811,6 +8932,7 @@ var ServiceCommands = class {
|
|
|
8811
8932
|
cleanup: async () => {
|
|
8812
8933
|
this.applyLiveConfigReload = null;
|
|
8813
8934
|
this.liveUiNcpAgent = null;
|
|
8935
|
+
ncpSessionRealtimeBridge.clear();
|
|
8814
8936
|
await uiStartup?.deferredNcpAgent.close();
|
|
8815
8937
|
await gateway.remoteModule?.stop();
|
|
8816
8938
|
await stopPluginChannelGateways2(runtimeState?.pluginGatewayHandles ?? []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextclaw",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.15",
|
|
4
4
|
"description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"chokidar": "^3.6.0",
|
|
40
40
|
"commander": "^12.1.0",
|
|
41
41
|
"yaml": "^2.8.1",
|
|
42
|
-
"@nextclaw/core": "0.11.
|
|
43
|
-
"@nextclaw/
|
|
44
|
-
"@nextclaw/
|
|
42
|
+
"@nextclaw/core": "0.11.6",
|
|
43
|
+
"@nextclaw/ncp-toolkit": "0.4.6",
|
|
44
|
+
"@nextclaw/mcp": "0.1.53",
|
|
45
|
+
"@nextclaw/remote": "0.1.61",
|
|
45
46
|
"@nextclaw/ncp-agent-runtime": "0.3.0",
|
|
46
|
-
"@nextclaw/ncp-
|
|
47
|
-
"@nextclaw/
|
|
48
|
-
"@nextclaw/
|
|
49
|
-
"@nextclaw/
|
|
50
|
-
"@nextclaw/
|
|
51
|
-
"@nextclaw/openclaw-compat": "0.3.42"
|
|
47
|
+
"@nextclaw/ncp-mcp": "0.1.53",
|
|
48
|
+
"@nextclaw/server": "0.11.9",
|
|
49
|
+
"@nextclaw/openclaw-compat": "0.3.43",
|
|
50
|
+
"@nextclaw/ncp": "0.4.0",
|
|
51
|
+
"@nextclaw/runtime": "0.2.20"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^20.17.6",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tsx": "^4.19.2",
|
|
58
58
|
"typescript": "^5.6.3",
|
|
59
59
|
"vitest": "^2.1.2",
|
|
60
|
-
"@nextclaw/ui": "0.11.
|
|
60
|
+
"@nextclaw/ui": "0.11.10"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"dev": "tsx watch --tsconfig tsconfig.json src/cli/index.ts",
|