@object-ui/plugin-chatbot 17.3.0 → 17.6.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.
@@ -0,0 +1,134 @@
1
+ import { ChatMessage as AuthoredChatMessage, ChatToolInvocation as AuthoredToolInvocation } from '@object-ui/types';
2
+ import { ChatMessage as RuntimeChatMessage, ChatToolInvocation as RuntimeToolInvocation } from './ChatbotEnhanced';
3
+ /**
4
+ * The render-only MESSAGE keys — declared by the runtime contract, never by the
5
+ * authoring one. Named here (rather than spelled out at each use) so that
6
+ * adding a render-only key to `ChatbotEnhanced.ChatMessage` and forgetting this
7
+ * list is a one-line fix in one place. objectui#4424.
8
+ */
9
+ type RuntimeOnlyMessageKeys = Pick<RuntimeChatMessage, 'buildProgress' | 'blueprintProgress' | 'charts'>;
10
+ /**
11
+ * The render-only TOOL-INVOCATION keys — the HITL approval id, the ADR-0033
12
+ * draft review, the proposed plan / changes cards and the ADR-0057 P4 builder
13
+ * handoff. `mapMessages.ts` lifts every one of them out of a tool result; the
14
+ * authoring contract declares none of them. objectui#4424.
15
+ */
16
+ type RuntimeOnlyToolInvocationKeys = Pick<RuntimeToolInvocation, 'pendingActionId' | 'draftReview' | 'proposedPlan' | 'proposedChanges' | 'builderHandoff' | 'replayOutcome'>;
17
+ /**
18
+ * One tool invocation as it actually crosses this seam: the authoring contract,
19
+ * plus the render-only extensions it may ALREADY be carrying when it arrives
20
+ * from API mode.
21
+ *
22
+ * `AuthoredToolInvocation` stays assignable to this (every added key is
23
+ * optional), so a host holding plain authored invocations is unaffected.
24
+ */
25
+ export type SeamToolInvocation = AuthoredToolInvocation & Partial<RuntimeOnlyToolInvocationKeys>;
26
+ /**
27
+ * One message as it actually crosses this seam — the seam's INPUT contract.
28
+ *
29
+ * The authoring shape (`role: 'tool'`, `timestamp: Date`, legacy tool states —
30
+ * all still narrowed below) widened by the render-only keys an API-mode value
31
+ * already carries. This is what lets the pass-through spread preserve those
32
+ * keys as declared properties rather than as invisible runtime baggage
33
+ * (objectui#4424); see "Pass-through" in the module doc.
34
+ *
35
+ * `AuthoredChatMessage` is assignable to it, and so is the hook's
36
+ * `ObjectChatMessage` — the two callers this seam serves.
37
+ */
38
+ export type SeamChatMessage = Omit<AuthoredChatMessage, 'toolInvocations'> & {
39
+ toolInvocations?: SeamToolInvocation[];
40
+ } & Partial<RuntimeOnlyMessageKeys>;
41
+ /**
42
+ * `timestamp: string | Date` -> `string | undefined`.
43
+ *
44
+ * The authoring schema declares `z.union([z.string(), z.date()])`, and the
45
+ * runtime renders `{message.timestamp}` straight into a React child — a `Date`
46
+ * there is the classic "Objects are not valid as a React child" throw.
47
+ *
48
+ * This is the SINGLE expression of that absorption in the package: it was
49
+ * inlined in `useObjectChat`'s `normalizeMessages`, which now calls this
50
+ * function instead (objectui#4399). `normalizeMessages` keeps applying it
51
+ * because the hook's own `messages` output — and the `onSend(content,
52
+ * messages)` callback it feeds — has always handed hosts an ISO string, not a
53
+ * `Date`; the absorption is expressed once here and consumed at both points.
54
+ *
55
+ * The `instanceof` check (rather than an unconditional `.toISOString()`) is
56
+ * deliberate: authored JSON is not type-checked at runtime, so a value that is
57
+ * neither `string` nor `Date` must be dropped rather than thrown on. That is
58
+ * the behaviour the inlined version had.
59
+ */
60
+ export declare function toRuntimeTimestamp(timestamp: AuthoredChatMessage['timestamp']): string | undefined;
61
+ /**
62
+ * `role: 'user' | 'assistant' | 'system' | 'tool'` -> the runtime's three roles.
63
+ *
64
+ * **The named decision (objectui#4399): an authored `'tool'` message renders as
65
+ * an assistant bubble, with its content shown.** That was already the outcome
66
+ * before this module existed — the cast let `'tool'` reach `<ChatbotEnhanced>`,
67
+ * whose `formatMessageProps` maps everything that is not `'user'` to the
68
+ * assistant bubble — but it was an implicit fallthrough that nothing recorded
69
+ * and nothing tested. It is now a decision this seam makes, by name.
70
+ *
71
+ * Note this is NOT the same decision as `formatMessageProps`: that one maps a
72
+ * runtime role to one of the vendored `<Message>` element's two BUBBLE styles
73
+ * (and folds `'system'` in as well). This one answers a different question —
74
+ * which runtime role an authored `'tool'` message IS. `'system'` keeps its own
75
+ * runtime role here and still renders as the centred system pill in
76
+ * `<Chatbot>`.
77
+ *
78
+ * Changing the rendering of tool messages (a transcript-style tool block, say)
79
+ * is a UX card, not this one; it would start here.
80
+ */
81
+ export declare function toRuntimeRole(role: AuthoredChatMessage['role']): RuntimeChatMessage['role'];
82
+ /**
83
+ * Tool-invocation `state` -> the runtime's AI SDK v6 lifecycle states.
84
+ *
85
+ * The authoring type accepts three extra legacy values and its own doc comment
86
+ * already declares the mapping: "the legacy `partial-call`/`call`/`result`
87
+ * values are kept for back-compat; the AI SDK v6 lifecycle states map cleanly
88
+ * to `input-streaming`/`input-available`/`output-available`". This implements
89
+ * exactly that sentence — the fourth drift the `as any` was hiding, which the
90
+ * issue's table did not list.
91
+ *
92
+ * Rendered-output note: an authored legacy state used to reach `getToolState`
93
+ * unrecognised, which fell through to `'running'` and rendered a status badge
94
+ * with no label. Only schema-authored `toolInvocations` can carry the legacy
95
+ * spelling (API-mode messages come from `mapMessages`, which emits v6 states
96
+ * already), so this is the one place where the seam's honesty changes a
97
+ * rendered result — from a blank badge to the state the author declared.
98
+ */
99
+ export declare function toRuntimeToolState(state: AuthoredToolInvocation['state']): RuntimeToolInvocation['state'];
100
+ /**
101
+ * One authored tool invocation -> one runtime tool invocation.
102
+ *
103
+ * Only `state` drifts; everything else is spread through, which is what keeps
104
+ * the runtime-only extensions (`pendingActionId`, `draftReview`,
105
+ * `proposedPlan`, `proposedChanges`, `builderHandoff`) alive on the API-mode
106
+ * path. Since objectui#4424 the parameter names them ({@link
107
+ * SeamToolInvocation}), so `passthrough` carries them as declared properties
108
+ * instead of as keys the compiler cannot see — see the module doc.
109
+ */
110
+ export declare function toRuntimeToolInvocation(tool: SeamToolInvocation): RuntimeToolInvocation;
111
+ /**
112
+ * One chat message -> the message shape the chat components render.
113
+ *
114
+ * This is the seam. The three `messages as any` casts in `renderer.tsx` are
115
+ * this function now.
116
+ *
117
+ * The parameter is {@link SeamChatMessage} rather than the bare authoring type
118
+ * (objectui#4424): both are accepted — `AuthoredChatMessage` is assignable to
119
+ * it — but naming the render-only keys is what makes the pass-through
120
+ * compiler-visible instead of a documented act of faith.
121
+ */
122
+ export declare function authoredToRuntimeMessage(message: SeamChatMessage): RuntimeChatMessage;
123
+ /**
124
+ * Array form of {@link authoredToRuntimeMessage} — what the three registered
125
+ * renderers call.
126
+ *
127
+ * Call sites memoize on the input array (`useMemo(..., [messages])`) so the
128
+ * runtime array's identity stays exactly as stable as the hook's own output:
129
+ * local mode holds its messages in state, and the chat components key effects
130
+ * and memos off the `messages` prop.
131
+ */
132
+ export declare function toRuntimeMessages(messages: readonly SeamChatMessage[] | undefined): RuntimeChatMessage[];
133
+ export {};
134
+ //# sourceMappingURL=chatMessageAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatMessageAdapter.d.ts","sourceRoot":"","sources":["../src/chatMessageAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,KAAK,EACV,WAAW,IAAI,mBAAmB,EAClC,kBAAkB,IAAI,sBAAsB,EAC7C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,WAAW,IAAI,kBAAkB,EACjC,kBAAkB,IAAI,qBAAqB,EAC5C,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,KAAK,sBAAsB,GAAG,IAAI,CAChC,kBAAkB,EAClB,eAAe,GAAG,mBAAmB,GAAG,QAAQ,CACjD,CAAC;AAEF;;;;;GAKG;AACH,KAAK,6BAA6B,GAAG,IAAI,CACvC,qBAAqB,EACnB,iBAAiB,GACjB,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,CAClB,CAAC;AAEF;;;;;;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AAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE7E,eAAO,MAAM,sBAAsB,GAAI,yBAGpC,2BAA2B,gCAE7B,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAC3D,OAAO,gBAAgB,CACxB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,yBAGzC,gCAAgC,gCAElC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ChatMessage } from './ChatbotEnhanced';
1
2
  /**
2
3
  * ObjectUI
3
4
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -6,14 +7,6 @@
6
7
  * LICENSE file in the root directory of this source tree.
7
8
  */
