weave-typescript 0.51.2 → 0.52.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.
Files changed (185) hide show
  1. package/dist/google/protobuf/duration.pb.d.ts +99 -0
  2. package/dist/google/protobuf/duration.pb.js +93 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +2 -1
  5. package/dist/weave/authz/v1/index.d.ts +1 -0
  6. package/dist/weave/authz/v1/index.js +38 -0
  7. package/dist/weave/authz/v1/options.pb.d.ts +52 -0
  8. package/dist/weave/authz/v1/options.pb.js +403 -0
  9. package/dist/weave/filter/v1/index.d.ts +1 -0
  10. package/dist/weave/filter/v1/index.js +38 -0
  11. package/dist/{weaveapi/atc/v1/message.pb.d.ts → weave/filter/v1/options.pb.d.ts} +33 -21
  12. package/dist/weave/filter/v1/options.pb.js +417 -0
  13. package/dist/weave/index.d.ts +2 -0
  14. package/dist/weave/index.js +39 -0
  15. package/dist/weaveapi/agent/v1/agent.pb.d.ts +137 -188
  16. package/dist/weaveapi/agent/v1/agent.pb.js +891 -2151
  17. package/dist/weaveapi/agent/v1/index.d.ts +1 -1
  18. package/dist/weaveapi/agent/v1/index.js +2 -2
  19. package/dist/weaveapi/agent/v1/run.pb.d.ts +289 -0
  20. package/dist/weaveapi/agent/v1/run.pb.js +2763 -0
  21. package/dist/weaveapi/auth/v1/auth.pb.d.ts +67 -14
  22. package/dist/weaveapi/auth/v1/auth.pb.js +829 -89
  23. package/dist/weaveapi/auth/v1/index.d.ts +4 -1
  24. package/dist/weaveapi/auth/v1/index.js +5 -2
  25. package/dist/weaveapi/auth/v1/{service.pb.d.ts → organization_admin.pb.d.ts} +39 -530
  26. package/dist/weaveapi/auth/v1/{service.pb.js → organization_admin.pb.js} +2978 -5812
  27. package/dist/weaveapi/auth/v1/personal_access_token.pb.d.ts +114 -0
  28. package/dist/weaveapi/auth/v1/personal_access_token.pb.js +750 -0
  29. package/dist/weaveapi/auth/v1/profile.pb.d.ts +161 -0
  30. package/dist/weaveapi/auth/v1/profile.pb.js +1007 -0
  31. package/dist/weaveapi/auth/v1/session.pb.d.ts +460 -0
  32. package/dist/weaveapi/auth/v1/session.pb.js +3544 -0
  33. package/dist/weaveapi/chat/v1/chat.pb.d.ts +377 -149
  34. package/dist/weaveapi/chat/v1/chat.pb.js +3492 -1614
  35. package/dist/weaveapi/chat/v1/index.d.ts +0 -1
  36. package/dist/weaveapi/chat/v1/index.js +1 -2
  37. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +95 -0
  38. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +770 -1
  39. package/dist/weaveapi/consolidation/v1/index.d.ts +0 -1
  40. package/dist/weaveapi/consolidation/v1/index.js +1 -2
  41. package/dist/weaveapi/content/v1/content.pb.d.ts +63 -0
  42. package/dist/weaveapi/content/v1/content.pb.js +470 -0
  43. package/dist/weaveapi/content/v1/index.d.ts +1 -0
  44. package/dist/weaveapi/content/v1/index.js +38 -0
  45. package/dist/weaveapi/gateway/v1/gateway.pb.d.ts +247 -523
  46. package/dist/weaveapi/gateway/v1/gateway.pb.js +1648 -5783
  47. package/dist/weaveapi/gateway/v1/index.d.ts +0 -1
  48. package/dist/weaveapi/gateway/v1/index.js +1 -2
  49. package/dist/weaveapi/index.d.ts +5 -5
  50. package/dist/weaveapi/index.js +6 -6
  51. package/dist/weaveapi/inference/v1/generate.pb.d.ts +120 -0
  52. package/dist/weaveapi/inference/v1/generate.pb.js +1159 -0
  53. package/dist/weaveapi/inference/v1/index.d.ts +4 -0
  54. package/dist/weaveapi/{provider → inference}/v1/index.js +4 -2
  55. package/dist/weaveapi/{model → inference}/v1/model.pb.d.ts +52 -15
  56. package/dist/weaveapi/{model → inference}/v1/model.pb.js +529 -116
  57. package/dist/weaveapi/{model/v1/service.pb.d.ts → inference/v1/model_route.pb.d.ts} +182 -110
  58. package/dist/weaveapi/{model/v1/service.pb.js → inference/v1/model_route.pb.js} +2197 -1061
  59. package/dist/weaveapi/inference/v1/provider.pb.d.ts +264 -0
  60. package/dist/weaveapi/inference/v1/provider.pb.js +2590 -0
  61. package/dist/weaveapi/ingestion/v1/index.d.ts +0 -2
  62. package/dist/weaveapi/ingestion/v1/index.js +1 -3
  63. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +543 -0
  64. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +5550 -16
  65. package/dist/weaveapi/initialization/v1/index.d.ts +1 -0
  66. package/dist/weaveapi/initialization/v1/index.js +38 -0
  67. package/dist/weaveapi/initialization/v1/initialization.pb.d.ts +99 -0
  68. package/dist/weaveapi/initialization/v1/initialization.pb.js +510 -0
  69. package/dist/weaveapi/organization/v1/index.d.ts +0 -1
  70. package/dist/weaveapi/organization/v1/index.js +1 -2
  71. package/dist/weaveapi/organization/v1/organization.pb.d.ts +241 -0
  72. package/dist/weaveapi/organization/v1/organization.pb.js +1838 -1
  73. package/dist/weaveapi/reporting/index.d.ts +1 -0
  74. package/dist/weaveapi/reporting/index.js +38 -0
  75. package/dist/weaveapi/{task → reporting}/v1/index.d.ts +1 -1
  76. package/dist/weaveapi/{model → reporting}/v1/index.js +2 -2
  77. package/dist/weaveapi/reporting/v1/service.pb.d.ts +38 -0
  78. package/dist/weaveapi/reporting/v1/service.pb.js +167 -0
  79. package/dist/weaveapi/reporting/v1/usage.pb.d.ts +150 -0
  80. package/dist/weaveapi/reporting/v1/usage.pb.js +1837 -0
  81. package/dist/weaveapi/retrieval/v1/index.d.ts +0 -1
  82. package/dist/weaveapi/retrieval/v1/index.js +1 -2
  83. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +96 -2
  84. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +690 -10
  85. package/dist/weaveapi/tool/index.d.ts +1 -0
  86. package/dist/weaveapi/tool/index.js +38 -0
  87. package/dist/weaveapi/tool/v1/index.d.ts +1 -0
  88. package/dist/weaveapi/tool/v1/index.js +38 -0
  89. package/dist/weaveapi/tool/v1/tool.pb.d.ts +370 -0
  90. package/dist/weaveapi/tool/v1/tool.pb.js +2717 -0
  91. package/dist/weaveapi/workflow/v1/index.d.ts +1 -1
  92. package/dist/weaveapi/workflow/v1/index.js +2 -2
  93. package/dist/weaveapi/workflow/v1/run.pb.d.ts +244 -0
  94. package/dist/weaveapi/workflow/v1/run.pb.js +2084 -0
  95. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +122 -275
  96. package/dist/weaveapi/workflow/v1/workflow.pb.js +790 -3261
  97. package/dist/weavesql/weavedb/agent_sql.d.ts +173 -477
  98. package/dist/weavesql/weavedb/agent_sql.js +281 -758
  99. package/dist/weavesql/weavedb/authorization_outbox_sql.d.ts +261 -0
  100. package/dist/weavesql/weavedb/authorization_outbox_sql.js +445 -0
  101. package/dist/weavesql/weavedb/chat_sql.d.ts +103 -345
  102. package/dist/weavesql/weavedb/chat_sql.js +312 -597
  103. package/dist/weavesql/weavedb/document_consolidation_sql.d.ts +217 -0
  104. package/dist/weavesql/weavedb/document_consolidation_sql.js +486 -0
  105. package/dist/weavesql/weavedb/document_ingestion_sql.d.ts +1433 -0
  106. package/dist/weavesql/weavedb/document_ingestion_sql.js +3488 -0
  107. package/dist/weavesql/weavedb/document_retrieval_sql.d.ts +314 -0
  108. package/dist/weavesql/weavedb/document_retrieval_sql.js +965 -0
  109. package/dist/weavesql/weavedb/document_table_sql.d.ts +6 -6
  110. package/dist/weavesql/weavedb/document_table_sql.js +12 -12
  111. package/dist/weavesql/weavedb/identity_sql.d.ts +1014 -0
  112. package/dist/weavesql/weavedb/identity_sql.js +1811 -0
  113. package/dist/weavesql/weavedb/inference_model_route_sql.d.ts +161 -0
  114. package/dist/weavesql/weavedb/inference_model_route_sql.js +408 -0
  115. package/dist/weavesql/weavedb/inference_provider_sql.d.ts +125 -0
  116. package/dist/weavesql/weavedb/inference_provider_sql.js +228 -0
  117. package/dist/weavesql/weavedb/initialization_sql.d.ts +15 -0
  118. package/dist/weavesql/weavedb/initialization_sql.js +33 -0
  119. package/dist/weavesql/weavedb/model_catalog_sql.d.ts +6 -6
  120. package/dist/weavesql/weavedb/model_catalog_sql.js +6 -6
  121. package/dist/weavesql/weavedb/organization_sql.d.ts +22 -102
  122. package/dist/weavesql/weavedb/organization_sql.js +54 -262
  123. package/dist/weavesql/weavedb/tool_sql.d.ts +209 -0
  124. package/dist/weavesql/weavedb/tool_sql.js +407 -0
  125. package/dist/weavesql/weavedb/usage_sql.d.ts +356 -0
  126. package/dist/weavesql/weavedb/usage_sql.js +568 -0
  127. package/dist/weavesql/weavedb/workflow_sql.d.ts +159 -546
  128. package/dist/weavesql/weavedb/workflow_sql.js +281 -909
  129. package/package.json +2 -2
  130. package/dist/weaveapi/agent/v1/service.pb.d.ts +0 -397
  131. package/dist/weaveapi/agent/v1/service.pb.js +0 -3152
  132. package/dist/weaveapi/atc/v1/event.pb.d.ts +0 -134
  133. package/dist/weaveapi/atc/v1/event.pb.js +0 -1124
  134. package/dist/weaveapi/atc/v1/index.d.ts +0 -5
  135. package/dist/weaveapi/atc/v1/index.js +0 -42
  136. package/dist/weaveapi/atc/v1/message.pb.js +0 -287
  137. package/dist/weaveapi/atc/v1/process.pb.d.ts +0 -91
  138. package/dist/weaveapi/atc/v1/process.pb.js +0 -658
  139. package/dist/weaveapi/atc/v1/run.pb.d.ts +0 -71
  140. package/dist/weaveapi/atc/v1/run.pb.js +0 -525
  141. package/dist/weaveapi/atc/v1/service.pb.d.ts +0 -472
  142. package/dist/weaveapi/atc/v1/service.pb.js +0 -3093
  143. package/dist/weaveapi/chat/v1/service.pb.d.ts +0 -345
  144. package/dist/weaveapi/chat/v1/service.pb.js +0 -2545
  145. package/dist/weaveapi/consolidation/v1/service.pb.d.ts +0 -93
  146. package/dist/weaveapi/consolidation/v1/service.pb.js +0 -427
  147. package/dist/weaveapi/gateway/v1/service.pb.d.ts +0 -235
  148. package/dist/weaveapi/gateway/v1/service.pb.js +0 -651
  149. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +0 -420
  150. package/dist/weaveapi/ingestion/v1/service.pb.js +0 -2311
  151. package/dist/weaveapi/ingestion/v1/table.pb.d.ts +0 -121
  152. package/dist/weaveapi/ingestion/v1/table.pb.js +0 -1478
  153. package/dist/weaveapi/model/v1/index.d.ts +0 -2
  154. package/dist/weaveapi/organization/v1/service.pb.d.ts +0 -261
  155. package/dist/weaveapi/organization/v1/service.pb.js +0 -1561
  156. package/dist/weaveapi/project/v1/index.d.ts +0 -2
  157. package/dist/weaveapi/project/v1/index.js +0 -39
  158. package/dist/weaveapi/project/v1/project.pb.d.ts +0 -105
  159. package/dist/weaveapi/project/v1/project.pb.js +0 -1004
  160. package/dist/weaveapi/project/v1/service.pb.d.ts +0 -247
  161. package/dist/weaveapi/project/v1/service.pb.js +0 -1994
  162. package/dist/weaveapi/provider/v1/index.d.ts +0 -2
  163. package/dist/weaveapi/provider/v1/provider.pb.d.ts +0 -137
  164. package/dist/weaveapi/provider/v1/provider.pb.js +0 -1000
  165. package/dist/weaveapi/provider/v1/service.pb.d.ts +0 -223
  166. package/dist/weaveapi/provider/v1/service.pb.js +0 -1888
  167. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +0 -93
  168. package/dist/weaveapi/retrieval/v1/service.pb.js +0 -385
  169. package/dist/weaveapi/task/v1/index.js +0 -39
  170. package/dist/weaveapi/task/v1/service.pb.d.ts +0 -172
  171. package/dist/weaveapi/task/v1/service.pb.js +0 -1436
  172. package/dist/weaveapi/task/v1/task.pb.d.ts +0 -85
  173. package/dist/weaveapi/task/v1/task.pb.js +0 -802
  174. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -392
  175. package/dist/weaveapi/workflow/v1/service.pb.js +0 -3146
  176. /package/dist/{weaveapi/atc → weave/authz}/index.d.ts +0 -0
  177. /package/dist/{weaveapi/atc → weave/authz}/index.js +0 -0
  178. /package/dist/{weaveapi/model → weave/filter}/index.d.ts +0 -0
  179. /package/dist/{weaveapi/model → weave/filter}/index.js +0 -0
  180. /package/dist/weaveapi/{project → content}/index.d.ts +0 -0
  181. /package/dist/weaveapi/{project → content}/index.js +0 -0
  182. /package/dist/weaveapi/{provider → inference}/index.d.ts +0 -0
  183. /package/dist/weaveapi/{provider → inference}/index.js +0 -0
  184. /package/dist/weaveapi/{task → initialization}/index.d.ts +0 -0
  185. /package/dist/weaveapi/{task → initialization}/index.js +0 -0
