@nocobase/plugin-ai 2.1.0-alpha.40 → 2.1.0-alpha.46

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 (103) hide show
  1. package/dist/ai/docs/nocobase/ai-dev/capabilities.md +1 -1
  2. package/dist/ai/docs/nocobase/ai-dev/index.md +1 -1
  3. package/dist/ai/docs/nocobase/ai-dev/watermark-plugin.md +1 -1
  4. package/dist/ai/docs/nocobase/api/cli/app/index.md +4 -4
  5. package/dist/ai/docs/nocobase/api/cli/app/restart.md +4 -2
  6. package/dist/ai/docs/nocobase/api/cli/app/start.md +6 -2
  7. package/dist/ai/docs/nocobase/api/cli/app/stop.md +2 -2
  8. package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +27 -6
  9. package/dist/ai/docs/nocobase/api/cli/config/delete.md +4 -1
  10. package/dist/ai/docs/nocobase/api/cli/config/get.md +4 -1
  11. package/dist/ai/docs/nocobase/api/cli/config/index.md +21 -0
  12. package/dist/ai/docs/nocobase/api/cli/config/set.md +9 -2
  13. package/dist/ai/docs/nocobase/api/cli/init.md +1 -1
  14. package/dist/ai/docs/nocobase/api/cli/license/plugins/sync.md +4 -0
  15. package/dist/ai/docs/nocobase/api/cli/self/update.md +2 -0
  16. package/dist/ai/docs/nocobase/auth-verification/api-keys/index.md +1 -1
  17. package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +17 -0
  18. package/dist/ai/docs/nocobase/get-started/installation/env.md +6 -2
  19. package/dist/ai/docs/nocobase/integration/api-keys/index.md +1 -1
  20. package/dist/ai/docs/nocobase/integration/embed/index.md +3 -3
  21. package/dist/ai/docs/nocobase/multi-app/multi-app/app-block-and-switcher.md +68 -0
  22. package/dist/ai/docs/nocobase/multi-app/multi-app/app-sso.md +71 -0
  23. package/dist/ai/docs/nocobase/multi-app/multi-app/index.md +9 -1
  24. package/dist/ai/docs/nocobase/multi-app/multi-app/sub-app-api.md +112 -0
  25. package/dist/ai/docs/nocobase/plugin-development/build.md +5 -0
  26. package/dist/ai/docs/nocobase/plugin-development/client/appendix/faq.md +3 -3
  27. package/dist/ai/docs/nocobase/plugin-development/client/component/index.md +1 -1
  28. package/dist/ai/docs/nocobase/plugin-development/client/ctx/common-capabilities.md +2 -2
  29. package/dist/ai/docs/nocobase/plugin-development/client/ctx/index.md +1 -1
  30. package/dist/ai/docs/nocobase/plugin-development/client/router.md +11 -11
  31. package/dist/ai/docs/nocobase/plugin-development/write-your-first-plugin.md +28 -0
  32. package/dist/ai/docs/nocobase/solution/all-in-one/installation.md +181 -0
  33. package/dist/ai/docs/nocobase/solution/crm/changelog.md +0 -3
  34. package/dist/ai/docs/nocobase/solution/crm/installation.md +6 -76
  35. package/dist/ai/docs/nocobase/solution/crm/v1.md +6 -35
  36. package/dist/ai/docs/nocobase/solution/ticket-system/changelog.md +0 -2
  37. package/dist/ai/docs/nocobase/solution/ticket-system/installation.md +6 -69
  38. package/dist/ai/docs/nocobase/workflow/nodes/javascript.md +4 -2
  39. package/dist/client/{406.15c09d98faa2ccf1.js → 406.9a530334eae8cede.js} +1 -1
  40. package/dist/client/{428.e9f38da3b0d8b498.js → 428.431a00d29107058e.js} +1 -1
  41. package/dist/client/462.d172d0fe91519e35.js +10 -0
  42. package/dist/client/559.a0f2f1cc2be3c039.js +10 -0
  43. package/dist/client/index.js +2 -2
  44. package/dist/client/workflow/nodes/employee/index.d.ts +1 -4
  45. package/dist/client/workflow/nodes/llm/index.d.ts +1 -4
  46. package/dist/client-v2/index.js +1 -1
  47. package/dist/collections/ai-employees.d.ts +9 -2
  48. package/dist/collections/ai-employees.js +2 -1
  49. package/dist/externalVersion.js +22 -22
  50. package/dist/locale/de-DE.json +1 -0
  51. package/dist/locale/en-US.json +2 -1
  52. package/dist/locale/es-ES.json +1 -0
  53. package/dist/locale/fr-FR.json +1 -0
  54. package/dist/locale/hu-HU.json +1 -0
  55. package/dist/locale/id-ID.json +1 -0
  56. package/dist/locale/it-IT.json +1 -0
  57. package/dist/locale/ja-JP.json +1 -0
  58. package/dist/locale/ko-KR.json +1 -0
  59. package/dist/locale/nl-NL.json +1 -0
  60. package/dist/locale/pt-BR.json +1 -0
  61. package/dist/locale/ru-RU.json +1 -0
  62. package/dist/locale/tr-TR.json +1 -0
  63. package/dist/locale/uk-UA.json +1 -0
  64. package/dist/locale/vi-VN.json +1 -0
  65. package/dist/locale/zh-CN.json +2 -1
  66. package/dist/locale/zh-TW.json +1 -0
  67. package/dist/node_modules/@langchain/xai/dist/index.cjs +16 -2
  68. package/dist/node_modules/@langchain/xai/package.json +1 -1
  69. package/dist/node_modules/fs-extra/package.json +1 -1
  70. package/dist/node_modules/jsonrepair/package.json +1 -1
  71. package/dist/node_modules/just-bash/package.json +1 -1
  72. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  73. package/dist/node_modules/openai/package.json +1 -1
  74. package/dist/node_modules/zod/package.json +1 -1
  75. package/dist/server/ai-employees/ai-employee.d.ts +2 -1
  76. package/dist/server/ai-employees/ai-employee.js +3 -1
  77. package/dist/server/llm-providers/anthropic.js +17 -23
  78. package/dist/server/llm-providers/dashscope.js +3 -3
  79. package/dist/server/llm-providers/deepseek.js +2 -2
  80. package/dist/server/llm-providers/google-genai.js +17 -22
  81. package/dist/server/llm-providers/kimi/provider.js +4 -4
  82. package/dist/server/llm-providers/mimo.js +2 -2
  83. package/dist/server/llm-providers/ollama.js +14 -21
  84. package/dist/server/llm-providers/openai/completions.js +2 -2
  85. package/dist/server/llm-providers/openai/embedding.js +1 -1
  86. package/dist/server/llm-providers/openai/responses.js +2 -2
  87. package/dist/server/llm-providers/provider.d.ts +3 -1
  88. package/dist/server/llm-providers/provider.js +61 -24
  89. package/dist/server/llm-providers/xai.js +2 -2
  90. package/dist/server/resource/ai.js +11 -9
  91. package/dist/server/utils.d.ts +1 -1
  92. package/dist/server/workflow/nodes/employee/constants.d.ts +23 -0
  93. package/dist/server/workflow/nodes/employee/constants.js +50 -0
  94. package/dist/server/workflow/nodes/employee/handler.js +23 -2
  95. package/dist/server/workflow/nodes/employee/index.d.ts +1 -0
  96. package/dist/server/workflow/nodes/employee/index.js +83 -25
  97. package/dist/server/workflow/nodes/employee/tools.d.ts +2 -2
  98. package/dist/server/workflow/nodes/employee/tools.js +26 -5
  99. package/dist/server/workflow/nodes/employee/types.d.ts +4 -3
  100. package/dist/server/workflow/nodes/llm/index.js +31 -9
  101. package/package.json +7 -7
  102. package/dist/client/462.1708385b148779cd.js +0 -10
  103. package/dist/client/559.585f80c3bcea0bed.js +0 -10
