@iota-uz/sdk 0.4.28 → 0.4.29
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/bichat/index.cjs +454 -147
- package/dist/bichat/index.cjs.map +1 -1
- package/dist/bichat/index.d.cts +28 -27
- package/dist/bichat/index.d.ts +28 -27
- package/dist/bichat/index.mjs +454 -147
- package/dist/bichat/index.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind/compiled.css +1 -1
package/dist/bichat/index.d.cts
CHANGED
|
@@ -92,7 +92,7 @@ interface AdminStore {
|
|
|
92
92
|
interface Session$1 {
|
|
93
93
|
id: string;
|
|
94
94
|
title: string;
|
|
95
|
-
status:
|
|
95
|
+
status: "active" | "archived";
|
|
96
96
|
pinned: boolean;
|
|
97
97
|
createdAt: string;
|
|
98
98
|
updatedAt: string;
|
|
@@ -102,8 +102,8 @@ interface Session$1 {
|
|
|
102
102
|
access?: SessionAccess$1;
|
|
103
103
|
}
|
|
104
104
|
interface SessionAccess$1 {
|
|
105
|
-
role:
|
|
106
|
-
source:
|
|
105
|
+
role: "owner" | "editor" | "viewer" | "read_all" | "none";
|
|
106
|
+
source: "owner" | "member" | "permission" | "none";
|
|
107
107
|
canRead: boolean;
|
|
108
108
|
canWrite: boolean;
|
|
109
109
|
canManageMembers: boolean;
|
|
@@ -133,7 +133,7 @@ interface UserTurn$1 {
|
|
|
133
133
|
* Assistant turn lifecycle used by renderers to distinguish completed output
|
|
134
134
|
* from HITL checkpoints that require user input.
|
|
135
135
|
*/
|
|
136
|
-
type AssistantTurnLifecycle =
|
|
136
|
+
type AssistantTurnLifecycle = "complete" | "waiting_for_human_input";
|
|
137
137
|
/**
|
|
138
138
|
* Content of an assistant's response in a conversation turn
|
|
139
139
|
*/
|
|
@@ -209,7 +209,7 @@ type ImageAttachment = Attachment$1 & {
|
|
|
209
209
|
* Output from code interpreter tool
|
|
210
210
|
*/
|
|
211
211
|
interface CodeOutput$1 {
|
|
212
|
-
type:
|
|
212
|
+
type: "image" | "text" | "error";
|
|
213
213
|
content: string;
|
|
214
214
|
/** File metadata for downloadable outputs */
|
|
215
215
|
filename?: string;
|
|
@@ -228,7 +228,7 @@ interface QueuedMessage {
|
|
|
228
228
|
*/
|
|
229
229
|
interface ChartData {
|
|
230
230
|
/** Type of chart: line, bar, pie, area, or donut */
|
|
231
|
-
chartType:
|
|
231
|
+
chartType: "line" | "bar" | "area" | "pie" | "donut";
|
|
232
232
|
/** Chart title displayed above the chart */
|
|
233
233
|
title: string;
|
|
234
234
|
/** Data series (multiple allowed for line/bar/area, single for pie/donut) */
|
|
@@ -275,7 +275,7 @@ interface RenderTableData {
|
|
|
275
275
|
exportPrompt?: string;
|
|
276
276
|
}
|
|
277
277
|
interface Artifact$1 {
|
|
278
|
-
type:
|
|
278
|
+
type: "excel" | "pdf";
|
|
279
279
|
filename: string;
|
|
280
280
|
url: string;
|
|
281
281
|
sizeReadable?: string;
|
|
@@ -301,12 +301,12 @@ interface PendingQuestion$1 {
|
|
|
301
301
|
turnId: string;
|
|
302
302
|
agentName?: string;
|
|
303
303
|
questions: Question[];
|
|
304
|
-
status:
|
|
304
|
+
status: "PENDING" | "ANSWER_SUBMITTED" | "REJECT_SUBMITTED" | "ANSWER_RESUME_FAILED" | "REJECT_RESUME_FAILED" | "ANSWERED" | "REJECTED" | "CANCELLED";
|
|
305
305
|
}
|
|
306
306
|
interface Question {
|
|
307
307
|
id: string;
|
|
308
308
|
text: string;
|
|
309
|
-
type:
|
|
309
|
+
type: "SINGLE_CHOICE" | "MULTIPLE_CHOICE";
|
|
310
310
|
options?: QuestionOption[];
|
|
311
311
|
required?: boolean;
|
|
312
312
|
}
|
|
@@ -337,45 +337,45 @@ interface QuestionAnswers {
|
|
|
337
337
|
*/
|
|
338
338
|
interface ActivityStep {
|
|
339
339
|
id: string;
|
|
340
|
-
type:
|
|
340
|
+
type: "thinking" | "tool" | "agent_delegation";
|
|
341
341
|
toolName: string;
|
|
342
342
|
/** Raw tool arguments JSON string (used for label interpolation, e.g., delegation agent name). */
|
|
343
343
|
arguments?: string;
|
|
344
344
|
agentName?: string;
|
|
345
|
-
status:
|
|
345
|
+
status: "active" | "completed" | "failed";
|
|
346
346
|
startedAt: number;
|
|
347
347
|
completedAt?: number;
|
|
348
348
|
durationMs?: number;
|
|
349
349
|
error?: string;
|
|
350
350
|
}
|
|
351
351
|
type StreamEvent = {
|
|
352
|
-
type:
|
|
352
|
+
type: "content";
|
|
353
353
|
content: string;
|
|
354
354
|
} | {
|
|
355
|
-
type:
|
|
355
|
+
type: "thinking";
|
|
356
356
|
content: string;
|
|
357
357
|
} | {
|
|
358
|
-
type:
|
|
358
|
+
type: "tool_start";
|
|
359
359
|
tool: StreamToolPayload;
|
|
360
360
|
} | {
|
|
361
|
-
type:
|
|
361
|
+
type: "tool_end";
|
|
362
362
|
tool: StreamToolPayload;
|
|
363
363
|
} | {
|
|
364
|
-
type:
|
|
364
|
+
type: "usage";
|
|
365
365
|
usage: DebugUsage$1;
|
|
366
366
|
} | {
|
|
367
|
-
type:
|
|
367
|
+
type: "user_message";
|
|
368
368
|
sessionId: string;
|
|
369
369
|
} | {
|
|
370
|
-
type:
|
|
370
|
+
type: "interrupt";
|
|
371
371
|
interrupt: StreamInterruptPayload;
|
|
372
372
|
sessionId?: string;
|
|
373
373
|
} | {
|
|
374
|
-
type:
|
|
374
|
+
type: "done";
|
|
375
375
|
sessionId?: string;
|
|
376
376
|
generationMs?: number;
|
|
377
377
|
} | {
|
|
378
|
-
type:
|
|
378
|
+
type: "error";
|
|
379
379
|
error: string;
|
|
380
380
|
};
|
|
381
381
|
/** Partial state when resuming a stream after refresh */
|
|
@@ -392,7 +392,7 @@ interface StreamStatus {
|
|
|
392
392
|
}
|
|
393
393
|
interface AsyncRunAccepted {
|
|
394
394
|
accepted: true;
|
|
395
|
-
operation:
|
|
395
|
+
operation: "question_submit" | "question_reject" | "session_compact";
|
|
396
396
|
sessionId: string;
|
|
397
397
|
runId: string;
|
|
398
398
|
startedAt: number;
|
|
@@ -402,7 +402,7 @@ interface AsyncRunAccepted {
|
|
|
402
402
|
* compatibility but the flat all-optional shape is unsound.
|
|
403
403
|
*/
|
|
404
404
|
interface StreamChunk {
|
|
405
|
-
type:
|
|
405
|
+
type: "chunk" | "content" | "thinking" | "tool_start" | "tool_end" | "usage" | "done" | "error" | "user_message" | "interrupt" | "snapshot" | "stream_started";
|
|
406
406
|
content?: string;
|
|
407
407
|
error?: string;
|
|
408
408
|
sessionId?: string;
|
|
@@ -544,7 +544,7 @@ interface SessionUser$1 {
|
|
|
544
544
|
}
|
|
545
545
|
interface SessionMember$1 {
|
|
546
546
|
user: SessionUser$1;
|
|
547
|
-
role:
|
|
547
|
+
role: "owner" | "editor" | "viewer";
|
|
548
548
|
createdAt: string;
|
|
549
549
|
updatedAt: string;
|
|
550
550
|
}
|
|
@@ -640,8 +640,8 @@ interface ChatDataSource {
|
|
|
640
640
|
hasMore: boolean;
|
|
641
641
|
}>;
|
|
642
642
|
listSessionMembers?(sessionId: string): Promise<SessionMember$1[]>;
|
|
643
|
-
addSessionMember?(sessionId: string, userId: string, role:
|
|
644
|
-
updateSessionMemberRole?(sessionId: string, userId: string, role:
|
|
643
|
+
addSessionMember?(sessionId: string, userId: string, role: "editor" | "viewer"): Promise<void>;
|
|
644
|
+
updateSessionMemberRole?(sessionId: string, userId: string, role: "editor" | "viewer"): Promise<void>;
|
|
645
645
|
removeSessionMember?(sessionId: string, userId: string): Promise<void>;
|
|
646
646
|
}
|
|
647
647
|
interface ChatSessionStateValue {
|
|
@@ -1180,7 +1180,7 @@ declare function DownloadCard({ artifact }: DownloadCardProps): react_jsx_runtim
|
|
|
1180
1180
|
interface InlineQuestionFormProps {
|
|
1181
1181
|
pendingQuestion: PendingQuestion$1;
|
|
1182
1182
|
}
|
|
1183
|
-
declare function InlineQuestionForm({ pendingQuestion }: InlineQuestionFormProps): react_jsx_runtime.JSX.Element;
|
|
1183
|
+
declare function InlineQuestionForm({ pendingQuestion, }: InlineQuestionFormProps): react_jsx_runtime.JSX.Element;
|
|
1184
1184
|
|
|
1185
1185
|
interface MessageInputRef {
|
|
1186
1186
|
focus: () => void;
|
|
@@ -2952,6 +2952,7 @@ interface PendingQuestion {
|
|
|
2952
2952
|
agentName?: string;
|
|
2953
2953
|
turnId: string;
|
|
2954
2954
|
questions: PendingQuestionItem[];
|
|
2955
|
+
status: string;
|
|
2955
2956
|
}
|
|
2956
2957
|
interface PendingQuestionItem {
|
|
2957
2958
|
id: string;
|
|
@@ -4008,7 +4009,7 @@ declare class ChatMachine {
|
|
|
4008
4009
|
* Update mutable config that may change across parent re-renders.
|
|
4009
4010
|
* Called from the React provider's useEffect to keep the machine in sync.
|
|
4010
4011
|
*/
|
|
4011
|
-
updateConfig(config: Pick<ChatMachineConfig,
|
|
4012
|
+
updateConfig(config: Pick<ChatMachineConfig, "dataSource" | "onSessionCreated">): void;
|
|
4012
4013
|
dispose(): void;
|
|
4013
4014
|
subscribeSession: (listener: Listener) => (() => void);
|
|
4014
4015
|
getSessionSnapshot: () => SessionSnapshot;
|
package/dist/bichat/index.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ interface AdminStore {
|
|
|
92
92
|
interface Session$1 {
|
|
93
93
|
id: string;
|
|
94
94
|
title: string;
|
|
95
|
-
status:
|
|
95
|
+
status: "active" | "archived";
|
|
96
96
|
pinned: boolean;
|
|
97
97
|
createdAt: string;
|
|
98
98
|
updatedAt: string;
|
|
@@ -102,8 +102,8 @@ interface Session$1 {
|
|
|
102
102
|
access?: SessionAccess$1;
|
|
103
103
|
}
|
|
104
104
|
interface SessionAccess$1 {
|
|
105
|
-
role:
|
|
106
|
-
source:
|
|
105
|
+
role: "owner" | "editor" | "viewer" | "read_all" | "none";
|
|
106
|
+
source: "owner" | "member" | "permission" | "none";
|
|
107
107
|
canRead: boolean;
|
|
108
108
|
canWrite: boolean;
|
|
109
109
|
canManageMembers: boolean;
|
|
@@ -133,7 +133,7 @@ interface UserTurn$1 {
|
|
|
133
133
|
* Assistant turn lifecycle used by renderers to distinguish completed output
|
|
134
134
|
* from HITL checkpoints that require user input.
|
|
135
135
|
*/
|
|
136
|
-
type AssistantTurnLifecycle =
|
|
136
|
+
type AssistantTurnLifecycle = "complete" | "waiting_for_human_input";
|
|
137
137
|
/**
|
|
138
138
|
* Content of an assistant's response in a conversation turn
|
|
139
139
|
*/
|
|
@@ -209,7 +209,7 @@ type ImageAttachment = Attachment$1 & {
|
|
|
209
209
|
* Output from code interpreter tool
|
|
210
210
|
*/
|
|
211
211
|
interface CodeOutput$1 {
|
|
212
|
-
type:
|
|
212
|
+
type: "image" | "text" | "error";
|
|
213
213
|
content: string;
|
|
214
214
|
/** File metadata for downloadable outputs */
|
|
215
215
|
filename?: string;
|
|
@@ -228,7 +228,7 @@ interface QueuedMessage {
|
|
|
228
228
|
*/
|
|
229
229
|
interface ChartData {
|
|
230
230
|
/** Type of chart: line, bar, pie, area, or donut */
|
|
231
|
-
chartType:
|
|
231
|
+
chartType: "line" | "bar" | "area" | "pie" | "donut";
|
|
232
232
|
/** Chart title displayed above the chart */
|
|
233
233
|
title: string;
|
|
234
234
|
/** Data series (multiple allowed for line/bar/area, single for pie/donut) */
|
|
@@ -275,7 +275,7 @@ interface RenderTableData {
|
|
|
275
275
|
exportPrompt?: string;
|
|
276
276
|
}
|
|
277
277
|
interface Artifact$1 {
|
|
278
|
-
type:
|
|
278
|
+
type: "excel" | "pdf";
|
|
279
279
|
filename: string;
|
|
280
280
|
url: string;
|
|
281
281
|
sizeReadable?: string;
|
|
@@ -301,12 +301,12 @@ interface PendingQuestion$1 {
|
|
|
301
301
|
turnId: string;
|
|
302
302
|
agentName?: string;
|
|
303
303
|
questions: Question[];
|
|
304
|
-
status:
|
|
304
|
+
status: "PENDING" | "ANSWER_SUBMITTED" | "REJECT_SUBMITTED" | "ANSWER_RESUME_FAILED" | "REJECT_RESUME_FAILED" | "ANSWERED" | "REJECTED" | "CANCELLED";
|
|
305
305
|
}
|
|
306
306
|
interface Question {
|
|
307
307
|
id: string;
|
|
308
308
|
text: string;
|
|
309
|
-
type:
|
|
309
|
+
type: "SINGLE_CHOICE" | "MULTIPLE_CHOICE";
|
|
310
310
|
options?: QuestionOption[];
|
|
311
311
|
required?: boolean;
|
|
312
312
|
}
|
|
@@ -337,45 +337,45 @@ interface QuestionAnswers {
|
|
|
337
337
|
*/
|
|
338
338
|
interface ActivityStep {
|
|
339
339
|
id: string;
|
|
340
|
-
type:
|
|
340
|
+
type: "thinking" | "tool" | "agent_delegation";
|
|
341
341
|
toolName: string;
|
|
342
342
|
/** Raw tool arguments JSON string (used for label interpolation, e.g., delegation agent name). */
|
|
343
343
|
arguments?: string;
|
|
344
344
|
agentName?: string;
|
|
345
|
-
status:
|
|
345
|
+
status: "active" | "completed" | "failed";
|
|
346
346
|
startedAt: number;
|
|
347
347
|
completedAt?: number;
|
|
348
348
|
durationMs?: number;
|
|
349
349
|
error?: string;
|
|
350
350
|
}
|
|
351
351
|
type StreamEvent = {
|
|
352
|
-
type:
|
|
352
|
+
type: "content";
|
|
353
353
|
content: string;
|
|
354
354
|
} | {
|
|
355
|
-
type:
|
|
355
|
+
type: "thinking";
|
|
356
356
|
content: string;
|
|
357
357
|
} | {
|
|
358
|
-
type:
|
|
358
|
+
type: "tool_start";
|
|
359
359
|
tool: StreamToolPayload;
|
|
360
360
|
} | {
|
|
361
|
-
type:
|
|
361
|
+
type: "tool_end";
|
|
362
362
|
tool: StreamToolPayload;
|
|
363
363
|
} | {
|
|
364
|
-
type:
|
|
364
|
+
type: "usage";
|
|
365
365
|
usage: DebugUsage$1;
|
|
366
366
|
} | {
|
|
367
|
-
type:
|
|
367
|
+
type: "user_message";
|
|
368
368
|
sessionId: string;
|
|
369
369
|
} | {
|
|
370
|
-
type:
|
|
370
|
+
type: "interrupt";
|
|
371
371
|
interrupt: StreamInterruptPayload;
|
|
372
372
|
sessionId?: string;
|
|
373
373
|
} | {
|
|
374
|
-
type:
|
|
374
|
+
type: "done";
|
|
375
375
|
sessionId?: string;
|
|
376
376
|
generationMs?: number;
|
|
377
377
|
} | {
|
|
378
|
-
type:
|
|
378
|
+
type: "error";
|
|
379
379
|
error: string;
|
|
380
380
|
};
|
|
381
381
|
/** Partial state when resuming a stream after refresh */
|
|
@@ -392,7 +392,7 @@ interface StreamStatus {
|
|
|
392
392
|
}
|
|
393
393
|
interface AsyncRunAccepted {
|
|
394
394
|
accepted: true;
|
|
395
|
-
operation:
|
|
395
|
+
operation: "question_submit" | "question_reject" | "session_compact";
|
|
396
396
|
sessionId: string;
|
|
397
397
|
runId: string;
|
|
398
398
|
startedAt: number;
|
|
@@ -402,7 +402,7 @@ interface AsyncRunAccepted {
|
|
|
402
402
|
* compatibility but the flat all-optional shape is unsound.
|
|
403
403
|
*/
|
|
404
404
|
interface StreamChunk {
|
|
405
|
-
type:
|
|
405
|
+
type: "chunk" | "content" | "thinking" | "tool_start" | "tool_end" | "usage" | "done" | "error" | "user_message" | "interrupt" | "snapshot" | "stream_started";
|
|
406
406
|
content?: string;
|
|
407
407
|
error?: string;
|
|
408
408
|
sessionId?: string;
|
|
@@ -544,7 +544,7 @@ interface SessionUser$1 {
|
|
|
544
544
|
}
|
|
545
545
|
interface SessionMember$1 {
|
|
546
546
|
user: SessionUser$1;
|
|
547
|
-
role:
|
|
547
|
+
role: "owner" | "editor" | "viewer";
|
|
548
548
|
createdAt: string;
|
|
549
549
|
updatedAt: string;
|
|
550
550
|
}
|
|
@@ -640,8 +640,8 @@ interface ChatDataSource {
|
|
|
640
640
|
hasMore: boolean;
|
|
641
641
|
}>;
|
|
642
642
|
listSessionMembers?(sessionId: string): Promise<SessionMember$1[]>;
|
|
643
|
-
addSessionMember?(sessionId: string, userId: string, role:
|
|
644
|
-
updateSessionMemberRole?(sessionId: string, userId: string, role:
|
|
643
|
+
addSessionMember?(sessionId: string, userId: string, role: "editor" | "viewer"): Promise<void>;
|
|
644
|
+
updateSessionMemberRole?(sessionId: string, userId: string, role: "editor" | "viewer"): Promise<void>;
|
|
645
645
|
removeSessionMember?(sessionId: string, userId: string): Promise<void>;
|
|
646
646
|
}
|
|
647
647
|
interface ChatSessionStateValue {
|
|
@@ -1180,7 +1180,7 @@ declare function DownloadCard({ artifact }: DownloadCardProps): react_jsx_runtim
|
|
|
1180
1180
|
interface InlineQuestionFormProps {
|
|
1181
1181
|
pendingQuestion: PendingQuestion$1;
|
|
1182
1182
|
}
|
|
1183
|
-
declare function InlineQuestionForm({ pendingQuestion }: InlineQuestionFormProps): react_jsx_runtime.JSX.Element;
|
|
1183
|
+
declare function InlineQuestionForm({ pendingQuestion, }: InlineQuestionFormProps): react_jsx_runtime.JSX.Element;
|
|
1184
1184
|
|
|
1185
1185
|
interface MessageInputRef {
|
|
1186
1186
|
focus: () => void;
|
|
@@ -2952,6 +2952,7 @@ interface PendingQuestion {
|
|
|
2952
2952
|
agentName?: string;
|
|
2953
2953
|
turnId: string;
|
|
2954
2954
|
questions: PendingQuestionItem[];
|
|
2955
|
+
status: string;
|
|
2955
2956
|
}
|
|
2956
2957
|
interface PendingQuestionItem {
|
|
2957
2958
|
id: string;
|
|
@@ -4008,7 +4009,7 @@ declare class ChatMachine {
|
|
|
4008
4009
|
* Update mutable config that may change across parent re-renders.
|
|
4009
4010
|
* Called from the React provider's useEffect to keep the machine in sync.
|
|
4010
4011
|
*/
|
|
4011
|
-
updateConfig(config: Pick<ChatMachineConfig,
|
|
4012
|
+
updateConfig(config: Pick<ChatMachineConfig, "dataSource" | "onSessionCreated">): void;
|
|
4012
4013
|
dispose(): void;
|
|
4013
4014
|
subscribeSession: (listener: Listener) => (() => void);
|
|
4014
4015
|
getSessionSnapshot: () => SessionSnapshot;
|