@inkeep/agents-ui 0.0.0-dev-20260508201702 → 0.0.0-dev-20260508211520
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/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.70.0_react@19.3.0-canary-87ae75b3-20260128_/node_modules/@hookform/resolvers/zod/dist/zod.cjs +1 -0
- package/dist/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.70.0_react@19.3.0-canary-87ae75b3-20260128_/node_modules/@hookform/resolvers/zod/dist/zod.js +93 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.cjs +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +49 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.cjs +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +19 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.cjs +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +28 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.cjs +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +23 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +13 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +181 -183
- package/dist/styled/components/ask-user-form.cjs +1 -0
- package/dist/styled/components/ask-user-form.d.ts +96 -0
- package/dist/styled/components/ask-user-form.js +672 -0
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +272 -210
- package/dist/styled/inkeep.css.cjs +78 -0
- package/dist/styled/inkeep.css.js +78 -0
- package/package.json +2 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Form-schema vocabulary mirrored from agents-api default-tools.ts. The
|
|
4
|
+
* shape of `form` 1:1 determines the shape of the answers returned to the
|
|
5
|
+
* server — children of a group nest under that group's id, list answers
|
|
6
|
+
* come back as arrays. No separate mapping config: structure IS the
|
|
7
|
+
* mapping.
|
|
8
|
+
*/
|
|
9
|
+
export type LeafType = 'text' | 'multiline' | 'number' | 'email' | 'boolean' | 'date';
|
|
10
|
+
export type ListItemType = 'text' | 'number' | 'email' | 'date' | 'boolean';
|
|
11
|
+
export type Width = 'short' | 'medium' | 'full';
|
|
12
|
+
export interface LeafNode {
|
|
13
|
+
kind: 'leaf';
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
type: LeafType;
|
|
17
|
+
default?: string | number | boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
options?: Array<{
|
|
20
|
+
value: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
}>;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
helpText?: string;
|
|
25
|
+
autocomplete?: string;
|
|
26
|
+
width?: Width;
|
|
27
|
+
validation?: {
|
|
28
|
+
minLength?: number;
|
|
29
|
+
maxLength?: number;
|
|
30
|
+
pattern?: string;
|
|
31
|
+
min?: number;
|
|
32
|
+
max?: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface ListNode {
|
|
36
|
+
kind: 'list';
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
itemType: ListItemType;
|
|
40
|
+
options?: Array<{
|
|
41
|
+
value: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
}>;
|
|
44
|
+
min?: number;
|
|
45
|
+
max?: number;
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
helpText?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface GroupNode {
|
|
50
|
+
kind: 'group';
|
|
51
|
+
id: string;
|
|
52
|
+
label?: string;
|
|
53
|
+
helpText?: string;
|
|
54
|
+
children: FormNode[];
|
|
55
|
+
}
|
|
56
|
+
export interface GroupListNode {
|
|
57
|
+
kind: 'groupList';
|
|
58
|
+
id: string;
|
|
59
|
+
label: string;
|
|
60
|
+
helpText?: string;
|
|
61
|
+
/** Each row is an instance of this group template. */
|
|
62
|
+
item: GroupNode;
|
|
63
|
+
min?: number;
|
|
64
|
+
max?: number;
|
|
65
|
+
/** Verb-noun label for the add-row button (e.g., "Add attendee"). */
|
|
66
|
+
addLabel?: string;
|
|
67
|
+
}
|
|
68
|
+
export type FormNode = LeafNode | GroupNode | ListNode | GroupListNode;
|
|
69
|
+
export type AnswerValue = string | number | boolean | AnswerValue[] | {
|
|
70
|
+
[k: string]: AnswerValue;
|
|
71
|
+
};
|
|
72
|
+
export type AnswersMap = Record<string, AnswerValue>;
|
|
73
|
+
export interface AskUserInput {
|
|
74
|
+
message?: string;
|
|
75
|
+
form: FormNode[];
|
|
76
|
+
/** Legacy v1 shape, ignored when `form` is present. */
|
|
77
|
+
questions?: unknown;
|
|
78
|
+
}
|
|
79
|
+
export interface AskUserOutput {
|
|
80
|
+
form: FormNode[];
|
|
81
|
+
answers: AnswersMap;
|
|
82
|
+
message?: string;
|
|
83
|
+
}
|
|
84
|
+
export type AskUserFormStatus = 'pending' | 'active' | 'submitted' | 'declined';
|
|
85
|
+
export interface AskUserFormProps {
|
|
86
|
+
/** undefined while tool input is still streaming. */
|
|
87
|
+
input?: AskUserInput;
|
|
88
|
+
/** present once the user submitted (state output-available). */
|
|
89
|
+
output?: AskUserOutput;
|
|
90
|
+
status: AskUserFormStatus;
|
|
91
|
+
/** error text from output-error state. */
|
|
92
|
+
errorText?: string;
|
|
93
|
+
onSubmit?: (answers: AnswersMap) => void;
|
|
94
|
+
onDecline?: () => void;
|
|
95
|
+
}
|
|
96
|
+
export declare const AskUserForm: FC<AskUserFormProps>;
|