@dudko.dev/agent-web-react 0.0.34 → 0.0.35
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/README.md +51 -2
- package/dist/{elicitation-BTrJ5t3c.d.cts → elicitation-xMLll5W9.d.cts} +47 -3
- package/dist/{elicitation-BTrJ5t3c.d.ts → elicitation-xMLll5W9.d.ts} +47 -3
- package/dist/index.cjs +683 -157
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +205 -7
- package/dist/index.d.ts +205 -7
- package/dist/index.js +672 -156
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.cts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/styles.css +264 -0
- package/package.json +3 -3
package/dist/mcp.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpSkillConsent, AgentToolSet } from '@dudko.dev/agent-web';
|
|
2
|
-
import {
|
|
2
|
+
import { aY as McpOAuthRegistration, aZ as McpProtocolMode, P as PendingElicitation, f as McpElicitationResult, a_ as McpElicitationOptions, a$ as McpCatalogEntry, b0 as McpServerProtocol, b1 as McpOAuthRegistrationKind, b2 as McpOAuthCallback, b3 as McpServerResult, b4 as McpModule, b5 as ConnectedMcp, b6 as BrowserOAuthProviderOptions, b7 as BrowserOAuthProvider } from './elicitation-xMLll5W9.cjs';
|
|
3
3
|
import { McpAppsConnectionLike } from './index.cjs';
|
|
4
|
-
export {
|
|
4
|
+
export { b8 as ElicitationQueue, b9 as ElicitationQueueOptions, ap as McpElicitationFieldSchema, ba as McpElicitationHandler, aq as McpElicitationRequest, ar as McpElicitationSchema, bb as McpServerInstructions, bc as createElicitationQueue, bd as elicitationConnectOptions, be as elicitationSettings, bf as elicitationTimeoutOf } from './elicitation-xMLll5W9.cjs';
|
|
5
5
|
|
|
6
6
|
type McpStatus = 'idle' | 'connecting' | 'connected' | 'needs-authorization' | 'error';
|
|
7
7
|
/** The OAuth details of one server. Everything is optional. */
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpSkillConsent, AgentToolSet } from '@dudko.dev/agent-web';
|
|
2
|
-
import {
|
|
2
|
+
import { aY as McpOAuthRegistration, aZ as McpProtocolMode, P as PendingElicitation, f as McpElicitationResult, a_ as McpElicitationOptions, a$ as McpCatalogEntry, b0 as McpServerProtocol, b1 as McpOAuthRegistrationKind, b2 as McpOAuthCallback, b3 as McpServerResult, b4 as McpModule, b5 as ConnectedMcp, b6 as BrowserOAuthProviderOptions, b7 as BrowserOAuthProvider } from './elicitation-xMLll5W9.js';
|
|
3
3
|
import { McpAppsConnectionLike } from './index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { b8 as ElicitationQueue, b9 as ElicitationQueueOptions, ap as McpElicitationFieldSchema, ba as McpElicitationHandler, aq as McpElicitationRequest, ar as McpElicitationSchema, bb as McpServerInstructions, bc as createElicitationQueue, bd as elicitationConnectOptions, be as elicitationSettings, bf as elicitationTimeoutOf } from './elicitation-xMLll5W9.js';
|
|
5
5
|
|
|
6
6
|
type McpStatus = 'idle' | 'connecting' | 'connected' | 'needs-authorization' | 'error';
|
|
7
7
|
/** The OAuth details of one server. Everything is optional. */
|
package/dist/styles.css
CHANGED
|
@@ -2108,6 +2108,270 @@
|
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
|
|
2111
|
+
/* ── A question from the agent (ask_user) ─────────────────────────────────── */
|
|
2112
|
+
.awr-questions {
|
|
2113
|
+
display: flex;
|
|
2114
|
+
flex-direction: column;
|
|
2115
|
+
gap: 8px;
|
|
2116
|
+
min-width: 0;
|
|
2117
|
+
}
|
|
2118
|
+
.awr-question {
|
|
2119
|
+
border: 1px solid color-mix(in srgb, var(--awr-accent) 45%, var(--awr-border));
|
|
2120
|
+
background: color-mix(in srgb, var(--awr-accent) 7%, var(--awr-bg));
|
|
2121
|
+
border-radius: 10px;
|
|
2122
|
+
padding: 12px;
|
|
2123
|
+
display: flex;
|
|
2124
|
+
flex-direction: column;
|
|
2125
|
+
gap: 10px;
|
|
2126
|
+
min-width: 0;
|
|
2127
|
+
color: var(--awr-fg);
|
|
2128
|
+
font-family: var(--awr-font);
|
|
2129
|
+
font-size: 13px;
|
|
2130
|
+
}
|
|
2131
|
+
.awr-question--remote {
|
|
2132
|
+
border-style: dashed;
|
|
2133
|
+
background: var(--awr-subtle);
|
|
2134
|
+
}
|
|
2135
|
+
/* The host's own line: who asks. */
|
|
2136
|
+
.awr-question__head {
|
|
2137
|
+
display: flex;
|
|
2138
|
+
align-items: flex-start;
|
|
2139
|
+
gap: 8px;
|
|
2140
|
+
font-weight: 600;
|
|
2141
|
+
line-height: 1.4;
|
|
2142
|
+
}
|
|
2143
|
+
.awr-question__icon {
|
|
2144
|
+
color: var(--awr-accent);
|
|
2145
|
+
flex: none;
|
|
2146
|
+
margin-top: 1px;
|
|
2147
|
+
}
|
|
2148
|
+
.awr-question__lead {
|
|
2149
|
+
flex: 1;
|
|
2150
|
+
min-width: 0;
|
|
2151
|
+
overflow-wrap: anywhere;
|
|
2152
|
+
}
|
|
2153
|
+
.awr-question__count {
|
|
2154
|
+
flex: none;
|
|
2155
|
+
font-weight: 500;
|
|
2156
|
+
font-size: 12px;
|
|
2157
|
+
color: var(--awr-muted);
|
|
2158
|
+
border: 1px solid var(--awr-border);
|
|
2159
|
+
border-radius: 999px;
|
|
2160
|
+
padding: 1px 8px;
|
|
2161
|
+
white-space: nowrap;
|
|
2162
|
+
}
|
|
2163
|
+
/* The model's question: its own words, as text. */
|
|
2164
|
+
.awr-question__text {
|
|
2165
|
+
margin: 0;
|
|
2166
|
+
font-size: 15px;
|
|
2167
|
+
font-weight: 600;
|
|
2168
|
+
line-height: 1.45;
|
|
2169
|
+
white-space: pre-wrap;
|
|
2170
|
+
overflow-wrap: anywhere;
|
|
2171
|
+
}
|
|
2172
|
+
.awr-question__hint,
|
|
2173
|
+
.awr-question__remote {
|
|
2174
|
+
margin: -4px 0 0;
|
|
2175
|
+
font-size: 12px;
|
|
2176
|
+
color: var(--awr-muted);
|
|
2177
|
+
}
|
|
2178
|
+
.awr-question__remote {
|
|
2179
|
+
margin: 0;
|
|
2180
|
+
}
|
|
2181
|
+
/* One option per button: side by side while there is room, one under the other on a phone. */
|
|
2182
|
+
.awr-question__options {
|
|
2183
|
+
display: grid;
|
|
2184
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
|
|
2185
|
+
gap: 8px;
|
|
2186
|
+
min-width: 0;
|
|
2187
|
+
}
|
|
2188
|
+
.awr-question__option {
|
|
2189
|
+
box-sizing: border-box;
|
|
2190
|
+
display: flex;
|
|
2191
|
+
align-items: flex-start;
|
|
2192
|
+
gap: 10px;
|
|
2193
|
+
min-width: 0;
|
|
2194
|
+
min-height: 44px;
|
|
2195
|
+
padding: 10px 12px;
|
|
2196
|
+
border: 1px solid var(--awr-border);
|
|
2197
|
+
border-radius: 8px;
|
|
2198
|
+
background: var(--awr-bg);
|
|
2199
|
+
color: var(--awr-fg);
|
|
2200
|
+
font: inherit;
|
|
2201
|
+
font-size: 14px;
|
|
2202
|
+
text-align: left;
|
|
2203
|
+
cursor: pointer;
|
|
2204
|
+
}
|
|
2205
|
+
/* Only where there is a pointer that hovers: on a touch screen a tap leaves :hover behind. */
|
|
2206
|
+
@media (hover: hover) {
|
|
2207
|
+
.awr-question__option:hover {
|
|
2208
|
+
border-color: var(--awr-accent);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
.awr-question__option:focus-visible,
|
|
2212
|
+
.awr-question__input:focus-visible {
|
|
2213
|
+
outline: 2px solid var(--awr-accent);
|
|
2214
|
+
outline-offset: 1px;
|
|
2215
|
+
border-color: var(--awr-accent);
|
|
2216
|
+
}
|
|
2217
|
+
.awr-question__option.is-picked {
|
|
2218
|
+
border-color: var(--awr-accent);
|
|
2219
|
+
background: color-mix(in srgb, var(--awr-accent) 14%, var(--awr-bg));
|
|
2220
|
+
}
|
|
2221
|
+
.awr-question__key {
|
|
2222
|
+
flex: none;
|
|
2223
|
+
display: inline-flex;
|
|
2224
|
+
align-items: center;
|
|
2225
|
+
justify-content: center;
|
|
2226
|
+
width: 22px;
|
|
2227
|
+
height: 22px;
|
|
2228
|
+
border-radius: 6px;
|
|
2229
|
+
border: 1px solid var(--awr-border);
|
|
2230
|
+
color: var(--awr-muted);
|
|
2231
|
+
font-family: var(--awr-mono);
|
|
2232
|
+
font-size: 12px;
|
|
2233
|
+
line-height: 1;
|
|
2234
|
+
}
|
|
2235
|
+
.awr-question__body {
|
|
2236
|
+
flex: 1;
|
|
2237
|
+
min-width: 0;
|
|
2238
|
+
display: flex;
|
|
2239
|
+
flex-direction: column;
|
|
2240
|
+
gap: 2px;
|
|
2241
|
+
padding-top: 1px;
|
|
2242
|
+
}
|
|
2243
|
+
.awr-question__label {
|
|
2244
|
+
font-weight: 600;
|
|
2245
|
+
overflow-wrap: anywhere;
|
|
2246
|
+
}
|
|
2247
|
+
.awr-question__desc {
|
|
2248
|
+
font-size: 12px;
|
|
2249
|
+
color: var(--awr-muted);
|
|
2250
|
+
overflow-wrap: anywhere;
|
|
2251
|
+
}
|
|
2252
|
+
.awr-question__mark {
|
|
2253
|
+
flex: none;
|
|
2254
|
+
display: inline-flex;
|
|
2255
|
+
align-items: center;
|
|
2256
|
+
justify-content: center;
|
|
2257
|
+
width: 20px;
|
|
2258
|
+
height: 20px;
|
|
2259
|
+
border-radius: 5px;
|
|
2260
|
+
border: 1px solid var(--awr-border);
|
|
2261
|
+
color: var(--awr-accent-fg);
|
|
2262
|
+
}
|
|
2263
|
+
.awr-question__option.is-picked .awr-question__mark {
|
|
2264
|
+
background: var(--awr-accent);
|
|
2265
|
+
border-color: var(--awr-accent);
|
|
2266
|
+
}
|
|
2267
|
+
/* A question of the other tab: what it asks, without buttons. */
|
|
2268
|
+
.awr-question__list {
|
|
2269
|
+
margin: 0;
|
|
2270
|
+
padding: 0 0 0 18px;
|
|
2271
|
+
display: flex;
|
|
2272
|
+
flex-direction: column;
|
|
2273
|
+
gap: 4px;
|
|
2274
|
+
}
|
|
2275
|
+
.awr-question__list li {
|
|
2276
|
+
display: flex;
|
|
2277
|
+
flex-direction: column;
|
|
2278
|
+
gap: 1px;
|
|
2279
|
+
}
|
|
2280
|
+
.awr-question__other {
|
|
2281
|
+
display: flex;
|
|
2282
|
+
flex-direction: column;
|
|
2283
|
+
gap: 4px;
|
|
2284
|
+
min-width: 0;
|
|
2285
|
+
margin: 0;
|
|
2286
|
+
}
|
|
2287
|
+
.awr-question__otherlabel {
|
|
2288
|
+
font-weight: 600;
|
|
2289
|
+
}
|
|
2290
|
+
.awr-question__otherrow {
|
|
2291
|
+
display: flex;
|
|
2292
|
+
gap: 8px;
|
|
2293
|
+
min-width: 0;
|
|
2294
|
+
}
|
|
2295
|
+
.awr-question__input {
|
|
2296
|
+
box-sizing: border-box;
|
|
2297
|
+
flex: 1;
|
|
2298
|
+
width: 100%;
|
|
2299
|
+
min-width: 0;
|
|
2300
|
+
min-height: 40px;
|
|
2301
|
+
padding: 8px 10px;
|
|
2302
|
+
border: 1px solid var(--awr-border);
|
|
2303
|
+
border-radius: 8px;
|
|
2304
|
+
background: var(--awr-bg);
|
|
2305
|
+
color: var(--awr-fg);
|
|
2306
|
+
font: inherit;
|
|
2307
|
+
font-size: 14px;
|
|
2308
|
+
}
|
|
2309
|
+
.awr-question__actions {
|
|
2310
|
+
display: flex;
|
|
2311
|
+
gap: 8px;
|
|
2312
|
+
flex-wrap: wrap;
|
|
2313
|
+
}
|
|
2314
|
+
.awr-question__actions .awr-btn,
|
|
2315
|
+
.awr-question__otherrow .awr-btn {
|
|
2316
|
+
min-height: 40px;
|
|
2317
|
+
padding-left: 14px;
|
|
2318
|
+
padding-right: 14px;
|
|
2319
|
+
display: inline-flex;
|
|
2320
|
+
align-items: center;
|
|
2321
|
+
justify-content: center;
|
|
2322
|
+
gap: 6px;
|
|
2323
|
+
flex: none;
|
|
2324
|
+
}
|
|
2325
|
+
.awr-question__expiry {
|
|
2326
|
+
margin: -2px 0 0;
|
|
2327
|
+
font-size: 12px;
|
|
2328
|
+
color: var(--awr-muted);
|
|
2329
|
+
font-variant-numeric: tabular-nums;
|
|
2330
|
+
}
|
|
2331
|
+
/* A question the agent went on without. */
|
|
2332
|
+
.awr-question-outcome {
|
|
2333
|
+
display: flex;
|
|
2334
|
+
align-items: flex-start;
|
|
2335
|
+
gap: 8px;
|
|
2336
|
+
padding: 8px 8px 8px 12px;
|
|
2337
|
+
border: 1px solid color-mix(in srgb, var(--awr-warn) 45%, var(--awr-border));
|
|
2338
|
+
background: color-mix(in srgb, var(--awr-warn) 8%, var(--awr-bg));
|
|
2339
|
+
border-radius: 10px;
|
|
2340
|
+
color: var(--awr-fg);
|
|
2341
|
+
font-family: var(--awr-font);
|
|
2342
|
+
font-size: 13px;
|
|
2343
|
+
line-height: 1.45;
|
|
2344
|
+
}
|
|
2345
|
+
.awr-question-outcome__icon {
|
|
2346
|
+
color: var(--awr-warn);
|
|
2347
|
+
flex: none;
|
|
2348
|
+
margin-top: 11px;
|
|
2349
|
+
}
|
|
2350
|
+
.awr-question-outcome__text {
|
|
2351
|
+
flex: 1;
|
|
2352
|
+
min-width: 0;
|
|
2353
|
+
padding: 9px 0;
|
|
2354
|
+
overflow-wrap: anywhere;
|
|
2355
|
+
}
|
|
2356
|
+
.awr-question-outcome__question {
|
|
2357
|
+
color: var(--awr-muted);
|
|
2358
|
+
}
|
|
2359
|
+
.awr-question-outcome__dismiss {
|
|
2360
|
+
flex: none;
|
|
2361
|
+
width: 40px;
|
|
2362
|
+
height: 40px;
|
|
2363
|
+
}
|
|
2364
|
+
@media (pointer: coarse) {
|
|
2365
|
+
/* 16px keeps iOS from zooming into the field on focus. */
|
|
2366
|
+
.awr-question__input {
|
|
2367
|
+
font-size: 16px;
|
|
2368
|
+
}
|
|
2369
|
+
/* No keyboard to press them with: the number badges go. */
|
|
2370
|
+
.awr-question__key {
|
|
2371
|
+
display: none;
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2111
2375
|
/* ── Files an answer wrote: chips, inline previews ────────────────────────── */
|
|
2112
2376
|
.awr-msg__files {
|
|
2113
2377
|
align-self: stretch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudko.dev/agent-web-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "React bindings for @dudko.dev/agent-web: a headless useAgent hook, an AgentProvider context, and optional pre-styled components (chat panel, plan/step view, BYOK key form, WebLLM load bar) that connect the in-browser LLM agent to any React site. UI you can drop in — or a headless reducer you can build your own around.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"node": ">=18"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
|
-
"@dudko.dev/agent-web": ">=0.0.
|
|
130
|
+
"@dudko.dev/agent-web": ">=0.0.46",
|
|
131
131
|
"react": ">=18",
|
|
132
132
|
"react-dom": ">=18"
|
|
133
133
|
},
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"tsup": "^9.0.0",
|
|
146
146
|
"typescript": "^6.0.3",
|
|
147
147
|
"zod": "^4.6.7",
|
|
148
|
-
"@dudko.dev/agent-web": "0.0.
|
|
148
|
+
"@dudko.dev/agent-web": "0.0.47",
|
|
149
149
|
"@dudko.dev/test-servers": "0.0.0"
|
|
150
150
|
},
|
|
151
151
|
"scripts": {
|