@dudko.dev/agent-web-react 0.0.34 → 0.0.36
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 +52 -3
- 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 +869 -221
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +238 -12
- package/dist/index.d.ts +238 -12
- package/dist/index.js +882 -246
- 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 +277 -0
- package/package.json +4 -4
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
|
@@ -1236,6 +1236,19 @@
|
|
|
1236
1236
|
color: var(--awr-muted);
|
|
1237
1237
|
font-size: 11px;
|
|
1238
1238
|
}
|
|
1239
|
+
/* A model menu's sections (`ComposerModelOption.section`): a heading over each run of rows, a
|
|
1240
|
+
* rule between two runs. */
|
|
1241
|
+
.awr-menu__section + .awr-menu__section,
|
|
1242
|
+
.awr-menu__item + .awr-menu__section,
|
|
1243
|
+
.awr-menu__section--plain {
|
|
1244
|
+
margin-top: 4px;
|
|
1245
|
+
padding-top: 4px;
|
|
1246
|
+
border-top: 1px solid var(--awr-border);
|
|
1247
|
+
}
|
|
1248
|
+
.awr-menu__item:focus-visible {
|
|
1249
|
+
outline: 2px solid var(--awr-accent);
|
|
1250
|
+
outline-offset: -2px;
|
|
1251
|
+
}
|
|
1239
1252
|
|
|
1240
1253
|
/* Banners above the input. */
|
|
1241
1254
|
.awr-notices {
|
|
@@ -2108,6 +2121,270 @@
|
|
|
2108
2121
|
}
|
|
2109
2122
|
}
|
|
2110
2123
|
|
|
2124
|
+
/* ── A question from the agent (ask_user) ─────────────────────────────────── */
|
|
2125
|
+
.awr-questions {
|
|
2126
|
+
display: flex;
|
|
2127
|
+
flex-direction: column;
|
|
2128
|
+
gap: 8px;
|
|
2129
|
+
min-width: 0;
|
|
2130
|
+
}
|
|
2131
|
+
.awr-question {
|
|
2132
|
+
border: 1px solid color-mix(in srgb, var(--awr-accent) 45%, var(--awr-border));
|
|
2133
|
+
background: color-mix(in srgb, var(--awr-accent) 7%, var(--awr-bg));
|
|
2134
|
+
border-radius: 10px;
|
|
2135
|
+
padding: 12px;
|
|
2136
|
+
display: flex;
|
|
2137
|
+
flex-direction: column;
|
|
2138
|
+
gap: 10px;
|
|
2139
|
+
min-width: 0;
|
|
2140
|
+
color: var(--awr-fg);
|
|
2141
|
+
font-family: var(--awr-font);
|
|
2142
|
+
font-size: 13px;
|
|
2143
|
+
}
|
|
2144
|
+
.awr-question--remote {
|
|
2145
|
+
border-style: dashed;
|
|
2146
|
+
background: var(--awr-subtle);
|
|
2147
|
+
}
|
|
2148
|
+
/* The host's own line: who asks. */
|
|
2149
|
+
.awr-question__head {
|
|
2150
|
+
display: flex;
|
|
2151
|
+
align-items: flex-start;
|
|
2152
|
+
gap: 8px;
|
|
2153
|
+
font-weight: 600;
|
|
2154
|
+
line-height: 1.4;
|
|
2155
|
+
}
|
|
2156
|
+
.awr-question__icon {
|
|
2157
|
+
color: var(--awr-accent);
|
|
2158
|
+
flex: none;
|
|
2159
|
+
margin-top: 1px;
|
|
2160
|
+
}
|
|
2161
|
+
.awr-question__lead {
|
|
2162
|
+
flex: 1;
|
|
2163
|
+
min-width: 0;
|
|
2164
|
+
overflow-wrap: anywhere;
|
|
2165
|
+
}
|
|
2166
|
+
.awr-question__count {
|
|
2167
|
+
flex: none;
|
|
2168
|
+
font-weight: 500;
|
|
2169
|
+
font-size: 12px;
|
|
2170
|
+
color: var(--awr-muted);
|
|
2171
|
+
border: 1px solid var(--awr-border);
|
|
2172
|
+
border-radius: 999px;
|
|
2173
|
+
padding: 1px 8px;
|
|
2174
|
+
white-space: nowrap;
|
|
2175
|
+
}
|
|
2176
|
+
/* The model's question: its own words, as text. */
|
|
2177
|
+
.awr-question__text {
|
|
2178
|
+
margin: 0;
|
|
2179
|
+
font-size: 15px;
|
|
2180
|
+
font-weight: 600;
|
|
2181
|
+
line-height: 1.45;
|
|
2182
|
+
white-space: pre-wrap;
|
|
2183
|
+
overflow-wrap: anywhere;
|
|
2184
|
+
}
|
|
2185
|
+
.awr-question__hint,
|
|
2186
|
+
.awr-question__remote {
|
|
2187
|
+
margin: -4px 0 0;
|
|
2188
|
+
font-size: 12px;
|
|
2189
|
+
color: var(--awr-muted);
|
|
2190
|
+
}
|
|
2191
|
+
.awr-question__remote {
|
|
2192
|
+
margin: 0;
|
|
2193
|
+
}
|
|
2194
|
+
/* One option per button: side by side while there is room, one under the other on a phone. */
|
|
2195
|
+
.awr-question__options {
|
|
2196
|
+
display: grid;
|
|
2197
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
|
|
2198
|
+
gap: 8px;
|
|
2199
|
+
min-width: 0;
|
|
2200
|
+
}
|
|
2201
|
+
.awr-question__option {
|
|
2202
|
+
box-sizing: border-box;
|
|
2203
|
+
display: flex;
|
|
2204
|
+
align-items: flex-start;
|
|
2205
|
+
gap: 10px;
|
|
2206
|
+
min-width: 0;
|
|
2207
|
+
min-height: 44px;
|
|
2208
|
+
padding: 10px 12px;
|
|
2209
|
+
border: 1px solid var(--awr-border);
|
|
2210
|
+
border-radius: 8px;
|
|
2211
|
+
background: var(--awr-bg);
|
|
2212
|
+
color: var(--awr-fg);
|
|
2213
|
+
font: inherit;
|
|
2214
|
+
font-size: 14px;
|
|
2215
|
+
text-align: left;
|
|
2216
|
+
cursor: pointer;
|
|
2217
|
+
}
|
|
2218
|
+
/* Only where there is a pointer that hovers: on a touch screen a tap leaves :hover behind. */
|
|
2219
|
+
@media (hover: hover) {
|
|
2220
|
+
.awr-question__option:hover {
|
|
2221
|
+
border-color: var(--awr-accent);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
.awr-question__option:focus-visible,
|
|
2225
|
+
.awr-question__input:focus-visible {
|
|
2226
|
+
outline: 2px solid var(--awr-accent);
|
|
2227
|
+
outline-offset: 1px;
|
|
2228
|
+
border-color: var(--awr-accent);
|
|
2229
|
+
}
|
|
2230
|
+
.awr-question__option.is-picked {
|
|
2231
|
+
border-color: var(--awr-accent);
|
|
2232
|
+
background: color-mix(in srgb, var(--awr-accent) 14%, var(--awr-bg));
|
|
2233
|
+
}
|
|
2234
|
+
.awr-question__key {
|
|
2235
|
+
flex: none;
|
|
2236
|
+
display: inline-flex;
|
|
2237
|
+
align-items: center;
|
|
2238
|
+
justify-content: center;
|
|
2239
|
+
width: 22px;
|
|
2240
|
+
height: 22px;
|
|
2241
|
+
border-radius: 6px;
|
|
2242
|
+
border: 1px solid var(--awr-border);
|
|
2243
|
+
color: var(--awr-muted);
|
|
2244
|
+
font-family: var(--awr-mono);
|
|
2245
|
+
font-size: 12px;
|
|
2246
|
+
line-height: 1;
|
|
2247
|
+
}
|
|
2248
|
+
.awr-question__body {
|
|
2249
|
+
flex: 1;
|
|
2250
|
+
min-width: 0;
|
|
2251
|
+
display: flex;
|
|
2252
|
+
flex-direction: column;
|
|
2253
|
+
gap: 2px;
|
|
2254
|
+
padding-top: 1px;
|
|
2255
|
+
}
|
|
2256
|
+
.awr-question__label {
|
|
2257
|
+
font-weight: 600;
|
|
2258
|
+
overflow-wrap: anywhere;
|
|
2259
|
+
}
|
|
2260
|
+
.awr-question__desc {
|
|
2261
|
+
font-size: 12px;
|
|
2262
|
+
color: var(--awr-muted);
|
|
2263
|
+
overflow-wrap: anywhere;
|
|
2264
|
+
}
|
|
2265
|
+
.awr-question__mark {
|
|
2266
|
+
flex: none;
|
|
2267
|
+
display: inline-flex;
|
|
2268
|
+
align-items: center;
|
|
2269
|
+
justify-content: center;
|
|
2270
|
+
width: 20px;
|
|
2271
|
+
height: 20px;
|
|
2272
|
+
border-radius: 5px;
|
|
2273
|
+
border: 1px solid var(--awr-border);
|
|
2274
|
+
color: var(--awr-accent-fg);
|
|
2275
|
+
}
|
|
2276
|
+
.awr-question__option.is-picked .awr-question__mark {
|
|
2277
|
+
background: var(--awr-accent);
|
|
2278
|
+
border-color: var(--awr-accent);
|
|
2279
|
+
}
|
|
2280
|
+
/* A question of the other tab: what it asks, without buttons. */
|
|
2281
|
+
.awr-question__list {
|
|
2282
|
+
margin: 0;
|
|
2283
|
+
padding: 0 0 0 18px;
|
|
2284
|
+
display: flex;
|
|
2285
|
+
flex-direction: column;
|
|
2286
|
+
gap: 4px;
|
|
2287
|
+
}
|
|
2288
|
+
.awr-question__list li {
|
|
2289
|
+
display: flex;
|
|
2290
|
+
flex-direction: column;
|
|
2291
|
+
gap: 1px;
|
|
2292
|
+
}
|
|
2293
|
+
.awr-question__other {
|
|
2294
|
+
display: flex;
|
|
2295
|
+
flex-direction: column;
|
|
2296
|
+
gap: 4px;
|
|
2297
|
+
min-width: 0;
|
|
2298
|
+
margin: 0;
|
|
2299
|
+
}
|
|
2300
|
+
.awr-question__otherlabel {
|
|
2301
|
+
font-weight: 600;
|
|
2302
|
+
}
|
|
2303
|
+
.awr-question__otherrow {
|
|
2304
|
+
display: flex;
|
|
2305
|
+
gap: 8px;
|
|
2306
|
+
min-width: 0;
|
|
2307
|
+
}
|
|
2308
|
+
.awr-question__input {
|
|
2309
|
+
box-sizing: border-box;
|
|
2310
|
+
flex: 1;
|
|
2311
|
+
width: 100%;
|
|
2312
|
+
min-width: 0;
|
|
2313
|
+
min-height: 40px;
|
|
2314
|
+
padding: 8px 10px;
|
|
2315
|
+
border: 1px solid var(--awr-border);
|
|
2316
|
+
border-radius: 8px;
|
|
2317
|
+
background: var(--awr-bg);
|
|
2318
|
+
color: var(--awr-fg);
|
|
2319
|
+
font: inherit;
|
|
2320
|
+
font-size: 14px;
|
|
2321
|
+
}
|
|
2322
|
+
.awr-question__actions {
|
|
2323
|
+
display: flex;
|
|
2324
|
+
gap: 8px;
|
|
2325
|
+
flex-wrap: wrap;
|
|
2326
|
+
}
|
|
2327
|
+
.awr-question__actions .awr-btn,
|
|
2328
|
+
.awr-question__otherrow .awr-btn {
|
|
2329
|
+
min-height: 40px;
|
|
2330
|
+
padding-left: 14px;
|
|
2331
|
+
padding-right: 14px;
|
|
2332
|
+
display: inline-flex;
|
|
2333
|
+
align-items: center;
|
|
2334
|
+
justify-content: center;
|
|
2335
|
+
gap: 6px;
|
|
2336
|
+
flex: none;
|
|
2337
|
+
}
|
|
2338
|
+
.awr-question__expiry {
|
|
2339
|
+
margin: -2px 0 0;
|
|
2340
|
+
font-size: 12px;
|
|
2341
|
+
color: var(--awr-muted);
|
|
2342
|
+
font-variant-numeric: tabular-nums;
|
|
2343
|
+
}
|
|
2344
|
+
/* A question the agent went on without. */
|
|
2345
|
+
.awr-question-outcome {
|
|
2346
|
+
display: flex;
|
|
2347
|
+
align-items: flex-start;
|
|
2348
|
+
gap: 8px;
|
|
2349
|
+
padding: 8px 8px 8px 12px;
|
|
2350
|
+
border: 1px solid color-mix(in srgb, var(--awr-warn) 45%, var(--awr-border));
|
|
2351
|
+
background: color-mix(in srgb, var(--awr-warn) 8%, var(--awr-bg));
|
|
2352
|
+
border-radius: 10px;
|
|
2353
|
+
color: var(--awr-fg);
|
|
2354
|
+
font-family: var(--awr-font);
|
|
2355
|
+
font-size: 13px;
|
|
2356
|
+
line-height: 1.45;
|
|
2357
|
+
}
|
|
2358
|
+
.awr-question-outcome__icon {
|
|
2359
|
+
color: var(--awr-warn);
|
|
2360
|
+
flex: none;
|
|
2361
|
+
margin-top: 11px;
|
|
2362
|
+
}
|
|
2363
|
+
.awr-question-outcome__text {
|
|
2364
|
+
flex: 1;
|
|
2365
|
+
min-width: 0;
|
|
2366
|
+
padding: 9px 0;
|
|
2367
|
+
overflow-wrap: anywhere;
|
|
2368
|
+
}
|
|
2369
|
+
.awr-question-outcome__question {
|
|
2370
|
+
color: var(--awr-muted);
|
|
2371
|
+
}
|
|
2372
|
+
.awr-question-outcome__dismiss {
|
|
2373
|
+
flex: none;
|
|
2374
|
+
width: 40px;
|
|
2375
|
+
height: 40px;
|
|
2376
|
+
}
|
|
2377
|
+
@media (pointer: coarse) {
|
|
2378
|
+
/* 16px keeps iOS from zooming into the field on focus. */
|
|
2379
|
+
.awr-question__input {
|
|
2380
|
+
font-size: 16px;
|
|
2381
|
+
}
|
|
2382
|
+
/* No keyboard to press them with: the number badges go. */
|
|
2383
|
+
.awr-question__key {
|
|
2384
|
+
display: none;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2111
2388
|
/* ── Files an answer wrote: chips, inline previews ────────────────────────── */
|
|
2112
2389
|
.awr-msg__files {
|
|
2113
2390
|
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.36",
|
|
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,8 +145,8 @@
|
|
|
145
145
|
"tsup": "^9.0.0",
|
|
146
146
|
"typescript": "^6.0.3",
|
|
147
147
|
"zod": "^4.6.7",
|
|
148
|
-
"@dudko.dev/
|
|
149
|
-
"@dudko.dev/
|
|
148
|
+
"@dudko.dev/test-servers": "0.0.0",
|
|
149
|
+
"@dudko.dev/agent-web": "0.0.47"
|
|
150
150
|
},
|
|
151
151
|
"scripts": {
|
|
152
152
|
"build": "tsup",
|