@object-ui/plugin-chatbot 17.5.0 → 17.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.
@@ -1,5 +1,5 @@
1
- import { ChatMessage as OuiChatMessage } from '@object-ui/types';
2
- import { SeamChatMessage } from './chatMessageAdapter';
1
+ import { useChat } from '@ai-sdk/react';
2
+ import { SeamChatMessage } from './chatMessageAdapter.js';
3
3
  /**
4
4
  * What `useObjectChat` actually emits — from `messages` and from the
5
5
  * `onSend(content, messages)` callback fed from it (objectui#4424).
@@ -20,6 +20,11 @@ import { SeamChatMessage } from './chatMessageAdapter';
20
20
  * surface unchanged and are folded only at the render seam, which is the
21
21
  * decision `chatMessageAdapter.ts` records. So the runtime type would have
22
22
  * been a lie about local mode.
23
+ * - **wide where API mode is wide.** The AI SDK's three approval states
24
+ * (`approval-requested`, `approval-responded`, `output-denied`) are
25
+ * runtime-only — the authoring contract refuses them (objectui#10018) —
26
+ * but API mode produces them, so its tool invocations carry them. So the
27
+ * authoring type would have been a lie about API mode.
23
28
  * - **narrow where BOTH modes are narrow.** `timestamp` is `string`, never
24
29
  * `Date`: API mode never produces one and local mode absorbs it in
25
30
  * `normalizeMessages` before it is ever handed out. Declaring `Date` here
@@ -29,10 +34,15 @@ import { SeamChatMessage } from './chatMessageAdapter';
29
34
  * draft-review / proposed-plan / builder-handoff extensions on each tool
30
35
  * invocation.
31
36
  *
32
- * It is a SUBTYPE of `@object-ui/types`' `ChatMessage`, which is what makes the
33
- * change invisible to correct consumers: anything that accepted the authoring
34
- * type still accepts these values, including a host `onSend` callback that
35
- * declares its parameter as `ChatMessage[]`.
37
+ * ⚠️ It is NOT a subtype of `@object-ui/types`' `ChatMessage` (objectui#10018).
38
+ * It was one until the authoring `state` union shed the three runtime-only
39
+ * approval states; the values did not change, the authoring contract did. So a
40
+ * host `onSend` callback that declares its parameter as the authoring
41
+ * `ChatMessage[]` no longer type-checks — it was being handed states that
42
+ * contract refuses. Declare it as `ObjectChatMessage[]`. `ChatbotSchema.onSend`
43
+ * (the schema's runtime slot, forwarded here by the three renderers) is typed
44
+ * with the authoring shape widened by exactly those three states, and this type
45
+ * is assignable to it.
36
46
  */