@@ -18,7 +18,7 @@ Here is a list of everything AI can currently help you do. Each capability comes
18
18
 
19
19
  :::warning Note
20
20
 
21
- - NocoBase is migrating from `client` (v1) to `client-v2`, and `client-v2` is still under development. The client code generated by AI development is based on `client-v2` and can only be used under the `/v2/` path. It is available for early access and experimentation, but is not recommended for production use.
21
+ - NocoBase is migrating from `client` (v1) to `client-v2`, and `client-v2` is still under development. The client code generated by AI development is based on `client-v2` and can only be used under the `/v/` path. It is available for early access and experimentation, but is not recommended for production use.
22
22
  - AI-generated code may not be 100% correct. We recommend reviewing it before enabling. If you encounter issues at runtime, send the error message to AI and let it investigate and fix -- it usually takes just a few rounds of conversation to resolve.
23
23
  - We recommend using GPT or Claude series models for development, as they produce the best results. Other models can also work, but generation quality may vary.
24
24
 
@@ -33,7 +33,7 @@ Your browser will automatically open the visual configuration page, guiding you
33
33
 
34
34
  :::warning Note
35
35
 
36
- - NocoBase is migrating from `client` (v1) to `client-v2`, and `client-v2` is still under development. The client code generated by AI development is based on `client-v2` and can only be used under the `/v2/` path. It is available for early access and experimentation, but is not recommended for production use.
36
+ - NocoBase is migrating from `client` (v1) to `client-v2`, and `client-v2` is still under development. The client code generated by AI development is based on `client-v2` and can only be used under the `/v/` path. It is available for early access and experimentation, but is not recommended for production use.
37
37
  - AI-generated code may not be 100% correct. We recommend reviewing it before enabling. If you encounter issues at runtime, send the error message to AI and let it investigate and fix -- it usually takes just a few rounds of conversation to resolve.
38
38
  - We recommend using GPT or Claude series models for development, as they produce the best results. Other models can also work, but generation quality may vary.
39
39
 
@@ -34,7 +34,7 @@ Make sure you have:
34
34
 
35
35
  :::warning Note
36
36
 