8
9
  import * as React from "react";
9
- export interface ChatMessage {
10
- id: string;
11
- role: "user" | "assistant" | "system";
12
- content: string;
13
- timestamp?: string;
14
- avatar?: string;
15
- avatarFallback?: string;
16
- }
17
10
  export interface ChatbotProps extends React.HTMLAttributes<HTMLDivElement> {
18
11
  messages?: ChatMessage[];
19
12
  placeholder?: string;
@@ -43,6 +36,14 @@ declare const TypingIndicator: React.ForwardRefExoticComponent<TypingIndicatorPr
43
36
  export { Chatbot, TypingIndicator };
44
37
  export { useObjectChat } from './useObjectChat';
45
38
  export type { UseObjectChatOptions, UseObjectChatReturn } from './useObjectChat';
39
+ /**
40
+ * What `useObjectChat` emits from `messages` and `onSend` — neither the
41
+ * `@object-ui/types` AUTHORING contract (which the hook used to declare while
42
+ * API mode cast RUNTIME values into it) nor the runtime one (which would be a
43
+ * lie about local mode's authored `'tool'` role and legacy tool states). See
44
+ * the type's own doc for the survey that decided it (objectui#4424).
45
+ */
46
+ export type { ObjectChatMessage } from './useObjectChat';
46
47
  export { AI_USAGE_REFRESH_EVENT, emitAiUsageRefresh } from './useObjectChat';
47
48
  export { useAgents, resolveDefaultAgentName, PLATFORM_DEFAULT_AGENT, agentHasCapability } from './useAgents';
48
49
  export type { UseAgentsOptions, UseAgentsReturn, AgentDescriptor, AgentCapabilities, } from './useAgents';
@@ -59,10 +60,53 @@ export { FloatingChatbotPanel } from './FloatingChatbotPanel';
59
60
  export type { FloatingChatbotPanelProps } from './FloatingChatbotPanel';
60
61
  export * from './renderer';
61
62
  export { ChatbotEnhanced, publishHealthFromResponse } from './ChatbotEnhanced';
62
- export type { ChatbotEnhancedProps, ChatMessage as ChatbotEnhancedMessage, ChatToolInvocation as ChatbotEnhancedToolInvocation, ChatSource as ChatbotEnhancedSource, ChatbotLabels, ToolDecisionState, PublishHealth, PublishOutcome, } from './ChatbotEnhanced';
63
+ export type { ChatbotEnhancedProps, ChatToolInvocation as ChatbotEnhancedToolInvocation, ChatSource as ChatbotEnhancedSource, ChatbotLabels, ToolDecisionState, PublishHealth, PublishOutcome, } from './ChatbotEnhanced';
64
+ /**
65
+ * The chat message contract of `@object-ui/plugin-chatbot` — the shape
66
+ * `<ChatbotEnhanced>` renders and `uiMessagesToChatMessages()` produces.
67
+ *
68
+ * This barrel used to DECLARE a second, minimal `ChatMessage` of its own
69
+ * (`id`/`role`/`content`/`timestamp`/`avatar`/`avatarFallback` only) while the
70
+ * enhanced shape was re-exported from the same module under the alias
71
+ * `ChatbotEnhancedMessage`. One natural name, two contracts: an importer who
72
+ * reached for `ChatMessage` silently got the narrow one, and the mismatch
73
+ * compiled because every construction site spreads the extra keys
74
+ * conditionally (`...(x ? { toolInvocations } : {})`), which defeats
75
+ * excess-property checking — so the declared type was narrower than every
76
+ * value flowing through it (objectui#4040; corrected for app-shell's
77
+ * `AiChatPage` in PR #4379, but the barrel itself was left as-is).
78
+ *
79
+ * The minimal declaration is retired rather than renamed: nothing produced it,
80
+ * no importer asked for it, and every field it had is present with the same
81
+ * type on the enhanced shape, which adds only OPTIONAL keys on top. So
82
+ * `ChatMessage` now denotes one contract everywhere in this package
83
+ * (objectui#4383). Pinned at compile time in
84
+ * `__tests__/chat-message-contract.test.ts`.
85
+ *
86
+ * `<Chatbot>` renders only the core fields; the enhanced surface (tool calls,
87
+ * reasoning, sources, build progress, charts) is `<ChatbotEnhanced>`.
88
+ */
89
+ export type { ChatMessage } from './ChatbotEnhanced';
90
+ /**
91
+ * @deprecated Use `ChatMessage`. This alias now denotes the SAME type — it is
92
+ * kept only so importers that spelled the disambiguating name while the barrel
93
+ * still carried two shapes (e.g. app-shell's `AiChatPage`, PR #4379) keep
94
+ * compiling. New code should import `ChatMessage` (objectui#4383).
95
+ */
96
+ export type { ChatMessage as ChatbotEnhancedMessage } from './ChatbotEnhanced';
63
97
  export * as AIElements from './elements';
64
- export { uiMessageToChatMessage, uiMessagesToChatMessages, detectDraftResult, detectProposedPlan, detectBuilderHandoff, detectProposedChanges, buildProgressFromDraftReview, } from './mapMessages';
65
- export type { DraftReview, ProposedPlan, BuilderHandoff, ProposedChanges } from './mapMessages';
98
+ export { uiMessageToChatMessage, uiMessagesToChatMessages, detectDraftResult, detectProposedPlan, detectBuilderHandoff, detectProposedChanges, detectReplayOutcome, detectAuthoringVerdict, detectBuiltAppPackage, buildProgressFromDraftReview, } from './mapMessages';
99
+ export type { DraftReview, ProposedPlan, BuilderHandoff, ProposedChanges, ReplayOutcome, } from './mapMessages';
100
+ export { authoredToRuntimeMessage, toRuntimeMessages, toRuntimeRole, toRuntimeTimestamp, toRuntimeToolInvocation, toRuntimeToolState, } from './chatMessageAdapter';
101
+ /**
102
+ * The seam's INPUT contract: the authoring shape widened by the render-only
103
+ * keys an API-mode value already carries. A host converting its own messages
104
+ * with `toRuntimeMessages` never needs to name this — `ChatMessage` from
105
+ * `@object-ui/types` is assignable to it — but a host that HOLDS such values
106
+ * (having driven `useChat` itself, say) can now say so instead of casting
107
+ * (objectui#4424).
108
+ */
109
+ export type { SeamChatMessage, SeamToolInvocation } from './chatMessageAdapter';
66
110
  export { humanizeToolName, unwrapToolResult, summarizeChatError, } from './tool-display';
67
111
  export { usePendingActions } from './usePendingActions';
68
112
  export type { UsePendingActionsOptions, UsePendingActionsReturn, PendingActionRow, PendingActionStatus, ApproveOut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