@agent-native/agentkit 0.3.2-nightly-20260927082735 → 0.4.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/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +12 -1
- package/dist/adapters/http.js.map +1 -1
- package/dist/client/client.d.ts +36 -2
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +123 -1
- package/dist/client/client.js.map +1 -1
- package/dist/protocol/index.d.ts +4 -0
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/validation.d.ts.map +1 -1
- package/dist/protocol/validation.js +4 -0
- package/dist/protocol/validation.js.map +1 -1
- package/dist/react/components.d.ts +18 -3
- package/dist/react/components.d.ts.map +1 -1
- package/dist/react/components.js +662 -123
- package/dist/react/components.js.map +1 -1
- package/dist/react/context.d.ts +55 -2
- package/dist/react/context.d.ts.map +1 -1
- package/dist/react/context.js +40 -4
- package/dist/react/context.js.map +1 -1
- package/dist/react/root.d.ts +4 -2
- package/dist/react/root.d.ts.map +1 -1
- package/dist/react/root.js +8 -2
- package/dist/react/root.js.map +1 -1
- package/dist/react/styles.css +245 -50
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ interface AgentKitErrorBoundaryState {
|
|
|
14
14
|
error?: Error;
|
|
15
15
|
resetKey?: string | number;
|
|
16
16
|
}
|
|
17
|
+
/** Isolates custom renderers so one extension cannot take down the chat. */
|
|
17
18
|
export declare class AgentKitErrorBoundary extends Component<AgentKitErrorBoundaryProps, AgentKitErrorBoundaryState> {
|
|
18
19
|
state: AgentKitErrorBoundaryState;
|
|
19
20
|
static getDerivedStateFromError(error: Error): Partial<AgentKitErrorBoundaryState>;
|
|
@@ -21,7 +22,9 @@ export declare class AgentKitErrorBoundary extends Component<AgentKitErrorBounda
|
|
|
21
22
|
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
22
23
|
render(): ReactNode;
|
|
23
24
|
}
|
|
25
|
+
/** Rejects executable and embedded-data URLs before they reach a default anchor. */
|
|
24
26
|
export declare function safeAgentHref(href?: string): string | undefined;
|
|
27
|
+
/** Keeps participant avatars on image-capable, non-executable URL schemes. */
|
|
25
28
|
export declare function safeAgentImageSrc(src?: string): string | undefined;
|
|
26
29
|
export declare function AgentObjectReferenceView({ value: object, }: AgentKitRenderProps<AgentObjectReference>): import("react").JSX.Element;
|
|
27
30
|
export declare function AgentParticipantView({ value: agent, }: AgentKitRenderProps<AgentParticipant>): import("react").JSX.Element;
|
|
@@ -58,30 +61,42 @@ export declare function AgentWidgetView({ value: widget, threadId, }: AgentKitRe
|
|
|
58
61
|
export interface AgentMessagePartViewProps extends AgentKitRenderProps<AgentMessagePart> {
|
|
59
62
|
active?: boolean;
|
|
60
63
|
resetKey?: string;
|
|
64
|
+
userMessage?: boolean;
|
|
61
65
|
}
|
|
62
|
-
export declare function AgentMessagePartView({ value: part, threadId, active, resetKey, }: AgentMessagePartViewProps): import("react").JSX.Element | null;
|
|
66
|
+
export declare function AgentMessagePartView({ value: part, threadId, active, resetKey, userMessage, }: AgentMessagePartViewProps): import("react").JSX.Element | null;
|
|
67
|
+
/** Resolves the stable server request identity without exposing local UI ids. */
|
|
63
68
|
export declare function resolveAgentMessageRequestId(message: AgentMessage, events: readonly AgentEvent[]): RunId | undefined;
|
|
64
69
|
export declare function AgentMessageActions({ value: message, threadId, }: AgentKitRenderProps<AgentMessage>): import("react").JSX.Element;
|
|
65
70
|
export declare function AgentMessageView({ value: message, threadId, }: AgentKitRenderProps<AgentMessage>): import("react").JSX.Element;
|
|
66
71
|
export declare function AgentRunFailure({ error, runId, threadId, }: AgentRunFailureRenderProps): import("react").JSX.Element;
|
|
67
72
|
export declare function AgentConnectionErrorView({ error, threadId, recover, recovering, recoveryError, }: AgentConnectionErrorRenderProps): import("react").JSX.Element;
|
|
68
|
-
export interface AgentKitComposerProps extends Pick<PromptComposerProps, "slashCommands" | "slashSkills" | "includeDefaultSlashCommands" | "includeDefaultSlashSkills" | "onSlashCommand" | "plusMenuMode" | "voiceEnabled" | "autoFocus" | "contextItems" | "onRemoveContextItem" | "onInspectContextItem" | "onRetryContextItem" | "contextMenuItems" | "attachmentAdapter" | "inlineTextAttachments"> {
|
|
73
|
+
export interface AgentKitComposerProps extends Omit<Pick<PromptComposerProps, "slashCommands" | "slashSkills" | "includeDefaultSlashCommands" | "includeDefaultSlashSkills" | "onSlashCommand" | "plusMenuMode" | "voiceEnabled" | "autoFocus" | "disabled" | "onDisabledClick" | "initialText" | "initialTextKey" | "layoutVariant" | "availableModels" | "modelListLoading" | "selectedModel" | "selectedEngine" | "selectedEffort" | "placeholder" | "onConnectProvider" | "onConnectLocalRuntime" | "imageModelMenu" | "onModelChange" | "onEffortChange" | "availableAgents" | "selectedAgent" | "agentOnly" | "onAgentChange" | "onModelSelectorOpenChange" | "modelStatusChecksEnabled" | "attachmentsEnabled" | "onAttachmentRequest" | "contextButtonTooltipDisabled" | "onTextChange" | "contextItems" | "onRemoveContextItem" | "onInspectContextItem" | "onRetryContextItem" | "contextMenuItems" | "attachmentAdapter" | "inlineTextAttachments" | "extraActionButton" | "onSubmit" | "onBeforeSubmit" | "onAttachmentError" | "interceptBuildRequestsForBuilder" | "planModeDisabled" | "planModeDisabledReason" | "stopButton">, "onSubmit"> {
|
|
74
|
+
/** Override the default AgentKit submit path when the host owns send options. */
|
|
75
|
+
onSubmit?: PromptComposerProps["onSubmit"];
|
|
69
76
|
beforeSend?: (submission: AgentKitComposerSubmission) => void | Promise<void>;
|
|
70
77
|
threadId?: string;
|
|
71
78
|
className?: string;
|
|
72
79
|
queueWhileRunning?: boolean;
|
|
73
80
|
showModelSelector?: boolean;
|
|
81
|
+
/** Controlled execution mode for agent-native act/plan workflows. */
|
|
74
82
|
mode?: "act" | "plan";
|
|
83
|
+
/** Initial execution mode when the composer is uncontrolled. */
|
|
75
84
|
defaultMode?: "act" | "plan";
|
|
85
|
+
/** Called when the execution mode changes. */
|
|
76
86
|
onModeChange?: (mode: "act" | "plan") => void;
|
|
87
|
+
/** Shared host toolbar controls shown above the composer. */
|
|
88
|
+
toolbarSlot?: ReactNode;
|
|
77
89
|
}
|
|
78
|
-
export declare function AgentKitComposer({ threadId: requestedThreadId, className, queueWhileRunning, showModelSelector, slashCommands, slashSkills, includeDefaultSlashCommands, includeDefaultSlashSkills, onSlashCommand, plusMenuMode, voiceEnabled, autoFocus, mode, defaultMode, onModeChange, contextItems, onRemoveContextItem, onInspectContextItem, onRetryContextItem, contextMenuItems, attachmentAdapter, inlineTextAttachments, beforeSend, }: AgentKitComposerProps): import("react").JSX.Element;
|
|
90
|
+
export declare function AgentKitComposer({ threadId: requestedThreadId, className, queueWhileRunning, showModelSelector, slashCommands, slashSkills, includeDefaultSlashCommands, includeDefaultSlashSkills, onSlashCommand, plusMenuMode, voiceEnabled, autoFocus, mode, defaultMode, onModeChange, toolbarSlot, disabled, onDisabledClick, placeholder, initialText, initialTextKey, layoutVariant, availableModels, modelListLoading, selectedModel, selectedEngine, selectedEffort, onConnectProvider, onConnectLocalRuntime, imageModelMenu, onModelChange, onEffortChange, availableAgents, selectedAgent, agentOnly, onAgentChange, onModelSelectorOpenChange, modelStatusChecksEnabled, attachmentsEnabled, onAttachmentRequest, contextButtonTooltipDisabled, onTextChange, contextItems, onRemoveContextItem, extraActionButton, onSubmit: onSubmitOverride, onBeforeSubmit, onAttachmentError, interceptBuildRequestsForBuilder, planModeDisabled, planModeDisabledReason, stopButton, onInspectContextItem, onRetryContextItem, contextMenuItems, attachmentAdapter, inlineTextAttachments, beforeSend, }: AgentKitComposerProps): import("react").JSX.Element;
|
|
79
91
|
export interface AgentKitChatProps {
|
|
80
92
|
title?: ReactNode;
|
|
81
93
|
toolbar?: ReactNode;
|
|
82
94
|
composer?: boolean;
|
|
95
|
+
/** Configures the reference composer without replacing its slot. */
|
|
83
96
|
composerProps?: Omit<AgentKitComposerProps, "threadId">;
|
|
97
|
+
/** New conversations center the composer; embedded panels can anchor it. */
|
|
84
98
|
emptyComposerPlacement?: "center" | "bottom";
|
|
99
|
+
/** Follow new output until the user deliberately scrolls away. */
|
|
85
100
|
autoScroll?: boolean;
|
|
86
101
|
className?: string;
|
|
87
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/react/components.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/react/components.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,mBAAmB,EAIzB,MAAM,gCAAgC,CAAC;AAyCxC,OAAO,EAEL,SAAS,EAUT,KAAK,SAAS,EAKd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAE3B,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAErB,KAAK,SAAS,EAGd,KAAK,WAAW,EAChB,KAAK,KAAK,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAOL,KAAK,+BAA+B,EAEpC,KAAK,mBAAmB,EAGxB,KAAK,0BAA0B,EAChC,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,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