37
- - NocoBase is migrating from `client` (v1) to `client-v2`, and `client-v2` is still under development. The client code generated by AI development is based on `client-v2` and can only be used under the `/v2/` path. It is available for early access and experimentation, but is not recommended for production use.
37
+ - NocoBase is migrating from `client` (v1) to `client-v2`, and `client-v2` is still under development. The client code generated by AI development is based on `client-v2` and can only be used under the `/v/` path. It is available for early access and experimentation, but is not recommended for production use.
38
38
  - AI-generated code may not be 100% correct. We recommend reviewing it before enabling. If you encounter issues at runtime, send the error message to AI and let it investigate and fix -- it usually takes just a few rounds of conversation to resolve.
39
39
 
40
40
  :::
@@ -6,7 +6,7 @@ keywords: "nb app,NocoBase CLI,app runtime,start,stop,logs,upgrade"
6
6
 
7
7
  # nb app
8
8
 
9
- Manage the runtime of a selected NocoBase env. npm/Git envs run local app commands; Docker envs manage saved app containers.
9
+ Manage the runtime of a selected NocoBase env. npm/Git envs run local app commands; Docker envs manage app containers from the saved env config.
10
10
 
11
11
  ## Usage
12
12
 
@@ -18,12 +18,12 @@ nb app <command>
18
18
 
19
19
  | Command | Description |
20
20
  | --- | --- |
21
- | [`nb app start`](./start.md) | Start the app or Docker container |
22
- | [`nb app stop`](./stop.md) | Stop the app or Docker container |
21
+ | [`nb app start`](./start.md) | Start the app or recreate the Docker container |
22
+ | [`nb app stop`](./stop.md) | Stop the app or remove the Docker container |
23
23
  | [`nb app restart`](./restart.md) | Stop and then start the app |
24
24
  | [`nb app logs`](./logs.md) | View app logs |
25
25
  | [`nb app down`](./down.md) | Stop and clean up local runtime resources |
26
- | [`nb app upgrade`](./upgrade.md) | Update source or image and restart the app |
26
+ | [`nb app upgrade`](./upgrade.md) | Stop the app, replace the source or image, then start it again |
27
27
 
28
28
  ## Examples
29
29
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app restart"
3
- description: "nb app restart command reference: restart the NocoBase app or Docker container for a selected env."
3
+ description: "nb app restart command reference: restart the NocoBase app for a selected env and recreate the Docker app container from saved env config when needed."
4
4
  keywords: "nb app restart,NocoBase CLI,restart app,Docker"
5
5
  ---
6
6
 
7
7
  # nb app restart
8
8
 
9
- Stop and then start the NocoBase app for a selected env.
9
+ Stop and then start the NocoBase app for a selected env. Local envs reuse the `nb app stop` and `nb app start` flow; Docker envs remove the current container first, then recreate the app container from saved env config.
10
10
 
11
11
  ## Usage
12
12
 
@@ -43,6 +43,8 @@ nb app restart --env local-docker
43
43
 
44
44
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
45
45
 
46
+ Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out. If you pass `--no-daemon` for a local env, the app runs in the foreground, so the CLI does not keep waiting for the readiness check after startup.
47
+
46
48
  ## Related Commands
47
49
 
