@hachej/boring-agent 0.1.13 → 0.1.14
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 +242 -42
- package/dist/DebugDrawer-MCYZ4AWZ.js +6 -0
- package/dist/chunk-F3CE5CNW.js +38 -0
- package/dist/chunk-MMJA3QON.js +295 -0
- package/dist/front/index.d.ts +48 -76
- package/dist/front/index.js +2396 -1795
- package/dist/front/styles.css +2242 -1267
- package/dist/{sandbox-handle-store-DCNEJJ6b.d.ts → sandbox-handle-store-hK76cTjn.d.ts} +2 -0
- package/dist/server/index.d.ts +22 -2
- package/dist/server/index.js +2015 -1541
- package/dist/shared/index.d.ts +11 -7
- package/dist/shared/index.js +10 -1
- package/dist/{harness-DT3ZzdAN.d.ts → tool-ui-DSmWuqGe.d.ts} +33 -4
- package/package.json +4 -4
package/dist/front/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode, ComponentType, HTMLAttributes, ComponentProps, FormEvent
|
|
3
|
+
import { ReactNode, ComponentType, HTMLAttributes, ComponentProps, FormEvent } from 'react';
|
|
4
|
+
import { T as ToolUiMetadata, S as SendMessageInput, d as SessionSummary } from '../tool-ui-DSmWuqGe.js';
|
|
4
5
|
import * as ai from 'ai';
|
|
5
6
|
import { UIMessage, FileUIPart, ChatStatus } from 'ai';
|
|
6
7
|
import * as _ai_sdk_react from '@ai-sdk/react';
|
|
7
|
-
import {
|
|
8
|
-
import { Button, Collapsible, CollapsibleContent, CollapsibleTrigger, InputGroupButton, TooltipContent, InputGroupAddon, InputGroupTextarea } from '@hachej/boring-ui-kit';
|
|
8
|
+
import { Button, Collapsible, CollapsibleContent, CollapsibleTrigger, InputGroupAddon, InputGroupButton, InputGroupTextarea } from '@hachej/boring-ui-kit';
|
|
9
9
|
import { Streamdown } from 'streamdown';
|
|
10
10
|
import { StickToBottom } from 'use-stick-to-bottom';
|
|
11
11
|
import { ClassValue } from 'clsx';
|
|
@@ -34,7 +34,11 @@ interface SlashCommandContext {
|
|
|
34
34
|
sessionId: string;
|
|
35
35
|
clearMessages: () => void;
|
|
36
36
|
resetSession: () => void;
|
|
37
|
-
|
|
37
|
+
/** Explicit provider-qualified model selection (`provider:id` or `{ provider, id }`). */
|
|
38
|
+
setModel: (model: string | {
|
|
39
|
+
provider: string;
|
|
40
|
+
id: string;
|
|
41
|
+
}) => boolean;
|
|
38
42
|
listCommands: () => SlashCommand[];
|
|
39
43
|
}
|
|
40
44
|
interface CommandRegistry {
|
|
@@ -44,14 +48,6 @@ interface CommandRegistry {
|
|
|
44
48
|
}
|
|
45
49
|
declare function createCommandRegistry(initial?: SlashCommand[]): CommandRegistry;
|
|
46
50
|
|
|
47
|
-
interface DiffViewProps {
|
|
48
|
-
oldString: string;
|
|
49
|
-
newString: string;
|
|
50
|
-
path: string;
|
|
51
|
-
replaceAll?: boolean;
|
|
52
|
-
}
|
|
53
|
-
declare function DiffView({ oldString, newString, path, replaceAll }: DiffViewProps): react_jsx_runtime.JSX.Element;
|
|
54
|
-
|
|
55
51
|
type ToolState = 'input-streaming' | 'input-available' | 'approval-requested' | 'approval-responded' | 'output-available' | 'output-error' | 'output-denied';
|
|
56
52
|
|
|
57
53
|
interface ToolPart {
|
|
@@ -62,6 +58,7 @@ interface ToolPart {
|
|
|
62
58
|
input?: unknown;
|
|
63
59
|
output?: unknown;
|
|
64
60
|
errorText?: string;
|
|
61
|
+
ui?: ToolUiMetadata;
|
|
65
62
|
}
|
|
66
63
|
type ToolRenderer = (part: ToolPart) => ReactNode;
|
|
67
64
|
type ToolRendererOverrides = Partial<Record<string, ToolRenderer>>;
|
|
@@ -139,15 +136,27 @@ interface ChatEmptyStateProps {
|
|
|
139
136
|
declare function ChatEmptyState({ eyebrow, title, description, suggestions, onSelect, footer, className, }: ChatEmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
140
137
|
|
|
141
138
|
/**
|
|
142
|
-
* Selected model, stored as { provider, id } so the composer can
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
139
|
+
* Selected model, stored as { provider, id } so the composer can pass through
|
|
140
|
+
* the agent runtime's registered model IDs rather than a local alias table.
|
|
141
|
+
* Unqualified legacy aliases are ignored: Boring must not infer a provider
|
|
142
|
+
* when the runtime owns model selection.
|
|
146
143
|
*/
|
|
147
144
|
interface ModelSelection {
|
|
148
145
|
provider: string;
|
|
149
146
|
id: string;
|
|
150
147
|
}
|
|
148
|
+
|
|
149
|
+
type ComposerBlockerAction = {
|
|
150
|
+
id: string;
|
|
151
|
+
label: string;
|
|
152
|
+
};
|
|
153
|
+
type ComposerBlocker = {
|
|
154
|
+
id: string;
|
|
155
|
+
reason: string;
|
|
156
|
+
label?: string;
|
|
157
|
+
sessionId?: string;
|
|
158
|
+
actions?: ComposerBlockerAction[];
|
|
159
|
+
};
|
|
151
160
|
interface ChatPanelProps {
|
|
152
161
|
sessionId: string;
|
|
153
162
|
toolRenderers?: ToolRendererOverrides;
|
|
@@ -167,12 +176,12 @@ interface ChatPanelProps {
|
|
|
167
176
|
* app — e.g. a data-app might offer "Build a chart from a CSV" instead.
|
|
168
177
|
*/
|
|
169
178
|
suggestions?: ChatSuggestion[];
|
|
170
|
-
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
179
|
+
/** Custom empty-state text. Omit to use defaults. */
|
|
180
|
+
emptyState?: {
|
|
181
|
+
eyebrow?: string;
|
|
182
|
+
title?: string;
|
|
183
|
+
description?: string;
|
|
184
|
+
};
|
|
176
185
|
/**
|
|
177
186
|
* Render the extended-thinking selector in the composer footer (off / low
|
|
178
187
|
* / medium / high). When enabled, the selected level is persisted in
|
|
@@ -207,17 +216,17 @@ interface ChatPanelProps {
|
|
|
207
216
|
onOpenArtifact?: OpenArtifactHandler;
|
|
208
217
|
/**
|
|
209
218
|
* Enable the admin debug drawer — system prompt, raw messages JSON, and
|
|
210
|
-
*
|
|
211
|
-
*
|
|
219
|
+
* session activity. Intended for development and ops; keep off in
|
|
220
|
+
* production consumer UIs. The drawer chunk is lazy-loaded so this prop
|
|
221
|
+
* is zero-cost when off.
|
|
212
222
|
*/
|
|
213
223
|
debug?: boolean;
|
|
224
|
+
/** Generic host-provided blockers that prevent starting a new user turn. */
|
|
225
|
+
composerBlockers?: ComposerBlocker[];
|
|
226
|
+
/** Called when the user presses Stop in the composer. */
|
|
227
|
+
onComposerStop?: () => void;
|
|
228
|
+
onComposerBlockerAction?: (blocker: ComposerBlocker, action: string) => void;
|
|
214
229
|
className?: string;
|
|
215
|
-
/** When provided, files are uploaded immediately on attach and sent as stable
|
|
216
|
-
* server URLs rather than base64 data URLs. Supply via useFileUpload() from
|
|
217
|
-
* @hachej/boring-workspace's DataProvider context. */
|
|
218
|
-
onUploadFile?: (file: File) => Promise<{
|
|
219
|
-
url: string;
|
|
220
|
-
}>;
|
|
221
230
|
}
|
|
222
231
|
declare function ChatPanel(props: ChatPanelProps): react_jsx_runtime.JSX.Element;
|
|
223
232
|
|
|
@@ -250,6 +259,7 @@ declare function getAgentCommands(options?: AgentCommandOptions): AgentCommandCo
|
|
|
250
259
|
type UseAgentChatOptions = Pick<SendMessageInput, 'sessionId' | 'model' | 'thinkingLevel'> & {
|
|
251
260
|
onData?: (part: unknown) => void;
|
|
252
261
|
requestHeaders?: Record<string, string>;
|
|
262
|
+
persistMessages?: boolean;
|
|
253
263
|
};
|
|
254
264
|
declare function useAgentChat(opts: UseAgentChatOptions): _ai_sdk_react.UseChatHelpers<UIMessage<unknown, ai.UIDataTypes, ai.UITools>>;
|
|
255
265
|
|
|
@@ -306,19 +316,13 @@ type MessageActionProps = ComponentProps<typeof Button> & {
|
|
|
306
316
|
declare const MessageAction: ({ tooltip, children, label, variant, size, ...props }: MessageActionProps) => react_jsx_runtime.JSX.Element;
|
|
307
317
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
308
318
|
declare const MessageResponse: react.MemoExoticComponent<({ className, shikiTheme, components, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
309
|
-
type MessageToolbarProps = ComponentProps<"div">;
|
|
310
|
-
declare const MessageToolbar: ({ className, children, ...props }: MessageToolbarProps) => react_jsx_runtime.JSX.Element;
|
|
311
319
|
|
|
312
|
-
type ConversationProps = ComponentProps<typeof StickToBottom
|
|
313
|
-
|
|
320
|
+
type ConversationProps = ComponentProps<typeof StickToBottom> & {
|
|
321
|
+
onScrollToBottomReady?: (scrollToBottom: () => void) => void;
|
|
322
|
+
};
|
|
323
|
+
declare const Conversation: ({ className, children, onScrollToBottomReady, ...props }: ConversationProps) => react_jsx_runtime.JSX.Element;
|
|
314
324
|
type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;
|
|
315
325
|
declare const ConversationContent: ({ className, ...props }: ConversationContentProps) => react_jsx_runtime.JSX.Element;
|
|
316
|
-
type ConversationEmptyStateProps = ComponentProps<"div"> & {
|
|
317
|
-
title?: string;
|
|
318
|
-
description?: string;
|
|
319
|
-
icon?: React.ReactNode;
|
|
320
|
-
};
|
|
321
|
-
declare const ConversationEmptyState: ({ className, title, description, icon, children, ...props }: ConversationEmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
322
326
|
type ConversationScrollButtonProps = ComponentProps<typeof Button>;
|
|
323
327
|
declare const ConversationScrollButton: ({ className, ...props }: ConversationScrollButtonProps) => false | react_jsx_runtime.JSX.Element;
|
|
324
328
|
|
|
@@ -344,22 +348,10 @@ type CodeBlockProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
344
348
|
language: string;
|
|
345
349
|
showLineNumbers?: boolean;
|
|
346
350
|
};
|
|
347
|
-
declare const CodeBlockContainer: ({ className, language, style, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
348
|
-
language: string;
|
|
349
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
350
|
-
declare const CodeBlockHeader: ({ children, className, ...props }: HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
351
|
-
declare const CodeBlockContent: ({ code, language, showLineNumbers, }: {
|
|
352
|
-
code: string;
|
|
353
|
-
language: string;
|
|
354
|
-
showLineNumbers?: boolean;
|
|
355
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
356
351
|
declare const CodeBlock: ({ code, language, showLineNumbers, className, children, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
timeout?: number;
|
|
361
|
-
};
|
|
362
|
-
declare const CodeBlockCopyButton: ({ onCopy, onError, timeout, children, className, ...props }: CodeBlockCopyButtonProps) => react_jsx_runtime.JSX.Element;
|
|
352
|
+
|
|
353
|
+
type PromptInputFooterProps = Omit<ComponentProps<typeof InputGroupAddon>, "align">;
|
|
354
|
+
declare const PromptInputFooter: ({ className, ...props }: PromptInputFooterProps) => react_jsx_runtime.JSX.Element;
|
|
363
355
|
|
|
364
356
|
interface PromptInputMessage {
|
|
365
357
|
text: string;
|
|
@@ -386,32 +378,12 @@ type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, "onSubmit" | "onEr
|
|
|
386
378
|
declare const PromptInput: ({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, onUploadFile, children, ...props }: PromptInputProps) => react_jsx_runtime.JSX.Element;
|
|
387
379
|
type PromptInputTextareaProps = ComponentProps<typeof InputGroupTextarea>;
|
|
388
380
|
declare const PromptInputTextarea: ({ onChange, onKeyDown, className, placeholder, ...props }: PromptInputTextareaProps) => react_jsx_runtime.JSX.Element;
|
|
389
|
-
type PromptInputFooterProps = Omit<ComponentProps<typeof InputGroupAddon>, "align">;
|
|
390
|
-
declare const PromptInputFooter: ({ className, ...props }: PromptInputFooterProps) => react_jsx_runtime.JSX.Element;
|
|
391
|
-
type PromptInputButtonTooltip = string | {
|
|
392
|
-
content: ReactNode;
|
|
393
|
-
shortcut?: string;
|
|
394
|
-
side?: ComponentProps<typeof TooltipContent>["side"];
|
|
395
|
-
};
|
|
396
|
-
type PromptInputButtonProps = ComponentProps<typeof InputGroupButton> & {
|
|
397
|
-
tooltip?: PromptInputButtonTooltip;
|
|
398
|
-
};
|
|
399
|
-
declare const PromptInputButton: ({ variant, className, size, tooltip, ...props }: PromptInputButtonProps) => react_jsx_runtime.JSX.Element;
|
|
400
381
|
type PromptInputSubmitProps = ComponentProps<typeof InputGroupButton> & {
|
|
401
382
|
status?: ChatStatus;
|
|
402
383
|
onStop?: () => void;
|
|
403
384
|
};
|
|
404
385
|
declare const PromptInputSubmit: ({ className, variant, size, status, onStop, onClick, children, ...props }: PromptInputSubmitProps) => react_jsx_runtime.JSX.Element;
|
|
405
386
|
|
|
406
|
-
interface TextShimmerProps {
|
|
407
|
-
children: string;
|
|
408
|
-
as?: ElementType;
|
|
409
|
-
className?: string;
|
|
410
|
-
duration?: number;
|
|
411
|
-
spread?: number;
|
|
412
|
-
}
|
|
413
|
-
declare const Shimmer: react.MemoExoticComponent<({ children, as: Component, className, duration, spread, }: TextShimmerProps) => react_jsx_runtime.JSX.Element>;
|
|
414
|
-
|
|
415
387
|
declare function cn(...inputs: ClassValue[]): string;
|
|
416
388
|
|
|
417
|
-
export { type AgentCommandContribution, type AgentCommandOptions, ArtifactOpenProvider, ChatEmptyState, type ChatEmptyStateProps, ChatPanel, type ChatPanelProps, type ChatSuggestion, CodeBlock,
|
|
389
|
+
export { type AgentCommandContribution, type AgentCommandOptions, ArtifactOpenProvider, ChatEmptyState, type ChatEmptyStateProps, ChatPanel, type ChatPanelProps, type ChatSuggestion, CodeBlock, type CommandRegistry, Conversation, ConversationContent, ConversationScrollButton, DebugDrawer, type GroupedToolEntry, Message, MessageAction, MessageActions, MessageContent, MessageResponse, type OpenArtifactHandler, type ParsedCommand, PromptInput, PromptInputFooter, PromptInputSubmit, PromptInputTextarea, Reasoning, ReasoningContent, ReasoningTrigger, type SlashCommand, type SlashCommandContext, ToolCallGroup, type ToolPart, type ToolRenderer, type ToolRendererOverrides, type UploadFileOptions, type UploadFileResult, type UseAgentChatOptions, type UseSessionsOptions, type UseSessionsResult, builtinCommands, cn, createCommandRegistry, defaultChatSuggestions, defaultToolRenderers, getAgentCommands, mergeShadcnToolRenderers, mergeToolRenderers, parseSlashCommand, resolveToolRenderer, uploadFile, useAgentChat, useOpenArtifact, useSessions };
|