weave-typescript 0.21.0 → 0.23.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/weaveapi/chat/v1/chat.pb.d.ts +201 -0
- package/dist/weaveapi/chat/v1/chat.pb.js +2363 -0
- package/dist/weaveapi/chat/v1/service.pb.d.ts +345 -0
- package/dist/weaveapi/chat/v1/service.pb.js +2545 -0
- package/dist/weaveapi/model/v1/service.pb.d.ts +130 -0
- package/dist/weaveapi/model/v1/service.pb.js +1332 -1
- package/dist/weavesql/weavedb/chat_sql.d.ts +464 -0
- package/dist/weavesql/weavedb/chat_sql.js +735 -0
- package/package.json +1 -1
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "weaveapi.chat.v1";
|
|
3
|
+
export declare enum ChatMessageRole {
|
|
4
|
+
CHAT_MESSAGE_ROLE_UNSPECIFIED = 0,
|
|
5
|
+
CHAT_MESSAGE_ROLE_USER = 1,
|
|
6
|
+
CHAT_MESSAGE_ROLE_ASSISTANT = 2,
|
|
7
|
+
CHAT_MESSAGE_ROLE_TOOL = 3,
|
|
8
|
+
CHAT_MESSAGE_ROLE_SYSTEM = 4,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export declare function chatMessageRoleFromJSON(object: any): ChatMessageRole;
|
|
12
|
+
export declare function chatMessageRoleToJSON(object: ChatMessageRole): string;
|
|
13
|
+
export declare enum ChatToolCallState {
|
|
14
|
+
CHAT_TOOL_CALL_STATE_UNSPECIFIED = 0,
|
|
15
|
+
CHAT_TOOL_CALL_STATE_NONE = 1,
|
|
16
|
+
CHAT_TOOL_CALL_STATE_PROPOSED = 2,
|
|
17
|
+
CHAT_TOOL_CALL_STATE_APPROVED = 3,
|
|
18
|
+
CHAT_TOOL_CALL_STATE_REJECTED = 4,
|
|
19
|
+
CHAT_TOOL_CALL_STATE_EXECUTED = 5,
|
|
20
|
+
CHAT_TOOL_CALL_STATE_FAILED = 6,
|
|
21
|
+
UNRECOGNIZED = -1
|
|
22
|
+
}
|
|
23
|
+
export declare function chatToolCallStateFromJSON(object: any): ChatToolCallState;
|
|
24
|
+
export declare function chatToolCallStateToJSON(object: ChatToolCallState): string;
|
|
25
|
+
export declare enum ChatStreamState {
|
|
26
|
+
CHAT_STREAM_STATE_UNSPECIFIED = 0,
|
|
27
|
+
CHAT_STREAM_STATE_STREAMING = 1,
|
|
28
|
+
CHAT_STREAM_STATE_COMPLETE = 2,
|
|
29
|
+
CHAT_STREAM_STATE_ERROR = 3,
|
|
30
|
+
UNRECOGNIZED = -1
|
|
31
|
+
}
|
|
32
|
+
export declare function chatStreamStateFromJSON(object: any): ChatStreamState;
|
|
33
|
+
export declare function chatStreamStateToJSON(object: ChatStreamState): string;
|
|
34
|
+
export declare enum ChatArtifactKind {
|
|
35
|
+
CHAT_ARTIFACT_KIND_UNSPECIFIED = 0,
|
|
36
|
+
CHAT_ARTIFACT_KIND_MARKDOWN = 1,
|
|
37
|
+
CHAT_ARTIFACT_KIND_HTML = 2,
|
|
38
|
+
CHAT_ARTIFACT_KIND_PLAINTEXT = 3,
|
|
39
|
+
CHAT_ARTIFACT_KIND_CODE = 4,
|
|
40
|
+
UNRECOGNIZED = -1
|
|
41
|
+
}
|
|
42
|
+
export declare function chatArtifactKindFromJSON(object: any): ChatArtifactKind;
|
|
43
|
+
export declare function chatArtifactKindToJSON(object: ChatArtifactKind): string;
|
|
44
|
+
export interface ChatSession {
|
|
45
|
+
id: string;
|
|
46
|
+
organizationId: string;
|
|
47
|
+
createdByUserId: string;
|
|
48
|
+
title: string;
|
|
49
|
+
modelId: string;
|
|
50
|
+
providerConfigurationId: string;
|
|
51
|
+
createdAt: Date | undefined;
|
|
52
|
+
updatedAt: Date | undefined;
|
|
53
|
+
lastMessageAt: Date | undefined;
|
|
54
|
+
attachedProjectIds: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface ChatMessage {
|
|
57
|
+
id: string;
|
|
58
|
+
sessionId: string;
|
|
59
|
+
role: ChatMessageRole;
|
|
60
|
+
content: string;
|
|
61
|
+
parentMessageId: string;
|
|
62
|
+
toolCallId: string;
|
|
63
|
+
toolCallState: ChatToolCallState;
|
|
64
|
+
modelId: string;
|
|
65
|
+
ephemeralAttachmentCount: number;
|
|
66
|
+
ephemeralAttachmentMimeTypes: string[];
|
|
67
|
+
tokenUsage: {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
} | undefined;
|
|
70
|
+
streamState: ChatStreamState;
|
|
71
|
+
createdAt: Date | undefined;
|
|
72
|
+
completedAt: Date | undefined;
|
|
73
|
+
}
|
|
74
|
+
export interface ChatArtifact {
|
|
75
|
+
id: string;
|
|
76
|
+
sessionId: string;
|
|
77
|
+
title: string;
|
|
78
|
+
kind: ChatArtifactKind;
|
|
79
|
+
language: string;
|
|
80
|
+
currentVersion: number;
|
|
81
|
+
createdAt: Date | undefined;
|
|
82
|
+
updatedAt: Date | undefined;
|
|
83
|
+
}
|
|
84
|
+
export interface ChatArtifactVersion {
|
|
85
|
+
id: string;
|
|
86
|
+
artifactId: string;
|
|
87
|
+
version: number;
|
|
88
|
+
content: string;
|
|
89
|
+
createdByMessageId: string;
|
|
90
|
+
createdAt: Date | undefined;
|
|
91
|
+
}
|
|
92
|
+
export interface ChatEphemeralAttachment {
|
|
93
|
+
mimeType: string;
|
|
94
|
+
/** Base64-encoded bytes. Never persisted; passed through to the inference request. */
|
|
95
|
+
data: Uint8Array;
|
|
96
|
+
}
|
|
97
|
+
/** Streaming frame. Exactly one of the oneof values is set per frame. */
|
|
98
|
+
export interface ChatStreamFrame {
|
|
99
|
+
/** Opaque stable event id for replay/resume. Replayed frames keep the same id. */
|
|
100
|
+
eventId: string;
|
|
101
|
+
messageStarted?: ChatStreamFrame_MessageStarted | undefined;
|
|
102
|
+
messageDelta?: ChatStreamFrame_MessageDelta | undefined;
|
|
103
|
+
toolCallProposed?: ChatStreamFrame_ToolCallProposed | undefined;
|
|
104
|
+
toolCallExecuting?: ChatStreamFrame_ToolCallExecuting | undefined;
|
|
105
|
+
toolCallResult?: ChatStreamFrame_ToolCallResult | undefined;
|
|
106
|
+
toolCallRejected?: ChatStreamFrame_ToolCallRejected | undefined;
|
|
107
|
+
artifactCreated?: ChatStreamFrame_ArtifactCreated | undefined;
|
|
108
|
+
artifactUpdated?: ChatStreamFrame_ArtifactUpdated | undefined;
|
|
109
|
+
messageComplete?: ChatStreamFrame_MessageComplete | undefined;
|
|
110
|
+
messageError?: ChatStreamFrame_MessageError | undefined;
|
|
111
|
+
}
|
|
112
|
+
export interface ChatStreamFrame_MessageStarted {
|
|
113
|
+
messageId: string;
|
|
114
|
+
role: ChatMessageRole;
|
|
115
|
+
}
|
|
116
|
+
export interface ChatStreamFrame_MessageDelta {
|
|
117
|
+
messageId: string;
|
|
118
|
+
textDelta: string;
|
|
119
|
+
}
|
|
120
|
+
export interface ChatStreamFrame_ToolCallProposed {
|
|
121
|
+
messageId: string;
|
|
122
|
+
toolCallId: string;
|
|
123
|
+
name: string;
|
|
124
|
+
arguments: {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
} | undefined;
|
|
127
|
+
requiresApproval: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface ChatStreamFrame_ToolCallExecuting {
|
|
130
|
+
toolCallId: string;
|
|
131
|
+
name: string;
|
|
132
|
+
arguments: {
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
} | undefined;
|
|
135
|
+
}
|
|
136
|
+
export interface ChatStreamFrame_ToolCallResult {
|
|
137
|
+
toolCallId: string;
|
|
138
|
+
/** "success" | "error" */
|
|
139
|
+
status: string;
|
|
140
|
+
summary: string;
|
|
141
|
+
}
|
|
142
|
+
export interface ChatStreamFrame_ToolCallRejected {
|
|
143
|
+
toolCallId: string;
|
|
144
|
+
reason: string;
|
|
145
|
+
}
|
|
146
|
+
export interface ChatStreamFrame_ArtifactCreated {
|
|
147
|
+
artifactId: string;
|
|
148
|
+
title: string;
|
|
149
|
+
kind: ChatArtifactKind;
|
|
150
|
+
version: number;
|
|
151
|
+
}
|
|
152
|
+
export interface ChatStreamFrame_ArtifactUpdated {
|
|
153
|
+
artifactId: string;
|
|
154
|
+
version: number;
|
|
155
|
+
}
|
|
156
|
+
export interface ChatStreamFrame_MessageComplete {
|
|
157
|
+
messageId: string;
|
|
158
|
+
tokenUsage: {
|
|
159
|
+
[key: string]: any;
|
|
160
|
+
} | undefined;
|
|
161
|
+
}
|
|
162
|
+
export interface ChatStreamFrame_MessageError {
|
|
163
|
+
messageId: string;
|
|
164
|
+
code: string;
|
|
165
|
+
message: string;
|
|
166
|
+
}
|
|
167
|
+
export declare const ChatSession: MessageFns<ChatSession>;
|
|
168
|
+
export declare const ChatMessage: MessageFns<ChatMessage>;
|
|
169
|
+
export declare const ChatArtifact: MessageFns<ChatArtifact>;
|
|
170
|
+
export declare const ChatArtifactVersion: MessageFns<ChatArtifactVersion>;
|
|
171
|
+
export declare const ChatEphemeralAttachment: MessageFns<ChatEphemeralAttachment>;
|
|
172
|
+
export declare const ChatStreamFrame: MessageFns<ChatStreamFrame>;
|
|
173
|
+
export declare const ChatStreamFrame_MessageStarted: MessageFns<ChatStreamFrame_MessageStarted>;
|
|
174
|
+
export declare const ChatStreamFrame_MessageDelta: MessageFns<ChatStreamFrame_MessageDelta>;
|
|
175
|
+
export declare const ChatStreamFrame_ToolCallProposed: MessageFns<ChatStreamFrame_ToolCallProposed>;
|
|
176
|
+
export declare const ChatStreamFrame_ToolCallExecuting: MessageFns<ChatStreamFrame_ToolCallExecuting>;
|
|
177
|
+
export declare const ChatStreamFrame_ToolCallResult: MessageFns<ChatStreamFrame_ToolCallResult>;
|
|
178
|
+
export declare const ChatStreamFrame_ToolCallRejected: MessageFns<ChatStreamFrame_ToolCallRejected>;
|
|
179
|
+
export declare const ChatStreamFrame_ArtifactCreated: MessageFns<ChatStreamFrame_ArtifactCreated>;
|
|
180
|
+
export declare const ChatStreamFrame_ArtifactUpdated: MessageFns<ChatStreamFrame_ArtifactUpdated>;
|
|
181
|
+
export declare const ChatStreamFrame_MessageComplete: MessageFns<ChatStreamFrame_MessageComplete>;
|
|
182
|
+
export declare const ChatStreamFrame_MessageError: MessageFns<ChatStreamFrame_MessageError>;
|
|
183
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
184
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
185
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
186
|
+
} : Partial<T>;
|
|
187
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
188
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
189
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
190
|
+
} & {
|
|
191
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
192
|
+
};
|
|
193
|
+
export interface MessageFns<T> {
|
|
194
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
195
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
196
|
+
fromJSON(object: any): T;
|
|
197
|
+
toJSON(message: T): unknown;
|
|
198
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
199
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
200
|
+
}
|
|
201
|
+
export {};
|