@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.
- package/dist/ai/docs/nocobase/ai-dev/capabilities.md +1 -1
- package/dist/ai/docs/nocobase/ai-dev/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-dev/watermark-plugin.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/app/index.md +4 -4
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +4 -2
- package/dist/ai/docs/nocobase/api/cli/app/start.md +6 -2
- package/dist/ai/docs/nocobase/api/cli/app/stop.md +2 -2
- package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +27 -6
- package/dist/ai/docs/nocobase/api/cli/config/delete.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/config/get.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/config/index.md +21 -0
- package/dist/ai/docs/nocobase/api/cli/config/set.md +9 -2
- package/dist/ai/docs/nocobase/api/cli/init.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/license/plugins/sync.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/self/update.md +2 -0
- package/dist/ai/docs/nocobase/auth-verification/api-keys/index.md +1 -1
- package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +17 -0
- package/dist/ai/docs/nocobase/get-started/installation/env.md +6 -2
- package/dist/ai/docs/nocobase/integration/api-keys/index.md +1 -1
- package/dist/ai/docs/nocobase/integration/embed/index.md +3 -3
- package/dist/ai/docs/nocobase/multi-app/multi-app/app-block-and-switcher.md +68 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/app-sso.md +71 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/index.md +9 -1
- package/dist/ai/docs/nocobase/multi-app/multi-app/sub-app-api.md +112 -0
- package/dist/ai/docs/nocobase/plugin-development/build.md +5 -0
- package/dist/ai/docs/nocobase/plugin-development/client/appendix/faq.md +3 -3
- package/dist/ai/docs/nocobase/plugin-development/client/component/index.md +1 -1
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/common-capabilities.md +2 -2
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/index.md +1 -1
- package/dist/ai/docs/nocobase/plugin-development/client/router.md +11 -11
- package/dist/ai/docs/nocobase/plugin-development/write-your-first-plugin.md +28 -0
- package/dist/ai/docs/nocobase/solution/all-in-one/installation.md +181 -0
- package/dist/ai/docs/nocobase/solution/crm/changelog.md +0 -3
- package/dist/ai/docs/nocobase/solution/crm/installation.md +6 -76
- package/dist/ai/docs/nocobase/solution/crm/v1.md +6 -35
- package/dist/ai/docs/nocobase/solution/ticket-system/changelog.md +0 -2
- package/dist/ai/docs/nocobase/solution/ticket-system/installation.md +6 -69
- package/dist/ai/docs/nocobase/workflow/nodes/javascript.md +4 -2
- package/dist/client/{406.15c09d98faa2ccf1.js → 406.9a530334eae8cede.js} +1 -1
- package/dist/client/{428.e9f38da3b0d8b498.js → 428.431a00d29107058e.js} +1 -1
- package/dist/client/462.d172d0fe91519e35.js +10 -0
- package/dist/client/559.a0f2f1cc2be3c039.js +10 -0
- package/dist/client/index.js +2 -2
- package/dist/client/workflow/nodes/employee/index.d.ts +1 -4
- package/dist/client/workflow/nodes/llm/index.d.ts +1 -4
- package/dist/client-v2/index.js +1 -1
- package/dist/collections/ai-employees.d.ts +9 -2
- package/dist/collections/ai-employees.js +2 -1
- package/dist/externalVersion.js +22 -22
- package/dist/locale/de-DE.json +1 -0
- package/dist/locale/en-US.json +2 -1
- package/dist/locale/es-ES.json +1 -0
- package/dist/locale/fr-FR.json +1 -0
- package/dist/locale/hu-HU.json +1 -0
- package/dist/locale/id-ID.json +1 -0
- package/dist/locale/it-IT.json +1 -0
- package/dist/locale/ja-JP.json +1 -0
- package/dist/locale/ko-KR.json +1 -0
- package/dist/locale/nl-NL.json +1 -0
- package/dist/locale/pt-BR.json +1 -0
- package/dist/locale/ru-RU.json +1 -0
- package/dist/locale/tr-TR.json +1 -0
- package/dist/locale/uk-UA.json +1 -0
- package/dist/locale/vi-VN.json +1 -0
- package/dist/locale/zh-CN.json +2 -1
- package/dist/locale/zh-TW.json +1 -0
- package/dist/node_modules/@langchain/xai/dist/index.cjs +16 -2
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.d.ts +2 -1
- package/dist/server/ai-employees/ai-employee.js +3 -1
- package/dist/server/llm-providers/anthropic.js +17 -23
- package/dist/server/llm-providers/dashscope.js +3 -3
- package/dist/server/llm-providers/deepseek.js +2 -2
- package/dist/server/llm-providers/google-genai.js +17 -22
- package/dist/server/llm-providers/kimi/provider.js +4 -4
- package/dist/server/llm-providers/mimo.js +2 -2
- package/dist/server/llm-providers/ollama.js +14 -21
- package/dist/server/llm-providers/openai/completions.js +2 -2
- package/dist/server/llm-providers/openai/embedding.js +1 -1
- package/dist/server/llm-providers/openai/responses.js +2 -2
- package/dist/server/llm-providers/provider.d.ts +3 -1
- package/dist/server/llm-providers/provider.js +61 -24
- package/dist/server/llm-providers/xai.js +2 -2
- package/dist/server/resource/ai.js +11 -9
- package/dist/server/utils.d.ts +1 -1
- package/dist/server/workflow/nodes/employee/constants.d.ts +23 -0
- package/dist/server/workflow/nodes/employee/constants.js +50 -0
- package/dist/server/workflow/nodes/employee/handler.js +23 -2
- package/dist/server/workflow/nodes/employee/index.d.ts +1 -0
- package/dist/server/workflow/nodes/employee/index.js +83 -25
- package/dist/server/workflow/nodes/employee/tools.d.ts +2 -2
- package/dist/server/workflow/nodes/employee/tools.js +26 -5
- package/dist/server/workflow/nodes/employee/types.d.ts +4 -3
- package/dist/server/workflow/nodes/llm/index.js +31 -9
- package/package.json +7 -7
- package/dist/client/462.1708385b148779cd.js +0 -10
- 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 `/
|
|
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 `/
|
|
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 `/
|
|
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
|
|
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) |
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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.
|
|
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
|
-
| `--
|
|
24
|
-
| `--
|
|
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
|
|
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 -
|
|
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`,
|
|
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`,
|
|
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`,
|
|
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`,
|
|
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
|
-
| `--
|
|
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
|
|
|
@@ -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-
|
|
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#
|
|
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
|
|
|
@@ -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
|
-
|
|
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
|
|
18
|
+
After enabling the plugin, click "Copy embedded link" in the page's configuration menu (top right corner).
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|

|
|
@@ -27,4 +27,4 @@ After clicking, you will get a link that can be opened separately, for example,
|
|
|
27
27
|

|
|
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
|
+

|
|
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
|
+

|
|
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
|
+

|
|
48
|
+
|
|
49
|
+
## App switcher
|
|
50
|
+
|
|
51
|
+

|
|
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
|
+

|
|
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
|
+

|
|
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
|

|
|
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.
|