@tx5dr/contracts 1.2.0
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/CLAUDE.md +41 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/schema/__tests__/plugin-runtime-log.schema.test.d.ts +2 -0
- package/dist/schema/__tests__/plugin-runtime-log.schema.test.d.ts.map +1 -0
- package/dist/schema/__tests__/plugin-runtime-log.schema.test.js +78 -0
- package/dist/schema/__tests__/plugin-runtime-log.schema.test.js.map +1 -0
- package/dist/schema/ability.d.ts +85 -0
- package/dist/schema/ability.d.ts.map +1 -0
- package/dist/schema/ability.js +119 -0
- package/dist/schema/ability.js.map +1 -0
- package/dist/schema/api-response.schema.d.ts +1017 -0
- package/dist/schema/api-response.schema.d.ts.map +1 -0
- package/dist/schema/api-response.schema.js +137 -0
- package/dist/schema/api-response.schema.js.map +1 -0
- package/dist/schema/audio-sidecar.schema.d.ts +106 -0
- package/dist/schema/audio-sidecar.schema.d.ts.map +1 -0
- package/dist/schema/audio-sidecar.schema.js +47 -0
- package/dist/schema/audio-sidecar.schema.js.map +1 -0
- package/dist/schema/audio.schema.d.ts +227 -0
- package/dist/schema/audio.schema.d.ts.map +1 -0
- package/dist/schema/audio.schema.js +56 -0
- package/dist/schema/audio.schema.js.map +1 -0
- package/dist/schema/auth.schema.d.ts +738 -0
- package/dist/schema/auth.schema.d.ts.map +1 -0
- package/dist/schema/auth.schema.js +161 -0
- package/dist/schema/auth.schema.js.map +1 -0
- package/dist/schema/cycle.schema.d.ts +33 -0
- package/dist/schema/cycle.schema.d.ts.map +1 -0
- package/dist/schema/cycle.schema.js +23 -0
- package/dist/schema/cycle.schema.js.map +1 -0
- package/dist/schema/desktop-https.schema.d.ts +146 -0
- package/dist/schema/desktop-https.schema.d.ts.map +1 -0
- package/dist/schema/desktop-https.schema.js +31 -0
- package/dist/schema/desktop-https.schema.js.map +1 -0
- package/dist/schema/ft8.schema.d.ts +1107 -0
- package/dist/schema/ft8.schema.d.ts.map +1 -0
- package/dist/schema/ft8.schema.js +268 -0
- package/dist/schema/ft8.schema.js.map +1 -0
- package/dist/schema/hello.schema.d.ts +10 -0
- package/dist/schema/hello.schema.d.ts.map +1 -0
- package/dist/schema/hello.schema.js +5 -0
- package/dist/schema/hello.schema.js.map +1 -0
- package/dist/schema/logbook.schema.d.ts +1472 -0
- package/dist/schema/logbook.schema.d.ts.map +1 -0
- package/dist/schema/logbook.schema.js +256 -0
- package/dist/schema/logbook.schema.js.map +1 -0
- package/dist/schema/mode.schema.d.ts +130 -0
- package/dist/schema/mode.schema.d.ts.map +1 -0
- package/dist/schema/mode.schema.js +141 -0
- package/dist/schema/mode.schema.js.map +1 -0
- package/dist/schema/openwebrx.schema.d.ts +352 -0
- package/dist/schema/openwebrx.schema.d.ts.map +1 -0
- package/dist/schema/openwebrx.schema.js +139 -0
- package/dist/schema/openwebrx.schema.js.map +1 -0
- package/dist/schema/operator.schema.d.ts +883 -0
- package/dist/schema/operator.schema.d.ts.map +1 -0
- package/dist/schema/operator.schema.js +97 -0
- package/dist/schema/operator.schema.js.map +1 -0
- package/dist/schema/plugin.schema.d.ts +1579 -0
- package/dist/schema/plugin.schema.d.ts.map +1 -0
- package/dist/schema/plugin.schema.js +336 -0
- package/dist/schema/plugin.schema.js.map +1 -0
- package/dist/schema/process-monitor.schema.d.ts +282 -0
- package/dist/schema/process-monitor.schema.d.ts.map +1 -0
- package/dist/schema/process-monitor.schema.js +31 -0
- package/dist/schema/process-monitor.schema.js.map +1 -0
- package/dist/schema/pskreporter.schema.d.ts +185 -0
- package/dist/schema/pskreporter.schema.d.ts.map +1 -0
- package/dist/schema/pskreporter.schema.js +80 -0
- package/dist/schema/pskreporter.schema.js.map +1 -0
- package/dist/schema/qso.schema.d.ts +419 -0
- package/dist/schema/qso.schema.d.ts.map +1 -0
- package/dist/schema/qso.schema.js +137 -0
- package/dist/schema/qso.schema.js.map +1 -0
- package/dist/schema/radio-capability.schema.d.ts +625 -0
- package/dist/schema/radio-capability.schema.d.ts.map +1 -0
- package/dist/schema/radio-capability.schema.js +191 -0
- package/dist/schema/radio-capability.schema.js.map +1 -0
- package/dist/schema/radio-power-support.d.ts +45 -0
- package/dist/schema/radio-power-support.d.ts.map +1 -0
- package/dist/schema/radio-power-support.js +64 -0
- package/dist/schema/radio-power-support.js.map +1 -0
- package/dist/schema/radio-power.schema.d.ts +319 -0
- package/dist/schema/radio-power.schema.d.ts.map +1 -0
- package/dist/schema/radio-power.schema.js +87 -0
- package/dist/schema/radio-power.schema.js.map +1 -0
- package/dist/schema/radio-profile.schema.d.ts +2694 -0
- package/dist/schema/radio-profile.schema.d.ts.map +1 -0
- package/dist/schema/radio-profile.schema.js +71 -0
- package/dist/schema/radio-profile.schema.js.map +1 -0
- package/dist/schema/radio.schema.d.ts +1438 -0
- package/dist/schema/radio.schema.d.ts.map +1 -0
- package/dist/schema/radio.schema.js +314 -0
- package/dist/schema/radio.schema.js.map +1 -0
- package/dist/schema/realtime.schema.d.ts +1299 -0
- package/dist/schema/realtime.schema.d.ts.map +1 -0
- package/dist/schema/realtime.schema.js +184 -0
- package/dist/schema/realtime.schema.js.map +1 -0
- package/dist/schema/rigctld.schema.d.ts +151 -0
- package/dist/schema/rigctld.schema.d.ts.map +1 -0
- package/dist/schema/rigctld.schema.js +42 -0
- package/dist/schema/rigctld.schema.js.map +1 -0
- package/dist/schema/server-message-keys.d.ts +21 -0
- package/dist/schema/server-message-keys.d.ts.map +1 -0
- package/dist/schema/server-message-keys.js +22 -0
- package/dist/schema/server-message-keys.js.map +1 -0
- package/dist/schema/slot-info.schema.d.ts +696 -0
- package/dist/schema/slot-info.schema.d.ts.map +1 -0
- package/dist/schema/slot-info.schema.js +144 -0
- package/dist/schema/slot-info.schema.js.map +1 -0
- package/dist/schema/spectrum.schema.d.ts +716 -0
- package/dist/schema/spectrum.schema.d.ts.map +1 -0
- package/dist/schema/spectrum.schema.js +128 -0
- package/dist/schema/spectrum.schema.js.map +1 -0
- package/dist/schema/station-info.schema.d.ts +202 -0
- package/dist/schema/station-info.schema.d.ts.map +1 -0
- package/dist/schema/station-info.schema.js +32 -0
- package/dist/schema/station-info.schema.js.map +1 -0
- package/dist/schema/system.schema.d.ts +113 -0
- package/dist/schema/system.schema.d.ts.map +1 -0
- package/dist/schema/system.schema.js +95 -0
- package/dist/schema/system.schema.js.map +1 -0
- package/dist/schema/transmission.schema.d.ts +413 -0
- package/dist/schema/transmission.schema.d.ts.map +1 -0
- package/dist/schema/transmission.schema.js +78 -0
- package/dist/schema/transmission.schema.js.map +1 -0
- package/dist/schema/voice.schema.d.ts +38 -0
- package/dist/schema/voice.schema.d.ts.map +1 -0
- package/dist/schema/voice.schema.js +24 -0
- package/dist/schema/voice.schema.js.map +1 -0
- package/dist/schema/websocket.schema.d.ts +16916 -0
- package/dist/schema/websocket.schema.d.ts.map +1 -0
- package/dist/schema/websocket.schema.js +1050 -0
- package/dist/schema/websocket.schema.js.map +1 -0
- package/dist/utils/grid.d.ts +13 -0
- package/dist/utils/grid.d.ts.map +1 -0
- package/dist/utils/grid.js +71 -0
- package/dist/utils/grid.js.map +1 -0
- package/eslint.config.js +15 -0
- package/package.json +28 -0
- package/src/index.ts +152 -0
- package/src/schema/__tests__/plugin-runtime-log.schema.test.ts +90 -0
- package/src/schema/ability.ts +205 -0
- package/src/schema/api-response.schema.ts +187 -0
- package/src/schema/audio-sidecar.schema.ts +53 -0
- package/src/schema/audio.schema.ts +73 -0
- package/src/schema/auth.schema.ts +224 -0
- package/src/schema/cycle.schema.ts +25 -0
- package/src/schema/desktop-https.schema.ts +43 -0
- package/src/schema/ft8.schema.ts +362 -0
- package/src/schema/hello.schema.ts +7 -0
- package/src/schema/logbook.schema.ts +310 -0
- package/src/schema/mode.schema.ts +158 -0
- package/src/schema/openwebrx.schema.ts +160 -0
- package/src/schema/operator.schema.ts +112 -0
- package/src/schema/plugin.schema.ts +503 -0
- package/src/schema/process-monitor.schema.ts +41 -0
- package/src/schema/pskreporter.schema.ts +102 -0
- package/src/schema/qso.schema.ts +173 -0
- package/src/schema/radio-capability.schema.ts +244 -0
- package/src/schema/radio-power-support.ts +107 -0
- package/src/schema/radio-power.schema.ts +101 -0
- package/src/schema/radio-profile.schema.ts +91 -0
- package/src/schema/radio.schema.ts +385 -0
- package/src/schema/realtime.schema.ts +262 -0
- package/src/schema/rigctld.schema.ts +51 -0
- package/src/schema/server-message-keys.ts +26 -0
- package/src/schema/slot-info.schema.ts +162 -0
- package/src/schema/spectrum.schema.ts +166 -0
- package/src/schema/station-info.schema.ts +40 -0
- package/src/schema/system.schema.ts +121 -0
- package/src/schema/transmission.schema.ts +105 -0
- package/src/schema/voice.schema.ts +28 -0
- package/src/schema/websocket.schema.ts +1480 -0
- package/src/utils/grid.ts +94 -0
- package/test/mode-schema.test.ts +48 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,1579 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* High-level plugin category.
|
|
4
|
+
*
|
|
5
|
+
* - `strategy`: owns the operator's automation runtime and is mutually
|
|
6
|
+
* exclusive per operator.
|
|
7
|
+
* - `utility`: composes with other utility plugins to filter, score, monitor or
|
|
8
|
+
* augment UI.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PluginTypeSchema: z.ZodEnum<["strategy", "utility"]>;
|
|
11
|
+
/**
|
|
12
|
+
* High-level plugin category used by manifests and runtime status objects.
|
|
13
|
+
*/
|
|
14
|
+
export type PluginType = z.infer<typeof PluginTypeSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Runtime instance scope for a plugin.
|
|
17
|
+
*
|
|
18
|
+
* - `operator`: the host creates one instance per operator.
|
|
19
|
+
* - `global`: the host creates a single shared instance for the whole station.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PluginInstanceScopeSchema: z.ZodEnum<["operator", "global"]>;
|
|
22
|
+
/**
|
|
23
|
+
* Runtime instance scope for a plugin.
|
|
24
|
+
*/
|
|
25
|
+
export type PluginInstanceScope = z.infer<typeof PluginInstanceScopeSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Explicit permission declarations requested by a plugin.
|
|
28
|
+
*
|
|
29
|
+
* Permissions let the host gate sensitive capabilities behind manifest-level
|
|
30
|
+
* intent. Plugins should request the smallest possible set.
|
|
31
|
+
*/
|
|
32
|
+
export declare const PluginPermissionSchema: z.ZodEnum<["network"]>;
|
|
33
|
+
/**
|
|
34
|
+
* Explicit permission declarations requested by a plugin.
|
|
35
|
+
*/
|
|
36
|
+
export type PluginPermission = z.infer<typeof PluginPermissionSchema>;
|
|
37
|
+
/**
|
|
38
|
+
* Built-in frontend renderer kinds supported by declarative plugin panels.
|
|
39
|
+
*/
|
|
40
|
+
export declare const PluginPanelComponentSchema: z.ZodEnum<["table", "key-value", "chart", "log", "iframe"]>;
|
|
41
|
+
/**
|
|
42
|
+
* Built-in frontend renderer kinds supported by declarative plugin panels.
|
|
43
|
+
*/
|
|
44
|
+
export type PluginPanelComponent = z.infer<typeof PluginPanelComponentSchema>;
|
|
45
|
+
/**
|
|
46
|
+
* Supported generated-form field types for plugin settings.
|
|
47
|
+
*
|
|
48
|
+
* These values control both validation expectations and default frontend
|
|
49
|
+
* rendering in plugin settings UIs.
|
|
50
|
+
*/
|
|
51
|
+
export declare const PluginSettingTypeSchema: z.ZodEnum<["boolean", "number", "string", "string[]", "info"]>;
|
|
52
|
+
/**
|
|
53
|
+
* Supported generated-form field types for plugin settings.
|
|
54
|
+
*/
|
|
55
|
+
export type PluginSettingType = z.infer<typeof PluginSettingTypeSchema>;
|
|
56
|
+
/**
|
|
57
|
+
* Label/value pair used by select-like plugin settings.
|
|
58
|
+
*/
|
|
59
|
+
export declare const PluginSettingOptionSchema: z.ZodObject<{
|
|
60
|
+
label: z.ZodString;
|
|
61
|
+
value: z.ZodString;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
value: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}, {
|
|
66
|
+
value: string;
|
|
67
|
+
label: string;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Label/value pair used by select-like plugin settings.
|
|
71
|
+
*/
|
|
72
|
+
export type PluginSettingOption = z.infer<typeof PluginSettingOptionSchema>;
|
|
73
|
+
/**
|
|
74
|
+
* Persistence and UI scope for a plugin setting.
|
|
75
|
+
*
|
|
76
|
+
* - `global`: shared by the whole station and typically edited in plugin
|
|
77
|
+
* management views.
|
|
78
|
+
* - `operator`: isolated per operator and typically edited in operator-specific
|
|
79
|
+
* automation settings.
|
|
80
|
+
*/
|
|
81
|
+
export declare const PluginSettingScopeSchema: z.ZodEnum<["global", "operator"]>;
|
|
82
|
+
/**
|
|
83
|
+
* Persistence and UI scope for a plugin setting.
|
|
84
|
+
*/
|
|
85
|
+
export type PluginSettingScope = z.infer<typeof PluginSettingScopeSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* Declarative description of a persisted plugin setting.
|
|
88
|
+
*
|
|
89
|
+
* The host uses this schema to generate configuration forms, validate updates
|
|
90
|
+
* and resolve default values before injecting them into `ctx.config`.
|
|
91
|
+
*/
|
|
92
|
+
export declare const PluginSettingDescriptorSchema: z.ZodObject<{
|
|
93
|
+
type: z.ZodEnum<["boolean", "number", "string", "string[]", "info"]>;
|
|
94
|
+
default: z.ZodUnknown;
|
|
95
|
+
label: z.ZodString;
|
|
96
|
+
description: z.ZodOptional<z.ZodString>;
|
|
97
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
label: z.ZodString;
|
|
101
|
+
value: z.ZodString;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
value: string;
|
|
104
|
+
label: string;
|
|
105
|
+
}, {
|
|
106
|
+
value: string;
|
|
107
|
+
label: string;
|
|
108
|
+
}>, "many">>;
|
|
109
|
+
/** 设置作用域:global(所有操作员共享)或 operator(每操作员独立),默认 global */
|
|
110
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["global", "operator"]>>>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
113
|
+
label: string;
|
|
114
|
+
scope: "operator" | "global";
|
|
115
|
+
options?: {
|
|
116
|
+
value: string;
|
|
117
|
+
label: string;
|
|
118
|
+
}[] | undefined;
|
|
119
|
+
min?: number | undefined;
|
|
120
|
+
max?: number | undefined;
|
|
121
|
+
description?: string | undefined;
|
|
122
|
+
default?: unknown;
|
|
123
|
+
}, {
|
|
124
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
125
|
+
label: string;
|
|
126
|
+
options?: {
|
|
127
|
+
value: string;
|
|
128
|
+
label: string;
|
|
129
|
+
}[] | undefined;
|
|
130
|
+
min?: number | undefined;
|
|
131
|
+
max?: number | undefined;
|
|
132
|
+
description?: string | undefined;
|
|
133
|
+
default?: unknown;
|
|
134
|
+
scope?: "operator" | "global" | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
/**
|
|
137
|
+
* Declarative description of a persisted plugin setting.
|
|
138
|
+
*
|
|
139
|
+
* `default` is the resolved fallback value, `label`/`description` power the UI,
|
|
140
|
+
* `min` and `max` constrain numeric fields, `options` enumerates valid choices
|
|
141
|
+
* for select-like inputs, and `scope` controls whether the value is shared or
|
|
142
|
+
* operator-specific.
|
|
143
|
+
*/
|
|
144
|
+
export type PluginSettingDescriptor = z.infer<typeof PluginSettingDescriptorSchema>;
|
|
145
|
+
/**
|
|
146
|
+
* Declarative quick-action button shown in operator-facing plugin UI.
|
|
147
|
+
*
|
|
148
|
+
* Quick actions are intended for one-shot commands and are dispatched through
|
|
149
|
+
* the plugin user-action channel when clicked.
|
|
150
|
+
*/
|
|
151
|
+
export declare const PluginQuickActionSchema: z.ZodObject<{
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
label: z.ZodString;
|
|
154
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
id: string;
|
|
157
|
+
label: string;
|
|
158
|
+
icon?: string | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
id: string;
|
|
161
|
+
label: string;
|
|
162
|
+
icon?: string | undefined;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Declarative quick-action button shown in operator-facing plugin UI.
|
|
166
|
+
*/
|
|
167
|
+
export type PluginQuickAction = z.infer<typeof PluginQuickActionSchema>;
|
|
168
|
+
/**
|
|
169
|
+
* Shortcut reference to an operator-scope setting that should be surfaced in a
|
|
170
|
+
* compact quick-settings panel.
|
|
171
|
+
*/
|
|
172
|
+
export declare const PluginQuickSettingSchema: z.ZodObject<{
|
|
173
|
+
settingKey: z.ZodString;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
settingKey: string;
|
|
176
|
+
}, {
|
|
177
|
+
settingKey: string;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Shortcut reference to an operator-scope setting that should be surfaced in a
|
|
181
|
+
* compact quick-settings panel.
|
|
182
|
+
*/
|
|
183
|
+
export type PluginQuickSetting = z.infer<typeof PluginQuickSettingSchema>;
|
|
184
|
+
/**
|
|
185
|
+
* Host-derived capability tags exposed to the frontend.
|
|
186
|
+
*
|
|
187
|
+
* These tags are computed from the plugin definition so the UI can reason
|
|
188
|
+
* about plugin roles without hard-coding specific plugin names.
|
|
189
|
+
*/
|
|
190
|
+
export declare const PluginCapabilitySchema: z.ZodEnum<["auto_call_candidate", "auto_call_execution"]>;
|
|
191
|
+
/**
|
|
192
|
+
* Host-derived capability tags exposed to the frontend.
|
|
193
|
+
*/
|
|
194
|
+
export type PluginCapability = z.infer<typeof PluginCapabilitySchema>;
|
|
195
|
+
/**
|
|
196
|
+
* Rendering slot that determines where a panel appears in the UI.
|
|
197
|
+
*
|
|
198
|
+
* - `operator`: shown in the expanded operator card's live-panel area (default).
|
|
199
|
+
* - `automation`: shown inside the top-right automation quick-action popover.
|
|
200
|
+
*/
|
|
201
|
+
export declare const PluginPanelSlotSchema: z.ZodEnum<["operator", "automation"]>;
|
|
202
|
+
/**
|
|
203
|
+
* Rendering slot that determines where a panel appears in the UI.
|
|
204
|
+
*/
|
|
205
|
+
export type PluginPanelSlot = z.infer<typeof PluginPanelSlotSchema>;
|
|
206
|
+
/**
|
|
207
|
+
* Preferred width hint for plugin-owned panels.
|
|
208
|
+
*
|
|
209
|
+
* Hosts may interpret this hint differently per slot. Today the operator-card
|
|
210
|
+
* host treats `full` as "span the full row on desktop", while automation
|
|
211
|
+
* popover hosts may choose to ignore it.
|
|
212
|
+
*/
|
|
213
|
+
export declare const PluginPanelWidthSchema: z.ZodEnum<["half", "full"]>;
|
|
214
|
+
/**
|
|
215
|
+
* Preferred width hint for plugin-owned panels.
|
|
216
|
+
*/
|
|
217
|
+
export type PluginPanelWidth = z.infer<typeof PluginPanelWidthSchema>;
|
|
218
|
+
/**
|
|
219
|
+
* Declarative definition of a plugin-owned panel in the frontend.
|
|
220
|
+
*
|
|
221
|
+
* Panels are passive containers rendered by the host. A plugin sends data into
|
|
222
|
+
* them through `ctx.ui.send(panelId, data)`. When `component` is `'iframe'`,
|
|
223
|
+
* the panel renders a custom UI page inside a sandboxed iframe instead.
|
|
224
|
+
*/
|
|
225
|
+
export declare const PluginPanelDescriptorSchema: z.ZodObject<{
|
|
226
|
+
id: z.ZodString;
|
|
227
|
+
title: z.ZodString;
|
|
228
|
+
component: z.ZodEnum<["table", "key-value", "chart", "log", "iframe"]>;
|
|
229
|
+
/** Required when `component` is `'iframe'`. References a page id from `ui.pages`. */
|
|
230
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
231
|
+
/** Where the panel renders. Defaults to `'operator'` (operator card live-panel area). */
|
|
232
|
+
slot: z.ZodOptional<z.ZodEnum<["operator", "automation"]>>;
|
|
233
|
+
/** Preferred width hint. Defaults to `'half'`. */
|
|
234
|
+
width: z.ZodOptional<z.ZodEnum<["half", "full"]>>;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
id: string;
|
|
237
|
+
title: string;
|
|
238
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
239
|
+
pageId?: string | undefined;
|
|
240
|
+
slot?: "operator" | "automation" | undefined;
|
|
241
|
+
width?: "full" | "half" | undefined;
|
|
242
|
+
}, {
|
|
243
|
+
id: string;
|
|
244
|
+
title: string;
|
|
245
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
246
|
+
pageId?: string | undefined;
|
|
247
|
+
slot?: "operator" | "automation" | undefined;
|
|
248
|
+
width?: "full" | "half" | undefined;
|
|
249
|
+
}>;
|
|
250
|
+
/**
|
|
251
|
+
* Declarative definition of a plugin-owned panel in the frontend.
|
|
252
|
+
*/
|
|
253
|
+
export type PluginPanelDescriptor = z.infer<typeof PluginPanelDescriptorSchema>;
|
|
254
|
+
/**
|
|
255
|
+
* Declarative descriptor for a custom UI page served from a plugin's static
|
|
256
|
+
* file directory and rendered inside an iframe by the host.
|
|
257
|
+
*
|
|
258
|
+
* Pages are registered in `PluginDefinition.ui.pages` and can be consumed by
|
|
259
|
+
* any host component via `<PluginIframeHost pluginName={...} pageId={...} />`.
|
|
260
|
+
*/
|
|
261
|
+
export declare const PluginUIPageDescriptorSchema: z.ZodObject<{
|
|
262
|
+
/** Unique page identifier within the plugin (e.g. 'settings', 'dashboard'). */
|
|
263
|
+
id: z.ZodString;
|
|
264
|
+
/** Display title (i18n key or literal text). */
|
|
265
|
+
title: z.ZodString;
|
|
266
|
+
/** Entry HTML file path relative to the UI directory (e.g. 'settings.html'). */
|
|
267
|
+
entry: z.ZodString;
|
|
268
|
+
/** Optional icon identifier. */
|
|
269
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
270
|
+
/** Who may access this page through the host iframe bridge. Defaults to admin. */
|
|
271
|
+
accessScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["admin", "operator"]>>>;
|
|
272
|
+
/** Optional resource binding enforced by the host for iframe invoke requests. */
|
|
273
|
+
resourceBinding: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "callsign", "operator"]>>>;
|
|
274
|
+
}, "strip", z.ZodTypeAny, {
|
|
275
|
+
id: string;
|
|
276
|
+
title: string;
|
|
277
|
+
entry: string;
|
|
278
|
+
accessScope: "operator" | "admin";
|
|
279
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
280
|
+
icon?: string | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
id: string;
|
|
283
|
+
title: string;
|
|
284
|
+
entry: string;
|
|
285
|
+
icon?: string | undefined;
|
|
286
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
287
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
288
|
+
}>;
|
|
289
|
+
/**
|
|
290
|
+
* Declarative descriptor for a custom UI page served from a plugin's static
|
|
291
|
+
* file directory.
|
|
292
|
+
*/
|
|
293
|
+
export type PluginUIPageDescriptor = z.infer<typeof PluginUIPageDescriptorSchema>;
|
|
294
|
+
/**
|
|
295
|
+
* Declares that a plugin provides custom UI pages hosted in an iframe.
|
|
296
|
+
*/
|
|
297
|
+
export declare const PluginUIConfigSchema: z.ZodObject<{
|
|
298
|
+
/** Static file directory relative to the plugin root (default: 'ui'). */
|
|
299
|
+
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
300
|
+
/** Registered custom UI pages. */
|
|
301
|
+
pages: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
302
|
+
/** Unique page identifier within the plugin (e.g. 'settings', 'dashboard'). */
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
/** Display title (i18n key or literal text). */
|
|
305
|
+
title: z.ZodString;
|
|
306
|
+
/** Entry HTML file path relative to the UI directory (e.g. 'settings.html'). */
|
|
307
|
+
entry: z.ZodString;
|
|
308
|
+
/** Optional icon identifier. */
|
|
309
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
310
|
+
/** Who may access this page through the host iframe bridge. Defaults to admin. */
|
|
311
|
+
accessScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["admin", "operator"]>>>;
|
|
312
|
+
/** Optional resource binding enforced by the host for iframe invoke requests. */
|
|
313
|
+
resourceBinding: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "callsign", "operator"]>>>;
|
|
314
|
+
}, "strip", z.ZodTypeAny, {
|
|
315
|
+
id: string;
|
|
316
|
+
title: string;
|
|
317
|
+
entry: string;
|
|
318
|
+
accessScope: "operator" | "admin";
|
|
319
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
320
|
+
icon?: string | undefined;
|
|
321
|
+
}, {
|
|
322
|
+
id: string;
|
|
323
|
+
title: string;
|
|
324
|
+
entry: string;
|
|
325
|
+
icon?: string | undefined;
|
|
326
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
327
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
328
|
+
}>, "many">>>;
|
|
329
|
+
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
dir: string;
|
|
331
|
+
pages: {
|
|
332
|
+
id: string;
|
|
333
|
+
title: string;
|
|
334
|
+
entry: string;
|
|
335
|
+
accessScope: "operator" | "admin";
|
|
336
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
337
|
+
icon?: string | undefined;
|
|
338
|
+
}[];
|
|
339
|
+
}, {
|
|
340
|
+
dir?: string | undefined;
|
|
341
|
+
pages?: {
|
|
342
|
+
id: string;
|
|
343
|
+
title: string;
|
|
344
|
+
entry: string;
|
|
345
|
+
icon?: string | undefined;
|
|
346
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
347
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
348
|
+
}[] | undefined;
|
|
349
|
+
}>;
|
|
350
|
+
/**
|
|
351
|
+
* Declares that a plugin provides custom UI pages hosted in an iframe.
|
|
352
|
+
*/
|
|
353
|
+
export type PluginUIConfig = z.infer<typeof PluginUIConfigSchema>;
|
|
354
|
+
/**
|
|
355
|
+
* Storage scope requested by a plugin.
|
|
356
|
+
*/
|
|
357
|
+
export declare const PluginStorageScopeSchema: z.ZodEnum<["global", "operator"]>;
|
|
358
|
+
/**
|
|
359
|
+
* Storage scope requested by a plugin.
|
|
360
|
+
*/
|
|
361
|
+
export type PluginStorageScope = z.infer<typeof PluginStorageScopeSchema>;
|
|
362
|
+
/**
|
|
363
|
+
* Declares which persistent storage scopes the host should provision.
|
|
364
|
+
*/
|
|
365
|
+
export declare const PluginStorageConfigSchema: z.ZodObject<{
|
|
366
|
+
scopes: z.ZodArray<z.ZodEnum<["global", "operator"]>, "many">;
|
|
367
|
+
}, "strip", z.ZodTypeAny, {
|
|
368
|
+
scopes: ("operator" | "global")[];
|
|
369
|
+
}, {
|
|
370
|
+
scopes: ("operator" | "global")[];
|
|
371
|
+
}>;
|
|
372
|
+
/**
|
|
373
|
+
* Declares which persistent storage scopes the host should provision.
|
|
374
|
+
*/
|
|
375
|
+
export type PluginStorageConfig = z.infer<typeof PluginStorageConfigSchema>;
|
|
376
|
+
/**
|
|
377
|
+
* Normalized manifest describing a plugin's static metadata and declarations.
|
|
378
|
+
*
|
|
379
|
+
* This is effectively the serializable subset of a plugin definition that the
|
|
380
|
+
* host can expose to management UI and diagnostics.
|
|
381
|
+
*/
|
|
382
|
+
export declare const PluginManifestSchema: z.ZodObject<{
|
|
383
|
+
name: z.ZodString;
|
|
384
|
+
version: z.ZodString;
|
|
385
|
+
type: z.ZodEnum<["strategy", "utility"]>;
|
|
386
|
+
instanceScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["operator", "global"]>>>;
|
|
387
|
+
description: z.ZodOptional<z.ZodString>;
|
|
388
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["network"]>, "many">>;
|
|
389
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
390
|
+
type: z.ZodEnum<["boolean", "number", "string", "string[]", "info"]>;
|
|
391
|
+
default: z.ZodUnknown;
|
|
392
|
+
label: z.ZodString;
|
|
393
|
+
description: z.ZodOptional<z.ZodString>;
|
|
394
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
395
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
396
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
397
|
+
label: z.ZodString;
|
|
398
|
+
value: z.ZodString;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
value: string;
|
|
401
|
+
label: string;
|
|
402
|
+
}, {
|
|
403
|
+
value: string;
|
|
404
|
+
label: string;
|
|
405
|
+
}>, "many">>;
|
|
406
|
+
/** 设置作用域:global(所有操作员共享)或 operator(每操作员独立),默认 global */
|
|
407
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["global", "operator"]>>>;
|
|
408
|
+
}, "strip", z.ZodTypeAny, {
|
|
409
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
410
|
+
label: string;
|
|
411
|
+
scope: "operator" | "global";
|
|
412
|
+
options?: {
|
|
413
|
+
value: string;
|
|
414
|
+
label: string;
|
|
415
|
+
}[] | undefined;
|
|
416
|
+
min?: number | undefined;
|
|
417
|
+
max?: number | undefined;
|
|
418
|
+
description?: string | undefined;
|
|
419
|
+
default?: unknown;
|
|
420
|
+
}, {
|
|
421
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
422
|
+
label: string;
|
|
423
|
+
options?: {
|
|
424
|
+
value: string;
|
|
425
|
+
label: string;
|
|
426
|
+
}[] | undefined;
|
|
427
|
+
min?: number | undefined;
|
|
428
|
+
max?: number | undefined;
|
|
429
|
+
description?: string | undefined;
|
|
430
|
+
default?: unknown;
|
|
431
|
+
scope?: "operator" | "global" | undefined;
|
|
432
|
+
}>>>;
|
|
433
|
+
quickActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
434
|
+
id: z.ZodString;
|
|
435
|
+
label: z.ZodString;
|
|
436
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
id: string;
|
|
439
|
+
label: string;
|
|
440
|
+
icon?: string | undefined;
|
|
441
|
+
}, {
|
|
442
|
+
id: string;
|
|
443
|
+
label: string;
|
|
444
|
+
icon?: string | undefined;
|
|
445
|
+
}>, "many">>;
|
|
446
|
+
quickSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
447
|
+
settingKey: z.ZodString;
|
|
448
|
+
}, "strip", z.ZodTypeAny, {
|
|
449
|
+
settingKey: string;
|
|
450
|
+
}, {
|
|
451
|
+
settingKey: string;
|
|
452
|
+
}>, "many">>;
|
|
453
|
+
panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
454
|
+
id: z.ZodString;
|
|
455
|
+
title: z.ZodString;
|
|
456
|
+
component: z.ZodEnum<["table", "key-value", "chart", "log", "iframe"]>;
|
|
457
|
+
/** Required when `component` is `'iframe'`. References a page id from `ui.pages`. */
|
|
458
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
459
|
+
/** Where the panel renders. Defaults to `'operator'` (operator card live-panel area). */
|
|
460
|
+
slot: z.ZodOptional<z.ZodEnum<["operator", "automation"]>>;
|
|
461
|
+
/** Preferred width hint. Defaults to `'half'`. */
|
|
462
|
+
width: z.ZodOptional<z.ZodEnum<["half", "full"]>>;
|
|
463
|
+
}, "strip", z.ZodTypeAny, {
|
|
464
|
+
id: string;
|
|
465
|
+
title: string;
|
|
466
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
467
|
+
pageId?: string | undefined;
|
|
468
|
+
slot?: "operator" | "automation" | undefined;
|
|
469
|
+
width?: "full" | "half" | undefined;
|
|
470
|
+
}, {
|
|
471
|
+
id: string;
|
|
472
|
+
title: string;
|
|
473
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
474
|
+
pageId?: string | undefined;
|
|
475
|
+
slot?: "operator" | "automation" | undefined;
|
|
476
|
+
width?: "full" | "half" | undefined;
|
|
477
|
+
}>, "many">>;
|
|
478
|
+
storage: z.ZodOptional<z.ZodObject<{
|
|
479
|
+
scopes: z.ZodArray<z.ZodEnum<["global", "operator"]>, "many">;
|
|
480
|
+
}, "strip", z.ZodTypeAny, {
|
|
481
|
+
scopes: ("operator" | "global")[];
|
|
482
|
+
}, {
|
|
483
|
+
scopes: ("operator" | "global")[];
|
|
484
|
+
}>>;
|
|
485
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
486
|
+
/** Static file directory relative to the plugin root (default: 'ui'). */
|
|
487
|
+
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
488
|
+
/** Registered custom UI pages. */
|
|
489
|
+
pages: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
490
|
+
/** Unique page identifier within the plugin (e.g. 'settings', 'dashboard'). */
|
|
491
|
+
id: z.ZodString;
|
|
492
|
+
/** Display title (i18n key or literal text). */
|
|
493
|
+
title: z.ZodString;
|
|
494
|
+
/** Entry HTML file path relative to the UI directory (e.g. 'settings.html'). */
|
|
495
|
+
entry: z.ZodString;
|
|
496
|
+
/** Optional icon identifier. */
|
|
497
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
498
|
+
/** Who may access this page through the host iframe bridge. Defaults to admin. */
|
|
499
|
+
accessScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["admin", "operator"]>>>;
|
|
500
|
+
/** Optional resource binding enforced by the host for iframe invoke requests. */
|
|
501
|
+
resourceBinding: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "callsign", "operator"]>>>;
|
|
502
|
+
}, "strip", z.ZodTypeAny, {
|
|
503
|
+
id: string;
|
|
504
|
+
title: string;
|
|
505
|
+
entry: string;
|
|
506
|
+
accessScope: "operator" | "admin";
|
|
507
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
508
|
+
icon?: string | undefined;
|
|
509
|
+
}, {
|
|
510
|
+
id: string;
|
|
511
|
+
title: string;
|
|
512
|
+
entry: string;
|
|
513
|
+
icon?: string | undefined;
|
|
514
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
515
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
516
|
+
}>, "many">>>;
|
|
517
|
+
}, "strip", z.ZodTypeAny, {
|
|
518
|
+
dir: string;
|
|
519
|
+
pages: {
|
|
520
|
+
id: string;
|
|
521
|
+
title: string;
|
|
522
|
+
entry: string;
|
|
523
|
+
accessScope: "operator" | "admin";
|
|
524
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
525
|
+
icon?: string | undefined;
|
|
526
|
+
}[];
|
|
527
|
+
}, {
|
|
528
|
+
dir?: string | undefined;
|
|
529
|
+
pages?: {
|
|
530
|
+
id: string;
|
|
531
|
+
title: string;
|
|
532
|
+
entry: string;
|
|
533
|
+
icon?: string | undefined;
|
|
534
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
535
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
536
|
+
}[] | undefined;
|
|
537
|
+
}>>;
|
|
538
|
+
}, "strip", z.ZodTypeAny, {
|
|
539
|
+
type: "strategy" | "utility";
|
|
540
|
+
name: string;
|
|
541
|
+
version: string;
|
|
542
|
+
instanceScope: "operator" | "global";
|
|
543
|
+
description?: string | undefined;
|
|
544
|
+
ui?: {
|
|
545
|
+
dir: string;
|
|
546
|
+
pages: {
|
|
547
|
+
id: string;
|
|
548
|
+
title: string;
|
|
549
|
+
entry: string;
|
|
550
|
+
accessScope: "operator" | "admin";
|
|
551
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
552
|
+
icon?: string | undefined;
|
|
553
|
+
}[];
|
|
554
|
+
} | undefined;
|
|
555
|
+
permissions?: "network"[] | undefined;
|
|
556
|
+
settings?: Record<string, {
|
|
557
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
558
|
+
label: string;
|
|
559
|
+
scope: "operator" | "global";
|
|
560
|
+
options?: {
|
|
561
|
+
value: string;
|
|
562
|
+
label: string;
|
|
563
|
+
}[] | undefined;
|
|
564
|
+
min?: number | undefined;
|
|
565
|
+
max?: number | undefined;
|
|
566
|
+
description?: string | undefined;
|
|
567
|
+
default?: unknown;
|
|
568
|
+
}> | undefined;
|
|
569
|
+
quickActions?: {
|
|
570
|
+
id: string;
|
|
571
|
+
label: string;
|
|
572
|
+
icon?: string | undefined;
|
|
573
|
+
}[] | undefined;
|
|
574
|
+
quickSettings?: {
|
|
575
|
+
settingKey: string;
|
|
576
|
+
}[] | undefined;
|
|
577
|
+
panels?: {
|
|
578
|
+
id: string;
|
|
579
|
+
title: string;
|
|
580
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
581
|
+
pageId?: string | undefined;
|
|
582
|
+
slot?: "operator" | "automation" | undefined;
|
|
583
|
+
width?: "full" | "half" | undefined;
|
|
584
|
+
}[] | undefined;
|
|
585
|
+
storage?: {
|
|
586
|
+
scopes: ("operator" | "global")[];
|
|
587
|
+
} | undefined;
|
|
588
|
+
}, {
|
|
589
|
+
type: "strategy" | "utility";
|
|
590
|
+
name: string;
|
|
591
|
+
version: string;
|
|
592
|
+
description?: string | undefined;
|
|
593
|
+
ui?: {
|
|
594
|
+
dir?: string | undefined;
|
|
595
|
+
pages?: {
|
|
596
|
+
id: string;
|
|
597
|
+
title: string;
|
|
598
|
+
entry: string;
|
|
599
|
+
icon?: string | undefined;
|
|
600
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
601
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
602
|
+
}[] | undefined;
|
|
603
|
+
} | undefined;
|
|
604
|
+
instanceScope?: "operator" | "global" | undefined;
|
|
605
|
+
permissions?: "network"[] | undefined;
|
|
606
|
+
settings?: Record<string, {
|
|
607
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
608
|
+
label: string;
|
|
609
|
+
options?: {
|
|
610
|
+
value: string;
|
|
611
|
+
label: string;
|
|
612
|
+
}[] | undefined;
|
|
613
|
+
min?: number | undefined;
|
|
614
|
+
max?: number | undefined;
|
|
615
|
+
description?: string | undefined;
|
|
616
|
+
default?: unknown;
|
|
617
|
+
scope?: "operator" | "global" | undefined;
|
|
618
|
+
}> | undefined;
|
|
619
|
+
quickActions?: {
|
|
620
|
+
id: string;
|
|
621
|
+
label: string;
|
|
622
|
+
icon?: string | undefined;
|
|
623
|
+
}[] | undefined;
|
|
624
|
+
quickSettings?: {
|
|
625
|
+
settingKey: string;
|
|
626
|
+
}[] | undefined;
|
|
627
|
+
panels?: {
|
|
628
|
+
id: string;
|
|
629
|
+
title: string;
|
|
630
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
631
|
+
pageId?: string | undefined;
|
|
632
|
+
slot?: "operator" | "automation" | undefined;
|
|
633
|
+
width?: "full" | "half" | undefined;
|
|
634
|
+
}[] | undefined;
|
|
635
|
+
storage?: {
|
|
636
|
+
scopes: ("operator" | "global")[];
|
|
637
|
+
} | undefined;
|
|
638
|
+
}>;
|
|
639
|
+
/**
|
|
640
|
+
* Normalized manifest describing a plugin's static metadata and declarations.
|
|
641
|
+
*/
|
|
642
|
+
export type PluginManifest = z.infer<typeof PluginManifestSchema>;
|
|
643
|
+
/**
|
|
644
|
+
* Runtime-facing plugin status snapshot exposed to the frontend.
|
|
645
|
+
*
|
|
646
|
+
* This extends the static manifest with host state such as whether the plugin
|
|
647
|
+
* is loaded, enabled, auto-disabled or currently assigned to operators.
|
|
648
|
+
*/
|
|
649
|
+
export declare const PluginStatusSchema: z.ZodObject<{
|
|
650
|
+
name: z.ZodString;
|
|
651
|
+
type: z.ZodEnum<["strategy", "utility"]>;
|
|
652
|
+
instanceScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["operator", "global"]>>>;
|
|
653
|
+
version: z.ZodString;
|
|
654
|
+
description: z.ZodOptional<z.ZodString>;
|
|
655
|
+
isBuiltIn: z.ZodBoolean;
|
|
656
|
+
loaded: z.ZodDefault<z.ZodBoolean>;
|
|
657
|
+
enabled: z.ZodBoolean;
|
|
658
|
+
/** 是否被自动禁用(连续错误达到阈值) */
|
|
659
|
+
autoDisabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
660
|
+
errorCount: z.ZodNumber;
|
|
661
|
+
lastError: z.ZodOptional<z.ZodString>;
|
|
662
|
+
/** 仅对 strategy 插件有意义:当前被哪些 operator 选中 */
|
|
663
|
+
assignedOperatorIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
664
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
665
|
+
type: z.ZodEnum<["boolean", "number", "string", "string[]", "info"]>;
|
|
666
|
+
default: z.ZodUnknown;
|
|
667
|
+
label: z.ZodString;
|
|
668
|
+
description: z.ZodOptional<z.ZodString>;
|
|
669
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
670
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
671
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
672
|
+
label: z.ZodString;
|
|
673
|
+
value: z.ZodString;
|
|
674
|
+
}, "strip", z.ZodTypeAny, {
|
|
675
|
+
value: string;
|
|
676
|
+
label: string;
|
|
677
|
+
}, {
|
|
678
|
+
value: string;
|
|
679
|
+
label: string;
|
|
680
|
+
}>, "many">>;
|
|
681
|
+
/** 设置作用域:global(所有操作员共享)或 operator(每操作员独立),默认 global */
|
|
682
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["global", "operator"]>>>;
|
|
683
|
+
}, "strip", z.ZodTypeAny, {
|
|
684
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
685
|
+
label: string;
|
|
686
|
+
scope: "operator" | "global";
|
|
687
|
+
options?: {
|
|
688
|
+
value: string;
|
|
689
|
+
label: string;
|
|
690
|
+
}[] | undefined;
|
|
691
|
+
min?: number | undefined;
|
|
692
|
+
max?: number | undefined;
|
|
693
|
+
description?: string | undefined;
|
|
694
|
+
default?: unknown;
|
|
695
|
+
}, {
|
|
696
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
697
|
+
label: string;
|
|
698
|
+
options?: {
|
|
699
|
+
value: string;
|
|
700
|
+
label: string;
|
|
701
|
+
}[] | undefined;
|
|
702
|
+
min?: number | undefined;
|
|
703
|
+
max?: number | undefined;
|
|
704
|
+
description?: string | undefined;
|
|
705
|
+
default?: unknown;
|
|
706
|
+
scope?: "operator" | "global" | undefined;
|
|
707
|
+
}>>>;
|
|
708
|
+
quickActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
709
|
+
id: z.ZodString;
|
|
710
|
+
label: z.ZodString;
|
|
711
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
712
|
+
}, "strip", z.ZodTypeAny, {
|
|
713
|
+
id: string;
|
|
714
|
+
label: string;
|
|
715
|
+
icon?: string | undefined;
|
|
716
|
+
}, {
|
|
717
|
+
id: string;
|
|
718
|
+
label: string;
|
|
719
|
+
icon?: string | undefined;
|
|
720
|
+
}>, "many">>;
|
|
721
|
+
quickSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
722
|
+
settingKey: z.ZodString;
|
|
723
|
+
}, "strip", z.ZodTypeAny, {
|
|
724
|
+
settingKey: string;
|
|
725
|
+
}, {
|
|
726
|
+
settingKey: string;
|
|
727
|
+
}>, "many">>;
|
|
728
|
+
panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
729
|
+
id: z.ZodString;
|
|
730
|
+
title: z.ZodString;
|
|
731
|
+
component: z.ZodEnum<["table", "key-value", "chart", "log", "iframe"]>;
|
|
732
|
+
/** Required when `component` is `'iframe'`. References a page id from `ui.pages`. */
|
|
733
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
734
|
+
/** Where the panel renders. Defaults to `'operator'` (operator card live-panel area). */
|
|
735
|
+
slot: z.ZodOptional<z.ZodEnum<["operator", "automation"]>>;
|
|
736
|
+
/** Preferred width hint. Defaults to `'half'`. */
|
|
737
|
+
width: z.ZodOptional<z.ZodEnum<["half", "full"]>>;
|
|
738
|
+
}, "strip", z.ZodTypeAny, {
|
|
739
|
+
id: string;
|
|
740
|
+
title: string;
|
|
741
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
742
|
+
pageId?: string | undefined;
|
|
743
|
+
slot?: "operator" | "automation" | undefined;
|
|
744
|
+
width?: "full" | "half" | undefined;
|
|
745
|
+
}, {
|
|
746
|
+
id: string;
|
|
747
|
+
title: string;
|
|
748
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
749
|
+
pageId?: string | undefined;
|
|
750
|
+
slot?: "operator" | "automation" | undefined;
|
|
751
|
+
width?: "full" | "half" | undefined;
|
|
752
|
+
}>, "many">>;
|
|
753
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["network"]>, "many">>;
|
|
754
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<["auto_call_candidate", "auto_call_execution"]>, "many">>;
|
|
755
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
756
|
+
/** Static file directory relative to the plugin root (default: 'ui'). */
|
|
757
|
+
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
758
|
+
/** Registered custom UI pages. */
|
|
759
|
+
pages: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
760
|
+
/** Unique page identifier within the plugin (e.g. 'settings', 'dashboard'). */
|
|
761
|
+
id: z.ZodString;
|
|
762
|
+
/** Display title (i18n key or literal text). */
|
|
763
|
+
title: z.ZodString;
|
|
764
|
+
/** Entry HTML file path relative to the UI directory (e.g. 'settings.html'). */
|
|
765
|
+
entry: z.ZodString;
|
|
766
|
+
/** Optional icon identifier. */
|
|
767
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
768
|
+
/** Who may access this page through the host iframe bridge. Defaults to admin. */
|
|
769
|
+
accessScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["admin", "operator"]>>>;
|
|
770
|
+
/** Optional resource binding enforced by the host for iframe invoke requests. */
|
|
771
|
+
resourceBinding: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "callsign", "operator"]>>>;
|
|
772
|
+
}, "strip", z.ZodTypeAny, {
|
|
773
|
+
id: string;
|
|
774
|
+
title: string;
|
|
775
|
+
entry: string;
|
|
776
|
+
accessScope: "operator" | "admin";
|
|
777
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
778
|
+
icon?: string | undefined;
|
|
779
|
+
}, {
|
|
780
|
+
id: string;
|
|
781
|
+
title: string;
|
|
782
|
+
entry: string;
|
|
783
|
+
icon?: string | undefined;
|
|
784
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
785
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
786
|
+
}>, "many">>>;
|
|
787
|
+
}, "strip", z.ZodTypeAny, {
|
|
788
|
+
dir: string;
|
|
789
|
+
pages: {
|
|
790
|
+
id: string;
|
|
791
|
+
title: string;
|
|
792
|
+
entry: string;
|
|
793
|
+
accessScope: "operator" | "admin";
|
|
794
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
795
|
+
icon?: string | undefined;
|
|
796
|
+
}[];
|
|
797
|
+
}, {
|
|
798
|
+
dir?: string | undefined;
|
|
799
|
+
pages?: {
|
|
800
|
+
id: string;
|
|
801
|
+
title: string;
|
|
802
|
+
entry: string;
|
|
803
|
+
icon?: string | undefined;
|
|
804
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
805
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
806
|
+
}[] | undefined;
|
|
807
|
+
}>>;
|
|
808
|
+
locales: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
809
|
+
}, "strip", z.ZodTypeAny, {
|
|
810
|
+
type: "strategy" | "utility";
|
|
811
|
+
name: string;
|
|
812
|
+
enabled: boolean;
|
|
813
|
+
version: string;
|
|
814
|
+
instanceScope: "operator" | "global";
|
|
815
|
+
isBuiltIn: boolean;
|
|
816
|
+
loaded: boolean;
|
|
817
|
+
autoDisabled: boolean;
|
|
818
|
+
errorCount: number;
|
|
819
|
+
description?: string | undefined;
|
|
820
|
+
ui?: {
|
|
821
|
+
dir: string;
|
|
822
|
+
pages: {
|
|
823
|
+
id: string;
|
|
824
|
+
title: string;
|
|
825
|
+
entry: string;
|
|
826
|
+
accessScope: "operator" | "admin";
|
|
827
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
828
|
+
icon?: string | undefined;
|
|
829
|
+
}[];
|
|
830
|
+
} | undefined;
|
|
831
|
+
permissions?: "network"[] | undefined;
|
|
832
|
+
settings?: Record<string, {
|
|
833
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
834
|
+
label: string;
|
|
835
|
+
scope: "operator" | "global";
|
|
836
|
+
options?: {
|
|
837
|
+
value: string;
|
|
838
|
+
label: string;
|
|
839
|
+
}[] | undefined;
|
|
840
|
+
min?: number | undefined;
|
|
841
|
+
max?: number | undefined;
|
|
842
|
+
description?: string | undefined;
|
|
843
|
+
default?: unknown;
|
|
844
|
+
}> | undefined;
|
|
845
|
+
quickActions?: {
|
|
846
|
+
id: string;
|
|
847
|
+
label: string;
|
|
848
|
+
icon?: string | undefined;
|
|
849
|
+
}[] | undefined;
|
|
850
|
+
quickSettings?: {
|
|
851
|
+
settingKey: string;
|
|
852
|
+
}[] | undefined;
|
|
853
|
+
panels?: {
|
|
854
|
+
id: string;
|
|
855
|
+
title: string;
|
|
856
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
857
|
+
pageId?: string | undefined;
|
|
858
|
+
slot?: "operator" | "automation" | undefined;
|
|
859
|
+
width?: "full" | "half" | undefined;
|
|
860
|
+
}[] | undefined;
|
|
861
|
+
lastError?: string | undefined;
|
|
862
|
+
assignedOperatorIds?: string[] | undefined;
|
|
863
|
+
capabilities?: ("auto_call_candidate" | "auto_call_execution")[] | undefined;
|
|
864
|
+
locales?: Record<string, Record<string, string>> | undefined;
|
|
865
|
+
}, {
|
|
866
|
+
type: "strategy" | "utility";
|
|
867
|
+
name: string;
|
|
868
|
+
enabled: boolean;
|
|
869
|
+
version: string;
|
|
870
|
+
isBuiltIn: boolean;
|
|
871
|
+
errorCount: number;
|
|
872
|
+
description?: string | undefined;
|
|
873
|
+
ui?: {
|
|
874
|
+
dir?: string | undefined;
|
|
875
|
+
pages?: {
|
|
876
|
+
id: string;
|
|
877
|
+
title: string;
|
|
878
|
+
entry: string;
|
|
879
|
+
icon?: string | undefined;
|
|
880
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
881
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
882
|
+
}[] | undefined;
|
|
883
|
+
} | undefined;
|
|
884
|
+
instanceScope?: "operator" | "global" | undefined;
|
|
885
|
+
permissions?: "network"[] | undefined;
|
|
886
|
+
settings?: Record<string, {
|
|
887
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
888
|
+
label: string;
|
|
889
|
+
options?: {
|
|
890
|
+
value: string;
|
|
891
|
+
label: string;
|
|
892
|
+
}[] | undefined;
|
|
893
|
+
min?: number | undefined;
|
|
894
|
+
max?: number | undefined;
|
|
895
|
+
description?: string | undefined;
|
|
896
|
+
default?: unknown;
|
|
897
|
+
scope?: "operator" | "global" | undefined;
|
|
898
|
+
}> | undefined;
|
|
899
|
+
quickActions?: {
|
|
900
|
+
id: string;
|
|
901
|
+
label: string;
|
|
902
|
+
icon?: string | undefined;
|
|
903
|
+
}[] | undefined;
|
|
904
|
+
quickSettings?: {
|
|
905
|
+
settingKey: string;
|
|
906
|
+
}[] | undefined;
|
|
907
|
+
panels?: {
|
|
908
|
+
id: string;
|
|
909
|
+
title: string;
|
|
910
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
911
|
+
pageId?: string | undefined;
|
|
912
|
+
slot?: "operator" | "automation" | undefined;
|
|
913
|
+
width?: "full" | "half" | undefined;
|
|
914
|
+
}[] | undefined;
|
|
915
|
+
loaded?: boolean | undefined;
|
|
916
|
+
autoDisabled?: boolean | undefined;
|
|
917
|
+
lastError?: string | undefined;
|
|
918
|
+
assignedOperatorIds?: string[] | undefined;
|
|
919
|
+
capabilities?: ("auto_call_candidate" | "auto_call_execution")[] | undefined;
|
|
920
|
+
locales?: Record<string, Record<string, string>> | undefined;
|
|
921
|
+
}>;
|
|
922
|
+
/**
|
|
923
|
+
* Runtime-facing plugin status snapshot exposed to the frontend.
|
|
924
|
+
*/
|
|
925
|
+
export type PluginStatus = z.infer<typeof PluginStatusSchema>;
|
|
926
|
+
export declare const PluginSystemStateSchema: z.ZodEnum<["ready", "reloading", "error"]>;
|
|
927
|
+
export type PluginSystemState = z.infer<typeof PluginSystemStateSchema>;
|
|
928
|
+
export declare const PluginSystemSnapshotSchema: z.ZodObject<{
|
|
929
|
+
state: z.ZodEnum<["ready", "reloading", "error"]>;
|
|
930
|
+
generation: z.ZodNumber;
|
|
931
|
+
plugins: z.ZodArray<z.ZodObject<{
|
|
932
|
+
name: z.ZodString;
|
|
933
|
+
type: z.ZodEnum<["strategy", "utility"]>;
|
|
934
|
+
instanceScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["operator", "global"]>>>;
|
|
935
|
+
version: z.ZodString;
|
|
936
|
+
description: z.ZodOptional<z.ZodString>;
|
|
937
|
+
isBuiltIn: z.ZodBoolean;
|
|
938
|
+
loaded: z.ZodDefault<z.ZodBoolean>;
|
|
939
|
+
enabled: z.ZodBoolean;
|
|
940
|
+
/** 是否被自动禁用(连续错误达到阈值) */
|
|
941
|
+
autoDisabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
942
|
+
errorCount: z.ZodNumber;
|
|
943
|
+
lastError: z.ZodOptional<z.ZodString>;
|
|
944
|
+
/** 仅对 strategy 插件有意义:当前被哪些 operator 选中 */
|
|
945
|
+
assignedOperatorIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
946
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
947
|
+
type: z.ZodEnum<["boolean", "number", "string", "string[]", "info"]>;
|
|
948
|
+
default: z.ZodUnknown;
|
|
949
|
+
label: z.ZodString;
|
|
950
|
+
description: z.ZodOptional<z.ZodString>;
|
|
951
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
952
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
953
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
954
|
+
label: z.ZodString;
|
|
955
|
+
value: z.ZodString;
|
|
956
|
+
}, "strip", z.ZodTypeAny, {
|
|
957
|
+
value: string;
|
|
958
|
+
label: string;
|
|
959
|
+
}, {
|
|
960
|
+
value: string;
|
|
961
|
+
label: string;
|
|
962
|
+
}>, "many">>;
|
|
963
|
+
/** 设置作用域:global(所有操作员共享)或 operator(每操作员独立),默认 global */
|
|
964
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["global", "operator"]>>>;
|
|
965
|
+
}, "strip", z.ZodTypeAny, {
|
|
966
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
967
|
+
label: string;
|
|
968
|
+
scope: "operator" | "global";
|
|
969
|
+
options?: {
|
|
970
|
+
value: string;
|
|
971
|
+
label: string;
|
|
972
|
+
}[] | undefined;
|
|
973
|
+
min?: number | undefined;
|
|
974
|
+
max?: number | undefined;
|
|
975
|
+
description?: string | undefined;
|
|
976
|
+
default?: unknown;
|
|
977
|
+
}, {
|
|
978
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
979
|
+
label: string;
|
|
980
|
+
options?: {
|
|
981
|
+
value: string;
|
|
982
|
+
label: string;
|
|
983
|
+
}[] | undefined;
|
|
984
|
+
min?: number | undefined;
|
|
985
|
+
max?: number | undefined;
|
|
986
|
+
description?: string | undefined;
|
|
987
|
+
default?: unknown;
|
|
988
|
+
scope?: "operator" | "global" | undefined;
|
|
989
|
+
}>>>;
|
|
990
|
+
quickActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
991
|
+
id: z.ZodString;
|
|
992
|
+
label: z.ZodString;
|
|
993
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
994
|
+
}, "strip", z.ZodTypeAny, {
|
|
995
|
+
id: string;
|
|
996
|
+
label: string;
|
|
997
|
+
icon?: string | undefined;
|
|
998
|
+
}, {
|
|
999
|
+
id: string;
|
|
1000
|
+
label: string;
|
|
1001
|
+
icon?: string | undefined;
|
|
1002
|
+
}>, "many">>;
|
|
1003
|
+
quickSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1004
|
+
settingKey: z.ZodString;
|
|
1005
|
+
}, "strip", z.ZodTypeAny, {
|
|
1006
|
+
settingKey: string;
|
|
1007
|
+
}, {
|
|
1008
|
+
settingKey: string;
|
|
1009
|
+
}>, "many">>;
|
|
1010
|
+
panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1011
|
+
id: z.ZodString;
|
|
1012
|
+
title: z.ZodString;
|
|
1013
|
+
component: z.ZodEnum<["table", "key-value", "chart", "log", "iframe"]>;
|
|
1014
|
+
/** Required when `component` is `'iframe'`. References a page id from `ui.pages`. */
|
|
1015
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
1016
|
+
/** Where the panel renders. Defaults to `'operator'` (operator card live-panel area). */
|
|
1017
|
+
slot: z.ZodOptional<z.ZodEnum<["operator", "automation"]>>;
|
|
1018
|
+
/** Preferred width hint. Defaults to `'half'`. */
|
|
1019
|
+
width: z.ZodOptional<z.ZodEnum<["half", "full"]>>;
|
|
1020
|
+
}, "strip", z.ZodTypeAny, {
|
|
1021
|
+
id: string;
|
|
1022
|
+
title: string;
|
|
1023
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
1024
|
+
pageId?: string | undefined;
|
|
1025
|
+
slot?: "operator" | "automation" | undefined;
|
|
1026
|
+
width?: "full" | "half" | undefined;
|
|
1027
|
+
}, {
|
|
1028
|
+
id: string;
|
|
1029
|
+
title: string;
|
|
1030
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
1031
|
+
pageId?: string | undefined;
|
|
1032
|
+
slot?: "operator" | "automation" | undefined;
|
|
1033
|
+
width?: "full" | "half" | undefined;
|
|
1034
|
+
}>, "many">>;
|
|
1035
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["network"]>, "many">>;
|
|
1036
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<["auto_call_candidate", "auto_call_execution"]>, "many">>;
|
|
1037
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
1038
|
+
/** Static file directory relative to the plugin root (default: 'ui'). */
|
|
1039
|
+
dir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1040
|
+
/** Registered custom UI pages. */
|
|
1041
|
+
pages: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1042
|
+
/** Unique page identifier within the plugin (e.g. 'settings', 'dashboard'). */
|
|
1043
|
+
id: z.ZodString;
|
|
1044
|
+
/** Display title (i18n key or literal text). */
|
|
1045
|
+
title: z.ZodString;
|
|
1046
|
+
/** Entry HTML file path relative to the UI directory (e.g. 'settings.html'). */
|
|
1047
|
+
entry: z.ZodString;
|
|
1048
|
+
/** Optional icon identifier. */
|
|
1049
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1050
|
+
/** Who may access this page through the host iframe bridge. Defaults to admin. */
|
|
1051
|
+
accessScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["admin", "operator"]>>>;
|
|
1052
|
+
/** Optional resource binding enforced by the host for iframe invoke requests. */
|
|
1053
|
+
resourceBinding: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "callsign", "operator"]>>>;
|
|
1054
|
+
}, "strip", z.ZodTypeAny, {
|
|
1055
|
+
id: string;
|
|
1056
|
+
title: string;
|
|
1057
|
+
entry: string;
|
|
1058
|
+
accessScope: "operator" | "admin";
|
|
1059
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
1060
|
+
icon?: string | undefined;
|
|
1061
|
+
}, {
|
|
1062
|
+
id: string;
|
|
1063
|
+
title: string;
|
|
1064
|
+
entry: string;
|
|
1065
|
+
icon?: string | undefined;
|
|
1066
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
1067
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
1068
|
+
}>, "many">>>;
|
|
1069
|
+
}, "strip", z.ZodTypeAny, {
|
|
1070
|
+
dir: string;
|
|
1071
|
+
pages: {
|
|
1072
|
+
id: string;
|
|
1073
|
+
title: string;
|
|
1074
|
+
entry: string;
|
|
1075
|
+
accessScope: "operator" | "admin";
|
|
1076
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
1077
|
+
icon?: string | undefined;
|
|
1078
|
+
}[];
|
|
1079
|
+
}, {
|
|
1080
|
+
dir?: string | undefined;
|
|
1081
|
+
pages?: {
|
|
1082
|
+
id: string;
|
|
1083
|
+
title: string;
|
|
1084
|
+
entry: string;
|
|
1085
|
+
icon?: string | undefined;
|
|
1086
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
1087
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
1088
|
+
}[] | undefined;
|
|
1089
|
+
}>>;
|
|
1090
|
+
locales: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1091
|
+
}, "strip", z.ZodTypeAny, {
|
|
1092
|
+
type: "strategy" | "utility";
|
|
1093
|
+
name: string;
|
|
1094
|
+
enabled: boolean;
|
|
1095
|
+
version: string;
|
|
1096
|
+
instanceScope: "operator" | "global";
|
|
1097
|
+
isBuiltIn: boolean;
|
|
1098
|
+
loaded: boolean;
|
|
1099
|
+
autoDisabled: boolean;
|
|
1100
|
+
errorCount: number;
|
|
1101
|
+
description?: string | undefined;
|
|
1102
|
+
ui?: {
|
|
1103
|
+
dir: string;
|
|
1104
|
+
pages: {
|
|
1105
|
+
id: string;
|
|
1106
|
+
title: string;
|
|
1107
|
+
entry: string;
|
|
1108
|
+
accessScope: "operator" | "admin";
|
|
1109
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
1110
|
+
icon?: string | undefined;
|
|
1111
|
+
}[];
|
|
1112
|
+
} | undefined;
|
|
1113
|
+
permissions?: "network"[] | undefined;
|
|
1114
|
+
settings?: Record<string, {
|
|
1115
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
1116
|
+
label: string;
|
|
1117
|
+
scope: "operator" | "global";
|
|
1118
|
+
options?: {
|
|
1119
|
+
value: string;
|
|
1120
|
+
label: string;
|
|
1121
|
+
}[] | undefined;
|
|
1122
|
+
min?: number | undefined;
|
|
1123
|
+
max?: number | undefined;
|
|
1124
|
+
description?: string | undefined;
|
|
1125
|
+
default?: unknown;
|
|
1126
|
+
}> | undefined;
|
|
1127
|
+
quickActions?: {
|
|
1128
|
+
id: string;
|
|
1129
|
+
label: string;
|
|
1130
|
+
icon?: string | undefined;
|
|
1131
|
+
}[] | undefined;
|
|
1132
|
+
quickSettings?: {
|
|
1133
|
+
settingKey: string;
|
|
1134
|
+
}[] | undefined;
|
|
1135
|
+
panels?: {
|
|
1136
|
+
id: string;
|
|
1137
|
+
title: string;
|
|
1138
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
1139
|
+
pageId?: string | undefined;
|
|
1140
|
+
slot?: "operator" | "automation" | undefined;
|
|
1141
|
+
width?: "full" | "half" | undefined;
|
|
1142
|
+
}[] | undefined;
|
|
1143
|
+
lastError?: string | undefined;
|
|
1144
|
+
assignedOperatorIds?: string[] | undefined;
|
|
1145
|
+
capabilities?: ("auto_call_candidate" | "auto_call_execution")[] | undefined;
|
|
1146
|
+
locales?: Record<string, Record<string, string>> | undefined;
|
|
1147
|
+
}, {
|
|
1148
|
+
type: "strategy" | "utility";
|
|
1149
|
+
name: string;
|
|
1150
|
+
enabled: boolean;
|
|
1151
|
+
version: string;
|
|
1152
|
+
isBuiltIn: boolean;
|
|
1153
|
+
errorCount: number;
|
|
1154
|
+
description?: string | undefined;
|
|
1155
|
+
ui?: {
|
|
1156
|
+
dir?: string | undefined;
|
|
1157
|
+
pages?: {
|
|
1158
|
+
id: string;
|
|
1159
|
+
title: string;
|
|
1160
|
+
entry: string;
|
|
1161
|
+
icon?: string | undefined;
|
|
1162
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
1163
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
1164
|
+
}[] | undefined;
|
|
1165
|
+
} | undefined;
|
|
1166
|
+
instanceScope?: "operator" | "global" | undefined;
|
|
1167
|
+
permissions?: "network"[] | undefined;
|
|
1168
|
+
settings?: Record<string, {
|
|
1169
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
1170
|
+
label: string;
|
|
1171
|
+
options?: {
|
|
1172
|
+
value: string;
|
|
1173
|
+
label: string;
|
|
1174
|
+
}[] | undefined;
|
|
1175
|
+
min?: number | undefined;
|
|
1176
|
+
max?: number | undefined;
|
|
1177
|
+
description?: string | undefined;
|
|
1178
|
+
default?: unknown;
|
|
1179
|
+
scope?: "operator" | "global" | undefined;
|
|
1180
|
+
}> | undefined;
|
|
1181
|
+
quickActions?: {
|
|
1182
|
+
id: string;
|
|
1183
|
+
label: string;
|
|
1184
|
+
icon?: string | undefined;
|
|
1185
|
+
}[] | undefined;
|
|
1186
|
+
quickSettings?: {
|
|
1187
|
+
settingKey: string;
|
|
1188
|
+
}[] | undefined;
|
|
1189
|
+
panels?: {
|
|
1190
|
+
id: string;
|
|
1191
|
+
title: string;
|
|
1192
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
1193
|
+
pageId?: string | undefined;
|
|
1194
|
+
slot?: "operator" | "automation" | undefined;
|
|
1195
|
+
width?: "full" | "half" | undefined;
|
|
1196
|
+
}[] | undefined;
|
|
1197
|
+
loaded?: boolean | undefined;
|
|
1198
|
+
autoDisabled?: boolean | undefined;
|
|
1199
|
+
lastError?: string | undefined;
|
|
1200
|
+
assignedOperatorIds?: string[] | undefined;
|
|
1201
|
+
capabilities?: ("auto_call_candidate" | "auto_call_execution")[] | undefined;
|
|
1202
|
+
locales?: Record<string, Record<string, string>> | undefined;
|
|
1203
|
+
}>, "many">;
|
|
1204
|
+
lastError: z.ZodOptional<z.ZodString>;
|
|
1205
|
+
}, "strip", z.ZodTypeAny, {
|
|
1206
|
+
state: "error" | "ready" | "reloading";
|
|
1207
|
+
generation: number;
|
|
1208
|
+
plugins: {
|
|
1209
|
+
type: "strategy" | "utility";
|
|
1210
|
+
name: string;
|
|
1211
|
+
enabled: boolean;
|
|
1212
|
+
version: string;
|
|
1213
|
+
instanceScope: "operator" | "global";
|
|
1214
|
+
isBuiltIn: boolean;
|
|
1215
|
+
loaded: boolean;
|
|
1216
|
+
autoDisabled: boolean;
|
|
1217
|
+
errorCount: number;
|
|
1218
|
+
description?: string | undefined;
|
|
1219
|
+
ui?: {
|
|
1220
|
+
dir: string;
|
|
1221
|
+
pages: {
|
|
1222
|
+
id: string;
|
|
1223
|
+
title: string;
|
|
1224
|
+
entry: string;
|
|
1225
|
+
accessScope: "operator" | "admin";
|
|
1226
|
+
resourceBinding: "none" | "callsign" | "operator";
|
|
1227
|
+
icon?: string | undefined;
|
|
1228
|
+
}[];
|
|
1229
|
+
} | undefined;
|
|
1230
|
+
permissions?: "network"[] | undefined;
|
|
1231
|
+
settings?: Record<string, {
|
|
1232
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
1233
|
+
label: string;
|
|
1234
|
+
scope: "operator" | "global";
|
|
1235
|
+
options?: {
|
|
1236
|
+
value: string;
|
|
1237
|
+
label: string;
|
|
1238
|
+
}[] | undefined;
|
|
1239
|
+
min?: number | undefined;
|
|
1240
|
+
max?: number | undefined;
|
|
1241
|
+
description?: string | undefined;
|
|
1242
|
+
default?: unknown;
|
|
1243
|
+
}> | undefined;
|
|
1244
|
+
quickActions?: {
|
|
1245
|
+
id: string;
|
|
1246
|
+
label: string;
|
|
1247
|
+
icon?: string | undefined;
|
|
1248
|
+
}[] | undefined;
|
|
1249
|
+
quickSettings?: {
|
|
1250
|
+
settingKey: string;
|
|
1251
|
+
}[] | undefined;
|
|
1252
|
+
panels?: {
|
|
1253
|
+
id: string;
|
|
1254
|
+
title: string;
|
|
1255
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
1256
|
+
pageId?: string | undefined;
|
|
1257
|
+
slot?: "operator" | "automation" | undefined;
|
|
1258
|
+
width?: "full" | "half" | undefined;
|
|
1259
|
+
}[] | undefined;
|
|
1260
|
+
lastError?: string | undefined;
|
|
1261
|
+
assignedOperatorIds?: string[] | undefined;
|
|
1262
|
+
capabilities?: ("auto_call_candidate" | "auto_call_execution")[] | undefined;
|
|
1263
|
+
locales?: Record<string, Record<string, string>> | undefined;
|
|
1264
|
+
}[];
|
|
1265
|
+
lastError?: string | undefined;
|
|
1266
|
+
}, {
|
|
1267
|
+
state: "error" | "ready" | "reloading";
|
|
1268
|
+
generation: number;
|
|
1269
|
+
plugins: {
|
|
1270
|
+
type: "strategy" | "utility";
|
|
1271
|
+
name: string;
|
|
1272
|
+
enabled: boolean;
|
|
1273
|
+
version: string;
|
|
1274
|
+
isBuiltIn: boolean;
|
|
1275
|
+
errorCount: number;
|
|
1276
|
+
description?: string | undefined;
|
|
1277
|
+
ui?: {
|
|
1278
|
+
dir?: string | undefined;
|
|
1279
|
+
pages?: {
|
|
1280
|
+
id: string;
|
|
1281
|
+
title: string;
|
|
1282
|
+
entry: string;
|
|
1283
|
+
icon?: string | undefined;
|
|
1284
|
+
accessScope?: "operator" | "admin" | undefined;
|
|
1285
|
+
resourceBinding?: "none" | "callsign" | "operator" | undefined;
|
|
1286
|
+
}[] | undefined;
|
|
1287
|
+
} | undefined;
|
|
1288
|
+
instanceScope?: "operator" | "global" | undefined;
|
|
1289
|
+
permissions?: "network"[] | undefined;
|
|
1290
|
+
settings?: Record<string, {
|
|
1291
|
+
type: "string" | "number" | "boolean" | "string[]" | "info";
|
|
1292
|
+
label: string;
|
|
1293
|
+
options?: {
|
|
1294
|
+
value: string;
|
|
1295
|
+
label: string;
|
|
1296
|
+
}[] | undefined;
|
|
1297
|
+
min?: number | undefined;
|
|
1298
|
+
max?: number | undefined;
|
|
1299
|
+
description?: string | undefined;
|
|
1300
|
+
default?: unknown;
|
|
1301
|
+
scope?: "operator" | "global" | undefined;
|
|
1302
|
+
}> | undefined;
|
|
1303
|
+
quickActions?: {
|
|
1304
|
+
id: string;
|
|
1305
|
+
label: string;
|
|
1306
|
+
icon?: string | undefined;
|
|
1307
|
+
}[] | undefined;
|
|
1308
|
+
quickSettings?: {
|
|
1309
|
+
settingKey: string;
|
|
1310
|
+
}[] | undefined;
|
|
1311
|
+
panels?: {
|
|
1312
|
+
id: string;
|
|
1313
|
+
title: string;
|
|
1314
|
+
component: "table" | "key-value" | "chart" | "log" | "iframe";
|
|
1315
|
+
pageId?: string | undefined;
|
|
1316
|
+
slot?: "operator" | "automation" | undefined;
|
|
1317
|
+
width?: "full" | "half" | undefined;
|
|
1318
|
+
}[] | undefined;
|
|
1319
|
+
loaded?: boolean | undefined;
|
|
1320
|
+
autoDisabled?: boolean | undefined;
|
|
1321
|
+
lastError?: string | undefined;
|
|
1322
|
+
assignedOperatorIds?: string[] | undefined;
|
|
1323
|
+
capabilities?: ("auto_call_candidate" | "auto_call_execution")[] | undefined;
|
|
1324
|
+
locales?: Record<string, Record<string, string>> | undefined;
|
|
1325
|
+
}[];
|
|
1326
|
+
lastError?: string | undefined;
|
|
1327
|
+
}>;
|
|
1328
|
+
export type PluginSystemSnapshot = z.infer<typeof PluginSystemSnapshotSchema>;
|
|
1329
|
+
export declare const PluginDistributionSchema: z.ZodEnum<["electron", "docker", "linux-service", "generic-server", "web-dev"]>;
|
|
1330
|
+
export type PluginDistribution = z.infer<typeof PluginDistributionSchema>;
|
|
1331
|
+
export declare const PluginRuntimeInfoSchema: z.ZodObject<{
|
|
1332
|
+
pluginDir: z.ZodString;
|
|
1333
|
+
pluginDataDir: z.ZodString;
|
|
1334
|
+
dataDir: z.ZodString;
|
|
1335
|
+
configDir: z.ZodString;
|
|
1336
|
+
logsDir: z.ZodString;
|
|
1337
|
+
cacheDir: z.ZodString;
|
|
1338
|
+
distribution: z.ZodEnum<["electron", "docker", "linux-service", "generic-server", "web-dev"]>;
|
|
1339
|
+
hostPluginDirHint: z.ZodOptional<z.ZodString>;
|
|
1340
|
+
}, "strip", z.ZodTypeAny, {
|
|
1341
|
+
pluginDir: string;
|
|
1342
|
+
pluginDataDir: string;
|
|
1343
|
+
dataDir: string;
|
|
1344
|
+
configDir: string;
|
|
1345
|
+
logsDir: string;
|
|
1346
|
+
cacheDir: string;
|
|
1347
|
+
distribution: "electron" | "docker" | "linux-service" | "generic-server" | "web-dev";
|
|
1348
|
+
hostPluginDirHint?: string | undefined;
|
|
1349
|
+
}, {
|
|
1350
|
+
pluginDir: string;
|
|
1351
|
+
pluginDataDir: string;
|
|
1352
|
+
dataDir: string;
|
|
1353
|
+
configDir: string;
|
|
1354
|
+
logsDir: string;
|
|
1355
|
+
cacheDir: string;
|
|
1356
|
+
distribution: "electron" | "docker" | "linux-service" | "generic-server" | "web-dev";
|
|
1357
|
+
hostPluginDirHint?: string | undefined;
|
|
1358
|
+
}>;
|
|
1359
|
+
export type PluginRuntimeInfo = z.infer<typeof PluginRuntimeInfoSchema>;
|
|
1360
|
+
/**
|
|
1361
|
+
* 单个插件的持久化配置
|
|
1362
|
+
*/
|
|
1363
|
+
export declare const PluginConfigEntrySchema: z.ZodObject<{
|
|
1364
|
+
enabled: z.ZodBoolean;
|
|
1365
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1366
|
+
}, "strip", z.ZodTypeAny, {
|
|
1367
|
+
enabled: boolean;
|
|
1368
|
+
settings: Record<string, unknown>;
|
|
1369
|
+
}, {
|
|
1370
|
+
enabled: boolean;
|
|
1371
|
+
settings: Record<string, unknown>;
|
|
1372
|
+
}>;
|
|
1373
|
+
export type PluginConfigEntry = z.infer<typeof PluginConfigEntrySchema>;
|
|
1374
|
+
/**
|
|
1375
|
+
* 所有插件的持久化配置
|
|
1376
|
+
*/
|
|
1377
|
+
export declare const PluginsConfigSchema: z.ZodObject<{
|
|
1378
|
+
/** 全局插件配置(enabled 状态 + global scope settings) */
|
|
1379
|
+
configs: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1380
|
+
enabled: z.ZodBoolean;
|
|
1381
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1382
|
+
}, "strip", z.ZodTypeAny, {
|
|
1383
|
+
enabled: boolean;
|
|
1384
|
+
settings: Record<string, unknown>;
|
|
1385
|
+
}, {
|
|
1386
|
+
enabled: boolean;
|
|
1387
|
+
settings: Record<string, unknown>;
|
|
1388
|
+
}>>>>;
|
|
1389
|
+
/** 每操作员的策略插件选择 */
|
|
1390
|
+
operatorStrategies: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1391
|
+
/** 每操作员的 operator scope plugin settings:operatorId → pluginName → settings */
|
|
1392
|
+
operatorSettings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>>;
|
|
1393
|
+
}, "strip", z.ZodTypeAny, {
|
|
1394
|
+
configs: Record<string, {
|
|
1395
|
+
enabled: boolean;
|
|
1396
|
+
settings: Record<string, unknown>;
|
|
1397
|
+
}>;
|
|
1398
|
+
operatorStrategies: Record<string, string>;
|
|
1399
|
+
operatorSettings: Record<string, Record<string, Record<string, unknown>>>;
|
|
1400
|
+
}, {
|
|
1401
|
+
configs?: Record<string, {
|
|
1402
|
+
enabled: boolean;
|
|
1403
|
+
settings: Record<string, unknown>;
|
|
1404
|
+
}> | undefined;
|
|
1405
|
+
operatorStrategies?: Record<string, string> | undefined;
|
|
1406
|
+
operatorSettings?: Record<string, Record<string, Record<string, unknown>>> | undefined;
|
|
1407
|
+
}>;
|
|
1408
|
+
export type PluginsConfig = z.infer<typeof PluginsConfigSchema>;
|
|
1409
|
+
/**
|
|
1410
|
+
* 插件数据推送载荷(ctx.ui.send() 发送到前端)
|
|
1411
|
+
*/
|
|
1412
|
+
export declare const PluginDataPayloadSchema: z.ZodObject<{
|
|
1413
|
+
pluginName: z.ZodString;
|
|
1414
|
+
operatorId: z.ZodString;
|
|
1415
|
+
panelId: z.ZodString;
|
|
1416
|
+
data: z.ZodUnknown;
|
|
1417
|
+
}, "strip", z.ZodTypeAny, {
|
|
1418
|
+
operatorId: string;
|
|
1419
|
+
pluginName: string;
|
|
1420
|
+
panelId: string;
|
|
1421
|
+
data?: unknown;
|
|
1422
|
+
}, {
|
|
1423
|
+
operatorId: string;
|
|
1424
|
+
pluginName: string;
|
|
1425
|
+
panelId: string;
|
|
1426
|
+
data?: unknown;
|
|
1427
|
+
}>;
|
|
1428
|
+
export type PluginDataPayload = z.infer<typeof PluginDataPayloadSchema>;
|
|
1429
|
+
/**
|
|
1430
|
+
* 插件日志条目
|
|
1431
|
+
*/
|
|
1432
|
+
export declare const PluginLogEntrySchema: z.ZodObject<{
|
|
1433
|
+
pluginName: z.ZodString;
|
|
1434
|
+
level: z.ZodEnum<["debug", "info", "warn", "error"]>;
|
|
1435
|
+
message: z.ZodString;
|
|
1436
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
1437
|
+
timestamp: z.ZodNumber;
|
|
1438
|
+
}, "strip", z.ZodTypeAny, {
|
|
1439
|
+
message: string;
|
|
1440
|
+
timestamp: number;
|
|
1441
|
+
pluginName: string;
|
|
1442
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1443
|
+
data?: unknown;
|
|
1444
|
+
}, {
|
|
1445
|
+
message: string;
|
|
1446
|
+
timestamp: number;
|
|
1447
|
+
pluginName: string;
|
|
1448
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1449
|
+
data?: unknown;
|
|
1450
|
+
}>;
|
|
1451
|
+
export type PluginLogEntry = z.infer<typeof PluginLogEntrySchema>;
|
|
1452
|
+
export declare const PluginRuntimeLogStageSchema: z.ZodEnum<["scan", "load", "validate", "reload", "activate"]>;
|
|
1453
|
+
export type PluginRuntimeLogStage = z.infer<typeof PluginRuntimeLogStageSchema>;
|
|
1454
|
+
/**
|
|
1455
|
+
* 宿主级插件运行日志条目
|
|
1456
|
+
*/
|
|
1457
|
+
export declare const PluginRuntimeLogEntrySchema: z.ZodObject<{
|
|
1458
|
+
source: z.ZodLiteral<"system">;
|
|
1459
|
+
stage: z.ZodEnum<["scan", "load", "validate", "reload", "activate"]>;
|
|
1460
|
+
level: z.ZodEnum<["debug", "info", "warn", "error"]>;
|
|
1461
|
+
message: z.ZodString;
|
|
1462
|
+
timestamp: z.ZodNumber;
|
|
1463
|
+
pluginName: z.ZodOptional<z.ZodString>;
|
|
1464
|
+
directoryName: z.ZodOptional<z.ZodString>;
|
|
1465
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
1466
|
+
}, "strip", z.ZodTypeAny, {
|
|
1467
|
+
message: string;
|
|
1468
|
+
timestamp: number;
|
|
1469
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1470
|
+
source: "system";
|
|
1471
|
+
stage: "scan" | "load" | "validate" | "reload" | "activate";
|
|
1472
|
+
pluginName?: string | undefined;
|
|
1473
|
+
directoryName?: string | undefined;
|
|
1474
|
+
details?: unknown;
|
|
1475
|
+
}, {
|
|
1476
|
+
message: string;
|
|
1477
|
+
timestamp: number;
|
|
1478
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1479
|
+
source: "system";
|
|
1480
|
+
stage: "scan" | "load" | "validate" | "reload" | "activate";
|
|
1481
|
+
pluginName?: string | undefined;
|
|
1482
|
+
directoryName?: string | undefined;
|
|
1483
|
+
details?: unknown;
|
|
1484
|
+
}>;
|
|
1485
|
+
export type PluginRuntimeLogEntry = z.infer<typeof PluginRuntimeLogEntrySchema>;
|
|
1486
|
+
/**
|
|
1487
|
+
* 宿主级插件运行日志历史响应载荷
|
|
1488
|
+
*/
|
|
1489
|
+
export declare const PluginRuntimeLogHistoryPayloadSchema: z.ZodObject<{
|
|
1490
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1491
|
+
source: z.ZodLiteral<"system">;
|
|
1492
|
+
stage: z.ZodEnum<["scan", "load", "validate", "reload", "activate"]>;
|
|
1493
|
+
level: z.ZodEnum<["debug", "info", "warn", "error"]>;
|
|
1494
|
+
message: z.ZodString;
|
|
1495
|
+
timestamp: z.ZodNumber;
|
|
1496
|
+
pluginName: z.ZodOptional<z.ZodString>;
|
|
1497
|
+
directoryName: z.ZodOptional<z.ZodString>;
|
|
1498
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
1499
|
+
}, "strip", z.ZodTypeAny, {
|
|
1500
|
+
message: string;
|
|
1501
|
+
timestamp: number;
|
|
1502
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1503
|
+
source: "system";
|
|
1504
|
+
stage: "scan" | "load" | "validate" | "reload" | "activate";
|
|
1505
|
+
pluginName?: string | undefined;
|
|
1506
|
+
directoryName?: string | undefined;
|
|
1507
|
+
details?: unknown;
|
|
1508
|
+
}, {
|
|
1509
|
+
message: string;
|
|
1510
|
+
timestamp: number;
|
|
1511
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1512
|
+
source: "system";
|
|
1513
|
+
stage: "scan" | "load" | "validate" | "reload" | "activate";
|
|
1514
|
+
pluginName?: string | undefined;
|
|
1515
|
+
directoryName?: string | undefined;
|
|
1516
|
+
details?: unknown;
|
|
1517
|
+
}>, "many">;
|
|
1518
|
+
}, "strip", z.ZodTypeAny, {
|
|
1519
|
+
entries: {
|
|
1520
|
+
message: string;
|
|
1521
|
+
timestamp: number;
|
|
1522
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1523
|
+
source: "system";
|
|
1524
|
+
stage: "scan" | "load" | "validate" | "reload" | "activate";
|
|
1525
|
+
pluginName?: string | undefined;
|
|
1526
|
+
directoryName?: string | undefined;
|
|
1527
|
+
details?: unknown;
|
|
1528
|
+
}[];
|
|
1529
|
+
}, {
|
|
1530
|
+
entries: {
|
|
1531
|
+
message: string;
|
|
1532
|
+
timestamp: number;
|
|
1533
|
+
level: "error" | "info" | "debug" | "warn";
|
|
1534
|
+
source: "system";
|
|
1535
|
+
stage: "scan" | "load" | "validate" | "reload" | "activate";
|
|
1536
|
+
pluginName?: string | undefined;
|
|
1537
|
+
directoryName?: string | undefined;
|
|
1538
|
+
details?: unknown;
|
|
1539
|
+
}[];
|
|
1540
|
+
}>;
|
|
1541
|
+
export type PluginRuntimeLogHistoryPayload = z.infer<typeof PluginRuntimeLogHistoryPayloadSchema>;
|
|
1542
|
+
/**
|
|
1543
|
+
* 插件用户操作载荷(前端 → 后端)
|
|
1544
|
+
*/
|
|
1545
|
+
export declare const PluginUserActionPayloadSchema: z.ZodObject<{
|
|
1546
|
+
pluginName: z.ZodString;
|
|
1547
|
+
actionId: z.ZodString;
|
|
1548
|
+
operatorId: z.ZodOptional<z.ZodString>;
|
|
1549
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
1550
|
+
}, "strip", z.ZodTypeAny, {
|
|
1551
|
+
pluginName: string;
|
|
1552
|
+
actionId: string;
|
|
1553
|
+
operatorId?: string | undefined;
|
|
1554
|
+
payload?: unknown;
|
|
1555
|
+
}, {
|
|
1556
|
+
pluginName: string;
|
|
1557
|
+
actionId: string;
|
|
1558
|
+
operatorId?: string | undefined;
|
|
1559
|
+
payload?: unknown;
|
|
1560
|
+
}>;
|
|
1561
|
+
export type PluginUserActionPayload = z.infer<typeof PluginUserActionPayloadSchema>;
|
|
1562
|
+
/**
|
|
1563
|
+
* 操作员维度的插件设置更新载荷
|
|
1564
|
+
*/
|
|
1565
|
+
export declare const PluginOperatorSettingsPayloadSchema: z.ZodObject<{
|
|
1566
|
+
pluginName: z.ZodString;
|
|
1567
|
+
operatorId: z.ZodString;
|
|
1568
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1569
|
+
}, "strip", z.ZodTypeAny, {
|
|
1570
|
+
operatorId: string;
|
|
1571
|
+
settings: Record<string, unknown>;
|
|
1572
|
+
pluginName: string;
|
|
1573
|
+
}, {
|
|
1574
|
+
operatorId: string;
|
|
1575
|
+
settings: Record<string, unknown>;
|
|
1576
|
+
pluginName: string;
|
|
1577
|
+
}>;
|
|
1578
|
+
export type PluginOperatorSettingsPayload = z.infer<typeof PluginOperatorSettingsPayloadSchema>;
|
|
1579
|
+
//# sourceMappingURL=plugin.schema.d.ts.map
|