@noodleseed/assistant 1.25.1 → 1.26.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/README.md +54 -20
- package/dist/{app-view-element-BNkQab1B.d.ts → app-view-element-C_ATXseu.d.ts} +1 -1
- package/dist/{app-view-element-DhuiNW_x.d.cts → app-view-element-CiFVNIke.d.cts} +1 -1
- package/dist/app-view.cjs +5 -5
- package/dist/app-view.cjs.map +1 -1
- package/dist/app-view.d.cts +3 -3
- package/dist/app-view.d.ts +3 -3
- package/dist/app-view.js +2 -2
- package/dist/{appearance-B6vSg8Ub.d.cts → appearance-C24W6BRj.d.cts} +7 -3
- package/dist/{appearance-B6vSg8Ub.d.ts → appearance-C24W6BRj.d.ts} +7 -3
- package/dist/{chunk-5TYS2Q6S.js → chunk-5NBHHNI3.js} +2 -2
- package/dist/{chunk-FJYPE4GC.js → chunk-5PW6PXCI.js} +702 -122
- package/dist/chunk-5PW6PXCI.js.map +1 -0
- package/dist/{chunk-7BQHW37I.js → chunk-FNXAVRL5.js} +7 -1
- package/dist/{chunk-7BQHW37I.js.map → chunk-FNXAVRL5.js.map} +1 -1
- package/dist/{chunk-CF2SCDLF.js → chunk-XKTUXFGX.js} +6 -6
- package/dist/chunk-XKTUXFGX.js.map +1 -0
- package/dist/{client-BkogON2A.d.ts → client-BheCOERq.d.ts} +51 -2
- package/dist/{client-C07ppTU_.d.cts → client-BiMRVxjs.d.cts} +51 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/embed.global.js +171 -89
- package/dist/index.cjs +709 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -53
- package/dist/index.d.ts +6 -53
- package/dist/index.js +3 -3
- package/dist/react/client.cjs.map +1 -1
- package/dist/react/client.d.cts +2 -2
- package/dist/react/client.d.ts +2 -2
- package/dist/react/client.js +1 -1
- package/dist/react.cjs +709 -124
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +4 -4
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-CF2SCDLF.js.map +0 -1
- package/dist/chunk-FJYPE4GC.js.map +0 -1
- /package/dist/{chunk-5TYS2Q6S.js.map → chunk-5NBHHNI3.js.map} +0 -0
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@ The package exports the canonical `<noodle-assistant>` managed Web Component, th
|
|
|
6
6
|
`<noodle-app-view>` MCP App host from `@noodleseed/assistant/app-view`, a managed React wrapper and
|
|
7
7
|
`NoodleAppView` adapter from `@noodleseed/assistant/react`, a renderer-free React hook from
|
|
8
8
|
`@noodleseed/assistant/react/client`, a DOM-free client from `@noodleseed/assistant/client`, and the
|
|
9
|
-
backend-only `createAssistantSession` helper from `@noodleseed/assistant/server`.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
DOM
|
|
9
|
+
backend-only `createAssistantSession` helper from `@noodleseed/assistant/server`. The component inherits the
|
|
10
|
+
deployed MCP server's brand kit while slots, methods, events, and semantic CSS variables let a SaaS developer
|
|
11
|
+
integrate it without depending on internal DOM selectors. Light, dark, automatic host-page matching, and
|
|
12
|
+
host-page inversion work without replacing conversation or App DOM.
|
|
13
13
|
|
|
14
14
|
Never pass an embed client secret, model key, MCP token, or raw application session into the browser
|
|
15
15
|
component. Exchange the already-authenticated user from the customer backend and return only the short-lived
|
|
@@ -22,7 +22,7 @@ The model configuration and SaaS integration credentials have different owners:
|
|
|
22
22
|
| Noodle deployment | `ASSISTANT_MODEL_BASE_URL`, `ASSISTANT_MODEL`, `ASSISTANT_MODEL_API_KEY` | Managed with `noodle variables set` / `noodle secrets set` |
|
|
23
23
|
| Customer backend | `NOODLE_SERVICE_URL`, `NOODLE_ASSISTANT_CLIENT_ID`, `NOODLE_ASSISTANT_CLIENT_SECRET` | Backend environment or secret manager only |
|
|
24
24
|
|
|
25
|
-
`
|
|
25
|
+
`access.origins` accepts exact origins. Production origins must be HTTPS; plain HTTP is accepted only for
|
|
26
26
|
loopback development origins such as `http://localhost:3000`. Local MCP authoring remains available without
|
|
27
27
|
login, but an external browser embed needs an active deployment before its deployment-bound client can be
|
|
28
28
|
created.
|
|
@@ -55,6 +55,7 @@ structure and treatment in `embeddedAssistant({ presentation })`:
|
|
|
55
55
|
|
|
56
56
|
```ts
|
|
57
57
|
import {
|
|
58
|
+
authenticatedWebsite,
|
|
58
59
|
embeddedAssistant,
|
|
59
60
|
openAICompatible,
|
|
60
61
|
secret,
|
|
@@ -83,19 +84,23 @@ export default server(
|
|
|
83
84
|
model: variable("ASSISTANT_MODEL"),
|
|
84
85
|
apiKey: secret("ASSISTANT_MODEL_API_KEY"),
|
|
85
86
|
}),
|
|
86
|
-
|
|
87
|
+
access: authenticatedWebsite({
|
|
88
|
+
origins: ["http://localhost:3000", "https://app.acme.example"],
|
|
89
|
+
}),
|
|
87
90
|
layout: {
|
|
88
91
|
mode: "floating",
|
|
89
|
-
position: "bottom-
|
|
90
|
-
panelWidth:
|
|
92
|
+
position: "bottom-center",
|
|
93
|
+
panelWidth: 970,
|
|
91
94
|
panelMinHeight: 540,
|
|
92
|
-
panelMaxHeight:
|
|
93
|
-
edgeOffset:
|
|
95
|
+
panelMaxHeight: 1025,
|
|
96
|
+
edgeOffset: 20,
|
|
94
97
|
},
|
|
95
|
-
|
|
98
|
+
theme: "invert",
|
|
99
|
+
behavior: { showTimestamps: true, showPoweredBy: false },
|
|
96
100
|
labels: {
|
|
97
101
|
welcomeHeading: "How can Acme help?",
|
|
98
102
|
welcomeMessage: "Fast answers from the tools your team already uses.",
|
|
103
|
+
launcherPlaceholder: "Ask Acme anything",
|
|
99
104
|
composerPlaceholder: "Message Acme Support…",
|
|
100
105
|
sessionReady: "Acme support is online",
|
|
101
106
|
},
|
|
@@ -107,6 +112,7 @@ export default server(
|
|
|
107
112
|
radius: 20,
|
|
108
113
|
},
|
|
109
114
|
launcher: {
|
|
115
|
+
style: "bubble",
|
|
110
116
|
icon: "chat",
|
|
111
117
|
size: "lg",
|
|
112
118
|
status: "session",
|
|
@@ -144,10 +150,15 @@ markup-looking text stays text. `presentation.panel.radius` is a bounded panel-s
|
|
|
144
150
|
not a second color or identity source. An HTTPS or packaged SVG referenced by `branding.logo`, `branding.mark`, or
|
|
145
151
|
`branding.avatar` is a bounded asset, not inline renderer markup.
|
|
146
152
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
153
|
+
With UI overrides omitted, the complete managed baseline remains: a bottom-center frosted launcher pill that
|
|
154
|
+
morphs into a prompt input before opening; a 970px outer desktop shell with 20px side padding, 85vh height,
|
|
155
|
+
1025px maximum height, and a 24px panel using the built-in `#F8F8F8` light and `#0C0A09` dark surfaces;
|
|
156
|
+
bottom prompt chips and pill composer; plain assistant messages and 85%-wide user bubbles; a Noodle Seed
|
|
157
|
+
attribution row; and safe-area-aware mobile fullscreen.
|
|
158
|
+
The generic prompt chips ship as defaults, while an authored list—including `[]`—replaces them. Set
|
|
159
|
+
`presentation.launcher.style` to `bubble` for a direct-open 44px launcher. The baseline does not include the
|
|
160
|
+
“Available on ChatGPT” promotion. Partial configuration objects merge with the remaining defaults;
|
|
161
|
+
`presentation.panel.surface: "glass"` remains available when a translucent panel is intentional.
|
|
151
162
|
|
|
152
163
|
### Configure and deploy
|
|
153
164
|
|
|
@@ -294,6 +305,22 @@ import "@noodleseed/assistant";
|
|
|
294
305
|
></noodle-assistant>
|
|
295
306
|
```
|
|
296
307
|
|
|
308
|
+
That single element is the complete managed assistant in React, Vue, Angular, or plain DOM. The
|
|
309
|
+
default pill expands into a prompt first; set `presentation.launcher.style: "bubble"` in `server.ts` when the
|
|
310
|
+
launcher should open the panel directly. Frameworks must treat `noodle-assistant` as a custom element.
|
|
311
|
+
|
|
312
|
+
When the host needs an authenticated fetch wrapper, assign complex values as properties before connecting
|
|
313
|
+
the element so the first session exchange already carries the application's credentials:
|
|
314
|
+
|
|
315
|
+
```ts
|
|
316
|
+
import type { NoodleAssistantElement } from "@noodleseed/assistant";
|
|
317
|
+
|
|
318
|
+
const assistant = document.createElement("noodle-assistant") as NoodleAssistantElement;
|
|
319
|
+
assistant.fetch = authenticatedFetch;
|
|
320
|
+
assistant.sessionEndpoint = "/api/assistant/session";
|
|
321
|
+
document.body.append(assistant);
|
|
322
|
+
```
|
|
323
|
+
|
|
297
324
|
Or use React:
|
|
298
325
|
|
|
299
326
|
```tsx
|
|
@@ -641,24 +668,31 @@ noodle-assistant {
|
|
|
641
668
|
```
|
|
642
669
|
|
|
643
670
|
For each matching region or token, precedence is the typed host appearance object, then host-provided slot
|
|
644
|
-
content or a public CSS custom property, then
|
|
645
|
-
defaults. The public slots are `launcher-icon`,
|
|
671
|
+
content or a public CSS custom property, then the saved environment operator override, compiled server
|
|
672
|
+
`presentation`/`branding`, and built-in defaults. The public slots are `launcher-icon`,
|
|
646
673
|
`header-leading`, `header-actions`, `empty-state`, `composer-leading`, `composer-trailing`, and
|
|
647
674
|
`conversation-footer`; slotted host DOM replaces the renderer fallback for that region. Slots are a trusted
|
|
648
675
|
embedding-page integration API, not a way to put HTML or callbacks in deployment configuration. Internal
|
|
649
676
|
shadow-DOM selectors and classes are not public API.
|
|
650
677
|
|
|
651
|
-
|
|
678
|
+
The Console **Assistant** tab and `noodle assistant appearance show|apply|reset` manage that environment
|
|
679
|
+
override. Existing embed code does not change: public elements load its non-secret configuration before
|
|
680
|
+
first paint without spending a session mint, while authenticated elements receive it from session exchange.
|
|
681
|
+
Each new session pins one resolved revision; an open conversation remains visually stable.
|
|
682
|
+
|
|
683
|
+
`theme="auto"` follows an explicit `light`/`dark` host-page class or data attribute, then the browser's
|
|
684
|
+
operating-system preference; `theme="invert"` selects the opposite host mode. When the embedding application has
|
|
652
685
|
its own theme toggle, pass its resolved `"light"` or `"dark"` value to `NoodleAssistant` and every
|
|
653
686
|
`<noodle-app-view>`/`NoodleAppView`. Updates change the assistant in place and notify mounted MCP Apps through standard host
|
|
654
687
|
context.
|
|
655
688
|
|
|
656
689
|
Server branding controls customer name, themed logo/mark/avatar assets, semantic light/dark colors, density,
|
|
657
|
-
radius, typography, and automatic theme. `embeddedAssistant(...)` controls
|
|
658
|
-
position and dimensions, mobile and launcher/header/avatar/timestamp behavior, visible labels, suggested
|
|
690
|
+
radius, typography, and automatic theme. `embeddedAssistant(...)` controls theme selection,
|
|
691
|
+
floating/inline/drawer layout, position and dimensions, mobile and launcher/header/avatar/timestamp/attribution behavior, visible labels, suggested
|
|
659
692
|
prompts, privacy/terms links, locale, and text direction.
|
|
660
693
|
Named slots cover launcher/header/composer/footer extensions. Public methods include `open`, `close`,
|
|
661
694
|
`toggle`, `focusComposer`, `sendMessage`, `stop`, `reconnect`, `updateContext`, `updateModelContext`, `respond`, `confirmTool`, and `resetSession`;
|
|
695
|
+
lifecycle properties include `sessionEndpoint`, `embedId`, `serviceUrl`, `fetch`, and `appearance`;
|
|
662
696
|
lifecycle, message, tool-proposal, interaction-resolution, view-availability, context, and error events
|
|
663
697
|
support application integration. `confirmTool(id)` remains the compatibility shorthand for
|
|
664
698
|
`respond(id, { action: 'accept' })`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AssistantClient, a as AssistantViewAvailableDetail, e as AssistantErrorDetail } from './client-
|
|
1
|
+
import { A as AssistantClient, a as AssistantViewAvailableDetail, e as AssistantErrorDetail } from './client-BheCOERq.js';
|
|
2
2
|
|
|
3
3
|
declare const APP_VIEW_TAG_NAME = "noodle-app-view";
|
|
4
4
|
interface AssistantAppViewErrorDetail {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AssistantClient, a as AssistantViewAvailableDetail, e as AssistantErrorDetail } from './client-
|
|
1
|
+
import { A as AssistantClient, a as AssistantViewAvailableDetail, e as AssistantErrorDetail } from './client-BiMRVxjs.cjs';
|
|
2
2
|
|
|
3
3
|
declare const APP_VIEW_TAG_NAME = "noodle-app-view";
|
|
4
4
|
interface AssistantAppViewErrorDetail {
|
package/dist/app-view.cjs
CHANGED
|
@@ -15197,7 +15197,7 @@ __export(app_view_exports, {
|
|
|
15197
15197
|
});
|
|
15198
15198
|
module.exports = __toCommonJS(app_view_exports);
|
|
15199
15199
|
|
|
15200
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.
|
|
15200
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
15201
15201
|
init_v4();
|
|
15202
15202
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
15203
15203
|
var JSONRPC_VERSION = "2.0";
|
|
@@ -16718,7 +16718,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
16718
16718
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/mini/parse.js
|
|
16719
16719
|
init_core2();
|
|
16720
16720
|
|
|
16721
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.
|
|
16721
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
16722
16722
|
function isZ4Schema(s2) {
|
|
16723
16723
|
const schema = s2;
|
|
16724
16724
|
return !!schema._zod;
|
|
@@ -16781,7 +16781,7 @@ function getLiteralValue(schema) {
|
|
|
16781
16781
|
return void 0;
|
|
16782
16782
|
}
|
|
16783
16783
|
|
|
16784
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.
|
|
16784
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
16785
16785
|
function isTerminal(status) {
|
|
16786
16786
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
16787
16787
|
}
|
|
@@ -16789,7 +16789,7 @@ function isTerminal(status) {
|
|
|
16789
16789
|
// ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.4.3/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
16790
16790
|
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
16791
16791
|
|
|
16792
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.
|
|
16792
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
16793
16793
|
function getMethodLiteral(schema) {
|
|
16794
16794
|
const shape = getObjectShape(schema);
|
|
16795
16795
|
const methodSchema = shape?.method;
|
|
@@ -16810,7 +16810,7 @@ function parseWithCompat(schema, data) {
|
|
|
16810
16810
|
return result.data;
|
|
16811
16811
|
}
|
|
16812
16812
|
|
|
16813
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.
|
|
16813
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
16814
16814
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
16815
16815
|
var Protocol = class {
|
|
16816
16816
|
constructor(_options) {
|