48
50
  - [`nb app start`](./start.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app start"
3
- description: "nb app start command reference: start the NocoBase app or Docker container for a selected env."
3
+ description: "nb app start command reference: start the NocoBase app for a selected env and recreate the Docker app container from saved env config when needed."
4
4
  keywords: "nb app start,NocoBase CLI,start app,Docker,pm2"
5
5
  ---
6
6
 
7
7
  # nb app start
8
8
 
9
- Start the NocoBase app for a selected env. npm/Git installations run local app commands; Docker installations start the saved app container.
9
+ Start the NocoBase app for a selected env. npm/Git installations run local app commands; Docker installations recreate the saved app container from the saved env config.
10
10
 
11
11
  ## Usage
12
12
 
@@ -44,6 +44,10 @@ nb app start --env local-docker
44
44
 
45
45
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
46
46
 
47
+ By default, local envs start in daemon mode and Docker envs recreate the app container from saved env config. Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out.
48
+
49
+ If you pass `--no-daemon` for a local env, the app runs in the foreground. In that case, the CLI does not keep waiting for the readiness check after startup.
50
+
47
51
  ## Related Commands
48
52
 
49
53
  - [`nb app stop`](./stop.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app stop"
3
- description: "nb app stop command reference: stop the NocoBase app or Docker container for a selected env."
3
+ description: "nb app stop command reference: stop the NocoBase app and remove the Docker app container for a selected env."
4
4
  keywords: "nb app stop,NocoBase CLI,stop app,Docker"
5
5
  ---
6
6
 
7
7
  # nb app stop
8
8
 
9
- Stop the NocoBase app for a selected env. npm/Git installations stop local app processes; Docker installations stop the saved app container.
9
+ Stop the NocoBase app for a selected env. npm/Git installations stop local app processes; Docker installations remove the saved app container.
10
10
 
11
11
  ## Usage
12
12
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app upgrade"
3
- description: "nb app upgrade command reference: update source or image and restart a selected NocoBase app."
3
+ description: "nb app upgrade command reference: stop the app, replace the saved source or image, then start the selected NocoBase app again."
4
4
  keywords: "nb app upgrade,NocoBase CLI,upgrade,update,Docker image"
5
5
  ---
6
6
 
7
7
  # nb app upgrade
8
8
 
9
- Upgrade a selected NocoBase app. npm/Git installations refresh the saved source and restart with quickstart; Docker installations refresh the saved image and recreate the app container.
9
+ Upgrade a selected NocoBase app. The CLI stops the current app, replaces the saved source or image by default, synchronizes commercial plugins, quickstarts the app again, and refreshes the env runtime at the end. Docker envs recreate the app container from the saved env config during startup.
10
10
 
11
11
  ## Usage
12
12
 
@@ -20,23 +20,44 @@ nb app upgrade [flags]
20
20
  | --- | --- | --- |
21
21
  | `--env`, `-e` | string | CLI env name to upgrade; uses the current env if omitted |
22
22
  | `--yes`, `-y` | boolean | When an explicitly passed `--env` targets a different env than the current env, skip the interactive confirmation prompt |
23
- | `--skip-code-update`, `-s` | boolean | Restart from the saved local source or Docker image without downloading updates |
24
- | `--version` | string | Override the saved `downloadVersion`; when the upgrade succeeds, the new version is written back to the env config |
23
+ | `--force`, `-f` | boolean | Skip the upgrade confirmation prompt. Required in non-interactive terminals and AI agent sessions |
24
+ | `--skip-download`, `-s` | boolean | Restart from the currently saved local source or Docker image without downloading updates first; also skips `nb license plugins sync` |
25
+ | `--version` | string | Override the target version for this upgrade; when the upgrade succeeds, the new version is written back to `downloadVersion` in the env config |
25
26
  | `--verbose` | boolean | Show underlying update and restart command output |
26
27
 
27
28
  ## Examples
28
29
 
29
30
  ```bash
30
31
  nb app upgrade
32
+ nb app upgrade --force
31
33
  nb app upgrade --env local
32
- nb app upgrade --env local -s
34
+ nb app upgrade --env local --force
35
+ nb app upgrade --env local --skip-download
36
+ nb app upgrade --env local --skip-download --version beta
33
37
  nb app upgrade --env local --version beta
34
38
  nb app upgrade --env local --verbose
35
- nb app upgrade --env local-docker -s
39
+ nb app upgrade --env local-docker --skip-download
36
40
  ```
37
41
 
38
42
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
39
43
 
44
+ Before the upgrade starts, interactive terminals also ask for upgrade confirmation unless you pass `--force`. In non-interactive terminals and AI agent sessions, `nb app upgrade` refuses to proceed without `--force` and prints a copyable re-run command. If the command is also cross-env, you need both `--yes` and `--force`.
45
+
46
+ By default, `nb app upgrade` runs these steps:
47
+
48
+ 1. `nb app stop`
49
+ 2. `nb source download --replace`
50
+ 3. `nb license plugins sync --skip-if-no-license`
51
+ 4. `nb app start --quickstart`
52
+ 5. Save the new `downloadVersion` when needed
53
+ 6. `nb env update`
54
+
55
+ When `--skip-download` is passed, the CLI skips steps 2 and 3 and restarts the currently saved source or image directly. If `--version` is also passed, the CLI does not download that version during this run; instead it only saves it as the new `downloadVersion` after a successful restart so later upgrades can use it.
56
+
57
+ Step 4 waits for the app to pass `__health_check`. During this wait, the CLI prints one waiting line first, then one progress line every 10 seconds until the app is ready or the health check times out.
58
+
59
+ If the final `nb env update` step fails, the upgrade still counts as successful. The CLI prints a warning and tells you to run `nb env update <envName>` manually afterward.
60
+
40
61
  ## Related Commands
41
62
 
42
63
  - [`nb source download`](../source/download.md)
@@ -18,14 +18,17 @@ nb config delete <key>
18
18
 
19
19
  | Parameter | Type | Description |
20
20
  | --- | --- | --- |
21
- | `<key>` | string | Configuration key: `license.pkg-url`, `docker.network`, or `docker.container-prefix` |
21
+ | `<key>` | string | Configuration key: `locale`, `update.policy`, `license.pkg-url`, `docker.network`, `docker.container-prefix`, `bin.docker`, `bin.git`, or `bin.yarn` |
22
22
 
23
23
  ## Examples
24
24
 
25
25
  ```bash
26
+ nb config delete locale
27
+ nb config delete update.policy
26
28
  nb config delete license.pkg-url
27
29
  nb config delete docker.network
28
30
  nb config delete docker.container-prefix
31
+ nb config delete bin.git
29
32
  ```
30
33
 
31
34
  ## Related Commands
@@ -18,14 +18,17 @@ nb config get <key>
18
18
 
19
19
  | Parameter | Type | Description |
20
20
  | --- | --- | --- |
21
- | `<key>` | string | Configuration key: `license.pkg-url`, `docker.network`, or `docker.container-prefix` |
21
+ | `<key>` | string | Configuration key: `locale`, `update.policy`, `license.pkg-url`, `docker.network`, `docker.container-prefix`, `bin.docker`, `bin.git`, or `bin.yarn` |
22
22
 
23
23
  ## Examples
24
24
 
25
25
  ```bash
26
+ nb config get locale
27
+ nb config get update.policy
26
28
  nb config get license.pkg-url
27
29
  nb config get docker.network
28
30
  nb config get docker.container-prefix
31
+ nb config get bin.git
29
32
  ```
30
33
 
31
34
  ## Related Commands
@@ -8,9 +8,27 @@ keywords: "nb config,NocoBase CLI,configuration,defaults"
8
8
 
9
9
  Manage CLI configuration defaults. Supported keys:
10
10
 
11
+ - `locale`
12
+ - `update.policy`
11
13
  - `license.pkg-url`
12
14
  - `docker.network`
13
15
  - `docker.container-prefix`
16
+ - `bin.docker`
17
+ - `bin.git`
18
+ - `bin.yarn`
19
+
20
+ ## Common Keys
21
+
22
+ | Key | Default | Description |
23
+ | --- | --- | --- |
24
+ | `locale` | current CLI locale resolution | Override the CLI locale |
25
+ | `update.policy` | `prompt` | Startup update behavior: `prompt`, `auto`, or `off` |
26
+ | `license.pkg-url` | `https://pkg.nocobase.com/` | Package registry for commercial packages |
27
+ | `docker.network` | `nocobase` | Default Docker network used by CLI-managed Docker apps |
28
+ | `docker.container-prefix` | `nb` | Default container prefix used by CLI-managed Docker apps |
29
+ | `bin.docker` | `docker` | Override the Docker executable path |
30
+ | `bin.git` | `git` | Override the Git executable path |
31
+ | `bin.yarn` | `yarn` | Override the Yarn executable path |
14
32
 
15
33
  ## Usage
16
34
 
@@ -31,8 +49,11 @@ nb config <command>
31
49
 
32
50
  ```bash
33
51
  nb config list
52
+ nb config get update.policy
53
+ nb config set update.policy auto
34
54
  nb config get docker.network
35
55
  nb config set docker.network nocobase
56
+ nb config set bin.git /usr/bin/git
36
57
  nb config delete docker.container-prefix
37
58
  ```
38
59
 
@@ -6,7 +6,7 @@ keywords: "nb config set,NocoBase CLI,configuration"
6
6
 
7
7
  # nb config set
8
8
 
9
- Set a CLI configuration value. Supported keys are `license.pkg-url`, `docker.network`, and `docker.container-prefix`.
9
+ Set a CLI configuration value. Supported keys are `locale`, `update.policy`, `license.pkg-url`, `docker.network`, `docker.container-prefix`, `bin.docker`, `bin.git`, and `bin.yarn`.
10
10
 
11
11
  ## Usage
12
12
 
@@ -18,21 +18,28 @@ nb config set <key> <value>
18
18
 
19
19
  | Parameter | Type | Description |
20
20
  | --- | --- | --- |
21
- | `<key>` | string | Configuration key: `license.pkg-url`, `docker.network`, or `docker.container-prefix` |
21
+ | `<key>` | string | Configuration key: `locale`, `update.policy`, `license.pkg-url`, `docker.network`, `docker.container-prefix`, `bin.docker`, `bin.git`, or `bin.yarn` |
22
22
  | `<value>` | string | Configuration value; must not be empty |
23
23
 
24
24
  ## Examples
25
25
 
26
26
  ```bash
27
+ nb config set locale zh-CN
28
+ nb config set update.policy auto
27
29
  nb config set license.pkg-url https://pkg.nocobase.com/
28
30
  nb config set docker.network nocobase
29
31
  nb config set docker.container-prefix nb
32
+ nb config set bin.docker /usr/local/bin/docker
33
+ nb config set bin.git /usr/bin/git
34
+ nb config set bin.yarn yarn
30
35
  ```
31
36
 
32
37
  ## Notes
33
38
 
34
39
  When setting `license.pkg-url`, the CLI normalizes the URL so it ends with `/`.
35
40
 
41
+ `update.policy` supports `prompt`, `auto`, and `off`. The default is `prompt`.
42
+
36
43
  ## Related Commands
37
44
 
38
45
  - [`nb config get`](./get.md)
@@ -63,7 +63,7 @@ nb init --env app1 --resume
63
63
  | `--db-database` | string | Database name |
64
64
  | `--db-user` | string | Database user |
65
65
  | `--db-password` | string | Database password |
66
- | `--fetch-source` | boolean | Download app files or pull the Docker image before installation |
66
+ | `--skip-download` | boolean | Skip downloading app files or pulling the Docker image before installation, and reuse existing local resources |
67
67
  | `--source`, `-s` | string | How to obtain NocoBase: `docker`, `npm`, or `git` |
68
68
  | `--version`, `-v` | string | Version parameter: npm version, Docker image tag, or Git ref |
69
69
  | `--replace`, `-r` | boolean | Replace the target directory if it already exists |
@@ -22,6 +22,7 @@ nb license plugins sync [flags]
22
22
  | `--yes`, `-y` | boolean | When an explicitly passed `--env` targets a different env than the current env, skip the interactive confirmation prompt |
23
23
  | `--dry-run` | boolean | Preview changes without installing, upgrading, or removing plugins |
24
24
  | `--version` | string | Registry version or dist-tag to synchronize; defaults to the current workspace version |
25
+ | `--skip-if-no-license` | boolean | Skip without error when the current env does not have a saved license key |
25
26
  | `--verbose` | boolean | Show detailed per-plugin sync logs |
26
27
  | `--json` | boolean | Output JSON |
27
28
 
@@ -32,6 +33,7 @@ nb license plugins sync
32
33
  nb license plugins sync --env app1
33
34
  nb license plugins sync --env app1 --yes
34
35
  nb license plugins sync --env app1 --dry-run
36
+ nb license plugins sync --env app1 --skip-if-no-license
35
37
  nb license plugins sync --env app1 --json
36
38
  ```
37
39
 
@@ -39,6 +41,8 @@ nb license plugins sync --env app1 --json
39
41
 
40
42
  When `--version` is omitted, the CLI detects the current app version automatically and uses that to decide which registry version of commercial plugins should be downloaded.
41
43
 
44
+ `--skip-if-no-license` only ignores one case: the current env does not have a saved license key yet. Other errors, such as missing registry credentials in the key, registry login failures, or plugin download failures, still surface normally.
45
+
42
46
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
43
47
 
44
48
  ## Related Commands
@@ -21,6 +21,7 @@ nb self update [flags]
21
21
  | `--channel` | string | Release channel to update to, default `auto`; options: `auto`, `latest`, `beta`, `alpha` |
22
22
  | `--yes`, `-y` | boolean | Skip update confirmation |
23
23
  | `--json` | boolean | Output JSON |
24
+ | `--skills` | boolean | Also refresh the globally installed NocoBase AI coding skills |
24
25
  | `--verbose` | boolean | Show detailed update output |
25
26
 
26
27
  ## Examples
@@ -28,6 +29,7 @@ nb self update [flags]
28
29
  ```bash
29
30
  nb self update
30
31
  nb self update --yes
32
+ nb self update --skills
31
33
  nb self update --channel alpha --json
32
34
  ```
33
35
 
@@ -8,7 +8,7 @@ pkg: '@nocobase/plugin-api-keys'
8
8
 
9
9
  ## Usage Instructions
10
10
 
11
- http://localhost:13000/admin/settings/api-keys/configuration
11
+ https://example.com/admin/settings/api-keys
12
12
 
13
13
 
14
14
  ![](https://static-docs.nocobase.com/d64ccbdc8a512a0224e9f81dfe14a0a8.png)
@@ -9,3 +9,20 @@ For file types that do not support native preview, you can enable preview functi
9
9
  Currently, NocoBase provides the following file preview plugins:
10
10
 
11
11
  * [Office File Preview Plugin](../file-preview/ms-office.md)
12
+
13
+ ## PDF preview with external storage
14
+
15
+ PDF preview uses PDF.js to render files in the browser. The browser must first read the PDF file content and then pass it to PDF.js for rendering. Therefore, when files are stored in external storage such as OSS, S3, COS, or a CDN, and the file access domain is different from the NocoBase site domain, the external storage must allow the NocoBase site to read files across origins.
16
+
17
+ If CORS is not configured, PDF downloads can still work normally, but preview may fail with a file loading error.
18
+
19
+ The CORS configuration for external storage or CDN should include:
20
+
21
+ ```http
22
+ Access-Control-Allow-Origin: https://your-nocobase-domain
23
+ Access-Control-Allow-Methods: GET, HEAD
24
+ Access-Control-Allow-Headers: *
25
+ Access-Control-Expose-Headers: Content-Length, Content-Range, Accept-Ranges, Content-Disposition, Content-Type
26
+ ```
27
+
28
+ `Access-Control-Allow-Origin` should be set to the actual domain used to access NocoBase. Avoid using `*` for non-public files over the long term, because it expands the range of sites that can read the files.
@@ -294,7 +294,7 @@ Log print format. Default is `console` in development and `json` in production.
294
294
  LOGGER_FORMAT=json
295
295
  ```
296
296
 
297
- Reference: [Log Format](/log-and-monitor/logger/index.md#log-format)
297
+ Reference: [Log Format](/log-and-monitor/logger/index.md#log-formats)
298
298
 
299
299
  ### CACHE_DEFAULT_STORE
300
300
 
@@ -375,8 +375,10 @@ Supported formats:
375
375
  Used to append preset local plugins. The value is the package name (the `name` parameter in `package.json`), with multiple plugins separated by commas.
376
376
 
377
377
  :::info
378
+
378
379
  1. Ensure the plugin is downloaded locally and can be found in the `node_modules` directory. For more details, see [Plugin Organization](/plugin-development/project-structure).
379
380
  2. After adding the environment variable, the plugin will appear on the plugin manager page only after an initial installation (`nocobase install`) or upgrade (`nocobase upgrade`).
381
+
380
382
  :::
381
383
 
382
384
  ```bash
@@ -388,8 +390,10 @@ APPEND_PRESET_LOCAL_PLUGINS=@my-project/plugin-foo,@my-project/plugin-bar
388
390
  Used to append built-in plugins that are installed by default. The value is the package name (the `name` parameter in `package.json`), with multiple plugins separated by commas.
389
391
 
390
392
  :::info
393
+
391
394
  1. Ensure the plugin is downloaded locally and can be found in the `node_modules` directory. For more details, see [Plugin Organization](/plugin-development/project-structure).
392
395
  2. After adding the environment variable, the plugin will be automatically installed or upgraded during the initial installation (`nocobase install`) or upgrade (`nocobase upgrade`).
396
+
393
397
  :::
394
398
 
395
399
  ```bash
@@ -472,7 +476,7 @@ yarn cross-env \
472
476
 
473
477
  ### WORKFLOW_SCRIPT_MODULES
474
478
 
475
- Workflow JavaScript node available modules list. For details, see "[JavaScript Node: Using External Modules](/workflow/nodes/javascript#using-external-modules)".
479
+ Workflow JavaScript node available modules list. For details, see "[JavaScript Node: Using External Modules](/workflow/nodes/javascript#unsafe-mode-module-support)".
476
480
 
477
481
  ### WORKFLOW_LOOP_LIMIT
478
482
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Usage Instructions
8
8
 
9
- http://localhost:13000/admin/settings/api-keys/configuration
9
+ https://example.com/admin/settings/api-keys
10
10
 
11
11
 
12
12
  ![](https://static-docs.nocobase.com/d64ccbdc8a512a0224e9f81dfe14a0a8.png)
@@ -10,12 +10,12 @@ This plugin is used to embed NocoBase pages into other websites or applications.
10
10
 
11
11
  ## Installation
12
12
 
13
- This is a commercial plugin. For detailed activation instructions, please refer to: [Commercial Plugin Activation Guide](https://www.nocobase.com/en/blog/nocobase-commercial-license-activation-guide)
13
+ Enable the "Embed NocoBase" plugin in the plugin manager to use it.
14
14
 
15
15
 
16
16
  ## User Guide
17
17
 
18
- After activating the interface configuration, click "Copy embedded link" in the page's configuration menu (top right corner).
18
+ After enabling the plugin, click "Copy embedded link" in the page's configuration menu (top right corner).
19
19
 
20
20
 
21
21
  ![](https://static-docs.nocobase.com/f11bd6d5e88d38731d7cd3cb149022c8.png)
@@ -27,4 +27,4 @@ After clicking, you will get a link that can be opened separately, for example,
27
27
  ![](https://static-docs.nocobase.com/9d847805a00fd07372a474665ec0e968.png)
28
28
 
29
29
 
30
- If you want to embed NocoBase pages into other websites or applications, user authentication is required, and the `token` needs to be appended to the link, for example, `https://example.com/embed/qs087rz4o2b?token=xxx`.
30
+ If you want to embed NocoBase pages into other websites or applications, user authentication is required, and the `token` needs to be appended to the link, for example, `https://example.com/embed/qs087rz4o2b?token=xxx`.
@@ -0,0 +1,68 @@
1
+ ---
2
+ pkg: '@nocobase/plugin-app-supervisor'
3
+ title: 'Applications block and app switcher'
4
+ description: 'Applications block and app switcher in multi-app: show sub-app entries on the frontend, configure app icons, visibility, and the app switcher in the upper-left corner.'
5
+ keywords: 'multi-app,Applications block,app switcher,sub-app entry,NocoBase'
6
+ ---
7
+
8
+ # Applications block and app switcher
9
+
10
+ Besides managing sub-apps in the admin panel, multi-app can also provide app entries on the frontend. Common ways include:
11
+
12
+ - Adding an "Applications" block to a page to display accessible sub-apps
13
+ - Enabling the app switcher in the upper-left corner so users can switch between the main app and sub-apps
14
+
15
+ ## Applications block
16
+
17
+ ![](https://static-docs.nocobase.com/202605271350840.png)
18
+
19
+ The "Applications" block displays a list of sub-apps on a frontend page. It is suitable for building a simple app portal, where end users can enter different business apps from one page.
20
+
21
+ Each app in the block displays:
22
+
23
+ - App icon
24
+ - App name
25
+ - Access entry
26
+
27
+ Clicking an app opens the corresponding sub-app.
28
+
29
+ ### Configure app icons
30
+
31
+ When creating or editing an app in App Supervisor, you can upload an app icon in "Display configuration".
32
+
33
+ If no icon is uploaded, the system generates a default icon from the first letter of the app name, making apps easier to distinguish in the list.
34
+
35
+ ![](https://static-docs.nocobase.com/202605271402603.png)
36
+
37
+ ### Hide apps
38
+
39
+ If an app should not appear in the frontend "Applications" block, select "Hide in Applications block" in the app configuration.
40
+
41
+ After it is hidden:
42
+
43
+ - The app can still be managed in the admin panel
44
+ - The app can still be opened through its direct URL
45
+ - It simply no longer appears in the frontend "Applications" block
46
+
47
+ ![](https://static-docs.nocobase.com/202605271403980.png)
48
+
49
+ ## App switcher
50
+
51
+ ![](https://static-docs.nocobase.com/202605271403304.png)
52
+
53
+ The app switcher appears in the upper-left corner and is used to quickly switch to other apps.
54
+
55
+ To show an app in the app switcher, enable "Show in app switcher" in the app configuration.
56
+
57
+ After it is enabled, users can see the app switcher in the upper-left corner of the main app or sub-apps and enter other apps from the list.
58
+
59
+ ![](https://static-docs.nocobase.com/202605271404322.png)
60
+
61
+ ### Opening behavior
62
+
63
+ The app switcher opens apps as follows:
64
+
65
+ - From the main app to a sub-app: opens in a new tab
66
+ - From one sub-app to another: opens in the current tab
67
+
68
+ This avoids interrupting work in the main app while keeping switching between sub-apps natural.
@@ -0,0 +1,71 @@
1
+ ---
2
+ pkg: '@nocobase/plugin-app-supervisor'
3
+ title: 'App SSO'
4
+ description: 'App SSO in multi-app: automatically sign in to sub-apps from the main app or app switcher, with username mapping and automatic user signup.'
5
+ keywords: 'multi-app,App SSO,automatic sign-in,app switcher,sub-app,NocoBase'
6
+ ---
7
+
8
+ # App SSO
9
+
10
+ App SSO simplifies the sign-in flow when users enter sub-apps in a multi-app setup.
11
+
12
+ After it is enabled, when a user enters a sub-app from the main app entry or switches between sub-apps, the system attempts to automatically sign in to the target sub-app as the current user. Users do not need to enter their username and password repeatedly in each sub-app.
13
+
14
+ ## Use cases
15
+
16
+ App SSO is suitable for the following scenarios:
17
+
18
+ - The main app acts as a unified entry, and users enter different business sub-apps from it
19
+ - A system is split into multiple business sub-apps, but the user sign-in experience should remain continuous
20
+ - Users need to switch frequently between multiple sub-apps
21
+ - User accounts are mapped between sub-apps by the same username
22
+
23
+ ## Enable App SSO
24
+
25
+ Go to "App Supervisor", create or edit a sub-app, and enable "App SSO" in "Authentication configuration".
26
+
27
+ After it is enabled, the sub-app can trigger automatic sign-in through the main app entry or the app switcher.
28
+
29
+ > After changing authentication configuration, the sub-app usually needs to be restarted for the change to take effect.
30
+
31
+ ![](https://static-docs.nocobase.com/202605271406542.png)
32
+
33
+ ## Automatic user signup
34
+
35
+ If the corresponding user does not exist in the target sub-app, you can enable "Automatically sign up when user does not exist".
36
+
37
+ After it is enabled, when a user enters a sub-app through App SSO for the first time, the system creates a basic user in the sub-app from the user information in the main app.
38
+
39
+ User mapping is mainly based on username. This means:
40
+
41
+ - If the username is the same in the main app and sub-app, the user signs in as the corresponding sub-app user
42
+ - If the username does not exist in the sub-app, the user is created only when automatic signup is enabled
43
+ - If automatic signup is not enabled, the administrator needs to create the user in the sub-app in advance
44
+
45
+ Roles and permissions after user creation are determined by the sub-app's own user and permission configuration.
46
+
47
+ ## Entries that trigger automatic sign-in
48
+
49
+ App SSO is mainly triggered from:
50
+
51
+ - Entering a sub-app from the main app's app entry
52
+ - Entering a sub-app from the upper-left app switcher
53
+ - Switching from one sub-app to another
54
+
55
+ Directly visiting the sub-app sign-in page or the sub-app's own URL does not force the main app sign-in state. This preserves the sub-app's own sign-in methods and makes it possible to manage sub-app accounts separately when needed.
56
+
57
+ ## FAQ
58
+
59
+ ### Still not signed in automatically after enabling it?
60
+
61
+ Check the following:
62
+
63
+ - Whether App SSO is enabled for the sub-app
64
+ - Whether the sub-app has been restarted so the authentication configuration takes effect
65
+ - Whether the user entered from the main app entry or app switcher
66
+ - Whether a user with the same username exists in the sub-app
67
+ - If the user does not exist, whether automatic signup is enabled
68
+
69
+ ### Why does direct access to a sub-app not automatically sign in?
70
+
71
+ This is expected. When directly visiting a sub-app, the sub-app may need to use its own sign-in method, so the main app sign-in state is not forced.
@@ -8,6 +8,14 @@ pkg: '@nocobase/plugin-app-supervisor'
8
8
 
9
9
  Multi-app management is a unified application management solution provided by NocoBase for creating and managing multiple physically isolated NocoBase application instances in one or more runtime environments. Through the AppSupervisor, users can create and maintain multiple applications from a unified entry point to meet the needs of different businesses and scale stages.
10
10
 
11
+ Multi-app is suitable for the following scenarios:
12
+
13
+ - Splitting a large system into multiple applications by business module, such as CRM, after-sales service, operations, and analytics
14
+ - Letting teams develop by business line or module in parallel, reducing configuration and release impact between modules
15
+ - Creating isolated applications for different customers, tenants, or organizations
16
+ - Creating independent demo, test, or sandbox applications in batches
17
+ - Assigning applications to different runtime environments as application count or load increases
18
+
11
19
  ## Single App
12
20
 
13
21
  In the early stages of a project, most users start with a single app.
@@ -63,4 +71,4 @@ For users, multiple applications can still be created and managed through a sing
63
71
 
64
72
  ![](https://static-docs.nocobase.com/202512231215186.png)
65
73
 
66
- This approach is suitable for SaaS platforms, large numbers of demo environments, or multi-tenant scenarios, improving system stability and maintainability while ensuring flexibility.
74
+ This approach is suitable for SaaS platforms, large numbers of demo environments, or multi-tenant scenarios, improving system stability and maintainability while ensuring flexibility.