@pellux/goodvibes-tui 0.19.24 → 0.19.26
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/CHANGELOG.md +13 -0
- package/README.md +5 -5
- package/bin/goodvibes +10 -0
- package/bin/goodvibes-daemon +10 -0
- package/docs/foundation-artifacts/operator-contract.json +1 -1
- package/package.json +3 -2
- package/src/cli/bundle-command.ts +225 -0
- package/src/cli/completion.ts +90 -0
- package/src/cli/config-overrides.ts +159 -0
- package/src/cli/endpoints.ts +63 -0
- package/src/cli/entrypoint.ts +169 -0
- package/src/cli/help.ts +301 -0
- package/src/cli/index.ts +11 -0
- package/src/cli/management-commands.ts +426 -0
- package/src/cli/management.ts +719 -0
- package/src/cli/network-posture.ts +46 -0
- package/src/cli/package-verification.ts +119 -0
- package/src/cli/parser.ts +369 -0
- package/src/cli/provider-classification.ts +107 -0
- package/src/cli/redaction.ts +105 -0
- package/src/cli/service-command.ts +45 -0
- package/src/cli/service-posture.ts +247 -0
- package/src/cli/status.ts +382 -0
- package/src/cli/surface-command.ts +248 -0
- package/src/cli/tui-startup.ts +32 -0
- package/src/cli/types.ts +69 -0
- package/src/cli-flags.ts +18 -55
- package/src/config/index.ts +1 -1
- package/src/config/secrets.ts +44 -0
- package/src/daemon/cli.ts +62 -11
- package/src/input/command-registry.ts +3 -0
- package/src/input/commands/guidance-runtime.ts +9 -4
- package/src/input/commands/local-runtime.ts +21 -7
- package/src/input/commands/local-setup.ts +31 -38
- package/src/input/commands/onboarding-runtime.ts +14 -0
- package/src/input/commands/runtime-services.ts +9 -0
- package/src/input/commands.ts +2 -0
- package/src/input/feed-context-factory.ts +8 -1
- package/src/input/handler-feed.ts +13 -8
- package/src/input/handler-interactions.ts +266 -0
- package/src/input/handler-modal-stack.ts +23 -3
- package/src/input/handler-modal-token-routes.ts +23 -1
- package/src/input/handler-onboarding.ts +696 -0
- package/src/input/handler-picker-routes.ts +15 -7
- package/src/input/handler-ui-state.ts +58 -0
- package/src/input/handler.ts +120 -246
- package/src/input/onboarding/handler-onboarding-routes.ts +105 -0
- package/src/input/onboarding/onboarding-wizard-apply.ts +211 -0
- package/src/input/onboarding/onboarding-wizard-constants.ts +148 -0
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +712 -0
- package/src/input/onboarding/onboarding-wizard-helpers.ts +218 -0
- package/src/input/onboarding/onboarding-wizard-rules.ts +224 -0
- package/src/input/onboarding/onboarding-wizard-state.ts +354 -0
- package/src/input/onboarding/onboarding-wizard-steps.ts +642 -0
- package/src/input/onboarding/onboarding-wizard-types.ts +170 -0
- package/src/input/onboarding/onboarding-wizard.ts +594 -0
- package/src/main.ts +32 -39
- package/src/panels/builtin/operations.ts +0 -10
- package/src/panels/index.ts +0 -1
- package/src/renderer/conversation-overlays.ts +6 -0
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/onboarding/onboarding-wizard.ts +533 -0
- package/src/runtime/bootstrap-core.ts +1 -0
- package/src/runtime/bootstrap.ts +123 -0
- package/src/runtime/onboarding/apply.ts +685 -0
- package/src/runtime/onboarding/derivation.ts +495 -0
- package/src/runtime/onboarding/index.ts +7 -0
- package/src/runtime/onboarding/markers.ts +161 -0
- package/src/runtime/onboarding/snapshot.ts +400 -0
- package/src/runtime/onboarding/state.ts +140 -0
- package/src/runtime/onboarding/types.ts +402 -0
- package/src/runtime/onboarding/verify.ts +233 -0
- package/src/runtime/ui-services.ts +16 -0
- package/src/shell/ui-openers.ts +12 -2
- package/src/version.ts +1 -1
- package/src/panels/welcome-panel.ts +0 -64
|
@@ -0,0 +1,712 @@
|
|
|
1
|
+
import type { ConfigKey } from '../../config/index.ts';
|
|
2
|
+
import type { OnboardingSnapshotState } from '../../runtime/onboarding/index.ts';
|
|
3
|
+
import { TELEGRAM_MODE_OPTIONS, WHATSAPP_PROVIDER_OPTIONS } from './onboarding-wizard-constants.ts';
|
|
4
|
+
import type { OnboardingWizardRadioOption } from './onboarding-wizard-types.ts';
|
|
5
|
+
|
|
6
|
+
export interface ExternalSurfaceSetupFieldSpec {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly configKey: ConfigKey;
|
|
9
|
+
readonly kind: 'text' | 'masked' | 'radio';
|
|
10
|
+
readonly valueType?: 'string' | 'number';
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly hint: string;
|
|
13
|
+
readonly placeholder: string;
|
|
14
|
+
readonly options?: readonly OnboardingWizardRadioOption[];
|
|
15
|
+
readonly defaultNumber?: number;
|
|
16
|
+
readonly min?: number;
|
|
17
|
+
readonly max?: number;
|
|
18
|
+
readonly defaultValue: (snapshot: OnboardingSnapshotState | null) => string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ExternalSurfaceSpec {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly enabledFieldId: string;
|
|
24
|
+
readonly enabledConfigKey: ConfigKey;
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly hint: string;
|
|
27
|
+
readonly defaultEnabled: (snapshot: OnboardingSnapshotState | null) => boolean;
|
|
28
|
+
readonly fields: readonly ExternalSurfaceSetupFieldSpec[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const EXTERNAL_SURFACE_SPECS: readonly ExternalSurfaceSpec[] = [
|
|
32
|
+
{
|
|
33
|
+
id: 'slack',
|
|
34
|
+
enabledFieldId: 'external-services.slack',
|
|
35
|
+
enabledConfigKey: 'surfaces.slack.enabled',
|
|
36
|
+
label: 'Slack surface',
|
|
37
|
+
hint: 'Enable Slack messages, slash-command/event handling, and thread-aware replies.',
|
|
38
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.slack.enabled ?? false,
|
|
39
|
+
fields: [
|
|
40
|
+
{
|
|
41
|
+
id: 'external-services.slack.bot-token',
|
|
42
|
+
configKey: 'surfaces.slack.botToken',
|
|
43
|
+
kind: 'masked',
|
|
44
|
+
label: 'Slack bot token',
|
|
45
|
+
hint: 'Token used by the Slack bot integration.',
|
|
46
|
+
placeholder: 'xoxb-...',
|
|
47
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.slack.botToken ?? '',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'external-services.slack.app-token',
|
|
51
|
+
configKey: 'surfaces.slack.appToken',
|
|
52
|
+
kind: 'masked',
|
|
53
|
+
label: 'Slack app token',
|
|
54
|
+
hint: 'Optional app-level token for Socket Mode deployments.',
|
|
55
|
+
placeholder: 'xapp-...',
|
|
56
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.slack.appToken ?? '',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'external-services.slack.signing-secret',
|
|
60
|
+
configKey: 'surfaces.slack.signingSecret',
|
|
61
|
+
kind: 'masked',
|
|
62
|
+
label: 'Slack signing secret',
|
|
63
|
+
hint: 'Signing secret used to verify inbound Slack events.',
|
|
64
|
+
placeholder: 'signing secret',
|
|
65
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.slack.signingSecret ?? '',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 'external-services.slack.workspace-id',
|
|
69
|
+
configKey: 'surfaces.slack.workspaceId',
|
|
70
|
+
kind: 'text',
|
|
71
|
+
label: 'Slack workspace ID',
|
|
72
|
+
hint: 'Workspace/team ID used to scope Slack routing.',
|
|
73
|
+
placeholder: 'T...',
|
|
74
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.slack.workspaceId ?? '',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'external-services.slack.default-channel',
|
|
78
|
+
configKey: 'surfaces.slack.defaultChannel',
|
|
79
|
+
kind: 'text',
|
|
80
|
+
label: 'Slack default channel',
|
|
81
|
+
hint: 'Fallback Slack channel for messages that do not specify a target.',
|
|
82
|
+
placeholder: '#goodvibes',
|
|
83
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.slack.defaultChannel ?? '',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 'discord',
|
|
89
|
+
enabledFieldId: 'external-services.discord',
|
|
90
|
+
enabledConfigKey: 'surfaces.discord.enabled',
|
|
91
|
+
label: 'Discord surface',
|
|
92
|
+
hint: 'Enable Discord command/event handling and channel replies.',
|
|
93
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.discord.enabled ?? false,
|
|
94
|
+
fields: [
|
|
95
|
+
{
|
|
96
|
+
id: 'external-services.discord.bot-token',
|
|
97
|
+
configKey: 'surfaces.discord.botToken',
|
|
98
|
+
kind: 'masked',
|
|
99
|
+
label: 'Discord bot token',
|
|
100
|
+
hint: 'Token used by the Discord bot integration.',
|
|
101
|
+
placeholder: 'bot token',
|
|
102
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.discord.botToken ?? '',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'external-services.discord.public-key',
|
|
106
|
+
configKey: 'surfaces.discord.publicKey',
|
|
107
|
+
kind: 'masked',
|
|
108
|
+
label: 'Discord public key',
|
|
109
|
+
hint: 'Application public key for verifying interaction signatures.',
|
|
110
|
+
placeholder: 'public key',
|
|
111
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.discord.publicKey ?? '',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'external-services.discord.application-id',
|
|
115
|
+
configKey: 'surfaces.discord.applicationId',
|
|
116
|
+
kind: 'text',
|
|
117
|
+
label: 'Discord application ID',
|
|
118
|
+
hint: 'Application/client ID for the Discord integration.',
|
|
119
|
+
placeholder: 'application id',
|
|
120
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.discord.applicationId ?? '',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 'external-services.discord.guild-id',
|
|
124
|
+
configKey: 'surfaces.discord.guildId',
|
|
125
|
+
kind: 'text',
|
|
126
|
+
label: 'Discord guild ID',
|
|
127
|
+
hint: 'Optional default server/guild ID.',
|
|
128
|
+
placeholder: 'guild id',
|
|
129
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.discord.guildId ?? '',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'external-services.discord.default-channel-id',
|
|
133
|
+
configKey: 'surfaces.discord.defaultChannelId',
|
|
134
|
+
kind: 'text',
|
|
135
|
+
label: 'Discord default channel ID',
|
|
136
|
+
hint: 'Fallback Discord channel for outbound messages.',
|
|
137
|
+
placeholder: 'channel id',
|
|
138
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.discord.defaultChannelId ?? '',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 'telegram',
|
|
144
|
+
enabledFieldId: 'external-services.telegram',
|
|
145
|
+
enabledConfigKey: 'surfaces.telegram.enabled',
|
|
146
|
+
label: 'Telegram surface',
|
|
147
|
+
hint: 'Enable Telegram bot messaging and event handling.',
|
|
148
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.telegram.enabled ?? false,
|
|
149
|
+
fields: [
|
|
150
|
+
{
|
|
151
|
+
id: 'external-services.telegram.bot-token',
|
|
152
|
+
configKey: 'surfaces.telegram.botToken',
|
|
153
|
+
kind: 'masked',
|
|
154
|
+
label: 'Telegram bot token',
|
|
155
|
+
hint: 'Token issued by BotFather.',
|
|
156
|
+
placeholder: 'bot token',
|
|
157
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.telegram.botToken ?? '',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'external-services.telegram.webhook-secret',
|
|
161
|
+
configKey: 'surfaces.telegram.webhookSecret',
|
|
162
|
+
kind: 'masked',
|
|
163
|
+
label: 'Telegram webhook secret',
|
|
164
|
+
hint: 'Secret token used to verify Telegram webhook requests.',
|
|
165
|
+
placeholder: 'webhook secret',
|
|
166
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.telegram.webhookSecret ?? '',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 'external-services.telegram.default-chat-id',
|
|
170
|
+
configKey: 'surfaces.telegram.defaultChatId',
|
|
171
|
+
kind: 'text',
|
|
172
|
+
label: 'Telegram default chat ID',
|
|
173
|
+
hint: 'Fallback chat ID for outbound Telegram messages.',
|
|
174
|
+
placeholder: 'chat id',
|
|
175
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.telegram.defaultChatId ?? '',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 'external-services.telegram.bot-username',
|
|
179
|
+
configKey: 'surfaces.telegram.botUsername',
|
|
180
|
+
kind: 'text',
|
|
181
|
+
label: 'Telegram bot username',
|
|
182
|
+
hint: 'Bot username used in visible routing labels.',
|
|
183
|
+
placeholder: '@goodvibes_bot',
|
|
184
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.telegram.botUsername ?? '',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 'external-services.telegram.mode',
|
|
188
|
+
configKey: 'surfaces.telegram.mode',
|
|
189
|
+
kind: 'radio',
|
|
190
|
+
label: 'Telegram delivery mode',
|
|
191
|
+
hint: 'Choose webhook or polling transport.',
|
|
192
|
+
placeholder: 'webhook',
|
|
193
|
+
options: TELEGRAM_MODE_OPTIONS,
|
|
194
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.telegram.mode ?? 'webhook',
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'ntfy',
|
|
200
|
+
enabledFieldId: 'external-services.ntfy',
|
|
201
|
+
enabledConfigKey: 'surfaces.ntfy.enabled',
|
|
202
|
+
label: 'ntfy surface',
|
|
203
|
+
hint: 'Enable ntfy notifications for lightweight device alerts.',
|
|
204
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.ntfy.enabled ?? false,
|
|
205
|
+
fields: [
|
|
206
|
+
{
|
|
207
|
+
id: 'external-services.ntfy.base-url',
|
|
208
|
+
configKey: 'surfaces.ntfy.baseUrl',
|
|
209
|
+
kind: 'text',
|
|
210
|
+
label: 'ntfy base URL',
|
|
211
|
+
hint: 'Base URL of the ntfy server.',
|
|
212
|
+
placeholder: 'https://ntfy.sh',
|
|
213
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.ntfy.baseUrl ?? 'https://ntfy.sh',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: 'external-services.ntfy.topic',
|
|
217
|
+
configKey: 'surfaces.ntfy.topic',
|
|
218
|
+
kind: 'text',
|
|
219
|
+
label: 'ntfy topic',
|
|
220
|
+
hint: 'Default ntfy topic for notifications.',
|
|
221
|
+
placeholder: 'goodvibes',
|
|
222
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.ntfy.topic ?? '',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: 'external-services.ntfy.token',
|
|
226
|
+
configKey: 'surfaces.ntfy.token',
|
|
227
|
+
kind: 'masked',
|
|
228
|
+
label: 'ntfy token',
|
|
229
|
+
hint: 'Optional token for authenticated ntfy servers.',
|
|
230
|
+
placeholder: 'token',
|
|
231
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.ntfy.token ?? '',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
id: 'external-services.ntfy.default-priority',
|
|
235
|
+
configKey: 'surfaces.ntfy.defaultPriority',
|
|
236
|
+
kind: 'text',
|
|
237
|
+
valueType: 'number',
|
|
238
|
+
label: 'ntfy default priority',
|
|
239
|
+
hint: 'Default ntfy priority from 1 to 5.',
|
|
240
|
+
placeholder: '3',
|
|
241
|
+
defaultNumber: 3,
|
|
242
|
+
min: 1,
|
|
243
|
+
max: 5,
|
|
244
|
+
defaultValue: (snapshot) => String(snapshot?.config.surfaces.ntfy.defaultPriority ?? 3),
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: 'webhook',
|
|
250
|
+
enabledFieldId: 'external-services.webhook',
|
|
251
|
+
enabledConfigKey: 'surfaces.webhook.enabled',
|
|
252
|
+
label: 'Outbound webhook surface',
|
|
253
|
+
hint: 'Enable outbound webhook delivery targets.',
|
|
254
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.webhook.enabled ?? false,
|
|
255
|
+
fields: [
|
|
256
|
+
{
|
|
257
|
+
id: 'external-services.webhook.default-target',
|
|
258
|
+
configKey: 'surfaces.webhook.defaultTarget',
|
|
259
|
+
kind: 'text',
|
|
260
|
+
label: 'Default webhook target',
|
|
261
|
+
hint: 'Fallback URL used for outbound webhook deliveries.',
|
|
262
|
+
placeholder: 'https://example.com/goodvibes',
|
|
263
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.webhook.defaultTarget ?? '',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: 'external-services.webhook.secret',
|
|
267
|
+
configKey: 'surfaces.webhook.secret',
|
|
268
|
+
kind: 'masked',
|
|
269
|
+
label: 'Webhook signing secret',
|
|
270
|
+
hint: 'Secret used to sign outbound webhook payloads.',
|
|
271
|
+
placeholder: 'secret',
|
|
272
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.webhook.secret ?? '',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
id: 'external-services.webhook.timeout-ms',
|
|
276
|
+
configKey: 'surfaces.webhook.timeoutMs',
|
|
277
|
+
kind: 'text',
|
|
278
|
+
valueType: 'number',
|
|
279
|
+
label: 'Webhook timeout ms',
|
|
280
|
+
hint: 'Request timeout for outbound webhook deliveries.',
|
|
281
|
+
placeholder: '10000',
|
|
282
|
+
defaultNumber: 10000,
|
|
283
|
+
min: 1000,
|
|
284
|
+
max: 60000,
|
|
285
|
+
defaultValue: (snapshot) => String(snapshot?.config.surfaces.webhook.timeoutMs ?? 10000),
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
id: 'googleChat',
|
|
291
|
+
enabledFieldId: 'external-services.google-chat',
|
|
292
|
+
enabledConfigKey: 'surfaces.googleChat.enabled',
|
|
293
|
+
label: 'Google Chat surface',
|
|
294
|
+
hint: 'Enable Google Chat webhook and app routing.',
|
|
295
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.googleChat.enabled ?? false,
|
|
296
|
+
fields: [
|
|
297
|
+
{
|
|
298
|
+
id: 'external-services.google-chat.webhook-url',
|
|
299
|
+
configKey: 'surfaces.googleChat.webhookUrl',
|
|
300
|
+
kind: 'masked',
|
|
301
|
+
label: 'Google Chat webhook URL',
|
|
302
|
+
hint: 'Incoming webhook URL for Google Chat space delivery.',
|
|
303
|
+
placeholder: 'webhook URL',
|
|
304
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.googleChat.webhookUrl ?? '',
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
id: 'external-services.google-chat.verification-token',
|
|
308
|
+
configKey: 'surfaces.googleChat.verificationToken',
|
|
309
|
+
kind: 'masked',
|
|
310
|
+
label: 'Google Chat verification token',
|
|
311
|
+
hint: 'Token used to verify inbound Google Chat events.',
|
|
312
|
+
placeholder: 'verification token',
|
|
313
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.googleChat.verificationToken ?? '',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: 'external-services.google-chat.app-id',
|
|
317
|
+
configKey: 'surfaces.googleChat.appId',
|
|
318
|
+
kind: 'text',
|
|
319
|
+
label: 'Google Chat app ID',
|
|
320
|
+
hint: 'Google Chat app identifier.',
|
|
321
|
+
placeholder: 'app id',
|
|
322
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.googleChat.appId ?? '',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
id: 'external-services.google-chat.space-id',
|
|
326
|
+
configKey: 'surfaces.googleChat.spaceId',
|
|
327
|
+
kind: 'text',
|
|
328
|
+
label: 'Google Chat space ID',
|
|
329
|
+
hint: 'Default Google Chat space for outbound messages.',
|
|
330
|
+
placeholder: 'space id',
|
|
331
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.googleChat.spaceId ?? '',
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
id: 'signal',
|
|
337
|
+
enabledFieldId: 'external-services.signal',
|
|
338
|
+
enabledConfigKey: 'surfaces.signal.enabled',
|
|
339
|
+
label: 'Signal surface',
|
|
340
|
+
hint: 'Enable Signal bridge messaging.',
|
|
341
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.signal.enabled ?? false,
|
|
342
|
+
fields: [
|
|
343
|
+
{
|
|
344
|
+
id: 'external-services.signal.bridge-url',
|
|
345
|
+
configKey: 'surfaces.signal.bridgeUrl',
|
|
346
|
+
kind: 'text',
|
|
347
|
+
label: 'Signal bridge URL',
|
|
348
|
+
hint: 'Base URL for the Signal bridge service.',
|
|
349
|
+
placeholder: 'https://signal-bridge.local',
|
|
350
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.signal.bridgeUrl ?? '',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: 'external-services.signal.account',
|
|
354
|
+
configKey: 'surfaces.signal.account',
|
|
355
|
+
kind: 'text',
|
|
356
|
+
label: 'Signal account',
|
|
357
|
+
hint: 'Signal account identifier used by the bridge.',
|
|
358
|
+
placeholder: '+15551234567',
|
|
359
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.signal.account ?? '',
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
id: 'external-services.signal.token',
|
|
363
|
+
configKey: 'surfaces.signal.token',
|
|
364
|
+
kind: 'masked',
|
|
365
|
+
label: 'Signal bridge token',
|
|
366
|
+
hint: 'Authentication token for the Signal bridge.',
|
|
367
|
+
placeholder: 'token',
|
|
368
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.signal.token ?? '',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: 'external-services.signal.default-recipient',
|
|
372
|
+
configKey: 'surfaces.signal.defaultRecipient',
|
|
373
|
+
kind: 'text',
|
|
374
|
+
label: 'Signal default recipient',
|
|
375
|
+
hint: 'Fallback Signal recipient for outbound messages.',
|
|
376
|
+
placeholder: '+15551234567',
|
|
377
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.signal.defaultRecipient ?? '',
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
id: 'whatsapp',
|
|
383
|
+
enabledFieldId: 'external-services.whatsapp',
|
|
384
|
+
enabledConfigKey: 'surfaces.whatsapp.enabled',
|
|
385
|
+
label: 'WhatsApp surface',
|
|
386
|
+
hint: 'Enable WhatsApp Cloud API or bridge messaging.',
|
|
387
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.whatsapp.enabled ?? false,
|
|
388
|
+
fields: [
|
|
389
|
+
{
|
|
390
|
+
id: 'external-services.whatsapp.provider',
|
|
391
|
+
configKey: 'surfaces.whatsapp.provider',
|
|
392
|
+
kind: 'radio',
|
|
393
|
+
label: 'WhatsApp provider',
|
|
394
|
+
hint: 'Choose Meta Cloud API or a bridge provider.',
|
|
395
|
+
placeholder: 'meta-cloud',
|
|
396
|
+
options: WHATSAPP_PROVIDER_OPTIONS,
|
|
397
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.provider ?? 'meta-cloud',
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
id: 'external-services.whatsapp.access-token',
|
|
401
|
+
configKey: 'surfaces.whatsapp.accessToken',
|
|
402
|
+
kind: 'masked',
|
|
403
|
+
label: 'WhatsApp access token',
|
|
404
|
+
hint: 'Access token for the WhatsApp provider.',
|
|
405
|
+
placeholder: 'access token',
|
|
406
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.accessToken ?? '',
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
id: 'external-services.whatsapp.verify-token',
|
|
410
|
+
configKey: 'surfaces.whatsapp.verifyToken',
|
|
411
|
+
kind: 'masked',
|
|
412
|
+
label: 'WhatsApp verify token',
|
|
413
|
+
hint: 'Verification token for webhook setup.',
|
|
414
|
+
placeholder: 'verify token',
|
|
415
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.verifyToken ?? '',
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
id: 'external-services.whatsapp.signing-secret',
|
|
419
|
+
configKey: 'surfaces.whatsapp.signingSecret',
|
|
420
|
+
kind: 'masked',
|
|
421
|
+
label: 'WhatsApp signing secret',
|
|
422
|
+
hint: 'Secret used to verify signed WhatsApp events.',
|
|
423
|
+
placeholder: 'signing secret',
|
|
424
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.signingSecret ?? '',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
id: 'external-services.whatsapp.phone-number-id',
|
|
428
|
+
configKey: 'surfaces.whatsapp.phoneNumberId',
|
|
429
|
+
kind: 'text',
|
|
430
|
+
label: 'WhatsApp phone number ID',
|
|
431
|
+
hint: 'Phone number ID used by the WhatsApp Cloud API.',
|
|
432
|
+
placeholder: 'phone number id',
|
|
433
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.phoneNumberId ?? '',
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: 'external-services.whatsapp.business-account-id',
|
|
437
|
+
configKey: 'surfaces.whatsapp.businessAccountId',
|
|
438
|
+
kind: 'text',
|
|
439
|
+
label: 'WhatsApp business account ID',
|
|
440
|
+
hint: 'Business account ID for Cloud API routing.',
|
|
441
|
+
placeholder: 'business account id',
|
|
442
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.businessAccountId ?? '',
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: 'external-services.whatsapp.default-recipient',
|
|
446
|
+
configKey: 'surfaces.whatsapp.defaultRecipient',
|
|
447
|
+
kind: 'text',
|
|
448
|
+
label: 'WhatsApp default recipient',
|
|
449
|
+
hint: 'Fallback recipient for outbound WhatsApp messages.',
|
|
450
|
+
placeholder: '+15551234567',
|
|
451
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.whatsapp.defaultRecipient ?? '',
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
id: 'imessage',
|
|
457
|
+
enabledFieldId: 'external-services.imessage',
|
|
458
|
+
enabledConfigKey: 'surfaces.imessage.enabled',
|
|
459
|
+
label: 'iMessage surface',
|
|
460
|
+
hint: 'Enable iMessage bridge messaging.',
|
|
461
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.imessage.enabled ?? false,
|
|
462
|
+
fields: [
|
|
463
|
+
{
|
|
464
|
+
id: 'external-services.imessage.bridge-url',
|
|
465
|
+
configKey: 'surfaces.imessage.bridgeUrl',
|
|
466
|
+
kind: 'text',
|
|
467
|
+
label: 'iMessage bridge URL',
|
|
468
|
+
hint: 'Base URL for the iMessage bridge.',
|
|
469
|
+
placeholder: 'https://imessage-bridge.local',
|
|
470
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.imessage.bridgeUrl ?? '',
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
id: 'external-services.imessage.account',
|
|
474
|
+
configKey: 'surfaces.imessage.account',
|
|
475
|
+
kind: 'text',
|
|
476
|
+
label: 'iMessage account',
|
|
477
|
+
hint: 'Bridge account identifier.',
|
|
478
|
+
placeholder: 'account',
|
|
479
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.imessage.account ?? '',
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
id: 'external-services.imessage.token',
|
|
483
|
+
configKey: 'surfaces.imessage.token',
|
|
484
|
+
kind: 'masked',
|
|
485
|
+
label: 'iMessage bridge token',
|
|
486
|
+
hint: 'Authentication token for the iMessage bridge.',
|
|
487
|
+
placeholder: 'token',
|
|
488
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.imessage.token ?? '',
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
id: 'external-services.imessage.default-chat-id',
|
|
492
|
+
configKey: 'surfaces.imessage.defaultChatId',
|
|
493
|
+
kind: 'text',
|
|
494
|
+
label: 'iMessage default chat ID',
|
|
495
|
+
hint: 'Fallback chat ID for outbound iMessage delivery.',
|
|
496
|
+
placeholder: 'chat id',
|
|
497
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.imessage.defaultChatId ?? '',
|
|
498
|
+
},
|
|
499
|
+
],
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: 'msteams',
|
|
503
|
+
enabledFieldId: 'external-services.msteams',
|
|
504
|
+
enabledConfigKey: 'surfaces.msteams.enabled',
|
|
505
|
+
label: 'Microsoft Teams surface',
|
|
506
|
+
hint: 'Enable Microsoft Teams bot conversations and channel replies.',
|
|
507
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.msteams.enabled ?? false,
|
|
508
|
+
fields: [
|
|
509
|
+
{
|
|
510
|
+
id: 'external-services.msteams.app-id',
|
|
511
|
+
configKey: 'surfaces.msteams.appId',
|
|
512
|
+
kind: 'text',
|
|
513
|
+
label: 'Teams app ID',
|
|
514
|
+
hint: 'Application ID for the Teams bot registration.',
|
|
515
|
+
placeholder: 'app id',
|
|
516
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.appId ?? '',
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
id: 'external-services.msteams.app-password',
|
|
520
|
+
configKey: 'surfaces.msteams.appPassword',
|
|
521
|
+
kind: 'masked',
|
|
522
|
+
label: 'Teams app password',
|
|
523
|
+
hint: 'Client secret for the Teams bot registration.',
|
|
524
|
+
placeholder: 'app password',
|
|
525
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.appPassword ?? '',
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
id: 'external-services.msteams.tenant-id',
|
|
529
|
+
configKey: 'surfaces.msteams.tenantId',
|
|
530
|
+
kind: 'text',
|
|
531
|
+
label: 'Teams tenant ID',
|
|
532
|
+
hint: 'Tenant ID that owns the Teams bot registration.',
|
|
533
|
+
placeholder: 'tenant id',
|
|
534
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.tenantId ?? '',
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
id: 'external-services.msteams.service-url',
|
|
538
|
+
configKey: 'surfaces.msteams.serviceUrl',
|
|
539
|
+
kind: 'text',
|
|
540
|
+
label: 'Teams service URL',
|
|
541
|
+
hint: 'Optional Bot Framework service URL for replies.',
|
|
542
|
+
placeholder: 'https://smba.trafficmanager.net/amer/',
|
|
543
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.serviceUrl ?? '',
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
id: 'external-services.msteams.bot-id',
|
|
547
|
+
configKey: 'surfaces.msteams.botId',
|
|
548
|
+
kind: 'text',
|
|
549
|
+
label: 'Teams bot ID',
|
|
550
|
+
hint: 'Optional bot ID when it differs from the app ID.',
|
|
551
|
+
placeholder: 'bot id',
|
|
552
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.botId ?? '',
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
id: 'external-services.msteams.default-conversation-id',
|
|
556
|
+
configKey: 'surfaces.msteams.defaultConversationId',
|
|
557
|
+
kind: 'text',
|
|
558
|
+
label: 'Teams default conversation ID',
|
|
559
|
+
hint: 'Fallback Teams conversation for outbound messages.',
|
|
560
|
+
placeholder: 'conversation id',
|
|
561
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.defaultConversationId ?? '',
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
id: 'external-services.msteams.default-channel-id',
|
|
565
|
+
configKey: 'surfaces.msteams.defaultChannelId',
|
|
566
|
+
kind: 'text',
|
|
567
|
+
label: 'Teams default channel ID',
|
|
568
|
+
hint: 'Fallback Teams channel for outbound messages.',
|
|
569
|
+
placeholder: 'channel id',
|
|
570
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.msteams.defaultChannelId ?? '',
|
|
571
|
+
},
|
|
572
|
+
],
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
id: 'bluebubbles',
|
|
576
|
+
enabledFieldId: 'external-services.bluebubbles',
|
|
577
|
+
enabledConfigKey: 'surfaces.bluebubbles.enabled',
|
|
578
|
+
label: 'BlueBubbles surface',
|
|
579
|
+
hint: 'Enable BlueBubbles bridge messaging for iMessage-compatible deployments.',
|
|
580
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.bluebubbles.enabled ?? false,
|
|
581
|
+
fields: [
|
|
582
|
+
{
|
|
583
|
+
id: 'external-services.bluebubbles.server-url',
|
|
584
|
+
configKey: 'surfaces.bluebubbles.serverUrl',
|
|
585
|
+
kind: 'text',
|
|
586
|
+
label: 'BlueBubbles server URL',
|
|
587
|
+
hint: 'Base URL of the BlueBubbles server.',
|
|
588
|
+
placeholder: 'https://bluebubbles.local',
|
|
589
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.bluebubbles.serverUrl ?? '',
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
id: 'external-services.bluebubbles.password',
|
|
593
|
+
configKey: 'surfaces.bluebubbles.password',
|
|
594
|
+
kind: 'masked',
|
|
595
|
+
label: 'BlueBubbles password',
|
|
596
|
+
hint: 'Password used to authenticate with BlueBubbles.',
|
|
597
|
+
placeholder: 'password',
|
|
598
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.bluebubbles.password ?? '',
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
id: 'external-services.bluebubbles.account',
|
|
602
|
+
configKey: 'surfaces.bluebubbles.account',
|
|
603
|
+
kind: 'text',
|
|
604
|
+
label: 'BlueBubbles account',
|
|
605
|
+
hint: 'Optional account identifier used by the bridge.',
|
|
606
|
+
placeholder: 'account',
|
|
607
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.bluebubbles.account ?? '',
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
id: 'external-services.bluebubbles.default-chat-guid',
|
|
611
|
+
configKey: 'surfaces.bluebubbles.defaultChatGuid',
|
|
612
|
+
kind: 'text',
|
|
613
|
+
label: 'BlueBubbles default chat GUID',
|
|
614
|
+
hint: 'Fallback chat GUID for outbound BlueBubbles delivery.',
|
|
615
|
+
placeholder: 'chat guid',
|
|
616
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.bluebubbles.defaultChatGuid ?? '',
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
id: 'mattermost',
|
|
622
|
+
enabledFieldId: 'external-services.mattermost',
|
|
623
|
+
enabledConfigKey: 'surfaces.mattermost.enabled',
|
|
624
|
+
label: 'Mattermost surface',
|
|
625
|
+
hint: 'Enable Mattermost bot messaging and channel replies.',
|
|
626
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.mattermost.enabled ?? false,
|
|
627
|
+
fields: [
|
|
628
|
+
{
|
|
629
|
+
id: 'external-services.mattermost.base-url',
|
|
630
|
+
configKey: 'surfaces.mattermost.baseUrl',
|
|
631
|
+
kind: 'text',
|
|
632
|
+
label: 'Mattermost base URL',
|
|
633
|
+
hint: 'Base URL of the Mattermost server.',
|
|
634
|
+
placeholder: 'https://mattermost.example.com',
|
|
635
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.mattermost.baseUrl ?? '',
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
id: 'external-services.mattermost.bot-token',
|
|
639
|
+
configKey: 'surfaces.mattermost.botToken',
|
|
640
|
+
kind: 'masked',
|
|
641
|
+
label: 'Mattermost bot token',
|
|
642
|
+
hint: 'Bot token used for Mattermost API calls.',
|
|
643
|
+
placeholder: 'bot token',
|
|
644
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.mattermost.botToken ?? '',
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
id: 'external-services.mattermost.team-id',
|
|
648
|
+
configKey: 'surfaces.mattermost.teamId',
|
|
649
|
+
kind: 'text',
|
|
650
|
+
label: 'Mattermost team ID',
|
|
651
|
+
hint: 'Optional default team for routing.',
|
|
652
|
+
placeholder: 'team id',
|
|
653
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.mattermost.teamId ?? '',
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
id: 'external-services.mattermost.default-channel-id',
|
|
657
|
+
configKey: 'surfaces.mattermost.defaultChannelId',
|
|
658
|
+
kind: 'text',
|
|
659
|
+
label: 'Mattermost default channel ID',
|
|
660
|
+
hint: 'Fallback Mattermost channel for outbound messages.',
|
|
661
|
+
placeholder: 'channel id',
|
|
662
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.mattermost.defaultChannelId ?? '',
|
|
663
|
+
},
|
|
664
|
+
],
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
id: 'matrix',
|
|
668
|
+
enabledFieldId: 'external-services.matrix',
|
|
669
|
+
enabledConfigKey: 'surfaces.matrix.enabled',
|
|
670
|
+
label: 'Matrix surface',
|
|
671
|
+
hint: 'Enable Matrix bot messaging and room replies.',
|
|
672
|
+
defaultEnabled: (snapshot) => snapshot?.config.surfaces.matrix.enabled ?? false,
|
|
673
|
+
fields: [
|
|
674
|
+
{
|
|
675
|
+
id: 'external-services.matrix.homeserver-url',
|
|
676
|
+
configKey: 'surfaces.matrix.homeserverUrl',
|
|
677
|
+
kind: 'text',
|
|
678
|
+
label: 'Matrix homeserver URL',
|
|
679
|
+
hint: 'Base URL of the Matrix homeserver.',
|
|
680
|
+
placeholder: 'https://matrix.example.com',
|
|
681
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.matrix.homeserverUrl ?? '',
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
id: 'external-services.matrix.access-token',
|
|
685
|
+
configKey: 'surfaces.matrix.accessToken',
|
|
686
|
+
kind: 'masked',
|
|
687
|
+
label: 'Matrix access token',
|
|
688
|
+
hint: 'Access token for the Matrix bot user.',
|
|
689
|
+
placeholder: 'access token',
|
|
690
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.matrix.accessToken ?? '',
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
id: 'external-services.matrix.user-id',
|
|
694
|
+
configKey: 'surfaces.matrix.userId',
|
|
695
|
+
kind: 'text',
|
|
696
|
+
label: 'Matrix user ID',
|
|
697
|
+
hint: 'Matrix user ID for the bot account.',
|
|
698
|
+
placeholder: '@goodvibes:example.com',
|
|
699
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.matrix.userId ?? '',
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
id: 'external-services.matrix.default-room-id',
|
|
703
|
+
configKey: 'surfaces.matrix.defaultRoomId',
|
|
704
|
+
kind: 'text',
|
|
705
|
+
label: 'Matrix default room ID',
|
|
706
|
+
hint: 'Fallback Matrix room for outbound messages.',
|
|
707
|
+
placeholder: '!room:example.com',
|
|
708
|
+
defaultValue: (snapshot) => snapshot?.config.surfaces.matrix.defaultRoomId ?? '',
|
|
709
|
+
},
|
|
710
|
+
],
|
|
711
|
+
},
|
|
712
|
+
];
|