weave-typescript 0.47.1 → 0.49.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.
@@ -57,6 +57,14 @@ export declare enum AgentRunEventKind {
57
57
  }
58
58
  export declare function agentRunEventKindFromJSON(object: any): AgentRunEventKind;
59
59
  export declare function agentRunEventKindToJSON(object: AgentRunEventKind): string;
60
+ export declare enum AgentDraftEventKind {
61
+ AGENT_DRAFT_EVENT_KIND_UNSPECIFIED = 0,
62
+ AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED = 1,
63
+ AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED = 2,
64
+ UNRECOGNIZED = -1
65
+ }
66
+ export declare function agentDraftEventKindFromJSON(object: any): AgentDraftEventKind;
67
+ export declare function agentDraftEventKindToJSON(object: AgentDraftEventKind): string;
60
68
  export interface AgentDefinition {
61
69
  id: string;
62
70
  organizationId: string;
@@ -107,6 +115,27 @@ export interface AgentDraftPatch {
107
115
  createdByUserId: string;
108
116
  createdAt: Date | undefined;
109
117
  }
118
+ export interface AgentDraftPatchConflict {
119
+ baseRevision: number;
120
+ currentRevision: number;
121
+ reason: string;
122
+ }
123
+ export interface AgentDraftEvent {
124
+ id: string;
125
+ organizationId: string;
126
+ definitionId: string;
127
+ draftId: string;
128
+ sequence: number;
129
+ kind: AgentDraftEventKind;
130
+ baseRevision: number;
131
+ resultRevision: number;
132
+ changedFields: string[];
133
+ source: string;
134
+ clientRequestId: string;
135
+ conflict: AgentDraftPatchConflict | undefined;
136
+ createdByUserId: string;
137
+ createdAt: Date | undefined;
138
+ }
110
139
  export interface AgentVersion {
111
140
  id: string;
112
141
  definitionId: string;
@@ -198,6 +227,8 @@ export interface AgentRunEvent {
198
227
  export declare const AgentDefinition: MessageFns<AgentDefinition>;
199
228
  export declare const AgentDraft: MessageFns<AgentDraft>;
200
229
  export declare const AgentDraftPatch: MessageFns<AgentDraftPatch>;
230
+ export declare const AgentDraftPatchConflict: MessageFns<AgentDraftPatchConflict>;
231
+ export declare const AgentDraftEvent: MessageFns<AgentDraftEvent>;
201
232
  export declare const AgentVersion: MessageFns<AgentVersion>;
202
233
  export declare const AgentToolDescriptor: MessageFns<AgentToolDescriptor>;
203
234
  export declare const AgentPublishPlan: MessageFns<AgentPublishPlan>;
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/agent/v1/agent.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AgentRunEvent = exports.AgentRun = exports.AgentPublishPlanIssue = exports.AgentPublishPlan = exports.AgentToolDescriptor = exports.AgentVersion = exports.AgentDraftPatch = exports.AgentDraft = exports.AgentDefinition = exports.AgentRunEventKind = exports.AgentRunStatus = exports.AgentToolApprovalMode = exports.AgentToolDescriptorKind = exports.AgentDefinitionStatus = exports.protobufPackage = void 0;
8
+ exports.AgentRunEvent = exports.AgentRun = exports.AgentPublishPlanIssue = exports.AgentPublishPlan = exports.AgentToolDescriptor = exports.AgentVersion = exports.AgentDraftEvent = exports.AgentDraftPatchConflict = exports.AgentDraftPatch = exports.AgentDraft = exports.AgentDefinition = exports.AgentDraftEventKind = exports.AgentRunEventKind = exports.AgentRunStatus = exports.AgentToolApprovalMode = exports.AgentToolDescriptorKind = exports.AgentDefinitionStatus = exports.protobufPackage = void 0;
9
9
  exports.agentDefinitionStatusFromJSON = agentDefinitionStatusFromJSON;
10
10
  exports.agentDefinitionStatusToJSON = agentDefinitionStatusToJSON;
11
11
  exports.agentToolDescriptorKindFromJSON = agentToolDescriptorKindFromJSON;
@@ -16,6 +16,8 @@ exports.agentRunStatusFromJSON = agentRunStatusFromJSON;
16
16
  exports.agentRunStatusToJSON = agentRunStatusToJSON;
17
17
  exports.agentRunEventKindFromJSON = agentRunEventKindFromJSON;
18
18
  exports.agentRunEventKindToJSON = agentRunEventKindToJSON;
19
+ exports.agentDraftEventKindFromJSON = agentDraftEventKindFromJSON;
20
+ exports.agentDraftEventKindToJSON = agentDraftEventKindToJSON;
19
21
  /* eslint-disable */
20
22
  const wire_1 = require("@bufbuild/protobuf/wire");
21
23
  const struct_pb_1 = require("../../../google/protobuf/struct.pb");
@@ -308,6 +310,43 @@ function agentRunEventKindToJSON(object) {
308
310
  return "UNRECOGNIZED";
309
311
  }
310
312
  }
313
+ var AgentDraftEventKind;
314
+ (function (AgentDraftEventKind) {
315
+ AgentDraftEventKind[AgentDraftEventKind["AGENT_DRAFT_EVENT_KIND_UNSPECIFIED"] = 0] = "AGENT_DRAFT_EVENT_KIND_UNSPECIFIED";
316
+ AgentDraftEventKind[AgentDraftEventKind["AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED"] = 1] = "AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED";
317
+ AgentDraftEventKind[AgentDraftEventKind["AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED"] = 2] = "AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED";
318
+ AgentDraftEventKind[AgentDraftEventKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
319
+ })(AgentDraftEventKind || (exports.AgentDraftEventKind = AgentDraftEventKind = {}));
320
+ function agentDraftEventKindFromJSON(object) {
321
+ switch (object) {
322
+ case 0:
323
+ case "AGENT_DRAFT_EVENT_KIND_UNSPECIFIED":
324
+ return AgentDraftEventKind.AGENT_DRAFT_EVENT_KIND_UNSPECIFIED;
325
+ case 1:
326
+ case "AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED":
327
+ return AgentDraftEventKind.AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED;
328
+ case 2:
329
+ case "AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED":
330
+ return AgentDraftEventKind.AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED;
331
+ case -1:
332
+ case "UNRECOGNIZED":
333
+ default:
334
+ return AgentDraftEventKind.UNRECOGNIZED;
335
+ }
336
+ }
337
+ function agentDraftEventKindToJSON(object) {
338
+ switch (object) {
339
+ case AgentDraftEventKind.AGENT_DRAFT_EVENT_KIND_UNSPECIFIED:
340
+ return "AGENT_DRAFT_EVENT_KIND_UNSPECIFIED";
341
+ case AgentDraftEventKind.AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED:
342
+ return "AGENT_DRAFT_EVENT_KIND_PATCH_APPLIED";
343
+ case AgentDraftEventKind.AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED:
344
+ return "AGENT_DRAFT_EVENT_KIND_PATCH_REJECTED";
345
+ case AgentDraftEventKind.UNRECOGNIZED:
346
+ default:
347
+ return "UNRECOGNIZED";
348
+ }
349
+ }
311
350
  function createBaseAgentDefinition() {
312
351
  return {
313
352
  id: "",
@@ -1092,6 +1131,402 @@ exports.AgentDraftPatch = {
1092
1131
  return message;
1093
1132
  },
1094
1133
  };
1134
+ function createBaseAgentDraftPatchConflict() {
1135
+ return { baseRevision: 0, currentRevision: 0, reason: "" };
1136
+ }
1137
+ exports.AgentDraftPatchConflict = {
1138
+ encode(message, writer = new wire_1.BinaryWriter()) {
1139
+ if (message.baseRevision !== 0) {
1140
+ writer.uint32(8).int32(message.baseRevision);
1141
+ }
1142
+ if (message.currentRevision !== 0) {
1143
+ writer.uint32(16).int32(message.currentRevision);
1144
+ }
1145
+ if (message.reason !== "") {
1146
+ writer.uint32(26).string(message.reason);
1147
+ }
1148
+ return writer;
1149
+ },
1150
+ decode(input, length) {
1151
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1152
+ const end = length === undefined ? reader.len : reader.pos + length;
1153
+ const message = createBaseAgentDraftPatchConflict();
1154
+ while (reader.pos < end) {
1155
+ const tag = reader.uint32();
1156
+ switch (tag >>> 3) {
1157
+ case 1: {
1158
+ if (tag !== 8) {
1159
+ break;
1160
+ }
1161
+ message.baseRevision = reader.int32();
1162
+ continue;
1163
+ }
1164
+ case 2: {
1165
+ if (tag !== 16) {
1166
+ break;
1167
+ }
1168
+ message.currentRevision = reader.int32();
1169
+ continue;
1170
+ }
1171
+ case 3: {
1172
+ if (tag !== 26) {
1173
+ break;
1174
+ }
1175
+ message.reason = reader.string();
1176
+ continue;
1177
+ }
1178
+ }
1179
+ if ((tag & 7) === 4 || tag === 0) {
1180
+ break;
1181
+ }
1182
+ reader.skip(tag & 7);
1183
+ }
1184
+ return message;
1185
+ },
1186
+ fromJSON(object) {
1187
+ return {
1188
+ baseRevision: isSet(object.baseRevision)
1189
+ ? globalThis.Number(object.baseRevision)
1190
+ : isSet(object.base_revision)
1191
+ ? globalThis.Number(object.base_revision)
1192
+ : 0,
1193
+ currentRevision: isSet(object.currentRevision)
1194
+ ? globalThis.Number(object.currentRevision)
1195
+ : isSet(object.current_revision)
1196
+ ? globalThis.Number(object.current_revision)
1197
+ : 0,
1198
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
1199
+ };
1200
+ },
1201
+ toJSON(message) {
1202
+ const obj = {};
1203
+ if (message.baseRevision !== 0) {
1204
+ obj.baseRevision = Math.round(message.baseRevision);
1205
+ }
1206
+ if (message.currentRevision !== 0) {
1207
+ obj.currentRevision = Math.round(message.currentRevision);
1208
+ }
1209
+ if (message.reason !== "") {
1210
+ obj.reason = message.reason;
1211
+ }
1212
+ return obj;
1213
+ },
1214
+ create(base) {
1215
+ return exports.AgentDraftPatchConflict.fromPartial(base !== null && base !== void 0 ? base : {});
1216
+ },
1217
+ fromPartial(object) {
1218
+ var _a, _b, _c;
1219
+ const message = createBaseAgentDraftPatchConflict();
1220
+ message.baseRevision = (_a = object.baseRevision) !== null && _a !== void 0 ? _a : 0;
1221
+ message.currentRevision = (_b = object.currentRevision) !== null && _b !== void 0 ? _b : 0;
1222
+ message.reason = (_c = object.reason) !== null && _c !== void 0 ? _c : "";
1223
+ return message;
1224
+ },
1225
+ };
1226
+ function createBaseAgentDraftEvent() {
1227
+ return {
1228
+ id: "",
1229
+ organizationId: "",
1230
+ definitionId: "",
1231
+ draftId: "",
1232
+ sequence: 0,
1233
+ kind: 0,
1234
+ baseRevision: 0,
1235
+ resultRevision: 0,
1236
+ changedFields: [],
1237
+ source: "",
1238
+ clientRequestId: "",
1239
+ conflict: undefined,
1240
+ createdByUserId: "",
1241
+ createdAt: undefined,
1242
+ };
1243
+ }
1244
+ exports.AgentDraftEvent = {
1245
+ encode(message, writer = new wire_1.BinaryWriter()) {
1246
+ if (message.id !== "") {
1247
+ writer.uint32(10).string(message.id);
1248
+ }
1249
+ if (message.organizationId !== "") {
1250
+ writer.uint32(18).string(message.organizationId);
1251
+ }
1252
+ if (message.definitionId !== "") {
1253
+ writer.uint32(26).string(message.definitionId);
1254
+ }
1255
+ if (message.draftId !== "") {
1256
+ writer.uint32(34).string(message.draftId);
1257
+ }
1258
+ if (message.sequence !== 0) {
1259
+ writer.uint32(40).uint64(message.sequence);
1260
+ }
1261
+ if (message.kind !== 0) {
1262
+ writer.uint32(48).int32(message.kind);
1263
+ }
1264
+ if (message.baseRevision !== 0) {
1265
+ writer.uint32(56).int32(message.baseRevision);
1266
+ }
1267
+ if (message.resultRevision !== 0) {
1268
+ writer.uint32(64).int32(message.resultRevision);
1269
+ }
1270
+ for (const v of message.changedFields) {
1271
+ writer.uint32(74).string(v);
1272
+ }
1273
+ if (message.source !== "") {
1274
+ writer.uint32(82).string(message.source);
1275
+ }
1276
+ if (message.clientRequestId !== "") {
1277
+ writer.uint32(90).string(message.clientRequestId);
1278
+ }
1279
+ if (message.conflict !== undefined) {
1280
+ exports.AgentDraftPatchConflict.encode(message.conflict, writer.uint32(98).fork()).join();
1281
+ }
1282
+ if (message.createdByUserId !== "") {
1283
+ writer.uint32(106).string(message.createdByUserId);
1284
+ }
1285
+ if (message.createdAt !== undefined) {
1286
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(114).fork()).join();
1287
+ }
1288
+ return writer;
1289
+ },
1290
+ decode(input, length) {
1291
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1292
+ const end = length === undefined ? reader.len : reader.pos + length;
1293
+ const message = createBaseAgentDraftEvent();
1294
+ while (reader.pos < end) {
1295
+ const tag = reader.uint32();
1296
+ switch (tag >>> 3) {
1297
+ case 1: {
1298
+ if (tag !== 10) {
1299
+ break;
1300
+ }
1301
+ message.id = reader.string();
1302
+ continue;
1303
+ }
1304
+ case 2: {
1305
+ if (tag !== 18) {
1306
+ break;
1307
+ }
1308
+ message.organizationId = reader.string();
1309
+ continue;
1310
+ }
1311
+ case 3: {
1312
+ if (tag !== 26) {
1313
+ break;
1314
+ }
1315
+ message.definitionId = reader.string();
1316
+ continue;
1317
+ }
1318
+ case 4: {
1319
+ if (tag !== 34) {
1320
+ break;
1321
+ }
1322
+ message.draftId = reader.string();
1323
+ continue;
1324
+ }
1325
+ case 5: {
1326
+ if (tag !== 40) {
1327
+ break;
1328
+ }
1329
+ message.sequence = longToNumber(reader.uint64());
1330
+ continue;
1331
+ }
1332
+ case 6: {
1333
+ if (tag !== 48) {
1334
+ break;
1335
+ }
1336
+ message.kind = reader.int32();
1337
+ continue;
1338
+ }
1339
+ case 7: {
1340
+ if (tag !== 56) {
1341
+ break;
1342
+ }
1343
+ message.baseRevision = reader.int32();
1344
+ continue;
1345
+ }
1346
+ case 8: {
1347
+ if (tag !== 64) {
1348
+ break;
1349
+ }
1350
+ message.resultRevision = reader.int32();
1351
+ continue;
1352
+ }
1353
+ case 9: {
1354
+ if (tag !== 74) {
1355
+ break;
1356
+ }
1357
+ message.changedFields.push(reader.string());
1358
+ continue;
1359
+ }
1360
+ case 10: {
1361
+ if (tag !== 82) {
1362
+ break;
1363
+ }
1364
+ message.source = reader.string();
1365
+ continue;
1366
+ }
1367
+ case 11: {
1368
+ if (tag !== 90) {
1369
+ break;
1370
+ }
1371
+ message.clientRequestId = reader.string();
1372
+ continue;
1373
+ }
1374
+ case 12: {
1375
+ if (tag !== 98) {
1376
+ break;
1377
+ }
1378
+ message.conflict = exports.AgentDraftPatchConflict.decode(reader, reader.uint32());
1379
+ continue;
1380
+ }
1381
+ case 13: {
1382
+ if (tag !== 106) {
1383
+ break;
1384
+ }
1385
+ message.createdByUserId = reader.string();
1386
+ continue;
1387
+ }
1388
+ case 14: {
1389
+ if (tag !== 114) {
1390
+ break;
1391
+ }
1392
+ message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1393
+ continue;
1394
+ }
1395
+ }
1396
+ if ((tag & 7) === 4 || tag === 0) {
1397
+ break;
1398
+ }
1399
+ reader.skip(tag & 7);
1400
+ }
1401
+ return message;
1402
+ },
1403
+ fromJSON(object) {
1404
+ return {
1405
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1406
+ organizationId: isSet(object.organizationId)
1407
+ ? globalThis.String(object.organizationId)
1408
+ : isSet(object.organization_id)
1409
+ ? globalThis.String(object.organization_id)
1410
+ : "",
1411
+ definitionId: isSet(object.definitionId)
1412
+ ? globalThis.String(object.definitionId)
1413
+ : isSet(object.definition_id)
1414
+ ? globalThis.String(object.definition_id)
1415
+ : "",
1416
+ draftId: isSet(object.draftId)
1417
+ ? globalThis.String(object.draftId)
1418
+ : isSet(object.draft_id)
1419
+ ? globalThis.String(object.draft_id)
1420
+ : "",
1421
+ sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
1422
+ kind: isSet(object.kind) ? agentDraftEventKindFromJSON(object.kind) : 0,
1423
+ baseRevision: isSet(object.baseRevision)
1424
+ ? globalThis.Number(object.baseRevision)
1425
+ : isSet(object.base_revision)
1426
+ ? globalThis.Number(object.base_revision)
1427
+ : 0,
1428
+ resultRevision: isSet(object.resultRevision)
1429
+ ? globalThis.Number(object.resultRevision)
1430
+ : isSet(object.result_revision)
1431
+ ? globalThis.Number(object.result_revision)
1432
+ : 0,
1433
+ changedFields: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.changedFields)
1434
+ ? object.changedFields.map((e) => globalThis.String(e))
1435
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.changed_fields)
1436
+ ? object.changed_fields.map((e) => globalThis.String(e))
1437
+ : [],
1438
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
1439
+ clientRequestId: isSet(object.clientRequestId)
1440
+ ? globalThis.String(object.clientRequestId)
1441
+ : isSet(object.client_request_id)
1442
+ ? globalThis.String(object.client_request_id)
1443
+ : "",
1444
+ conflict: isSet(object.conflict) ? exports.AgentDraftPatchConflict.fromJSON(object.conflict) : undefined,
1445
+ createdByUserId: isSet(object.createdByUserId)
1446
+ ? globalThis.String(object.createdByUserId)
1447
+ : isSet(object.created_by_user_id)
1448
+ ? globalThis.String(object.created_by_user_id)
1449
+ : "",
1450
+ createdAt: isSet(object.createdAt)
1451
+ ? fromJsonTimestamp(object.createdAt)
1452
+ : isSet(object.created_at)
1453
+ ? fromJsonTimestamp(object.created_at)
1454
+ : undefined,
1455
+ };
1456
+ },
1457
+ toJSON(message) {
1458
+ var _a;
1459
+ const obj = {};
1460
+ if (message.id !== "") {
1461
+ obj.id = message.id;
1462
+ }
1463
+ if (message.organizationId !== "") {
1464
+ obj.organizationId = message.organizationId;
1465
+ }
1466
+ if (message.definitionId !== "") {
1467
+ obj.definitionId = message.definitionId;
1468
+ }
1469
+ if (message.draftId !== "") {
1470
+ obj.draftId = message.draftId;
1471
+ }
1472
+ if (message.sequence !== 0) {
1473
+ obj.sequence = Math.round(message.sequence);
1474
+ }
1475
+ if (message.kind !== 0) {
1476
+ obj.kind = agentDraftEventKindToJSON(message.kind);
1477
+ }
1478
+ if (message.baseRevision !== 0) {
1479
+ obj.baseRevision = Math.round(message.baseRevision);
1480
+ }
1481
+ if (message.resultRevision !== 0) {
1482
+ obj.resultRevision = Math.round(message.resultRevision);
1483
+ }
1484
+ if ((_a = message.changedFields) === null || _a === void 0 ? void 0 : _a.length) {
1485
+ obj.changedFields = message.changedFields;
1486
+ }
1487
+ if (message.source !== "") {
1488
+ obj.source = message.source;
1489
+ }
1490
+ if (message.clientRequestId !== "") {
1491
+ obj.clientRequestId = message.clientRequestId;
1492
+ }
1493
+ if (message.conflict !== undefined) {
1494
+ obj.conflict = exports.AgentDraftPatchConflict.toJSON(message.conflict);
1495
+ }
1496
+ if (message.createdByUserId !== "") {
1497
+ obj.createdByUserId = message.createdByUserId;
1498
+ }
1499
+ if (message.createdAt !== undefined) {
1500
+ obj.createdAt = message.createdAt.toISOString();
1501
+ }
1502
+ return obj;
1503
+ },
1504
+ create(base) {
1505
+ return exports.AgentDraftEvent.fromPartial(base !== null && base !== void 0 ? base : {});
1506
+ },
1507
+ fromPartial(object) {
1508
+ var _a;
1509
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1510
+ const message = createBaseAgentDraftEvent();
1511
+ message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
1512
+ message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
1513
+ message.definitionId = (_d = object.definitionId) !== null && _d !== void 0 ? _d : "";
1514
+ message.draftId = (_e = object.draftId) !== null && _e !== void 0 ? _e : "";
1515
+ message.sequence = (_f = object.sequence) !== null && _f !== void 0 ? _f : 0;
1516
+ message.kind = (_g = object.kind) !== null && _g !== void 0 ? _g : 0;
1517
+ message.baseRevision = (_h = object.baseRevision) !== null && _h !== void 0 ? _h : 0;
1518
+ message.resultRevision = (_j = object.resultRevision) !== null && _j !== void 0 ? _j : 0;
1519
+ message.changedFields = ((_a = object.changedFields) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
1520
+ message.source = (_k = object.source) !== null && _k !== void 0 ? _k : "";
1521
+ message.clientRequestId = (_l = object.clientRequestId) !== null && _l !== void 0 ? _l : "";
1522
+ message.conflict = (object.conflict !== undefined && object.conflict !== null)
1523
+ ? exports.AgentDraftPatchConflict.fromPartial(object.conflict)
1524
+ : undefined;
1525
+ message.createdByUserId = (_m = object.createdByUserId) !== null && _m !== void 0 ? _m : "";
1526
+ message.createdAt = (_o = object.createdAt) !== null && _o !== void 0 ? _o : undefined;
1527
+ return message;
1528
+ },
1529
+ };
1095
1530
  function createBaseAgentVersion() {
1096
1531
  return {
1097
1532
  id: "",
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Observable } from "rxjs";
3
- import { AgentDefinition, AgentDefinitionStatus, AgentDraft, AgentPublishPlan, AgentRun, AgentRunEvent, AgentRunStatus, AgentToolDescriptor, AgentVersion } from "./agent.pb";
3
+ import { AgentDefinition, AgentDefinitionStatus, AgentDraft, AgentDraftEvent, AgentPublishPlan, AgentRun, AgentRunEvent, AgentRunStatus, AgentToolDescriptor, AgentVersion } from "./agent.pb";
4
4
  export declare const protobufPackage = "weaveapi.agent.v1";
5
5
  export interface CreateAgentDefinitionRequest {
6
6
  organizationId: string;
@@ -63,13 +63,24 @@ export interface UpdateAgentDraftRequest {
63
63
  metadata: {
64
64
  [key: string]: any;
65
65
  } | undefined;
66
+ /** @deprecated */
66
67
  patch: {
67
68
  [key: string]: any;
68
69
  } | undefined;
70
+ source: string;
71
+ clientRequestId: string;
69
72
  }
70
73
  export interface UpdateAgentDraftResponse {
71
74
  draft: AgentDraft | undefined;
72
75
  }
76
+ export interface WatchAgentDraftEventsRequest {
77
+ organizationId: string;
78
+ agentDefinitionId: string;
79
+ afterSequence: number;
80
+ }
81
+ export interface WatchAgentDraftEventsResponse {
82
+ event: AgentDraftEvent | undefined;
83
+ }
73
84
  export interface PlanAgentPublishRequest {
74
85
  organizationId: string;
75
86
  agentDefinitionId: string;
@@ -150,6 +161,8 @@ export declare const ListAgentDefinitionsRequest: MessageFns<ListAgentDefinition
150
161
  export declare const ListAgentDefinitionsResponse: MessageFns<ListAgentDefinitionsResponse>;
151
162
  export declare const UpdateAgentDraftRequest: MessageFns<UpdateAgentDraftRequest>;
152
163
  export declare const UpdateAgentDraftResponse: MessageFns<UpdateAgentDraftResponse>;
164
+ export declare const WatchAgentDraftEventsRequest: MessageFns<WatchAgentDraftEventsRequest>;
165
+ export declare const WatchAgentDraftEventsResponse: MessageFns<WatchAgentDraftEventsResponse>;
153
166
  export declare const PlanAgentPublishRequest: MessageFns<PlanAgentPublishRequest>;
154
167
  export declare const PlanAgentPublishResponse: MessageFns<PlanAgentPublishResponse>;
155
168
  export declare const PublishAgentDefinitionRequest: MessageFns<PublishAgentDefinitionRequest>;
@@ -171,6 +184,7 @@ export interface AgentService {
171
184
  GetAgentDefinition(request: GetAgentDefinitionRequest): Promise<GetAgentDefinitionResponse>;
172
185
  ListAgentDefinitions(request: ListAgentDefinitionsRequest): Promise<ListAgentDefinitionsResponse>;
173
186
  UpdateAgentDraft(request: UpdateAgentDraftRequest): Promise<UpdateAgentDraftResponse>;
187
+ WatchAgentDraftEvents(request: WatchAgentDraftEventsRequest): Observable<WatchAgentDraftEventsResponse>;
174
188
  PlanAgentPublish(request: PlanAgentPublishRequest): Promise<PlanAgentPublishResponse>;
175
189
  PublishAgentDefinition(request: PublishAgentDefinitionRequest): Promise<PublishAgentDefinitionResponse>;
176
190
  GetAgentVersion(request: GetAgentVersionRequest): Promise<GetAgentVersionResponse>;
@@ -191,6 +205,7 @@ export declare class AgentServiceClientImpl implements AgentService {
191
205
  GetAgentDefinition(request: GetAgentDefinitionRequest): Promise<GetAgentDefinitionResponse>;
192
206
  ListAgentDefinitions(request: ListAgentDefinitionsRequest): Promise<ListAgentDefinitionsResponse>;
193
207
  UpdateAgentDraft(request: UpdateAgentDraftRequest): Promise<UpdateAgentDraftResponse>;
208
+ WatchAgentDraftEvents(request: WatchAgentDraftEventsRequest): Observable<WatchAgentDraftEventsResponse>;
194
209
  PlanAgentPublish(request: PlanAgentPublishRequest): Promise<PlanAgentPublishResponse>;
195
210
  PublishAgentDefinition(request: PublishAgentDefinitionRequest): Promise<PublishAgentDefinitionResponse>;
196
211
  GetAgentVersion(request: GetAgentVersionRequest): Promise<GetAgentVersionResponse>;
@@ -253,6 +268,14 @@ export declare const AgentServiceDefinition: {
253
268
  };
254
269
  };
255
270
  };
271
+ readonly watchAgentDraftEvents: {
272
+ readonly name: "WatchAgentDraftEvents";
273
+ readonly requestType: typeof WatchAgentDraftEventsRequest;
274
+ readonly requestStream: false;
275
+ readonly responseType: typeof WatchAgentDraftEventsResponse;
276
+ readonly responseStream: true;
277
+ readonly options: {};
278
+ };
256
279
  readonly planAgentPublish: {
257
280
  readonly name: "PlanAgentPublish";
258
281
  readonly requestType: typeof PlanAgentPublishRequest;