@belonguniverseai/react-sdk 0.6.6 → 0.6.8

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.
Files changed (81) hide show
  1. package/dist/api/client.d.ts +886 -2
  2. package/dist/api/connectors.d.ts +448 -0
  3. package/dist/api/query-keys.d.ts +9 -0
  4. package/dist/component/{abnfDiagram-N423BO3Z-C6FcPK3d.js → abnfDiagram-N423BO3Z-DAMVrmeh.js} +4 -4
  5. package/dist/component/{arc-BFUQjzCS.js → arc-Gc-Ug7JA.js} +2 -2
  6. package/dist/component/{architectureDiagram-T3A2C74G-BDBrDBki.js → architectureDiagram-T3A2C74G-DEETzZJN.js} +3 -3
  7. package/dist/component/{blockDiagram-VBNYF7ZC-UZV4Vc3P.js → blockDiagram-VBNYF7ZC-B63eqqq8.js} +4 -4
  8. package/dist/component/{c4Diagram-5PPSVZJV-CCPtctjO.js → c4Diagram-5PPSVZJV-B1BOYc8g.js} +3 -3
  9. package/dist/component/{channel-CIUveBDa.js → channel-PLzmp3cE.js} +2 -2
  10. package/dist/component/{chunk-2GRJ4B5K-CRCj56HD.js → chunk-2GRJ4B5K-B6eq3oGl.js} +2 -2
  11. package/dist/component/{chunk-2Q5K7J3B-CL0yogzL.js → chunk-2Q5K7J3B-B7muvlHI.js} +2 -2
  12. package/dist/component/{chunk-5RXB4S5H-Blwl04-V.js → chunk-5RXB4S5H-DwKu1vp-.js} +5 -5
  13. package/dist/component/{chunk-5VM5RSS4-C497fKeV.js → chunk-5VM5RSS4-DfsJf4Z4.js} +2 -2
  14. package/dist/component/{chunk-6Q2QTUOP-C_2Jk1ii.js → chunk-6Q2QTUOP-CeaiyGYA.js} +2 -2
  15. package/dist/component/{chunk-GF5L2VYU-Cs_Nhfpw.js → chunk-GF5L2VYU-CNmM7mNX.js} +6 -6
  16. package/dist/component/{chunk-JWPE2WC7-Dcs41Q_n.js → chunk-JWPE2WC7-BzOJ0gSs.js} +2 -2
  17. package/dist/component/{chunk-KBJHAD2P-BWm1frM-.js → chunk-KBJHAD2P-B_0sEXXZ.js} +2 -2
  18. package/dist/component/{chunk-RYQCIY6F-XA_jesTk.js → chunk-RYQCIY6F-CzrE1hmt.js} +2 -2
  19. package/dist/component/{chunk-XXDRQBXY-BDtOkxP3.js → chunk-XXDRQBXY-BUnNxHRd.js} +2 -2
  20. package/dist/component/{classDiagram-JCYQIIEL-CvZflq4I.js → classDiagram-JCYQIIEL-9VG4K9gL.js} +3 -3
  21. package/dist/component/{classDiagram-v2-OCEON4UE-CvZflq4I.js → classDiagram-v2-OCEON4UE-9VG4K9gL.js} +3 -3
  22. package/dist/component/{cose-bilkent-JH36ORCC-C1arfbyI.js → cose-bilkent-JH36ORCC-_cCdJsPR.js} +2 -2
  23. package/dist/component/{cynefinDiagram-MW4NZA55-CS5V8R4P.js → cynefinDiagram-MW4NZA55-DrosRrWG.js} +3 -3
  24. package/dist/component/{dagre-VZM6K2ZE-BZ6hBjLx.js → dagre-VZM6K2ZE-DVXWVoHI.js} +3 -3
  25. package/dist/component/{diagram-7IWD3JNH-sP7Tm4Ov.js → diagram-7IWD3JNH-BvdLH-gr.js} +4 -4
  26. package/dist/component/{diagram-B4RE2ZJO-BNGAdSWl.js → diagram-B4RE2ZJO-yq2kxzf4.js} +3 -3
  27. package/dist/component/{diagram-LBJQPF4R-FUyO9neA.js → diagram-LBJQPF4R-DjZj7wKC.js} +3 -3
  28. package/dist/component/{diagram-Q27KOJAE-j_dqjRdo.js → diagram-Q27KOJAE-DjV3mMFp.js} +4 -4
  29. package/dist/component/{diagram-UB23O5K3-C9DPA3Ub.js → diagram-UB23O5K3-DG73tqIa.js} +3 -3
  30. package/dist/component/{ebnfDiagram-BXEA7PRR-D33P9__e.js → ebnfDiagram-BXEA7PRR-TI3Mi84Z.js} +4 -4
  31. package/dist/component/{erDiagram-JOGREHBK-DOB0CdMC.js → erDiagram-JOGREHBK-p28VOtOG.js} +5 -5
  32. package/dist/component/{flowDiagram-UKHOOZJN-Byd1bpG0.js → flowDiagram-UKHOOZJN-DptddxZK.js} +7 -7
  33. package/dist/component/{ganttDiagram-PKOTCBZU-DYe8BZEh.js → ganttDiagram-PKOTCBZU-CPBYUclk.js} +3 -3
  34. package/dist/component/{gitGraphDiagram-DS77QQ5N-XZ8Mo4GA.js → gitGraphDiagram-DS77QQ5N-DDJEly11.js} +4 -4
  35. package/dist/component/{highlighted-body-OFNGDK62-CL31TQjN.js → highlighted-body-OFNGDK62-DmArOVtb.js} +2 -2
  36. package/dist/component/index.js +2 -2
  37. package/dist/component/{infoDiagram-6WML65LV-CKFHlOyG.js → infoDiagram-6WML65LV-fa5NoEep.js} +2 -2
  38. package/dist/component/{ishikawaDiagram-WSZJBQD7-DcYs6_Ks.js → ishikawaDiagram-WSZJBQD7-D19tW2EN.js} +2 -2
  39. package/dist/component/{journeyDiagram-NVQOT4AX-BdL6QUhp.js → journeyDiagram-NVQOT4AX-BMjN5JId.js} +5 -5
  40. package/dist/component/{kanban-definition-27J2QSJJ-BXSCmJV1.js → kanban-definition-27J2QSJJ-DpEZoYj2.js} +3 -3
  41. package/dist/component/{linear-CKjHF2HZ.js → linear-BlZm6_oy.js} +2 -2
  42. package/dist/component/{mermaid-GHXKKRXX-DkoZohjm.js → mermaid-GHXKKRXX-p-OyUfKz.js} +41095 -37516
  43. package/dist/component/{mindmap-definition-FAOFIHXS-DW4hhNZQ.js → mindmap-definition-FAOFIHXS-CZooOHo7.js} +4 -4
  44. package/dist/component/{pegDiagram-VL7TDLO6-Bi-Kyrnt.js → pegDiagram-VL7TDLO6-BgsgvnUj.js} +4 -4
  45. package/dist/component/{pieDiagram-7S7Q4E2Y-BMhIZVGK.js → pieDiagram-7S7Q4E2Y-BMc5yYJ4.js} +4 -4
  46. package/dist/component/{quadrantDiagram-CIZ2JOQS-bceN8tX9.js → quadrantDiagram-CIZ2JOQS-2w1cEVRE.js} +3 -3
  47. package/dist/component/{railroadDiagram-AXF67PYL-D-nJshKI.js → railroadDiagram-AXF67PYL-DoiX2thq.js} +4 -4
  48. package/dist/component/{requirementDiagram-LRYGKXZP-CYZUa3OC.js → requirementDiagram-LRYGKXZP-CTB2STpc.js} +4 -4
  49. package/dist/component/{sankeyDiagram-W5VNT64P-BGB3WZee.js → sankeyDiagram-W5VNT64P-9xxjcZWi.js} +2 -2
  50. package/dist/component/{sequenceDiagram-SI44F4Z6-C1vZr0MI.js → sequenceDiagram-SI44F4Z6-mkS0lJ2i.js} +4 -4
  51. package/dist/component/{sizeCapture-X5ZJPWSS-RlcsaXgG.js → sizeCapture-X5ZJPWSS-BoQhOM5q.js} +2 -2
  52. package/dist/component/{stateDiagram-OKZ733FA-fvMUXvo7.js → stateDiagram-OKZ733FA-BC9-EQhL.js} +3 -3
  53. package/dist/component/{stateDiagram-v2-UEYNNEHI-C5wIei7D.js → stateDiagram-v2-UEYNNEHI-DtIgdpQz.js} +3 -3
  54. package/dist/component/{swimlanes-SLNWSIFB-C3hQy7qq.js → swimlanes-SLNWSIFB-Dt29sUod.js} +4 -4
  55. package/dist/component/{swimlanesDiagram-ULZ7WXOC-ByZ1cbCX.js → swimlanesDiagram-ULZ7WXOC-XhpcM99S.js} +3 -3
  56. package/dist/component/{timeline-definition-Z64GVDOM-D0_tzWD4.js → timeline-definition-Z64GVDOM-BaSPNtp7.js} +3 -3
  57. package/dist/component/{vennDiagram-T6HMQDX7-C9YEUDaF.js → vennDiagram-T6HMQDX7-DEh8MevO.js} +2 -2
  58. package/dist/component/{wardleyDiagram-T6FBY63Y-CXHDuHLt.js → wardleyDiagram-T6FBY63Y-DAL7SU3o.js} +3 -3
  59. package/dist/component/{xychartDiagram-ELKLHX3M-n_ilatMg.js → xychartDiagram-ELKLHX3M-Cde-mFmr.js} +3 -3
  60. package/dist/components/connectors/ConfirmDeleteConnectorDialog.d.ts +16 -0
  61. package/dist/components/connectors/ConnectorAuthFields.d.ts +18 -0
  62. package/dist/components/connectors/ConnectorAvatar.d.ts +14 -0
  63. package/dist/components/connectors/ConnectorDetailsDialog.d.ts +8 -0
  64. package/dist/components/connectors/ConnectorMarketplaceDialog.d.ts +9 -0
  65. package/dist/components/connectors/ConnectorNoticeLine.d.ts +5 -0
  66. package/dist/components/connectors/ConnectorsListSurface.d.ts +37 -0
  67. package/dist/components/connectors/NewConnectorDialog.d.ts +10 -0
  68. package/dist/components/connectors/connector-copy.d.ts +37 -0
  69. package/dist/components/connectors/connector-form.d.ts +299 -0
  70. package/dist/components/connectors/portal-theme.d.ts +8 -0
  71. package/dist/components/connectors/product-name.d.ts +17 -0
  72. package/dist/components/connectors/use-connector-oauth.d.ts +28 -0
  73. package/dist/components/embed/EmbedRail.d.ts +14 -2
  74. package/dist/components/embed/rail-flags.d.ts +14 -0
  75. package/dist/components/embed/save-prompt-name.d.ts +20 -7
  76. package/dist/embed/dock-state.d.ts +1 -1
  77. package/dist/i18n/messages/en.d.ts +195 -0
  78. package/dist/i18n/messages/surfaces/connectors.d.ts +635 -0
  79. package/dist/i18n/messages/surfaces/header.d.ts +3 -0
  80. package/dist/routes/connectors.d.ts +2 -0
  81. package/package.json +1 -1