@@ -1,37 +1,11 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Observable } from "rxjs";
3
+ import { AgentInput } from "../../agent/v1/agent.pb";
4
+ import { ToolConfirmationRequired, ToolConfirmationResponse } from "../../agent/v1/run.pb";
5
+ import { Content } from "../../content/v1/content.pb";
6
+ import { GenerateConfig, GenerationDetails } from "../../inference/v1/generate.pb";
2
7
  import { SourceLocation } from "../../ingestion/v1/ingestion.pb";
3
8
  export declare const protobufPackage = "weaveapi.chat.v1";
4
- export declare enum ChatMessageRole {
5
- CHAT_MESSAGE_ROLE_UNSPECIFIED = 0,
6
- CHAT_MESSAGE_ROLE_USER = 1,
7
- CHAT_MESSAGE_ROLE_ASSISTANT = 2,
8
- CHAT_MESSAGE_ROLE_TOOL = 3,
9
- CHAT_MESSAGE_ROLE_SYSTEM = 4,
10
- UNRECOGNIZED = -1
11
- }
12
- export declare function chatMessageRoleFromJSON(object: any): ChatMessageRole;
13
- export declare function chatMessageRoleToJSON(object: ChatMessageRole): string;
14
- export declare enum ChatToolCallState {
15
- CHAT_TOOL_CALL_STATE_UNSPECIFIED = 0,
16
- CHAT_TOOL_CALL_STATE_NONE = 1,
17
- CHAT_TOOL_CALL_STATE_PROPOSED = 2,
18
- CHAT_TOOL_CALL_STATE_APPROVED = 3,
19
- CHAT_TOOL_CALL_STATE_REJECTED = 4,
20
- CHAT_TOOL_CALL_STATE_EXECUTED = 5,
21
- CHAT_TOOL_CALL_STATE_FAILED = 6,
22
- UNRECOGNIZED = -1
23
- }
24
- export declare function chatToolCallStateFromJSON(object: any): ChatToolCallState;
25
- export declare function chatToolCallStateToJSON(object: ChatToolCallState): string;
26
- export declare enum ChatStreamState {
27
- CHAT_STREAM_STATE_UNSPECIFIED = 0,
28
- CHAT_STREAM_STATE_STREAMING = 1,
29
- CHAT_STREAM_STATE_COMPLETE = 2,
30
- CHAT_STREAM_STATE_ERROR = 3,
31
- UNRECOGNIZED = -1
32
- }
33
- export declare function chatStreamStateFromJSON(object: any): ChatStreamState;
34
- export declare function chatStreamStateToJSON(object: ChatStreamState): string;
35
9
  export declare enum ChatArtifactKind {
36
10
  CHAT_ARTIFACT_KIND_UNSPECIFIED = 0,
37
11
  CHAT_ARTIFACT_KIND_MARKDOWN = 1,
@@ -64,38 +38,115 @@ export declare enum ChatWorkspaceRunKind {
64
38
  }
65
39
  export declare function chatWorkspaceRunKindFromJSON(object: any): ChatWorkspaceRunKind;
66
40
  export declare function chatWorkspaceRunKindToJSON(object: ChatWorkspaceRunKind): string;
41
+ export interface CreateChatSessionRequest {
42
+ /** If empty, the organization's default chat agent is used. */
43
+ rootAgentId: string;
44
+ title: string;
45
+ /**
46
+ * Optional model used to create the organization's default chat agent when
47
+ * the organization does not have one yet.
48
+ */
49
+ modelId: string;
50
+ }
51
+ export interface CreateChatSessionResponse {
52
+ session: ChatSession | undefined;
53
+ }
54
+ export interface GetChatSessionRequest {
55
+ sessionId: string;
56
+ }
57
+ export interface GetChatSessionResponse {
58
+ session: ChatSession | undefined;
59
+ }
60
+ export interface UpdateChatSessionTitleRequest {
61
+ sessionId: string;
62
+ title: string;
63
+ }
64
+ export interface UpdateChatSessionTitleResponse {
65
+ session: ChatSession | undefined;
66
+ }
67
+ export interface ListChatSessionsRequest {
68
+ pageSize: number;
69
+ pageOffset: number;
70
+ }
71
+ export interface ListChatSessionsResponse {
72
+ sessions: ChatSession[];
73
+ }
74
+ export interface ListChatMessagesRequest {
75
+ sessionId: string;
76
+ pageSize: number;
77
+ pageOffset: number;
78
+ }
79
+ export interface ListChatMessagesResponse {
80
+ messages: ChatMessage[];
81
+ }
82
+ export interface SendChatMessageRequest {
83
+ /** Required. Messages are sent to an existing chat session. */
84
+ sessionId: string;
85
+ content: Content | undefined;
86
+ modelIdOverride: string;
87
+ generateConfigOverride: GenerateConfig | undefined;
88
+ toolConfirmation: ToolConfirmationResponse | undefined;
89
+ }
90
+ export interface SendChatMessageResponse {
91
+ event: ChatEvent | undefined;
92
+ }
93
+ export interface RenderChatArtifactRequest {
94
+ sessionId: string;
95
+ agentRunId: string;
96
+ toolCallId: string;
97
+ artifactId: string;
98
+ title: string;
99
+ kind: ChatArtifactKind;
100
+ language: string;
101
+ content: string;
102
+ documentReferences: ChatDocumentReference[];
103
+ }
104
+ export interface RenderChatArtifactResponse {
105
+ artifact: ChatArtifact | undefined;
106
+ version: ChatArtifactVersion | undefined;
107
+ created: boolean;
108
+ }
109
+ export interface ListChatArtifactsRequest {
110
+ sessionId: string;
111
+ }
112
+ export interface ListChatArtifactsResponse {
113
+ artifacts: ChatArtifact[];
114
+ }
115
+ export interface GetChatArtifactRequest {
116
+ sessionId: string;
117
+ artifactId: string;
118
+ }
119
+ export interface GetChatArtifactResponse {
120
+ artifact: ChatArtifact | undefined;
121
+ currentVersion: ChatArtifactVersion | undefined;
122
+ }
123
+ export interface GetChatArtifactVersionRequest {
124
+ sessionId: string;
125
+ artifactId: string;
126
+ version: number;
127
+ }
128
+ export interface GetChatArtifactVersionResponse {
129
+ version: ChatArtifactVersion | undefined;
130
+ }
67
131
  export interface ChatSession {
68
132
  id: string;
69
- organizationId: string;
133
+ orgId: string;
70
134
  createdByUserId: string;
135
+ rootAgentId: string;
71
136
  title: string;
72
- modelId: string;
73
- providerConfigurationId: string;
74
- createdAt: Date | undefined;
75
- updatedAt: Date | undefined;
76
137
  lastMessageAt: Date | undefined;
77
- attachedProjectIds: string[];
78
138
  }
79
139
  export interface ChatMessage {
80
140
  id: string;
141
+ orgId: string;
81
142
  sessionId: string;
82
- role: ChatMessageRole;
83
- content: string;
84
- parentMessageId: string;
85
- toolCallId: string;
86
- toolCallState: ChatToolCallState;
87
- modelId: string;
88
- ephemeralAttachmentCount: number;
89
- ephemeralAttachmentMimeTypes: string[];
90
- tokenUsage: {
91
- [key: string]: any;
92
- } | undefined;
93
- streamState: ChatStreamState;
94
- createdAt: Date | undefined;
95
- completedAt: Date | undefined;
143
+ content: Content | undefined;
144
+ timestamp: Date | undefined;
145
+ agentRunId: string;
96
146
  }
97
147
  export interface ChatArtifact {
98
148
  id: string;
149
+ orgId: string;
99
150
  sessionId: string;
100
151
  title: string;
101
152
  kind: ChatArtifactKind;
@@ -106,12 +157,14 @@ export interface ChatArtifact {
106
157
  }
107
158
  export interface ChatArtifactVersion {
108
159
  id: string;
160
+ orgId: string;
109
161
  artifactId: string;
110
162
  version: number;
111
163
  content: string;
112
- createdByMessageId: string;
113
- createdAt: Date | undefined;
164
+ createdByAgentRunId: string;
165
+ toolCallId: string;
114
166
  documentReferences: ChatDocumentReference[];
167
+ createdAt: Date | undefined;
115
168
  }
116
169
  export interface ChatDocumentReference {
117
170
  documentId: string;
@@ -120,148 +173,323 @@ export interface ChatDocumentReference {
120
173
  threadIds: string[];
121
174
  sourceLocations: SourceLocation[];
122
175
  }
123
- export interface ChatEphemeralAttachment {
124
- mimeType: string;
125
- /** Base64-encoded bytes. Never persisted; passed through to the inference request. */
126
- data: Uint8Array;
127
- }
128
- /** Streaming frame. Exactly one of the oneof values is set per frame. */
129
- export interface ChatStreamFrame {
130
- /** Opaque stable event id for replay/resume. Replayed frames keep the same id. */
176
+ export interface ChatEvent {
131
177
  eventId: string;
132
- messageStarted?: ChatStreamFrame_MessageStarted | undefined;
133
- messageDelta?: ChatStreamFrame_MessageDelta | undefined;
134
- toolCallProposed?: ChatStreamFrame_ToolCallProposed | undefined;
135
- toolCallExecuting?: ChatStreamFrame_ToolCallExecuting | undefined;
136
- toolCallResult?: ChatStreamFrame_ToolCallResult | undefined;
137
- toolCallRejected?: ChatStreamFrame_ToolCallRejected | undefined;
138
- artifactCreated?: ChatStreamFrame_ArtifactCreated | undefined;
139
- artifactUpdated?: ChatStreamFrame_ArtifactUpdated | undefined;
140
- messageComplete?: ChatStreamFrame_MessageComplete | undefined;
141
- messageError?: ChatStreamFrame_MessageError | undefined;
142
- workspaceCommand?: ChatStreamFrame_WorkspaceCommand | undefined;
143
- }
144
- export interface ChatStreamFrame_MessageStarted {
145
- messageId: string;
146
- role: ChatMessageRole;
147
- }
148
- export interface ChatStreamFrame_MessageDelta {
149
- messageId: string;
150
- textDelta: string;
151
- }
152
- export interface ChatStreamFrame_ToolCallProposed {
153
- messageId: string;
178
+ runId: string;
179
+ sessionId: string;
180
+ timestamp: Date | undefined;
181
+ content?: Content | undefined;
182
+ complete?: ChatMessageComplete | undefined;
183
+ failed?: ChatMessageFailed | undefined;
184
+ toolCallExecuting?: ChatToolCallExecuting | undefined;
185
+ toolCallResult?: ChatToolCallResult | undefined;
186
+ artifactCreated?: ChatArtifactCreated | undefined;
187
+ artifactUpdated?: ChatArtifactUpdated | undefined;
188
+ workspaceCommand?: ChatWorkspaceCommand | undefined;
189
+ toolConfirmationRequired?: ToolConfirmationRequired | undefined;
190
+ }
191
+ export interface ChatToolCallExecuting {
154
192
  toolCallId: string;
155
193
  name: string;
156
194
  arguments: {
157
195
  [key: string]: any;
158
196
  } | undefined;
159
- requiresApproval: boolean;
160
197
  }
161
- export interface ChatStreamFrame_ToolCallExecuting {
198
+ export interface ChatToolCallResult {
162
199
  toolCallId: string;
163
200
  name: string;
164
- arguments: {
165
- [key: string]: any;
166
- } | undefined;
167
- }
168
- export interface ChatStreamFrame_ToolCallResult {
169
- toolCallId: string;
170
- /** "success" | "error" */
171
201
  status: string;
172
202
  summary: string;
173
203
  }
174
- export interface ChatStreamFrame_ToolCallRejected {
175
- toolCallId: string;
176
- reason: string;
177
- }
178
- export interface ChatStreamFrame_ArtifactCreated {
204
+ export interface ChatArtifactCreated {
179
205
  artifactId: string;
180
206
  title: string;
181
207
  kind: ChatArtifactKind;
182
208
  version: number;
183
209
  }
184
- export interface ChatStreamFrame_ArtifactUpdated {
210
+ export interface ChatArtifactUpdated {
185
211
  artifactId: string;
186
212
  version: number;
187
213
  }
188
- export interface ChatStreamFrame_MessageComplete {
189
- messageId: string;
190
- tokenUsage: {
191
- [key: string]: any;
192
- } | undefined;
193
- }
194
- export interface ChatStreamFrame_MessageError {
195
- messageId: string;
196
- code: string;
197
- message: string;
198
- }
199
- export interface ChatStreamFrame_WorkspaceCommand {
200
- /** Generated discriminator for clients; the oneof carries the command payload. */
214
+ export interface ChatWorkspaceCommand {
201
215
  kind: ChatWorkspaceCommandKind;
202
- showArtifact?: ChatStreamFrame_WorkspaceCommand_ShowArtifact | undefined;
203
- showAgentDraft?: ChatStreamFrame_WorkspaceCommand_ShowAgentDraft | undefined;
204
- showWorkflowDraft?: ChatStreamFrame_WorkspaceCommand_ShowWorkflowDraft | undefined;
205
- showWorkflowGraph?: ChatStreamFrame_WorkspaceCommand_ShowWorkflowGraph | undefined;
206
- showRunTrace?: ChatStreamFrame_WorkspaceCommand_ShowRunTrace | undefined;
207
- close?: ChatStreamFrame_WorkspaceCommand_Close | undefined;
208
- clear?: ChatStreamFrame_WorkspaceCommand_Clear | undefined;
209
- }
210
- export interface ChatStreamFrame_WorkspaceCommand_ShowArtifact {
216
+ showArtifact?: ChatWorkspaceShowArtifact | undefined;
217
+ showAgentDraft?: ChatWorkspaceShowAgentDraft | undefined;
218
+ showWorkflowDraft?: ChatWorkspaceShowWorkflowDraft | undefined;
219
+ showWorkflowGraph?: ChatWorkspaceShowWorkflowGraph | undefined;
220
+ showRunTrace?: ChatWorkspaceShowRunTrace | undefined;
221
+ close?: ChatWorkspaceClose | undefined;
222
+ clear?: ChatWorkspaceClear | undefined;
223
+ }
224
+ export interface ChatWorkspaceShowArtifact {
211
225
  artifactId: string;
212
226
  }
213
- export interface ChatStreamFrame_WorkspaceCommand_ShowAgentDraft {
214
- agentDefinitionId: string;
227
+ export interface ChatWorkspaceShowAgentDraft {
228
+ agentId: string;
215
229
  draftId: string;
216
230
  title: string;
217
231
  revision: number;
232
+ agent: AgentInput | undefined;
218
233
  }
219
- export interface ChatStreamFrame_WorkspaceCommand_ShowWorkflowDraft {
220
- workflowDefinitionId: string;
234
+ export interface ChatWorkspaceShowWorkflowDraft {
235
+ workflowId: string;
221
236
  draftId: string;
222
237
  title: string;
223
238
  revision: number;
224
239
  }
225
- export interface ChatStreamFrame_WorkspaceCommand_ShowWorkflowGraph {
226
- workflowDefinitionId: string;
240
+ export interface ChatWorkspaceShowWorkflowGraph {
241
+ workflowId: string;
227
242
  draftId: string;
228
243
  title: string;
229
244
  revision: number;
230
245
  }
231
- export interface ChatStreamFrame_WorkspaceCommand_ShowRunTrace {
246
+ export interface ChatWorkspaceShowRunTrace {
232
247
  runId: string;
233
248
  title: string;
234
249
  runKind: ChatWorkspaceRunKind;
235
250
  }
236
- export interface ChatStreamFrame_WorkspaceCommand_Close {
251
+ export interface ChatWorkspaceClose {
252
+ }
253
+ export interface ChatWorkspaceClear {
237
254
  }
238
- export interface ChatStreamFrame_WorkspaceCommand_Clear {
255
+ export interface ChatMessageComplete {
256
+ message: ChatMessage | undefined;
257
+ generationDetails: GenerationDetails | undefined;
239
258
  }
259
+ export interface ChatMessageFailed {
260
+ code: string;
261
+ message: string;
262
+ generationDetails: GenerationDetails | undefined;
263
+ }
264
+ export declare const CreateChatSessionRequest: MessageFns<CreateChatSessionRequest>;
265
+ export declare const CreateChatSessionResponse: MessageFns<CreateChatSessionResponse>;
266
+ export declare const GetChatSessionRequest: MessageFns<GetChatSessionRequest>;
267
+ export declare const GetChatSessionResponse: MessageFns<GetChatSessionResponse>;
268
+ export declare const UpdateChatSessionTitleRequest: MessageFns<UpdateChatSessionTitleRequest>;
269
+ export declare const UpdateChatSessionTitleResponse: MessageFns<UpdateChatSessionTitleResponse>;
270
+ export declare const ListChatSessionsRequest: MessageFns<ListChatSessionsRequest>;
271
+ export declare const ListChatSessionsResponse: MessageFns<ListChatSessionsResponse>;
272
+ export declare const ListChatMessagesRequest: MessageFns<ListChatMessagesRequest>;
273
+ export declare const ListChatMessagesResponse: MessageFns<ListChatMessagesResponse>;
274
+ export declare const SendChatMessageRequest: MessageFns<SendChatMessageRequest>;
275
+ export declare const SendChatMessageResponse: MessageFns<SendChatMessageResponse>;
276
+ export declare const RenderChatArtifactRequest: MessageFns<RenderChatArtifactRequest>;
277
+ export declare const RenderChatArtifactResponse: MessageFns<RenderChatArtifactResponse>;
278
+ export declare const ListChatArtifactsRequest: MessageFns<ListChatArtifactsRequest>;
279
+ export declare const ListChatArtifactsResponse: MessageFns<ListChatArtifactsResponse>;
280
+ export declare const GetChatArtifactRequest: MessageFns<GetChatArtifactRequest>;
281
+ export declare const GetChatArtifactResponse: MessageFns<GetChatArtifactResponse>;
282
+ export declare const GetChatArtifactVersionRequest: MessageFns<GetChatArtifactVersionRequest>;
283
+ export declare const GetChatArtifactVersionResponse: MessageFns<GetChatArtifactVersionResponse>;
240
284
  export declare const ChatSession: MessageFns<ChatSession>;
241
285
  export declare const ChatMessage: MessageFns<ChatMessage>;
242
286
  export declare const ChatArtifact: MessageFns<ChatArtifact>;
243
287
  export declare const ChatArtifactVersion: MessageFns<ChatArtifactVersion>;
244
288
  export declare const ChatDocumentReference: MessageFns<ChatDocumentReference>;
245
- export declare const ChatEphemeralAttachment: MessageFns<ChatEphemeralAttachment>;
246
- export declare const ChatStreamFrame: MessageFns<ChatStreamFrame>;
247
- export declare const ChatStreamFrame_MessageStarted: MessageFns<ChatStreamFrame_MessageStarted>;
248
- export declare const ChatStreamFrame_MessageDelta: MessageFns<ChatStreamFrame_MessageDelta>;
249
- export declare const ChatStreamFrame_ToolCallProposed: MessageFns<ChatStreamFrame_ToolCallProposed>;
250
- export declare const ChatStreamFrame_ToolCallExecuting: MessageFns<ChatStreamFrame_ToolCallExecuting>;
251
- export declare const ChatStreamFrame_ToolCallResult: MessageFns<ChatStreamFrame_ToolCallResult>;
252
- export declare const ChatStreamFrame_ToolCallRejected: MessageFns<ChatStreamFrame_ToolCallRejected>;
253
- export declare const ChatStreamFrame_ArtifactCreated: MessageFns<ChatStreamFrame_ArtifactCreated>;
254
- export declare const ChatStreamFrame_ArtifactUpdated: MessageFns<ChatStreamFrame_ArtifactUpdated>;
255
- export declare const ChatStreamFrame_MessageComplete: MessageFns<ChatStreamFrame_MessageComplete>;
256
- export declare const ChatStreamFrame_MessageError: MessageFns<ChatStreamFrame_MessageError>;
257
- export declare const ChatStreamFrame_WorkspaceCommand: MessageFns<ChatStreamFrame_WorkspaceCommand>;
258
- export declare const ChatStreamFrame_WorkspaceCommand_ShowArtifact: MessageFns<ChatStreamFrame_WorkspaceCommand_ShowArtifact>;
259
- export declare const ChatStreamFrame_WorkspaceCommand_ShowAgentDraft: MessageFns<ChatStreamFrame_WorkspaceCommand_ShowAgentDraft>;
260
- export declare const ChatStreamFrame_WorkspaceCommand_ShowWorkflowDraft: MessageFns<ChatStreamFrame_WorkspaceCommand_ShowWorkflowDraft>;
261
- export declare const ChatStreamFrame_WorkspaceCommand_ShowWorkflowGraph: MessageFns<ChatStreamFrame_WorkspaceCommand_ShowWorkflowGraph>;
262
- export declare const ChatStreamFrame_WorkspaceCommand_ShowRunTrace: MessageFns<ChatStreamFrame_WorkspaceCommand_ShowRunTrace>;
263
- export declare const ChatStreamFrame_WorkspaceCommand_Close: MessageFns<ChatStreamFrame_WorkspaceCommand_Close>;
264
- export declare const ChatStreamFrame_WorkspaceCommand_Clear: MessageFns<ChatStreamFrame_WorkspaceCommand_Clear>;
289
+ export declare const ChatEvent: MessageFns<ChatEvent>;
290
+ export declare const ChatToolCallExecuting: MessageFns<ChatToolCallExecuting>;
291
+ export declare const ChatToolCallResult: MessageFns<ChatToolCallResult>;
292
+ export declare const ChatArtifactCreated: MessageFns<ChatArtifactCreated>;
293
+ export declare const ChatArtifactUpdated: MessageFns<ChatArtifactUpdated>;
294
+ export declare const ChatWorkspaceCommand: MessageFns<ChatWorkspaceCommand>;
295
+ export declare const ChatWorkspaceShowArtifact: MessageFns<ChatWorkspaceShowArtifact>;
296
+ export declare const ChatWorkspaceShowAgentDraft: MessageFns<ChatWorkspaceShowAgentDraft>;
297
+ export declare const ChatWorkspaceShowWorkflowDraft: MessageFns<ChatWorkspaceShowWorkflowDraft>;
298
+ export declare const ChatWorkspaceShowWorkflowGraph: MessageFns<ChatWorkspaceShowWorkflowGraph>;
299
+ export declare const ChatWorkspaceShowRunTrace: MessageFns<ChatWorkspaceShowRunTrace>;
300
+ export declare const ChatWorkspaceClose: MessageFns<ChatWorkspaceClose>;
301
+ export declare const ChatWorkspaceClear: MessageFns<ChatWorkspaceClear>;
302
+ export declare const ChatMessageComplete: MessageFns<ChatMessageComplete>;
303
+ export declare const ChatMessageFailed: MessageFns<ChatMessageFailed>;
304
+ export interface ChatService {
305
+ CreateChatSession(request: CreateChatSessionRequest): Promise<CreateChatSessionResponse>;
306
+ GetChatSession(request: GetChatSessionRequest): Promise<GetChatSessionResponse>;
307
+ UpdateChatSessionTitle(request: UpdateChatSessionTitleRequest): Promise<UpdateChatSessionTitleResponse>;
308
+ ListChatSessions(request: ListChatSessionsRequest): Promise<ListChatSessionsResponse>;
309
+ ListChatMessages(request: ListChatMessagesRequest): Promise<ListChatMessagesResponse>;
310
+ SendChatMessage(request: SendChatMessageRequest): Observable<SendChatMessageResponse>;
311
+ }
312
+ export declare const ChatServiceServiceName = "weaveapi.chat.v1.ChatService";
313
+ export declare class ChatServiceClientImpl implements ChatService {
314
+ private readonly rpc;
315
+ private readonly service;
316
+ constructor(rpc: Rpc, opts?: {
317
+ service?: string;
318
+ });
319
+ CreateChatSession(request: CreateChatSessionRequest): Promise<CreateChatSessionResponse>;
320
+ GetChatSession(request: GetChatSessionRequest): Promise<GetChatSessionResponse>;
321
+ UpdateChatSessionTitle(request: UpdateChatSessionTitleRequest): Promise<UpdateChatSessionTitleResponse>;
322
+ ListChatSessions(request: ListChatSessionsRequest): Promise<ListChatSessionsResponse>;
323
+ ListChatMessages(request: ListChatMessagesRequest): Promise<ListChatMessagesResponse>;
324
+ SendChatMessage(request: SendChatMessageRequest): Observable<SendChatMessageResponse>;
325
+ }
326
+ export type ChatServiceDefinition = typeof ChatServiceDefinition;
327
+ export declare const ChatServiceDefinition: {
328
+ readonly name: "ChatService";
329
+ readonly fullName: "weaveapi.chat.v1.ChatService";
330
+ readonly methods: {
331
+ readonly createChatSession: {
332
+ readonly name: "CreateChatSession";
333
+ readonly requestType: typeof CreateChatSessionRequest;
334
+ readonly requestStream: false;
335
+ readonly responseType: typeof CreateChatSessionResponse;
336
+ readonly responseStream: false;
337
+ readonly options: {
338
+ readonly _unknownFields: {
339
+ readonly 408002: readonly [Uint8Array];
340
+ readonly 578365826: readonly [Uint8Array];
341
+ };
342
+ };
343
+ };
344
+ readonly getChatSession: {
345
+ readonly name: "GetChatSession";
346
+ readonly requestType: typeof GetChatSessionRequest;
347
+ readonly requestStream: false;
348
+ readonly responseType: typeof GetChatSessionResponse;
349
+ readonly responseStream: false;
350
+ readonly options: {
351
+ readonly _unknownFields: {
352
+ readonly 408002: readonly [Uint8Array];
353
+ readonly 578365826: readonly [Uint8Array];
354
+ };
355
+ };
356
+ };
357
+ readonly updateChatSessionTitle: {
358
+ readonly name: "UpdateChatSessionTitle";
359
+ readonly requestType: typeof UpdateChatSessionTitleRequest;
360
+ readonly requestStream: false;
361
+ readonly responseType: typeof UpdateChatSessionTitleResponse;
362
+ readonly responseStream: false;
363
+ readonly options: {
364
+ readonly _unknownFields: {
365
+ readonly 408002: readonly [Uint8Array];
366
+ readonly 578365826: readonly [Uint8Array];
367
+ };
368
+ };
369
+ };
370
+ readonly listChatSessions: {
371
+ readonly name: "ListChatSessions";
372
+ readonly requestType: typeof ListChatSessionsRequest;
373
+ readonly requestStream: false;
374
+ readonly responseType: typeof ListChatSessionsResponse;
375
+ readonly responseStream: false;
376
+ readonly options: {
377
+ readonly _unknownFields: {
378
+ readonly 408002: readonly [Uint8Array];
379
+ readonly 578365826: readonly [Uint8Array];
380
+ };
381
+ };
382
+ };
383
+ readonly listChatMessages: {
384
+ readonly name: "ListChatMessages";
385
+ readonly requestType: typeof ListChatMessagesRequest;
386
+ readonly requestStream: false;
387
+ readonly responseType: typeof ListChatMessagesResponse;
388
+ readonly responseStream: false;
389
+ readonly options: {
390
+ readonly _unknownFields: {
391
+ readonly 408002: readonly [Uint8Array];
392
+ readonly 578365826: readonly [Uint8Array];
393
+ };
394
+ };
395
+ };
396
+ readonly sendChatMessage: {
397
+ readonly name: "SendChatMessage";
398
+ readonly requestType: typeof SendChatMessageRequest;
399
+ readonly requestStream: false;
400
+ readonly responseType: typeof SendChatMessageResponse;
401
+ readonly responseStream: true;
402
+ readonly options: {
403
+ readonly _unknownFields: {
404
+ readonly 408002: readonly [Uint8Array];
405
+ readonly 578365826: readonly [Uint8Array];
406
+ };
407
+ };
408
+ };
409
+ };
410
+ };
411
+ export interface ChatArtifactService {
412
+ RenderChatArtifact(request: RenderChatArtifactRequest): Promise<RenderChatArtifactResponse>;
413
+ ListChatArtifacts(request: ListChatArtifactsRequest): Promise<ListChatArtifactsResponse>;
414
+ GetChatArtifact(request: GetChatArtifactRequest): Promise<GetChatArtifactResponse>;
415
+ GetChatArtifactVersion(request: GetChatArtifactVersionRequest): Promise<GetChatArtifactVersionResponse>;
416
+ }
417
+ export declare const ChatArtifactServiceServiceName = "weaveapi.chat.v1.ChatArtifactService";
418
+ export declare class ChatArtifactServiceClientImpl implements ChatArtifactService {
419
+ private readonly rpc;
420
+ private readonly service;
421
+ constructor(rpc: Rpc, opts?: {
422
+ service?: string;
423
+ });
424
+ RenderChatArtifact(request: RenderChatArtifactRequest): Promise<RenderChatArtifactResponse>;
425
+ ListChatArtifacts(request: ListChatArtifactsRequest): Promise<ListChatArtifactsResponse>;
426
+ GetChatArtifact(request: GetChatArtifactRequest): Promise<GetChatArtifactResponse>;
427
+ GetChatArtifactVersion(request: GetChatArtifactVersionRequest): Promise<GetChatArtifactVersionResponse>;
428
+ }
429
+ export type ChatArtifactServiceDefinition = typeof ChatArtifactServiceDefinition;
430
+ export declare const ChatArtifactServiceDefinition: {
431
+ readonly name: "ChatArtifactService";
432
+ readonly fullName: "weaveapi.chat.v1.ChatArtifactService";
433
+ readonly methods: {
434
+ readonly renderChatArtifact: {
435
+ readonly name: "RenderChatArtifact";
436
+ readonly requestType: typeof RenderChatArtifactRequest;
437
+ readonly requestStream: false;
438
+ readonly responseType: typeof RenderChatArtifactResponse;
439
+ readonly responseStream: false;
440
+ readonly options: {
441
+ readonly _unknownFields: {
442
+ readonly 408002: readonly [Uint8Array];
443
+ };
444
+ };
445
+ };
446
+ readonly listChatArtifacts: {
447
+ readonly name: "ListChatArtifacts";
448
+ readonly requestType: typeof ListChatArtifactsRequest;
449
+ readonly requestStream: false;
450
+ readonly responseType: typeof ListChatArtifactsResponse;
451
+ readonly responseStream: false;
452
+ readonly options: {
453
+ readonly _unknownFields: {
454
+ readonly 408002: readonly [Uint8Array];
455
+ readonly 578365826: readonly [Uint8Array];
456
+ };
457
+ };
458
+ };
459
+ readonly getChatArtifact: {
460
+ readonly name: "GetChatArtifact";
461
+ readonly requestType: typeof GetChatArtifactRequest;
462
+ readonly requestStream: false;
463
+ readonly responseType: typeof GetChatArtifactResponse;
464
+ readonly responseStream: false;
465
+ readonly options: {
466
+ readonly _unknownFields: {
467
+ readonly 408002: readonly [Uint8Array];
468
+ readonly 578365826: readonly [Uint8Array];
469
+ };
470
+ };
471
+ };
472
+ readonly getChatArtifactVersion: {
473
+ readonly name: "GetChatArtifactVersion";
474
+ readonly requestType: typeof GetChatArtifactVersionRequest;
475
+ readonly requestStream: false;
476
+ readonly responseType: typeof GetChatArtifactVersionResponse;
477
+ readonly responseStream: false;
478
+ readonly options: {
479
+ readonly _unknownFields: {
480
+ readonly 408002: readonly [Uint8Array];
481
+ readonly 578365826: readonly [Uint8Array];
482
+ };
483
+ };
484
+ };
485
+ };
486
+ };
487
+ interface Rpc {
488
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
489
+ clientStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Promise<Uint8Array>;
490
+ serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable<Uint8Array>;
491
+ bidirectionalStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Observable<Uint8Array>;
492
+ }
265
493
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
266
494
  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 {} ? {
267
495
  [K in keyof T]?: DeepPartial<T[K]>;