@nextclaw/server 0.12.5 → 0.12.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 +41 -1
- package/dist/index.js +93 -31
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -349,6 +349,37 @@ declare class UiAuthService {
|
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
//#endregion
|
|
352
|
+
//#region src/ui/runtime-control.types.d.ts
|
|
353
|
+
type RuntimeControlEnvironment = "desktop-embedded" | "managed-local-service" | "self-hosted-web" | "shared-web";
|
|
354
|
+
type RuntimeLifecycleState = "healthy" | "starting-service" | "restarting-service" | "stopping-service" | "restarting-app" | "recovering" | "unavailable" | "failed";
|
|
355
|
+
type RuntimeActionImpact = "none" | "brief-ui-disconnect" | "full-app-relaunch";
|
|
356
|
+
type RuntimeActionCapability = {
|
|
357
|
+
available: boolean;
|
|
358
|
+
requiresConfirmation: boolean;
|
|
359
|
+
impact: RuntimeActionImpact;
|
|
360
|
+
reasonIfUnavailable?: string;
|
|
361
|
+
};
|
|
362
|
+
type RuntimeServiceState = "running" | "stopped" | "starting" | "stopping" | "restarting" | "unknown";
|
|
363
|
+
type RuntimeControlView = {
|
|
364
|
+
environment: RuntimeControlEnvironment;
|
|
365
|
+
lifecycle: RuntimeLifecycleState;
|
|
366
|
+
serviceState: RuntimeServiceState;
|
|
367
|
+
canStartService: RuntimeActionCapability;
|
|
368
|
+
canRestartService: RuntimeActionCapability;
|
|
369
|
+
canStopService: RuntimeActionCapability;
|
|
370
|
+
canRestartApp: RuntimeActionCapability;
|
|
371
|
+
ownerLabel?: string;
|
|
372
|
+
managementHint?: string;
|
|
373
|
+
message?: string;
|
|
374
|
+
};
|
|
375
|
+
type RuntimeControlAction = "start-service" | "restart-service" | "stop-service" | "restart-app";
|
|
376
|
+
type RuntimeControlActionResult = {
|
|
377
|
+
accepted: boolean;
|
|
378
|
+
action: RuntimeControlAction;
|
|
379
|
+
lifecycle: RuntimeLifecycleState;
|
|
380
|
+
message: string;
|
|
381
|
+
};
|
|
382
|
+
//#endregion
|
|
352
383
|
//#region src/ui/ui-routes/types.d.ts
|
|
353
384
|
type UiRouterOptions = {
|
|
354
385
|
configPath: string;
|
|
@@ -362,6 +393,7 @@ type UiRouterOptions = {
|
|
|
362
393
|
ncpSessionService?: UiNcpSessionService;
|
|
363
394
|
authService?: UiAuthService;
|
|
364
395
|
remoteAccess?: UiRemoteAccessHost;
|
|
396
|
+
runtimeControl?: UiRuntimeControlHost;
|
|
365
397
|
getBootstrapStatus?: () => BootstrapStatusView;
|
|
366
398
|
getPluginChannelBindings?: () => PluginChannelBinding[];
|
|
367
399
|
getPluginUiMetadata?: () => PluginUiMetadata[];
|
|
@@ -377,6 +409,12 @@ type UiRemoteAccessHost = {
|
|
|
377
409
|
runDoctor: () => Promise<RemoteDoctorView>;
|
|
378
410
|
controlService: (action: RemoteServiceAction) => Promise<RemoteServiceActionResult>;
|
|
379
411
|
};
|
|
412
|
+
type UiRuntimeControlHost = {
|
|
413
|
+
getControl: () => Promise<RuntimeControlView> | RuntimeControlView;
|
|
414
|
+
startService: () => Promise<RuntimeControlActionResult> | RuntimeControlActionResult;
|
|
415
|
+
restartService: () => Promise<RuntimeControlActionResult> | RuntimeControlActionResult;
|
|
416
|
+
stopService: () => Promise<RuntimeControlActionResult> | RuntimeControlActionResult;
|
|
417
|
+
};
|
|
380
418
|
//#endregion
|
|
381
419
|
//#region src/ui/chat-session-type.types.d.ts
|
|
382
420
|
type ChatSessionTypeCtaView = {
|
|
@@ -808,6 +846,7 @@ type SessionPatchUpdate = {
|
|
|
808
846
|
preferredThinking?: ThinkingLevel | null;
|
|
809
847
|
sessionType?: string | null;
|
|
810
848
|
projectRoot?: string | null;
|
|
849
|
+
uiReadAt?: string | null;
|
|
811
850
|
clearHistory?: boolean;
|
|
812
851
|
};
|
|
813
852
|
type SessionSkillEntryView = {
|
|
@@ -1208,6 +1247,7 @@ type UiServerOptions = {
|
|
|
1208
1247
|
ncpAgent?: UiNcpAgent;
|
|
1209
1248
|
ncpSessionService?: UiNcpSessionService;
|
|
1210
1249
|
remoteAccess?: UiRemoteAccessHost;
|
|
1250
|
+
runtimeControl?: UiRuntimeControlHost;
|
|
1211
1251
|
getBootstrapStatus?: () => BootstrapStatusView;
|
|
1212
1252
|
getPluginChannelBindings?: () => PluginChannelBinding[];
|
|
1213
1253
|
getPluginUiMetadata?: () => PluginUiMetadata[];
|
|
@@ -1287,4 +1327,4 @@ declare function getUiBridgeSecretPath(): string;
|
|
|
1287
1327
|
declare function readUiBridgeSecret(): string | null;
|
|
1288
1328
|
declare function ensureUiBridgeSecret(): string;
|
|
1289
1329
|
//#endregion
|
|
1290
|
-
export { AgentBindingView, AgentCreateRequest, AgentDeleteResult, AgentProfileView, AgentUpdateRequest, ApiError, ApiResponse, AppMetaView, AuthEnabledUpdateRequest, AuthLoginRequest, AuthPasswordUpdateRequest, AuthSetupRequest, AuthStatusView, BindingPeerView, BochaFreshnessValue, BootstrapPhase, BootstrapRemoteState, BootstrapStageState, BootstrapStatusView, ChannelAuthPollRequest, ChannelAuthPollResult, ChannelAuthStartRequest, ChannelAuthStartResult, ChannelSpecView, type ChatSessionTypeCtaView, type ChatSessionTypeOptionView, type ChatSessionTypesView, ConfigActionExecuteRequest, ConfigActionExecuteResult, ConfigActionManifest, ConfigActionType, ConfigMetaView, ConfigSchemaResponse, ConfigUiHint, ConfigUiHints, ConfigView, CronActionResult, CronCreateRequest, CronCreateResult, CronEnableRequest, CronJobStateView, CronJobView, CronListView, CronPayloadView, CronRunRequest, CronScheduleView, DEFAULT_SESSION_TYPE, MarketplaceApiConfig, MarketplaceInstallKind, MarketplaceInstallSkillParams, MarketplaceInstallSpec, MarketplaceInstalledRecord, MarketplaceInstalledView, MarketplaceInstaller, MarketplaceItemSummary, MarketplaceItemType, MarketplaceItemView, MarketplaceListView, MarketplaceLocalizedTextMap, MarketplaceMcpContentView, MarketplaceMcpDoctorResult, MarketplaceMcpInstallKind, MarketplaceMcpInstallRequest, MarketplaceMcpInstallResult, MarketplaceMcpInstallSpec, MarketplaceMcpManageAction, MarketplaceMcpManageRequest, MarketplaceMcpManageResult, MarketplaceMcpTemplateInput, MarketplacePluginContentView, MarketplacePluginInstallKind, MarketplacePluginInstallRequest, MarketplacePluginInstallResult, MarketplacePluginManageAction, MarketplacePluginManageRequest, MarketplacePluginManageResult, MarketplaceRecommendationView, MarketplaceSkillContentView, MarketplaceSkillInstallKind, MarketplaceSkillInstallRequest, MarketplaceSkillInstallResult, MarketplaceSkillManageAction, MarketplaceSkillManageRequest, MarketplaceSkillManageResult, MarketplaceSort, NcpSessionSkillsView, ProviderAuthImportResult, ProviderAuthPollRequest, ProviderAuthPollResult, ProviderAuthStartRequest, ProviderAuthStartResult, ProviderConfigUpdate, ProviderConfigView, ProviderConnectionTestRequest, ProviderConnectionTestResult, ProviderCreateRequest, ProviderCreateResult, ProviderDeleteResult, ProviderSpecView, RemoteAccessView, RemoteAccountProfileUpdateRequest, RemoteAccountView, RemoteBrowserAuthPollRequest, RemoteBrowserAuthPollResult, RemoteBrowserAuthStartRequest, RemoteBrowserAuthStartResult, RemoteDoctorCheckView, RemoteDoctorView, RemoteLoginRequest, RemoteRuntimeView, RemoteServiceAction, RemoteServiceActionResult, RemoteServiceView, RemoteSettingsUpdateRequest, RemoteSettingsView, RuntimeConfigUpdate, SearchConfigUpdate, SearchConfigView, SearchProviderConfigView, SearchProviderName, SearchProviderSpecView, SecretProviderEnvView, SecretProviderExecView, SecretProviderFileView, SecretProviderView, SecretRefView, SecretSourceView, SecretsConfigUpdate, SecretsView, ServerPathBreadcrumbView, ServerPathBrowseView, ServerPathEntryView, SessionConfigView, SessionEntryView, SessionEventView, SessionHistoryView, SessionMessageView, SessionPatchUpdate, SessionPatchValidationError, SessionSkillEntryView, SessionTypeDescribeParams, SessionsListView, TavilySearchDepthValue, UiNcpAgent, UiNcpAssetPutView, UiNcpAssetView, UiNcpSessionListView, UiNcpSessionMessagesView, UiNcpSessionService, UiNcpStoredAssetRecord, type UiRemoteAccessHost, UiServerEvent, UiServerHandle, UiServerOptions, buildConfigMeta, buildConfigSchemaView, buildConfigView, createCustomProvider, createUiRouter, deleteCustomProvider, deleteSession, ensureUiBridgeSecret, executeConfigAction, getSessionHistory, getUiBridgeSecretPath, listSessions, loadConfigOrDefault, patchSession, readUiBridgeSecret, startUiServer, testProviderConnection, updateChannel, updateModel, updateProvider, updateRuntime, updateSearch, updateSecrets };
|
|
1330
|
+
export { AgentBindingView, AgentCreateRequest, AgentDeleteResult, AgentProfileView, AgentUpdateRequest, ApiError, ApiResponse, AppMetaView, AuthEnabledUpdateRequest, AuthLoginRequest, AuthPasswordUpdateRequest, AuthSetupRequest, AuthStatusView, BindingPeerView, BochaFreshnessValue, BootstrapPhase, BootstrapRemoteState, BootstrapStageState, BootstrapStatusView, ChannelAuthPollRequest, ChannelAuthPollResult, ChannelAuthStartRequest, ChannelAuthStartResult, ChannelSpecView, type ChatSessionTypeCtaView, type ChatSessionTypeOptionView, type ChatSessionTypesView, ConfigActionExecuteRequest, ConfigActionExecuteResult, ConfigActionManifest, ConfigActionType, ConfigMetaView, ConfigSchemaResponse, ConfigUiHint, ConfigUiHints, ConfigView, CronActionResult, CronCreateRequest, CronCreateResult, CronEnableRequest, CronJobStateView, CronJobView, CronListView, CronPayloadView, CronRunRequest, CronScheduleView, DEFAULT_SESSION_TYPE, MarketplaceApiConfig, MarketplaceInstallKind, MarketplaceInstallSkillParams, MarketplaceInstallSpec, MarketplaceInstalledRecord, MarketplaceInstalledView, MarketplaceInstaller, MarketplaceItemSummary, MarketplaceItemType, MarketplaceItemView, MarketplaceListView, MarketplaceLocalizedTextMap, MarketplaceMcpContentView, MarketplaceMcpDoctorResult, MarketplaceMcpInstallKind, MarketplaceMcpInstallRequest, MarketplaceMcpInstallResult, MarketplaceMcpInstallSpec, MarketplaceMcpManageAction, MarketplaceMcpManageRequest, MarketplaceMcpManageResult, MarketplaceMcpTemplateInput, MarketplacePluginContentView, MarketplacePluginInstallKind, MarketplacePluginInstallRequest, MarketplacePluginInstallResult, MarketplacePluginManageAction, MarketplacePluginManageRequest, MarketplacePluginManageResult, MarketplaceRecommendationView, MarketplaceSkillContentView, MarketplaceSkillInstallKind, MarketplaceSkillInstallRequest, MarketplaceSkillInstallResult, MarketplaceSkillManageAction, MarketplaceSkillManageRequest, MarketplaceSkillManageResult, MarketplaceSort, NcpSessionSkillsView, ProviderAuthImportResult, ProviderAuthPollRequest, ProviderAuthPollResult, ProviderAuthStartRequest, ProviderAuthStartResult, ProviderConfigUpdate, ProviderConfigView, ProviderConnectionTestRequest, ProviderConnectionTestResult, ProviderCreateRequest, ProviderCreateResult, ProviderDeleteResult, ProviderSpecView, RemoteAccessView, RemoteAccountProfileUpdateRequest, RemoteAccountView, RemoteBrowserAuthPollRequest, RemoteBrowserAuthPollResult, RemoteBrowserAuthStartRequest, RemoteBrowserAuthStartResult, RemoteDoctorCheckView, RemoteDoctorView, RemoteLoginRequest, RemoteRuntimeView, RemoteServiceAction, RemoteServiceActionResult, RemoteServiceView, RemoteSettingsUpdateRequest, RemoteSettingsView, RuntimeActionCapability, RuntimeActionImpact, RuntimeConfigUpdate, RuntimeControlAction, RuntimeControlActionResult, RuntimeControlEnvironment, RuntimeControlView, RuntimeLifecycleState, RuntimeServiceState, SearchConfigUpdate, SearchConfigView, SearchProviderConfigView, SearchProviderName, SearchProviderSpecView, SecretProviderEnvView, SecretProviderExecView, SecretProviderFileView, SecretProviderView, SecretRefView, SecretSourceView, SecretsConfigUpdate, SecretsView, ServerPathBreadcrumbView, ServerPathBrowseView, ServerPathEntryView, SessionConfigView, SessionEntryView, SessionEventView, SessionHistoryView, SessionMessageView, SessionPatchUpdate, SessionPatchValidationError, SessionSkillEntryView, SessionTypeDescribeParams, SessionsListView, TavilySearchDepthValue, UiNcpAgent, UiNcpAssetPutView, UiNcpAssetView, UiNcpSessionListView, UiNcpSessionMessagesView, UiNcpSessionService, UiNcpStoredAssetRecord, type UiRemoteAccessHost, type UiRuntimeControlHost, UiServerEvent, UiServerHandle, UiServerOptions, buildConfigMeta, buildConfigSchemaView, buildConfigView, createCustomProvider, createUiRouter, deleteCustomProvider, deleteSession, ensureUiBridgeSecret, executeConfigAction, getSessionHistory, getUiBridgeSecretPath, listSessions, loadConfigOrDefault, patchSession, readUiBridgeSecret, startUiServer, testProviderConnection, updateChannel, updateModel, updateProvider, updateRuntime, updateSearch, updateSecrets };
|
package/dist/index.js
CHANGED
|
@@ -2988,6 +2988,16 @@ function applySessionTypePatch(metadata, patch) {
|
|
|
2988
2988
|
delete metadata.session_type;
|
|
2989
2989
|
delete metadata.sessionType;
|
|
2990
2990
|
}
|
|
2991
|
+
function applyUiReadAtPatch(metadata, patch) {
|
|
2992
|
+
if (!Object.prototype.hasOwnProperty.call(patch, "uiReadAt")) return metadata;
|
|
2993
|
+
const uiReadAt = typeof patch.uiReadAt === "string" ? patch.uiReadAt.trim() : "";
|
|
2994
|
+
if (uiReadAt) return {
|
|
2995
|
+
...metadata,
|
|
2996
|
+
ui_last_read_at: uiReadAt
|
|
2997
|
+
};
|
|
2998
|
+
const { ui_last_read_at: _removed, ...nextMetadata } = metadata;
|
|
2999
|
+
return nextMetadata;
|
|
3000
|
+
}
|
|
2991
3001
|
async function applyProjectRootPatch(metadata, patch) {
|
|
2992
3002
|
if (!Object.prototype.hasOwnProperty.call(patch, "projectRoot")) return;
|
|
2993
3003
|
const projectRoot = await normalizeSessionProjectRoot(patch.projectRoot);
|
|
@@ -3000,14 +3010,16 @@ async function applyProjectRootPatch(metadata, patch) {
|
|
|
3000
3010
|
delete metadata.projectRoot;
|
|
3001
3011
|
}
|
|
3002
3012
|
async function buildPatchedSessionMetadata(params) {
|
|
3013
|
+
const { metadata, patch } = params;
|
|
3003
3014
|
const nextMetadata = applySessionPreferencePatch({
|
|
3004
|
-
metadata: structuredClone(
|
|
3005
|
-
patch
|
|
3015
|
+
metadata: structuredClone(metadata),
|
|
3016
|
+
patch,
|
|
3006
3017
|
createInvalidThinkingError: () => /* @__PURE__ */ new Error("PREFERRED_THINKING_INVALID")
|
|
3007
3018
|
});
|
|
3008
|
-
applySessionTypePatch(nextMetadata,
|
|
3009
|
-
|
|
3010
|
-
|
|
3019
|
+
applySessionTypePatch(nextMetadata, patch);
|
|
3020
|
+
const nextMetadataWithReadAt = applyUiReadAtPatch(nextMetadata, patch);
|
|
3021
|
+
await applyProjectRootPatch(nextMetadataWithReadAt, patch);
|
|
3022
|
+
return nextMetadataWithReadAt;
|
|
3011
3023
|
}
|
|
3012
3024
|
var NcpSessionRoutesController = class {
|
|
3013
3025
|
sessionSkillsViewBuilder;
|
|
@@ -4343,6 +4355,41 @@ var RemoteRoutesController = class {
|
|
|
4343
4355
|
};
|
|
4344
4356
|
};
|
|
4345
4357
|
//#endregion
|
|
4358
|
+
//#region src/ui/ui-routes/runtime-control.controller.ts
|
|
4359
|
+
var RuntimeControlRoutesController = class {
|
|
4360
|
+
constructor(host) {
|
|
4361
|
+
this.host = host;
|
|
4362
|
+
}
|
|
4363
|
+
getControl = async (c) => {
|
|
4364
|
+
try {
|
|
4365
|
+
return c.json(ok(await this.host.getControl()));
|
|
4366
|
+
} catch (error) {
|
|
4367
|
+
return c.json(err("RUNTIME_CONTROL_FAILED", formatUserFacingError(error)), 500);
|
|
4368
|
+
}
|
|
4369
|
+
};
|
|
4370
|
+
restartService = async (c) => {
|
|
4371
|
+
try {
|
|
4372
|
+
return c.json(ok(await this.host.restartService()));
|
|
4373
|
+
} catch (error) {
|
|
4374
|
+
return c.json(err("RUNTIME_RESTART_FAILED", formatUserFacingError(error)), 400);
|
|
4375
|
+
}
|
|
4376
|
+
};
|
|
4377
|
+
startService = async (c) => {
|
|
4378
|
+
try {
|
|
4379
|
+
return c.json(ok(await this.host.startService()));
|
|
4380
|
+
} catch (error) {
|
|
4381
|
+
return c.json(err("RUNTIME_START_FAILED", formatUserFacingError(error)), 400);
|
|
4382
|
+
}
|
|
4383
|
+
};
|
|
4384
|
+
stopService = async (c) => {
|
|
4385
|
+
try {
|
|
4386
|
+
return c.json(ok(await this.host.stopService()));
|
|
4387
|
+
} catch (error) {
|
|
4388
|
+
return c.json(err("RUNTIME_STOP_FAILED", formatUserFacingError(error)), 400);
|
|
4389
|
+
}
|
|
4390
|
+
};
|
|
4391
|
+
};
|
|
4392
|
+
//#endregion
|
|
4346
4393
|
//#region src/ui/server-path/server-path-browse.utils.ts
|
|
4347
4394
|
var ServerPathBrowseError = class extends Error {
|
|
4348
4395
|
constructor(code, message) {
|
|
@@ -4526,22 +4573,35 @@ function registerRemoteRoutes(app, remoteController) {
|
|
|
4526
4573
|
app.put("/api/remote/settings", remoteController.updateSettings);
|
|
4527
4574
|
app.post("/api/remote/service/:action", remoteController.controlService);
|
|
4528
4575
|
}
|
|
4576
|
+
function registerRuntimeControlRoutes(app, runtimeControlController) {
|
|
4577
|
+
if (!runtimeControlController) return;
|
|
4578
|
+
app.get("/api/runtime/control", runtimeControlController.getControl);
|
|
4579
|
+
app.post("/api/runtime/control/start-service", runtimeControlController.startService);
|
|
4580
|
+
app.post("/api/runtime/control/restart-service", runtimeControlController.restartService);
|
|
4581
|
+
app.post("/api/runtime/control/stop-service", runtimeControlController.stopService);
|
|
4582
|
+
}
|
|
4583
|
+
function createUiRouteControllers(options, authService, marketplaceBaseUrl) {
|
|
4584
|
+
return {
|
|
4585
|
+
app: new AppRoutesController(options),
|
|
4586
|
+
agents: new AgentsRoutesController(options),
|
|
4587
|
+
auth: new AuthRoutesController(authService),
|
|
4588
|
+
config: new ConfigRoutesController(options),
|
|
4589
|
+
cron: new CronRoutesController(options),
|
|
4590
|
+
ncpSession: new NcpSessionRoutesController(options),
|
|
4591
|
+
ncpAsset: new NcpAssetRoutesController(options),
|
|
4592
|
+
serverPath: new ServerPathRoutesController(),
|
|
4593
|
+
remote: options.remoteAccess ? new RemoteRoutesController(options.remoteAccess) : null,
|
|
4594
|
+
runtimeControl: options.runtimeControl ? new RuntimeControlRoutesController(options.runtimeControl) : null,
|
|
4595
|
+
pluginMarketplace: new PluginMarketplaceController(options, marketplaceBaseUrl),
|
|
4596
|
+
skillMarketplace: new SkillMarketplaceController(options, marketplaceBaseUrl),
|
|
4597
|
+
mcpMarketplace: new McpMarketplaceController(options, marketplaceBaseUrl)
|
|
4598
|
+
};
|
|
4599
|
+
}
|
|
4529
4600
|
function createUiRouter(options) {
|
|
4530
4601
|
const app = new Hono();
|
|
4531
4602
|
const marketplaceBaseUrl = normalizeMarketplaceBaseUrl(options);
|
|
4532
4603
|
const authService = options.authService ?? new UiAuthService(options.configPath);
|
|
4533
|
-
const
|
|
4534
|
-
const agentsController = new AgentsRoutesController(options);
|
|
4535
|
-
const authController = new AuthRoutesController(authService);
|
|
4536
|
-
const configController = new ConfigRoutesController(options);
|
|
4537
|
-
const cronController = new CronRoutesController(options);
|
|
4538
|
-
const ncpSessionController = new NcpSessionRoutesController(options);
|
|
4539
|
-
const ncpAssetController = new NcpAssetRoutesController(options);
|
|
4540
|
-
const serverPathController = new ServerPathRoutesController();
|
|
4541
|
-
const remoteController = options.remoteAccess ? new RemoteRoutesController(options.remoteAccess) : null;
|
|
4542
|
-
const pluginMarketplaceController = new PluginMarketplaceController(options, marketplaceBaseUrl);
|
|
4543
|
-
const skillMarketplaceController = new SkillMarketplaceController(options, marketplaceBaseUrl);
|
|
4544
|
-
const mcpMarketplaceController = new McpMarketplaceController(options, marketplaceBaseUrl);
|
|
4604
|
+
const controllers = createUiRouteControllers(options, authService, marketplaceBaseUrl);
|
|
4545
4605
|
app.notFound((c) => c.json(err("NOT_FOUND", "endpoint not found"), 404));
|
|
4546
4606
|
app.use("/api/*", async (c, next) => {
|
|
4547
4607
|
const path = c.req.path;
|
|
@@ -4556,21 +4616,22 @@ function createUiRouter(options) {
|
|
|
4556
4616
|
c.status(401);
|
|
4557
4617
|
return c.json(err("UNAUTHORIZED", "Authentication required."), 401);
|
|
4558
4618
|
});
|
|
4559
|
-
app.get("/api/health",
|
|
4560
|
-
app.get("/api/app/meta",
|
|
4561
|
-
app.get("/api/runtime/bootstrap-status",
|
|
4562
|
-
registerAuthRoutes(app,
|
|
4563
|
-
registerAgentRoutes(app,
|
|
4564
|
-
registerConfigRoutes(app,
|
|
4565
|
-
registerNcpSessionRoutes(app,
|
|
4566
|
-
registerServerPathRoutes(app,
|
|
4567
|
-
registerNcpRuntimeRoutes(app, options,
|
|
4568
|
-
registerCronRoutes(app,
|
|
4569
|
-
registerRemoteRoutes(app,
|
|
4619
|
+
app.get("/api/health", controllers.app.health);
|
|
4620
|
+
app.get("/api/app/meta", controllers.app.appMeta);
|
|
4621
|
+
app.get("/api/runtime/bootstrap-status", controllers.app.bootstrapStatus);
|
|
4622
|
+
registerAuthRoutes(app, controllers.auth);
|
|
4623
|
+
registerAgentRoutes(app, controllers.agents);
|
|
4624
|
+
registerConfigRoutes(app, controllers.config);
|
|
4625
|
+
registerNcpSessionRoutes(app, controllers.ncpSession);
|
|
4626
|
+
registerServerPathRoutes(app, controllers.serverPath);
|
|
4627
|
+
registerNcpRuntimeRoutes(app, options, controllers.ncpAsset);
|
|
4628
|
+
registerCronRoutes(app, controllers.cron);
|
|
4629
|
+
registerRemoteRoutes(app, controllers.remote);
|
|
4630
|
+
registerRuntimeControlRoutes(app, controllers.runtimeControl);
|
|
4570
4631
|
mountMarketplaceRoutes(app, {
|
|
4571
|
-
plugin:
|
|
4572
|
-
skill:
|
|
4573
|
-
mcp:
|
|
4632
|
+
plugin: controllers.pluginMarketplace,
|
|
4633
|
+
skill: controllers.skillMarketplace,
|
|
4634
|
+
mcp: controllers.mcpMarketplace
|
|
4574
4635
|
});
|
|
4575
4636
|
return app;
|
|
4576
4637
|
}
|
|
@@ -4656,6 +4717,7 @@ function startUiServer(options) {
|
|
|
4656
4717
|
ncpSessionService: options.ncpSessionService,
|
|
4657
4718
|
authService,
|
|
4658
4719
|
remoteAccess: options.remoteAccess,
|
|
4720
|
+
runtimeControl: options.runtimeControl,
|
|
4659
4721
|
getBootstrapStatus: options.getBootstrapStatus,
|
|
4660
4722
|
getPluginChannelBindings: options.getPluginChannelBindings,
|
|
4661
4723
|
getPluginUiMetadata: options.getPluginUiMetadata
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/server",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Nextclaw UI/API server.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"@hono/node-server": "^1.13.3",
|
|
19
19
|
"hono": "^4.6.2",
|
|
20
20
|
"ws": "^8.18.0",
|
|
21
|
-
"@nextclaw/core": "0.12.
|
|
22
|
-
"@nextclaw/mcp": "0.1.
|
|
23
|
-
"@nextclaw/ncp-http-agent-server": "0.3.
|
|
24
|
-
"@nextclaw/
|
|
25
|
-
"@nextclaw/
|
|
26
|
-
"@nextclaw/runtime": "0.2.
|
|
21
|
+
"@nextclaw/core": "0.12.6",
|
|
22
|
+
"@nextclaw/mcp": "0.1.71",
|
|
23
|
+
"@nextclaw/ncp-http-agent-server": "0.3.13",
|
|
24
|
+
"@nextclaw/openclaw-compat": "1.0.6",
|
|
25
|
+
"@nextclaw/ncp": "0.5.1",
|
|
26
|
+
"@nextclaw/runtime": "0.2.38"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^20.17.6",
|