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
@@ -5,1004 +5,67 @@
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.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
- exports.agentDefinitionStatusFromJSON = agentDefinitionStatusFromJSON;
10
- exports.agentDefinitionStatusToJSON = agentDefinitionStatusToJSON;
11
- exports.agentToolDescriptorKindFromJSON = agentToolDescriptorKindFromJSON;
12
- exports.agentToolDescriptorKindToJSON = agentToolDescriptorKindToJSON;
13
- exports.agentToolApprovalModeFromJSON = agentToolApprovalModeFromJSON;
14
- exports.agentToolApprovalModeToJSON = agentToolApprovalModeToJSON;
15
- exports.agentRunStatusFromJSON = agentRunStatusFromJSON;
16
- exports.agentRunStatusToJSON = agentRunStatusToJSON;
17
- exports.agentRunEventKindFromJSON = agentRunEventKindFromJSON;
18
- exports.agentRunEventKindToJSON = agentRunEventKindToJSON;
19
- exports.agentDraftEventKindFromJSON = agentDraftEventKindFromJSON;
20
- exports.agentDraftEventKindToJSON = agentDraftEventKindToJSON;
8
+ exports.AgentServiceDefinition = exports.AgentServiceClientImpl = exports.AgentServiceServiceName = exports.Agent = exports.AgentInput = exports.ListAgentsResponse = exports.ListAgentsRequest = exports.UpdateAgentResponse = exports.UpdateAgentRequest = exports.GetAgentResponse = exports.GetAgentRequest = exports.CreateAgentResponse = exports.CreateAgentRequest = exports.IncludeContents = exports.protobufPackage = void 0;
9
+ exports.includeContentsFromJSON = includeContentsFromJSON;
10
+ exports.includeContentsToJSON = includeContentsToJSON;
21
11
  /* eslint-disable */
22
12
  const wire_1 = require("@bufbuild/protobuf/wire");
23
13
  const struct_pb_1 = require("../../../google/protobuf/struct.pb");
24
- const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
14
+ const generate_pb_1 = require("../../inference/v1/generate.pb");
15
+ const model_pb_1 = require("../../inference/v1/model.pb");
16
+ const tool_pb_1 = require("../../tool/v1/tool.pb");
25
17
  exports.protobufPackage = "weaveapi.agent.v1";
