@12-apps/mcp 3.5.1 → 3.7.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/ADOPTING.md +69 -1
- package/dist/chunk-FBUSSQSK.js +22 -0
- package/dist/chunk-FBUSSQSK.js.map +1 -0
- package/dist/{chunk-FYEVBTDU.js → chunk-HRAQKMDC.js} +12 -20
- package/dist/chunk-HRAQKMDC.js.map +1 -0
- package/dist/{guide-DV5MQbCg.d.ts → guide-KQNcXlMG.d.ts} +32 -17
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/oauth/index.d.ts +1 -1
- package/dist/oauth/index.js +1 -1
- package/dist/pt-BR-e1RnV2v8.d.ts +25 -0
- package/dist/react/index.d.ts +208 -30
- package/dist/react/index.js +341 -151
- package/dist/react/index.js.map +1 -1
- package/package.json +4 -4
- package/src/guide.ts +33 -165
- package/src/index.ts +8 -3
- package/src/pt-BR.ts +195 -0
- package/src/react/ai-capabilities.tsx +10 -6
- package/src/react/ai-connection-utils.ts +18 -13
- package/src/react/ai-flow-steps.tsx +63 -43
- package/src/react/ai-landing.tsx +47 -21
- package/src/react/ai-onboarding.tsx +31 -25
- package/src/react/ai-status-board.tsx +31 -16
- package/src/react/ai-steps.tsx +60 -23
- package/src/react/copy.ts +165 -0
- package/src/react/host-connect-guide.tsx +24 -8
- package/src/react/host-select-step.tsx +4 -1
- package/src/react/index.ts +21 -3
- package/src/react/pt-BR.ts +114 -0
- package/dist/chunk-FYEVBTDU.js.map +0 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,162 @@
|
|
|
1
|
+
import { ConfirmActionCopy } from '@12-apps/ui/copy';
|
|
1
2
|
import { OnboardingStore, OnboardingStateSnapshot } from '@12-apps/onboarding';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
3
|
+
import { e as AiHostGuide, g as AiProvider, A as AiCapability, c as AiHostBrand } from '../guide-KQNcXlMG.js';
|
|
4
|
+
export { b as AiConnectPromptSpec, d as AiHostConfigureStage, f as AiHostLink, h as aiConnectPrompt, p as providerForHostId } from '../guide-KQNcXlMG.js';
|
|
5
|
+
export { P as PT_BR_AI_CAPABILITIES, a as PT_BR_AI_CONNECT_PROMPT, b as PT_BR_AI_HOST_GUIDES, c as PT_BR_AI_PERMISSION_MODEL } from '../pt-BR-e1RnV2v8.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Every word the AI-integration screens render, as REQUIRED host config
|
|
9
|
+
* (FUT-760).
|
|
10
|
+
*
|
|
11
|
+
* These components used to take `capabilities` / `permissionModel` / `hosts` as
|
|
12
|
+
* OPTIONAL props defaulting to this package's own pt-BR, and to compile the rest
|
|
13
|
+
* of their sentences in outright. `guide.ts` even said so — "these are the
|
|
14
|
+
* shared defaults" — which is the anti-pattern named exactly: a host that
|
|
15
|
+
* configured nothing shipped one product's Portuguese, and nothing failed to
|
|
16
|
+
* say so.
|
|
17
|
+
*
|
|
18
|
+
* Split per screen rather than one flat map, because three of them
|
|
19
|
+
* (`AiLanding`, `AiCapabilities`, `AiStatusBoard`, `HostSelectStep`) are
|
|
20
|
+
* exported standalone and a host mounting only one should not have to supply
|
|
21
|
+
* words for screens it never renders.
|
|
22
|
+
*/
|
|
23
|
+
/** The marketing block's headline and its supporting line. */
|
|
24
|
+
interface AiCapabilitiesCopy {
|
|
25
|
+
heading: string;
|
|
26
|
+
subheading: string;
|
|
27
|
+
}
|
|
28
|
+
/** One reassurance chip on the landing: an icon's label and its caption. */
|
|
29
|
+
interface AiTrustPoint {
|
|
30
|
+
/** Stable id — maps to the icon in the component. */
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
caption: string;
|
|
34
|
+
}
|
|
35
|
+
interface AiLandingCopy {
|
|
36
|
+
/** Small line above the headline. */
|
|
37
|
+
eyebrow: string;
|
|
38
|
+
/** The headline's second half, after the assistant names. */
|
|
39
|
+
titleTail: string;
|
|
40
|
+
/** The paragraph under the headline. */
|
|
41
|
+
lede: string;
|
|
42
|
+
/** The reassurance strip. Order is the order rendered. */
|
|
43
|
+
trust: readonly AiTrustPoint[];
|
|
44
|
+
/** The call to action that starts the guided flow. */
|
|
45
|
+
start: string;
|
|
46
|
+
}
|
|
47
|
+
/** The wizard's step labels, in the order the stepper shows them. */
|
|
48
|
+
interface AiFlowStepLabels {
|
|
49
|
+
select: string;
|
|
50
|
+
copyUrl: string;
|
|
51
|
+
configure: string;
|
|
52
|
+
connect: string;
|
|
53
|
+
install: string;
|
|
54
|
+
confirm: string;
|
|
55
|
+
}
|
|
56
|
+
/** The wizard's navigation words and each step's own sentences. */
|
|
57
|
+
interface AiFlowCopy {
|
|
58
|
+
/** The stepper's labels. Not sentences, but still the host's words. */
|
|
59
|
+
steps: AiFlowStepLabels;
|
|
60
|
+
back: string;
|
|
61
|
+
next: string;
|
|
62
|
+
advance: string;
|
|
63
|
+
finish: string;
|
|
64
|
+
copyUrl: string;
|
|
65
|
+
copied: string;
|
|
66
|
+
copyMessage: string;
|
|
67
|
+
/** The copy-the-URL step's heading. Names the host's own noun for a tenant. */
|
|
68
|
+
copyUrlTitle: string;
|
|
69
|
+
/** Under the MCP URL: what this value is and what happens on copy. */
|
|
70
|
+
urlCaption: string;
|
|
71
|
+
/** Under the paste-in prompt: what the assistant will do with it. */
|
|
72
|
+
promptCaption: string;
|
|
73
|
+
/** The "ask the assistant to connect" step heading. */
|
|
74
|
+
askTitle: string;
|
|
75
|
+
/** The one-click install step's body, for a host with a published plugin. */
|
|
76
|
+
installBody: string;
|
|
77
|
+
/** The install button on that step. */
|
|
78
|
+
installAction: string;
|
|
79
|
+
/** Heading over the paste-in message on the manual path. */
|
|
80
|
+
pasteTitle: string;
|
|
81
|
+
/** Caption under the paste-in message on the install path. */
|
|
82
|
+
pasteInstallCaption: string;
|
|
83
|
+
/** Confirmation once a host reports in. */
|
|
84
|
+
connectedTo(hostLabel: string): string;
|
|
85
|
+
waitingTitle: string;
|
|
86
|
+
waitingBody(hostLabel: string): string;
|
|
87
|
+
testNow: string;
|
|
88
|
+
}
|
|
89
|
+
interface AiStatusBoardCopy {
|
|
90
|
+
instructions: string;
|
|
91
|
+
connected: string;
|
|
92
|
+
notConnected: string;
|
|
93
|
+
connect: string;
|
|
94
|
+
disconnect: string;
|
|
95
|
+
disconnectTitle: string;
|
|
96
|
+
disconnectBody: string;
|
|
97
|
+
disconnectConfirm: string;
|
|
98
|
+
/** Shown when the disconnect write fails without a reason of its own. */
|
|
99
|
+
disconnectError: string;
|
|
100
|
+
boardTitle: string;
|
|
101
|
+
boardCaption: string;
|
|
102
|
+
/**
|
|
103
|
+
* The confirmation popup's own furniture — its cancel button and fallbacks.
|
|
104
|
+
* `@12-apps/ui` stopped shipping defaults for these (FUT-760), so the words
|
|
105
|
+
* arrive here rather than from the design system's Portuguese.
|
|
106
|
+
*/
|
|
107
|
+
confirmAction: ConfirmActionCopy;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The one-line summary of a connection's recency.
|
|
111
|
+
*
|
|
112
|
+
* Functions rather than strings because the number is interpolated and the
|
|
113
|
+
* plural rule is the host language's, not this package's.
|
|
114
|
+
*/
|
|
115
|
+
interface AiConnectionSummaryCopy {
|
|
116
|
+
/** Active within the last minute — no number to interpolate. */
|
|
117
|
+
activeNow: string;
|
|
118
|
+
activeMinutes(minutes: number): string;
|
|
119
|
+
activeHours(hours: number): string;
|
|
120
|
+
activeDays(days: number): string;
|
|
121
|
+
/** Connected, but too long ago to state a recency for. */
|
|
122
|
+
configured: string;
|
|
123
|
+
/** Appended after a host's name: `Claude Conectado`. */
|
|
124
|
+
connectedSuffix: string;
|
|
125
|
+
/** Several assistants at once, from an already-joined list of names. */
|
|
126
|
+
connectedSeveral(names: string): string;
|
|
127
|
+
/** Connected, but the provider was never attributed to a known assistant. */
|
|
128
|
+
connectedGeneric: string;
|
|
129
|
+
}
|
|
130
|
+
interface AiHostSelectCopy {
|
|
131
|
+
/** Why the owner is picking, under the host tiles. */
|
|
132
|
+
caption: string;
|
|
133
|
+
}
|
|
134
|
+
interface AiConnectGuideCopy {
|
|
135
|
+
/** The label on the MCP URL field. Names the host's own noun for a tenant. */
|
|
136
|
+
urlLabel: string;
|
|
137
|
+
/** Above the MCP URL field. */
|
|
138
|
+
urlHint: string;
|
|
139
|
+
/** Lead-in to the vendor's official connector docs link. */
|
|
140
|
+
moreInfo: string;
|
|
141
|
+
connectOn(hostLabel: string): string;
|
|
142
|
+
}
|
|
143
|
+
interface AiOnboardingCopy {
|
|
144
|
+
title: string;
|
|
145
|
+
/** The reveal toggle in the configured state, and its collapsed twin. */
|
|
146
|
+
editLabel: string;
|
|
147
|
+
collapseLabel: string;
|
|
148
|
+
}
|
|
149
|
+
/** Every screen's words, for a host mounting the whole flow. */
|
|
150
|
+
interface McpAiCopy {
|
|
151
|
+
capabilities: AiCapabilitiesCopy;
|
|
152
|
+
landing: AiLandingCopy;
|
|
153
|
+
flow: AiFlowCopy;
|
|
154
|
+
statusBoard: AiStatusBoardCopy;
|
|
155
|
+
summary: AiConnectionSummaryCopy;
|
|
156
|
+
hostSelect: AiHostSelectCopy;
|
|
157
|
+
connectGuide: AiConnectGuideCopy;
|
|
158
|
+
onboarding: AiOnboardingCopy;
|
|
159
|
+
}
|
|
4
160
|
|
|
5
161
|
/**
|
|
6
162
|
* Revoke a host's access. Returning a promise holds the confirmation popup in
|
|
@@ -23,16 +179,17 @@ interface HostStatus {
|
|
|
23
179
|
* `announceAiConnection`), so several assistants can show connected at once.
|
|
24
180
|
*
|
|
25
181
|
* A connected box carries two more controls, because the pill it used to show
|
|
26
|
-
* alone was a dead end in both directions: "
|
|
182
|
+
* alone was a dead end in both directions: "{copy.instructions}" re-enters the host's
|
|
27
183
|
* setup steps (previously reachable only from a RED card, so an all-green board
|
|
28
184
|
* hid them entirely), and "Desconectar" — when the app passes `onDisconnect` —
|
|
29
185
|
* revokes access, which nothing in the UI could do at all.
|
|
30
186
|
*/
|
|
31
|
-
declare function AiStatusBoard({ statuses, onConnect, onDisconnect, }: {
|
|
187
|
+
declare function AiStatusBoard({ statuses, onConnect, onDisconnect, copy, }: {
|
|
32
188
|
statuses: readonly HostStatus[];
|
|
33
189
|
onConnect: (hostId: string) => void;
|
|
34
190
|
/** Revoke this host's access. Omit to render a read-only board. */
|
|
35
191
|
onDisconnect?: DisconnectHandler;
|
|
192
|
+
copy: AiStatusBoardCopy;
|
|
36
193
|
}): React.JSX.Element;
|
|
37
194
|
|
|
38
195
|
/**
|
|
@@ -68,20 +225,20 @@ interface AiIntegrationOnboardingProps {
|
|
|
68
225
|
/** Show the dev-only "reset onboarding" button. @default false */
|
|
69
226
|
devReset?: boolean;
|
|
70
227
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
228
|
+
* Assistants offered in the flow, with their step-by-step instructions.
|
|
229
|
+
*
|
|
230
|
+
* REQUIRED since FUT-760. These used to default to this package's own pt-BR
|
|
231
|
+
* walkthrough, so a host that said nothing shipped one product's Portuguese
|
|
232
|
+
* and had no field to decline it. `PT_BR_AI_HOST_GUIDES(platformName)` is that
|
|
233
|
+
* exact content, now chosen by name.
|
|
77
234
|
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
|
|
235
|
+
hosts: readonly AiHostGuide[];
|
|
236
|
+
/** Capability cards on the landing. REQUIRED — see `hosts`. */
|
|
237
|
+
capabilities: readonly AiCapability[];
|
|
238
|
+
/** Permission reassurance copy on the landing. REQUIRED — see `hosts`. */
|
|
239
|
+
permissionModel: string;
|
|
240
|
+
/** Every sentence the screens render. REQUIRED — see `hosts`. */
|
|
241
|
+
copy: McpAiCopy;
|
|
85
242
|
/**
|
|
86
243
|
* Message the owner pastes into the assistant on the Conectar step.
|
|
87
244
|
*
|
|
@@ -120,28 +277,33 @@ interface AiIntegrationOnboardingProps {
|
|
|
120
277
|
* the live `connections` (one per connected assistant); content (hosts,
|
|
121
278
|
* capabilities, copy) defaults to the shared guide but can be overridden per app.
|
|
122
279
|
*/
|
|
123
|
-
declare function AiIntegrationOnboarding({ store, endpointUrl, initialState, connections, featureKey, devReset,
|
|
280
|
+
declare function AiIntegrationOnboarding({ store, endpointUrl, initialState, connections, featureKey, devReset, hosts, capabilities, permissionModel, connectPrompt, onRetest, onDisconnect, copy, }: AiIntegrationOnboardingProps): React.JSX.Element;
|
|
124
281
|
|
|
125
282
|
/**
|
|
126
283
|
* Homepage-style marketing landing for the AI integration (shown before the
|
|
127
284
|
* owner starts): a hero, the permission reassurance, a trust/feature strip, and
|
|
128
285
|
* the capability highlights. `onStart` begins the guided flow. `permissionModel`
|
|
129
|
-
* and `capabilities`
|
|
286
|
+
* and `capabilities` are REQUIRED host copy — the package ships no default
|
|
287
|
+
* sentence (FUT-760).
|
|
130
288
|
*/
|
|
131
|
-
declare function AiLanding({ onStart, permissionModel, capabilities, }: {
|
|
289
|
+
declare function AiLanding({ onStart, permissionModel, capabilities, copy, capabilitiesCopy, }: {
|
|
132
290
|
onStart: () => void;
|
|
133
|
-
permissionModel
|
|
134
|
-
capabilities
|
|
291
|
+
permissionModel: string;
|
|
292
|
+
capabilities: readonly AiCapability[];
|
|
293
|
+
copy: AiLandingCopy;
|
|
294
|
+
capabilitiesCopy: AiCapabilitiesCopy;
|
|
135
295
|
}): React.JSX.Element;
|
|
136
296
|
|
|
137
297
|
/**
|
|
138
298
|
* Marketing block for the AI integration: a headline + a responsive grid of
|
|
139
299
|
* capability cards. Shown on the onboarding landing (before the owner starts) to
|
|
140
300
|
* sell the feature — "here's what the assistant does for you". `capabilities`
|
|
141
|
-
*
|
|
301
|
+
* and `copy` are REQUIRED host copy — the package ships no default sentence
|
|
302
|
+
* (FUT-760).
|
|
142
303
|
*/
|
|
143
|
-
declare function AiCapabilities({ capabilities, }: {
|
|
144
|
-
capabilities
|
|
304
|
+
declare function AiCapabilities({ capabilities, copy, }: {
|
|
305
|
+
capabilities: readonly AiCapability[];
|
|
306
|
+
copy: AiCapabilitiesCopy;
|
|
145
307
|
}): React.JSX.Element;
|
|
146
308
|
|
|
147
309
|
/**
|
|
@@ -151,10 +313,11 @@ declare function AiCapabilities({ capabilities, }: {
|
|
|
151
313
|
* is controlled (persisted by the onboarding flow) so a refresh resumes with the
|
|
152
314
|
* same assistant highlighted.
|
|
153
315
|
*/
|
|
154
|
-
declare function HostSelectStep({ hosts, selectedId, onSelect, }: {
|
|
316
|
+
declare function HostSelectStep({ hosts, selectedId, onSelect, copy, }: {
|
|
155
317
|
hosts: readonly AiHostGuide[];
|
|
156
318
|
selectedId: string | null;
|
|
157
319
|
onSelect: (hostId: string) => void;
|
|
320
|
+
copy: AiHostSelectCopy;
|
|
158
321
|
}): React.JSX.Element;
|
|
159
322
|
|
|
160
323
|
/**
|
|
@@ -163,24 +326,28 @@ declare function HostSelectStep({ hosts, selectedId, onSelect, }: {
|
|
|
163
326
|
* "Copiado" and `onCopy` fires after the clipboard write — the wizard uses it to
|
|
164
327
|
* unlock the "Próximo" button on the Copiar-URL step.
|
|
165
328
|
*/
|
|
166
|
-
declare function EndpointCopyBlock({ endpointUrl, copied, onCopy, }: {
|
|
329
|
+
declare function EndpointCopyBlock({ endpointUrl, copied, onCopy, flowCopy, copy, }: {
|
|
167
330
|
endpointUrl: string;
|
|
168
331
|
copied: boolean;
|
|
169
332
|
onCopy: () => void;
|
|
333
|
+
flowCopy: AiFlowCopy;
|
|
334
|
+
copy: AiConnectGuideCopy;
|
|
170
335
|
}): React.JSX.Element;
|
|
171
336
|
/**
|
|
172
337
|
* A copyable multi-line message block (preserves line breaks). Used on the
|
|
173
338
|
* Conectar step for the prompt the owner pastes into the assistant so it
|
|
174
339
|
* identifies itself and calls a tool (which registers the connection).
|
|
175
340
|
*/
|
|
176
|
-
declare function PromptCopyBlock({ title, caption, message, }: {
|
|
341
|
+
declare function PromptCopyBlock({ title, caption, message, flowCopy, }: {
|
|
177
342
|
title: string;
|
|
178
343
|
caption: string;
|
|
179
344
|
message: string;
|
|
345
|
+
flowCopy: AiFlowCopy;
|
|
180
346
|
}): React.JSX.Element;
|
|
181
347
|
/** The brand mark + "Conectar no <host>" header shared by the connect sub-steps. */
|
|
182
|
-
declare function HostConnectHeader({ host }: {
|
|
348
|
+
declare function HostConnectHeader({ host, copy, }: {
|
|
183
349
|
host: AiHostGuide;
|
|
350
|
+
copy: AiConnectGuideCopy;
|
|
184
351
|
}): React.JSX.Element;
|
|
185
352
|
/**
|
|
186
353
|
* The primary direct-link button to a host's connector settings (nothing when it
|
|
@@ -236,4 +403,15 @@ interface FeatureBadgeItem {
|
|
|
236
403
|
*/
|
|
237
404
|
declare function FeatureBadge({ icon, label, caption }: FeatureBadgeItem): React.JSX.Element;
|
|
238
405
|
|
|
239
|
-
|
|
406
|
+
/**
|
|
407
|
+
* The pt-BR pack for the AI-integration screens — a NAMED constant a host
|
|
408
|
+
* passes by hand, never a default.
|
|
409
|
+
*
|
|
410
|
+
* The filename is what exempts this file from the copy-portability gate:
|
|
411
|
+
* Portuguese may ship, it may not be silent. Every sentence is VERBATIM what
|
|
412
|
+
* the components used to render, so a host adopting it sees no change on
|
|
413
|
+
* screen — what changes is that the words are chosen in a diff.
|
|
414
|
+
*/
|
|
415
|
+
declare const PT_BR_MCP_AI_COPY: McpAiCopy;
|
|
416
|
+
|
|
417
|
+
export { AiCapabilities, type AiCapabilitiesCopy, AiCapability, type AiConnectGuideCopy, type AiConnection, type AiConnectionSummaryCopy, type AiFlowCopy, AiHostBrand, AiHostGuide, type AiHostSelectCopy, AiIntegrationOnboarding, type AiIntegrationOnboardingProps, AiLanding, type AiLandingCopy, type AiOnboardingCopy, AiProvider, AiStatusBoard, type AiStatusBoardCopy, type AiTrustPoint, CapabilityIcon, type DisconnectHandler, EndpointCopyBlock, FeatureBadge, type FeatureBadgeItem, HostBrandAvatar, HostConnectHeader, HostOpenButton, HostSelectStep, type HostStatus, HostStepList, type McpAiCopy, McpEndpointUrl, PT_BR_MCP_AI_COPY, PromptCopyBlock };
|