@@ -0,0 +1,448 @@
1
+ import { ApiClient } from './client.ts';
2
+ /**
3
+ * How the connector authenticates to its server.
4
+ *
5
+ * `oauth_client_credentials` is the app's OWN credential rather than the
6
+ * user's: the app hands out an id and a secret, and the server exchanges them
7
+ * for a short-lived token whenever it needs one. It behaves like `bearer` from
8
+ * every surface's point of view — typed once, discovered synchronously, and
9
+ * replaced through Edit — and NOT like `oauth`, which is a sign-in window.
10
+ */
11
+ export type ConnectorAuthMode = "none" | "bearer" | "headers" | "oauth" | "oauth_client_credentials";
12
+ /**
13
+ * How the dock's server reaches the connector's server.
14
+ *
15
+ * The industry's own two names, kept as the industry writes them (the same
16
+ * deviation the "MCP server URL" label documents in the i18n catalog): a user
17
+ * choosing between them is matching our menu against the provider's setup page,
18
+ * and a gentler translation would make them guess.
19
+ *
20
+ * IMMUTABLE after create, exactly like `serverUrl` — a server reached a
21
+ * different way is a different server, with its own tools and its own trust
22
+ * decision, so changing it is adding a connector rather than editing one.
23
+ */
24
+ export type ConnectorTransport = "streamable_http" | "sse";
25
+ /** Live state of the pinned discovery snapshot, as the list surface shows it. */
26
+ export type ConnectorStatus = "connected" | "needs_auth" | "error";
27
+ /**
28
+ * Why a discovery attempt did not produce a tool list.
29
+ *
30
+ * Every arm the API's `McpPortFailureType` can put in a `discovery_failed`
31
+ * envelope, including `unauthorized` — a 401/403 from the connector's own
32
+ * server. It reads as a protocol failure and is not one: nothing about the
33
+ * address is wrong, the credential is, and it is the only arm the user fixes by
34
+ * editing what they pasted rather than by trying again.
35
+ */
36
+ export type ConnectorDiscoveryFailure = "unreachable" | "handshake_failed" | "unauthorized" | "tool_drifted" | "timeout" | "protocol_error";
37
+ export type ConnectorTool = {
38
+ readonly name: string;
39
+ readonly description: string;
40
+ /** Is this ONE tool offered to the agent? A tool the user switched off stays
41
+ * in the discovered snapshot (so the list still says what the app gives) and
42
+ * is simply not registered for a turn. */
43
+ readonly enabled: boolean;
44
+ };
45
+ /** A tool the server publishes that we will not register, and why. */
46
+ export type ConnectorRefusedTool = {
47
+ readonly toolName: string;
48
+ readonly message: string;
49
+ };
50
+ /** One connector as every dock surface sees it. Never carries the credential —
51
+ * `hasCredentials` is the whole truth the API returns about the secret. */
52
+ export type ConnectorSummary = {
53
+ readonly connectorId: string;
54
+ readonly name: string;
55
+ /** Server-derived, IMMUTABLE tool-name prefix. Shown only where a collision
56
+ * has to be explained; a rename never changes it. */
57
+ readonly alias: string;
58
+ readonly description: string;
59
+ readonly emoji: string | null;
60
+ readonly serverUrl: string;
61
+ readonly transport: ConnectorTransport;
62
+ readonly authMode: ConnectorAuthMode;
63
+ readonly hasCredentials: boolean;
64
+ readonly enabled: boolean;
65
+ readonly status: ConnectorStatus;
66
+ readonly lastError: string | null;
67
+ readonly tools: readonly ConnectorTool[];
68
+ readonly refusedTools: readonly ConnectorRefusedTool[];
69
+ readonly lastDiscoveredAt: string | null;
70
+ readonly createdAt: string;
71
+ };
72
+ /** Platform-owned setup metadata for one marketplace card. It never carries a
73
+ * token, client secret, or any other user credential. */
74
+ export type ConnectorCatalogEntry = {
75
+ readonly id: string;
76
+ readonly name: string;
77
+ readonly description: string;
78
+ readonly iconKey: string;
79
+ readonly category: string;
80
+ readonly serverUrl: string;
81
+ readonly transport: ConnectorTransport;
82
+ readonly authMode: ConnectorAuthMode;
83
+ readonly oauthScope: string | null;
84
+ readonly oauthAuthorizationParams: Readonly<Record<string, string>> | null;
85
+ readonly oauthAppCredentialsRequired: boolean;
86
+ readonly documentationUrl: string;
87
+ readonly featured: boolean;
88
+ readonly preview: boolean;
89
+ };
90
+ /**
91
+ * The credential a CREATE sends.
92
+ *
93
+ * `oauth` carries no credential at all, and that asymmetry is the point: every
94
+ * other member IS the credential, while OAuth is a promise to go and get one.
95
+ * Creating an OAuth connector writes a needs-attention row, and
96
+ * `useStartConnectorOAuth` is what turns it into a connected one.
97
+ *
98
+ * `clientId` / `clientSecret` are the optional "the provider gave me app
99
+ * credentials" case; with neither, the server registers an app for us.
100
+ *
101
+ * `scope` and `authorizationParams` are the two things an app can insist on
102
+ * BEFORE it will sign anyone in: exactly which permissions to ask for, and the
103
+ * extra settings its own setup page tells you to send. Both are optional and
104
+ * both are rare — an app that needs neither is the ordinary case.
105
+ *
106
+ * `oauth_client_credentials` is the app's own credential and therefore behaves
107
+ * like `bearer`: it is typed in full, the create discovers tools with it on the
108
+ * spot, and it is replaced through Edit. `tokenEndpoint` is only for the apps
109
+ * that publish nothing for us to find and hand you the address instead.
110
+ */
111
+ export type ConnectorAuthInput = {
112
+ readonly mode: "none";
113
+ } | {
114
+ readonly mode: "bearer";
115
+ readonly token: string;
116
+ } | {
117
+ readonly mode: "headers";
118
+ readonly headers: Readonly<Record<string, string>>;
119
+ } | {
120
+ readonly mode: "oauth";
121
+ readonly clientId?: string;
122
+ readonly clientSecret?: string;
123
+ readonly scope?: string;
124
+ readonly authorizationParams?: Readonly<Record<string, string>>;
125
+ } | {
126
+ readonly mode: "oauth_client_credentials";
127
+ readonly clientId: string;
128
+ readonly clientSecret: string;
129
+ readonly tokenEndpoint?: string;
130
+ readonly scope?: string;
131
+ };
132
+ /**
133
+ * What an EDIT may send. Narrower than the create union on purpose, mirroring
134
+ * the server's own perimeter: re-authorizing an OAuth connector is a redirect,
135
+ * not a patch, so `oauth` is not a credential this can replace.
136
+ *
137
+ * `oauth_client_credentials` IS one, and flows in here automatically: replacing
138
+ * the id and secret is the only way back for a connector whose credential the
139
+ * app stopped honouring — there is no window to sign in to.
140
+ */
141
+ export type ConnectorCredentialInput = Exclude<ConnectorAuthInput, {
142
+ readonly mode: "oauth";
143
+ }>;
144
+ /**
145
+ * What the list call resolved to. `featureAbsent` is a resolved STATE, not an
146
+ * error: there is nothing to retry and nothing the user can do, so the rail
147
+ * drops its entry and the surface says one quiet sentence.
148
+ */
149
+ export type ConnectorListResult = {
150
+ readonly status: "ready";
151
+ readonly connectors: readonly ConnectorSummary[];
152
+ } | {
153
+ readonly status: "featureAbsent";
154
+ };
155
+ export declare const listConnectorsRequest: (api: ApiClient, signal?: AbortSignal) => Promise<ConnectorListResult>;
156
+ export declare const useConnectors: () => import('@tanstack/react-query').UseQueryResult<NoInfer<ConnectorListResult>, Error>;
157
+ export declare const listConnectorCatalogRequest: (api: ApiClient, signal?: AbortSignal) => Promise<readonly ConnectorCatalogEntry[]>;
158
+ export declare const useConnectorCatalog: () => import('@tanstack/react-query').UseQueryResult<NoInfer<readonly ConnectorCatalogEntry[]>, Error>;
159
+ /**
160
+ * Does this deployment have connectors at all?
161
+ *
162
+ * FALSE until the list query has RESOLVED `featureAbsent` — while it is in
163
+ * flight, or has errored, the answer is "assume yes". A rail entry that pops
164
+ * in a second after boot reads as a glitch, and an outage must not look like a
165
+ * feature that was never there.
166
+ */
167
+ export declare const useConnectorsFeatureAbsent: () => boolean;
168
+ export type CreateConnectorInput = {
169
+ readonly catalogEntryId?: string;
170
+ readonly name: string;
171
+ readonly description: string;
172
+ readonly emoji?: string;
173
+ readonly serverUrl: string;
174
+ /** ALWAYS sent, never omitted: the server's default and the form's default
175
+ * can drift apart across a deploy, and the connector the user sees a
176
+ * transport chosen for must be the one that gets created (§41). */
177
+ readonly transport: ConnectorTransport;
178
+ /** Retry key for ONE logical create — `retry-fetch.ts` deliberately re-sends
179
+ * POSTs, so without it a retried create whose first attempt landed comes
180
+ * back as `name_taken` for the connector the user just added. */
181
+ readonly clientConnectorId: string;
182
+ readonly auth: ConnectorAuthInput;
183
+ };
184
+ /**
185
+ * What a create attempt actually did, as a value the dialog matches on. Every
186
+ * arm is a different sentence in the UI, which is exactly why they are
187
+ * separate members rather than one `invalid`.
188
+ */
189
+ export type CreateConnectorOutcome = {
190
+ readonly status: "created";
191
+ readonly connectorId: string;
192
+ }
193
+ /** A retried POST resolving to the row the first attempt wrote. */
194
+ | {
195
+ readonly status: "idempotent";
196
+ readonly connectorId: string;
197
+ } | {
198
+ readonly status: "name_taken";
199
+ readonly alias: string;
200
+ } | {
201
+ readonly status: "invalid_name";
202
+ } | {
203
+ readonly status: "catalog_entry_not_found";
204
+ } | {
205
+ readonly status: "catalog_oauth_not_configured";
206
+ } | {
207
+ readonly status: "limit_reached";
208
+ readonly maxCount: number;
209
+ } | {
210
+ readonly status: "url_blocked";
211
+ readonly message: string;
212
+ } | {
213
+ readonly status: "discovery_failed";
214
+ readonly failure: ConnectorDiscoveryFailure;
215
+ readonly message: string;
216
+ } | {
217
+ readonly status: "tool_budget_exceeded";
218
+ readonly message: string;
219
+ }
220
+ /** The app publishes no way to exchange a service credential, and none was
221
+ * typed — the user has to paste the address the app gave them. */
222
+ | {
223
+ readonly status: "oauth_unsupported";
224
+ }
225
+ /** The app was asked for a token with those credentials and refused. */
226
+ | {
227
+ readonly status: "oauth_token_failed";
228
+ readonly message: string;
229
+ } | {
230
+ readonly status: "forbidden";
231
+ } | {
232
+ readonly status: "featureAbsent";
233
+ } | {
234
+ readonly status: "error";
235
+ };
236
+ export type UpdateConnectorPatch = {
237
+ readonly name?: string;
238
+ readonly description?: string;
239
+ /** `null` CLEARS the emoji; an absent key leaves what is stored. */
240
+ readonly emoji?: string | null;
241
+ readonly enabled?: boolean;
242
+ /**
243
+ * The REMOTE tool names this connector must not offer the agent — a FULL
244
+ * REPLACEMENT of the disabled set, never a delta.
245
+ *
246
+ * Full replacement is the point: two tabs each sending "also disable X"
247
+ * would compose into a set neither user asked for, whereas two full sets
248
+ * make last-write-wins the whole story, and the next list read is the truth
249
+ * either way. An absent key leaves the stored set alone; `[]` clears it.
250
+ */
251
+ readonly disabledTools?: readonly string[];
252
+ /** Replacing the credential RE-DISCOVERS, so this patch can fail the same
253
+ * ways a create can. `oauth` is absent for the reason
254
+ * `ConnectorCredentialInput` gives: it is a redirect, not a patch. */
255
+ readonly auth?: ConnectorCredentialInput;
256
+ };
257
+ export type UpdateConnectorOutcome = {
258
+ readonly status: "updated";
259
+ readonly connectorId: string;
260
+ } | {
261
+ readonly status: "not_found";
262
+ } | {
263
+ readonly status: "name_taken";
264
+ readonly alias: string;
265
+ } | {
266
+ readonly status: "url_blocked";
267
+ readonly message: string;
268
+ } | {
269
+ readonly status: "discovery_failed";
270
+ readonly failure: ConnectorDiscoveryFailure;
271
+ readonly message: string;
272
+ } | {
273
+ readonly status: "tool_budget_exceeded";
274
+ readonly message: string;
275
+ }
276
+ /** The same two a create can hit — replacing a service credential re-mints a
277
+ * token before it re-discovers, so it can fail where a create does. */
278
+ | {
279
+ readonly status: "oauth_unsupported";
280
+ } | {
281
+ readonly status: "oauth_token_failed";
282
+ readonly message: string;
283
+ } | {
284
+ readonly status: "invalid";
285
+ } | {
286
+ readonly status: "forbidden";
287
+ } | {
288
+ readonly status: "featureAbsent";
289
+ } | {
290
+ readonly status: "error";
291
+ };
292
+ export type RefreshConnectorOutcome = {
293
+ readonly status: "refreshed";
294
+ readonly connectorId: string;
295
+ } | {
296
+ readonly status: "not_found";
297
+ }
298
+ /** An OAuth connector with no live authorization — a retry cannot fix it. */
299
+ | {
300
+ readonly status: "needs_auth";
301
+ }
302
+ /** The sealing key changed under the stored credential; re-entering it
303
+ * through Edit repairs the row. */
304
+ | {
305
+ readonly status: "credentials_unreadable";
306
+ } | {
307
+ readonly status: "discovery_failed";
308
+ readonly failure: ConnectorDiscoveryFailure;
309
+ readonly message: string;
310
+ } | {
311
+ readonly status: "forbidden";
312
+ } | {
313
+ readonly status: "featureAbsent";
314
+ } | {
315
+ readonly status: "error";
316
+ };
317
+ export type DeleteConnectorOutcome = {
318
+ readonly status: "deleted";
319
+ } | {
320
+ readonly status: "not_found";
321
+ } | {
322
+ readonly status: "forbidden";
323
+ } | {
324
+ readonly status: "featureAbsent";
325
+ } | {
326
+ readonly status: "error";
327
+ };
328
+ /**
329
+ * Which credential an address turned out to want. Mirrors the cloud's
330
+ * `ConnectorAuthSuggestion` — restated rather than imported for the reason at
331
+ * the top of `connector-form.ts`: the dock ships independently of the cell it
332
+ * talks to, so its perimeter is a zod schema over the wire shape, not a type
333
+ * import that a version skew would silently invalidate.
334
+ */
335
+ export type ConnectorAuthSuggestion = {
336
+ readonly mode: "none";
337
+ readonly toolCount: number;
338
+ } | {
339
+ readonly mode: "oauth";
340
+ /** `client_id_required` = the user must make an app in the provider's
341
+ * console first, which is a different amount of work and has to be said
342
+ * before they press Add. */
343
+ readonly registration: "dynamic" | "client_id_required";
344
+ readonly authorizationServerOrigin: string;
345
+ readonly scope: string | null;
346
+ } | {
347
+ readonly mode: "bearer";
348
+ };
349
+ /**
350
+ * What asking an address produced.
351
+ *
352
+ * The failure arms are the two a CREATE answers with, on purpose: a probe and
353
+ * a create dial the same server under the same guards, so an address that
354
+ * cannot be probed is one that cannot be added, and the dock says so with the
355
+ * copy it already has.
356
+ */
357
+ export type ProbeConnectorOutcome = {
358
+ readonly status: "probed";
359
+ readonly transport: ConnectorTransport;
360
+ readonly auth: ConnectorAuthSuggestion;
361
+ } | {
362
+ readonly status: "url_blocked";
363
+ readonly message: string;
364
+ } | {
365
+ readonly status: "discovery_failed";
366
+ readonly failure: ConnectorDiscoveryFailure;
367
+ readonly message: string;
368
+ } | {
369
+ readonly status: "forbidden";
370
+ } | {
371
+ readonly status: "featureAbsent";
372
+ } | {
373
+ readonly status: "error";
374
+ };
375
+ /**
376
+ * What asking to sign in produced. `ready` carries the ONE address the dock
377
+ * opens; every other arm is a different sentence, because each is a different
378
+ * thing the user (or their operator) would do about it.
379
+ */
380
+ export type StartConnectorOAuthOutcome = {
381
+ readonly status: "ready";
382
+ readonly authorizationUrl: string;
383
+ } | {
384
+ readonly status: "not_found";
385
+ }
386
+ /** The connector authenticates some other way; there is nothing to sign in to. */
387
+ | {
388
+ readonly status: "wrong_auth_mode";
389
+ }
390
+ /** Discovery, registration or the address policy said no. */
391
+ | {
392
+ readonly status: "discovery_failed";
393
+ readonly message: string;
394
+ }
395
+ /** The app cannot register us on its own and we were given no credentials. */
396
+ | {
397
+ readonly status: "dcr_unsupported";
398
+ }
399
+ /** The saved app credentials can no longer be read; re-add the connector. */
400
+ | {
401
+ readonly status: "credentials_unreadable";
402
+ }
403
+ /** This deployment has no public address a provider could send the user back to. */
404
+ | {
405
+ readonly status: "not_configured";
406
+ } | {
407
+ readonly status: "forbidden";
408
+ } | {
409
+ readonly status: "featureAbsent";
410
+ } | {
411
+ readonly status: "error";
412
+ };
413
+ export declare const useCreateConnector: () => import('@tanstack/react-query').UseMutationResult<CreateConnectorOutcome, Error, CreateConnectorInput, unknown>;
414
+ export declare const useUpdateConnector: () => import('@tanstack/react-query').UseMutationResult<UpdateConnectorOutcome, Error, {
415
+ readonly connectorId: string;
416
+ readonly patch: UpdateConnectorPatch;
417
+ }, unknown>;
418
+ /**
419
+ * Ask an address what credential it wants, while the user is still typing it.
420
+ *
421
+ * NOT a query: it is triggered by an edit rather than by a mounted surface,
422
+ * and its answer is a one-off used to pre-fill a form — caching it under a key
423
+ * would mean a second paste of the same URL never re-asks a server the user
424
+ * has since fixed.
425
+ *
426
+ * A failure NEVER blocks the form. The user can still press Add and get the
427
+ * real create's answer; the probe is there to make the common case correct,
428
+ * not to become a second gate in front of it.
429
+ */
430
+ export declare const useProbeConnector: () => import('@tanstack/react-query').UseMutationResult<ProbeConnectorOutcome, Error, {
431
+ readonly serverUrl: string;
432
+ readonly transport: ConnectorTransport;
433
+ }, unknown>;
434
+ export declare const useRefreshConnector: () => import('@tanstack/react-query').UseMutationResult<RefreshConnectorOutcome, Error, string, unknown>;
435
+ /**
436
+ * Ask the server to begin "sign in with the provider" for one connector.
437
+ *
438
+ * Answers with the URL the dock opens and NOTHING else (§13): the flow's
439
+ * single-use nonce is a credential, and it never leaves the server except
440
+ * inside that address.
441
+ *
442
+ * No `onSuccess` invalidation, deliberately. Starting a flow changes nothing
443
+ * about the connector — it is still needs-attention until the user has been
444
+ * through the provider's consent screen — so the list is re-read by the
445
+ * POLLING the caller does while the popup is open, not by this call returning.
446
+ */
447
+ export declare const useStartConnectorOAuth: () => import('@tanstack/react-query').UseMutationResult<StartConnectorOAuthOutcome, Error, string, unknown>;
448
+ export declare const useDeleteConnector: () => import('@tanstack/react-query').UseMutationResult<DeleteConnectorOutcome, Error, string, unknown>;
@@ -29,4 +29,13 @@ export declare const queryKeys: {
29
29
  prePrompts: readonly ["belong", "pre-prompts"];
30
30
  /** Workspace-scoped saved-prompt list (same "" unscoped convention). */
31
31
  prePromptList: (workspaceKey: string) => readonly ["belong", "pre-prompts", "list", string];
32
+ /**
33
+ * Invalidation prefix for every custom-connector read. NOT workspace-scoped:
34
+ * `/v1/connectors` keys off the CALLER, not a workspace — a user's connected
35
+ * apps follow them across workspaces, so a per-workspace cache would paint
36
+ * the same list twice under two keys and let one of them go stale.
37
+ */
38
+ connectors: readonly ["belong", "connectors"];
39
+ connectorList: readonly ["belong", "connectors", "list"];
40
+ connectorCatalog: readonly ["belong", "connectors", "catalog"];
32
41
  };
