@nocobase/plugin-ai 2.1.0-beta.46 → 2.1.0-beta.47
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/api/cli/config/delete.md +7 -5
- package/dist/ai/docs/nocobase/api/cli/config/get.md +7 -5
- package/dist/ai/docs/nocobase/api/cli/config/index.md +38 -18
- package/dist/ai/docs/nocobase/api/cli/config/set.md +9 -7
- package/dist/ai/docs/nocobase/api/cli/env/index.md +19 -20
- package/dist/ai/docs/nocobase/api/cli/env/update.md +72 -72
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/current.md +33 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/generate.md +54 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/index.md +60 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/info.md +42 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/reload.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/restart.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/start.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/status.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/stop.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/caddy/use.md +38 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/index.md +124 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/current.md +33 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/generate.md +62 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/index.md +60 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/info.md +43 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/reload.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/restart.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/start.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/status.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/stop.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/proxy/nginx/use.md +38 -0
- package/dist/ai/docs/nocobase/ops-management/version-control/index.md +73 -0
- package/dist/ai/docs/nocobase/quickstart/production/index.md +75 -69
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/caddy.md +211 -80
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/index.md +72 -53
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/nginx.md +186 -89
- package/dist/client/{290.0888139e33c9b7cb.js → 290.0f7f441d8a94f03c.js} +1 -1
- package/dist/client/{428.431a00d29107058e.js → 428.fdd0cc3cfd1632ef.js} +1 -1
- package/dist/client/ai-employees/chatbox/hooks/useChat.d.ts +14 -14
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +1 -105
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +1 -37
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +1 -109
- package/dist/client/index.js +3 -3
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +17 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +113 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +45 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +118 -0
- package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +18 -0
- package/dist/client-v2/ai-employees/chatbox/stores/global-store.d.ts +9 -0
- package/dist/client-v2/ai-employees/types.d.ts +151 -0
- package/dist/client-v2/index.d.ts +8 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/repositories/AIConfigRepository.d.ts +81 -0
- package/dist/client-v2/repositories/hooks/useAIConfigRepository.d.ts +10 -0
- package/dist/collections/ai-context-datasource.js +1 -0
- package/dist/externalVersion.js +16 -16
- 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/collections/ai-conversations.js +1 -0
- package/dist/server/collections/ai-employees.js +1 -0
- package/dist/server/collections/ai-files.js +1 -0
- package/dist/server/collections/ai-messages.js +1 -0
- package/dist/server/collections/ai-settings.js +1 -0
- package/dist/server/collections/ai-tool-messages.js +1 -0
- package/dist/server/collections/lc-checkpoint-blobs.js +1 -0
- package/dist/server/collections/lc-checkpoint-writes.js +1 -0
- package/dist/server/collections/lc-checkpoints.js +1 -0
- package/dist/server/collections/llm-services.js +1 -0
- package/dist/server/collections/users-ai-employees.js +1 -0
- package/package.json +2 -2
- package/dist/ai/docs/nocobase/api/cli/env/proxy/caddy.md +0 -108
- package/dist/ai/docs/nocobase/api/cli/env/proxy/index.md +0 -54
- package/dist/ai/docs/nocobase/api/cli/env/proxy/nginx.md +0 -104
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'nb env proxy nginx'
|
|
3
|
-
description: 'nb env proxy nginx command reference: generate Nginx proxy config files and helper files for one CLI-managed env.'
|
|
4
|
-
keywords: 'nb env proxy nginx,NocoBase CLI,nginx,reverse proxy,proxy configuration'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# nb env proxy nginx
|
|
8
|
-
|
|
9
|
-
`nb env proxy nginx` generates Nginx proxy config files and helper files for one CLI-managed env. It fits these cases well: you already use Nginx to manage sites, or you still want to manage certificates, caching, or access control yourself.
|
|
10
|
-
|
|
11
|
-
This command only works for managed envs whose runtime is reachable from the current machine, which means `local` or `docker`. It does not currently work for envs that only have a remote API connection or for SSH envs.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
nb env proxy nginx [name] [flags]
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
| Parameter | Type | Description |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| `[name]` | string | Name of the configured env to generate a proxy config for. Uses the current env when omitted |
|
|
24
|
-
| `--env`, `-e` | string | Explicitly specify the env name. This form is usually recommended |
|
|
25
|
-
| `--host` | string | Host written into the entry config, such as `example.com` or `localhost` |
|
|
26
|
-
| `--port` | string | Port written into the entry config. This is the proxy entry port, not the upstream NocoBase app port |
|
|
27
|
-
| `--install` | boolean | Install the shared proxy config into the Nginx main config |
|
|
28
|
-
| `--reload` | boolean | Validate and reload Nginx after writing files |
|
|
29
|
-
| `--print` | boolean | Print the rendered `app.conf` directly instead of writing files |
|
|
30
|
-
|
|
31
|
-
## Default output
|
|
32
|
-
|
|
33
|
-
`nb env proxy nginx` maintains these files under `~/.nocobase/proxy/nginx/`:
|
|
34
|
-
|
|
35
|
-
| File | Purpose |
|
|
36
|
-
| --- | --- |
|
|
37
|
-
| `~/.nocobase/proxy/nginx/<env>/app.conf` | Editable site entry file. The CLI refreshes the managed block inside it, and you can add site-level config around that block |
|
|
38
|
-
| `~/.nocobase/proxy/nginx/<env>/public/index-v1.html` | v1 SPA fallback page generated from the current active client's `index.html` |
|
|
39
|
-
| `~/.nocobase/proxy/nginx/<env>/public/index-v2.html` | v2 SPA fallback page generated from the current active client's `v/index.html` |
|
|
40
|
-
| `~/.nocobase/proxy/nginx/nocobase.conf` | Shared main config that includes every env `app.conf` |
|
|
41
|
-
| `~/.nocobase/proxy/nginx/snippets/` | Shared snippets directory copied from built-in templates |
|
|
42
|
-
|
|
43
|
-
Where:
|
|
44
|
-
|
|
45
|
-
- `app.conf` is editable, but you should keep the managed block between `# BEGIN NocoBase managed config` and `# END NocoBase managed config`
|
|
46
|
-
- `index-v1.html` and `index-v2.html` automatically rewrite asset URLs according to the current env subpath, active client version, and `CDN_BASE_URL`
|
|
47
|
-
- `nocobase.conf` is mainly used by `--install`
|
|
48
|
-
- Files under `public/` and `snippets/` are usually not meant to be edited manually and will be resynced the next time you run the command
|
|
49
|
-
|
|
50
|
-
:::warning Note
|
|
51
|
-
|
|
52
|
-
If you need to add site-level Nginx config, edit `app.conf`. Do not manually edit managed files under `public/` or `snippets/`, because they will be overwritten the next time you run `nb env proxy nginx`.
|
|
53
|
-
|
|
54
|
-
:::
|
|
55
|
-
|
|
56
|
-
## Related configuration items
|
|
57
|
-
|
|
58
|
-
These CLI configuration items directly affect the generated Nginx output:
|
|
59
|
-
|
|
60
|
-
| Configuration item | Default value | Description |
|
|
61
|
-
| --- | --- | --- |
|
|
62
|
-
| `proxy.nb-cli-root` | CLI root, usually the current user's home directory | Map the `.nocobase` path to the root path that Nginx actually sees |
|
|
63
|
-
| `proxy.upstream-host` | `127.0.0.1` | Host used when the proxy forwards traffic back to the NocoBase app |
|
|
64
|
-
| `bin.nginx` | `nginx` | Path to the Nginx executable used by `--install` or `--reload` |
|
|
65
|
-
|
|
66
|
-
Most setups do not need to change `proxy.nb-cli-root`. You usually need it only when Nginx runs in another container, mount root, or path view.
|
|
67
|
-
|
|
68
|
-
## Notes
|
|
69
|
-
|
|
70
|
-
- `--port` must be an integer between `1` and `65535`
|
|
71
|
-
- The upstream NocoBase app port comes from the saved env `appPort`, not from `--port`
|
|
72
|
-
- If the command says the env is missing `appPort`, run `nb env update <name>` first, or explicitly save it with `nb env update <name> --app-port <port>`
|
|
73
|
-
- If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun `nb env proxy nginx` afterward
|
|
74
|
-
- `--print` cannot be combined with `--install` or `--reload`
|
|
75
|
-
- The Nginx provider does not support `--output`
|
|
76
|
-
|
|
77
|
-
## Examples
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Generate an Nginx config for the current env
|
|
81
|
-
nb env proxy nginx
|
|
82
|
-
|
|
83
|
-
# Generate a config for one env
|
|
84
|
-
nb env proxy nginx --env demo
|
|
85
|
-
|
|
86
|
-
# Write the public host and port into the entry config
|
|
87
|
-
nb env proxy nginx --env demo --host demo.local.nocobase.com --port 8080
|
|
88
|
-
|
|
89
|
-
# Print the rendered app.conf without writing files
|
|
90
|
-
nb env proxy nginx --env demo --print
|
|
91
|
-
|
|
92
|
-
# Map the .nocobase path when Nginx runs under another mount root
|
|
93
|
-
nb config set proxy.nb-cli-root /workspace
|
|
94
|
-
|
|
95
|
-
# Install the shared config into the Nginx main config and reload immediately
|
|
96
|
-
nb env proxy nginx --env demo --install --reload
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Related commands
|
|
100
|
-
|
|
101
|
-
- [`nb env proxy`](./index.md)
|
|
102
|
-
- [`nb env proxy caddy`](./caddy.md)
|
|
103
|
-
- [`nb env update`](../update.md)
|
|
104
|
-
- [`nb config`](../../config/index.md)
|