26
- var AgentDefinitionStatus;
27
- (function (AgentDefinitionStatus) {
28
- AgentDefinitionStatus[AgentDefinitionStatus["AGENT_DEFINITION_STATUS_UNSPECIFIED"] = 0] = "AGENT_DEFINITION_STATUS_UNSPECIFIED";
29
- AgentDefinitionStatus[AgentDefinitionStatus["AGENT_DEFINITION_STATUS_ACTIVE"] = 1] = "AGENT_DEFINITION_STATUS_ACTIVE";
30
- AgentDefinitionStatus[AgentDefinitionStatus["AGENT_DEFINITION_STATUS_ARCHIVED"] = 2] = "AGENT_DEFINITION_STATUS_ARCHIVED";
31
- AgentDefinitionStatus[AgentDefinitionStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
32
- })(AgentDefinitionStatus || (exports.AgentDefinitionStatus = AgentDefinitionStatus = {}));
33
- function agentDefinitionStatusFromJSON(object) {
18
+ var IncludeContents;
19
+ (function (IncludeContents) {
20
+ IncludeContents[IncludeContents["INCLUDE_CONTENTS_UNSPECIFIED"] = 0] = "INCLUDE_CONTENTS_UNSPECIFIED";
21
+ IncludeContents[IncludeContents["INCLUDE_CONTENTS_DEFAULT"] = 1] = "INCLUDE_CONTENTS_DEFAULT";
22
+ IncludeContents[IncludeContents["INCLUDE_CONTENTS_NONE"] = 2] = "INCLUDE_CONTENTS_NONE";
23
+ IncludeContents[IncludeContents["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
24
+ })(IncludeContents || (exports.IncludeContents = IncludeContents = {}));
25
+ function includeContentsFromJSON(object) {
34
26
  switch (object) {
35
27
  case 0:
36
- case "AGENT_DEFINITION_STATUS_UNSPECIFIED":
37
- return AgentDefinitionStatus.AGENT_DEFINITION_STATUS_UNSPECIFIED;
28
+ case "INCLUDE_CONTENTS_UNSPECIFIED":
29
+ return IncludeContents.INCLUDE_CONTENTS_UNSPECIFIED;
38
30
  case 1:
39
- case "AGENT_DEFINITION_STATUS_ACTIVE":
40
- return AgentDefinitionStatus.AGENT_DEFINITION_STATUS_ACTIVE;
31
+ case "INCLUDE_CONTENTS_DEFAULT":
32
+ return IncludeContents.INCLUDE_CONTENTS_DEFAULT;
41
33
  case 2:
42
- case "AGENT_DEFINITION_STATUS_ARCHIVED":
43
- return AgentDefinitionStatus.AGENT_DEFINITION_STATUS_ARCHIVED;
34
+ case "INCLUDE_CONTENTS_NONE":
35
+ return IncludeContents.INCLUDE_CONTENTS_NONE;
44
36
  case -1:
45
37
  case "UNRECOGNIZED":
46
38
  default:
47
- return AgentDefinitionStatus.UNRECOGNIZED;
39
+ return IncludeContents.UNRECOGNIZED;
48
40
  }
49
41
  }
50
- function agentDefinitionStatusToJSON(object) {
42
+ function includeContentsToJSON(object) {
51
43
  switch (object) {
52
- case AgentDefinitionStatus.AGENT_DEFINITION_STATUS_UNSPECIFIED:
53
- return "AGENT_DEFINITION_STATUS_UNSPECIFIED";
54
- case AgentDefinitionStatus.AGENT_DEFINITION_STATUS_ACTIVE:
55
- return "AGENT_DEFINITION_STATUS_ACTIVE";
56
- case AgentDefinitionStatus.AGENT_DEFINITION_STATUS_ARCHIVED:
57
- return "AGENT_DEFINITION_STATUS_ARCHIVED";
58
- case AgentDefinitionStatus.UNRECOGNIZED:
44
+ case IncludeContents.INCLUDE_CONTENTS_UNSPECIFIED:
45
+ return "INCLUDE_CONTENTS_UNSPECIFIED";
46
+ case IncludeContents.INCLUDE_CONTENTS_DEFAULT:
47
+ return "INCLUDE_CONTENTS_DEFAULT";
48
+ case IncludeContents.INCLUDE_CONTENTS_NONE:
49
+ return "INCLUDE_CONTENTS_NONE";
50
+ case IncludeContents.UNRECOGNIZED:
59
51
  default:
60
52
  return "UNRECOGNIZED";
61
53
  }
62
54
  }
63
- var AgentToolDescriptorKind;
64
- (function (AgentToolDescriptorKind) {
65
- AgentToolDescriptorKind[AgentToolDescriptorKind["AGENT_TOOL_DESCRIPTOR_KIND_UNSPECIFIED"] = 0] = "AGENT_TOOL_DESCRIPTOR_KIND_UNSPECIFIED";
66
- AgentToolDescriptorKind[AgentToolDescriptorKind["AGENT_TOOL_DESCRIPTOR_KIND_WEAVE_SERVICE"] = 1] = "AGENT_TOOL_DESCRIPTOR_KIND_WEAVE_SERVICE";
67
- AgentToolDescriptorKind[AgentToolDescriptorKind["AGENT_TOOL_DESCRIPTOR_KIND_AGENT"] = 2] = "AGENT_TOOL_DESCRIPTOR_KIND_AGENT";
68
- AgentToolDescriptorKind[AgentToolDescriptorKind["AGENT_TOOL_DESCRIPTOR_KIND_WORKFLOW"] = 3] = "AGENT_TOOL_DESCRIPTOR_KIND_WORKFLOW";
69
- AgentToolDescriptorKind[AgentToolDescriptorKind["AGENT_TOOL_DESCRIPTOR_KIND_EXTERNAL"] = 4] = "AGENT_TOOL_DESCRIPTOR_KIND_EXTERNAL";
70
- AgentToolDescriptorKind[AgentToolDescriptorKind["AGENT_TOOL_DESCRIPTOR_KIND_MCP"] = 5] = "AGENT_TOOL_DESCRIPTOR_KIND_MCP";
71
- AgentToolDescriptorKind[AgentToolDescriptorKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
72
- })(AgentToolDescriptorKind || (exports.AgentToolDescriptorKind = AgentToolDescriptorKind = {}));
73
- function agentToolDescriptorKindFromJSON(object) {
74
- switch (object) {
75
- case 0:
76
- case "AGENT_TOOL_DESCRIPTOR_KIND_UNSPECIFIED":
77
- return AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_UNSPECIFIED;
78
- case 1:
79
- case "AGENT_TOOL_DESCRIPTOR_KIND_WEAVE_SERVICE":
80
- return AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_WEAVE_SERVICE;
81
- case 2:
82
- case "AGENT_TOOL_DESCRIPTOR_KIND_AGENT":
83
- return AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_AGENT;
84
- case 3:
85
- case "AGENT_TOOL_DESCRIPTOR_KIND_WORKFLOW":
86
- return AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_WORKFLOW;
87
- case 4:
88
- case "AGENT_TOOL_DESCRIPTOR_KIND_EXTERNAL":
89
- return AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_EXTERNAL;
90
- case 5:
91
- case "AGENT_TOOL_DESCRIPTOR_KIND_MCP":
92
- return AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_MCP;
93
- case -1:
94
- case "UNRECOGNIZED":
95
- default:
96
- return AgentToolDescriptorKind.UNRECOGNIZED;
97
- }
98
- }
99
- function agentToolDescriptorKindToJSON(object) {
100
- switch (object) {
101
- case AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_UNSPECIFIED:
102
- return "AGENT_TOOL_DESCRIPTOR_KIND_UNSPECIFIED";
103
- case AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_WEAVE_SERVICE:
104
- return "AGENT_TOOL_DESCRIPTOR_KIND_WEAVE_SERVICE";
105
- case AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_AGENT:
106
- return "AGENT_TOOL_DESCRIPTOR_KIND_AGENT";
107
- case AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_WORKFLOW:
108
- return "AGENT_TOOL_DESCRIPTOR_KIND_WORKFLOW";
109
- case AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_EXTERNAL:
110
- return "AGENT_TOOL_DESCRIPTOR_KIND_EXTERNAL";
111
- case AgentToolDescriptorKind.AGENT_TOOL_DESCRIPTOR_KIND_MCP:
112
- return "AGENT_TOOL_DESCRIPTOR_KIND_MCP";
113
- case AgentToolDescriptorKind.UNRECOGNIZED:
114
- default:
115
- return "UNRECOGNIZED";
116
- }
117
- }
118
- var AgentToolApprovalMode;
119
- (function (AgentToolApprovalMode) {
120
- AgentToolApprovalMode[AgentToolApprovalMode["AGENT_TOOL_APPROVAL_MODE_UNSPECIFIED"] = 0] = "AGENT_TOOL_APPROVAL_MODE_UNSPECIFIED";
121
- AgentToolApprovalMode[AgentToolApprovalMode["AGENT_TOOL_APPROVAL_MODE_NEVER"] = 1] = "AGENT_TOOL_APPROVAL_MODE_NEVER";
122
- AgentToolApprovalMode[AgentToolApprovalMode["AGENT_TOOL_APPROVAL_MODE_MUTATION"] = 2] = "AGENT_TOOL_APPROVAL_MODE_MUTATION";
123
- AgentToolApprovalMode[AgentToolApprovalMode["AGENT_TOOL_APPROVAL_MODE_ALWAYS"] = 3] = "AGENT_TOOL_APPROVAL_MODE_ALWAYS";
124
- AgentToolApprovalMode[AgentToolApprovalMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
125
- })(AgentToolApprovalMode || (exports.AgentToolApprovalMode = AgentToolApprovalMode = {}));
126
- function agentToolApprovalModeFromJSON(object) {
127
- switch (object) {
128
- case 0:
129
- case "AGENT_TOOL_APPROVAL_MODE_UNSPECIFIED":
130
- return AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_UNSPECIFIED;
131
- case 1:
132
- case "AGENT_TOOL_APPROVAL_MODE_NEVER":
133
- return AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_NEVER;
134
- case 2:
135
- case "AGENT_TOOL_APPROVAL_MODE_MUTATION":
136
- return AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_MUTATION;
137
- case 3:
138
- case "AGENT_TOOL_APPROVAL_MODE_ALWAYS":
139
- return AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_ALWAYS;
140
- case -1:
141
- case "UNRECOGNIZED":
142
- default:
143
- return AgentToolApprovalMode.UNRECOGNIZED;
144
- }
145
- }
146
- function agentToolApprovalModeToJSON(object) {
147
- switch (object) {
148
- case AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_UNSPECIFIED:
149
- return "AGENT_TOOL_APPROVAL_MODE_UNSPECIFIED";
150
- case AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_NEVER:
151
- return "AGENT_TOOL_APPROVAL_MODE_NEVER";
152
- case AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_MUTATION:
153
- return "AGENT_TOOL_APPROVAL_MODE_MUTATION";
154
- case AgentToolApprovalMode.AGENT_TOOL_APPROVAL_MODE_ALWAYS:
155
- return "AGENT_TOOL_APPROVAL_MODE_ALWAYS";
156
- case AgentToolApprovalMode.UNRECOGNIZED:
157
- default:
158
- return "UNRECOGNIZED";
159
- }
160
- }
161
- var AgentRunStatus;
162
- (function (AgentRunStatus) {
163
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_UNSPECIFIED"] = 0] = "AGENT_RUN_STATUS_UNSPECIFIED";
164
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_PENDING"] = 1] = "AGENT_RUN_STATUS_PENDING";
165
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_RUNNING"] = 2] = "AGENT_RUN_STATUS_RUNNING";
166
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_WAITING"] = 3] = "AGENT_RUN_STATUS_WAITING";
167
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_COMPLETED"] = 4] = "AGENT_RUN_STATUS_COMPLETED";
168
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_FAILED"] = 5] = "AGENT_RUN_STATUS_FAILED";
169
- AgentRunStatus[AgentRunStatus["AGENT_RUN_STATUS_CANCELED"] = 6] = "AGENT_RUN_STATUS_CANCELED";
170
- AgentRunStatus[AgentRunStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
171
- })(AgentRunStatus || (exports.AgentRunStatus = AgentRunStatus = {}));
172
- function agentRunStatusFromJSON(object) {
173
- switch (object) {
174
- case 0:
175
- case "AGENT_RUN_STATUS_UNSPECIFIED":
176
- return AgentRunStatus.AGENT_RUN_STATUS_UNSPECIFIED;
177
- case 1:
178
- case "AGENT_RUN_STATUS_PENDING":
179
- return AgentRunStatus.AGENT_RUN_STATUS_PENDING;
180
- case 2:
181
- case "AGENT_RUN_STATUS_RUNNING":
182
- return AgentRunStatus.AGENT_RUN_STATUS_RUNNING;
183
- case 3:
184
- case "AGENT_RUN_STATUS_WAITING":
185
- return AgentRunStatus.AGENT_RUN_STATUS_WAITING;
186
- case 4:
187
- case "AGENT_RUN_STATUS_COMPLETED":
188
- return AgentRunStatus.AGENT_RUN_STATUS_COMPLETED;
189
- case 5:
190
- case "AGENT_RUN_STATUS_FAILED":
191
- return AgentRunStatus.AGENT_RUN_STATUS_FAILED;
192
- case 6:
193
- case "AGENT_RUN_STATUS_CANCELED":
194
- return AgentRunStatus.AGENT_RUN_STATUS_CANCELED;
195
- case -1:
196
- case "UNRECOGNIZED":
197
- default:
198
- return AgentRunStatus.UNRECOGNIZED;
199
- }
200
- }
201
- function agentRunStatusToJSON(object) {
202
- switch (object) {
203
- case AgentRunStatus.AGENT_RUN_STATUS_UNSPECIFIED:
204
- return "AGENT_RUN_STATUS_UNSPECIFIED";
205
- case AgentRunStatus.AGENT_RUN_STATUS_PENDING:
206
- return "AGENT_RUN_STATUS_PENDING";
207
- case AgentRunStatus.AGENT_RUN_STATUS_RUNNING:
208
- return "AGENT_RUN_STATUS_RUNNING";
209
- case AgentRunStatus.AGENT_RUN_STATUS_WAITING:
210
- return "AGENT_RUN_STATUS_WAITING";
211
- case AgentRunStatus.AGENT_RUN_STATUS_COMPLETED:
212
- return "AGENT_RUN_STATUS_COMPLETED";
213
- case AgentRunStatus.AGENT_RUN_STATUS_FAILED:
214
- return "AGENT_RUN_STATUS_FAILED";
215
- case AgentRunStatus.AGENT_RUN_STATUS_CANCELED:
216
- return "AGENT_RUN_STATUS_CANCELED";
217
- case AgentRunStatus.UNRECOGNIZED:
218
- default:
219
- return "UNRECOGNIZED";
220
- }
221
- }
222
- var AgentRunEventKind;
223
- (function (AgentRunEventKind) {
224
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_UNSPECIFIED"] = 0] = "AGENT_RUN_EVENT_KIND_UNSPECIFIED";
225
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_STARTED"] = 1] = "AGENT_RUN_EVENT_KIND_STARTED";
226
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_MODEL_REQUESTED"] = 2] = "AGENT_RUN_EVENT_KIND_MODEL_REQUESTED";
227
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_MODEL_RESPONDED"] = 3] = "AGENT_RUN_EVENT_KIND_MODEL_RESPONDED";
228
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_TOOL_CALL_PROPOSED"] = 4] = "AGENT_RUN_EVENT_KIND_TOOL_CALL_PROPOSED";
229
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_TOOL_CALL_STARTED"] = 5] = "AGENT_RUN_EVENT_KIND_TOOL_CALL_STARTED";
230
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_TOOL_CALL_COMPLETED"] = 6] = "AGENT_RUN_EVENT_KIND_TOOL_CALL_COMPLETED";
231
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_TOOL_CALL_FAILED"] = 7] = "AGENT_RUN_EVENT_KIND_TOOL_CALL_FAILED";
232
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_WAITING"] = 8] = "AGENT_RUN_EVENT_KIND_WAITING";
233
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_COMPLETED"] = 9] = "AGENT_RUN_EVENT_KIND_COMPLETED";
234
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_FAILED"] = 10] = "AGENT_RUN_EVENT_KIND_FAILED";
235
- AgentRunEventKind[AgentRunEventKind["AGENT_RUN_EVENT_KIND_CANCELED"] = 11] = "AGENT_RUN_EVENT_KIND_CANCELED";
236
- AgentRunEventKind[AgentRunEventKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
237
- })(AgentRunEventKind || (exports.AgentRunEventKind = AgentRunEventKind = {}));
238
- function agentRunEventKindFromJSON(object) {
239
- switch (object) {
240
- case 0:
241
- case "AGENT_RUN_EVENT_KIND_UNSPECIFIED":
242
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_UNSPECIFIED;
243
- case 1:
244
- case "AGENT_RUN_EVENT_KIND_STARTED":
245
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_STARTED;
246
- case 2:
247
- case "AGENT_RUN_EVENT_KIND_MODEL_REQUESTED":
248
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_MODEL_REQUESTED;
249
- case 3:
250
- case "AGENT_RUN_EVENT_KIND_MODEL_RESPONDED":
251
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_MODEL_RESPONDED;
252
- case 4:
253
- case "AGENT_RUN_EVENT_KIND_TOOL_CALL_PROPOSED":
254
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_PROPOSED;
255
- case 5:
256
- case "AGENT_RUN_EVENT_KIND_TOOL_CALL_STARTED":
257
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_STARTED;
258
- case 6:
259
- case "AGENT_RUN_EVENT_KIND_TOOL_CALL_COMPLETED":
260
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_COMPLETED;
261
- case 7:
262
- case "AGENT_RUN_EVENT_KIND_TOOL_CALL_FAILED":
263
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_FAILED;
264
- case 8:
265
- case "AGENT_RUN_EVENT_KIND_WAITING":
266
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_WAITING;
267
- case 9:
268
- case "AGENT_RUN_EVENT_KIND_COMPLETED":
269
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_COMPLETED;
270
- case 10:
271
- case "AGENT_RUN_EVENT_KIND_FAILED":
272
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_FAILED;
273
- case 11:
274
- case "AGENT_RUN_EVENT_KIND_CANCELED":
275
- return AgentRunEventKind.AGENT_RUN_EVENT_KIND_CANCELED;
276
- case -1:
277
- case "UNRECOGNIZED":
278
- default:
279
- return AgentRunEventKind.UNRECOGNIZED;
280
- }
281
- }
282
- function agentRunEventKindToJSON(object) {
283
- switch (object) {
284
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_UNSPECIFIED:
285
- return "AGENT_RUN_EVENT_KIND_UNSPECIFIED";
286
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_STARTED:
287
- return "AGENT_RUN_EVENT_KIND_STARTED";
288
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_MODEL_REQUESTED:
289
- return "AGENT_RUN_EVENT_KIND_MODEL_REQUESTED";
290
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_MODEL_RESPONDED:
291
- return "AGENT_RUN_EVENT_KIND_MODEL_RESPONDED";
292
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_PROPOSED:
293
- return "AGENT_RUN_EVENT_KIND_TOOL_CALL_PROPOSED";
294
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_STARTED:
295
- return "AGENT_RUN_EVENT_KIND_TOOL_CALL_STARTED";
296
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_COMPLETED:
297
- return "AGENT_RUN_EVENT_KIND_TOOL_CALL_COMPLETED";
298
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_TOOL_CALL_FAILED:
299
- return "AGENT_RUN_EVENT_KIND_TOOL_CALL_FAILED";
300
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_WAITING:
301
- return "AGENT_RUN_EVENT_KIND_WAITING";
302
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_COMPLETED:
303
- return "AGENT_RUN_EVENT_KIND_COMPLETED";
304
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_FAILED:
305
- return "AGENT_RUN_EVENT_KIND_FAILED";
306
- case AgentRunEventKind.AGENT_RUN_EVENT_KIND_CANCELED:
307
- return "AGENT_RUN_EVENT_KIND_CANCELED";
308
- case AgentRunEventKind.UNRECOGNIZED:
309
- default:
310
- return "UNRECOGNIZED";
311
- }
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
- }
350
- function createBaseAgentDefinition() {
351
- return {
352
- id: "",
353
- organizationId: "",
354
- slug: "",
355
- name: "",
356
- description: "",
357
- status: 0,
358
- createdByUserId: "",
359
- draftRevision: 0,
360
- latestVersionId: "",
361
- latestVersion: 0,
362
- createdAt: undefined,
363
- updatedAt: undefined,
364
- };
365
- }
366
- exports.AgentDefinition = {
367
- encode(message, writer = new wire_1.BinaryWriter()) {
368
- if (message.id !== "") {
369
- writer.uint32(10).string(message.id);
370
- }
371
- if (message.organizationId !== "") {
372
- writer.uint32(18).string(message.organizationId);
373
- }
374
- if (message.slug !== "") {
375
- writer.uint32(26).string(message.slug);
376
- }
377
- if (message.name !== "") {
378
- writer.uint32(34).string(message.name);
379
- }
380
- if (message.description !== "") {
381
- writer.uint32(42).string(message.description);
382
- }
383
- if (message.status !== 0) {
384
- writer.uint32(48).int32(message.status);
385
- }
386
- if (message.createdByUserId !== "") {
387
- writer.uint32(58).string(message.createdByUserId);
388
- }
389
- if (message.draftRevision !== 0) {
390
- writer.uint32(64).int32(message.draftRevision);
391
- }
392
- if (message.latestVersionId !== "") {
393
- writer.uint32(74).string(message.latestVersionId);
394
- }
395
- if (message.latestVersion !== 0) {
396
- writer.uint32(80).int32(message.latestVersion);
397
- }
398
- if (message.createdAt !== undefined) {
399
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
400
- }
401
- if (message.updatedAt !== undefined) {
402
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
403
- }
404
- return writer;
405
- },
406
- decode(input, length) {
407
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
408
- const end = length === undefined ? reader.len : reader.pos + length;
409
- const message = createBaseAgentDefinition();
410
- while (reader.pos < end) {
411
- const tag = reader.uint32();
412
- switch (tag >>> 3) {
413
- case 1: {
414
- if (tag !== 10) {
415
- break;
416
- }
417
- message.id = reader.string();
418
- continue;
419
- }
420
- case 2: {
421
- if (tag !== 18) {
422
- break;
423
- }
424
- message.organizationId = reader.string();
425
- continue;
426
- }
427
- case 3: {
428
- if (tag !== 26) {
429
- break;
430
- }
431
- message.slug = reader.string();
432
- continue;
433
- }
434
- case 4: {
435
- if (tag !== 34) {
436
- break;
437
- }
438
- message.name = reader.string();
439
- continue;
440
- }
441
- case 5: {
442
- if (tag !== 42) {
443
- break;
444
- }
445
- message.description = reader.string();
446
- continue;
447
- }
448
- case 6: {
449
- if (tag !== 48) {
450
- break;
451
- }
452
- message.status = reader.int32();
453
- continue;
454
- }
455
- case 7: {
456
- if (tag !== 58) {
457
- break;
458
- }
459
- message.createdByUserId = reader.string();
460
- continue;
461
- }
462
- case 8: {
463
- if (tag !== 64) {
464
- break;
465
- }
466
- message.draftRevision = reader.int32();
467
- continue;
468
- }
469
- case 9: {
470
- if (tag !== 74) {
471
- break;
472
- }
473
- message.latestVersionId = reader.string();
474
- continue;
475
- }
476
- case 10: {
477
- if (tag !== 80) {
478
- break;
479
- }
480
- message.latestVersion = reader.int32();
481
- continue;
482
- }
483
- case 11: {
484
- if (tag !== 90) {
485
- break;
486
- }
487
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
488
- continue;
489
- }
490
- case 12: {
491
- if (tag !== 98) {
492
- break;
493
- }
494
- message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
495
- continue;
496
- }
497
- }
498
- if ((tag & 7) === 4 || tag === 0) {
499
- break;
500
- }
501
- reader.skip(tag & 7);
502
- }
503
- return message;
504
- },
505
- fromJSON(object) {
506
- return {
507
- id: isSet(object.id) ? globalThis.String(object.id) : "",
508
- organizationId: isSet(object.organizationId)
509
- ? globalThis.String(object.organizationId)
510
- : isSet(object.organization_id)
511
- ? globalThis.String(object.organization_id)
512
- : "",
513
- slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
514
- name: isSet(object.name) ? globalThis.String(object.name) : "",
515
- description: isSet(object.description) ? globalThis.String(object.description) : "",
516
- status: isSet(object.status) ? agentDefinitionStatusFromJSON(object.status) : 0,
517
- createdByUserId: isSet(object.createdByUserId)
518
- ? globalThis.String(object.createdByUserId)
519
- : isSet(object.created_by_user_id)
520
- ? globalThis.String(object.created_by_user_id)
521
- : "",
522
- draftRevision: isSet(object.draftRevision)
523
- ? globalThis.Number(object.draftRevision)
524
- : isSet(object.draft_revision)
525
- ? globalThis.Number(object.draft_revision)
526
- : 0,
527
- latestVersionId: isSet(object.latestVersionId)
528
- ? globalThis.String(object.latestVersionId)
529
- : isSet(object.latest_version_id)
530
- ? globalThis.String(object.latest_version_id)
531
- : "",
532
- latestVersion: isSet(object.latestVersion)
533
- ? globalThis.Number(object.latestVersion)
534
- : isSet(object.latest_version)
535
- ? globalThis.Number(object.latest_version)
536
- : 0,
537
- createdAt: isSet(object.createdAt)
538
- ? fromJsonTimestamp(object.createdAt)
539
- : isSet(object.created_at)
540
- ? fromJsonTimestamp(object.created_at)
541
- : undefined,
542
- updatedAt: isSet(object.updatedAt)
543
- ? fromJsonTimestamp(object.updatedAt)
544
- : isSet(object.updated_at)
545
- ? fromJsonTimestamp(object.updated_at)
546
- : undefined,
547
- };
548
- },
549
- toJSON(message) {
550
- const obj = {};
551
- if (message.id !== "") {
552
- obj.id = message.id;
553
- }
554
- if (message.organizationId !== "") {
555
- obj.organizationId = message.organizationId;
556
- }
557
- if (message.slug !== "") {
558
- obj.slug = message.slug;
559
- }
560
- if (message.name !== "") {
561
- obj.name = message.name;
562
- }
563
- if (message.description !== "") {
564
- obj.description = message.description;
565
- }
566
- if (message.status !== 0) {
567
- obj.status = agentDefinitionStatusToJSON(message.status);
568
- }
569
- if (message.createdByUserId !== "") {
570
- obj.createdByUserId = message.createdByUserId;
571
- }
572
- if (message.draftRevision !== 0) {
573
- obj.draftRevision = Math.round(message.draftRevision);
574
- }
575
- if (message.latestVersionId !== "") {
576
- obj.latestVersionId = message.latestVersionId;
577
- }
578
- if (message.latestVersion !== 0) {
579
- obj.latestVersion = Math.round(message.latestVersion);
580
- }
581
- if (message.createdAt !== undefined) {
582
- obj.createdAt = message.createdAt.toISOString();
583
- }
584
- if (message.updatedAt !== undefined) {
585
- obj.updatedAt = message.updatedAt.toISOString();
586
- }
587
- return obj;
588
- },
589
- create(base) {
590
- return exports.AgentDefinition.fromPartial(base !== null && base !== void 0 ? base : {});
591
- },
592
- fromPartial(object) {
593
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
594
- const message = createBaseAgentDefinition();
595
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
596
- message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
597
- message.slug = (_c = object.slug) !== null && _c !== void 0 ? _c : "";
598
- message.name = (_d = object.name) !== null && _d !== void 0 ? _d : "";
599
- message.description = (_e = object.description) !== null && _e !== void 0 ? _e : "";
600
- message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
601
- message.createdByUserId = (_g = object.createdByUserId) !== null && _g !== void 0 ? _g : "";
602
- message.draftRevision = (_h = object.draftRevision) !== null && _h !== void 0 ? _h : 0;
603
- message.latestVersionId = (_j = object.latestVersionId) !== null && _j !== void 0 ? _j : "";
604
- message.latestVersion = (_k = object.latestVersion) !== null && _k !== void 0 ? _k : 0;
605
- message.createdAt = (_l = object.createdAt) !== null && _l !== void 0 ? _l : undefined;
606
- message.updatedAt = (_m = object.updatedAt) !== null && _m !== void 0 ? _m : undefined;
607
- return message;
608
- },
609
- };
610
- function createBaseAgentDraft() {
611
- return {
612
- id: "",
613
- definitionId: "",
614
- organizationId: "",
615
- baseVersionId: "",
616
- revision: 0,
617
- name: "",
618
- description: "",
619
- instructions: "",
620
- modelId: "",
621
- providerConfigurationId: "",
622
- tools: [],
623
- inputSchema: undefined,
624
- outputSchema: undefined,
625
- metadata: undefined,
626
- updatedByUserId: "",
627
- createdAt: undefined,
628
- updatedAt: undefined,
629
- };
630
- }
631
- exports.AgentDraft = {
632
- encode(message, writer = new wire_1.BinaryWriter()) {
633
- if (message.id !== "") {
634
- writer.uint32(10).string(message.id);
635
- }
636
- if (message.definitionId !== "") {
637
- writer.uint32(18).string(message.definitionId);
638
- }
639
- if (message.organizationId !== "") {
640
- writer.uint32(26).string(message.organizationId);
641
- }
642
- if (message.baseVersionId !== "") {
643
- writer.uint32(34).string(message.baseVersionId);
644
- }
645
- if (message.revision !== 0) {
646
- writer.uint32(40).int32(message.revision);
647
- }
648
- if (message.name !== "") {
649
- writer.uint32(50).string(message.name);
650
- }
651
- if (message.description !== "") {
652
- writer.uint32(58).string(message.description);
653
- }
654
- if (message.instructions !== "") {
655
- writer.uint32(66).string(message.instructions);
656
- }
657
- if (message.modelId !== "") {
658
- writer.uint32(74).string(message.modelId);
659
- }
660
- if (message.providerConfigurationId !== "") {
661
- writer.uint32(82).string(message.providerConfigurationId);
662
- }
663
- for (const v of message.tools) {
664
- exports.AgentToolDescriptor.encode(v, writer.uint32(90).fork()).join();
665
- }
666
- if (message.inputSchema !== undefined) {
667
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(98).fork()).join();
668
- }
669
- if (message.outputSchema !== undefined) {
670
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(106).fork()).join();
671
- }
672
- if (message.metadata !== undefined) {
673
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(114).fork()).join();
674
- }
675
- if (message.updatedByUserId !== "") {
676
- writer.uint32(122).string(message.updatedByUserId);
677
- }
678
- if (message.createdAt !== undefined) {
679
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(130).fork()).join();
680
- }
681
- if (message.updatedAt !== undefined) {
682
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(138).fork()).join();
683
- }
684
- return writer;
685
- },
686
- decode(input, length) {
687
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
688
- const end = length === undefined ? reader.len : reader.pos + length;
689
- const message = createBaseAgentDraft();
690
- while (reader.pos < end) {
691
- const tag = reader.uint32();
692
- switch (tag >>> 3) {
693
- case 1: {
694
- if (tag !== 10) {
695
- break;
696
- }
697
- message.id = reader.string();
698
- continue;
699
- }
700
- case 2: {
701
- if (tag !== 18) {
702
- break;
703
- }
704
- message.definitionId = reader.string();
705
- continue;
706
- }
707
- case 3: {
708
- if (tag !== 26) {
709
- break;
710
- }
711
- message.organizationId = reader.string();
712
- continue;
713
- }
714
- case 4: {
715
- if (tag !== 34) {
716
- break;
717
- }
718
- message.baseVersionId = reader.string();
719
- continue;
720
- }
721
- case 5: {
722
- if (tag !== 40) {
723
- break;
724
- }
725
- message.revision = reader.int32();
726
- continue;
727
- }
728
- case 6: {
729
- if (tag !== 50) {
730
- break;
731
- }
732
- message.name = reader.string();
733
- continue;
734
- }
735
- case 7: {
736
- if (tag !== 58) {
737
- break;
738
- }
739
- message.description = reader.string();
740
- continue;
741
- }
742
- case 8: {
743
- if (tag !== 66) {
744
- break;
745
- }
746
- message.instructions = reader.string();
747
- continue;
748
- }
749
- case 9: {
750
- if (tag !== 74) {
751
- break;
752
- }
753
- message.modelId = reader.string();
754
- continue;
755
- }
756
- case 10: {
757
- if (tag !== 82) {
758
- break;
759
- }
760
- message.providerConfigurationId = reader.string();
761
- continue;
762
- }
763
- case 11: {
764
- if (tag !== 90) {
765
- break;
766
- }
767
- message.tools.push(exports.AgentToolDescriptor.decode(reader, reader.uint32()));
768
- continue;
769
- }
770
- case 12: {
771
- if (tag !== 98) {
772
- break;
773
- }
774
- message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
775
- continue;
776
- }
777
- case 13: {
778
- if (tag !== 106) {
779
- break;
780
- }
781
- message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
782
- continue;
783
- }
784
- case 14: {
785
- if (tag !== 114) {
786
- break;
787
- }
788
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
789
- continue;
790
- }
791
- case 15: {
792
- if (tag !== 122) {
793
- break;
794
- }
795
- message.updatedByUserId = reader.string();
796
- continue;
797
- }
798
- case 16: {
799
- if (tag !== 130) {
800
- break;
801
- }
802
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
803
- continue;
804
- }
805
- case 17: {
806
- if (tag !== 138) {
807
- break;
808
- }
809
- message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
810
- continue;
811
- }
812
- }
813
- if ((tag & 7) === 4 || tag === 0) {
814
- break;
815
- }
816
- reader.skip(tag & 7);
817
- }
818
- return message;
819
- },
820
- fromJSON(object) {
821
- return {
822
- id: isSet(object.id) ? globalThis.String(object.id) : "",
823
- definitionId: isSet(object.definitionId)
824
- ? globalThis.String(object.definitionId)
825
- : isSet(object.definition_id)
826
- ? globalThis.String(object.definition_id)
827
- : "",
828
- organizationId: isSet(object.organizationId)
829
- ? globalThis.String(object.organizationId)
830
- : isSet(object.organization_id)
831
- ? globalThis.String(object.organization_id)
832
- : "",
833
- baseVersionId: isSet(object.baseVersionId)
834
- ? globalThis.String(object.baseVersionId)
835
- : isSet(object.base_version_id)
836
- ? globalThis.String(object.base_version_id)
837
- : "",
838
- revision: isSet(object.revision) ? globalThis.Number(object.revision) : 0,
839
- name: isSet(object.name) ? globalThis.String(object.name) : "",
840
- description: isSet(object.description) ? globalThis.String(object.description) : "",
841
- instructions: isSet(object.instructions) ? globalThis.String(object.instructions) : "",
842
- modelId: isSet(object.modelId)
843
- ? globalThis.String(object.modelId)
844
- : isSet(object.model_id)
845
- ? globalThis.String(object.model_id)
846
- : "",
847
- providerConfigurationId: isSet(object.providerConfigurationId)
848
- ? globalThis.String(object.providerConfigurationId)
849
- : isSet(object.provider_configuration_id)
850
- ? globalThis.String(object.provider_configuration_id)
851
- : "",
852
- tools: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tools)
853
- ? object.tools.map((e) => exports.AgentToolDescriptor.fromJSON(e))
854
- : [],
855
- inputSchema: isObject(object.inputSchema)
856
- ? object.inputSchema
857
- : isObject(object.input_schema)
858
- ? object.input_schema
859
- : undefined,
860
- outputSchema: isObject(object.outputSchema)
861
- ? object.outputSchema
862
- : isObject(object.output_schema)
863
- ? object.output_schema
864
- : undefined,
865
- metadata: isObject(object.metadata) ? object.metadata : undefined,
866
- updatedByUserId: isSet(object.updatedByUserId)
867
- ? globalThis.String(object.updatedByUserId)
868
- : isSet(object.updated_by_user_id)
869
- ? globalThis.String(object.updated_by_user_id)
870
- : "",
871
- createdAt: isSet(object.createdAt)
872
- ? fromJsonTimestamp(object.createdAt)
873
- : isSet(object.created_at)
874
- ? fromJsonTimestamp(object.created_at)
875
- : undefined,
876
- updatedAt: isSet(object.updatedAt)
877
- ? fromJsonTimestamp(object.updatedAt)
878
- : isSet(object.updated_at)
879
- ? fromJsonTimestamp(object.updated_at)
880
- : undefined,
881
- };
882
- },
883
- toJSON(message) {
884
- var _a;
885
- const obj = {};
886
- if (message.id !== "") {
887
- obj.id = message.id;
888
- }
889
- if (message.definitionId !== "") {
890
- obj.definitionId = message.definitionId;
891
- }
892
- if (message.organizationId !== "") {
893
- obj.organizationId = message.organizationId;
894
- }
895
- if (message.baseVersionId !== "") {
896
- obj.baseVersionId = message.baseVersionId;
897
- }
898
- if (message.revision !== 0) {
899
- obj.revision = Math.round(message.revision);
900
- }
901
- if (message.name !== "") {
902
- obj.name = message.name;
903
- }
904
- if (message.description !== "") {
905
- obj.description = message.description;
906
- }
907
- if (message.instructions !== "") {
908
- obj.instructions = message.instructions;
909
- }
910
- if (message.modelId !== "") {
911
- obj.modelId = message.modelId;
912
- }
913
- if (message.providerConfigurationId !== "") {
914
- obj.providerConfigurationId = message.providerConfigurationId;
915
- }
916
- if ((_a = message.tools) === null || _a === void 0 ? void 0 : _a.length) {
917
- obj.tools = message.tools.map((e) => exports.AgentToolDescriptor.toJSON(e));
918
- }
919
- if (message.inputSchema !== undefined) {
920
- obj.inputSchema = message.inputSchema;
921
- }
922
- if (message.outputSchema !== undefined) {
923
- obj.outputSchema = message.outputSchema;
924
- }
925
- if (message.metadata !== undefined) {
926
- obj.metadata = message.metadata;
927
- }
928
- if (message.updatedByUserId !== "") {
929
- obj.updatedByUserId = message.updatedByUserId;
930
- }
931
- if (message.createdAt !== undefined) {
932
- obj.createdAt = message.createdAt.toISOString();
933
- }
934
- if (message.updatedAt !== undefined) {
935
- obj.updatedAt = message.updatedAt.toISOString();
936
- }
937
- return obj;
938
- },
939
- create(base) {
940
- return exports.AgentDraft.fromPartial(base !== null && base !== void 0 ? base : {});
941
- },
942
- fromPartial(object) {
943
- var _a;
944
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
945
- const message = createBaseAgentDraft();
946
- message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
947
- message.definitionId = (_c = object.definitionId) !== null && _c !== void 0 ? _c : "";
948
- message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
949
- message.baseVersionId = (_e = object.baseVersionId) !== null && _e !== void 0 ? _e : "";
950
- message.revision = (_f = object.revision) !== null && _f !== void 0 ? _f : 0;
951
- message.name = (_g = object.name) !== null && _g !== void 0 ? _g : "";
952
- message.description = (_h = object.description) !== null && _h !== void 0 ? _h : "";
953
- message.instructions = (_j = object.instructions) !== null && _j !== void 0 ? _j : "";
954
- message.modelId = (_k = object.modelId) !== null && _k !== void 0 ? _k : "";
955
- message.providerConfigurationId = (_l = object.providerConfigurationId) !== null && _l !== void 0 ? _l : "";
956
- message.tools = ((_a = object.tools) === null || _a === void 0 ? void 0 : _a.map((e) => exports.AgentToolDescriptor.fromPartial(e))) || [];
957
- message.inputSchema = (_m = object.inputSchema) !== null && _m !== void 0 ? _m : undefined;
958
- message.outputSchema = (_o = object.outputSchema) !== null && _o !== void 0 ? _o : undefined;
959
- message.metadata = (_p = object.metadata) !== null && _p !== void 0 ? _p : undefined;
960
- message.updatedByUserId = (_q = object.updatedByUserId) !== null && _q !== void 0 ? _q : "";
961
- message.createdAt = (_r = object.createdAt) !== null && _r !== void 0 ? _r : undefined;
962
- message.updatedAt = (_s = object.updatedAt) !== null && _s !== void 0 ? _s : undefined;
963
- return message;
964
- },
965
- };
966
- function createBaseAgentDraftPatch() {
967
- return {
968
- id: "",
969
- definitionId: "",
970
- organizationId: "",
971
- revision: 0,
972
- patch: undefined,
973
- createdByUserId: "",
974
- createdAt: undefined,
975
- };
55
+ function createBaseCreateAgentRequest() {
56
+ return { agent: undefined };
976
57
  }
977
- exports.AgentDraftPatch = {
58
+ exports.CreateAgentRequest = {
978
59
  encode(message, writer = new wire_1.BinaryWriter()) {
979
- if (message.id !== "") {
980
- writer.uint32(10).string(message.id);
981
- }
982
- if (message.definitionId !== "") {
983
- writer.uint32(18).string(message.definitionId);
984
- }
985
- if (message.organizationId !== "") {
986
- writer.uint32(26).string(message.organizationId);
987
- }
988
- if (message.revision !== 0) {
989
- writer.uint32(32).int32(message.revision);
990
- }
991
- if (message.patch !== undefined) {
992
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.patch), writer.uint32(42).fork()).join();
993
- }
994
- if (message.createdByUserId !== "") {
995
- writer.uint32(50).string(message.createdByUserId);
996
- }
997
- if (message.createdAt !== undefined) {
998
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
60
+ if (message.agent !== undefined) {
61
+ exports.AgentInput.encode(message.agent, writer.uint32(10).fork()).join();
999
62
  }
1000
63
  return writer;
1001
64
  },
1002
65
  decode(input, length) {
1003
66
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1004
67
  const end = length === undefined ? reader.len : reader.pos + length;
1005
- const message = createBaseAgentDraftPatch();
68
+ const message = createBaseCreateAgentRequest();
1006
69
  while (reader.pos < end) {
1007
70
  const tag = reader.uint32();
1008
71
  switch (tag >>> 3) {
@@ -1010,49 +73,7 @@ exports.AgentDraftPatch = {
1010
73
  if (tag !== 10) {
1011
74
  break;
1012
75
  }
1013
- message.id = reader.string();
1014
- continue;
1015
- }
1016
- case 2: {
1017
- if (tag !== 18) {
1018
- break;
1019
- }
1020
- message.definitionId = reader.string();
1021
- continue;
1022
- }
1023
- case 3: {
1024
- if (tag !== 26) {
1025
- break;
1026
- }
1027
- message.organizationId = reader.string();
1028
- continue;
1029
- }
1030
- case 4: {
1031
- if (tag !== 32) {
1032
- break;
1033
- }
1034
- message.revision = reader.int32();
1035
- continue;
1036
- }
1037
- case 5: {
1038
- if (tag !== 42) {
1039
- break;
1040
- }
1041
- message.patch = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1042
- continue;
1043
- }
1044
- case 6: {
1045
- if (tag !== 50) {
1046
- break;
1047
- }
1048
- message.createdByUserId = reader.string();
1049
- continue;
1050
- }
1051
- case 7: {
1052
- if (tag !== 58) {
1053
- break;
1054
- }
1055
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
76
+ message.agent = exports.AgentInput.decode(reader, reader.uint32());
1056
77
  continue;
1057
78
  }
1058
79
  }
@@ -1064,115 +85,48 @@ exports.AgentDraftPatch = {
1064
85
  return message;
1065
86
  },
1066
87
  fromJSON(object) {
1067
- return {
1068
- id: isSet(object.id) ? globalThis.String(object.id) : "",
1069
- definitionId: isSet(object.definitionId)
1070
- ? globalThis.String(object.definitionId)
1071
- : isSet(object.definition_id)
1072
- ? globalThis.String(object.definition_id)
1073
- : "",
1074
- organizationId: isSet(object.organizationId)
1075
- ? globalThis.String(object.organizationId)
1076
- : isSet(object.organization_id)
1077
- ? globalThis.String(object.organization_id)
1078
- : "",
1079
- revision: isSet(object.revision) ? globalThis.Number(object.revision) : 0,
1080
- patch: isObject(object.patch) ? object.patch : undefined,
1081
- createdByUserId: isSet(object.createdByUserId)
1082
- ? globalThis.String(object.createdByUserId)
1083
- : isSet(object.created_by_user_id)
1084
- ? globalThis.String(object.created_by_user_id)
1085
- : "",
1086
- createdAt: isSet(object.createdAt)
1087
- ? fromJsonTimestamp(object.createdAt)
1088
- : isSet(object.created_at)
1089
- ? fromJsonTimestamp(object.created_at)
1090
- : undefined,
1091
- };
88
+ return { agent: isSet(object.agent) ? exports.AgentInput.fromJSON(object.agent) : undefined };
1092
89
  },
1093
90
  toJSON(message) {
1094
91
  const obj = {};
1095
- if (message.id !== "") {
1096
- obj.id = message.id;
1097
- }
1098
- if (message.definitionId !== "") {
1099
- obj.definitionId = message.definitionId;
1100
- }
1101
- if (message.organizationId !== "") {
1102
- obj.organizationId = message.organizationId;
1103
- }
1104
- if (message.revision !== 0) {
1105
- obj.revision = Math.round(message.revision);
1106
- }
1107
- if (message.patch !== undefined) {
1108
- obj.patch = message.patch;
1109
- }
1110
- if (message.createdByUserId !== "") {
1111
- obj.createdByUserId = message.createdByUserId;
1112
- }
1113
- if (message.createdAt !== undefined) {
1114
- obj.createdAt = message.createdAt.toISOString();
92
+ if (message.agent !== undefined) {
93
+ obj.agent = exports.AgentInput.toJSON(message.agent);
1115
94
  }
1116
95
  return obj;
1117
96
  },
1118
97
  create(base) {
1119
- return exports.AgentDraftPatch.fromPartial(base !== null && base !== void 0 ? base : {});
98
+ return exports.CreateAgentRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1120
99
  },
1121
100
  fromPartial(object) {
1122
- var _a, _b, _c, _d, _e, _f, _g;
1123
- const message = createBaseAgentDraftPatch();
1124
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1125
- message.definitionId = (_b = object.definitionId) !== null && _b !== void 0 ? _b : "";
1126
- message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
1127
- message.revision = (_d = object.revision) !== null && _d !== void 0 ? _d : 0;
1128
- message.patch = (_e = object.patch) !== null && _e !== void 0 ? _e : undefined;
1129
- message.createdByUserId = (_f = object.createdByUserId) !== null && _f !== void 0 ? _f : "";
1130
- message.createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
101
+ const message = createBaseCreateAgentRequest();
102
+ message.agent = (object.agent !== undefined && object.agent !== null)
103
+ ? exports.AgentInput.fromPartial(object.agent)
104
+ : undefined;
1131
105
  return message;
1132
106
  },
1133
107
  };
1134
- function createBaseAgentDraftPatchConflict() {
1135
- return { baseRevision: 0, currentRevision: 0, reason: "" };
108
+ function createBaseCreateAgentResponse() {
109
+ return { agentId: "" };
1136
110
  }
1137
- exports.AgentDraftPatchConflict = {
111
+ exports.CreateAgentResponse = {
1138
112
  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);
113
+ if (message.agentId !== "") {
114
+ writer.uint32(10).string(message.agentId);
1147
115
  }
1148
116
  return writer;
1149
117
  },
1150
118
  decode(input, length) {
1151
119
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1152
120
  const end = length === undefined ? reader.len : reader.pos + length;
1153
- const message = createBaseAgentDraftPatchConflict();
121
+ const message = createBaseCreateAgentResponse();
1154
122
  while (reader.pos < end) {
1155
123
  const tag = reader.uint32();
1156
124
  switch (tag >>> 3) {
1157
125
  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) {
126
+ if (tag !== 10) {
1173
127
  break;
1174
128
  }
1175
- message.reason = reader.string();
129
+ message.agentId = reader.string();
1176
130
  continue;
1177
131
  }
1178
132
  }
@@ -1185,211 +139,52 @@ exports.AgentDraftPatchConflict = {
1185
139
  },
1186
140
  fromJSON(object) {
1187
141
  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) : "",
142
+ agentId: isSet(object.agentId)
143
+ ? globalThis.String(object.agentId)
144
+ : isSet(object.agent_id)
145
+ ? globalThis.String(object.agent_id)
146
+ : "",
1199
147
  };
1200
148
  },
1201
149
  toJSON(message) {
1202
150
  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;
151
+ if (message.agentId !== "") {
152
+ obj.agentId = message.agentId;
1211
153
  }
1212
154
  return obj;
1213
155
  },
1214
156
  create(base) {
1215
- return exports.AgentDraftPatchConflict.fromPartial(base !== null && base !== void 0 ? base : {});
157
+ return exports.CreateAgentResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1216
158
  },
1217
159
  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 : "";
160
+ var _a;
161
+ const message = createBaseCreateAgentResponse();
162
+ message.agentId = (_a = object.agentId) !== null && _a !== void 0 ? _a : "";
1223
163
  return message;
1224
164
  },
1225
165
  };
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
- };
166
+ function createBaseGetAgentRequest() {
167
+ return { agentId: "" };
1243
168
  }
1244
- exports.AgentDraftEvent = {
169
+ exports.GetAgentRequest = {
1245
170
  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();
171
+ if (message.agentId !== "") {
172
+ writer.uint32(10).string(message.agentId);
1287
173
  }
1288
174
  return writer;
1289
175
  },
1290
176
  decode(input, length) {
1291
177
  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) {
178
+ const end = length === undefined ? reader.len : reader.pos + length;
179
+ const message = createBaseGetAgentRequest();
180
+ while (reader.pos < end) {
181
+ const tag = reader.uint32();
182
+ switch (tag >>> 3) {
183
+ case 1: {
184
+ if (tag !== 10) {
1390
185
  break;
1391
186
  }
1392
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
187
+ message.agentId = reader.string();
1393
188
  continue;
1394
189
  }
1395
190
  }
@@ -1402,207 +197,141 @@ exports.AgentDraftEvent = {
1402
197
  },
1403
198
  fromJSON(object) {
1404
199
  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)
200
+ agentId: isSet(object.agentId)
201
+ ? globalThis.String(object.agentId)
202
+ : isSet(object.agent_id)
203
+ ? globalThis.String(object.agent_id)
1415
204
  : "",
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
205
  };
1456
206
  },
1457
207
  toJSON(message) {
1458
- var _a;
1459
208
  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);
209
+ if (message.agentId !== "") {
210
+ obj.agentId = message.agentId;
1483
211
  }
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);
212
+ return obj;
213
+ },
214
+ create(base) {
215
+ return exports.GetAgentRequest.fromPartial(base !== null && base !== void 0 ? base : {});
216
+ },
217
+ fromPartial(object) {
218
+ var _a;
219
+ const message = createBaseGetAgentRequest();
220
+ message.agentId = (_a = object.agentId) !== null && _a !== void 0 ? _a : "";
221
+ return message;
222
+ },
223
+ };
224
+ function createBaseGetAgentResponse() {
225
+ return { agent: undefined };
226
+ }
227
+ exports.GetAgentResponse = {
228
+ encode(message, writer = new wire_1.BinaryWriter()) {
229
+ if (message.agent !== undefined) {
230
+ exports.Agent.encode(message.agent, writer.uint32(10).fork()).join();
1495
231
  }
1496
- if (message.createdByUserId !== "") {
1497
- obj.createdByUserId = message.createdByUserId;
232
+ return writer;
233
+ },
234
+ decode(input, length) {
235
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
236
+ const end = length === undefined ? reader.len : reader.pos + length;
237
+ const message = createBaseGetAgentResponse();
238
+ while (reader.pos < end) {
239
+ const tag = reader.uint32();
240
+ switch (tag >>> 3) {
241
+ case 1: {
242
+ if (tag !== 10) {
243
+ break;
244
+ }
245
+ message.agent = exports.Agent.decode(reader, reader.uint32());
246
+ continue;
247
+ }
248
+ }
249
+ if ((tag & 7) === 4 || tag === 0) {
250
+ break;
251
+ }
252
+ reader.skip(tag & 7);
1498
253
  }
1499
- if (message.createdAt !== undefined) {
1500
- obj.createdAt = message.createdAt.toISOString();
254
+ return message;
255
+ },
256
+ fromJSON(object) {
257
+ return { agent: isSet(object.agent) ? exports.Agent.fromJSON(object.agent) : undefined };
258
+ },
259
+ toJSON(message) {
260
+ const obj = {};
261
+ if (message.agent !== undefined) {
262
+ obj.agent = exports.Agent.toJSON(message.agent);
1501
263
  }
1502
264
  return obj;
1503
265
  },
1504
266
  create(base) {
1505
- return exports.AgentDraftEvent.fromPartial(base !== null && base !== void 0 ? base : {});
267
+ return exports.GetAgentResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1506
268
  },
1507
269
  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;
270
+ const message = createBaseGetAgentResponse();
271
+ message.agent = (object.agent !== undefined && object.agent !== null) ? exports.Agent.fromPartial(object.agent) : undefined;
1527
272
  return message;
1528
273
  },
1529
274
  };
1530
- function createBaseAgentVersion() {
275
+ function createBaseUpdateAgentRequest() {
1531
276
  return {
1532
- id: "",
1533
- definitionId: "",
1534
- organizationId: "",
1535
- version: 0,
1536
- sourceDraftRevision: 0,
277
+ agentId: "",
278
+ slug: "",
1537
279
  name: "",
1538
280
  description: "",
1539
281
  instructions: "",
1540
- modelId: "",
1541
- providerConfigurationId: "",
1542
- tools: [],
282
+ defaultModelId: "",
283
+ defaultGenerateConfig: undefined,
284
+ includeContents: 0,
285
+ outputKey: "",
1543
286
  inputSchema: undefined,
1544
287
  outputSchema: undefined,
1545
288
  metadata: undefined,
1546
- publishedByUserId: "",
1547
- publishedAt: undefined,
1548
289
  };
1549
290
  }
1550
- exports.AgentVersion = {
291
+ exports.UpdateAgentRequest = {
1551
292
  encode(message, writer = new wire_1.BinaryWriter()) {
1552
- if (message.id !== "") {
1553
- writer.uint32(10).string(message.id);
1554
- }
1555
- if (message.definitionId !== "") {
1556
- writer.uint32(18).string(message.definitionId);
293
+ if (message.agentId !== "") {
294
+ writer.uint32(10).string(message.agentId);
1557
295
  }
1558
- if (message.organizationId !== "") {
1559
- writer.uint32(26).string(message.organizationId);
1560
- }
1561
- if (message.version !== 0) {
1562
- writer.uint32(32).int32(message.version);
1563
- }
1564
- if (message.sourceDraftRevision !== 0) {
1565
- writer.uint32(40).int32(message.sourceDraftRevision);
296
+ if (message.slug !== "") {
297
+ writer.uint32(18).string(message.slug);
1566
298
  }
1567
299
  if (message.name !== "") {
1568
- writer.uint32(50).string(message.name);
300
+ writer.uint32(26).string(message.name);
1569
301
  }
1570
302
  if (message.description !== "") {
1571
- writer.uint32(58).string(message.description);
303
+ writer.uint32(34).string(message.description);
1572
304
  }
1573
305
  if (message.instructions !== "") {
1574
- writer.uint32(66).string(message.instructions);
306
+ writer.uint32(42).string(message.instructions);
1575
307
  }
1576
- if (message.modelId !== "") {
1577
- writer.uint32(74).string(message.modelId);
308
+ if (message.defaultModelId !== "") {
309
+ writer.uint32(50).string(message.defaultModelId);
1578
310
  }
1579
- if (message.providerConfigurationId !== "") {
1580
- writer.uint32(82).string(message.providerConfigurationId);
311
+ if (message.defaultGenerateConfig !== undefined) {
312
+ generate_pb_1.GenerateConfig.encode(message.defaultGenerateConfig, writer.uint32(58).fork()).join();
1581
313
  }
1582
- for (const v of message.tools) {
1583
- exports.AgentToolDescriptor.encode(v, writer.uint32(90).fork()).join();
314
+ if (message.includeContents !== 0) {
315
+ writer.uint32(64).int32(message.includeContents);
316
+ }
317
+ if (message.outputKey !== "") {
318
+ writer.uint32(74).string(message.outputKey);
1584
319
  }
1585
320
  if (message.inputSchema !== undefined) {
1586
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(98).fork()).join();
321
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(82).fork()).join();
1587
322
  }
1588
323
  if (message.outputSchema !== undefined) {
1589
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(106).fork()).join();
324
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(90).fork()).join();
1590
325
  }
1591
326
  if (message.metadata !== undefined) {
1592
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(114).fork()).join();
1593
- }
1594
- if (message.publishedByUserId !== "") {
1595
- writer.uint32(122).string(message.publishedByUserId);
1596
- }
1597
- if (message.publishedAt !== undefined) {
1598
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.publishedAt), writer.uint32(130).fork()).join();
327
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(98).fork()).join();
1599
328
  }
1600
329
  return writer;
1601
330
  },
1602
331
  decode(input, length) {
1603
332
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1604
333
  const end = length === undefined ? reader.len : reader.pos + length;
1605
- const message = createBaseAgentVersion();
334
+ const message = createBaseUpdateAgentRequest();
1606
335
  while (reader.pos < end) {
1607
336
  const tag = reader.uint32();
1608
337
  switch (tag >>> 3) {
@@ -1610,114 +339,86 @@ exports.AgentVersion = {
1610
339
  if (tag !== 10) {
1611
340
  break;
1612
341
  }
1613
- message.id = reader.string();
342
+ message.agentId = reader.string();
1614
343
  continue;
1615
344
  }
1616
345
  case 2: {
1617
346
  if (tag !== 18) {
1618
347
  break;
1619
348
  }
1620
- message.definitionId = reader.string();
349
+ message.slug = reader.string();
1621
350
  continue;
1622
351
  }
1623
352
  case 3: {
1624
353
  if (tag !== 26) {
1625
354
  break;
1626
355
  }
1627
- message.organizationId = reader.string();
356
+ message.name = reader.string();
1628
357
  continue;
1629
358
  }
1630
359
  case 4: {
1631
- if (tag !== 32) {
360
+ if (tag !== 34) {
1632
361
  break;
1633
362
  }
1634
- message.version = reader.int32();
363
+ message.description = reader.string();
1635
364
  continue;
1636
365
  }
1637
366
  case 5: {
1638
- if (tag !== 40) {
367
+ if (tag !== 42) {
1639
368
  break;
1640
369
  }
1641
- message.sourceDraftRevision = reader.int32();
370
+ message.instructions = reader.string();
1642
371
  continue;
1643
372
  }
1644
373
  case 6: {
1645
374
  if (tag !== 50) {
1646
375
  break;
1647
376
  }
1648
- message.name = reader.string();
377
+ message.defaultModelId = reader.string();
1649
378
  continue;
1650
379
  }
1651
380
  case 7: {
1652
381
  if (tag !== 58) {
1653
382
  break;
1654
383
  }
1655
- message.description = reader.string();
384
+ message.defaultGenerateConfig = generate_pb_1.GenerateConfig.decode(reader, reader.uint32());
1656
385
  continue;
1657
386
  }
1658
387
  case 8: {
1659
- if (tag !== 66) {
388
+ if (tag !== 64) {
1660
389
  break;
1661
390
  }
1662
- message.instructions = reader.string();
391
+ message.includeContents = reader.int32();
1663
392
  continue;
1664
393
  }
1665
394
  case 9: {
1666
395
  if (tag !== 74) {
1667
396
  break;
1668
397
  }
1669
- message.modelId = reader.string();
398
+ message.outputKey = reader.string();
1670
399
  continue;
1671
400
  }
1672
401
  case 10: {
1673
402
  if (tag !== 82) {
1674
403
  break;
1675
404
  }
1676
- message.providerConfigurationId = reader.string();
405
+ message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1677
406
  continue;
1678
407
  }
1679
408
  case 11: {
1680
409
  if (tag !== 90) {
1681
410
  break;
1682
411
  }
1683
- message.tools.push(exports.AgentToolDescriptor.decode(reader, reader.uint32()));
412
+ message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1684
413
  continue;
1685
414
  }
1686
415
  case 12: {
1687
416
  if (tag !== 98) {
1688
417
  break;
1689
418
  }
1690
- message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1691
- continue;
1692
- }
1693
- case 13: {
1694
- if (tag !== 106) {
1695
- break;
1696
- }
1697
- message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1698
- continue;
1699
- }
1700
- case 14: {
1701
- if (tag !== 114) {
1702
- break;
1703
- }
1704
419
  message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1705
420
  continue;
1706
421
  }
1707
- case 15: {
1708
- if (tag !== 122) {
1709
- break;
1710
- }
1711
- message.publishedByUserId = reader.string();
1712
- continue;
1713
- }
1714
- case 16: {
1715
- if (tag !== 130) {
1716
- break;
1717
- }
1718
- message.publishedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1719
- continue;
1720
- }
1721
422
  }
1722
423
  if ((tag & 7) === 4 || tag === 0) {
1723
424
  break;
@@ -1728,39 +429,35 @@ exports.AgentVersion = {
1728
429
  },
1729
430
  fromJSON(object) {
1730
431
  return {
1731
- id: isSet(object.id) ? globalThis.String(object.id) : "",
1732
- definitionId: isSet(object.definitionId)
1733
- ? globalThis.String(object.definitionId)
1734
- : isSet(object.definition_id)
1735
- ? globalThis.String(object.definition_id)
432
+ agentId: isSet(object.agentId)
433
+ ? globalThis.String(object.agentId)
434
+ : isSet(object.agent_id)
435
+ ? globalThis.String(object.agent_id)
1736
436
  : "",
1737
- organizationId: isSet(object.organizationId)
1738
- ? globalThis.String(object.organizationId)
1739
- : isSet(object.organization_id)
1740
- ? globalThis.String(object.organization_id)
1741
- : "",
1742
- version: isSet(object.version) ? globalThis.Number(object.version) : 0,
1743
- sourceDraftRevision: isSet(object.sourceDraftRevision)
1744
- ? globalThis.Number(object.sourceDraftRevision)
1745
- : isSet(object.source_draft_revision)
1746
- ? globalThis.Number(object.source_draft_revision)
1747
- : 0,
437
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
1748
438
  name: isSet(object.name) ? globalThis.String(object.name) : "",
1749
439
  description: isSet(object.description) ? globalThis.String(object.description) : "",
1750
440
  instructions: isSet(object.instructions) ? globalThis.String(object.instructions) : "",
1751
- modelId: isSet(object.modelId)
1752
- ? globalThis.String(object.modelId)
1753
- : isSet(object.model_id)
1754
- ? globalThis.String(object.model_id)
441
+ defaultModelId: isSet(object.defaultModelId)
442
+ ? globalThis.String(object.defaultModelId)
443
+ : isSet(object.default_model_id)
444
+ ? globalThis.String(object.default_model_id)
1755
445
  : "",
1756
- providerConfigurationId: isSet(object.providerConfigurationId)
1757
- ? globalThis.String(object.providerConfigurationId)
1758
- : isSet(object.provider_configuration_id)
1759
- ? globalThis.String(object.provider_configuration_id)
446
+ defaultGenerateConfig: isSet(object.defaultGenerateConfig)
447
+ ? generate_pb_1.GenerateConfig.fromJSON(object.defaultGenerateConfig)
448
+ : isSet(object.default_generate_config)
449
+ ? generate_pb_1.GenerateConfig.fromJSON(object.default_generate_config)
450
+ : undefined,
451
+ includeContents: isSet(object.includeContents)
452
+ ? includeContentsFromJSON(object.includeContents)
453
+ : isSet(object.include_contents)
454
+ ? includeContentsFromJSON(object.include_contents)
455
+ : 0,
456
+ outputKey: isSet(object.outputKey)
457
+ ? globalThis.String(object.outputKey)
458
+ : isSet(object.output_key)
459
+ ? globalThis.String(object.output_key)
1760
460
  : "",
1761
- tools: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tools)
1762
- ? object.tools.map((e) => exports.AgentToolDescriptor.fromJSON(e))
1763
- : [],
1764
461
  inputSchema: isObject(object.inputSchema)
1765
462
  ? object.inputSchema
1766
463
  : isObject(object.input_schema)
@@ -1772,35 +469,15 @@ exports.AgentVersion = {
1772
469
  ? object.output_schema
1773
470
  : undefined,
1774
471
  metadata: isObject(object.metadata) ? object.metadata : undefined,
1775
- publishedByUserId: isSet(object.publishedByUserId)
1776
- ? globalThis.String(object.publishedByUserId)
1777
- : isSet(object.published_by_user_id)
1778
- ? globalThis.String(object.published_by_user_id)
1779
- : "",
1780
- publishedAt: isSet(object.publishedAt)
1781
- ? fromJsonTimestamp(object.publishedAt)
1782
- : isSet(object.published_at)
1783
- ? fromJsonTimestamp(object.published_at)
1784
- : undefined,
1785
472
  };
1786
473
  },
1787
474
  toJSON(message) {
1788
- var _a;
1789
475
  const obj = {};
1790
- if (message.id !== "") {
1791
- obj.id = message.id;
1792
- }
1793
- if (message.definitionId !== "") {
1794
- obj.definitionId = message.definitionId;
1795
- }
1796
- if (message.organizationId !== "") {
1797
- obj.organizationId = message.organizationId;
476
+ if (message.agentId !== "") {
477
+ obj.agentId = message.agentId;
1798
478
  }
1799
- if (message.version !== 0) {
1800
- obj.version = Math.round(message.version);
1801
- }
1802
- if (message.sourceDraftRevision !== 0) {
1803
- obj.sourceDraftRevision = Math.round(message.sourceDraftRevision);
479
+ if (message.slug !== "") {
480
+ obj.slug = message.slug;
1804
481
  }
1805
482
  if (message.name !== "") {
1806
483
  obj.name = message.name;
@@ -1811,14 +488,17 @@ exports.AgentVersion = {
1811
488
  if (message.instructions !== "") {
1812
489
  obj.instructions = message.instructions;
1813
490
  }
1814
- if (message.modelId !== "") {
1815
- obj.modelId = message.modelId;
491
+ if (message.defaultModelId !== "") {
492
+ obj.defaultModelId = message.defaultModelId;
1816
493
  }
1817
- if (message.providerConfigurationId !== "") {
1818
- obj.providerConfigurationId = message.providerConfigurationId;
494
+ if (message.defaultGenerateConfig !== undefined) {
495
+ obj.defaultGenerateConfig = generate_pb_1.GenerateConfig.toJSON(message.defaultGenerateConfig);
1819
496
  }
1820
- if ((_a = message.tools) === null || _a === void 0 ? void 0 : _a.length) {
1821
- obj.tools = message.tools.map((e) => exports.AgentToolDescriptor.toJSON(e));
497
+ if (message.includeContents !== 0) {
498
+ obj.includeContents = includeContentsToJSON(message.includeContents);
499
+ }
500
+ if (message.outputKey !== "") {
501
+ obj.outputKey = message.outputKey;
1822
502
  }
1823
503
  if (message.inputSchema !== undefined) {
1824
504
  obj.inputSchema = message.inputSchema;
@@ -1829,84 +509,46 @@ exports.AgentVersion = {
1829
509
  if (message.metadata !== undefined) {
1830
510
  obj.metadata = message.metadata;
1831
511
  }
1832
- if (message.publishedByUserId !== "") {
1833
- obj.publishedByUserId = message.publishedByUserId;
1834
- }
1835
- if (message.publishedAt !== undefined) {
1836
- obj.publishedAt = message.publishedAt.toISOString();
1837
- }
1838
512
  return obj;
1839
513
  },
1840
514
  create(base) {
1841
- return exports.AgentVersion.fromPartial(base !== null && base !== void 0 ? base : {});
515
+ return exports.UpdateAgentRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1842
516
  },
1843
517
  fromPartial(object) {
1844
- var _a;
1845
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
1846
- const message = createBaseAgentVersion();
1847
- message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
1848
- message.definitionId = (_c = object.definitionId) !== null && _c !== void 0 ? _c : "";
1849
- message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
1850
- message.version = (_e = object.version) !== null && _e !== void 0 ? _e : 0;
1851
- message.sourceDraftRevision = (_f = object.sourceDraftRevision) !== null && _f !== void 0 ? _f : 0;
1852
- message.name = (_g = object.name) !== null && _g !== void 0 ? _g : "";
1853
- message.description = (_h = object.description) !== null && _h !== void 0 ? _h : "";
1854
- message.instructions = (_j = object.instructions) !== null && _j !== void 0 ? _j : "";
1855
- message.modelId = (_k = object.modelId) !== null && _k !== void 0 ? _k : "";
1856
- message.providerConfigurationId = (_l = object.providerConfigurationId) !== null && _l !== void 0 ? _l : "";
1857
- message.tools = ((_a = object.tools) === null || _a === void 0 ? void 0 : _a.map((e) => exports.AgentToolDescriptor.fromPartial(e))) || [];
1858
- message.inputSchema = (_m = object.inputSchema) !== null && _m !== void 0 ? _m : undefined;
1859
- message.outputSchema = (_o = object.outputSchema) !== null && _o !== void 0 ? _o : undefined;
1860
- message.metadata = (_p = object.metadata) !== null && _p !== void 0 ? _p : undefined;
1861
- message.publishedByUserId = (_q = object.publishedByUserId) !== null && _q !== void 0 ? _q : "";
1862
- message.publishedAt = (_r = object.publishedAt) !== null && _r !== void 0 ? _r : undefined;
518
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
519
+ const message = createBaseUpdateAgentRequest();
520
+ message.agentId = (_a = object.agentId) !== null && _a !== void 0 ? _a : "";
521
+ message.slug = (_b = object.slug) !== null && _b !== void 0 ? _b : "";
522
+ message.name = (_c = object.name) !== null && _c !== void 0 ? _c : "";
523
+ message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
524
+ message.instructions = (_e = object.instructions) !== null && _e !== void 0 ? _e : "";
525
+ message.defaultModelId = (_f = object.defaultModelId) !== null && _f !== void 0 ? _f : "";
526
+ message.defaultGenerateConfig =
527
+ (object.defaultGenerateConfig !== undefined && object.defaultGenerateConfig !== null)
528
+ ? generate_pb_1.GenerateConfig.fromPartial(object.defaultGenerateConfig)
529
+ : undefined;
530
+ message.includeContents = (_g = object.includeContents) !== null && _g !== void 0 ? _g : 0;
531
+ message.outputKey = (_h = object.outputKey) !== null && _h !== void 0 ? _h : "";
532
+ message.inputSchema = (_j = object.inputSchema) !== null && _j !== void 0 ? _j : undefined;
533
+ message.outputSchema = (_k = object.outputSchema) !== null && _k !== void 0 ? _k : undefined;
534
+ message.metadata = (_l = object.metadata) !== null && _l !== void 0 ? _l : undefined;
1863
535
  return message;
1864
536
  },
1865
537
  };
1866
- function createBaseAgentToolDescriptor() {
1867
- return {
1868
- name: "",
1869
- displayName: "",
1870
- description: "",
1871
- kind: 0,
1872
- approvalMode: 0,
1873
- inputSchema: undefined,
1874
- outputSchema: undefined,
1875
- config: undefined,
1876
- };
538
+ function createBaseUpdateAgentResponse() {
539
+ return { agent: undefined };
1877
540
  }
1878
- exports.AgentToolDescriptor = {
541
+ exports.UpdateAgentResponse = {
1879
542
  encode(message, writer = new wire_1.BinaryWriter()) {
1880
- if (message.name !== "") {
1881
- writer.uint32(10).string(message.name);
1882
- }
1883
- if (message.displayName !== "") {
1884
- writer.uint32(18).string(message.displayName);
1885
- }
1886
- if (message.description !== "") {
1887
- writer.uint32(26).string(message.description);
1888
- }
1889
- if (message.kind !== 0) {
1890
- writer.uint32(32).int32(message.kind);
1891
- }
1892
- if (message.approvalMode !== 0) {
1893
- writer.uint32(40).int32(message.approvalMode);
1894
- }
1895
- if (message.inputSchema !== undefined) {
1896
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(50).fork()).join();
1897
- }
1898
- if (message.outputSchema !== undefined) {
1899
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(58).fork()).join();
1900
- }
1901
- if (message.config !== undefined) {
1902
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.config), writer.uint32(66).fork()).join();
543
+ if (message.agent !== undefined) {
544
+ exports.Agent.encode(message.agent, writer.uint32(10).fork()).join();
1903
545
  }
1904
546
  return writer;
1905
547
  },
1906
548
  decode(input, length) {
1907
549
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1908
550
  const end = length === undefined ? reader.len : reader.pos + length;
1909
- const message = createBaseAgentToolDescriptor();
551
+ const message = createBaseUpdateAgentResponse();
1910
552
  while (reader.pos < end) {
1911
553
  const tag = reader.uint32();
1912
554
  switch (tag >>> 3) {
@@ -1914,56 +556,7 @@ exports.AgentToolDescriptor = {
1914
556
  if (tag !== 10) {
1915
557
  break;
1916
558
  }
1917
- message.name = reader.string();
1918
- continue;
1919
- }
1920
- case 2: {
1921
- if (tag !== 18) {
1922
- break;
1923
- }
1924
- message.displayName = reader.string();
1925
- continue;
1926
- }
1927
- case 3: {
1928
- if (tag !== 26) {
1929
- break;
1930
- }
1931
- message.description = reader.string();
1932
- continue;
1933
- }
1934
- case 4: {
1935
- if (tag !== 32) {
1936
- break;
1937
- }
1938
- message.kind = reader.int32();
1939
- continue;
1940
- }
1941
- case 5: {
1942
- if (tag !== 40) {
1943
- break;
1944
- }
1945
- message.approvalMode = reader.int32();
1946
- continue;
1947
- }
1948
- case 6: {
1949
- if (tag !== 50) {
1950
- break;
1951
- }
1952
- message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1953
- continue;
1954
- }
1955
- case 7: {
1956
- if (tag !== 58) {
1957
- break;
1958
- }
1959
- message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1960
- continue;
1961
- }
1962
- case 8: {
1963
- if (tag !== 66) {
1964
- break;
1965
- }
1966
- message.config = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
559
+ message.agent = exports.Agent.decode(reader, reader.uint32());
1967
560
  continue;
1968
561
  }
1969
562
  }
@@ -1975,140 +568,56 @@ exports.AgentToolDescriptor = {
1975
568
  return message;
1976
569
  },
1977
570
  fromJSON(object) {
1978
- return {
1979
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1980
- displayName: isSet(object.displayName)
1981
- ? globalThis.String(object.displayName)
1982
- : isSet(object.display_name)
1983
- ? globalThis.String(object.display_name)
1984
- : "",
1985
- description: isSet(object.description) ? globalThis.String(object.description) : "",
1986
- kind: isSet(object.kind) ? agentToolDescriptorKindFromJSON(object.kind) : 0,
1987
- approvalMode: isSet(object.approvalMode)
1988
- ? agentToolApprovalModeFromJSON(object.approvalMode)
1989
- : isSet(object.approval_mode)
1990
- ? agentToolApprovalModeFromJSON(object.approval_mode)
1991
- : 0,
1992
- inputSchema: isObject(object.inputSchema)
1993
- ? object.inputSchema
1994
- : isObject(object.input_schema)
1995
- ? object.input_schema
1996
- : undefined,
1997
- outputSchema: isObject(object.outputSchema)
1998
- ? object.outputSchema
1999
- : isObject(object.output_schema)
2000
- ? object.output_schema
2001
- : undefined,
2002
- config: isObject(object.config) ? object.config : undefined,
2003
- };
571
+ return { agent: isSet(object.agent) ? exports.Agent.fromJSON(object.agent) : undefined };
2004
572
  },
2005
573
  toJSON(message) {
2006
574
  const obj = {};
2007
- if (message.name !== "") {
2008
- obj.name = message.name;
2009
- }
2010
- if (message.displayName !== "") {
2011
- obj.displayName = message.displayName;
2012
- }
2013
- if (message.description !== "") {
2014
- obj.description = message.description;
2015
- }
2016
- if (message.kind !== 0) {
2017
- obj.kind = agentToolDescriptorKindToJSON(message.kind);
2018
- }
2019
- if (message.approvalMode !== 0) {
2020
- obj.approvalMode = agentToolApprovalModeToJSON(message.approvalMode);
2021
- }
2022
- if (message.inputSchema !== undefined) {
2023
- obj.inputSchema = message.inputSchema;
2024
- }
2025
- if (message.outputSchema !== undefined) {
2026
- obj.outputSchema = message.outputSchema;
2027
- }
2028
- if (message.config !== undefined) {
2029
- obj.config = message.config;
575
+ if (message.agent !== undefined) {
576
+ obj.agent = exports.Agent.toJSON(message.agent);
2030
577
  }
2031
578
  return obj;
2032
579
  },
2033
580
  create(base) {
2034
- return exports.AgentToolDescriptor.fromPartial(base !== null && base !== void 0 ? base : {});
581
+ return exports.UpdateAgentResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2035
582
  },
2036
583
  fromPartial(object) {
2037
- var _a, _b, _c, _d, _e, _f, _g, _h;
2038
- const message = createBaseAgentToolDescriptor();
2039
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
2040
- message.displayName = (_b = object.displayName) !== null && _b !== void 0 ? _b : "";
2041
- message.description = (_c = object.description) !== null && _c !== void 0 ? _c : "";
2042
- message.kind = (_d = object.kind) !== null && _d !== void 0 ? _d : 0;
2043
- message.approvalMode = (_e = object.approvalMode) !== null && _e !== void 0 ? _e : 0;
2044
- message.inputSchema = (_f = object.inputSchema) !== null && _f !== void 0 ? _f : undefined;
2045
- message.outputSchema = (_g = object.outputSchema) !== null && _g !== void 0 ? _g : undefined;
2046
- message.config = (_h = object.config) !== null && _h !== void 0 ? _h : undefined;
584
+ const message = createBaseUpdateAgentResponse();
585
+ message.agent = (object.agent !== undefined && object.agent !== null) ? exports.Agent.fromPartial(object.agent) : undefined;
2047
586
  return message;
2048
587
  },
2049
588
  };
2050
- function createBaseAgentPublishPlan() {
2051
- return { definitionId: "", draftRevision: 0, publishable: false, issues: [], compiledPreview: undefined };
589
+ function createBaseListAgentsRequest() {
590
+ return { pageSize: 0, pageOffset: 0 };
2052
591
  }
2053
- exports.AgentPublishPlan = {
592
+ exports.ListAgentsRequest = {
2054
593
  encode(message, writer = new wire_1.BinaryWriter()) {
2055
- if (message.definitionId !== "") {
2056
- writer.uint32(10).string(message.definitionId);
2057
- }
2058
- if (message.draftRevision !== 0) {
2059
- writer.uint32(16).int32(message.draftRevision);
594
+ if (message.pageSize !== 0) {
595
+ writer.uint32(8).int32(message.pageSize);
2060
596
  }
2061
- if (message.publishable !== false) {
2062
- writer.uint32(24).bool(message.publishable);
2063
- }
2064
- for (const v of message.issues) {
2065
- exports.AgentPublishPlanIssue.encode(v, writer.uint32(34).fork()).join();
2066
- }
2067
- if (message.compiledPreview !== undefined) {
2068
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.compiledPreview), writer.uint32(42).fork()).join();
597
+ if (message.pageOffset !== 0) {
598
+ writer.uint32(16).int32(message.pageOffset);
2069
599
  }
2070
600
  return writer;
2071
601
  },
2072
602
  decode(input, length) {
2073
603
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2074
604
  const end = length === undefined ? reader.len : reader.pos + length;
2075
- const message = createBaseAgentPublishPlan();
2076
- while (reader.pos < end) {
2077
- const tag = reader.uint32();
2078
- switch (tag >>> 3) {
2079
- case 1: {
2080
- if (tag !== 10) {
2081
- break;
2082
- }
2083
- message.definitionId = reader.string();
2084
- continue;
2085
- }
2086
- case 2: {
2087
- if (tag !== 16) {
2088
- break;
2089
- }
2090
- message.draftRevision = reader.int32();
2091
- continue;
2092
- }
2093
- case 3: {
2094
- if (tag !== 24) {
2095
- break;
2096
- }
2097
- message.publishable = reader.bool();
2098
- continue;
2099
- }
2100
- case 4: {
2101
- if (tag !== 34) {
605
+ const message = createBaseListAgentsRequest();
606
+ while (reader.pos < end) {
607
+ const tag = reader.uint32();
608
+ switch (tag >>> 3) {
609
+ case 1: {
610
+ if (tag !== 8) {
2102
611
  break;
2103
612
  }
2104
- message.issues.push(exports.AgentPublishPlanIssue.decode(reader, reader.uint32()));
613
+ message.pageSize = reader.int32();
2105
614
  continue;
2106
615
  }
2107
- case 5: {
2108
- if (tag !== 42) {
616
+ case 2: {
617
+ if (tag !== 16) {
2109
618
  break;
2110
619
  }
2111
- message.compiledPreview = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
620
+ message.pageOffset = reader.int32();
2112
621
  continue;
2113
622
  }
2114
623
  }
@@ -2121,82 +630,53 @@ exports.AgentPublishPlan = {
2121
630
  },
2122
631
  fromJSON(object) {
2123
632
  return {
2124
- definitionId: isSet(object.definitionId)
2125
- ? globalThis.String(object.definitionId)
2126
- : isSet(object.definition_id)
2127
- ? globalThis.String(object.definition_id)
2128
- : "",
2129
- draftRevision: isSet(object.draftRevision)
2130
- ? globalThis.Number(object.draftRevision)
2131
- : isSet(object.draft_revision)
2132
- ? globalThis.Number(object.draft_revision)
633
+ pageSize: isSet(object.pageSize)
634
+ ? globalThis.Number(object.pageSize)
635
+ : isSet(object.page_size)
636
+ ? globalThis.Number(object.page_size)
637
+ : 0,
638
+ pageOffset: isSet(object.pageOffset)
639
+ ? globalThis.Number(object.pageOffset)
640
+ : isSet(object.page_offset)
641
+ ? globalThis.Number(object.page_offset)
2133
642
  : 0,
2134
- publishable: isSet(object.publishable) ? globalThis.Boolean(object.publishable) : false,
2135
- issues: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.issues)
2136
- ? object.issues.map((e) => exports.AgentPublishPlanIssue.fromJSON(e))
2137
- : [],
2138
- compiledPreview: isObject(object.compiledPreview)
2139
- ? object.compiledPreview
2140
- : isObject(object.compiled_preview)
2141
- ? object.compiled_preview
2142
- : undefined,
2143
643
  };
2144
644
  },
2145
645
  toJSON(message) {
2146
- var _a;
2147
646
  const obj = {};
2148
- if (message.definitionId !== "") {
2149
- obj.definitionId = message.definitionId;
2150
- }
2151
- if (message.draftRevision !== 0) {
2152
- obj.draftRevision = Math.round(message.draftRevision);
2153
- }
2154
- if (message.publishable !== false) {
2155
- obj.publishable = message.publishable;
647
+ if (message.pageSize !== 0) {
648
+ obj.pageSize = Math.round(message.pageSize);
2156
649
  }
2157
- if ((_a = message.issues) === null || _a === void 0 ? void 0 : _a.length) {
2158
- obj.issues = message.issues.map((e) => exports.AgentPublishPlanIssue.toJSON(e));
2159
- }
2160
- if (message.compiledPreview !== undefined) {
2161
- obj.compiledPreview = message.compiledPreview;
650
+ if (message.pageOffset !== 0) {
651
+ obj.pageOffset = Math.round(message.pageOffset);
2162
652
  }
2163
653
  return obj;
2164
654
  },
2165
655
  create(base) {
2166
- return exports.AgentPublishPlan.fromPartial(base !== null && base !== void 0 ? base : {});
656
+ return exports.ListAgentsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
2167
657
  },
2168
658
  fromPartial(object) {
2169
- var _a;
2170
- var _b, _c, _d, _e;
2171
- const message = createBaseAgentPublishPlan();
2172
- message.definitionId = (_b = object.definitionId) !== null && _b !== void 0 ? _b : "";
2173
- message.draftRevision = (_c = object.draftRevision) !== null && _c !== void 0 ? _c : 0;
2174
- message.publishable = (_d = object.publishable) !== null && _d !== void 0 ? _d : false;
2175
- message.issues = ((_a = object.issues) === null || _a === void 0 ? void 0 : _a.map((e) => exports.AgentPublishPlanIssue.fromPartial(e))) || [];
2176
- message.compiledPreview = (_e = object.compiledPreview) !== null && _e !== void 0 ? _e : undefined;
659
+ var _a, _b;
660
+ const message = createBaseListAgentsRequest();
661
+ message.pageSize = (_a = object.pageSize) !== null && _a !== void 0 ? _a : 0;
662
+ message.pageOffset = (_b = object.pageOffset) !== null && _b !== void 0 ? _b : 0;
2177
663
  return message;
2178
664
  },
2179
665
  };
2180
- function createBaseAgentPublishPlanIssue() {
2181
- return { code: "", message: "", path: "" };
666
+ function createBaseListAgentsResponse() {
667
+ return { agents: [] };
2182
668
  }
2183
- exports.AgentPublishPlanIssue = {
669
+ exports.ListAgentsResponse = {
2184
670
  encode(message, writer = new wire_1.BinaryWriter()) {
2185
- if (message.code !== "") {
2186
- writer.uint32(10).string(message.code);
2187
- }
2188
- if (message.message !== "") {
2189
- writer.uint32(18).string(message.message);
2190
- }
2191
- if (message.path !== "") {
2192
- writer.uint32(26).string(message.path);
671
+ for (const v of message.agents) {
672
+ exports.Agent.encode(v, writer.uint32(10).fork()).join();
2193
673
  }
2194
674
  return writer;
2195
675
  },
2196
676
  decode(input, length) {
2197
677
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2198
678
  const end = length === undefined ? reader.len : reader.pos + length;
2199
- const message = createBaseAgentPublishPlanIssue();
679
+ const message = createBaseListAgentsResponse();
2200
680
  while (reader.pos < end) {
2201
681
  const tag = reader.uint32();
2202
682
  switch (tag >>> 3) {
@@ -2204,21 +684,7 @@ exports.AgentPublishPlanIssue = {
2204
684
  if (tag !== 10) {
2205
685
  break;
2206
686
  }
2207
- message.code = reader.string();
2208
- continue;
2209
- }
2210
- case 2: {
2211
- if (tag !== 18) {
2212
- break;
2213
- }
2214
- message.message = reader.string();
2215
- continue;
2216
- }
2217
- case 3: {
2218
- if (tag !== 26) {
2219
- break;
2220
- }
2221
- message.path = reader.string();
687
+ message.agents.push(exports.Agent.decode(reader, reader.uint32()));
2222
688
  continue;
2223
689
  }
2224
690
  }
@@ -2230,113 +696,86 @@ exports.AgentPublishPlanIssue = {
2230
696
  return message;
2231
697
  },
2232
698
  fromJSON(object) {
2233
- return {
2234
- code: isSet(object.code) ? globalThis.String(object.code) : "",
2235
- message: isSet(object.message) ? globalThis.String(object.message) : "",
2236
- path: isSet(object.path) ? globalThis.String(object.path) : "",
2237
- };
699
+ return { agents: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.agents) ? object.agents.map((e) => exports.Agent.fromJSON(e)) : [] };
2238
700
  },
2239
701
  toJSON(message) {
702
+ var _a;
2240
703
  const obj = {};
2241
- if (message.code !== "") {
2242
- obj.code = message.code;
2243
- }
2244
- if (message.message !== "") {
2245
- obj.message = message.message;
2246
- }
2247
- if (message.path !== "") {
2248
- obj.path = message.path;
704
+ if ((_a = message.agents) === null || _a === void 0 ? void 0 : _a.length) {
705
+ obj.agents = message.agents.map((e) => exports.Agent.toJSON(e));
2249
706
  }
2250
707
  return obj;
2251
708
  },
2252
709
  create(base) {
2253
- return exports.AgentPublishPlanIssue.fromPartial(base !== null && base !== void 0 ? base : {});
710
+ return exports.ListAgentsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2254
711
  },
2255
712
  fromPartial(object) {
2256
- var _a, _b, _c;
2257
- const message = createBaseAgentPublishPlanIssue();
2258
- message.code = (_a = object.code) !== null && _a !== void 0 ? _a : "";
2259
- message.message = (_b = object.message) !== null && _b !== void 0 ? _b : "";
2260
- message.path = (_c = object.path) !== null && _c !== void 0 ? _c : "";
713
+ var _a;
714
+ const message = createBaseListAgentsResponse();
715
+ message.agents = ((_a = object.agents) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Agent.fromPartial(e))) || [];
2261
716
  return message;
2262
717
  },
2263
718
  };
2264
- function createBaseAgentRun() {
719
+ function createBaseAgentInput() {
2265
720
  return {
2266
- id: "",
2267
- organizationId: "",
2268
- agentDefinitionId: "",
2269
- agentVersionId: "",
2270
- status: 0,
2271
- createdByUserId: "",
2272
- chatSessionId: "",
2273
- workflowRunId: "",
2274
- workflowStepRunId: "",
2275
- input: undefined,
2276
- output: undefined,
2277
- errorCode: "",
2278
- safeErrorMessage: "",
2279
- createdAt: undefined,
2280
- startedAt: undefined,
2281
- finishedAt: undefined,
721
+ name: "",
722
+ slug: "",
723
+ description: "",
724
+ instructions: "",
725
+ defaultModelId: "",
726
+ defaultGenerateConfig: undefined,
727
+ includeContents: 0,
728
+ outputKey: "",
729
+ inputSchema: undefined,
730
+ outputSchema: undefined,
731
+ metadata: undefined,
732
+ tools: [],
2282
733
  };
2283
734
  }
2284
- exports.AgentRun = {
735
+ exports.AgentInput = {
2285
736
  encode(message, writer = new wire_1.BinaryWriter()) {
2286
- if (message.id !== "") {
2287
- writer.uint32(10).string(message.id);
2288
- }
2289
- if (message.organizationId !== "") {
2290
- writer.uint32(18).string(message.organizationId);
2291
- }
2292
- if (message.agentDefinitionId !== "") {
2293
- writer.uint32(26).string(message.agentDefinitionId);
2294
- }
2295
- if (message.agentVersionId !== "") {
2296
- writer.uint32(34).string(message.agentVersionId);
2297
- }
2298
- if (message.status !== 0) {
2299
- writer.uint32(40).int32(message.status);
737
+ if (message.name !== "") {
738
+ writer.uint32(10).string(message.name);
2300
739
  }
2301
- if (message.createdByUserId !== "") {
2302
- writer.uint32(50).string(message.createdByUserId);
740
+ if (message.slug !== "") {
741
+ writer.uint32(18).string(message.slug);
2303
742
  }
2304
- if (message.chatSessionId !== "") {
2305
- writer.uint32(58).string(message.chatSessionId);
743
+ if (message.description !== "") {
744
+ writer.uint32(26).string(message.description);
2306
745
  }
2307
- if (message.workflowRunId !== "") {
2308
- writer.uint32(66).string(message.workflowRunId);
746
+ if (message.instructions !== "") {
747
+ writer.uint32(34).string(message.instructions);
2309
748
  }
2310
- if (message.workflowStepRunId !== "") {
2311
- writer.uint32(74).string(message.workflowStepRunId);
749
+ if (message.defaultModelId !== "") {
750
+ writer.uint32(42).string(message.defaultModelId);
2312
751
  }
2313
- if (message.input !== undefined) {
2314
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.input), writer.uint32(82).fork()).join();
752
+ if (message.defaultGenerateConfig !== undefined) {
753
+ generate_pb_1.GenerateConfig.encode(message.defaultGenerateConfig, writer.uint32(50).fork()).join();
2315
754
  }
2316
- if (message.output !== undefined) {
2317
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.output), writer.uint32(90).fork()).join();
755
+ if (message.includeContents !== 0) {
756
+ writer.uint32(56).int32(message.includeContents);
2318
757
  }
2319
- if (message.errorCode !== "") {
2320
- writer.uint32(98).string(message.errorCode);
758
+ if (message.outputKey !== "") {
759
+ writer.uint32(66).string(message.outputKey);
2321
760
  }
2322
- if (message.safeErrorMessage !== "") {
2323
- writer.uint32(106).string(message.safeErrorMessage);
761
+ if (message.inputSchema !== undefined) {
762
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(74).fork()).join();
2324
763
  }
2325
- if (message.createdAt !== undefined) {
2326
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(114).fork()).join();
764
+ if (message.outputSchema !== undefined) {
765
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(82).fork()).join();
2327
766
  }
2328
- if (message.startedAt !== undefined) {
2329
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(122).fork()).join();
767
+ if (message.metadata !== undefined) {
768
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(90).fork()).join();
2330
769
  }
2331
- if (message.finishedAt !== undefined) {
2332
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(130).fork()).join();
770
+ for (const v of message.tools) {
771
+ tool_pb_1.AgentTool.encode(v, writer.uint32(98).fork()).join();
2333
772
  }
2334
773
  return writer;
2335
774
  },
2336
775
  decode(input, length) {
2337
776
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2338
777
  const end = length === undefined ? reader.len : reader.pos + length;
2339
- const message = createBaseAgentRun();
778
+ const message = createBaseAgentInput();
2340
779
  while (reader.pos < end) {
2341
780
  const tag = reader.uint32();
2342
781
  switch (tag >>> 3) {
@@ -2344,112 +783,84 @@ exports.AgentRun = {
2344
783
  if (tag !== 10) {
2345
784
  break;
2346
785
  }
2347
- message.id = reader.string();
786
+ message.name = reader.string();
2348
787
  continue;
2349
788
  }
2350
789
  case 2: {
2351
790
  if (tag !== 18) {
2352
791
  break;
2353
792
  }
2354
- message.organizationId = reader.string();
793
+ message.slug = reader.string();
2355
794
  continue;
2356
795
  }
2357
796
  case 3: {
2358
797
  if (tag !== 26) {
2359
798
  break;
2360
799
  }
2361
- message.agentDefinitionId = reader.string();
800
+ message.description = reader.string();
2362
801
  continue;
2363
802
  }
2364
803
  case 4: {
2365
804
  if (tag !== 34) {
2366
805
  break;
2367
806
  }
2368
- message.agentVersionId = reader.string();
807
+ message.instructions = reader.string();
2369
808
  continue;
2370
809
  }
2371
810
  case 5: {
2372
- if (tag !== 40) {
811
+ if (tag !== 42) {
2373
812
  break;
2374
813
  }
2375
- message.status = reader.int32();
814
+ message.defaultModelId = reader.string();
2376
815
  continue;
2377
816
  }
2378
817
  case 6: {
2379
818
  if (tag !== 50) {
2380
819
  break;
2381
820
  }
2382
- message.createdByUserId = reader.string();
821
+ message.defaultGenerateConfig = generate_pb_1.GenerateConfig.decode(reader, reader.uint32());
2383
822
  continue;
2384
823
  }
2385
824
  case 7: {
2386
- if (tag !== 58) {
825
+ if (tag !== 56) {
2387
826
  break;
2388
827
  }
2389
- message.chatSessionId = reader.string();
828
+ message.includeContents = reader.int32();
2390
829
  continue;
2391
830
  }
2392
831
  case 8: {
2393
832
  if (tag !== 66) {
2394
833
  break;
2395
834
  }
2396
- message.workflowRunId = reader.string();
835
+ message.outputKey = reader.string();
2397
836
  continue;
2398
837
  }
2399
838
  case 9: {
2400
839
  if (tag !== 74) {
2401
840
  break;
2402
841
  }
2403
- message.workflowStepRunId = reader.string();
842
+ message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
2404
843
  continue;
2405
844
  }
2406
845
  case 10: {
2407
846
  if (tag !== 82) {
2408
847
  break;
2409
848
  }
2410
- message.input = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
849
+ message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
2411
850
  continue;
2412
851
  }
2413
852
  case 11: {
2414
853
  if (tag !== 90) {
2415
854
  break;
2416
855
  }
2417
- message.output = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
856
+ message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
2418
857
  continue;
2419
858
  }
2420
859
  case 12: {
2421
860
  if (tag !== 98) {
2422
861
  break;
2423
862
  }
2424
- message.errorCode = reader.string();
2425
- continue;
2426
- }
2427
- case 13: {
2428
- if (tag !== 106) {
2429
- break;
2430
- }
2431
- message.safeErrorMessage = reader.string();
2432
- continue;
2433
- }
2434
- case 14: {
2435
- if (tag !== 114) {
2436
- break;
2437
- }
2438
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
2439
- continue;
2440
- }
2441
- case 15: {
2442
- if (tag !== 122) {
2443
- break;
2444
- }
2445
- message.startedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
2446
- continue;
2447
- }
2448
- case 16: {
2449
- if (tag !== 130) {
2450
- break;
2451
- }
2452
- message.finishedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
863
+ message.tools.push(tool_pb_1.AgentTool.decode(reader, reader.uint32()));
2453
864
  continue;
2454
865
  }
2455
866
  }
@@ -2462,193 +873,176 @@ exports.AgentRun = {
2462
873
  },
2463
874
  fromJSON(object) {
2464
875
  return {
2465
- id: isSet(object.id) ? globalThis.String(object.id) : "",
2466
- organizationId: isSet(object.organizationId)
2467
- ? globalThis.String(object.organizationId)
2468
- : isSet(object.organization_id)
2469
- ? globalThis.String(object.organization_id)
2470
- : "",
2471
- agentDefinitionId: isSet(object.agentDefinitionId)
2472
- ? globalThis.String(object.agentDefinitionId)
2473
- : isSet(object.agent_definition_id)
2474
- ? globalThis.String(object.agent_definition_id)
2475
- : "",
2476
- agentVersionId: isSet(object.agentVersionId)
2477
- ? globalThis.String(object.agentVersionId)
2478
- : isSet(object.agent_version_id)
2479
- ? globalThis.String(object.agent_version_id)
2480
- : "",
2481
- status: isSet(object.status) ? agentRunStatusFromJSON(object.status) : 0,
2482
- createdByUserId: isSet(object.createdByUserId)
2483
- ? globalThis.String(object.createdByUserId)
2484
- : isSet(object.created_by_user_id)
2485
- ? globalThis.String(object.created_by_user_id)
2486
- : "",
2487
- chatSessionId: isSet(object.chatSessionId)
2488
- ? globalThis.String(object.chatSessionId)
2489
- : isSet(object.chat_session_id)
2490
- ? globalThis.String(object.chat_session_id)
2491
- : "",
2492
- workflowRunId: isSet(object.workflowRunId)
2493
- ? globalThis.String(object.workflowRunId)
2494
- : isSet(object.workflow_run_id)
2495
- ? globalThis.String(object.workflow_run_id)
2496
- : "",
2497
- workflowStepRunId: isSet(object.workflowStepRunId)
2498
- ? globalThis.String(object.workflowStepRunId)
2499
- : isSet(object.workflow_step_run_id)
2500
- ? globalThis.String(object.workflow_step_run_id)
2501
- : "",
2502
- input: isObject(object.input) ? object.input : undefined,
2503
- output: isObject(object.output) ? object.output : undefined,
2504
- errorCode: isSet(object.errorCode)
2505
- ? globalThis.String(object.errorCode)
2506
- : isSet(object.error_code)
2507
- ? globalThis.String(object.error_code)
2508
- : "",
2509
- safeErrorMessage: isSet(object.safeErrorMessage)
2510
- ? globalThis.String(object.safeErrorMessage)
2511
- : isSet(object.safe_error_message)
2512
- ? globalThis.String(object.safe_error_message)
876
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
877
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
878
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
879
+ instructions: isSet(object.instructions) ? globalThis.String(object.instructions) : "",
880
+ defaultModelId: isSet(object.defaultModelId)
881
+ ? globalThis.String(object.defaultModelId)
882
+ : isSet(object.default_model_id)
883
+ ? globalThis.String(object.default_model_id)
2513
884
  : "",
2514
- createdAt: isSet(object.createdAt)
2515
- ? fromJsonTimestamp(object.createdAt)
2516
- : isSet(object.created_at)
2517
- ? fromJsonTimestamp(object.created_at)
885
+ defaultGenerateConfig: isSet(object.defaultGenerateConfig)
886
+ ? generate_pb_1.GenerateConfig.fromJSON(object.defaultGenerateConfig)
887
+ : isSet(object.default_generate_config)
888
+ ? generate_pb_1.GenerateConfig.fromJSON(object.default_generate_config)
2518
889
  : undefined,
2519
- startedAt: isSet(object.startedAt)
2520
- ? fromJsonTimestamp(object.startedAt)
2521
- : isSet(object.started_at)
2522
- ? fromJsonTimestamp(object.started_at)
890
+ includeContents: isSet(object.includeContents)
891
+ ? includeContentsFromJSON(object.includeContents)
892
+ : isSet(object.include_contents)
893
+ ? includeContentsFromJSON(object.include_contents)
894
+ : 0,
895
+ outputKey: isSet(object.outputKey)
896
+ ? globalThis.String(object.outputKey)
897
+ : isSet(object.output_key)
898
+ ? globalThis.String(object.output_key)
899
+ : "",
900
+ inputSchema: isObject(object.inputSchema)
901
+ ? object.inputSchema
902
+ : isObject(object.input_schema)
903
+ ? object.input_schema
2523
904
  : undefined,
2524
- finishedAt: isSet(object.finishedAt)
2525
- ? fromJsonTimestamp(object.finishedAt)
2526
- : isSet(object.finished_at)
2527
- ? fromJsonTimestamp(object.finished_at)
905
+ outputSchema: isObject(object.outputSchema)
906
+ ? object.outputSchema
907
+ : isObject(object.output_schema)
908
+ ? object.output_schema
2528
909
  : undefined,
910
+ metadata: isObject(object.metadata) ? object.metadata : undefined,
911
+ tools: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tools)
912
+ ? object.tools.map((e) => tool_pb_1.AgentTool.fromJSON(e))
913
+ : [],
2529
914
  };
2530
915
  },
2531
916
  toJSON(message) {
917
+ var _a;
2532
918
  const obj = {};
2533
- if (message.id !== "") {
2534
- obj.id = message.id;
2535
- }
2536
- if (message.organizationId !== "") {
2537
- obj.organizationId = message.organizationId;
2538
- }
2539
- if (message.agentDefinitionId !== "") {
2540
- obj.agentDefinitionId = message.agentDefinitionId;
2541
- }
2542
- if (message.agentVersionId !== "") {
2543
- obj.agentVersionId = message.agentVersionId;
2544
- }
2545
- if (message.status !== 0) {
2546
- obj.status = agentRunStatusToJSON(message.status);
919
+ if (message.name !== "") {
920
+ obj.name = message.name;
2547
921
  }
2548
- if (message.createdByUserId !== "") {
2549
- obj.createdByUserId = message.createdByUserId;
922
+ if (message.slug !== "") {
923
+ obj.slug = message.slug;
2550
924
  }
2551
- if (message.chatSessionId !== "") {
2552
- obj.chatSessionId = message.chatSessionId;
925
+ if (message.description !== "") {
926
+ obj.description = message.description;
2553
927
  }
2554
- if (message.workflowRunId !== "") {
2555
- obj.workflowRunId = message.workflowRunId;
928
+ if (message.instructions !== "") {
929
+ obj.instructions = message.instructions;
2556
930
  }
2557
- if (message.workflowStepRunId !== "") {
2558
- obj.workflowStepRunId = message.workflowStepRunId;
931
+ if (message.defaultModelId !== "") {
932
+ obj.defaultModelId = message.defaultModelId;
2559
933
  }
2560
- if (message.input !== undefined) {
2561
- obj.input = message.input;
934
+ if (message.defaultGenerateConfig !== undefined) {
935
+ obj.defaultGenerateConfig = generate_pb_1.GenerateConfig.toJSON(message.defaultGenerateConfig);
2562
936
  }
2563
- if (message.output !== undefined) {
2564
- obj.output = message.output;
937
+ if (message.includeContents !== 0) {
938
+ obj.includeContents = includeContentsToJSON(message.includeContents);
2565
939
  }
2566
- if (message.errorCode !== "") {
2567
- obj.errorCode = message.errorCode;
940
+ if (message.outputKey !== "") {
941
+ obj.outputKey = message.outputKey;
2568
942
  }
2569
- if (message.safeErrorMessage !== "") {
2570
- obj.safeErrorMessage = message.safeErrorMessage;
943
+ if (message.inputSchema !== undefined) {
944
+ obj.inputSchema = message.inputSchema;
2571
945
  }
2572
- if (message.createdAt !== undefined) {
2573
- obj.createdAt = message.createdAt.toISOString();
946
+ if (message.outputSchema !== undefined) {
947
+ obj.outputSchema = message.outputSchema;
2574
948
  }
2575
- if (message.startedAt !== undefined) {
2576
- obj.startedAt = message.startedAt.toISOString();
949
+ if (message.metadata !== undefined) {
950
+ obj.metadata = message.metadata;
2577
951
  }
2578
- if (message.finishedAt !== undefined) {
2579
- obj.finishedAt = message.finishedAt.toISOString();
952
+ if ((_a = message.tools) === null || _a === void 0 ? void 0 : _a.length) {
953
+ obj.tools = message.tools.map((e) => tool_pb_1.AgentTool.toJSON(e));
2580
954
  }
2581
955
  return obj;
2582
956
  },
2583
957
  create(base) {
2584
- return exports.AgentRun.fromPartial(base !== null && base !== void 0 ? base : {});
958
+ return exports.AgentInput.fromPartial(base !== null && base !== void 0 ? base : {});
2585
959
  },
2586
960
  fromPartial(object) {
2587
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
2588
- const message = createBaseAgentRun();
2589
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
2590
- message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
2591
- message.agentDefinitionId = (_c = object.agentDefinitionId) !== null && _c !== void 0 ? _c : "";
2592
- message.agentVersionId = (_d = object.agentVersionId) !== null && _d !== void 0 ? _d : "";
2593
- message.status = (_e = object.status) !== null && _e !== void 0 ? _e : 0;
2594
- message.createdByUserId = (_f = object.createdByUserId) !== null && _f !== void 0 ? _f : "";
2595
- message.chatSessionId = (_g = object.chatSessionId) !== null && _g !== void 0 ? _g : "";
2596
- message.workflowRunId = (_h = object.workflowRunId) !== null && _h !== void 0 ? _h : "";
2597
- message.workflowStepRunId = (_j = object.workflowStepRunId) !== null && _j !== void 0 ? _j : "";
2598
- message.input = (_k = object.input) !== null && _k !== void 0 ? _k : undefined;
2599
- message.output = (_l = object.output) !== null && _l !== void 0 ? _l : undefined;
2600
- message.errorCode = (_m = object.errorCode) !== null && _m !== void 0 ? _m : "";
2601
- message.safeErrorMessage = (_o = object.safeErrorMessage) !== null && _o !== void 0 ? _o : "";
2602
- message.createdAt = (_p = object.createdAt) !== null && _p !== void 0 ? _p : undefined;
2603
- message.startedAt = (_q = object.startedAt) !== null && _q !== void 0 ? _q : undefined;
2604
- message.finishedAt = (_r = object.finishedAt) !== null && _r !== void 0 ? _r : undefined;
961
+ var _a;
962
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
963
+ const message = createBaseAgentInput();
964
+ message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
965
+ message.slug = (_c = object.slug) !== null && _c !== void 0 ? _c : "";
966
+ message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
967
+ message.instructions = (_e = object.instructions) !== null && _e !== void 0 ? _e : "";
968
+ message.defaultModelId = (_f = object.defaultModelId) !== null && _f !== void 0 ? _f : "";
969
+ message.defaultGenerateConfig =
970
+ (object.defaultGenerateConfig !== undefined && object.defaultGenerateConfig !== null)
971
+ ? generate_pb_1.GenerateConfig.fromPartial(object.defaultGenerateConfig)
972
+ : undefined;
973
+ message.includeContents = (_g = object.includeContents) !== null && _g !== void 0 ? _g : 0;
974
+ message.outputKey = (_h = object.outputKey) !== null && _h !== void 0 ? _h : "";
975
+ message.inputSchema = (_j = object.inputSchema) !== null && _j !== void 0 ? _j : undefined;
976
+ message.outputSchema = (_k = object.outputSchema) !== null && _k !== void 0 ? _k : undefined;
977
+ message.metadata = (_l = object.metadata) !== null && _l !== void 0 ? _l : undefined;
978
+ message.tools = ((_a = object.tools) === null || _a === void 0 ? void 0 : _a.map((e) => tool_pb_1.AgentTool.fromPartial(e))) || [];
2605
979
  return message;
2606
980
  },
2607
981
  };
2608
- function createBaseAgentRunEvent() {
982
+ function createBaseAgent() {
2609
983
  return {
2610
984
  id: "",
2611
- organizationId: "",
2612
- agentRunId: "",
2613
- sequence: 0,
2614
- kind: 0,
2615
- message: "",
2616
- payload: undefined,
2617
- createdAt: undefined,
985
+ slug: "",
986
+ name: "",
987
+ description: "",
988
+ instructions: "",
989
+ defaultModel: undefined,
990
+ defaultGenerateConfig: undefined,
991
+ includeContents: 0,
992
+ outputKey: "",
993
+ inputSchema: undefined,
994
+ outputSchema: undefined,
995
+ metadata: undefined,
996
+ tools: [],
2618
997
  };
2619
998
  }
2620
- exports.AgentRunEvent = {
999
+ exports.Agent = {
2621
1000
  encode(message, writer = new wire_1.BinaryWriter()) {
2622
1001
  if (message.id !== "") {
2623
1002
  writer.uint32(10).string(message.id);
2624
1003
  }
2625
- if (message.organizationId !== "") {
2626
- writer.uint32(18).string(message.organizationId);
1004
+ if (message.slug !== "") {
1005
+ writer.uint32(18).string(message.slug);
1006
+ }
1007
+ if (message.name !== "") {
1008
+ writer.uint32(26).string(message.name);
1009
+ }
1010
+ if (message.description !== "") {
1011
+ writer.uint32(34).string(message.description);
1012
+ }
1013
+ if (message.instructions !== "") {
1014
+ writer.uint32(42).string(message.instructions);
1015
+ }
1016
+ if (message.defaultModel !== undefined) {
1017
+ model_pb_1.Model.encode(message.defaultModel, writer.uint32(50).fork()).join();
2627
1018
  }
2628
- if (message.agentRunId !== "") {
2629
- writer.uint32(26).string(message.agentRunId);
1019
+ if (message.defaultGenerateConfig !== undefined) {
1020
+ generate_pb_1.GenerateConfig.encode(message.defaultGenerateConfig, writer.uint32(58).fork()).join();
2630
1021
  }
2631
- if (message.sequence !== 0) {
2632
- writer.uint32(32).uint64(message.sequence);
1022
+ if (message.includeContents !== 0) {
1023
+ writer.uint32(64).int32(message.includeContents);
2633
1024
  }
2634
- if (message.kind !== 0) {
2635
- writer.uint32(40).int32(message.kind);
1025
+ if (message.outputKey !== "") {
1026
+ writer.uint32(74).string(message.outputKey);
1027
+ }
1028
+ if (message.inputSchema !== undefined) {
1029
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(82).fork()).join();
2636
1030
  }
2637
- if (message.message !== "") {
2638
- writer.uint32(50).string(message.message);
1031
+ if (message.outputSchema !== undefined) {
1032
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(90).fork()).join();
2639
1033
  }
2640
- if (message.payload !== undefined) {
2641
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.payload), writer.uint32(58).fork()).join();
1034
+ if (message.metadata !== undefined) {
1035
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(98).fork()).join();
2642
1036
  }
2643
- if (message.createdAt !== undefined) {
2644
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
1037
+ for (const v of message.tools) {
1038
+ tool_pb_1.AgentTool.encode(v, writer.uint32(106).fork()).join();
2645
1039
  }
2646
1040
  return writer;
2647
1041
  },
2648
1042
  decode(input, length) {
2649
1043
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2650
1044
  const end = length === undefined ? reader.len : reader.pos + length;
2651
- const message = createBaseAgentRunEvent();
1045
+ const message = createBaseAgent();
2652
1046
  while (reader.pos < end) {
2653
1047
  const tag = reader.uint32();
2654
1048
  switch (tag >>> 3) {
@@ -2663,49 +1057,84 @@ exports.AgentRunEvent = {
2663
1057
  if (tag !== 18) {
2664
1058
  break;
2665
1059
  }
2666
- message.organizationId = reader.string();
1060
+ message.slug = reader.string();
2667
1061
  continue;
2668
1062
  }
2669
1063
  case 3: {
2670
1064
  if (tag !== 26) {
2671
1065
  break;
2672
1066
  }
2673
- message.agentRunId = reader.string();
1067
+ message.name = reader.string();
2674
1068
  continue;
2675
1069
  }
2676
1070
  case 4: {
2677
- if (tag !== 32) {
1071
+ if (tag !== 34) {
2678
1072
  break;
2679
1073
  }
2680
- message.sequence = longToNumber(reader.uint64());
1074
+ message.description = reader.string();
2681
1075
  continue;
2682
1076
  }
2683
1077
  case 5: {
2684
- if (tag !== 40) {
1078
+ if (tag !== 42) {
2685
1079
  break;
2686
1080
  }
2687
- message.kind = reader.int32();
1081
+ message.instructions = reader.string();
2688
1082
  continue;
2689
1083
  }
2690
1084
  case 6: {
2691
1085
  if (tag !== 50) {
2692
1086
  break;
2693
1087
  }
2694
- message.message = reader.string();
1088
+ message.defaultModel = model_pb_1.Model.decode(reader, reader.uint32());
2695
1089
  continue;
2696
1090
  }
2697
1091
  case 7: {
2698
1092
  if (tag !== 58) {
2699
1093
  break;
2700
1094
  }
2701
- message.payload = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1095
+ message.defaultGenerateConfig = generate_pb_1.GenerateConfig.decode(reader, reader.uint32());
2702
1096
  continue;
2703
1097
  }
2704
1098
  case 8: {
2705
- if (tag !== 66) {
1099
+ if (tag !== 64) {
1100
+ break;
1101
+ }
1102
+ message.includeContents = reader.int32();
1103
+ continue;
1104
+ }
1105
+ case 9: {
1106
+ if (tag !== 74) {
1107
+ break;
1108
+ }
1109
+ message.outputKey = reader.string();
1110
+ continue;
1111
+ }
1112
+ case 10: {
1113
+ if (tag !== 82) {
1114
+ break;
1115
+ }
1116
+ message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1117
+ continue;
1118
+ }
1119
+ case 11: {
1120
+ if (tag !== 90) {
1121
+ break;
1122
+ }
1123
+ message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1124
+ continue;
1125
+ }
1126
+ case 12: {
1127
+ if (tag !== 98) {
1128
+ break;
1129
+ }
1130
+ message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1131
+ continue;
1132
+ }
1133
+ case 13: {
1134
+ if (tag !== 106) {
2706
1135
  break;
2707
1136
  }
2708
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1137
+ message.tools.push(tool_pb_1.AgentTool.decode(reader, reader.uint32()));
2709
1138
  continue;
2710
1139
  }
2711
1140
  }
@@ -2719,103 +1148,414 @@ exports.AgentRunEvent = {
2719
1148
  fromJSON(object) {
2720
1149
  return {
2721
1150
  id: isSet(object.id) ? globalThis.String(object.id) : "",
2722
- organizationId: isSet(object.organizationId)
2723
- ? globalThis.String(object.organizationId)
2724
- : isSet(object.organization_id)
2725
- ? globalThis.String(object.organization_id)
2726
- : "",
2727
- agentRunId: isSet(object.agentRunId)
2728
- ? globalThis.String(object.agentRunId)
2729
- : isSet(object.agent_run_id)
2730
- ? globalThis.String(object.agent_run_id)
1151
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
1152
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1153
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
1154
+ instructions: isSet(object.instructions) ? globalThis.String(object.instructions) : "",
1155
+ defaultModel: isSet(object.defaultModel)
1156
+ ? model_pb_1.Model.fromJSON(object.defaultModel)
1157
+ : isSet(object.default_model)
1158
+ ? model_pb_1.Model.fromJSON(object.default_model)
1159
+ : undefined,
1160
+ defaultGenerateConfig: isSet(object.defaultGenerateConfig)
1161
+ ? generate_pb_1.GenerateConfig.fromJSON(object.defaultGenerateConfig)
1162
+ : isSet(object.default_generate_config)
1163
+ ? generate_pb_1.GenerateConfig.fromJSON(object.default_generate_config)
1164
+ : undefined,
1165
+ includeContents: isSet(object.includeContents)
1166
+ ? includeContentsFromJSON(object.includeContents)
1167
+ : isSet(object.include_contents)
1168
+ ? includeContentsFromJSON(object.include_contents)
1169
+ : 0,
1170
+ outputKey: isSet(object.outputKey)
1171
+ ? globalThis.String(object.outputKey)
1172
+ : isSet(object.output_key)
1173
+ ? globalThis.String(object.output_key)
2731
1174
  : "",
2732
- sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
2733
- kind: isSet(object.kind) ? agentRunEventKindFromJSON(object.kind) : 0,
2734
- message: isSet(object.message) ? globalThis.String(object.message) : "",
2735
- payload: isObject(object.payload) ? object.payload : undefined,
2736
- createdAt: isSet(object.createdAt)
2737
- ? fromJsonTimestamp(object.createdAt)
2738
- : isSet(object.created_at)
2739
- ? fromJsonTimestamp(object.created_at)
1175
+ inputSchema: isObject(object.inputSchema)
1176
+ ? object.inputSchema
1177
+ : isObject(object.input_schema)
1178
+ ? object.input_schema
2740
1179
  : undefined,
1180
+ outputSchema: isObject(object.outputSchema)
1181
+ ? object.outputSchema
1182
+ : isObject(object.output_schema)
1183
+ ? object.output_schema
1184
+ : undefined,
1185
+ metadata: isObject(object.metadata) ? object.metadata : undefined,
1186
+ tools: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tools)
1187
+ ? object.tools.map((e) => tool_pb_1.AgentTool.fromJSON(e))
1188
+ : [],
2741
1189
  };
2742
1190
  },
2743
1191
  toJSON(message) {
1192
+ var _a;
2744
1193
  const obj = {};
2745
1194
  if (message.id !== "") {
2746
1195
  obj.id = message.id;
2747
1196
  }
2748
- if (message.organizationId !== "") {
2749
- obj.organizationId = message.organizationId;
1197
+ if (message.slug !== "") {
1198
+ obj.slug = message.slug;
1199
+ }
1200
+ if (message.name !== "") {
1201
+ obj.name = message.name;
1202
+ }
1203
+ if (message.description !== "") {
1204
+ obj.description = message.description;
1205
+ }
1206
+ if (message.instructions !== "") {
1207
+ obj.instructions = message.instructions;
1208
+ }
1209
+ if (message.defaultModel !== undefined) {
1210
+ obj.defaultModel = model_pb_1.Model.toJSON(message.defaultModel);
1211
+ }
1212
+ if (message.defaultGenerateConfig !== undefined) {
1213
+ obj.defaultGenerateConfig = generate_pb_1.GenerateConfig.toJSON(message.defaultGenerateConfig);
2750
1214
  }
2751
- if (message.agentRunId !== "") {
2752
- obj.agentRunId = message.agentRunId;
1215
+ if (message.includeContents !== 0) {
1216
+ obj.includeContents = includeContentsToJSON(message.includeContents);
2753
1217
  }
2754
- if (message.sequence !== 0) {
2755
- obj.sequence = Math.round(message.sequence);
1218
+ if (message.outputKey !== "") {
1219
+ obj.outputKey = message.outputKey;
2756
1220
  }
2757
- if (message.kind !== 0) {
2758
- obj.kind = agentRunEventKindToJSON(message.kind);
1221
+ if (message.inputSchema !== undefined) {
1222
+ obj.inputSchema = message.inputSchema;
2759
1223
  }
2760
- if (message.message !== "") {
2761
- obj.message = message.message;
1224
+ if (message.outputSchema !== undefined) {
1225
+ obj.outputSchema = message.outputSchema;
2762
1226
  }
2763
- if (message.payload !== undefined) {
2764
- obj.payload = message.payload;
1227
+ if (message.metadata !== undefined) {
1228
+ obj.metadata = message.metadata;
2765
1229
  }
2766
- if (message.createdAt !== undefined) {
2767
- obj.createdAt = message.createdAt.toISOString();
1230
+ if ((_a = message.tools) === null || _a === void 0 ? void 0 : _a.length) {
1231
+ obj.tools = message.tools.map((e) => tool_pb_1.AgentTool.toJSON(e));
2768
1232
  }
2769
1233
  return obj;
2770
1234
  },
2771
1235
  create(base) {
2772
- return exports.AgentRunEvent.fromPartial(base !== null && base !== void 0 ? base : {});
1236
+ return exports.Agent.fromPartial(base !== null && base !== void 0 ? base : {});
2773
1237
  },
2774
1238
  fromPartial(object) {
2775
- var _a, _b, _c, _d, _e, _f, _g, _h;
2776
- const message = createBaseAgentRunEvent();
2777
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
2778
- message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
2779
- message.agentRunId = (_c = object.agentRunId) !== null && _c !== void 0 ? _c : "";
2780
- message.sequence = (_d = object.sequence) !== null && _d !== void 0 ? _d : 0;
2781
- message.kind = (_e = object.kind) !== null && _e !== void 0 ? _e : 0;
2782
- message.message = (_f = object.message) !== null && _f !== void 0 ? _f : "";
2783
- message.payload = (_g = object.payload) !== null && _g !== void 0 ? _g : undefined;
2784
- message.createdAt = (_h = object.createdAt) !== null && _h !== void 0 ? _h : undefined;
1239
+ var _a;
1240
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1241
+ const message = createBaseAgent();
1242
+ message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
1243
+ message.slug = (_c = object.slug) !== null && _c !== void 0 ? _c : "";
1244
+ message.name = (_d = object.name) !== null && _d !== void 0 ? _d : "";
1245
+ message.description = (_e = object.description) !== null && _e !== void 0 ? _e : "";
1246
+ message.instructions = (_f = object.instructions) !== null && _f !== void 0 ? _f : "";
1247
+ message.defaultModel = (object.defaultModel !== undefined && object.defaultModel !== null)
1248
+ ? model_pb_1.Model.fromPartial(object.defaultModel)
1249
+ : undefined;
1250
+ message.defaultGenerateConfig =
1251
+ (object.defaultGenerateConfig !== undefined && object.defaultGenerateConfig !== null)
1252
+ ? generate_pb_1.GenerateConfig.fromPartial(object.defaultGenerateConfig)
1253
+ : undefined;
1254
+ message.includeContents = (_g = object.includeContents) !== null && _g !== void 0 ? _g : 0;
1255
+ message.outputKey = (_h = object.outputKey) !== null && _h !== void 0 ? _h : "";
1256
+ message.inputSchema = (_j = object.inputSchema) !== null && _j !== void 0 ? _j : undefined;
1257
+ message.outputSchema = (_k = object.outputSchema) !== null && _k !== void 0 ? _k : undefined;
1258
+ message.metadata = (_l = object.metadata) !== null && _l !== void 0 ? _l : undefined;
1259
+ message.tools = ((_a = object.tools) === null || _a === void 0 ? void 0 : _a.map((e) => tool_pb_1.AgentTool.fromPartial(e))) || [];
2785
1260
  return message;
2786
1261
  },
2787
1262
  };
2788
- function toTimestamp(date) {
2789
- const seconds = Math.trunc(date.getTime() / 1000);
2790
- const nanos = (date.getTime() % 1000) * 1000000;
2791
- return { seconds, nanos };
2792
- }
2793
- function fromTimestamp(t) {
2794
- let millis = (t.seconds || 0) * 1000;
2795
- millis += (t.nanos || 0) / 1000000;
2796
- return new globalThis.Date(millis);
2797
- }
2798
- function fromJsonTimestamp(o) {
2799
- if (o instanceof globalThis.Date) {
2800
- return o;
1263
+ exports.AgentServiceServiceName = "weaveapi.agent.v1.AgentService";
1264
+ class AgentServiceClientImpl {
1265
+ constructor(rpc, opts) {
1266
+ this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.AgentServiceServiceName;
1267
+ this.rpc = rpc;
1268
+ this.CreateAgent = this.CreateAgent.bind(this);
1269
+ this.GetAgent = this.GetAgent.bind(this);
1270
+ this.UpdateAgent = this.UpdateAgent.bind(this);
1271
+ this.ListAgents = this.ListAgents.bind(this);
2801
1272
  }
2802
- else if (typeof o === "string") {
2803
- return new globalThis.Date(o);
1273
+ CreateAgent(request) {
1274
+ const data = exports.CreateAgentRequest.encode(request).finish();
1275
+ const promise = this.rpc.request(this.service, "CreateAgent", data);
1276
+ return promise.then((data) => exports.CreateAgentResponse.decode(new wire_1.BinaryReader(data)));
2804
1277
  }
2805
- else {
2806
- return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
1278
+ GetAgent(request) {
1279
+ const data = exports.GetAgentRequest.encode(request).finish();
1280
+ const promise = this.rpc.request(this.service, "GetAgent", data);
1281
+ return promise.then((data) => exports.GetAgentResponse.decode(new wire_1.BinaryReader(data)));
2807
1282
  }
2808
- }
2809
- function longToNumber(int64) {
2810
- const num = globalThis.Number(int64.toString());
2811
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
2812
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1283
+ UpdateAgent(request) {
1284
+ const data = exports.UpdateAgentRequest.encode(request).finish();
1285
+ const promise = this.rpc.request(this.service, "UpdateAgent", data);
1286
+ return promise.then((data) => exports.UpdateAgentResponse.decode(new wire_1.BinaryReader(data)));
2813
1287
  }
2814
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
2815
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
1288
+ ListAgents(request) {
1289
+ const data = exports.ListAgentsRequest.encode(request).finish();
1290
+ const promise = this.rpc.request(this.service, "ListAgents", data);
1291
+ return promise.then((data) => exports.ListAgentsResponse.decode(new wire_1.BinaryReader(data)));
2816
1292
  }
2817
- return num;
2818
1293
  }
1294
+ exports.AgentServiceClientImpl = AgentServiceClientImpl;
1295
+ exports.AgentServiceDefinition = {
1296
+ name: "AgentService",
1297
+ fullName: "weaveapi.agent.v1.AgentService",
1298
+ methods: {
1299
+ createAgent: {
1300
+ name: "CreateAgent",
1301
+ requestType: exports.CreateAgentRequest,
1302
+ requestStream: false,
1303
+ responseType: exports.CreateAgentResponse,
1304
+ responseStream: false,
1305
+ options: {
1306
+ _unknownFields: {
1307
+ 408002: [
1308
+ new Uint8Array([
1309
+ 36,
1310
+ 10,
1311
+ 12,
1312
+ 111,
1313
+ 114,
1314
+ 103,
1315
+ 97,
1316
+ 110,
1317
+ 105,
1318
+ 122,
1319
+ 97,
1320
+ 116,
1321
+ 105,
1322
+ 111,
1323
+ 110,
1324
+ 18,
1325
+ 16,
1326
+ 99,
1327
+ 97,
1328
+ 110,
1329
+ 95,
1330
+ 99,
1331
+ 114,
1332
+ 101,
1333
+ 97,
1334
+ 116,
1335
+ 101,
1336
+ 95,
1337
+ 97,
1338
+ 103,
1339
+ 101,
1340
+ 110,
1341
+ 116,
1342
+ 26,
1343
+ 2,
1344
+ 8,
1345
+ 1,
1346
+ ]),
1347
+ ],
1348
+ 578365826: [
1349
+ new Uint8Array([15, 58, 1, 42, 34, 10, 47, 118, 49, 47, 97, 103, 101, 110, 116, 115]),
1350
+ ],
1351
+ },
1352
+ },
1353
+ },
1354
+ getAgent: {
1355
+ name: "GetAgent",
1356
+ requestType: exports.GetAgentRequest,
1357
+ requestStream: false,
1358
+ responseType: exports.GetAgentResponse,
1359
+ responseStream: false,
1360
+ options: {
1361
+ _unknownFields: {
1362
+ 408002: [
1363
+ new Uint8Array([
1364
+ 29,
1365
+ 10,
1366
+ 5,
1367
+ 97,
1368
+ 103,
1369
+ 101,
1370
+ 110,
1371
+ 116,
1372
+ 18,
1373
+ 8,
1374
+ 99,
1375
+ 97,
1376
+ 110,
1377
+ 95,
1378
+ 114,
1379
+ 101,
1380
+ 97,
1381
+ 100,
1382
+ 26,
1383
+ 10,
1384
+ 18,
1385
+ 8,
1386
+ 97,
1387
+ 103,
1388
+ 101,
1389
+ 110,
1390
+ 116,
1391
+ 95,
1392
+ 105,
1393
+ 100,
1394
+ ]),
1395
+ ],
1396
+ 578365826: [
1397
+ new Uint8Array([
1398
+ 23,
1399
+ 18,
1400
+ 21,
1401
+ 47,
1402
+ 118,
1403
+ 49,
1404
+ 47,
1405
+ 97,
1406
+ 103,
1407
+ 101,
1408
+ 110,
1409
+ 116,
1410
+ 115,
1411
+ 47,
1412
+ 123,
1413
+ 97,
1414
+ 103,
1415
+ 101,
1416
+ 110,
1417
+ 116,
1418
+ 95,
1419
+ 105,
1420
+ 100,
1421
+ 125,
1422
+ ]),
1423
+ ],
1424
+ },
1425
+ },
1426
+ },
1427
+ updateAgent: {
1428
+ name: "UpdateAgent",
1429
+ requestType: exports.UpdateAgentRequest,
1430
+ requestStream: false,
1431
+ responseType: exports.UpdateAgentResponse,
1432
+ responseStream: false,
1433
+ options: {
1434
+ _unknownFields: {
1435
+ 408002: [
1436
+ new Uint8Array([
1437
+ 31,
1438
+ 10,
1439
+ 5,
1440
+ 97,
1441
+ 103,
1442
+ 101,
1443
+ 110,
1444
+ 116,
1445
+ 18,
1446
+ 10,
1447
+ 99,
1448
+ 97,
1449
+ 110,
1450
+ 95,
1451
+ 117,
1452
+ 112,
1453
+ 100,
1454
+ 97,
1455
+ 116,
1456
+ 101,
1457
+ 26,
1458
+ 10,
1459
+ 18,
1460
+ 8,
1461
+ 97,
1462
+ 103,
1463
+ 101,
1464
+ 110,
1465
+ 116,
1466
+ 95,
1467
+ 105,
1468
+ 100,
1469
+ ]),
1470
+ ],
1471
+ 578365826: [
1472
+ new Uint8Array([
1473
+ 26,
1474
+ 58,
1475
+ 1,
1476
+ 42,
1477
+ 50,
1478
+ 21,
1479
+ 47,
1480
+ 118,
1481
+ 49,
1482
+ 47,
1483
+ 97,
1484
+ 103,
1485
+ 101,
1486
+ 110,
1487
+ 116,
1488
+ 115,
1489
+ 47,
1490
+ 123,
1491
+ 97,
1492
+ 103,
1493
+ 101,
1494
+ 110,
1495
+ 116,
1496
+ 95,
1497
+ 105,
1498
+ 100,
1499
+ 125,
1500
+ ]),
1501
+ ],
1502
+ },
1503
+ },
1504
+ },
1505
+ listAgents: {
1506
+ name: "ListAgents",
1507
+ requestType: exports.ListAgentsRequest,
1508
+ requestStream: false,
1509
+ responseType: exports.ListAgentsResponse,
1510
+ responseStream: false,
1511
+ options: {
1512
+ _unknownFields: {
1513
+ 408002: [
1514
+ new Uint8Array([
1515
+ 35,
1516
+ 10,
1517
+ 12,
1518
+ 111,
1519
+ 114,
1520
+ 103,
1521
+ 97,
1522
+ 110,
1523
+ 105,
1524
+ 122,
1525
+ 97,
1526
+ 116,
1527
+ 105,
1528
+ 111,
1529
+ 110,
1530
+ 18,
1531
+ 15,
1532
+ 99,
1533
+ 97,
1534
+ 110,
1535
+ 95,
1536
+ 108,
1537
+ 105,
1538
+ 115,
1539
+ 116,
1540
+ 95,
1541
+ 97,
1542
+ 103,
1543
+ 101,
1544
+ 110,
1545
+ 116,
1546
+ 115,
1547
+ 26,
1548
+ 2,
1549
+ 8,
1550
+ 1,
1551
+ ]),
1552
+ ],
1553
+ 578365826: [new Uint8Array([12, 18, 10, 47, 118, 49, 47, 97, 103, 101, 110, 116, 115])],
1554
+ },
1555
+ },
1556
+ },
1557
+ },
1558
+ };
2819
1559
  function isObject(value) {
2820
1560
  return typeof value === "object" && value !== null;
2821
1561
  }