mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-17 11:14:19 +00:00
feat(platform): show deployment outbound IPs on adapter config forms
Cloud/NAT deployments couldn't complete WeCom-family / Official Account / QQ Official setup because the trusted-IP (IP whitelist) value — the server's egress IPs — was nowhere visible in LangBot. - config.yaml: new system.outbound_ips list (env: SYSTEM__OUTBOUND_IPS, comma-separated), exposed via GET /api/v1/system/info - dynamic form: generic __system.*-named display-only fields resolved from systemContext (same namespace as show_if), one read-only row per value with a copy button, excluded from form state and emitted values; hidden entirely when the deployment provides no IPs - manifests: trusted-IP display field for wecom, wecomcs, wecombot, officialaccount, qqofficial Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -348,6 +348,10 @@ export interface ApiRespSystemInfo {
|
||||
allow_modify_login_info: boolean;
|
||||
disable_models_service: boolean;
|
||||
limitation: SystemLimitation;
|
||||
/** Public outbound IPs of the deployment (``system.outbound_ips`` in
|
||||
* config.yaml). Shown on adapter config forms whose platform requires
|
||||
* trusted-IP / IP-whitelist settings. Empty = not configured. */
|
||||
outbound_ips: string[];
|
||||
wizard_status: string; // 'none' | 'skipped' | 'completed'
|
||||
wizard_progress: WizardProgress | null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { I18nObject } from '@/app/infra/entities/common';
|
||||
|
||||
/** Namespace prefix shared by ``show_if.field`` references and display-only
|
||||
* form item names whose value is resolved from the caller-supplied
|
||||
* ``DynamicFormComponent.systemContext``. */
|
||||
export const SYSTEM_FIELD_PREFIX = '__system.';
|
||||
|
||||
export interface IShowIfCondition {
|
||||
field: string;
|
||||
operator: 'eq' | 'neq' | 'in';
|
||||
@@ -11,6 +16,12 @@ export interface IDynamicFormItemSchema {
|
||||
id: string;
|
||||
default: string | number | boolean | Array<unknown>;
|
||||
label: I18nObject;
|
||||
/** Form value key. Names prefixed with ``__system.`` denote display-only
|
||||
* fields whose value is resolved from
|
||||
* ``DynamicFormComponent.systemContext`` (e.g. ``__system.outbound_ips``
|
||||
* → ``systemContext.outbound_ips``) — same namespace as ``show_if``.
|
||||
* Such fields are rendered read-only with copy buttons, excluded from
|
||||
* form state/validation/emission, and hidden when the value is empty. */
|
||||
name: string;
|
||||
required: boolean;
|
||||
type: DynamicFormItemType;
|
||||
|
||||
@@ -16,6 +16,7 @@ export const systemInfo: ApiRespSystemInfo = {
|
||||
max_pipelines: -1,
|
||||
max_extensions: -1,
|
||||
},
|
||||
outbound_ips: [],
|
||||
wizard_status: 'none',
|
||||
wizard_progress: null,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user