@zackbart/connecta 0.6.0 → 0.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +403 -0
  2. package/README.md +163 -308
  3. package/dist/auth/bearer.d.ts +4 -3
  4. package/dist/auth/bearer.d.ts.map +1 -1
  5. package/dist/auth/bearer.js +10 -8
  6. package/dist/auth/bearer.js.map +1 -1
  7. package/dist/auth/clerk.d.ts +8 -7
  8. package/dist/auth/clerk.d.ts.map +1 -1
  9. package/dist/auth/clerk.js +27 -8
  10. package/dist/auth/clerk.js.map +1 -1
  11. package/dist/connector-scope.d.ts +13 -0
  12. package/dist/connector-scope.d.ts.map +1 -0
  13. package/dist/connector-scope.js +35 -0
  14. package/dist/connector-scope.js.map +1 -0
  15. package/dist/connectors/api.d.ts +5 -5
  16. package/dist/connectors/api.d.ts.map +1 -1
  17. package/dist/connectors/remote-mcp.d.ts +3 -3
  18. package/dist/connectors/remote-mcp.d.ts.map +1 -1
  19. package/dist/connectors/remote-mcp.js +309 -10
  20. package/dist/connectors/remote-mcp.js.map +1 -1
  21. package/dist/credential-health.d.ts +20 -9
  22. package/dist/credential-health.d.ts.map +1 -1
  23. package/dist/credential-health.js +127 -63
  24. package/dist/credential-health.js.map +1 -1
  25. package/dist/credentials.d.ts +84 -1
  26. package/dist/credentials.d.ts.map +1 -1
  27. package/dist/credentials.js +109 -2
  28. package/dist/credentials.js.map +1 -1
  29. package/dist/index.d.ts +83 -82
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +101 -31
  32. package/dist/index.js.map +1 -1
  33. package/dist/meta-tools.d.ts +3 -3
  34. package/dist/meta-tools.d.ts.map +1 -1
  35. package/dist/meta-tools.js +16 -7
  36. package/dist/meta-tools.js.map +1 -1
  37. package/dist/registry.d.ts +3 -2
  38. package/dist/registry.d.ts.map +1 -1
  39. package/dist/registry.js +4 -3
  40. package/dist/registry.js.map +1 -1
  41. package/dist/server.d.ts +1 -1
  42. package/dist/server.d.ts.map +1 -1
  43. package/dist/server.js +154 -52
  44. package/dist/server.js.map +1 -1
  45. package/dist/skills.js +2 -2
  46. package/dist/skills.js.map +1 -1
  47. package/dist/toolkits.js +1 -1
  48. package/dist/types.d.ts +51 -26
  49. package/dist/types.d.ts.map +1 -1
  50. package/dist/ui.d.ts +52 -21
  51. package/dist/ui.d.ts.map +1 -1
  52. package/dist/ui.js +665 -196
  53. package/dist/ui.js.map +1 -1
  54. package/dist/version.d.ts +1 -1
  55. package/dist/version.js +1 -1
  56. package/package.json +3 -2
  57. package/src/auth/bearer.ts +10 -8
  58. package/src/auth/clerk.ts +28 -9
  59. package/src/connector-scope.ts +41 -0
  60. package/src/connectors/api.ts +5 -5
  61. package/src/connectors/remote-mcp.ts +348 -25
  62. package/src/credential-health.ts +151 -71
  63. package/src/credentials.ts +166 -3
  64. package/src/index.ts +202 -113
  65. package/src/meta-tools.ts +22 -7
  66. package/src/registry.ts +4 -3
  67. package/src/server.ts +197 -71
  68. package/src/skills.ts +2 -2
  69. package/src/toolkits.ts +1 -1
  70. package/src/types.ts +51 -26
  71. package/src/ui.ts +703 -195
  72. package/src/version.ts +1 -1
