weave-typescript 0.43.0 → 0.44.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.
@@ -0,0 +1,297 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "weaveapi.workflow.v1";
3
+ export declare enum WorkflowTemplateStatus {
4
+ WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED = 0,
5
+ WORKFLOW_TEMPLATE_STATUS_ACTIVE = 1,
6
+ WORKFLOW_TEMPLATE_STATUS_ARCHIVED = 2,
7
+ UNRECOGNIZED = -1
8
+ }
9
+ export declare function workflowTemplateStatusFromJSON(object: any): WorkflowTemplateStatus;
10
+ export declare function workflowTemplateStatusToJSON(object: WorkflowTemplateStatus): string;
11
+ export declare enum WorkflowStepKind {
12
+ WORKFLOW_STEP_KIND_UNSPECIFIED = 0,
13
+ WORKFLOW_STEP_KIND_AGENT = 1,
14
+ WORKFLOW_STEP_KIND_WORKFLOW = 2,
15
+ WORKFLOW_STEP_KIND_TOOL = 3,
16
+ WORKFLOW_STEP_KIND_SERVICE = 4,
17
+ WORKFLOW_STEP_KIND_PARALLEL = 5,
18
+ WORKFLOW_STEP_KIND_LOOP = 6,
19
+ WORKFLOW_STEP_KIND_APPROVAL = 7,
20
+ UNRECOGNIZED = -1
21
+ }
22
+ export declare function workflowStepKindFromJSON(object: any): WorkflowStepKind;
23
+ export declare function workflowStepKindToJSON(object: WorkflowStepKind): string;
24
+ export declare enum WorkflowRunStatus {
25
+ WORKFLOW_RUN_STATUS_UNSPECIFIED = 0,
26
+ WORKFLOW_RUN_STATUS_PENDING = 1,
27
+ WORKFLOW_RUN_STATUS_RUNNING = 2,
28
+ WORKFLOW_RUN_STATUS_WAITING = 3,
29
+ WORKFLOW_RUN_STATUS_COMPLETED = 4,
30
+ WORKFLOW_RUN_STATUS_FAILED = 5,
31
+ WORKFLOW_RUN_STATUS_CANCELED = 6,
32
+ UNRECOGNIZED = -1
33
+ }
34
+ export declare function workflowRunStatusFromJSON(object: any): WorkflowRunStatus;
35
+ export declare function workflowRunStatusToJSON(object: WorkflowRunStatus): string;
36
+ export declare enum WorkflowStepRunStatus {
37
+ WORKFLOW_STEP_RUN_STATUS_UNSPECIFIED = 0,
38
+ WORKFLOW_STEP_RUN_STATUS_PENDING = 1,
39
+ WORKFLOW_STEP_RUN_STATUS_RUNNING = 2,
40
+ WORKFLOW_STEP_RUN_STATUS_WAITING = 3,
41
+ WORKFLOW_STEP_RUN_STATUS_COMPLETED = 4,
42
+ WORKFLOW_STEP_RUN_STATUS_FAILED = 5,
43
+ WORKFLOW_STEP_RUN_STATUS_SKIPPED = 6,
44
+ WORKFLOW_STEP_RUN_STATUS_CANCELED = 7,
45
+ UNRECOGNIZED = -1
46
+ }
47
+ export declare function workflowStepRunStatusFromJSON(object: any): WorkflowStepRunStatus;
48
+ export declare function workflowStepRunStatusToJSON(object: WorkflowStepRunStatus): string;
49
+ export declare enum WorkflowRunEventKind {
50
+ WORKFLOW_RUN_EVENT_KIND_UNSPECIFIED = 0,
51
+ WORKFLOW_RUN_EVENT_KIND_STARTED = 1,
52
+ WORKFLOW_RUN_EVENT_KIND_STEP_STARTED = 2,
53
+ WORKFLOW_RUN_EVENT_KIND_STEP_COMPLETED = 3,
54
+ WORKFLOW_RUN_EVENT_KIND_STEP_FAILED = 4,
55
+ WORKFLOW_RUN_EVENT_KIND_TOOL_CALL_PROPOSED = 5,
56
+ WORKFLOW_RUN_EVENT_KIND_TOOL_CALL_STARTED = 6,
57
+ WORKFLOW_RUN_EVENT_KIND_TOOL_CALL_COMPLETED = 7,
58
+ WORKFLOW_RUN_EVENT_KIND_TOOL_CALL_FAILED = 8,
59
+ WORKFLOW_RUN_EVENT_KIND_WAITING = 9,
60
+ WORKFLOW_RUN_EVENT_KIND_COMPLETED = 10,
61
+ WORKFLOW_RUN_EVENT_KIND_FAILED = 11,
62
+ WORKFLOW_RUN_EVENT_KIND_CANCELED = 12,
63
+ UNRECOGNIZED = -1
64
+ }
65
+ export declare function workflowRunEventKindFromJSON(object: any): WorkflowRunEventKind;
66
+ export declare function workflowRunEventKindToJSON(object: WorkflowRunEventKind): string;
67
+ export declare enum ToolCallState {
68
+ TOOL_CALL_STATE_UNSPECIFIED = 0,
69
+ TOOL_CALL_STATE_PROPOSED = 1,
70
+ TOOL_CALL_STATE_APPROVED = 2,
71
+ TOOL_CALL_STATE_REJECTED = 3,
72
+ TOOL_CALL_STATE_RUNNING = 4,
73
+ TOOL_CALL_STATE_COMPLETED = 5,
74
+ TOOL_CALL_STATE_FAILED = 6,
75
+ UNRECOGNIZED = -1
76
+ }
77
+ export declare function toolCallStateFromJSON(object: any): ToolCallState;
78
+ export declare function toolCallStateToJSON(object: ToolCallState): string;
79
+ export interface WorkflowTemplate {
80
+ id: string;
81
+ organizationId: string;
82
+ slug: string;
83
+ name: string;
84
+ description: string;
85
+ status: WorkflowTemplateStatus;
86
+ createdByUserId: string;
87
+ draftRevision: number;
88
+ latestVersionId: string;
89
+ latestVersion: number;
90
+ createdAt: Date | undefined;
91
+ updatedAt: Date | undefined;
92
+ }
93
+ export interface WorkflowDraft {
94
+ id: string;
95
+ templateId: string;
96
+ organizationId: string;
97
+ baseVersionId: string;
98
+ revision: number;
99
+ name: string;
100
+ description: string;
101
+ definition: WorkflowDefinition | undefined;
102
+ inputSchema: {
103
+ [key: string]: any;
104
+ } | undefined;
105
+ outputSchema: {
106
+ [key: string]: any;
107
+ } | undefined;
108
+ metadata: {
109
+ [key: string]: any;
110
+ } | undefined;
111
+ updatedByUserId: string;
112
+ createdAt: Date | undefined;
113
+ updatedAt: Date | undefined;
114
+ }
115
+ export interface WorkflowDraftPatch {
116
+ id: string;
117
+ templateId: string;
118
+ organizationId: string;
119
+ revision: number;
120
+ patch: {
121
+ [key: string]: any;
122
+ } | undefined;
123
+ createdByUserId: string;
124
+ createdAt: Date | undefined;
125
+ }
126
+ export interface WorkflowVersion {
127
+ id: string;
128
+ templateId: string;
129
+ organizationId: string;
130
+ version: number;
131
+ sourceDraftRevision: number;
132
+ name: string;
133
+ description: string;
134
+ definition: WorkflowDefinition | undefined;
135
+ inputSchema: {
136
+ [key: string]: any;
137
+ } | undefined;
138
+ outputSchema: {
139
+ [key: string]: any;
140
+ } | undefined;
141
+ metadata: {
142
+ [key: string]: any;
143
+ } | undefined;
144
+ publishedByUserId: string;
145
+ publishedAt: Date | undefined;
146
+ }
147
+ export interface WorkflowDefinition {
148
+ steps: WorkflowStepDefinition[];
149
+ edges: WorkflowEdge[];
150
+ config: {
151
+ [key: string]: any;
152
+ } | undefined;
153
+ }
154
+ export interface WorkflowStepDefinition {
155
+ key: string;
156
+ name: string;
157
+ kind: WorkflowStepKind;
158
+ agentVersionId: string;
159
+ workflowVersionId: string;
160
+ toolName: string;
161
+ serviceName: string;
162
+ config: {
163
+ [key: string]: any;
164
+ } | undefined;
165
+ inputMapping: {
166
+ [key: string]: any;
167
+ } | undefined;
168
+ outputMapping: {
169
+ [key: string]: any;
170
+ } | undefined;
171
+ }
172
+ export interface WorkflowEdge {
173
+ fromStepKey: string;
174
+ toStepKey: string;
175
+ condition: string;
176
+ }
177
+ export interface WorkflowPublishPlan {
178
+ templateId: string;
179
+ draftRevision: number;
180
+ publishable: boolean;
181
+ issues: WorkflowPublishPlanIssue[];
182
+ compiledPreview: {
183
+ [key: string]: any;
184
+ } | undefined;
185
+ }
186
+ export interface WorkflowPublishPlanIssue {
187
+ code: string;
188
+ message: string;
189
+ path: string;
190
+ }
191
+ export interface WorkflowRun {
192
+ id: string;
193
+ organizationId: string;
194
+ workflowTemplateId: string;
195
+ workflowVersionId: string;
196
+ status: WorkflowRunStatus;
197
+ createdByUserId: string;
198
+ chatSessionId: string;
199
+ input: {
200
+ [key: string]: any;
201
+ } | undefined;
202
+ output: {
203
+ [key: string]: any;
204
+ } | undefined;
205
+ errorCode: string;
206
+ safeErrorMessage: string;
207
+ createdAt: Date | undefined;
208
+ startedAt: Date | undefined;
209
+ finishedAt: Date | undefined;
210
+ }
211
+ export interface WorkflowStepRun {
212
+ id: string;
213
+ organizationId: string;
214
+ workflowRunId: string;
215
+ stepKey: string;
216
+ stepName: string;
217
+ stepKind: WorkflowStepKind;
218
+ status: WorkflowStepRunStatus;
219
+ agentRunId: string;
220
+ childWorkflowRunId: string;
221
+ input: {
222
+ [key: string]: any;
223
+ } | undefined;
224
+ output: {
225
+ [key: string]: any;
226
+ } | undefined;
227
+ errorCode: string;
228
+ safeErrorMessage: string;
229
+ createdAt: Date | undefined;
230
+ startedAt: Date | undefined;
231
+ finishedAt: Date | undefined;
232
+ }
233
+ export interface WorkflowRunEvent {
234
+ id: string;
235
+ organizationId: string;
236
+ workflowRunId: string;
237
+ workflowStepRunId: string;
238
+ agentRunId: string;
239
+ sequence: number;
240
+ kind: WorkflowRunEventKind;
241
+ message: string;
242
+ payload: {
243
+ [key: string]: any;
244
+ } | undefined;
245
+ createdAt: Date | undefined;
246
+ }
247
+ export interface ToolCallEvent {
248
+ id: string;
249
+ organizationId: string;
250
+ workflowRunId: string;
251
+ workflowStepRunId: string;
252
+ agentRunId: string;
253
+ toolCallId: string;
254
+ toolName: string;
255
+ state: ToolCallState;
256
+ arguments: {
257
+ [key: string]: any;
258
+ } | undefined;
259
+ result: {
260
+ [key: string]: any;
261
+ } | undefined;
262
+ errorCode: string;
263
+ safeErrorMessage: string;
264
+ createdAt: Date | undefined;
265
+ }
266
+ export declare const WorkflowTemplate: MessageFns<WorkflowTemplate>;
267
+ export declare const WorkflowDraft: MessageFns<WorkflowDraft>;
268
+ export declare const WorkflowDraftPatch: MessageFns<WorkflowDraftPatch>;
269
+ export declare const WorkflowVersion: MessageFns<WorkflowVersion>;
270
+ export declare const WorkflowDefinition: MessageFns<WorkflowDefinition>;
271
+ export declare const WorkflowStepDefinition: MessageFns<WorkflowStepDefinition>;
272
+ export declare const WorkflowEdge: MessageFns<WorkflowEdge>;
273
+ export declare const WorkflowPublishPlan: MessageFns<WorkflowPublishPlan>;
274
+ export declare const WorkflowPublishPlanIssue: MessageFns<WorkflowPublishPlanIssue>;
275
+ export declare const WorkflowRun: MessageFns<WorkflowRun>;
276
+ export declare const WorkflowStepRun: MessageFns<WorkflowStepRun>;
277
+ export declare const WorkflowRunEvent: MessageFns<WorkflowRunEvent>;
278
+ export declare const ToolCallEvent: MessageFns<ToolCallEvent>;
279
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
280
+ 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 {} ? {
281
+ [K in keyof T]?: DeepPartial<T[K]>;
282
+ } : Partial<T>;
283
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
284
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
285
+ [K in keyof P]: Exact<P[K], I[K]>;
286
+ } & {
287
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
288
+ };
289
+ export interface MessageFns<T> {
290
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
291
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
292
+ fromJSON(object: any): T;
293
+ toJSON(message: T): unknown;
294
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
295
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
296
+ }
297
+ export {};