@nextclaw/server 0.6.3 → 0.6.4

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
@@ -14,6 +14,10 @@ type ApiResponse<T> = {
14
14
  ok: false;
15
15
  error: ApiError;
16
16
  };
17
+ type AppMetaView = {
18
+ name: string;
19
+ productVersion: string;
20
+ };
17
21
  type ProviderConfigView = {
18
22
  displayName?: string;
19
23
  apiKeySet: boolean;
@@ -692,6 +696,7 @@ type UiServerOptions = {
692
696
  host: string;
693
697
  port: number;
694
698
  configPath: string;
699
+ productVersion?: string;
695
700
  corsOrigins?: string[] | "*";
696
701
  staticDir?: string;
697
702
  marketplace?: MarketplaceApiConfig;
@@ -709,6 +714,7 @@ declare function startUiServer(options: UiServerOptions): UiServerHandle;
709
714
 
710
715
  type UiRouterOptions = {
711
716
  configPath: string;
717
+ productVersion?: string;
712
718
  publish: (event: UiServerEvent) => void;
713
719
  marketplace?: MarketplaceApiConfig;
714
720
  cronService?: InstanceType<typeof NextclawCore.CronService>;
@@ -752,4 +758,4 @@ declare function deleteSession(configPath: string, key: string): boolean;
752
758
  declare function updateRuntime(configPath: string, patch: RuntimeConfigUpdate): Pick<ConfigView, "agents" | "bindings" | "session">;
753
759
  declare function updateSecrets(configPath: string, patch: SecretsConfigUpdate): SecretsView;
754
760
 
755
- export { type AgentBindingView, type AgentProfileView, type ApiError, type ApiResponse, type BindingPeerView, type ChannelSpecView, type ChatCapabilitiesView, type ChatRunListView, type ChatRunState, type ChatRunView, type ChatTurnRequest, type ChatTurnResult, type ChatTurnStopRequest, type ChatTurnStopResult, type ChatTurnStreamEvent, type ChatTurnView, type ConfigActionExecuteRequest, type ConfigActionExecuteResult, type ConfigActionManifest, type ConfigActionType, type ConfigMetaView, type ConfigSchemaResponse, type ConfigUiHint, type ConfigUiHints, type ConfigView, type CronActionResult, type CronEnableRequest, type CronJobStateView, type CronJobView, type CronListView, type CronPayloadView, type CronRunRequest, type CronScheduleView, type MarketplaceApiConfig, type MarketplaceInstallKind, type MarketplaceInstallSkillParams, type MarketplaceInstallSpec, type MarketplaceInstalledRecord, type MarketplaceInstalledView, type MarketplaceInstaller, type MarketplaceItemSummary, type MarketplaceItemType, type MarketplaceItemView, type MarketplaceListView, type MarketplaceLocalizedTextMap, type MarketplacePluginContentView, type MarketplacePluginInstallRequest, type MarketplacePluginInstallResult, type MarketplacePluginManageAction, type MarketplacePluginManageRequest, type MarketplacePluginManageResult, type MarketplaceRecommendationView, type MarketplaceSkillContentView, type MarketplaceSkillInstallRequest, type MarketplaceSkillInstallResult, type MarketplaceSkillManageAction, type MarketplaceSkillManageRequest, type MarketplaceSkillManageResult, type MarketplaceSort, type ProviderAuthImportResult, type ProviderAuthPollRequest, type ProviderAuthPollResult, type ProviderAuthStartResult, type ProviderConfigUpdate, type ProviderConfigView, type ProviderConnectionTestRequest, type ProviderConnectionTestResult, type ProviderCreateRequest, type ProviderCreateResult, type ProviderDeleteResult, type ProviderSpecView, type RuntimeConfigUpdate, type SecretProviderEnvView, type SecretProviderExecView, type SecretProviderFileView, type SecretProviderView, type SecretRefView, type SecretSourceView, type SecretsConfigUpdate, type SecretsView, type SessionConfigView, type SessionEntryView, type SessionEventView, type SessionHistoryView, type SessionMessageView, type SessionPatchUpdate, type SessionsListView, type UiChatRuntime, type UiServerEvent, type UiServerHandle, type UiServerOptions, buildConfigMeta, buildConfigSchemaView, buildConfigView, createCustomProvider, createUiRouter, deleteCustomProvider, deleteSession, executeConfigAction, getSessionHistory, listSessions, loadConfigOrDefault, patchSession, startUiServer, testProviderConnection, updateChannel, updateModel, updateProvider, updateRuntime, updateSecrets };
761
+ export { type AgentBindingView, type AgentProfileView, type ApiError, type ApiResponse, type AppMetaView, type BindingPeerView, type ChannelSpecView, type ChatCapabilitiesView, type ChatRunListView, type ChatRunState, type ChatRunView, type ChatTurnRequest, type ChatTurnResult, type ChatTurnStopRequest, type ChatTurnStopResult, type ChatTurnStreamEvent, type ChatTurnView, type ConfigActionExecuteRequest, type ConfigActionExecuteResult, type ConfigActionManifest, type ConfigActionType, type ConfigMetaView, type ConfigSchemaResponse, type ConfigUiHint, type ConfigUiHints, type ConfigView, type CronActionResult, type CronEnableRequest, type CronJobStateView, type CronJobView, type CronListView, type CronPayloadView, type CronRunRequest, type CronScheduleView, type MarketplaceApiConfig, type MarketplaceInstallKind, type MarketplaceInstallSkillParams, type MarketplaceInstallSpec, type MarketplaceInstalledRecord, type MarketplaceInstalledView, type MarketplaceInstaller, type MarketplaceItemSummary, type MarketplaceItemType, type MarketplaceItemView, type MarketplaceListView, type MarketplaceLocalizedTextMap, type MarketplacePluginContentView, type MarketplacePluginInstallRequest, type MarketplacePluginInstallResult, type MarketplacePluginManageAction, type MarketplacePluginManageRequest, type MarketplacePluginManageResult, type MarketplaceRecommendationView, type MarketplaceSkillContentView, type MarketplaceSkillInstallRequest, type MarketplaceSkillInstallResult, type MarketplaceSkillManageAction, type MarketplaceSkillManageRequest, type MarketplaceSkillManageResult, type MarketplaceSort, type ProviderAuthImportResult, type ProviderAuthPollRequest, type ProviderAuthPollResult, type ProviderAuthStartResult, type ProviderConfigUpdate, type ProviderConfigView, type ProviderConnectionTestRequest, type ProviderConnectionTestResult, type ProviderCreateRequest, type ProviderCreateResult, type ProviderDeleteResult, type ProviderSpecView, type RuntimeConfigUpdate, type SecretProviderEnvView, type SecretProviderExecView, type SecretProviderFileView, type SecretProviderView, type SecretRefView, type SecretSourceView, type SecretsConfigUpdate, type SecretsView, type SessionConfigView, type SessionEntryView, type SessionEventView, type SessionHistoryView, type SessionMessageView, type SessionPatchUpdate, type SessionsListView, type UiChatRuntime, type UiServerEvent, type UiServerHandle, type UiServerOptions, buildConfigMeta, buildConfigSchemaView, buildConfigView, createCustomProvider, createUiRouter, deleteCustomProvider, deleteSession, executeConfigAction, getSessionHistory, listSessions, loadConfigOrDefault, patchSession, startUiServer, testProviderConnection, updateChannel, updateModel, updateProvider, updateRuntime, updateSecrets };
package/dist/index.js CHANGED
@@ -1351,6 +1351,13 @@ async function importProviderAuthFromCli(configPath, providerName) {
1351
1351
  }
1352
1352
 
1353
1353
  // src/ui/router.ts
1354
+ function buildAppMetaView(options) {
1355
+ const productVersion = options.productVersion?.trim();
1356
+ return {
1357
+ name: "NextClaw",
1358
+ productVersion: productVersion && productVersion.length > 0 ? productVersion : "0.0.0"
1359
+ };
1360
+ }
1354
1361
  var DEFAULT_MARKETPLACE_API_BASE = "https://marketplace-api.nextclaw.io";
1355
1362
  var NEXTCLAW_PLUGIN_NPM_PREFIX = "@nextclaw/channel-plugin-";
1356
1363
  var CLAWBAY_CHANNEL_PLUGIN_NPM_SPEC = "@clawbay/clawbay-channel";
@@ -2630,6 +2637,7 @@ function createUiRouter(options) {
2630
2637
  const marketplaceBaseUrl = normalizeMarketplaceBaseUrl(options);
2631
2638
  app.notFound((c) => c.json(err("NOT_FOUND", "endpoint not found"), 404));
2632
2639
  app.get("/api/health", (c) => c.json(ok({ status: "ok" })));
2640
+ app.get("/api/app/meta", (c) => c.json(ok(buildAppMetaView(options))));
2633
2641
  app.get("/api/config", (c) => {
2634
2642
  const config = loadConfigOrDefault(options.configPath);
2635
2643
  return c.json(ok(buildConfigView(config)));
@@ -3394,6 +3402,7 @@ function startUiServer(options) {
3394
3402
  "/",
3395
3403
  createUiRouter({
3396
3404
  configPath: options.configPath,
3405
+ productVersion: options.productVersion,
3397
3406
  publish,
3398
3407
  marketplace: options.marketplace,
3399
3408
  cronService: options.cronService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/server",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "private": false,
5
5
  "description": "Nextclaw UI/API server.",
6
6
  "type": "module",