@@ -1,6 +1,6 @@
1
- import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-C_2Jk1ii.js";
2
- import { p as f } from "./chunk-JWPE2WC7-Dcs41Q_n.js";
3
- import { _ as a, l as o } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-CeaiyGYA.js";
2
+ import { p as f } from "./chunk-JWPE2WC7-BzOJ0gSs.js";
3
+ import { _ as a, l as o } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
4
4
  import { M as c, b as g } from "./cynefin-VYW2F7L2-DAyxamLw.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
@@ -87,4 +87,4 @@ var b = g().RailroadAbnf.parser.LangiumParser, l = /* @__PURE__ */ a((e) => {
87
87
  export {
88
88
  T as diagram
89
89
  };
90
- //# sourceMappingURL=abnfDiagram-N423BO3Z-C6FcPK3d.js.map
90
+ //# sourceMappingURL=abnfDiagram-N423BO3Z-DAMVrmeh.js.map
@@ -1,4 +1,4 @@
1
- import { H as ln, I as an, J as g, K as on, M as Q, N as w, O as _, P as sn, Q as rn, S as X, T as t, V as J, W as un, X as tn, Y as fn } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { H as ln, I as an, J as g, K as on, M as Q, N as w, O as _, P as sn, Q as rn, S as X, T as t, V as J, W as un, X as tn, Y as fn } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  function cn(l) {
@@ -83,4 +83,4 @@ function xn() {
83
83
  export {
84
84
  xn as d
85
85
  };
86
- //# sourceMappingURL=arc-BFUQjzCS.js.map
86
+ //# sourceMappingURL=arc-Gc-Ug7JA.js.map
@@ -1,5 +1,5 @@
1
- import { p as ke } from "./chunk-JWPE2WC7-Dcs41Q_n.js";
2
- import { ba as qe, _ as ct, G as Qe, ag as Je, l as Se, b as Ke, a as je, o as _e, p as tr, g as er, s as rr, q as ir, D as ar, z as nr, E as or, c as me, b2 as Ee, al as ve, i as sr, d as hr, r as lr, am as fr, bb as cr } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { p as ke } from "./chunk-JWPE2WC7-BzOJ0gSs.js";
2
+ import { ba as qe, _ as ct, G as Qe, ag as Je, l as Se, b as Ke, a as je, o as _e, p as tr, g as er, s as rr, q as ir, D as ar, z as nr, E as or, c as me, b2 as Ee, al as ve, i as sr, d as hr, r as lr, am as fr, bb as cr } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
3
3
  import { p as gr } from "./cynefin-VYW2F7L2-DAyxamLw.js";
4
4
  import { c as Fe } from "./cytoscape.esm-C31R6JOv.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
@@ -4781,4 +4781,4 @@ var Ur = /* @__PURE__ */ ct(async (w, F, M, P) => {
4781
4781
  export {
4782
4782
  zr as diagram
4783
4783
  };
4784
- //# sourceMappingURL=architectureDiagram-T3A2C74G-BDBrDBki.js.map
4784
+ //# sourceMappingURL=architectureDiagram-T3A2C74G-DEETzZJN.js.map
@@ -1,7 +1,7 @@
1
- import { g as de } from "./chunk-5VM5RSS4-C497fKeV.js";
2
- import { aD as pe, aE as Kt, aF as fe, aG as xe, aH as ye, aI as be, aJ as we, aK as me, aL as Se, aM as Le, aN as ke, aO as ve, aP as Ee, aQ as _e, aR as Te, aS as De, aT as Be, aU as Ne, aV as Ie, aW as Ce, aX as Oe, aY as Re, aZ as Ae, a_ as ze, a$ as Me, _ as g, z as rt, d as D, e as Pe, l as k, q as Fe, t as We, c as R, b0 as Ye, aa as He, ab as Ke, a6 as Ue, b1 as M, b2 as kt, b3 as Q, av as Xe, y as $, k as Ve, b4 as je, i as Ct, b5 as Ot, b6 as Ge } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { g as de } from "./chunk-5VM5RSS4-DfsJf4Z4.js";
2
+ import { aD as pe, aE as Kt, aF as fe, aG as xe, aH as ye, aI as be, aJ as we, aK as me, aL as Se, aM as Le, aN as ke, aO as ve, aP as Ee, aQ as _e, aR as Te, aS as De, aT as Be, aU as Ne, aV as Ie, aW as Ce, aX as Oe, aY as Re, aZ as Ae, a_ as ze, a$ as Me, _ as g, z as rt, d as D, e as Pe, l as k, q as Fe, t as We, c as R, b0 as Ye, aa as He, ab as Ke, a6 as Ue, b1 as M, b2 as kt, b3 as Q, av as Xe, y as $, k as Ve, b4 as je, i as Ct, b5 as Ot, b6 as Ge } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
3
3
  import { G as Ze } from "./graph-CWpEkm4G.js";
4
- import { c as qe } from "./channel-CIUveBDa.js";
4
+ import { c as qe } from "./channel-PLzmp3cE.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
7
7
  function Je(e) {
@@ -2419,4 +2419,4 @@ var Ea = /* @__PURE__ */ g(function(e, t) {
2419
2419
  export {
2420
2420
  Ca as diagram
2421
2421
  };
2422
- //# sourceMappingURL=blockDiagram-VBNYF7ZC-UZV4Vc3P.js.map
2422
+ //# sourceMappingURL=blockDiagram-VBNYF7ZC-B63eqqq8.js.map
@@ -1,5 +1,5 @@
1
- import { g as Oe, d as Re } from "./chunk-2GRJ4B5K-CRCj56HD.js";
2
- import { s as Se, g as De, a as Pe, b as Be, _ as y, c as Dt, d as Nt, l as he, e as Ie, f as Me, h as Tt, i as pe, j as Le, w as Ne, k as Jt, m as ue } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { g as Oe, d as Re } from "./chunk-2GRJ4B5K-B6eq3oGl.js";
2
+ import { s as Se, g as De, a as Pe, b as Be, _ as y, c as Dt, d as Nt, l as he, e as Ie, f as Me, h as Tt, i as pe, j as Le, w as Ne, k as Jt, m as ue } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
3
3
  globalThis.process = globalThis.process || { env: {} };
4
4
  globalThis.global = globalThis.global || globalThis;
5
5
  var jt = (function() {
@@ -1583,4 +1583,4 @@ var T0 = /* @__PURE__ */ y(function(e, t, s, o) {
1583
1583
  export {
1584
1584
  P0 as diagram
1585
1585
  };
1586
- //# sourceMappingURL=c4Diagram-5PPSVZJV-CCPtctjO.js.map
1586
+ //# sourceMappingURL=c4Diagram-5PPSVZJV-B1BOYc8g.js.map
@@ -1,8 +1,8 @@
1
- import { U as s, C as a } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { U as s, C as a } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  const g = (l, o) => s.lang.round(a.parse(l)[o]);
5
5
  export {
6
6
  g as c
7
7
  };
8
- //# sourceMappingURL=channel-CIUveBDa.js.map
8
+ //# sourceMappingURL=channel-PLzmp3cE.js.map
@@ -1,4 +1,4 @@
1
- import { _ as l, d as n, n as d, j as o } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { _ as l, d as n, n as d, j as o } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var c = /* @__PURE__ */ l((r, t) => {
@@ -68,4 +68,4 @@ export {
68
68
  m as g,
69
69
  y as h
70
70
  };
71
- //# sourceMappingURL=chunk-2GRJ4B5K-CRCj56HD.js.map
71
+ //# sourceMappingURL=chunk-2GRJ4B5K-B6eq3oGl.js.map
@@ -1,4 +1,4 @@
1
- import { _ as t } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { _ as t } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var a = class {
@@ -18,4 +18,4 @@ var a = class {
18
18
  export {
19
19
  a as I
20
20
  };
21
- //# sourceMappingURL=chunk-2Q5K7J3B-CL0yogzL.js.map
21
+ //# sourceMappingURL=chunk-2Q5K7J3B-B7muvlHI.js.map
@@ -1,7 +1,7 @@
1
- import { g as te } from "./chunk-XXDRQBXY-BDtOkxP3.js";
2
- import { s as ee } from "./chunk-KBJHAD2P-BWm1frM-.js";
3
- import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, ac as he, k as j, q as ue, d as bt, a8 as de } from "./mermaid-GHXKKRXX-DkoZohjm.js";
4
- import { f as fe } from "./chunk-2GRJ4B5K-CRCj56HD.js";
1
+ import { g as te } from "./chunk-XXDRQBXY-BUnNxHRd.js";
2
+ import { s as ee } from "./chunk-KBJHAD2P-B_0sEXXZ.js";
3
+ import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, ac as he, k as j, q as ue, d as bt, a8 as de } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
4
+ import { f as fe } from "./chunk-2GRJ4B5K-B6eq3oGl.js";
5
5
  globalThis.process = globalThis.process || { env: {} };
6
6
  globalThis.global = globalThis.global || globalThis;
7
7
  var vt = (function() {
@@ -1414,4 +1414,4 @@ export {
1414
1414
  We as b,
1415
1415
  He as s
1416
1416
  };
1417
- //# sourceMappingURL=chunk-5RXB4S5H-Blwl04-V.js.map
1417
+ //# sourceMappingURL=chunk-5RXB4S5H-DwKu1vp-.js.map
@@ -1,4 +1,4 @@
1
- import { _ as l } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { _ as l } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var o = /* @__PURE__ */ l(() => `
@@ -19,4 +19,4 @@ var o = /* @__PURE__ */ l(() => `
19
19
  export {
20
20
  o as g
21
21
  };
22
- //# sourceMappingURL=chunk-5VM5RSS4-C497fKeV.js.map
22
+ //# sourceMappingURL=chunk-5VM5RSS4-DfsJf4Z4.js.map
@@ -1,4 +1,4 @@
1
- import { _ as p, l as w, G as L, z as E, q as I, Z as X, e as q, i as G, c as H } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { _ as p, l as w, G as L, z as E, q as I, Z as X, e as q, i as G, c as H } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var z = "", b = "", N = "", A = [], R = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ p((e) => G(e, H()), "sanitizeText"), F = /* @__PURE__ */ p((e) => {
@@ -670,4 +670,4 @@ export {
670
670
  ue as g,
671
671
  ge as r
672
672
  };
673
- //# sourceMappingURL=chunk-6Q2QTUOP-C_2Jk1ii.js.map
673
+ //# sourceMappingURL=chunk-6Q2QTUOP-CeaiyGYA.js.map
@@ -1,8 +1,8 @@
1
- import { g as tt } from "./chunk-5VM5RSS4-C497fKeV.js";
2
- import { g as st } from "./chunk-XXDRQBXY-BDtOkxP3.js";
3
- import { s as it } from "./chunk-KBJHAD2P-BWm1frM-.js";
4
- import { _ as f, l as Ie, c as F, v as at, x as nt, y as Oe, d as de, a8 as rt, b as ut, a as lt, s as ct, g as ot, o as ht, p as dt, k as I, q as pt, r as At, i as ft, a9 as G } from "./mermaid-GHXKKRXX-DkoZohjm.js";
5
- import { f as gt } from "./chunk-2GRJ4B5K-CRCj56HD.js";
1
+ import { g as tt } from "./chunk-5VM5RSS4-DfsJf4Z4.js";
2
+ import { g as st } from "./chunk-XXDRQBXY-BUnNxHRd.js";
3
+ import { s as it } from "./chunk-KBJHAD2P-B_0sEXXZ.js";
4
+ import { _ as f, l as Ie, c as F, v as at, x as nt, y as Oe, d as de, a8 as rt, b as ut, a as lt, s as ct, g as ot, o as ht, p as dt, k as I, q as pt, r as At, i as ft, a9 as G } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
5
+ import { f as gt } from "./chunk-2GRJ4B5K-B6eq3oGl.js";
6
6
  globalThis.process = globalThis.process || { env: {} };
7
7
  globalThis.global = globalThis.global || globalThis;
8
8
  var we = (function() {
@@ -1539,4 +1539,4 @@ export {
1539
1539
  Nt as c,
1540
1540
  St as s
1541
1541
  };
1542
- //# sourceMappingURL=chunk-GF5L2VYU-Cs_Nhfpw.js.map
1542
+ //# sourceMappingURL=chunk-GF5L2VYU-CNmM7mNX.js.map
@@ -1,4 +1,4 @@
1
- import { _ as e } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { _ as e } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  function i(l, o) {
@@ -8,4 +8,4 @@ e(i, "populateCommonDb");
8
8
  export {
9
9
  i as p
10
10
  };
11
- //# sourceMappingURL=chunk-JWPE2WC7-Dcs41Q_n.js.map
11
+ //# sourceMappingURL=chunk-JWPE2WC7-BzOJ0gSs.js.map
@@ -1,4 +1,4 @@
1
- import { _ as s, e as n, l as g } from "./mermaid-GHXKKRXX-DkoZohjm.js";
1
+ import { _ as s, e as n, l as g } from "./mermaid-GHXKKRXX-p-OyUfKz.js";
2
2
  globalThis.process = globalThis.process || { env: {} };
3
3
  globalThis.global = globalThis.global || globalThis;
4
4
  var b = /* @__PURE__ */ s((e, o, t, a) => {
@@ -19,4 +19,4 @@ var b = /* @__PURE__ */ s((e, o, t, a) => {
19
19
  export {
20
20
  b as s
21
21
  };
22
- //# sourceMappingURL=chunk-KBJHAD2P-BWm1frM-.js.map
22
+ //# sourceMappingURL=chunk-KBJHAD2P-B_0sEXXZ.js.map