@miradorlabs/web-grpc 4.24.0 → 4.26.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 (36) hide show
  1. package/google/api/field_behavior.ts +1 -1
  2. package/google/protobuf/descriptor.ts +1 -1
  3. package/google/protobuf/duration.ts +1 -1
  4. package/google/protobuf/timestamp.ts +1 -1
  5. package/package.json +1 -1
  6. package/proto/gateway/common/v1/attribute_value.ts +1 -1
  7. package/proto/gateway/common/v1/status.ts +1 -1
  8. package/proto/gateway/common/v1/types.ts +1 -1
  9. package/proto/gateway/web/v1/account_gateway.ts +1 -1
  10. package/proto/gateway/web/v1/admin_gateway.ts +164 -1210
  11. package/proto/gateway/web/v1/admin_gateway_grpc_pb.js +52 -158
  12. package/proto/gateway/web/v1/admin_gateway_pb.js +226 -2188
  13. package/proto/gateway/web/v1/ai_gateway.ts +917 -286
  14. package/proto/gateway/web/v1/ai_gateway_grpc_pb.js +35 -0
  15. package/proto/gateway/web/v1/ai_gateway_pb.js +1526 -137
  16. package/proto/gateway/web/v1/attribute_value.ts +1 -1
  17. package/proto/gateway/web/v1/beta_gateway.ts +1 -1
  18. package/proto/gateway/web/v1/chain_gateway.ts +1 -1
  19. package/proto/gateway/web/v1/claude_enterprise_gateway.ts +1 -1
  20. package/proto/gateway/web/v1/common.ts +1 -1
  21. package/proto/gateway/web/v1/derived_metric_gateway.ts +1 -1
  22. package/proto/gateway/web/v1/desktop_auth_gateway.ts +1 -1
  23. package/proto/gateway/web/v1/github_connector.ts +1 -1
  24. package/proto/gateway/web/v1/integration_gateway.ts +1 -1
  25. package/proto/gateway/web/v1/log_gateway.ts +1 -1
  26. package/proto/gateway/web/v1/market_gateway.ts +1 -1
  27. package/proto/gateway/web/v1/metric_gateway.ts +1 -1
  28. package/proto/gateway/web/v1/notification_gateway.ts +1 -1
  29. package/proto/gateway/web/v1/oauth_gateway.ts +1 -1
  30. package/proto/gateway/web/v1/plan_gateway.ts +1 -1
  31. package/proto/gateway/web/v1/policy_gateway.ts +1 -1
  32. package/proto/gateway/web/v1/reference_gateway.ts +1 -1
  33. package/proto/gateway/web/v1/rule_gateway.ts +1 -1
  34. package/proto/gateway/web/v1/slo_gateway.ts +1 -1
  35. package/proto/gateway/web/v1/trace_gateway.ts +1 -1
  36. package/proto/gateway/web/v1/trace_measure_gateway.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.20.0
3
+ // protoc-gen-ts_proto v2.21.1
4
4
  // protoc v3.21.12
5
5
  // source: proto/gateway/web/v1/admin_gateway.proto
6
6
 
@@ -145,7 +145,7 @@ export function adminUsageGroupSortToJSON(object: AdminUsageGroupSort): string {
145
145
  }
146
146
  }
147
147
 
