@nextclaw/server 0.5.23 → 0.5.24

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NextClaw contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.d.ts CHANGED
@@ -304,6 +304,11 @@ type ChannelSpecView = {
304
304
  displayName?: string;
305
305
  enabled: boolean;
306
306
  tutorialUrl?: string;
307
+ tutorialUrls?: {
308
+ default?: string;
309
+ en?: string;
310
+ zh?: string;
311
+ };
307
312
  };
308
313
  type ConfigMetaView = {
309
314
  providers: ProviderSpecView[];
package/dist/index.js CHANGED
@@ -59,6 +59,24 @@ var PREFERRED_PROVIDER_ORDER = [
59
59
  var PREFERRED_PROVIDER_ORDER_INDEX = new Map(
60
60
  PREFERRED_PROVIDER_ORDER.map((name, index) => [name, index])
61
61
  );
62
+ var DOCS_BASE_URL = "https://docs.nextclaw.io";
63
+ var CHANNEL_DEFAULT_TUTORIAL_URL = `${DOCS_BASE_URL}/guide/channels`;
64
+ var CHANNEL_TUTORIAL_URLS = {
65
+ telegram: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
66
+ whatsapp: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
67
+ discord: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
68
+ feishu: {
69
+ default: `${DOCS_BASE_URL}/guide/tutorials/feishu`,
70
+ en: `${DOCS_BASE_URL}/en/guide/tutorials/feishu`,
71
+ zh: `${DOCS_BASE_URL}/zh/guide/tutorials/feishu`
72
+ },
73
+ mochat: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
74
+ dingtalk: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
75
+ wecom: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
76
+ email: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
77
+ slack: { default: CHANNEL_DEFAULT_TUTORIAL_URL },
78
+ qq: { default: CHANNEL_DEFAULT_TUTORIAL_URL }
79
+ };
62
80
  function matchesExtraSensitivePath(path) {
63
81
  if (path === "session" || path.startsWith("session.")) {
64
82
  return false;
@@ -359,11 +377,17 @@ function buildConfigMeta(config) {
359
377
  }
360
378
  return left.name.localeCompare(right.name);
361
379
  });
362
- const channels = Object.keys(config.channels).map((name) => ({
363
- name,
364
- displayName: name,
365
- enabled: Boolean(config.channels[name]?.enabled)
366
- }));
380
+ const channels = Object.keys(config.channels).map((name) => {
381
+ const tutorialUrls = CHANNEL_TUTORIAL_URLS[name] ?? { default: CHANNEL_DEFAULT_TUTORIAL_URL };
382
+ const tutorialUrl = tutorialUrls.default ?? tutorialUrls.en ?? tutorialUrls.zh;
383
+ return {
384
+ name,
385
+ displayName: name,
386
+ enabled: Boolean(config.channels[name]?.enabled),
387
+ tutorialUrl,
388
+ tutorialUrls
389
+ };
390
+ });
367
391
  return { providers, channels };
368
392
  }
369
393
  function buildConfigSchemaView(_config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/server",
3
- "version": "0.5.23",
3
+ "version": "0.5.24",
4
4
  "private": false,
5
5
  "description": "Nextclaw UI/API server.",
6
6
  "type": "module",