package/dist/types.d.ts CHANGED
@@ -52,7 +52,7 @@ export interface ConnectorCredentialFieldConfig {
52
52
  name: string;
53
53
  /** Short field label, e.g. "Account email". */
54
54
  label: string;
55
- /** Plain-language guidance shown in /ui. Never include the credential itself. */
55
+ /** Plain-language guidance shown in /credentials. Never include the credential itself. */
56
56
  description?: string;
57
57
  /** Input placeholder, e.g. "you@example.com". */
58
58
  placeholder?: string;
@@ -63,7 +63,7 @@ export interface ConnectorCredentialFieldConfig {
63
63
  export interface ConnectorCredentialConfig {
64
64
  /** Short group or field label, e.g. "API token" or "Service credentials". */
65
65
  label: string;
66
- /** Plain-language guidance shown in /ui. Never include the credential itself. */
66
+ /** Plain-language guidance shown in /credentials. Never include the credential itself. */
67
67
  description?: string;
68
68
  /** Password-field placeholder, e.g. "Paste API token". */
69
69
  placeholder?: string;
@@ -86,13 +86,14 @@ export interface ConnectorContext {
86
86
  /**
87
87
  * Read-only access to this connector's operator-managed credential. Present
88
88
  * only when the connector declares `credential` and the deployment configures
89
- * `credentialEncryptionKey`.
89
+ * `credentials.encryptionKey`.
90
90
  */
91
91
  credential?: ConnectorCredentialAccess;
92
92
  /**
93
93
  * Identity shared by connector calls that belong to one inbound request.
94
94
  * Connectors may use it to reuse request-safe resources within that request,
95
- * but must never retain I/O resources beyond the scope's lifetime.
95
+ * but must never retain I/O resources beyond the scope's lifetime. For
96
+ * probe-only scopes the core owns, `Connector.closeScope` signals that end.
96
97
  *
97
98
  * Optional for custom/test contexts; the context object itself is the scope
98
99
  * when omitted.
@@ -121,7 +122,7 @@ export interface Connector {
121
122
  /**
122
123
  * Max inline result size (bytes) for this connector's tools before
123
124
  * call_tool/batch_call truncate and stash the full text for get_result
124
- * paging. Overrides the deployment-wide `ConnectaConfig.maxResultBytes`;
125
+ * paging. Overrides `ConnectaConfig.calls.maxResultBytes`;
125
126
  * omit to inherit it (which itself defaults to 50_000). Must be a whole
126
127
  * number of bytes >= 1; anything else warns at startup and is ignored, so
127
128
  * the connector inherits the deployment-wide cap.
@@ -135,11 +136,11 @@ export interface Connector {
135
136
  * and imperative; it is read by agents, not operators.
136
137
  */
137
138
  usageGuide?: string;
138
- /** Optional operator-managed credential slot rendered inside this connector's /ui card. */
139
+ /** Optional operator-managed credential slot rendered on /credentials. */
139
140
  credential?: ConnectorCredentialConfig;
140
- /** Optional server-side check used by /ui's Test action. */
141
+ /** Optional server-side check used by /credentials' Test action. */
141
142
  testCredential?(value: string, ctx: ConnectorContext): Promise<CredentialTestResult>;
142
- /** Optional multi-field credential check used by /ui's Test action. */
143
+ /** Optional multi-field credential check used by /credentials' Test action. */
143
144
  testCredentials?(values: ConnectorCredentialValues, ctx: ConnectorContext): Promise<CredentialTestResult>;
144
145
  /**
145
146
  * Optional: whether this connector currently holds a stored downstream
@@ -162,6 +163,18 @@ export interface Connector {
162
163
  staticTools?: ToolDef[];
163
164
  listTools(ctx: ConnectorContext): Promise<ToolDef[]>;
164
165
  callTool(name: string, args: unknown, ctx: ConnectorContext): Promise<unknown>;
166
+ /**
167
+ * Optional best-effort teardown for resources retained under
168
+ * `ctx.requestScope`. The core calls this at most once when a scope it created
169
+ * solely for probing ends, and never uses that scope again. Teardown gets a
170
+ * small, fixed best-effort completion window; a missing, rejected, or
171
+ * never-settling hook cannot change or hold open the operation's result
172
+ * beyond that bound.
173
+ *
174
+ * Per-request `/mcp` scopes are not closed through this hook: their
175
+ * request-local reuse remains in force until the request boundary.
176
+ */
177
+ closeScope?(ctx: ConnectorContext): Promise<void>;
165
178
  /** Optional connector-level health/auth status for list_connectors. */
166
179
  status?(ctx: ConnectorContext): Promise<ConnectorStatus>;
167
180
  /**
@@ -174,11 +187,11 @@ export interface Connector {
174
187
  force?: boolean;
175
188
  }): Promise<ConnectorStatus>;
176
189
  /**
177
- * Optional: verify the OAuth `state` returned to /oauth/callback/<id> against
178
- * the value this connector generated when it started the flow. Present only
179
- * on downstream-OAuth connectors. The callback MUST reject before finishAuth
180
- * when this returns false — otherwise anyone holding the pending URL could
181
- * complete consent with their own account.
190
+ * Verify the OAuth `state` returned to /oauth/callback/<id> against the value
191
+ * this connector generated when it started the flow. Required whenever
192
+ * `finishAuth` is present: the callback rejects before `finishAuth` when this
193
+ * hook is absent, throws, or returns false — otherwise anyone holding the
194
+ * pending URL could complete consent with their own account.
182
195
  */
183
196
  verifyState?(state: string | null, ctx: ConnectorContext): Promise<boolean>;
184
197
  /** Optional: complete a downstream OAuth flow (called by /oauth/callback/<id>). */
@@ -187,7 +200,8 @@ export interface Connector {
187
200
  * Optional: serve a connector-owned HTTP route — for example a signed
188
201
  * download link minted by one of the connector's tools. Called only after
189
202
  * every built-in route misses, so a connector can never shadow `/mcp`,
190
- * `/ui`, `/health`, or the credential API. The first connector to return a
203
+ * `/`, `/credentials`, `/activity`, `/health`, or the credential API. The
204
+ * first connector to return a
191
205
  * Response wins, in registration order; return null to decline.
192
206
  *
193
207
  * These routes are PUBLIC: connecta applies no auth gate to them. A
@@ -219,9 +233,9 @@ export interface Executor {
219
233
  }
220
234
  /**
221
235
  * Which toolkits one inbound identity may open — the membership half of the
222
- * deployment=org / toolkit=team framing (§16). A mapping, never a policy
223
- * engine: one identity → the toolkit names it may select, plus whether it may
224
- * connect with no `?toolkit=` at all.
236
+ * deployment=org / toolkit=team framing (docs/toolkits.md). A mapping, never a
237
+ * policy engine: one identity → the toolkit names it may select, plus whether
238
+ * it may connect with no `?toolkit=` at all.
225
239
  *
226
240
  * An identity with NO binding is unbound and keeps the pre-binding behavior:
227
241
  * any declared toolkit, or the full registry. A binding is enforced at connect
@@ -268,19 +282,30 @@ export type UiAuthConfig = {
268
282
  kind: "clerk";
269
283
  publishableKey: string;
270
284
  /**
271
- * Origin `/ui` fetches its browser sign-in loader from. **Must be an absolute
285
+ * Origin the operator shell fetches its browser sign-in loader from. **Must be an absolute
272
286
  * `https:` URL** — the value lands in a `<script src>`, so the gate is
273
287
  * stricter than the branding href gate: no `http:`, no loopback exemption, and
274
288
  * no root-relative form (a relative path is rejected, not resolved). The
275
289
  * shipped `clerkAuth` adapter derives this from the publishable key and
276
290
  * Clerk's Frontend API is always https, so nothing legitimate needs a
277
291
  * carve-out. A value that fails the gate reaches neither the loader tag nor
278
- * the page's inline auth config: `/ui` renders without the loader and reports
292
+ * the page's inline auth config: operator pages render without it and report
279
293
  * that Clerk could not load, and `createConnecta` names the drop in a startup
280
294
  * warning.
281
295
  */
282
296
  frontendApiUrl: string;
297
+ /**
298
+ * Hosted Account Portal sign-in address, handed to `Clerk.load`. **Must be an
299
+ * absolute `https:` URL** — the same gate `frontendApiUrl` passes, because
300
+ * this value is where Clerk *navigates* the operator's browser. An Account
301
+ * Portal address is always https, so the stricter gate costs nothing real: a
302
+ * value that fails it (a `javascript:`/`data:` payload, a cleartext `http:`
303
+ * address, a relative path) reaches no part of the page, the shell signs in
304
+ * through Clerk's default instead, and `createConnecta` names the drop in a
305
+ * startup warning.
306
+ */
283
307
  signInUrl?: string;
308
+ /** Hosted Account Portal sign-up address. Gated exactly like `signInUrl`. */
284
309
  signUpUrl?: string;
285
310
  };
286
311
  /**
@@ -297,7 +322,7 @@ export interface ConnectaBranding {
297
322
  ownerName?: string;
298
323
  /** Optional link for the organization or owner label. */
299
324
  ownerUrl?: string;
300
- /** Status-dashboard introduction. */
325
+ /** Operator-page introduction and meta description. */
301
326
  description?: string;
302
327
  /**
303
328
  * Browser tab title and page meta name. Defaults to
@@ -325,16 +350,16 @@ export interface ConnectaBranding {
325
350
  export interface InboundAuth {
326
351
  kind: string;
327
352
  /**
328
- * Optional browser sign-in configuration. When present, `/ui` uses this
353
+ * Optional browser sign-in configuration. When present, operator pages use it
329
354
  * provider instead of asking the operator to paste a static bearer secret.
330
355
  */
331
356
  uiAuth?: UiAuthConfig;
332
357
  /**
333
- * Optional toolkit binding for every identity this provider admits (§16).
334
- * Declared statically so `createConnecta` can validate the names against
335
- * `ConnectaConfig.toolkits` and throw on a typo — a binding nobody wrote is
336
- * not one an operator can reason about. An `authorize` result may narrow it
337
- * per identity with its own `toolkitBinding`.
358
+ * Optional toolkit binding for every identity this provider admits
359
+ * (docs/toolkits.md). Declared statically so `createConnecta` can validate the
360
+ * names against `ConnectaConfig.toolkits` and throw on a typo — a binding
361
+ * nobody wrote is not one an operator can reason about. An `authorize` result
362
+ * may narrow it per identity with its own `toolkitBinding`.
338
363
  */
339
364
  toolkitBinding?: ToolkitBinding;
340
365
  /** Serve/short-circuit .well-known + OPTIONS. Return null when not handled. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACxB,GAA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AAM,CAAC;IACnB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,UAAU,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,+EAA+E;IAC/E,cAAc,CAAC,CACb,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC9C,sCAAsC;IACtC,SAAS,CACP,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACrC"}
package/dist/ui.d.ts CHANGED
@@ -37,8 +37,8 @@ export declare function isSafeHttpUrl(url: unknown): boolean;
37
37
  * default href is the relative `/favicon.svg`, which `isSafeHttpUrl` alone would
38
38
  * reject — and it is kept narrow on both ends.
39
39
  *
40
- * Root-relative only, because `/ui` and `/oauth/callback/<id>` sit at different
41
- * depths and a document-relative path would resolve differently on each.
40
+ * Root-relative only, because operator and OAuth callback pages sit at
41
+ * different depths and a document-relative path would resolve differently.
42
42
  *
43
43
  * "Root-relative" is enforced structurally: exactly one leading `/` followed by
44
44
  * a character that is neither `/` nor `\`. Both of those would make the value an
@@ -51,27 +51,44 @@ export declare function isSafeHttpUrl(url: unknown): boolean;
51
51
  */
52
52
  export declare function isSafeIconHref(href: unknown): boolean;
53
53
  /**
54
- * True only for an absolute `https:` URL — the gate for `uiAuth.frontendApiUrl`,
55
- * the last operator-config value that lands in a URL-valued HTML position (the
56
- * `<script src>` of `/ui`'s sign-in loader). `javascript:` in a `src` does not
57
- * execute, so this closes a hole in the *invariant* rather than a live vector:
58
- * every operator value reaching an `href`/`src` is validated, with no exception
59
- * left to remember.
54
+ * True only for an absolute `https:` URL — the gate every `uiAuth` URL passes:
55
+ * `frontendApiUrl`, which becomes the operator shell's sign-in loader source,
56
+ * and `signInUrl`/`signUpUrl`, which ClerkJS uses as *navigation targets* when
57
+ * the operator signs in. With those three gated, no operator-config value
58
+ * reaches the browser in a URL position attribute or navigation — without
59
+ * validation, and there is no exception left to remember.
60
60
  *
61
- * Stricter than `isSafeHttpUrl` on purpose. There is no `http:` carve-out and no
62
- * loopback carve-out, because nobody types this value: the shipped Clerk adapter
63
- * derives it from the publishable key and Clerk's Frontend API is always https.
64
- * A cleartext script source on the dashboard would be a downgrade even where a
65
- * browser's mixed-content rules had not already blocked it.
61
+ * Stricter than `isSafeHttpUrl` on purpose: no `http:` carve-out, no loopback
62
+ * carve-out, and no relative form. Nobody types `frontendApiUrl` the shipped
63
+ * Clerk adapter derives it from the publishable key, and Clerk's Frontend API is
64
+ * always https — and a cleartext script source on an operator page would be a
65
+ * downgrade even where a browser's mixed-content rules had not already blocked
66
+ * it. `signInUrl`/`signUpUrl` *are* typed by the operator, but what belongs
67
+ * there is a hosted Account Portal address (`https://accounts.<domain>` or
68
+ * `https://<slug>.accounts.dev`), which is https as well; `http:` would carry a
69
+ * sign-in over cleartext, and a path relative to this origin is meaningless
70
+ * because this server hosts no sign-in page of its own. So the looser gate would
71
+ * buy nothing real, and the same strictness holds for all three.
66
72
  */
67
- export declare function isSafeScriptSrcUrl(url: unknown): boolean;
73
+ export declare function isSafeHttpsUrl(url: unknown): boolean;
68
74
  /**
69
75
  * Names of the `uiAuth` URLs an inbound-auth provider supplied that failed their
70
76
  * gate. Lives beside the gate for the same reason `droppedBrandingUrls` does: the
71
77
  * startup warning cannot then drift from what rendering actually drops. Every
72
78
  * field is read defensively rather than trusted, because a custom `InboundAuth`
73
- * is untyped at a JS call site — `isSafeScriptSrcUrl` takes `unknown`, and a
79
+ * is untyped at a JS call site — `isSafeHttpsUrl` takes `unknown`, and a
74
80
  * `uiAuth` that is not the clerk shape is reported as nothing to warn about.
81
+ *
82
+ * `frontendApiUrl` is required, so anything that fails its gate is a drop.
83
+ * `signInUrl` and `signUpUrl` are optional, so only a value the operator
84
+ * *supplied* and the gate then rejected is worth a warning — an unset field
85
+ * took no default away from anyone. `isSetUrlValue` decides that, the same way
86
+ * and for the same reasons it decides it for the branding URLs: a warning that
87
+ * fires for one and not the other would be reporting on the field rather than
88
+ * on the operator's intent. Rendering is not consulted for this: it drops on
89
+ * the gate alone, and a blank string fails that gate too — it is simply not
90
+ * *reported*, because a blank is indistinguishable from leaving the field
91
+ * alone.
75
92
  */
76
93
  export declare function droppedUiAuthUrls(uiAuth?: UiAuthConfig): string[];
77
94
  export interface UiTool {
@@ -120,6 +137,12 @@ export interface UiConnector {
120
137
  updatedAt?: string;
121
138
  testable: boolean;
122
139
  error?: string;
140
+ /**
141
+ * Something true and non-blocking about a working credential — today, that
142
+ * the vault still holds fields the connector has stopped declaring.
143
+ * Distinct from `error`, which means the credential cannot be used.
144
+ */
145
+ notice?: string;
123
146
  };
124
147
  }
125
148
  export interface UiData {
@@ -129,7 +152,17 @@ export interface UiData {
129
152
  };
130
153
  connectors: UiConnector[];
131
154
  activityEnabled: boolean;
155
+ credentialManagement: CredentialManagementCapability;
132
156
  }
157
+ export type CredentialManagementCapability = "available" | "requires_clerk" | "vault_not_configured" | "no_slots";
158
+ export type OperatorPage = "connections" | "credentials" | "activity";
159
+ export declare function operatorPageForPath(path: string): OperatorPage | undefined;
160
+ export declare function operatorPageTitle(page: OperatorPage, configuredTitle: string): string;
161
+ export declare function credentialManagementCapability(input: {
162
+ eligibleClerkOperator: boolean;
163
+ hasCredentialSlots: boolean;
164
+ hasCredentialVault: boolean;
165
+ }): CredentialManagementCapability;
133
166
  export interface FilteredUiConnector {
134
167
  connector: UiConnector;
135
168
  tools: UiTool[];
@@ -148,13 +181,11 @@ export declare function filterUiConnectors(connectors: UiConnector[], query: str
148
181
  export declare function buildUiData(registry: Registry, baseUrl: string, serverInfo: {
149
182
  name: string;
150
183
  version: string;
151
- }, credentialVault?: CredentialVault, activityEnabled?: boolean): Promise<UiData>;
184
+ }, credentialVault?: CredentialVault, activityEnabled?: boolean, credentialManagement?: CredentialManagementCapability): Promise<UiData>;
152
185
  /**
153
- * The `/ui` shell carries no connector data: everything comes client-side from
154
- * the auth-gated `/ui/data`. A configured Clerk provider gives operators a
155
- * normal sign-in flow and a short-lived session token; bearer-only deployments
156
- * retain the manual-token fallback.
186
+ * Every operator page serves this same data-free shell. Connector, credential,
187
+ * and activity data arrives only through the authenticated `/ui/*` APIs.
157
188
  */
158
- export declare function renderUiHtml(uiAuth?: UiAuthConfig, mcpUrl?: string, branding?: ConnectaBranding, nonce?: string): string;
189
+ export declare function renderUiHtml(uiAuth?: UiAuthConfig, mcpUrl?: string, branding?: ConnectaBranding, nonce?: string, page?: OperatorPage): string;
159
190
  export {};
160
191
  //# sourceMappingURL=ui.d.ts.map
package/dist/ui.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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