148
- /** AITask mirrors ai.api.v1.AITask: an AI job a revision configures. */
148
+ /** AITask mirrors ai.api.v1.AITask: an AI job whose model staff choose. */
149
149
  export enum AITask {
150
150
  AI_TASK_UNSPECIFIED = 0,
151
151
  AI_TASK_SESSION_INSIGHT = 1,
@@ -154,6 +154,7 @@ export enum AITask {
154
154
  AI_TASK_SESSION_SCORE = 4,
155
155
  AI_TASK_PROMPT_LABEL = 5,
156
156
  AI_TASK_SKILL_SUMMARY = 6,
157
+ AI_TASK_SESSION_INSIGHT_SKILL = 7,
157
158
  UNRECOGNIZED = -1,
158
159
  }
159
160
 
@@ -180,6 +181,9 @@ export function aITaskFromJSON(object: any): AITask {
180
181
  case 6:
181
182
  case "AI_TASK_SKILL_SUMMARY":
182
183
  return AITask.AI_TASK_SKILL_SUMMARY;
184
+ case 7:
185
+ case "AI_TASK_SESSION_INSIGHT_SKILL":
186
+ return AITask.AI_TASK_SESSION_INSIGHT_SKILL;
183
187
  case -1:
184
188
  case "UNRECOGNIZED":
185
189
  default:
@@ -203,6 +207,8 @@ export function aITaskToJSON(object: AITask): string {
203
207
  return "AI_TASK_PROMPT_LABEL";
204
208
  case AITask.AI_TASK_SKILL_SUMMARY:
205
209
  return "AI_TASK_SKILL_SUMMARY";
210
+ case AITask.AI_TASK_SESSION_INSIGHT_SKILL:
211
+ return "AI_TASK_SESSION_INSIGHT_SKILL";
206
212
  case AITask.UNRECOGNIZED:
207
213
  default:
208
214
  return "UNRECOGNIZED";
@@ -605,124 +611,46 @@ export interface UserDetails {
605
611
  name: string;
606
612
  }
607
613
 
608
- export interface ListAITasksRequest {
614
+ export interface ListAITaskModelsRequest {
609
615
  }
610
616
 
611
- export interface ListAITasksResponse {
617
+ export interface ListAITaskModelsResponse {
612
618
  status:
613
619
  | ResponseStatus
614
620
  | undefined;
615
621
  /** In AITask order. */
616
- tasks: AITaskDefinition[];
622
+ taskModels: AITaskModel[];
617
623
  }
618
624
 
619
- /**
620
- * AITaskDefinition mirrors ai.api.v1.AITaskDefinition: one job as staff configure it, its name and description from
621
- * code, its active revision, and the code-owned parts its prompt is sent with.
622
- */
623
- export interface AITaskDefinition {
625
+ /** AITaskModel mirrors ai.api.v1.AITaskModel: one AI job and the model it runs. The prompt is code, never shown here. */
626
+ export interface AITaskModel {
624
627
  task: AITask;
625
628
  /** "Session insights", "Project insights". */
626
629
  displayName: string;
627
- /** One sentence on what the job does. */
628
- description: string;
629
- /** Unset when no revision is active: the job runs built_in_instruction on its chart model. */
630
- activation:
631
- | AITaskActivation
632
- | undefined;
633
- /** The answer's JSON schema, read-only. */
634
- schemaJson: string;
635
- /** Text the job appends to the prompt (the enum vocabularies), read-only; empty when it appends none. */
636
- appendedInstruction: string;
637
630
  /**
638
- * The prompt the job runs while no revision is active, read-only: the code's embedded prompt, byte for byte, sent
639
- * followed by appended_instruction on the model in the job's deploy config, which is not served here.
631
+ * The model staff chose, as "<publisher>/<model>"; empty when none was chosen, so the job runs its chart's
632
+ * config.model.
640
633
  */
641
- builtInInstruction: string;
642
- }
643
-
644
- /** AITaskActivation is a job's active revision and who activated it, when. */
645
- export interface AITaskActivation {
646
- revision:
647
- | AITaskRevision
648
- | undefined;
649
- /** The Mirador account user id. */
650
- activatedByUserId: string;
651
- activateTime: Date | undefined;
652
- }
653
-
654
- /** AITaskRevision is one saved, immutable revision of a job's model and prompt. */
655
- export interface AITaskRevision {
656
- id: string;
657
- task: AITask;
658
- /** Counts the job's revisions from 1, for display ("v7"). */
659
- number: number;
660
634
  model: string;
661
- /** The base prompt, byte for byte; the job sends it followed by its appended_instruction. */
662
- instruction: string;
663
- note: string;
664
- /** The Mirador account user id. */
665
- createdByUserId: string;
666
- createTime: Date | undefined;
667
- }
668
-
669
- export interface ListAITaskRevisionsRequest {
670
- /** The parent: UNSPECIFIED or an unknown value is a validation error. */
671
- task: AITask;
672
- /** The server default (10) when 0, coerced to 20 above it; negative is a validation error. */
673
- pageSize: number;
674
- /** From a prior response with the same task; any other token is a validation error. */
675
- pageToken: string;
676
- }
677
-
678
- export interface ListAITaskRevisionsResponse {
679
- status: ResponseStatus | undefined;
680
- revisions: AITaskRevision[];
681
- /** Empty once the last page has been returned. */
682
- nextPageToken: string;
635
+ /** Account's user id of whoever chose the model; empty with model. */
636
+ updateUserId: string;
637
+ /** When the model was chosen; unset with model. */
638
+ updateTime: Date | undefined;
683
639
  }
684
640
 
685
- export interface CreateAITaskRevisionRequest {
686
- /** UNSPECIFIED or an unknown value is a validation error. */
641
+ export interface UpdateAITaskModelRequest {
642
+ /** UNSPECIFIED, an unknown or a retired value is a validation error. */
687
643
  task: AITask;
688
644
  /**
689
- * A model the environment's serving endpoint serves, as "<publisher>/<model>": two non-empty parts of ASCII
690
- * letters, digits and . _ - @ :, at most 128 bytes; anything else is a validation error. Only its shape is checked.
645
+ * "<publisher>/<model>": two non-empty parts of ASCII letters, digits and . _ - @ :, at most 128 bytes; anything
646
+ * else is a validation error. Only its shape is checked.
691
647
  */
692
648
  model: string;
693
- /**
694
- * Valid UTF-8 without NUL, non-blank, at most 64 KiB, stored byte for byte; anything else is a validation error.
695
- * The job sends it followed by appended_instruction.
696
- */
697
- instruction: string;
698
- /** What changed and why: valid UTF-8 without NUL, at most 1 KiB; anything else is a validation error. */
699
- note: string;
700
- }
701
-
702
- export interface CreateAITaskRevisionResponse {
703
- status: ResponseStatus | undefined;
704
- revision: AITaskRevision | undefined;
705
- }
706
-
707
- export interface ActivateAITaskRevisionRequest {
708
- /** UNSPECIFIED or an unknown value is a validation error. */
709
- task: AITask;
710
- /** A revision of task; a malformed id is a validation error, another job's revision or an unknown id is not found. */
711
- revisionId: string;
712
- }
713
-
714
- export interface ActivateAITaskRevisionResponse {
715
- status: ResponseStatus | undefined;
716
- activation: AITaskActivation | undefined;
717
- }
718
-
719
- export interface DeactivateAITaskRevisionRequest {
720
- /** UNSPECIFIED or an unknown value is a validation error. */
721
- task: AITask;
722
649
  }
723
650
 
724
- export interface DeactivateAITaskRevisionResponse {
651
+ export interface UpdateAITaskModelResponse {
725
652
  status: ResponseStatus | undefined;
653
+ taskModel: AITaskModel | undefined;
726
654
  }
727
655
 
728
656
  function createBaseGetAdminStatusRequest(): GetAdminStatusRequest {
@@ -5380,16 +5308,16 @@ export const UserDetails: MessageFns<UserDetails> = {
5380
5308
  },
5381
5309
  };
5382
5310
 
5383
- function createBaseListAITasksRequest(): ListAITasksRequest {
5311
+ function createBaseListAITaskModelsRequest(): ListAITaskModelsRequest {
5384
5312
  return {};
5385
5313
  }
5386
5314
 
5387
- export const ListAITasksRequest: MessageFns<ListAITasksRequest> = {
5388
- encode(_: ListAITasksRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5315
+ export const ListAITaskModelsRequest: MessageFns<ListAITaskModelsRequest> = {
5316
+ encode(_: ListAITaskModelsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5389
5317
  return writer;
5390
5318
  },
5391
5319
 
5392
- decode(input: BinaryReader | Uint8Array, length?: number): ListAITasksRequest {
5320
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAITaskModelsRequest {
5393
5321
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5394
5322
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5395
5323
  if (previousRecursionDepth >= 100) {
@@ -5398,7 +5326,7 @@ export const ListAITasksRequest: MessageFns<ListAITasksRequest> = {
5398
5326
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5399
5327
  try {
5400
5328
  const end = length === undefined ? reader.len : reader.pos + length;
5401
- const message = createBaseListAITasksRequest();
5329
+ const message = createBaseListAITaskModelsRequest();
5402
5330
  while (reader.pos < end) {
5403
5331
  const tag = reader.uint32();
5404
5332
  switch (tag >>> 3) {
@@ -5414,40 +5342,40 @@ export const ListAITasksRequest: MessageFns<ListAITasksRequest> = {
5414
5342
  }
5415
5343
  },
5416
5344
 
5417
- fromJSON(_: any): ListAITasksRequest {
5345
+ fromJSON(_: any): ListAITaskModelsRequest {
5418
5346
  return {};
5419
5347
  },
5420
5348
 
5421
- toJSON(_: ListAITasksRequest): unknown {
5349
+ toJSON(_: ListAITaskModelsRequest): unknown {
5422
5350
  const obj: any = {};
5423
5351
  return obj;
5424
5352
  },
5425
5353
 
5426
- create<I extends Exact<DeepPartial<ListAITasksRequest>, I>>(base?: I): ListAITasksRequest {
5427
- return ListAITasksRequest.fromPartial(base ?? ({} as any));
5354
+ create<I extends Exact<DeepPartial<ListAITaskModelsRequest>, I>>(base?: I): ListAITaskModelsRequest {
5355
+ return ListAITaskModelsRequest.fromPartial(base ?? ({} as any));
5428
5356
  },
5429
- fromPartial<I extends Exact<DeepPartial<ListAITasksRequest>, I>>(_: I): ListAITasksRequest {
5430
- const message = createBaseListAITasksRequest();
5357
+ fromPartial<I extends Exact<DeepPartial<ListAITaskModelsRequest>, I>>(_: I): ListAITaskModelsRequest {
5358
+ const message = createBaseListAITaskModelsRequest();
5431
5359
  return message;
5432
5360
  },
5433
5361
  };
5434
5362
 
5435
- function createBaseListAITasksResponse(): ListAITasksResponse {
5436
- return { status: undefined, tasks: [] };
5363
+ function createBaseListAITaskModelsResponse(): ListAITaskModelsResponse {
5364
+ return { status: undefined, taskModels: [] };
5437
5365
  }
5438
5366
 
5439
- export const ListAITasksResponse: MessageFns<ListAITasksResponse> = {
5440
- encode(message: ListAITasksResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5367
+ export const ListAITaskModelsResponse: MessageFns<ListAITaskModelsResponse> = {
5368
+ encode(message: ListAITaskModelsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5441
5369
  if (message.status !== undefined) {
5442
5370
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
5443
5371
  }
5444
- for (const v of message.tasks) {
5445
- AITaskDefinition.encode(v!, writer.uint32(18).fork()).join();
5372
+ for (const v of message.taskModels) {
5373
+ AITaskModel.encode(v!, writer.uint32(18).fork()).join();
5446
5374
  }
5447
5375
  return writer;
5448
5376
  },
5449
5377
 
5450
- decode(input: BinaryReader | Uint8Array, length?: number): ListAITasksResponse {
5378
+ decode(input: BinaryReader | Uint8Array, length?: number): ListAITaskModelsResponse {
5451
5379
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5452
5380
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5453
5381
  if (previousRecursionDepth >= 100) {
@@ -5456,7 +5384,7 @@ export const ListAITasksResponse: MessageFns<ListAITasksResponse> = {
5456
5384
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5457
5385
  try {
5458
5386
  const end = length === undefined ? reader.len : reader.pos + length;
5459
- const message = createBaseListAITasksResponse();
5387
+ const message = createBaseListAITaskModelsResponse();
5460
5388
  while (reader.pos < end) {
5461
5389
  const tag = reader.uint32();
5462
5390
  switch (tag >>> 3) {
@@ -5473,7 +5401,7 @@ export const ListAITasksResponse: MessageFns<ListAITasksResponse> = {
5473
5401
  break;
5474
5402
  }
5475
5403
 
5476
- message.tasks.push(AITaskDefinition.decode(reader, reader.uint32()));
5404
+ message.taskModels.push(AITaskModel.decode(reader, reader.uint32()));
5477
5405
  continue;
5478
5406
  }
5479
5407
  }
@@ -5488,76 +5416,66 @@ export const ListAITasksResponse: MessageFns<ListAITasksResponse> = {
5488
5416
  }
5489
5417
  },
5490
5418
 
5491
- fromJSON(object: any): ListAITasksResponse {
5419
+ fromJSON(object: any): ListAITaskModelsResponse {
5492
5420
  return {
5493
5421
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
5494
- tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => AITaskDefinition.fromJSON(e)) : [],
5422
+ taskModels: globalThis.Array.isArray(object?.taskModels)
5423
+ ? object.taskModels.map((e: any) => AITaskModel.fromJSON(e))
5424
+ : globalThis.Array.isArray(object?.task_models)
5425
+ ? object.task_models.map((e: any) => AITaskModel.fromJSON(e))
5426
+ : [],
5495
5427
  };
5496
5428
  },
5497
5429
 
5498
- toJSON(message: ListAITasksResponse): unknown {
5430
+ toJSON(message: ListAITaskModelsResponse): unknown {
5499
5431
  const obj: any = {};
5500
5432
  if (message.status !== undefined) {
5501
5433
  obj.status = ResponseStatus.toJSON(message.status);
5502
5434
  }
5503
- if (message.tasks?.length) {
5504
- obj.tasks = message.tasks.map((e) => AITaskDefinition.toJSON(e));
5435
+ if (message.taskModels?.length) {
5436
+ obj.taskModels = message.taskModels.map((e) => AITaskModel.toJSON(e));
5505
5437
  }
5506
5438
  return obj;
5507
5439
  },
5508
5440
 
5509
- create<I extends Exact<DeepPartial<ListAITasksResponse>, I>>(base?: I): ListAITasksResponse {
5510
- return ListAITasksResponse.fromPartial(base ?? ({} as any));
5441
+ create<I extends Exact<DeepPartial<ListAITaskModelsResponse>, I>>(base?: I): ListAITaskModelsResponse {
5442
+ return ListAITaskModelsResponse.fromPartial(base ?? ({} as any));
5511
5443
  },
5512
- fromPartial<I extends Exact<DeepPartial<ListAITasksResponse>, I>>(object: I): ListAITasksResponse {
5513
- const message = createBaseListAITasksResponse();
5444
+ fromPartial<I extends Exact<DeepPartial<ListAITaskModelsResponse>, I>>(object: I): ListAITaskModelsResponse {
5445
+ const message = createBaseListAITaskModelsResponse();
5514
5446
  message.status = (object.status !== undefined && object.status !== null)
5515
5447
  ? ResponseStatus.fromPartial(object.status)
5516
5448
  : undefined;
5517
- message.tasks = object.tasks?.map((e) => AITaskDefinition.fromPartial(e)) || [];
5449
+ message.taskModels = object.taskModels?.map((e) => AITaskModel.fromPartial(e)) || [];
5518
5450
  return message;
5519
5451
  },
5520
5452
  };
5521
5453
 
5522
- function createBaseAITaskDefinition(): AITaskDefinition {
5523
- return {
5524
- task: 0,
5525
- displayName: "",
5526
- description: "",
5527
- activation: undefined,
5528
- schemaJson: "",
5529
- appendedInstruction: "",
5530
- builtInInstruction: "",
5531
- };
5454
+ function createBaseAITaskModel(): AITaskModel {
5455
+ return { task: 0, displayName: "", model: "", updateUserId: "", updateTime: undefined };
5532
5456
  }
5533
5457
 
5534
- export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5535
- encode(message: AITaskDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5458
+ export const AITaskModel: MessageFns<AITaskModel> = {
5459
+ encode(message: AITaskModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5536
5460
  if (message.task !== 0) {
5537
5461
  writer.uint32(8).int32(message.task);
5538
5462
  }
5539
5463
  if (message.displayName !== "") {
5540
5464
  writer.uint32(18).string(message.displayName);
5541
5465
  }
5542
- if (message.description !== "") {
5543
- writer.uint32(26).string(message.description);
5544
- }
5545
- if (message.activation !== undefined) {
5546
- AITaskActivation.encode(message.activation, writer.uint32(34).fork()).join();
5547
- }
5548
- if (message.schemaJson !== "") {
5549
- writer.uint32(42).string(message.schemaJson);
5466
+ if (message.model !== "") {
5467
+ writer.uint32(26).string(message.model);
5550
5468
  }
5551
- if (message.appendedInstruction !== "") {
5552
- writer.uint32(50).string(message.appendedInstruction);
5469
+ if (message.updateUserId !== "") {
5470
+ writer.uint32(34).string(message.updateUserId);
5553
5471
  }
5554
- if (message.builtInInstruction !== "") {
5555
- writer.uint32(58).string(message.builtInInstruction);
5472
+ if (message.updateTime !== undefined) {
5473
+ Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(42).fork()).join();
5556
5474
  }
5557
5475
  return writer;
5558
5476
  },
5559
5477
 
5560
- decode(input: BinaryReader | Uint8Array, length?: number): AITaskDefinition {
5478
+ decode(input: BinaryReader | Uint8Array, length?: number): AITaskModel {
5561
5479
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5562
5480
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5563
5481
  if (previousRecursionDepth >= 100) {
@@ -5566,7 +5484,7 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5566
5484
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5567
5485
  try {
5568
5486
  const end = length === undefined ? reader.len : reader.pos + length;
5569
- const message = createBaseAITaskDefinition();
5487
+ const message = createBaseAITaskModel();
5570
5488
  while (reader.pos < end) {
5571
5489
  const tag = reader.uint32();
5572
5490
  switch (tag >>> 3) {
@@ -5591,7 +5509,7 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5591
5509
  break;
5592
5510
  }
5593
5511
 
5594
- message.description = reader.string();
5512
+ message.model = reader.string();
5595
5513
  continue;
5596
5514
  }
5597
5515
  case 4: {
@@ -5599,7 +5517,7 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5599
5517
  break;
5600
5518
  }
5601
5519
 
5602
- message.activation = AITaskActivation.decode(reader, reader.uint32());
5520
+ message.updateUserId = reader.string();
5603
5521
  continue;
5604
5522
  }
5605
5523
  case 5: {
@@ -5607,23 +5525,7 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5607
5525
  break;
5608
5526
  }
5609
5527
 
5610
- message.schemaJson = reader.string();
5611
- continue;
5612
- }
5613
- case 6: {
5614
- if (tag !== 50) {
5615
- break;
5616
- }
5617
-
5618
- message.appendedInstruction = reader.string();
5619
- continue;
5620
- }
5621
- case 7: {
5622
- if (tag !== 58) {
5623
- break;
5624
- }
5625
-
5626
- message.builtInInstruction = reader.string();
5528
+ message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
5627
5529
  continue;
5628
5530
  }
5629
5531
  }
@@ -5638,7 +5540,7 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5638
5540
  }
5639
5541
  },
5640
5542
 
5641
- fromJSON(object: any): AITaskDefinition {
5543
+ fromJSON(object: any): AITaskModel {
5642
5544
  return {
5643
5545
  task: isSet(object.task) ? aITaskFromJSON(object.task) : 0,
5644
5546
  displayName: isSet(object.displayName)
@@ -5646,27 +5548,21 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5646
5548
  : isSet(object.display_name)
5647
5549
  ? globalThis.String(object.display_name)
5648
5550
  : "",
5649
- description: isSet(object.description) ? globalThis.String(object.description) : "",
5650
- activation: isSet(object.activation) ? AITaskActivation.fromJSON(object.activation) : undefined,
5651
- schemaJson: isSet(object.schemaJson)
5652
- ? globalThis.String(object.schemaJson)
5653
- : isSet(object.schema_json)
5654
- ? globalThis.String(object.schema_json)
5655
- : "",
5656
- appendedInstruction: isSet(object.appendedInstruction)
5657
- ? globalThis.String(object.appendedInstruction)
5658
- : isSet(object.appended_instruction)
5659
- ? globalThis.String(object.appended_instruction)
5660
- : "",
5661
- builtInInstruction: isSet(object.builtInInstruction)
5662
- ? globalThis.String(object.builtInInstruction)
5663
- : isSet(object.built_in_instruction)
5664
- ? globalThis.String(object.built_in_instruction)
5551
+ model: isSet(object.model) ? globalThis.String(object.model) : "",
5552
+ updateUserId: isSet(object.updateUserId)
5553
+ ? globalThis.String(object.updateUserId)
5554
+ : isSet(object.update_user_id)
5555
+ ? globalThis.String(object.update_user_id)
5665
5556
  : "",
5557
+ updateTime: isSet(object.updateTime)
5558
+ ? fromJsonTimestamp(object.updateTime)
5559
+ : isSet(object.update_time)
5560
+ ? fromJsonTimestamp(object.update_time)
5561
+ : undefined,
5666
5562
  };
5667
5563
  },
5668
5564
 
5669
- toJSON(message: AITaskDefinition): unknown {
5565
+ toJSON(message: AITaskModel): unknown {
5670
5566
  const obj: any = {};
5671
5567
  if (message.task !== 0) {
5672
5568
  obj.task = aITaskToJSON(message.task);
@@ -5674,196 +5570,48 @@ export const AITaskDefinition: MessageFns<AITaskDefinition> = {
5674
5570
  if (message.displayName !== "") {
5675
5571
  obj.displayName = message.displayName;
5676
5572
  }
5677
- if (message.description !== "") {
5678
- obj.description = message.description;
5679
- }
5680
- if (message.activation !== undefined) {
5681
- obj.activation = AITaskActivation.toJSON(message.activation);
5682
- }
5683
- if (message.schemaJson !== "") {
5684
- obj.schemaJson = message.schemaJson;
5573
+ if (message.model !== "") {
5574
+ obj.model = message.model;
5685
5575
  }
5686
- if (message.appendedInstruction !== "") {
5687
- obj.appendedInstruction = message.appendedInstruction;
5576
+ if (message.updateUserId !== "") {
5577
+ obj.updateUserId = message.updateUserId;
5688
5578
  }
5689
- if (message.builtInInstruction !== "") {
5690
- obj.builtInInstruction = message.builtInInstruction;
5579
+ if (message.updateTime !== undefined) {
5580
+ obj.updateTime = message.updateTime.toISOString();
5691
5581
  }
5692
5582
  return obj;
5693
5583
  },
5694
5584
 
5695
- create<I extends Exact<DeepPartial<AITaskDefinition>, I>>(base?: I): AITaskDefinition {
5696
- return AITaskDefinition.fromPartial(base ?? ({} as any));
5585
+ create<I extends Exact<DeepPartial<AITaskModel>, I>>(base?: I): AITaskModel {
5586
+ return AITaskModel.fromPartial(base ?? ({} as any));
5697
5587
  },
5698
- fromPartial<I extends Exact<DeepPartial<AITaskDefinition>, I>>(object: I): AITaskDefinition {
5699
- const message = createBaseAITaskDefinition();
5588
+ fromPartial<I extends Exact<DeepPartial<AITaskModel>, I>>(object: I): AITaskModel {
5589
+ const message = createBaseAITaskModel();
5700
5590
  message.task = object.task ?? 0;
5701
5591
  message.displayName = object.displayName ?? "";
5702
- message.description = object.description ?? "";
5703
- message.activation = (object.activation !== undefined && object.activation !== null)
5704
- ? AITaskActivation.fromPartial(object.activation)
5705
- : undefined;
5706
- message.schemaJson = object.schemaJson ?? "";
5707
- message.appendedInstruction = object.appendedInstruction ?? "";
5708
- message.builtInInstruction = object.builtInInstruction ?? "";
5709
- return message;
5710
- },
5711
- };
5712
-
5713
- function createBaseAITaskActivation(): AITaskActivation {
5714
- return { revision: undefined, activatedByUserId: "", activateTime: undefined };
5715
- }
5716
-
5717
- export const AITaskActivation: MessageFns<AITaskActivation> = {
5718
- encode(message: AITaskActivation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5719
- if (message.revision !== undefined) {
5720
- AITaskRevision.encode(message.revision, writer.uint32(10).fork()).join();
5721
- }
5722
- if (message.activatedByUserId !== "") {
5723
- writer.uint32(18).string(message.activatedByUserId);
5724
- }
5725
- if (message.activateTime !== undefined) {
5726
- Timestamp.encode(toTimestamp(message.activateTime), writer.uint32(26).fork()).join();
5727
- }
5728
- return writer;
5729
- },
5730
-
5731
- decode(input: BinaryReader | Uint8Array, length?: number): AITaskActivation {
5732
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5733
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5734
- if (previousRecursionDepth >= 100) {
5735
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
5736
- }
5737
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5738
- try {
5739
- const end = length === undefined ? reader.len : reader.pos + length;
5740
- const message = createBaseAITaskActivation();
5741
- while (reader.pos < end) {
5742
- const tag = reader.uint32();
5743
- switch (tag >>> 3) {
5744
- case 1: {
5745
- if (tag !== 10) {
5746
- break;
5747
- }
5748
-
5749
- message.revision = AITaskRevision.decode(reader, reader.uint32());
5750
- continue;
5751
- }
5752
- case 2: {
5753
- if (tag !== 18) {
5754
- break;
5755
- }
5756
-
5757
- message.activatedByUserId = reader.string();
5758
- continue;
5759
- }
5760
- case 3: {
5761
- if (tag !== 26) {
5762
- break;
5763
- }
5764
-
5765
- message.activateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
5766
- continue;
5767
- }
5768
- }
5769
- if ((tag & 7) === 4 || tag === 0) {
5770
- break;
5771
- }
5772
- reader.skip(tag & 7);
5773
- }
5774
- return message;
5775
- } finally {
5776
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
5777
- }
5778
- },
5779
-
5780
- fromJSON(object: any): AITaskActivation {
5781
- return {
5782
- revision: isSet(object.revision) ? AITaskRevision.fromJSON(object.revision) : undefined,
5783
- activatedByUserId: isSet(object.activatedByUserId)
5784
- ? globalThis.String(object.activatedByUserId)
5785
- : isSet(object.activated_by_user_id)
5786
- ? globalThis.String(object.activated_by_user_id)
5787
- : "",
5788
- activateTime: isSet(object.activateTime)
5789
- ? fromJsonTimestamp(object.activateTime)
5790
- : isSet(object.activate_time)
5791
- ? fromJsonTimestamp(object.activate_time)
5792
- : undefined,
5793
- };
5794
- },
5795
-
5796
- toJSON(message: AITaskActivation): unknown {
5797
- const obj: any = {};
5798
- if (message.revision !== undefined) {
5799
- obj.revision = AITaskRevision.toJSON(message.revision);
5800
- }
5801
- if (message.activatedByUserId !== "") {
5802
- obj.activatedByUserId = message.activatedByUserId;
5803
- }
5804
- if (message.activateTime !== undefined) {
5805
- obj.activateTime = message.activateTime.toISOString();
5806
- }
5807
- return obj;
5808
- },
5809
-
5810
- create<I extends Exact<DeepPartial<AITaskActivation>, I>>(base?: I): AITaskActivation {
5811
- return AITaskActivation.fromPartial(base ?? ({} as any));
5812
- },
5813
- fromPartial<I extends Exact<DeepPartial<AITaskActivation>, I>>(object: I): AITaskActivation {
5814
- const message = createBaseAITaskActivation();
5815
- message.revision = (object.revision !== undefined && object.revision !== null)
5816
- ? AITaskRevision.fromPartial(object.revision)
5817
- : undefined;
5818
- message.activatedByUserId = object.activatedByUserId ?? "";
5819
- message.activateTime = object.activateTime ?? undefined;
5592
+ message.model = object.model ?? "";
5593
+ message.updateUserId = object.updateUserId ?? "";
5594
+ message.updateTime = object.updateTime ?? undefined;
5820
5595
  return message;
5821
5596
  },
5822
5597
  };
5823
5598
 
5824
- function createBaseAITaskRevision(): AITaskRevision {
5825
- return {
5826
- id: "",
5827
- task: 0,
5828
- number: 0,
5829
- model: "",
5830
- instruction: "",
5831
- note: "",
5832
- createdByUserId: "",
5833
- createTime: undefined,
5834
- };
5599
+ function createBaseUpdateAITaskModelRequest(): UpdateAITaskModelRequest {
5600
+ return { task: 0, model: "" };
5835
5601
  }
5836
5602
 
5837
- export const AITaskRevision: MessageFns<AITaskRevision> = {
5838
- encode(message: AITaskRevision, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5839
- if (message.id !== "") {
5840
- writer.uint32(10).string(message.id);
5841
- }
5603
+ export const UpdateAITaskModelRequest: MessageFns<UpdateAITaskModelRequest> = {
5604
+ encode(message: UpdateAITaskModelRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5842
5605
  if (message.task !== 0) {
5843
- writer.uint32(16).int32(message.task);
5844
- }
5845
- if (message.number !== 0) {
5846
- writer.uint32(24).int32(message.number);
5606
+ writer.uint32(8).int32(message.task);
5847
5607
  }
5848
5608
  if (message.model !== "") {
5849
- writer.uint32(34).string(message.model);
5850
- }
5851
- if (message.instruction !== "") {
5852
- writer.uint32(42).string(message.instruction);
5853
- }
5854
- if (message.note !== "") {
5855
- writer.uint32(50).string(message.note);
5856
- }
5857
- if (message.createdByUserId !== "") {
5858
- writer.uint32(58).string(message.createdByUserId);
5859
- }
5860
- if (message.createTime !== undefined) {
5861
- Timestamp.encode(toTimestamp(message.createTime), writer.uint32(66).fork()).join();
5609
+ writer.uint32(18).string(message.model);
5862
5610
  }
5863
5611
  return writer;
5864
5612
  },
5865
5613
 
5866
- decode(input: BinaryReader | Uint8Array, length?: number): AITaskRevision {
5614
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateAITaskModelRequest {
5867
5615
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5868
5616
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
5869
5617
  if (previousRecursionDepth >= 100) {
@@ -5872,74 +5620,26 @@ export const AITaskRevision: MessageFns<AITaskRevision> = {
5872
5620
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
5873
5621
  try {
5874
5622
  const end = length === undefined ? reader.len : reader.pos + length;
5875
- const message = createBaseAITaskRevision();
5623
+ const message = createBaseUpdateAITaskModelRequest();
5876
5624
  while (reader.pos < end) {
5877
5625
  const tag = reader.uint32();
5878
5626
  switch (tag >>> 3) {
5879
5627
  case 1: {
5880
- if (tag !== 10) {
5881
- break;
5882
- }
5883
-
5884
- message.id = reader.string();
5885
- continue;
5886
- }
5887
- case 2: {
5888
- if (tag !== 16) {
5628
+ if (tag !== 8) {
5889
5629
  break;
5890
5630
  }
5891
5631
 
5892
5632
  message.task = reader.int32() as any;
5893
5633
  continue;
5894
5634
  }
5895
- case 3: {
5896
- if (tag !== 24) {
5897
- break;
5898
- }
5899
-
5900
- message.number = reader.int32();
5901
- continue;
5902
- }
5903
- case 4: {
5904
- if (tag !== 34) {
5635
+ case 2: {
5636
+ if (tag !== 18) {
5905
5637
  break;
5906
5638
  }
5907
5639
 
5908
5640
  message.model = reader.string();
5909
5641
  continue;
5910
5642
  }
5911
- case 5: {
5912
- if (tag !== 42) {
5913
- break;
5914
- }
5915
-
5916
- message.instruction = reader.string();
5917
- continue;
5918
- }
5919
- case 6: {
5920
- if (tag !== 50) {
5921
- break;
5922
- }
5923
-
5924
- message.note = reader.string();
5925
- continue;
5926
- }
5927
- case 7: {
5928
- if (tag !== 58) {
5929
- break;
5930
- }
5931
-
5932
- message.createdByUserId = reader.string();
5933
- continue;
5934
- }
5935
- case 8: {
5936
- if (tag !== 66) {
5937
- break;
5938
- }
5939
-
5940
- message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
5941
- continue;
5942
- }
5943
5643
  }
5944
5644
  if ((tag & 7) === 4 || tag === 0) {
5945
5645
  break;
@@ -5952,92 +5652,51 @@ export const AITaskRevision: MessageFns<AITaskRevision> = {
5952
5652
  }
5953
5653
  },
5954
5654
 
5955
- fromJSON(object: any): AITaskRevision {
5655
+ fromJSON(object: any): UpdateAITaskModelRequest {
5956
5656
  return {
5957
- id: isSet(object.id) ? globalThis.String(object.id) : "",
5958
5657
  task: isSet(object.task) ? aITaskFromJSON(object.task) : 0,
5959
- number: isSet(object.number) ? globalThis.Number(object.number) : 0,
5960
5658
  model: isSet(object.model) ? globalThis.String(object.model) : "",
5961
- instruction: isSet(object.instruction) ? globalThis.String(object.instruction) : "",
5962
- note: isSet(object.note) ? globalThis.String(object.note) : "",
5963
- createdByUserId: isSet(object.createdByUserId)
5964
- ? globalThis.String(object.createdByUserId)
5965
- : isSet(object.created_by_user_id)
5966
- ? globalThis.String(object.created_by_user_id)
5967
- : "",
5968
- createTime: isSet(object.createTime)
5969
- ? fromJsonTimestamp(object.createTime)
5970
- : isSet(object.create_time)
5971
- ? fromJsonTimestamp(object.create_time)
5972
- : undefined,
5973
5659
  };
5974
5660
  },
5975
5661
 
5976
- toJSON(message: AITaskRevision): unknown {
5662
+ toJSON(message: UpdateAITaskModelRequest): unknown {
5977
5663
  const obj: any = {};
5978
- if (message.id !== "") {
5979
- obj.id = message.id;
5980
- }
5981
5664
  if (message.task !== 0) {
5982
5665
  obj.task = aITaskToJSON(message.task);
5983
5666
  }
5984
- if (message.number !== 0) {
5985
- obj.number = Math.round(message.number);
5986
- }
5987
5667
  if (message.model !== "") {
5988
5668
  obj.model = message.model;
5989
5669
  }
5990
- if (message.instruction !== "") {
5991
- obj.instruction = message.instruction;
5992
- }
5993
- if (message.note !== "") {
5994
- obj.note = message.note;
5995
- }
5996
- if (message.createdByUserId !== "") {
5997
- obj.createdByUserId = message.createdByUserId;
5998
- }
5999
- if (message.createTime !== undefined) {
6000
- obj.createTime = message.createTime.toISOString();
6001
- }
6002
5670
  return obj;
6003
5671
  },
6004
5672
 
6005
- create<I extends Exact<DeepPartial<AITaskRevision>, I>>(base?: I): AITaskRevision {
6006
- return AITaskRevision.fromPartial(base ?? ({} as any));
5673
+ create<I extends Exact<DeepPartial<UpdateAITaskModelRequest>, I>>(base?: I): UpdateAITaskModelRequest {
5674
+ return UpdateAITaskModelRequest.fromPartial(base ?? ({} as any));
6007
5675
  },
6008
- fromPartial<I extends Exact<DeepPartial<AITaskRevision>, I>>(object: I): AITaskRevision {
6009
- const message = createBaseAITaskRevision();
6010
- message.id = object.id ?? "";
5676
+ fromPartial<I extends Exact<DeepPartial<UpdateAITaskModelRequest>, I>>(object: I): UpdateAITaskModelRequest {
5677
+ const message = createBaseUpdateAITaskModelRequest();
6011
5678
  message.task = object.task ?? 0;
6012
- message.number = object.number ?? 0;
6013
5679
  message.model = object.model ?? "";
6014
- message.instruction = object.instruction ?? "";
6015
- message.note = object.note ?? "";
6016
- message.createdByUserId = object.createdByUserId ?? "";
6017
- message.createTime = object.createTime ?? undefined;
6018
5680
  return message;
6019
5681
  },
6020
5682
  };
6021
5683
 
6022
- function createBaseListAITaskRevisionsRequest(): ListAITaskRevisionsRequest {
6023
- return { task: 0, pageSize: 0, pageToken: "" };
5684
+ function createBaseUpdateAITaskModelResponse(): UpdateAITaskModelResponse {
5685
+ return { status: undefined, taskModel: undefined };
6024
5686
  }
6025
5687
 
6026
- export const ListAITaskRevisionsRequest: MessageFns<ListAITaskRevisionsRequest> = {
6027
- encode(message: ListAITaskRevisionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6028
- if (message.task !== 0) {
6029
- writer.uint32(8).int32(message.task);
6030
- }
6031
- if (message.pageSize !== 0) {
6032
- writer.uint32(16).int32(message.pageSize);
5688
+ export const UpdateAITaskModelResponse: MessageFns<UpdateAITaskModelResponse> = {
5689
+ encode(message: UpdateAITaskModelResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
5690
+ if (message.status !== undefined) {
5691
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6033
5692
  }
6034
- if (message.pageToken !== "") {
6035
- writer.uint32(26).string(message.pageToken);
5693
+ if (message.taskModel !== undefined) {
5694
+ AITaskModel.encode(message.taskModel, writer.uint32(18).fork()).join();
6036
5695
  }
6037
5696
  return writer;
6038
5697
  },
6039
5698
 
6040
- decode(input: BinaryReader | Uint8Array, length?: number): ListAITaskRevisionsRequest {
5699
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateAITaskModelResponse {
6041
5700
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6042
5701
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6043
5702
  if (previousRecursionDepth >= 100) {
@@ -6046,32 +5705,24 @@ export const ListAITaskRevisionsRequest: MessageFns<ListAITaskRevisionsRequest>
6046
5705
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6047
5706
  try {
6048
5707
  const end = length === undefined ? reader.len : reader.pos + length;
6049
- const message = createBaseListAITaskRevisionsRequest();
5708
+ const message = createBaseUpdateAITaskModelResponse();
6050
5709
  while (reader.pos < end) {
6051
5710
  const tag = reader.uint32();
6052
5711
  switch (tag >>> 3) {
6053
5712
  case 1: {
6054
- if (tag !== 8) {
5713
+ if (tag !== 10) {
6055
5714
  break;
6056
5715
  }
6057
5716
 
6058
- message.task = reader.int32() as any;
5717
+ message.status = ResponseStatus.decode(reader, reader.uint32());
6059
5718
  continue;
6060
5719
  }
6061
5720
  case 2: {
6062
- if (tag !== 16) {
6063
- break;
6064
- }
6065
-
6066
- message.pageSize = reader.int32();
6067
- continue;
6068
- }
6069
- case 3: {
6070
- if (tag !== 26) {
5721
+ if (tag !== 18) {
6071
5722
  break;
6072
5723
  }
6073
5724
 
6074
- message.pageToken = reader.string();
5725
+ message.taskModel = AITaskModel.decode(reader, reader.uint32());
6075
5726
  continue;
6076
5727
  }
6077
5728
  }
@@ -6086,682 +5737,38 @@ export const ListAITaskRevisionsRequest: MessageFns<ListAITaskRevisionsRequest>
6086
5737
  }
6087
5738
  },
6088
5739
 
6089
- fromJSON(object: any): ListAITaskRevisionsRequest {
5740
+ fromJSON(object: any): UpdateAITaskModelResponse {
6090
5741
  return {
6091
- task: isSet(object.task) ? aITaskFromJSON(object.task) : 0,
6092
- pageSize: isSet(object.pageSize)
6093
- ? globalThis.Number(object.pageSize)
6094
- : isSet(object.page_size)
6095
- ? globalThis.Number(object.page_size)
6096
- : 0,
6097
- pageToken: isSet(object.pageToken)
6098
- ? globalThis.String(object.pageToken)
6099
- : isSet(object.page_token)
6100
- ? globalThis.String(object.page_token)
6101
- : "",
5742
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
5743
+ taskModel: isSet(object.taskModel)
5744
+ ? AITaskModel.fromJSON(object.taskModel)
5745
+ : isSet(object.task_model)
5746
+ ? AITaskModel.fromJSON(object.task_model)
5747
+ : undefined,
6102
5748
  };
6103
5749
  },
6104
5750
 
6105
- toJSON(message: ListAITaskRevisionsRequest): unknown {
5751
+ toJSON(message: UpdateAITaskModelResponse): unknown {
6106
5752
  const obj: any = {};
6107
- if (message.task !== 0) {
6108
- obj.task = aITaskToJSON(message.task);
6109
- }
6110
- if (message.pageSize !== 0) {
6111
- obj.pageSize = Math.round(message.pageSize);
5753
+ if (message.status !== undefined) {
5754
+ obj.status = ResponseStatus.toJSON(message.status);
6112
5755
  }
6113
- if (message.pageToken !== "") {
6114
- obj.pageToken = message.pageToken;
5756
+ if (message.taskModel !== undefined) {
5757
+ obj.taskModel = AITaskModel.toJSON(message.taskModel);
6115
5758
  }
6116
5759
  return obj;
6117
5760
  },
6118
5761
 
6119
- create<I extends Exact<DeepPartial<ListAITaskRevisionsRequest>, I>>(base?: I): ListAITaskRevisionsRequest {
6120
- return ListAITaskRevisionsRequest.fromPartial(base ?? ({} as any));
5762
+ create<I extends Exact<DeepPartial<UpdateAITaskModelResponse>, I>>(base?: I): UpdateAITaskModelResponse {
5763
+ return UpdateAITaskModelResponse.fromPartial(base ?? ({} as any));
6121
5764
  },
6122
- fromPartial<I extends Exact<DeepPartial<ListAITaskRevisionsRequest>, I>>(object: I): ListAITaskRevisionsRequest {
6123
- const message = createBaseListAITaskRevisionsRequest();
6124
- message.task = object.task ?? 0;
6125
- message.pageSize = object.pageSize ?? 0;
6126
- message.pageToken = object.pageToken ?? "";
6127
- return message;
6128
- },
6129
- };
6130
-
6131
- function createBaseListAITaskRevisionsResponse(): ListAITaskRevisionsResponse {
6132
- return { status: undefined, revisions: [], nextPageToken: "" };
6133
- }
6134
-
6135
- export const ListAITaskRevisionsResponse: MessageFns<ListAITaskRevisionsResponse> = {
6136
- encode(message: ListAITaskRevisionsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6137
- if (message.status !== undefined) {
6138
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6139
- }
6140
- for (const v of message.revisions) {
6141
- AITaskRevision.encode(v!, writer.uint32(18).fork()).join();
6142
- }
6143
- if (message.nextPageToken !== "") {
6144
- writer.uint32(26).string(message.nextPageToken);
6145
- }
6146
- return writer;
6147
- },
6148
-
6149
- decode(input: BinaryReader | Uint8Array, length?: number): ListAITaskRevisionsResponse {
6150
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6151
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6152
- if (previousRecursionDepth >= 100) {
6153
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6154
- }
6155
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6156
- try {
6157
- const end = length === undefined ? reader.len : reader.pos + length;
6158
- const message = createBaseListAITaskRevisionsResponse();
6159
- while (reader.pos < end) {
6160
- const tag = reader.uint32();
6161
- switch (tag >>> 3) {
6162
- case 1: {
6163
- if (tag !== 10) {
6164
- break;
6165
- }
6166
-
6167
- message.status = ResponseStatus.decode(reader, reader.uint32());
6168
- continue;
6169
- }
6170
- case 2: {
6171
- if (tag !== 18) {
6172
- break;
6173
- }
6174
-
6175
- message.revisions.push(AITaskRevision.decode(reader, reader.uint32()));
6176
- continue;
6177
- }
6178
- case 3: {
6179
- if (tag !== 26) {
6180
- break;
6181
- }
6182
-
6183
- message.nextPageToken = reader.string();
6184
- continue;
6185
- }
6186
- }
6187
- if ((tag & 7) === 4 || tag === 0) {
6188
- break;
6189
- }
6190
- reader.skip(tag & 7);
6191
- }
6192
- return message;
6193
- } finally {
6194
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6195
- }
6196
- },
6197
-
6198
- fromJSON(object: any): ListAITaskRevisionsResponse {
6199
- return {
6200
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
6201
- revisions: globalThis.Array.isArray(object?.revisions)
6202
- ? object.revisions.map((e: any) => AITaskRevision.fromJSON(e))
6203
- : [],
6204
- nextPageToken: isSet(object.nextPageToken)
6205
- ? globalThis.String(object.nextPageToken)
6206
- : isSet(object.next_page_token)
6207
- ? globalThis.String(object.next_page_token)
6208
- : "",
6209
- };
6210
- },
6211
-
6212
- toJSON(message: ListAITaskRevisionsResponse): unknown {
6213
- const obj: any = {};
6214
- if (message.status !== undefined) {
6215
- obj.status = ResponseStatus.toJSON(message.status);
6216
- }
6217
- if (message.revisions?.length) {
6218
- obj.revisions = message.revisions.map((e) => AITaskRevision.toJSON(e));
6219
- }
6220
- if (message.nextPageToken !== "") {
6221
- obj.nextPageToken = message.nextPageToken;
6222
- }
6223
- return obj;
6224
- },
6225
-
6226
- create<I extends Exact<DeepPartial<ListAITaskRevisionsResponse>, I>>(base?: I): ListAITaskRevisionsResponse {
6227
- return ListAITaskRevisionsResponse.fromPartial(base ?? ({} as any));
6228
- },
6229
- fromPartial<I extends Exact<DeepPartial<ListAITaskRevisionsResponse>, I>>(object: I): ListAITaskRevisionsResponse {
6230
- const message = createBaseListAITaskRevisionsResponse();
6231
- message.status = (object.status !== undefined && object.status !== null)
6232
- ? ResponseStatus.fromPartial(object.status)
6233
- : undefined;
6234
- message.revisions = object.revisions?.map((e) => AITaskRevision.fromPartial(e)) || [];
6235
- message.nextPageToken = object.nextPageToken ?? "";
6236
- return message;
6237
- },
6238
- };
6239
-
6240
- function createBaseCreateAITaskRevisionRequest(): CreateAITaskRevisionRequest {
6241
- return { task: 0, model: "", instruction: "", note: "" };
6242
- }
6243
-
6244
- export const CreateAITaskRevisionRequest: MessageFns<CreateAITaskRevisionRequest> = {
6245
- encode(message: CreateAITaskRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6246
- if (message.task !== 0) {
6247
- writer.uint32(8).int32(message.task);
6248
- }
6249
- if (message.model !== "") {
6250
- writer.uint32(18).string(message.model);
6251
- }
6252
- if (message.instruction !== "") {
6253
- writer.uint32(26).string(message.instruction);
6254
- }
6255
- if (message.note !== "") {
6256
- writer.uint32(34).string(message.note);
6257
- }
6258
- return writer;
6259
- },
6260
-
6261
- decode(input: BinaryReader | Uint8Array, length?: number): CreateAITaskRevisionRequest {
6262
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6263
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6264
- if (previousRecursionDepth >= 100) {
6265
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6266
- }
6267
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6268
- try {
6269
- const end = length === undefined ? reader.len : reader.pos + length;
6270
- const message = createBaseCreateAITaskRevisionRequest();
6271
- while (reader.pos < end) {
6272
- const tag = reader.uint32();
6273
- switch (tag >>> 3) {
6274
- case 1: {
6275
- if (tag !== 8) {
6276
- break;
6277
- }
6278
-
6279
- message.task = reader.int32() as any;
6280
- continue;
6281
- }
6282
- case 2: {
6283
- if (tag !== 18) {
6284
- break;
6285
- }
6286
-
6287
- message.model = reader.string();
6288
- continue;
6289
- }
6290
- case 3: {
6291
- if (tag !== 26) {
6292
- break;
6293
- }
6294
-
6295
- message.instruction = reader.string();
6296
- continue;
6297
- }
6298
- case 4: {
6299
- if (tag !== 34) {
6300
- break;
6301
- }
6302
-
6303
- message.note = reader.string();
6304
- continue;
6305
- }
6306
- }
6307
- if ((tag & 7) === 4 || tag === 0) {
6308
- break;
6309
- }
6310
- reader.skip(tag & 7);
6311
- }
6312
- return message;
6313
- } finally {
6314
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6315
- }
6316
- },
6317
-
6318
- fromJSON(object: any): CreateAITaskRevisionRequest {
6319
- return {
6320
- task: isSet(object.task) ? aITaskFromJSON(object.task) : 0,
6321
- model: isSet(object.model) ? globalThis.String(object.model) : "",
6322
- instruction: isSet(object.instruction) ? globalThis.String(object.instruction) : "",
6323
- note: isSet(object.note) ? globalThis.String(object.note) : "",
6324
- };
6325
- },
6326
-
6327
- toJSON(message: CreateAITaskRevisionRequest): unknown {
6328
- const obj: any = {};
6329
- if (message.task !== 0) {
6330
- obj.task = aITaskToJSON(message.task);
6331
- }
6332
- if (message.model !== "") {
6333
- obj.model = message.model;
6334
- }
6335
- if (message.instruction !== "") {
6336
- obj.instruction = message.instruction;
6337
- }
6338
- if (message.note !== "") {
6339
- obj.note = message.note;
6340
- }
6341
- return obj;
6342
- },
6343
-
6344
- create<I extends Exact<DeepPartial<CreateAITaskRevisionRequest>, I>>(base?: I): CreateAITaskRevisionRequest {
6345
- return CreateAITaskRevisionRequest.fromPartial(base ?? ({} as any));
6346
- },
6347
- fromPartial<I extends Exact<DeepPartial<CreateAITaskRevisionRequest>, I>>(object: I): CreateAITaskRevisionRequest {
6348
- const message = createBaseCreateAITaskRevisionRequest();
6349
- message.task = object.task ?? 0;
6350
- message.model = object.model ?? "";
6351
- message.instruction = object.instruction ?? "";
6352
- message.note = object.note ?? "";
6353
- return message;
6354
- },
6355
- };
6356
-
6357
- function createBaseCreateAITaskRevisionResponse(): CreateAITaskRevisionResponse {
6358
- return { status: undefined, revision: undefined };
6359
- }
6360
-
6361
- export const CreateAITaskRevisionResponse: MessageFns<CreateAITaskRevisionResponse> = {
6362
- encode(message: CreateAITaskRevisionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6363
- if (message.status !== undefined) {
6364
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6365
- }
6366
- if (message.revision !== undefined) {
6367
- AITaskRevision.encode(message.revision, writer.uint32(18).fork()).join();
6368
- }
6369
- return writer;
6370
- },
6371
-
6372
- decode(input: BinaryReader | Uint8Array, length?: number): CreateAITaskRevisionResponse {
6373
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6374
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6375
- if (previousRecursionDepth >= 100) {
6376
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6377
- }
6378
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6379
- try {
6380
- const end = length === undefined ? reader.len : reader.pos + length;
6381
- const message = createBaseCreateAITaskRevisionResponse();
6382
- while (reader.pos < end) {
6383
- const tag = reader.uint32();
6384
- switch (tag >>> 3) {
6385
- case 1: {
6386
- if (tag !== 10) {
6387
- break;
6388
- }
6389
-
6390
- message.status = ResponseStatus.decode(reader, reader.uint32());
6391
- continue;
6392
- }
6393
- case 2: {
6394
- if (tag !== 18) {
6395
- break;
6396
- }
6397
-
6398
- message.revision = AITaskRevision.decode(reader, reader.uint32());
6399
- continue;
6400
- }
6401
- }
6402
- if ((tag & 7) === 4 || tag === 0) {
6403
- break;
6404
- }
6405
- reader.skip(tag & 7);
6406
- }
6407
- return message;
6408
- } finally {
6409
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6410
- }
6411
- },
6412
-
6413
- fromJSON(object: any): CreateAITaskRevisionResponse {
6414
- return {
6415
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
6416
- revision: isSet(object.revision) ? AITaskRevision.fromJSON(object.revision) : undefined,
6417
- };
6418
- },
6419
-
6420
- toJSON(message: CreateAITaskRevisionResponse): unknown {
6421
- const obj: any = {};
6422
- if (message.status !== undefined) {
6423
- obj.status = ResponseStatus.toJSON(message.status);
6424
- }
6425
- if (message.revision !== undefined) {
6426
- obj.revision = AITaskRevision.toJSON(message.revision);
6427
- }
6428
- return obj;
6429
- },
6430
-
6431
- create<I extends Exact<DeepPartial<CreateAITaskRevisionResponse>, I>>(base?: I): CreateAITaskRevisionResponse {
6432
- return CreateAITaskRevisionResponse.fromPartial(base ?? ({} as any));
6433
- },
6434
- fromPartial<I extends Exact<DeepPartial<CreateAITaskRevisionResponse>, I>>(object: I): CreateAITaskRevisionResponse {
6435
- const message = createBaseCreateAITaskRevisionResponse();
6436
- message.status = (object.status !== undefined && object.status !== null)
6437
- ? ResponseStatus.fromPartial(object.status)
6438
- : undefined;
6439
- message.revision = (object.revision !== undefined && object.revision !== null)
6440
- ? AITaskRevision.fromPartial(object.revision)
6441
- : undefined;
6442
- return message;
6443
- },
6444
- };
6445
-
6446
- function createBaseActivateAITaskRevisionRequest(): ActivateAITaskRevisionRequest {
6447
- return { task: 0, revisionId: "" };
6448
- }
6449
-
6450
- export const ActivateAITaskRevisionRequest: MessageFns<ActivateAITaskRevisionRequest> = {
6451
- encode(message: ActivateAITaskRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6452
- if (message.task !== 0) {
6453
- writer.uint32(8).int32(message.task);
6454
- }
6455
- if (message.revisionId !== "") {
6456
- writer.uint32(18).string(message.revisionId);
6457
- }
6458
- return writer;
6459
- },
6460
-
6461
- decode(input: BinaryReader | Uint8Array, length?: number): ActivateAITaskRevisionRequest {
6462
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6463
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6464
- if (previousRecursionDepth >= 100) {
6465
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6466
- }
6467
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6468
- try {
6469
- const end = length === undefined ? reader.len : reader.pos + length;
6470
- const message = createBaseActivateAITaskRevisionRequest();
6471
- while (reader.pos < end) {
6472
- const tag = reader.uint32();
6473
- switch (tag >>> 3) {
6474
- case 1: {
6475
- if (tag !== 8) {
6476
- break;
6477
- }
6478
-
6479
- message.task = reader.int32() as any;
6480
- continue;
6481
- }
6482
- case 2: {
6483
- if (tag !== 18) {
6484
- break;
6485
- }
6486
-
6487
- message.revisionId = reader.string();
6488
- continue;
6489
- }
6490
- }
6491
- if ((tag & 7) === 4 || tag === 0) {
6492
- break;
6493
- }
6494
- reader.skip(tag & 7);
6495
- }
6496
- return message;
6497
- } finally {
6498
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6499
- }
6500
- },
6501
-
6502
- fromJSON(object: any): ActivateAITaskRevisionRequest {
6503
- return {
6504
- task: isSet(object.task) ? aITaskFromJSON(object.task) : 0,
6505
- revisionId: isSet(object.revisionId)
6506
- ? globalThis.String(object.revisionId)
6507
- : isSet(object.revision_id)
6508
- ? globalThis.String(object.revision_id)
6509
- : "",
6510
- };
6511
- },
6512
-
6513
- toJSON(message: ActivateAITaskRevisionRequest): unknown {
6514
- const obj: any = {};
6515
- if (message.task !== 0) {
6516
- obj.task = aITaskToJSON(message.task);
6517
- }
6518
- if (message.revisionId !== "") {
6519
- obj.revisionId = message.revisionId;
6520
- }
6521
- return obj;
6522
- },
6523
-
6524
- create<I extends Exact<DeepPartial<ActivateAITaskRevisionRequest>, I>>(base?: I): ActivateAITaskRevisionRequest {
6525
- return ActivateAITaskRevisionRequest.fromPartial(base ?? ({} as any));
6526
- },
6527
- fromPartial<I extends Exact<DeepPartial<ActivateAITaskRevisionRequest>, I>>(
6528
- object: I,
6529
- ): ActivateAITaskRevisionRequest {
6530
- const message = createBaseActivateAITaskRevisionRequest();
6531
- message.task = object.task ?? 0;
6532
- message.revisionId = object.revisionId ?? "";
6533
- return message;
6534
- },
6535
- };
6536
-
6537
- function createBaseActivateAITaskRevisionResponse(): ActivateAITaskRevisionResponse {
6538
- return { status: undefined, activation: undefined };
6539
- }
6540
-
6541
- export const ActivateAITaskRevisionResponse: MessageFns<ActivateAITaskRevisionResponse> = {
6542
- encode(message: ActivateAITaskRevisionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6543
- if (message.status !== undefined) {
6544
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6545
- }
6546
- if (message.activation !== undefined) {
6547
- AITaskActivation.encode(message.activation, writer.uint32(18).fork()).join();
6548
- }
6549
- return writer;
6550
- },
6551
-
6552
- decode(input: BinaryReader | Uint8Array, length?: number): ActivateAITaskRevisionResponse {
6553
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6554
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6555
- if (previousRecursionDepth >= 100) {
6556
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6557
- }
6558
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6559
- try {
6560
- const end = length === undefined ? reader.len : reader.pos + length;
6561
- const message = createBaseActivateAITaskRevisionResponse();
6562
- while (reader.pos < end) {
6563
- const tag = reader.uint32();
6564
- switch (tag >>> 3) {
6565
- case 1: {
6566
- if (tag !== 10) {
6567
- break;
6568
- }
6569
-
6570
- message.status = ResponseStatus.decode(reader, reader.uint32());
6571
- continue;
6572
- }
6573
- case 2: {
6574
- if (tag !== 18) {
6575
- break;
6576
- }
6577
-
6578
- message.activation = AITaskActivation.decode(reader, reader.uint32());
6579
- continue;
6580
- }
6581
- }
6582
- if ((tag & 7) === 4 || tag === 0) {
6583
- break;
6584
- }
6585
- reader.skip(tag & 7);
6586
- }
6587
- return message;
6588
- } finally {
6589
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6590
- }
6591
- },
6592
-
6593
- fromJSON(object: any): ActivateAITaskRevisionResponse {
6594
- return {
6595
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
6596
- activation: isSet(object.activation) ? AITaskActivation.fromJSON(object.activation) : undefined,
6597
- };
6598
- },
6599
-
6600
- toJSON(message: ActivateAITaskRevisionResponse): unknown {
6601
- const obj: any = {};
6602
- if (message.status !== undefined) {
6603
- obj.status = ResponseStatus.toJSON(message.status);
6604
- }
6605
- if (message.activation !== undefined) {
6606
- obj.activation = AITaskActivation.toJSON(message.activation);
6607
- }
6608
- return obj;
6609
- },
6610
-
6611
- create<I extends Exact<DeepPartial<ActivateAITaskRevisionResponse>, I>>(base?: I): ActivateAITaskRevisionResponse {
6612
- return ActivateAITaskRevisionResponse.fromPartial(base ?? ({} as any));
6613
- },
6614
- fromPartial<I extends Exact<DeepPartial<ActivateAITaskRevisionResponse>, I>>(
6615
- object: I,
6616
- ): ActivateAITaskRevisionResponse {
6617
- const message = createBaseActivateAITaskRevisionResponse();
5765
+ fromPartial<I extends Exact<DeepPartial<UpdateAITaskModelResponse>, I>>(object: I): UpdateAITaskModelResponse {
5766
+ const message = createBaseUpdateAITaskModelResponse();
6618
5767
  message.status = (object.status !== undefined && object.status !== null)
6619
5768
  ? ResponseStatus.fromPartial(object.status)
6620
5769
  : undefined;
6621
- message.activation = (object.activation !== undefined && object.activation !== null)
6622
- ? AITaskActivation.fromPartial(object.activation)
6623
- : undefined;
6624
- return message;
6625
- },
6626
- };
6627
-
6628
- function createBaseDeactivateAITaskRevisionRequest(): DeactivateAITaskRevisionRequest {
6629
- return { task: 0 };
6630
- }
6631
-
6632
- export const DeactivateAITaskRevisionRequest: MessageFns<DeactivateAITaskRevisionRequest> = {
6633
- encode(message: DeactivateAITaskRevisionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6634
- if (message.task !== 0) {
6635
- writer.uint32(8).int32(message.task);
6636
- }
6637
- return writer;
6638
- },
6639
-
6640
- decode(input: BinaryReader | Uint8Array, length?: number): DeactivateAITaskRevisionRequest {
6641
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6642
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6643
- if (previousRecursionDepth >= 100) {
6644
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6645
- }
6646
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6647
- try {
6648
- const end = length === undefined ? reader.len : reader.pos + length;
6649
- const message = createBaseDeactivateAITaskRevisionRequest();
6650
- while (reader.pos < end) {
6651
- const tag = reader.uint32();
6652
- switch (tag >>> 3) {
6653
- case 1: {
6654
- if (tag !== 8) {
6655
- break;
6656
- }
6657
-
6658
- message.task = reader.int32() as any;
6659
- continue;
6660
- }
6661
- }
6662
- if ((tag & 7) === 4 || tag === 0) {
6663
- break;
6664
- }
6665
- reader.skip(tag & 7);
6666
- }
6667
- return message;
6668
- } finally {
6669
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6670
- }
6671
- },
6672
-
6673
- fromJSON(object: any): DeactivateAITaskRevisionRequest {
6674
- return { task: isSet(object.task) ? aITaskFromJSON(object.task) : 0 };
6675
- },
6676
-
6677
- toJSON(message: DeactivateAITaskRevisionRequest): unknown {
6678
- const obj: any = {};
6679
- if (message.task !== 0) {
6680
- obj.task = aITaskToJSON(message.task);
6681
- }
6682
- return obj;
6683
- },
6684
-
6685
- create<I extends Exact<DeepPartial<DeactivateAITaskRevisionRequest>, I>>(base?: I): DeactivateAITaskRevisionRequest {
6686
- return DeactivateAITaskRevisionRequest.fromPartial(base ?? ({} as any));
6687
- },
6688
- fromPartial<I extends Exact<DeepPartial<DeactivateAITaskRevisionRequest>, I>>(
6689
- object: I,
6690
- ): DeactivateAITaskRevisionRequest {
6691
- const message = createBaseDeactivateAITaskRevisionRequest();
6692
- message.task = object.task ?? 0;
6693
- return message;
6694
- },
6695
- };
6696
-
6697
- function createBaseDeactivateAITaskRevisionResponse(): DeactivateAITaskRevisionResponse {
6698
- return { status: undefined };
6699
- }
6700
-
6701
- export const DeactivateAITaskRevisionResponse: MessageFns<DeactivateAITaskRevisionResponse> = {
6702
- encode(message: DeactivateAITaskRevisionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
6703
- if (message.status !== undefined) {
6704
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
6705
- }
6706
- return writer;
6707
- },
6708
-
6709
- decode(input: BinaryReader | Uint8Array, length?: number): DeactivateAITaskRevisionResponse {
6710
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6711
- const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
6712
- if (previousRecursionDepth >= 100) {
6713
- throw new globalThis.Error("protobuf decode recursion limit exceeded");
6714
- }
6715
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
6716
- try {
6717
- const end = length === undefined ? reader.len : reader.pos + length;
6718
- const message = createBaseDeactivateAITaskRevisionResponse();
6719
- while (reader.pos < end) {
6720
- const tag = reader.uint32();
6721
- switch (tag >>> 3) {
6722
- case 1: {
6723
- if (tag !== 10) {
6724
- break;
6725
- }
6726
-
6727
- message.status = ResponseStatus.decode(reader, reader.uint32());
6728
- continue;
6729
- }
6730
- }
6731
- if ((tag & 7) === 4 || tag === 0) {
6732
- break;
6733
- }
6734
- reader.skip(tag & 7);
6735
- }
6736
- return message;
6737
- } finally {
6738
- (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
6739
- }
6740
- },
6741
-
6742
- fromJSON(object: any): DeactivateAITaskRevisionResponse {
6743
- return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
6744
- },
6745
-
6746
- toJSON(message: DeactivateAITaskRevisionResponse): unknown {
6747
- const obj: any = {};
6748
- if (message.status !== undefined) {
6749
- obj.status = ResponseStatus.toJSON(message.status);
6750
- }
6751
- return obj;
6752
- },
6753
-
6754
- create<I extends Exact<DeepPartial<DeactivateAITaskRevisionResponse>, I>>(
6755
- base?: I,
6756
- ): DeactivateAITaskRevisionResponse {
6757
- return DeactivateAITaskRevisionResponse.fromPartial(base ?? ({} as any));
6758
- },
6759
- fromPartial<I extends Exact<DeepPartial<DeactivateAITaskRevisionResponse>, I>>(
6760
- object: I,
6761
- ): DeactivateAITaskRevisionResponse {
6762
- const message = createBaseDeactivateAITaskRevisionResponse();
6763
- message.status = (object.status !== undefined && object.status !== null)
6764
- ? ResponseStatus.fromPartial(object.status)
5770
+ message.taskModel = (object.taskModel !== undefined && object.taskModel !== null)
5771
+ ? AITaskModel.fromPartial(object.taskModel)
6765
5772
  : undefined;
6766
5773
  return message;
6767
5774
  },
@@ -6837,39 +5844,16 @@ export interface AdminGatewayService {
6837
5844
  */
6838
5845
  ResolveUserDetails(request: ResolveUserDetailsRequest, metadata?: Metadata): Promise<ResolveUserDetailsResponse>;
6839
5846
  /**
6840
- * The AI jobs' models and prompts, each saved as immutable revisions with at most one active revision per job; they proxy
6841
- * ai.api.v1.AIAdminService's RPCs of the same names. ListAITasks lists every configurable job with its name,
6842
- * description, active revision, built-in prompt and the parts that stay code. Accepted risk: unpaged (proto_api_test unpagedLists):
5847
+ * The AI jobs' models; they proxy ai.api.v1.AIAdminService's RPCs of the same names. ListAITaskModels lists every
5848
+ * AI job, in AITask order, with the model staff chose for it. Accepted risk: unpaged (proto_api_test unpagedLists):
6843
5849
  * one row per job, six today; the upgrade path is token paging if it ever passes 50.
6844
5850
  */
6845
- ListAITasks(request: ListAITasksRequest, metadata?: Metadata): Promise<ListAITasksResponse>;
6846
- /** ListAITaskRevisions lists one job's revisions, newest number first, with their full prompt. */
6847
- ListAITaskRevisions(request: ListAITaskRevisionsRequest, metadata?: Metadata): Promise<ListAITaskRevisionsResponse>;
5851
+ ListAITaskModels(request: ListAITaskModelsRequest, metadata?: Metadata): Promise<ListAITaskModelsResponse>;
6848
5852
  /**
6849
- * CreateAITaskRevision saves a new revision, numbered after the job's newest, as the caller; it does not activate
6850
- * it. A concurrent save that takes the same number is a conflict: retry.
5853
+ * UpdateAITaskModel sets the model a job runs, as the caller, replacing any earlier choice. The job reads it on its
5854
+ * next run. Last write wins.
6851
5855
  */
6852
- CreateAITaskRevision(
6853
- request: CreateAITaskRevisionRequest,
6854
- metadata?: Metadata,
6855
- ): Promise<CreateAITaskRevisionResponse>;
6856
- /**
6857
- * ActivateAITaskRevision makes a revision of the job active, as the caller; activating an older one is a rollback.
6858
- * A job that reads revisions picks it up on its next tick; until the insight jobs do, they keep their chart model
6859
- * and embedded prompt. Last write wins.
6860
- */
6861
- ActivateAITaskRevision(
6862
- request: ActivateAITaskRevisionRequest,
6863
- metadata?: Metadata,
6864
- ): Promise<ActivateAITaskRevisionResponse>;
6865
- /**
6866
- * DeactivateAITaskRevision clears the job's active revision, as the caller, so the job runs its built-in prompt
6867
- * again; its revisions stay in the history, and with none active it changes nothing. Last write wins.
6868
- */
6869
- DeactivateAITaskRevision(
6870
- request: DeactivateAITaskRevisionRequest,
6871
- metadata?: Metadata,
6872
- ): Promise<DeactivateAITaskRevisionResponse>;
5856
+ UpdateAITaskModel(request: UpdateAITaskModelRequest, metadata?: Metadata): Promise<UpdateAITaskModelResponse>;
6873
5857
  }
6874
5858
 
6875
5859
  export const AdminGatewayServiceServiceName = "gateway.web.v1.AdminGatewayService";
@@ -6896,11 +5880,8 @@ export class AdminGatewayServiceClientImpl implements AdminGatewayService {
6896
5880
  this.ResolveOrgDetails = this.ResolveOrgDetails.bind(this);
6897
5881
  this.ResolveProjectDetails = this.ResolveProjectDetails.bind(this);
6898
5882
  this.ResolveUserDetails = this.ResolveUserDetails.bind(this);
6899
- this.ListAITasks = this.ListAITasks.bind(this);
6900
- this.ListAITaskRevisions = this.ListAITaskRevisions.bind(this);
6901
- this.CreateAITaskRevision = this.CreateAITaskRevision.bind(this);
6902
- this.ActivateAITaskRevision = this.ActivateAITaskRevision.bind(this);
6903
- this.DeactivateAITaskRevision = this.DeactivateAITaskRevision.bind(this);
5883
+ this.ListAITaskModels = this.ListAITaskModels.bind(this);
5884
+ this.UpdateAITaskModel = this.UpdateAITaskModel.bind(this);
6904
5885
  }
6905
5886
  GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse> {
6906
5887
  const data = GetAdminStatusRequest.encode(request).finish();
@@ -7010,43 +5991,16 @@ export class AdminGatewayServiceClientImpl implements AdminGatewayService {
7010
5991
  return promise.then((data) => ResolveUserDetailsResponse.decode(new BinaryReader(data)));
7011
5992
  }
7012
5993
 
7013
- ListAITasks(request: ListAITasksRequest, metadata?: Metadata): Promise<ListAITasksResponse> {
7014
- const data = ListAITasksRequest.encode(request).finish();
7015
- const promise = this.rpc.request(this.service, "ListAITasks", data, metadata);
7016
- return promise.then((data) => ListAITasksResponse.decode(new BinaryReader(data)));
7017
- }
7018
-
7019
- ListAITaskRevisions(request: ListAITaskRevisionsRequest, metadata?: Metadata): Promise<ListAITaskRevisionsResponse> {
7020
- const data = ListAITaskRevisionsRequest.encode(request).finish();
7021
- const promise = this.rpc.request(this.service, "ListAITaskRevisions", data, metadata);
7022
- return promise.then((data) => ListAITaskRevisionsResponse.decode(new BinaryReader(data)));
7023
- }
7024
-
7025
- CreateAITaskRevision(
7026
- request: CreateAITaskRevisionRequest,
7027
- metadata?: Metadata,
7028
- ): Promise<CreateAITaskRevisionResponse> {
7029
- const data = CreateAITaskRevisionRequest.encode(request).finish();
7030
- const promise = this.rpc.request(this.service, "CreateAITaskRevision", data, metadata);
7031
- return promise.then((data) => CreateAITaskRevisionResponse.decode(new BinaryReader(data)));
7032
- }
7033
-
7034
- ActivateAITaskRevision(
7035
- request: ActivateAITaskRevisionRequest,
7036
- metadata?: Metadata,
7037
- ): Promise<ActivateAITaskRevisionResponse> {
7038
- const data = ActivateAITaskRevisionRequest.encode(request).finish();
7039
- const promise = this.rpc.request(this.service, "ActivateAITaskRevision", data, metadata);
7040
- return promise.then((data) => ActivateAITaskRevisionResponse.decode(new BinaryReader(data)));
5994
+ ListAITaskModels(request: ListAITaskModelsRequest, metadata?: Metadata): Promise<ListAITaskModelsResponse> {
5995
+ const data = ListAITaskModelsRequest.encode(request).finish();
5996
+ const promise = this.rpc.request(this.service, "ListAITaskModels", data, metadata);
5997
+ return promise.then((data) => ListAITaskModelsResponse.decode(new BinaryReader(data)));
7041
5998
  }
7042
5999
 
7043
- DeactivateAITaskRevision(
7044
- request: DeactivateAITaskRevisionRequest,
7045
- metadata?: Metadata,
7046
- ): Promise<DeactivateAITaskRevisionResponse> {
7047
- const data = DeactivateAITaskRevisionRequest.encode(request).finish();
7048
- const promise = this.rpc.request(this.service, "DeactivateAITaskRevision", data, metadata);
7049
- return promise.then((data) => DeactivateAITaskRevisionResponse.decode(new BinaryReader(data)));
6000
+ UpdateAITaskModel(request: UpdateAITaskModelRequest, metadata?: Metadata): Promise<UpdateAITaskModelResponse> {
6001
+ const data = UpdateAITaskModelRequest.encode(request).finish();
6002
+ const promise = this.rpc.request(this.service, "UpdateAITaskModel", data, metadata);
6003
+ return promise.then((data) => UpdateAITaskModelResponse.decode(new BinaryReader(data)));
7050
6004
  }
7051
6005
  }
7052
6006