37
47
  export type ObjectChatMessage = Omit<SeamChatMessage, 'timestamp'> & {
38
48
  /**
@@ -109,8 +119,35 @@ export declare function withTurnId(req: {
109
119
  * first turn to seed the ask thread as context. Exported for unit testing.
110
120
  */
111
121
  export declare function withHandoffContext(body: Record<string, unknown>, parentConversationId: string): Record<string, unknown>;
112
- type InitialMessage = OuiChatMessage & {
113
- parts?: Array<Record<string, unknown>>;
122
+ /**
123
+ * One initial message — the seam's INPUT shape ({@link SeamChatMessage}), not
124
+ * the authoring one (objectui#10018).
125
+ *
126
+ * The two callers hand in different things: the schema renderer passes
127
+ * `schema.messages` (authored), and app-shell passes the output of
128
+ * `hydratedMessagesToChatMessages` — RUNTIME values restored from server
129
+ * history, which carry the AI SDK's approval states and the render-only keys.
130
+ * The authoring `ChatMessage` refuses those approval states, so it cannot type
131
+ * the second caller; the seam's input admits both, and the authoring shape is
132
+ * assignable to it, so no authored caller is affected.
133
+ */
134
+ type InitialMessage = SeamChatMessage & {
135
+ /**
136
+ * Pre-built chat-runtime parts, handed through to the store untouched when
137
+ * present. Declared as {@link SdkChatMessage}'s own part array — DERIVED, so
138
+ * a runtime bump moves it — rather than as the `Array<Record<string,
139
+ * unknown>>` it used to be (objectui#8426).
140
+ *
141
+ * ⚠️ **BREAKING for a host that passes `parts`.** `Record<string, unknown>`
142
+ * admitted every object, including the ones the store cannot hold, and the
143
+ * mismatch was absorbed by a cast at the `useChat` call instead of being
144
+ * reported here. Nothing in this repository sets this member (the schema
145
+ * renderer passes `schema.messages`, and app-shell passes the output of
146
+ * `hydratedMessagesToChatMessages`, whose literal declares no `parts`), so
147
+ * the narrowing is visible only to external hosts — which is exactly the
148
+ * population it protects.
149
+ */
150
+ parts?: SdkChatMessage['parts'];
114
151
  reasoning?: string;
115
152
  };
116
153
  /**
@@ -160,11 +197,6 @@ export interface UseObjectChatOptions {
160
197
  * Additional body parameters for each API request.
161
198
  */
162
199
  body?: Record<string, unknown>;
163
- /**
164
- * Maximum tool-calling round-trips per message.
165
- * @default 5
166
- */
167
- maxToolRoundtrips?: number;
168
200
  /**
169
201
  * Error callback.
170
202
  */
@@ -190,10 +222,12 @@ export interface UseObjectChatOptions {
190
222
  * External send callback (fires for both modes).
191
223
  *
192
224
  * `messages` is the thread as it will be after this send, in the same shape
193
- * the hook's own `messages` uses — see {@link ObjectChatMessage}. A callback
194
- * that declares the parameter as `@object-ui/types`' `ChatMessage[]` still
195
- * type-checks (the emitted shape is a subtype); declaring it as
196
- * `ObjectChatMessage[]` is what lets you READ the render-only keys.
225
+ * the hook's own `messages` uses — see {@link ObjectChatMessage}. Declare the
226
+ * parameter as `ObjectChatMessage[]`: that is also what lets you READ the
227
+ * render-only keys. ⚠️ A callback that declares it as `@object-ui/types`'
228
+ * authoring `ChatMessage[]` no longer type-checks (objectui#10018) — the
229
+ * emitted shape can carry the three runtime-only approval states that the
230
+ * authoring contract refuses, so it is not a subtype of it.
197
231
  */
198
232
  onSend?: (content: string, messages: ObjectChatMessage[]) => void;
199
233
  }
@@ -218,7 +252,41 @@ export interface UseObjectChatReturn {
218
252
  reload: () => void;
219
253
  /** Clear all messages */
220
254
  clear: () => void;
221
- /** ADR-0013 D2: re-hydrate the thread (API mode only); undefined in local mode. */
255
+ /**
256
+ * ADR-0013 D2: re-hydrate the thread (API mode only); undefined in local mode.
257
+ *
258
+ * Deliberately loose, and — since objectui#8342 — honest about it. The
259
+ * parameter stays `unknown[]` because this package will not republish
260
+ * `@ai-sdk/react`'s pinned `UIMessage` on its own surface; that is the same
261
+ * call objectui#8214 made one file over for `AnyPart.state`. Parameters are
262
+ * CONTRAVARIANT, so this declaration used to be a lie: the value handed out
263
+ * was the SDK's own `setMessages`, which accepts only its `UIMessage[]`, and
264
+ * the only thing stopping `tsc` from saying so was a `chatResult as any`
265
+ * inside the hook.
266
+ *
267
+ * What the implementation now guarantees, which is what makes the
268
+ * declaration a promise it keeps: the hook wraps the SDK function and CHECKS
269
+ * every element before handing the array on. A value that is not a chat
270
+ * message — not an object, or missing a string `id`, a
271
+ * `'user' | 'assistant' | 'system'` role, or a `parts` array — is REFUSED
272
+ * LOUDLY: the call throws a `TypeError` naming the offending index, and the
273
+ * SDK's store is left untouched, because the whole array is checked before
274
+ * anything is written.
275
+ *
276
+ * Refusing rather than FILTERING is the contract, on purpose. This is a
277
+ * re-hydration path: the caller's statement is "the thread is now exactly
278
+ * these messages". Dropping the elements that failed would install a SHORTER
279
+ * thread with no way for the caller to notice — the return type is `void` —
280
+ * which is the same silent-deletion failure objectui#4424 was graded on. The
281
+ * one in-repo consumer, `@object-ui/app-shell`'s `useReconcileOnError`,
282
+ * already calls this inside a `try`/`catch` that falls through to the
283
+ * ordinary error banner, so a refusal degrades to "show the error" instead of
284
+ * to a quietly-truncated transcript.
285
+ *
286
+ * Note the surface accepts an ARRAY only. The SDK's own `setMessages` also
287
+ * takes an updater callback; this member never advertised one and still
288
+ * does not.
289
+ */
222
290
  setMessages?: (messages: unknown[]) => void;
223
291
  /** Whether the hook is operating in API (streaming) mode */
224
292
  isApiMode: boolean;
@@ -229,6 +297,14 @@ export interface UseObjectChatReturn {
229
297
  /** Handle input change event */
230
298
  handleInputChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
231
299
  }
300
+ /**
301
+ * The message element the PINNED `@ai-sdk/react` `setMessages` accepts,
302
+ * DERIVED from that function rather than restated. No SDK type is named here,
303
+ * so a version bump that moves `UIMessage` moves this alias with it and the
304
+ * published `UseObjectChatReturn['setMessages']` never has to move at all —
305
+ * which is precisely why objectui#8342 was ruled option B and not option A.
306
+ */
307
+ type SdkChatMessage = Extract<Parameters<ReturnType<typeof useChat>['setMessages']>[0], readonly unknown[]>[number];
232
308
  /**
233
309
  * useObjectChat – Composable hook for ObjectUI Chatbot.
234
310
  *
@@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atbot",
3
- "version": "17.5.0",
3
+ "version": "17.7.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Chatbot interface plugin for Object UI",
@@ -24,26 +24,23 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@ai-sdk/react": "^4.0.59",
27
+ "@ai-sdk/react": "^4.0.68",
28
28
  "@radix-ui/react-slot": "^1.3.3",
29
- "@objectstack/spec": "^17.0.0-rc.6",
29
+ "@objectstack/spec": "^17.0.0",
30
30
  "@radix-ui/react-use-controllable-state": "^1.2.6",
31
- "ai": "^7.0.56",
31
+ "ai": "^7.0.65",
32
32
  "class-variance-authority": "^0.7.1",
33
- "lucide-react": "^1.29.0",
34
- "motion": "^12.43.0",
33
+ "lucide-react": "^1.43.0",
34
+ "motion": "^13.2.0",
35
35
  "nanoid": "^6.0.1",
36
- "react-markdown": "^10.1.0",
37
- "react-syntax-highlighter": "^16.1.1",
38
- "remark-gfm": "^4.0.1",
39
36
  "shiki": "^4.4.2",
40
37
  "streamdown": "^2.5.0",
41
38
  "use-stick-to-bottom": "^1.1.6",
42
- "@object-ui/components": "17.5.0",
43
- "@object-ui/core": "17.5.0",
44
- "@object-ui/i18n": "17.5.0",
45
- "@object-ui/react": "17.5.0",
46
- "@object-ui/types": "17.5.0"
39
+ "@object-ui/components": "17.7.0",
40
+ "@object-ui/core": "17.7.0",
41
+ "@object-ui/i18n": "17.7.0",
42
+ "@object-ui/react": "17.7.0",
43
+ "@object-ui/types": "17.7.0"
47
44
  },
48
45
  "peerDependencies": {
49
46
  "react": "^18.0.0 || ^19.0.0",
@@ -52,7 +49,6 @@
52
49
  "devDependencies": {
53
50
  "@types/react": "19.2.18",
54
51
  "@types/react-dom": "19.2.4",
55
- "@types/react-syntax-highlighter": "^15.5.13",
56
52
  "@vitejs/plugin-react": "^6.0.5",
57
53
  "typescript": "^6.0.3",
58
54
  "vite": "^8.2.1",
@@ -84,8 +80,8 @@
84
80
  ],
85
81
  "scripts": {
86
82
  "build": "vite build",
87
- "test": "vitest run",
88
- "test:watch": "vitest",
83
+ "test": "vitest run --root ../.. packages/plugin-chatbot/",
84
+ "test:watch": "vitest --root ../.. packages/plugin-chatbot/",
89
85
  "type-check": "tsc --noEmit && tsc -p tsconfig.test.json",
90
86
  "lint": "eslint ."
91
87
  }