@uipath/agent-tool 1.204.0-preview.246 → 1.204.0-preview.249

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.
@@ -13303,6 +13303,11 @@ var serializeRoot = (root) => {
13303
13303
  currentFolder = remainingFolders.pop() ?? null;
13304
13304
  }
13305
13305
  };
13306
+ var toSerializedRoot = (root) => {
13307
+ const clone2 = structuredClone(root);
13308
+ serializeRoot(clone2);
13309
+ return clone2;
13310
+ };
13306
13311
  var MAX_PROPERTY_NAME_LENGTH = 511;
13307
13312
  var jsonSchemaTypeSchema = exports_external.enum([
13308
13313
  "array",
@@ -14042,7 +14047,7 @@ var migrationV2 = createMigration({
14042
14047
  ]
14043
14048
  },
14044
14049
  migrate: (prev) => {
14045
- const agentFile = prev.files[0];
14050
+ const agentFile2 = prev.files[0];
14046
14051
  const toolsFolder = prev.folders.find((f) => f.name === "resources").folders.find((f) => f.name === "tools");
14047
14052
  return {
14048
14053
  folders: [
@@ -14083,7 +14088,7 @@ var migrationV2 = createMigration({
14083
14088
  {
14084
14089
  name: "agent.json",
14085
14090
  content: {
14086
- ...agentFile.content,
14091
+ ...agentFile2.content,
14087
14092
  version: "2.0.0",
14088
14093
  inputSchema: { type: "object", properties: {} },
14089
14094
  outputSchema: { type: "object", properties: {} }
@@ -14151,17 +14156,17 @@ var migrationV3 = createMigration({
14151
14156
  ]
14152
14157
  },
14153
14158
  migrate: (prev) => {
14154
- const agentFile = prev.files[0];
14159
+ const agentFile2 = prev.files[0];
14155
14160
  return {
14156
14161
  ...prev,
14157
14162
  files: [
14158
14163
  {
14159
14164
  name: "agent.json",
14160
14165
  content: {
14161
- ...agentFile.content,
14166
+ ...agentFile2.content,
14162
14167
  version: "3.0.0",
14163
14168
  settings: {
14164
- ...agentFile.content.settings,
14169
+ ...agentFile2.content.settings,
14165
14170
  engine: "basic-v1"
14166
14171
  }
14167
14172
  }
@@ -14263,7 +14268,7 @@ var migrationV4 = createMigration({
14263
14268
  ]
14264
14269
  },
14265
14270
  migrate: (prev) => {
14266
- const agentFile = prev.files[0];
14271
+ const agentFile2 = prev.files[0];
14267
14272
  const sourceResourcesFolder = prev.folders.find((folder) => folder.name === "resources");
14268
14273
  const migratedResourcesFolder = {
14269
14274
  name: "resources",
@@ -14292,7 +14297,7 @@ var migrationV4 = createMigration({
14292
14297
  {
14293
14298
  name: "agent.json",
14294
14299
  content: {
14295
- ...agentFile.content,
14300
+ ...agentFile2.content,
14296
14301
  version: "4.0.0"
14297
14302
  }
14298
14303
  }
@@ -14402,7 +14407,7 @@ var migrationV5 = createMigration({
14402
14407
  ]
14403
14408
  },
14404
14409
  migrate: (prev) => {
14405
- const agentFile = prev.files[0];
14410
+ const agentFile2 = prev.files[0];
14406
14411
  const sourceResourcesFolder = prev.folders.find((folder) => folder.name === "resources");
14407
14412
  const migratedResourcesFolder = {
14408
14413
  name: "resources",
@@ -14451,7 +14456,7 @@ var migrationV5 = createMigration({
14451
14456
  {
14452
14457
  name: "agent.json",
14453
14458
  content: {
14454
- ...agentFile.content,
14459
+ ...agentFile2.content,
14455
14460
  version: "5.0.0"
14456
14461
  }
14457
14462
  }
@@ -14572,7 +14577,7 @@ var migrationV6 = createMigration({
14572
14577
  ]
14573
14578
  },
14574
14579
  migrate: (prev) => {
14575
- const agentFile = prev.files[0];
14580
+ const agentFile2 = prev.files[0];
14576
14581
  const sourceResourcesFolder = prev.folders.find((folder) => folder.name === "resources");
14577
14582
  const migratedResourcesFolder = {
14578
14583
  name: "resources",
@@ -14622,7 +14627,7 @@ var migrationV6 = createMigration({
14622
14627
  {
14623
14628
  name: "agent.json",
14624
14629
  content: {
14625
- ...agentFile.content,
14630
+ ...agentFile2.content,
14626
14631
  version: "1.0.0",
14627
14632
  metadata: {
14628
14633
  storageVersion: "6.0.0"
@@ -14750,7 +14755,7 @@ var migrationV7 = createMigration({
14750
14755
  ]
14751
14756
  },
14752
14757
  migrate: (prev) => {
14753
- const agentFile = prev.files[0];
14758
+ const agentFile2 = prev.files[0];
14754
14759
  const sourceResourcesFolder = prev.folders.find((folder) => folder.name === "resources");
14755
14760
  const migratedResourcesFolder = {
14756
14761
  name: "resources",
@@ -14800,7 +14805,7 @@ var migrationV7 = createMigration({
14800
14805
  {
14801
14806
  name: "agent.json",
14802
14807
  content: {
14803
- ...agentFile.content,
14808
+ ...agentFile2.content,
14804
14809
  version: "1.0.0",
14805
14810
  metadata: {
14806
14811
  storageVersion: "7.0.0"
@@ -15108,7 +15113,7 @@ var migrationV8 = createMigration({
15108
15113
  ]
15109
15114
  },
15110
15115
  migrate: (prev) => {
15111
- const agentFile = prev.files[0];
15116
+ const agentFile2 = prev.files[0];
15112
15117
  const sourceResourcesFolder = prev.folders.find((folder) => folder.name === "resources");
15113
15118
  const migratedResourcesFolder = {
15114
15119
  name: "resources",
@@ -15135,7 +15140,7 @@ var migrationV8 = createMigration({
15135
15140
  {
15136
15141
  name: "agent.json",
15137
15142
  content: {
15138
- ...agentFile.content,
15143
+ ...agentFile2.content,
15139
15144
  version: "1.0.0",
15140
15145
  metadata: {
15141
15146
  storageVersion: "8.0.0"
@@ -15312,7 +15317,7 @@ var migrationV9 = createMigration({
15312
15317
  ]
15313
15318
  },
15314
15319
  migrate: (prev) => {
15315
- const agentFile = prev.files[0];
15320
+ const agentFile2 = prev.files[0];
15316
15321
  const sourceResourcesFolder = prev.folders.find((folder) => folder.name === "resources");
15317
15322
  const migratedResourcesFolder = {
15318
15323
  name: "resources",
@@ -15364,7 +15369,7 @@ var migrationV9 = createMigration({
15364
15369
  {
15365
15370
  name: "agent.json",
15366
15371
  content: {
15367
- ...agentFile.content,
15372
+ ...agentFile2.content,
15368
15373
  version: "1.0.0",
15369
15374
  metadata: {
15370
15375
  storageVersion: "9.0.0"
@@ -15609,7 +15614,7 @@ var migrationV10 = createMigration({
15609
15614
  ]
15610
15615
  },
15611
15616
  migrate: (prev) => {
15612
- const agentFile = prev.files[0];
15617
+ const agentFile2 = prev.files[0];
15613
15618
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
15614
15619
  const evalsFolder8 = prev.folders.find((folder) => folder.name.toString() === "evals");
15615
15620
  const evaluatorFiles = evalsFolder8?.folders.find((folder) => folder.name === "evaluators")?.files ?? [];
@@ -15695,7 +15700,7 @@ var migrationV10 = createMigration({
15695
15700
  {
15696
15701
  name: "agent.json",
15697
15702
  content: {
15698
- ...agentFile.content,
15703
+ ...agentFile2.content,
15699
15704
  version: "1.0.0",
15700
15705
  metadata: {
15701
15706
  storageVersion: "10.0.0"
@@ -15864,14 +15869,14 @@ var migrationV11 = createMigration({
15864
15869
  ]
15865
15870
  },
15866
15871
  migrate: (prev) => {
15867
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
15872
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
15868
15873
  return {
15869
15874
  folders: prev.folders,
15870
15875
  files: [
15871
15876
  {
15872
15877
  name: "agent.json",
15873
15878
  content: {
15874
- ...agentFile.content,
15879
+ ...agentFile2.content,
15875
15880
  version: "1.0.0",
15876
15881
  metadata: {
15877
15882
  storageVersion: "11.0.0"
@@ -15986,14 +15991,14 @@ var migrationV12 = createMigration({
15986
15991
  ]
15987
15992
  },
15988
15993
  migrate: (prev) => {
15989
- const agentFile = prev.files[0];
15994
+ const agentFile2 = prev.files[0];
15990
15995
  return {
15991
15996
  folders: prev.folders,
15992
15997
  files: [
15993
15998
  {
15994
15999
  name: "agent.json",
15995
16000
  content: {
15996
- ...agentFile.content,
16001
+ ...agentFile2.content,
15997
16002
  version: "1.0.0",
15998
16003
  metadata: {
15999
16004
  storageVersion: "12.0.0",
@@ -16192,17 +16197,17 @@ var migrationV13 = createMigration({
16192
16197
  ]
16193
16198
  },
16194
16199
  migrate: (prev) => {
16195
- const agentFile = prev.files[0];
16200
+ const agentFile2 = prev.files[0];
16196
16201
  return {
16197
16202
  folders: prev.folders,
16198
16203
  files: [
16199
16204
  {
16200
16205
  name: "agent.json",
16201
16206
  content: {
16202
- ...agentFile.content,
16207
+ ...agentFile2.content,
16203
16208
  version: "1.0.0",
16204
16209
  metadata: {
16205
- ...agentFile.content.metadata,
16210
+ ...agentFile2.content.metadata,
16206
16211
  storageVersion: "13.0.0"
16207
16212
  }
16208
16213
  }
@@ -16368,11 +16373,11 @@ var migrationV14 = createMigration({
16368
16373
  ]
16369
16374
  },
16370
16375
  migrate: (prev) => {
16371
- const agentFile = prev.files[0];
16376
+ const agentFile2 = prev.files[0];
16372
16377
  const migratedAgent = {
16373
- ...agentFile.content,
16378
+ ...agentFile2.content,
16374
16379
  metadata: {
16375
- ...agentFile.content.metadata,
16380
+ ...agentFile2.content.metadata,
16376
16381
  storageVersion: "14.0.0"
16377
16382
  }
16378
16383
  };
@@ -16805,7 +16810,7 @@ var migrationV16 = createMigration({
16805
16810
  ]
16806
16811
  },
16807
16812
  migrate: (prev) => {
16808
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
16813
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
16809
16814
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
16810
16815
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
16811
16816
  const migratedResourcesFolder = {
@@ -16889,12 +16894,12 @@ var migrationV16 = createMigration({
16889
16894
  files: [
16890
16895
  {
16891
16896
  name: "agent.json",
16892
- content: agentFile.content.type === "lowCode" ? {
16893
- ...agentFile.content,
16894
- metadata: { ...agentFile.content.metadata, storageVersion: "16.0.0" }
16897
+ content: agentFile2.content.type === "lowCode" ? {
16898
+ ...agentFile2.content,
16899
+ metadata: { ...agentFile2.content.metadata, storageVersion: "16.0.0" }
16895
16900
  } : {
16896
- ...agentFile.content,
16897
- metadata: { ...agentFile.content.metadata, storageVersion: "16.0.0" }
16901
+ ...agentFile2.content,
16902
+ metadata: { ...agentFile2.content.metadata, storageVersion: "16.0.0" }
16898
16903
  }
16899
16904
  }
16900
16905
  ]
@@ -17027,18 +17032,18 @@ var migrationV17 = createMigration({
17027
17032
  ]
17028
17033
  },
17029
17034
  migrate: (prev) => {
17030
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
17035
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
17031
17036
  return {
17032
17037
  folders: prev.folders,
17033
17038
  files: [
17034
17039
  {
17035
17040
  name: "agent.json",
17036
- content: agentFile.content.type === "lowCode" ? {
17037
- ...agentFile.content,
17038
- metadata: { ...agentFile.content.metadata, storageVersion: "17.0.0" }
17041
+ content: agentFile2.content.type === "lowCode" ? {
17042
+ ...agentFile2.content,
17043
+ metadata: { ...agentFile2.content.metadata, storageVersion: "17.0.0" }
17039
17044
  } : {
17040
- ...agentFile.content,
17041
- metadata: { ...agentFile.content.metadata, storageVersion: "17.0.0" }
17045
+ ...agentFile2.content,
17046
+ metadata: { ...agentFile2.content.metadata, storageVersion: "17.0.0" }
17042
17047
  }
17043
17048
  }
17044
17049
  ]
@@ -17196,18 +17201,18 @@ var migrationV18 = createMigration({
17196
17201
  ]
17197
17202
  },
17198
17203
  migrate: (prev) => {
17199
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
17204
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
17200
17205
  return {
17201
17206
  folders: prev.folders,
17202
17207
  files: [
17203
17208
  {
17204
17209
  name: "agent.json",
17205
- content: agentFile.content.type === "lowCode" ? {
17206
- ...agentFile.content,
17207
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion }
17210
+ content: agentFile2.content.type === "lowCode" ? {
17211
+ ...agentFile2.content,
17212
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion }
17208
17213
  } : {
17209
- ...agentFile.content,
17210
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion }
17214
+ ...agentFile2.content,
17215
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion }
17211
17216
  }
17212
17217
  }
17213
17218
  ]
@@ -17366,7 +17371,7 @@ var migrationV19 = createMigration({
17366
17371
  ]
17367
17372
  },
17368
17373
  migrate: (prev) => {
17369
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
17374
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
17370
17375
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
17371
17376
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
17372
17377
  const migratedResourcesFolder = {
@@ -17414,12 +17419,12 @@ var migrationV19 = createMigration({
17414
17419
  files: [
17415
17420
  {
17416
17421
  name: "agent.json",
17417
- content: agentFile.content.type === "lowCode" ? {
17418
- ...agentFile.content,
17419
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion2 }
17422
+ content: agentFile2.content.type === "lowCode" ? {
17423
+ ...agentFile2.content,
17424
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion2 }
17420
17425
  } : {
17421
- ...agentFile.content,
17422
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion2 }
17426
+ ...agentFile2.content,
17427
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion2 }
17423
17428
  }
17424
17429
  }
17425
17430
  ]
@@ -17570,7 +17575,7 @@ var migrationV20 = createMigration({
17570
17575
  ]
17571
17576
  },
17572
17577
  migrate: (prev) => {
17573
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
17578
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
17574
17579
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
17575
17580
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
17576
17581
  const migratedResourcesFolder = {
@@ -17616,12 +17621,12 @@ var migrationV20 = createMigration({
17616
17621
  files: [
17617
17622
  {
17618
17623
  name: "agent.json",
17619
- content: agentFile.content.type === "lowCode" ? {
17620
- ...agentFile.content,
17621
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion3 }
17624
+ content: agentFile2.content.type === "lowCode" ? {
17625
+ ...agentFile2.content,
17626
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion3 }
17622
17627
  } : {
17623
- ...agentFile.content,
17624
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion3 }
17628
+ ...agentFile2.content,
17629
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion3 }
17625
17630
  }
17626
17631
  }
17627
17632
  ]
@@ -17796,7 +17801,7 @@ var migrationV21 = createMigration({
17796
17801
  ]
17797
17802
  },
17798
17803
  migrate: (prev) => {
17799
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
17804
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
17800
17805
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
17801
17806
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
17802
17807
  const toolGuardrails = [];
@@ -17861,13 +17866,13 @@ var migrationV21 = createMigration({
17861
17866
  files: [
17862
17867
  {
17863
17868
  name: "agent.json",
17864
- content: agentFile.content.type === "lowCode" ? {
17865
- ...agentFile.content,
17866
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion4 },
17869
+ content: agentFile2.content.type === "lowCode" ? {
17870
+ ...agentFile2.content,
17871
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion4 },
17867
17872
  guardrails: toolGuardrails
17868
17873
  } : {
17869
- ...agentFile.content,
17870
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion4 }
17874
+ ...agentFile2.content,
17875
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion4 }
17871
17876
  }
17872
17877
  }
17873
17878
  ]
@@ -18063,7 +18068,7 @@ var migrationV22 = createMigration({
18063
18068
  ]
18064
18069
  },
18065
18070
  migrate: (prev) => {
18066
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
18071
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
18067
18072
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
18068
18073
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
18069
18074
  const migratedResourcesFolder = {
@@ -18132,12 +18137,12 @@ var migrationV22 = createMigration({
18132
18137
  files: [
18133
18138
  {
18134
18139
  name: "agent.json",
18135
- content: agentFile.content.type === "lowCode" ? {
18136
- ...agentFile.content,
18137
- metadata: { ...agentFile.content.metadata, storageVersion: version2 }
18140
+ content: agentFile2.content.type === "lowCode" ? {
18141
+ ...agentFile2.content,
18142
+ metadata: { ...agentFile2.content.metadata, storageVersion: version2 }
18138
18143
  } : {
18139
- ...agentFile.content,
18140
- metadata: { ...agentFile.content.metadata, storageVersion: version2 }
18144
+ ...agentFile2.content,
18145
+ metadata: { ...agentFile2.content.metadata, storageVersion: version2 }
18141
18146
  }
18142
18147
  }
18143
18148
  ]
@@ -18334,7 +18339,7 @@ var migrationV23 = createMigration({
18334
18339
  ]
18335
18340
  },
18336
18341
  migrate: (prev) => {
18337
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
18342
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
18338
18343
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
18339
18344
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
18340
18345
  const migratedResourcesFolder = {
@@ -18383,13 +18388,13 @@ var migrationV23 = createMigration({
18383
18388
  files: [
18384
18389
  {
18385
18390
  name: "agent.json",
18386
- content: agentFile.content.type === "lowCode" ? {
18387
- ...agentFile.content,
18388
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion5 },
18389
- guardrails: agentFile.content.guardrails?.map((g) => migrateGuardrail(g))
18391
+ content: agentFile2.content.type === "lowCode" ? {
18392
+ ...agentFile2.content,
18393
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion5 },
18394
+ guardrails: agentFile2.content.guardrails?.map((g) => migrateGuardrail(g))
18390
18395
  } : {
18391
- ...agentFile.content,
18392
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion5 }
18396
+ ...agentFile2.content,
18397
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion5 }
18393
18398
  }
18394
18399
  }
18395
18400
  ]
@@ -18456,22 +18461,22 @@ var migrationV24 = createMigration({
18456
18461
  ]
18457
18462
  },
18458
18463
  migrate: (prev) => {
18459
- const agentFile = prev.files[0];
18464
+ const agentFile2 = prev.files[0];
18460
18465
  return {
18461
18466
  ...prev,
18462
18467
  files: [
18463
18468
  {
18464
18469
  name: "agent.json",
18465
- content: agentFile.content.type === "lowCode" ? {
18466
- ...agentFile.content,
18467
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion6 },
18470
+ content: agentFile2.content.type === "lowCode" ? {
18471
+ ...agentFile2.content,
18472
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion6 },
18468
18473
  settings: {
18469
- ...agentFile.content.settings,
18474
+ ...agentFile2.content.settings,
18470
18475
  engine: "basic-v2"
18471
18476
  }
18472
18477
  } : {
18473
- ...agentFile.content,
18474
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion6 }
18478
+ ...agentFile2.content,
18479
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion6 }
18475
18480
  }
18476
18481
  }
18477
18482
  ]
@@ -18621,7 +18626,7 @@ var migrationV25 = createMigration({
18621
18626
  ]
18622
18627
  },
18623
18628
  migrate: (prev) => {
18624
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
18629
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
18625
18630
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
18626
18631
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
18627
18632
  const rootFolders = [evalsFolder8, resourcesFolder8];
@@ -18630,16 +18635,16 @@ var migrationV25 = createMigration({
18630
18635
  files: [
18631
18636
  {
18632
18637
  name: "agent.json",
18633
- content: agentFile.content.type === "lowCode" ? {
18634
- ...agentFile.content,
18635
- metadata: { ...agentFile.content.metadata, storageVersion: version22 },
18636
- messages: agentFile.content.messages.map((message) => ({
18638
+ content: agentFile2.content.type === "lowCode" ? {
18639
+ ...agentFile2.content,
18640
+ metadata: { ...agentFile2.content.metadata, storageVersion: version22 },
18641
+ messages: agentFile2.content.messages.map((message) => ({
18637
18642
  ...message,
18638
18643
  contentTokens: parseContentToTokens(message.content)
18639
18644
  }))
18640
18645
  } : {
18641
- ...agentFile.content,
18642
- metadata: { ...agentFile.content.metadata, storageVersion: version22 }
18646
+ ...agentFile2.content,
18647
+ metadata: { ...agentFile2.content.metadata, storageVersion: version22 }
18643
18648
  }
18644
18649
  }
18645
18650
  ]
@@ -18720,22 +18725,22 @@ var migrationV26 = createMigration({
18720
18725
  ]
18721
18726
  },
18722
18727
  migrate: (prev) => {
18723
- const agentFile = prev.files[0];
18728
+ const agentFile2 = prev.files[0];
18724
18729
  return {
18725
18730
  ...prev,
18726
18731
  files: [
18727
18732
  {
18728
18733
  name: "agent.json",
18729
- content: agentFile.content.type === "lowCode" ? {
18730
- ...agentFile.content,
18731
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion7 },
18734
+ content: agentFile2.content.type === "lowCode" ? {
18735
+ ...agentFile2.content,
18736
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion7 },
18732
18737
  settings: {
18733
- ...agentFile.content.settings,
18734
- engine: agentFile.content.settings.engine === "basic-v2" && agentFile.content.metadata.isConversational === true ? "conversational-v1" : agentFile.content.settings.engine
18738
+ ...agentFile2.content.settings,
18739
+ engine: agentFile2.content.settings.engine === "basic-v2" && agentFile2.content.metadata.isConversational === true ? "conversational-v1" : agentFile2.content.settings.engine
18735
18740
  }
18736
18741
  } : {
18737
- ...agentFile.content,
18738
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion7 }
18742
+ ...agentFile2.content,
18743
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion7 }
18739
18744
  }
18740
18745
  }
18741
18746
  ]
@@ -18838,7 +18843,7 @@ var migrationV27 = createMigration({
18838
18843
  ]
18839
18844
  },
18840
18845
  migrate: (prev) => {
18841
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
18846
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
18842
18847
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
18843
18848
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
18844
18849
  const migratedResourceFolders = resourcesFolder8.folders.map((resourceFolder) => {
@@ -18882,12 +18887,12 @@ var migrationV27 = createMigration({
18882
18887
  files: [
18883
18888
  {
18884
18889
  name: "agent.json",
18885
- content: agentFile.content.type === "lowCode" ? {
18886
- ...agentFile.content,
18887
- metadata: { ...agentFile.content.metadata, storageVersion: version3 }
18890
+ content: agentFile2.content.type === "lowCode" ? {
18891
+ ...agentFile2.content,
18892
+ metadata: { ...agentFile2.content.metadata, storageVersion: version3 }
18888
18893
  } : {
18889
- ...agentFile.content,
18890
- metadata: { ...agentFile.content.metadata, storageVersion: version3 }
18894
+ ...agentFile2.content,
18895
+ metadata: { ...agentFile2.content.metadata, storageVersion: version3 }
18891
18896
  }
18892
18897
  }
18893
18898
  ]
@@ -18953,19 +18958,19 @@ var migrationV28 = createMigration({
18953
18958
  ]
18954
18959
  },
18955
18960
  migrate: (prev) => {
18956
- const agentFile = prev.files[0];
18961
+ const agentFile2 = prev.files[0];
18957
18962
  return {
18958
18963
  ...prev,
18959
18964
  files: [
18960
18965
  {
18961
18966
  name: "agent.json",
18962
- content: agentFile.content.type === "lowCode" ? {
18963
- ...agentFile.content,
18964
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion8 },
18967
+ content: agentFile2.content.type === "lowCode" ? {
18968
+ ...agentFile2.content,
18969
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion8 },
18965
18970
  projectId: ""
18966
18971
  } : {
18967
- ...agentFile.content,
18968
- metadata: { ...agentFile.content.metadata, storageVersion: currentVersion8 },
18972
+ ...agentFile2.content,
18973
+ metadata: { ...agentFile2.content.metadata, storageVersion: currentVersion8 },
18969
18974
  projectId: ""
18970
18975
  }
18971
18976
  }
@@ -19091,7 +19096,7 @@ var migrationV29 = createMigration({
19091
19096
  ]
19092
19097
  },
19093
19098
  migrate: (prev) => {
19094
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19099
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19095
19100
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
19096
19101
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
19097
19102
  const featuresFolder = {
@@ -19109,12 +19114,12 @@ var migrationV29 = createMigration({
19109
19114
  files: [
19110
19115
  {
19111
19116
  name: "agent.json",
19112
- content: agentFile.content.type === "lowCode" ? {
19113
- ...agentFile.content,
19114
- metadata: { ...agentFile.content.metadata, storageVersion: version4 }
19117
+ content: agentFile2.content.type === "lowCode" ? {
19118
+ ...agentFile2.content,
19119
+ metadata: { ...agentFile2.content.metadata, storageVersion: version4 }
19115
19120
  } : {
19116
- ...agentFile.content,
19117
- metadata: { ...agentFile.content.metadata, storageVersion: version4 }
19121
+ ...agentFile2.content,
19122
+ metadata: { ...agentFile2.content.metadata, storageVersion: version4 }
19118
19123
  }
19119
19124
  }
19120
19125
  ]
@@ -19243,7 +19248,7 @@ var migrationV30 = createMigration({
19243
19248
  ]
19244
19249
  },
19245
19250
  migrate: (prev) => {
19246
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19251
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19247
19252
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
19248
19253
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
19249
19254
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
@@ -19283,12 +19288,12 @@ var migrationV30 = createMigration({
19283
19288
  files: [
19284
19289
  {
19285
19290
  name: "agent.json",
19286
- content: agentFile.content.type === "lowCode" ? {
19287
- ...agentFile.content,
19288
- metadata: { ...agentFile.content.metadata, storageVersion: version5 }
19291
+ content: agentFile2.content.type === "lowCode" ? {
19292
+ ...agentFile2.content,
19293
+ metadata: { ...agentFile2.content.metadata, storageVersion: version5 }
19289
19294
  } : {
19290
- ...agentFile.content,
19291
- metadata: { ...agentFile.content.metadata, storageVersion: version5 }
19295
+ ...agentFile2.content,
19296
+ metadata: { ...agentFile2.content.metadata, storageVersion: version5 }
19292
19297
  }
19293
19298
  }
19294
19299
  ]
@@ -19367,7 +19372,7 @@ var migrationV31 = createMigration({
19367
19372
  ]
19368
19373
  },
19369
19374
  migrate: (prev) => {
19370
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19375
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19371
19376
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
19372
19377
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
19373
19378
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
@@ -19381,13 +19386,13 @@ var migrationV31 = createMigration({
19381
19386
  files: [
19382
19387
  {
19383
19388
  name: "agent.json",
19384
- content: agentFile.content.type === "lowCode" ? {
19385
- ...agentFile.content,
19386
- metadata: { ...agentFile.content.metadata, storageVersion: version6 },
19387
- settings: agentFile.content.metadata.isConversational === true ? { ...agentFile.content.settings } : { ...agentFile.content.settings, maxIterations: 25 }
19389
+ content: agentFile2.content.type === "lowCode" ? {
19390
+ ...agentFile2.content,
19391
+ metadata: { ...agentFile2.content.metadata, storageVersion: version6 },
19392
+ settings: agentFile2.content.metadata.isConversational === true ? { ...agentFile2.content.settings } : { ...agentFile2.content.settings, maxIterations: 25 }
19388
19393
  } : {
19389
- ...agentFile.content,
19390
- metadata: { ...agentFile.content.metadata, storageVersion: version6 }
19394
+ ...agentFile2.content,
19395
+ metadata: { ...agentFile2.content.metadata, storageVersion: version6 }
19391
19396
  }
19392
19397
  }
19393
19398
  ]
@@ -19484,7 +19489,7 @@ var migrationV32 = createMigration({
19484
19489
  ]
19485
19490
  },
19486
19491
  migrate: (prev) => {
19487
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19492
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19488
19493
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
19489
19494
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
19490
19495
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
@@ -19498,12 +19503,12 @@ var migrationV32 = createMigration({
19498
19503
  files: [
19499
19504
  {
19500
19505
  name: "agent.json",
19501
- content: agentFile.content.type === "lowCode" ? {
19502
- ...agentFile.content,
19503
- metadata: { ...agentFile.content.metadata, storageVersion: version7 }
19506
+ content: agentFile2.content.type === "lowCode" ? {
19507
+ ...agentFile2.content,
19508
+ metadata: { ...agentFile2.content.metadata, storageVersion: version7 }
19504
19509
  } : {
19505
- ...agentFile.content,
19506
- metadata: { ...agentFile.content.metadata, storageVersion: version7 }
19510
+ ...agentFile2.content,
19511
+ metadata: { ...agentFile2.content.metadata, storageVersion: version7 }
19507
19512
  }
19508
19513
  }
19509
19514
  ]
@@ -19685,18 +19690,18 @@ var migrationV33 = createMigration({
19685
19690
  ]
19686
19691
  },
19687
19692
  migrate: (prev) => {
19688
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19693
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19689
19694
  return {
19690
19695
  folders: prev.folders,
19691
19696
  files: [
19692
19697
  {
19693
19698
  name: "agent.json",
19694
- content: agentFile.content.type === "lowCode" ? {
19695
- ...agentFile.content,
19696
- metadata: { ...agentFile.content.metadata, storageVersion: version8 }
19699
+ content: agentFile2.content.type === "lowCode" ? {
19700
+ ...agentFile2.content,
19701
+ metadata: { ...agentFile2.content.metadata, storageVersion: version8 }
19697
19702
  } : {
19698
- ...agentFile.content,
19699
- metadata: { ...agentFile.content.metadata, storageVersion: version8 }
19703
+ ...agentFile2.content,
19704
+ metadata: { ...agentFile2.content.metadata, storageVersion: version8 }
19700
19705
  }
19701
19706
  }
19702
19707
  ]
@@ -19780,7 +19785,7 @@ var migrationV34 = createMigration({
19780
19785
  ]
19781
19786
  },
19782
19787
  migrate: (prev) => {
19783
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19788
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19784
19789
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
19785
19790
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
19786
19791
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
@@ -19794,12 +19799,12 @@ var migrationV34 = createMigration({
19794
19799
  files: [
19795
19800
  {
19796
19801
  name: "agent.json",
19797
- content: agentFile.content.type === "lowCode" ? {
19798
- ...agentFile.content,
19799
- metadata: { ...agentFile.content.metadata, storageVersion: version9 }
19802
+ content: agentFile2.content.type === "lowCode" ? {
19803
+ ...agentFile2.content,
19804
+ metadata: { ...agentFile2.content.metadata, storageVersion: version9 }
19800
19805
  } : {
19801
- ...agentFile.content,
19802
- metadata: { ...agentFile.content.metadata, storageVersion: version9 }
19806
+ ...agentFile2.content,
19807
+ metadata: { ...agentFile2.content.metadata, storageVersion: version9 }
19803
19808
  }
19804
19809
  }
19805
19810
  ]
@@ -19892,7 +19897,7 @@ var migrationV35 = createMigration({
19892
19897
  ]
19893
19898
  },
19894
19899
  migrate: (prev) => {
19895
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
19900
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
19896
19901
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
19897
19902
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
19898
19903
  const resourcesFolder8 = prev.folders.find((folder) => folder.name === "resources");
@@ -19906,12 +19911,12 @@ var migrationV35 = createMigration({
19906
19911
  files: [
19907
19912
  {
19908
19913
  name: "agent.json",
19909
- content: agentFile.content.type === "lowCode" ? {
19910
- ...agentFile.content,
19911
- metadata: { ...agentFile.content.metadata, storageVersion: version10 }
19914
+ content: agentFile2.content.type === "lowCode" ? {
19915
+ ...agentFile2.content,
19916
+ metadata: { ...agentFile2.content.metadata, storageVersion: version10 }
19912
19917
  } : {
19913
- ...agentFile.content,
19914
- metadata: { ...agentFile.content.metadata, storageVersion: version10 }
19918
+ ...agentFile2.content,
19919
+ metadata: { ...agentFile2.content.metadata, storageVersion: version10 }
19915
19920
  }
19916
19921
  },
19917
19922
  {
@@ -20039,7 +20044,7 @@ var migrationV36 = createMigration({
20039
20044
  ]
20040
20045
  },
20041
20046
  migrate: (prev) => {
20042
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
20047
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
20043
20048
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
20044
20049
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
20045
20050
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -20079,12 +20084,12 @@ var migrationV36 = createMigration({
20079
20084
  files: [
20080
20085
  {
20081
20086
  name: "agent.json",
20082
- content: agentFile.content.type === "lowCode" ? {
20083
- ...agentFile.content,
20084
- metadata: { ...agentFile.content.metadata, storageVersion: version11 }
20087
+ content: agentFile2.content.type === "lowCode" ? {
20088
+ ...agentFile2.content,
20089
+ metadata: { ...agentFile2.content.metadata, storageVersion: version11 }
20085
20090
  } : {
20086
- ...agentFile.content,
20087
- metadata: { ...agentFile.content.metadata, storageVersion: version11 }
20091
+ ...agentFile2.content,
20092
+ metadata: { ...agentFile2.content.metadata, storageVersion: version11 }
20088
20093
  }
20089
20094
  },
20090
20095
  {
@@ -20254,7 +20259,7 @@ var migrationV37 = createMigration({
20254
20259
  ]
20255
20260
  },
20256
20261
  migrate: (prev) => {
20257
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
20262
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
20258
20263
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
20259
20264
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
20260
20265
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -20269,12 +20274,12 @@ var migrationV37 = createMigration({
20269
20274
  files: [
20270
20275
  {
20271
20276
  name: "agent.json",
20272
- content: agentFile.content.type === "lowCode" ? {
20273
- ...agentFile.content,
20274
- metadata: { ...agentFile.content.metadata, storageVersion: version12 }
20277
+ content: agentFile2.content.type === "lowCode" ? {
20278
+ ...agentFile2.content,
20279
+ metadata: { ...agentFile2.content.metadata, storageVersion: version12 }
20275
20280
  } : {
20276
- ...agentFile.content,
20277
- metadata: { ...agentFile.content.metadata, storageVersion: version12 }
20281
+ ...agentFile2.content,
20282
+ metadata: { ...agentFile2.content.metadata, storageVersion: version12 }
20278
20283
  }
20279
20284
  },
20280
20285
  {
@@ -20347,20 +20352,20 @@ var migrationV38 = createMigration({
20347
20352
  ]
20348
20353
  },
20349
20354
  migrate: (prev) => {
20350
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
20355
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
20351
20356
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
20352
20357
  return {
20353
20358
  folders: prev.folders,
20354
20359
  files: [
20355
20360
  {
20356
20361
  name: "agent.json",
20357
- content: agentFile.content.type === "lowCode" ? {
20358
- ...agentFile.content,
20362
+ content: agentFile2.content.type === "lowCode" ? {
20363
+ ...agentFile2.content,
20359
20364
  version: "1.1.0",
20360
- metadata: { ...agentFile.content.metadata, storageVersion: version13 }
20365
+ metadata: { ...agentFile2.content.metadata, storageVersion: version13 }
20361
20366
  } : {
20362
- ...agentFile.content,
20363
- metadata: { ...agentFile.content.metadata, storageVersion: version13 }
20367
+ ...agentFile2.content,
20368
+ metadata: { ...agentFile2.content.metadata, storageVersion: version13 }
20364
20369
  }
20365
20370
  },
20366
20371
  {
@@ -20552,7 +20557,7 @@ var migrationV39 = createMigration({
20552
20557
  ]
20553
20558
  },
20554
20559
  migrate: (prev) => {
20555
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
20560
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
20556
20561
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
20557
20562
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
20558
20563
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -20594,12 +20599,12 @@ var migrationV39 = createMigration({
20594
20599
  files: [
20595
20600
  {
20596
20601
  name: "agent.json",
20597
- content: agentFile.content.type === "lowCode" ? {
20598
- ...agentFile.content,
20599
- metadata: { ...agentFile.content.metadata, storageVersion: version14 }
20602
+ content: agentFile2.content.type === "lowCode" ? {
20603
+ ...agentFile2.content,
20604
+ metadata: { ...agentFile2.content.metadata, storageVersion: version14 }
20600
20605
  } : {
20601
- ...agentFile.content,
20602
- metadata: { ...agentFile.content.metadata, storageVersion: version14 }
20606
+ ...agentFile2.content,
20607
+ metadata: { ...agentFile2.content.metadata, storageVersion: version14 }
20603
20608
  }
20604
20609
  },
20605
20610
  {
@@ -20629,6 +20634,10 @@ var httpRequestPropertiesSchema = exports_external.object({
20629
20634
  toolType: exports_external.literal("http-request"),
20630
20635
  ...builtInToolBasePropertiesSchema.shape
20631
20636
  });
20637
+ var createFilePropertiesSchema = exports_external.object({
20638
+ toolType: exports_external.literal("create-file"),
20639
+ ...builtInToolBasePropertiesSchema.shape
20640
+ });
20632
20641
  var queryConfigSchema = exports_external.object({
20633
20642
  value: exports_external.string().optional(),
20634
20643
  description: exports_external.string().optional(),
@@ -20681,7 +20690,8 @@ var builtInToolPropertiesSchemaV40 = exports_external.discriminatedUnion("toolTy
20681
20690
  loadAttachmentsPropertiesSchema,
20682
20691
  deepRagPropertiesSchema,
20683
20692
  batchTransformPropertiesSchema,
20684
- httpRequestPropertiesSchema
20693
+ httpRequestPropertiesSchema,
20694
+ createFilePropertiesSchema
20685
20695
  ]);
20686
20696
  var builtInToolResourceStorageSchemaV40 = _v39BuiltInToolSchema.omit({ outputSchema: true }).extend({
20687
20697
  outputSchema: extendedOutputSchemaSchema,
@@ -20807,7 +20817,7 @@ var migrationV40 = createMigration({
20807
20817
  ]
20808
20818
  },
20809
20819
  migrate: (prev) => {
20810
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
20820
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
20811
20821
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
20812
20822
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
20813
20823
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -20855,12 +20865,12 @@ var migrationV40 = createMigration({
20855
20865
  files: [
20856
20866
  {
20857
20867
  name: "agent.json",
20858
- content: agentFile.content.type === "lowCode" ? {
20859
- ...agentFile.content,
20860
- metadata: { ...agentFile.content.metadata, storageVersion: version15 }
20868
+ content: agentFile2.content.type === "lowCode" ? {
20869
+ ...agentFile2.content,
20870
+ metadata: { ...agentFile2.content.metadata, storageVersion: version15 }
20861
20871
  } : {
20862
- ...agentFile.content,
20863
- metadata: { ...agentFile.content.metadata, storageVersion: version15 }
20872
+ ...agentFile2.content,
20873
+ metadata: { ...agentFile2.content.metadata, storageVersion: version15 }
20864
20874
  }
20865
20875
  },
20866
20876
  {
@@ -20975,7 +20985,7 @@ var migrationV41 = createMigration({
20975
20985
  ]
20976
20986
  },
20977
20987
  migrate: (prev) => {
20978
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
20988
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
20979
20989
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
20980
20990
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
20981
20991
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -20993,12 +21003,12 @@ var migrationV41 = createMigration({
20993
21003
  files: [
20994
21004
  {
20995
21005
  name: "agent.json",
20996
- content: agentFile.content.type === "lowCode" ? {
20997
- ...agentFile.content,
20998
- metadata: { ...agentFile.content.metadata, storageVersion: version16 }
21006
+ content: agentFile2.content.type === "lowCode" ? {
21007
+ ...agentFile2.content,
21008
+ metadata: { ...agentFile2.content.metadata, storageVersion: version16 }
20999
21009
  } : {
21000
- ...agentFile.content,
21001
- metadata: { ...agentFile.content.metadata, storageVersion: version16 }
21010
+ ...agentFile2.content,
21011
+ metadata: { ...agentFile2.content.metadata, storageVersion: version16 }
21002
21012
  }
21003
21013
  },
21004
21014
  {
@@ -21134,7 +21144,7 @@ var migrationV42 = createMigration({
21134
21144
  ]
21135
21145
  },
21136
21146
  migrate: (prev) => {
21137
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21147
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21138
21148
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21139
21149
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21140
21150
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -21169,16 +21179,16 @@ var migrationV42 = createMigration({
21169
21179
  featuresFolder,
21170
21180
  migratedResourcesFolder
21171
21181
  ];
21172
- if (agentFile.content.type === "lowCode") {
21173
- const migratedGuardrails = agentFile.content.guardrails ? migrateGuardrails(agentFile.content.guardrails) : undefined;
21182
+ if (agentFile2.content.type === "lowCode") {
21183
+ const migratedGuardrails = agentFile2.content.guardrails ? migrateGuardrails(agentFile2.content.guardrails) : undefined;
21174
21184
  return {
21175
21185
  folders: rootFolders,
21176
21186
  files: [
21177
21187
  {
21178
21188
  name: "agent.json",
21179
21189
  content: {
21180
- ...agentFile.content,
21181
- metadata: { ...agentFile.content.metadata, storageVersion: version17 },
21190
+ ...agentFile2.content,
21191
+ metadata: { ...agentFile2.content.metadata, storageVersion: version17 },
21182
21192
  guardrails: migratedGuardrails
21183
21193
  }
21184
21194
  },
@@ -21192,8 +21202,8 @@ var migrationV42 = createMigration({
21192
21202
  {
21193
21203
  name: "agent.json",
21194
21204
  content: {
21195
- ...agentFile.content,
21196
- metadata: { ...agentFile.content.metadata, storageVersion: version17 }
21205
+ ...agentFile2.content,
21206
+ metadata: { ...agentFile2.content.metadata, storageVersion: version17 }
21197
21207
  }
21198
21208
  },
21199
21209
  { name: "flow-layout.json", content: flowLayoutFile.content }
@@ -21274,7 +21284,7 @@ var migrationV43 = createMigration({
21274
21284
  ]
21275
21285
  },
21276
21286
  migrate: (prev) => {
21277
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21287
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21278
21288
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21279
21289
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21280
21290
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -21289,19 +21299,19 @@ var migrationV43 = createMigration({
21289
21299
  files: [
21290
21300
  {
21291
21301
  name: "agent.json",
21292
- content: agentFile.content.type === "lowCode" ? {
21293
- ...agentFile.content,
21302
+ content: agentFile2.content.type === "lowCode" ? {
21303
+ ...agentFile2.content,
21294
21304
  metadata: {
21295
- ...agentFile.content.metadata,
21305
+ ...agentFile2.content.metadata,
21296
21306
  storageVersion: version18,
21297
- showProjectCreationExperience: agentFile.content.metadata.showProjectCreationExperience ?? false
21307
+ showProjectCreationExperience: agentFile2.content.metadata.showProjectCreationExperience ?? false
21298
21308
  }
21299
21309
  } : {
21300
- ...agentFile.content,
21310
+ ...agentFile2.content,
21301
21311
  metadata: {
21302
- ...agentFile.content.metadata,
21312
+ ...agentFile2.content.metadata,
21303
21313
  storageVersion: version18,
21304
- showProjectCreationExperience: agentFile.content.metadata.showProjectCreationExperience ?? false
21314
+ showProjectCreationExperience: agentFile2.content.metadata.showProjectCreationExperience ?? false
21305
21315
  }
21306
21316
  }
21307
21317
  },
@@ -21412,7 +21422,7 @@ var migrationV44 = createMigration({
21412
21422
  ]
21413
21423
  },
21414
21424
  migrate: (prev) => {
21415
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21425
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21416
21426
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21417
21427
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21418
21428
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -21460,12 +21470,12 @@ var migrationV44 = createMigration({
21460
21470
  files: [
21461
21471
  {
21462
21472
  name: "agent.json",
21463
- content: agentFile.content.type === "lowCode" ? {
21464
- ...agentFile.content,
21465
- metadata: { ...agentFile.content.metadata, storageVersion: version19 }
21473
+ content: agentFile2.content.type === "lowCode" ? {
21474
+ ...agentFile2.content,
21475
+ metadata: { ...agentFile2.content.metadata, storageVersion: version19 }
21466
21476
  } : {
21467
- ...agentFile.content,
21468
- metadata: { ...agentFile.content.metadata, storageVersion: version19 }
21477
+ ...agentFile2.content,
21478
+ metadata: { ...agentFile2.content.metadata, storageVersion: version19 }
21469
21479
  }
21470
21480
  },
21471
21481
  {
@@ -21507,6 +21517,7 @@ var v45 = {
21507
21517
  agent: agentStorageSchemaV45,
21508
21518
  lowCodeAgent: lowCodeAgentSchemaV45,
21509
21519
  codedAgent: codedAgentSchemaV45,
21520
+ appearance: appearanceSchema2,
21510
21521
  context: v44.context,
21511
21522
  escalationChannelActionCenter: v44.escalationChannelActionCenter,
21512
21523
  escalation: v44.escalation,
@@ -21551,7 +21562,7 @@ var migrationV45 = createMigration({
21551
21562
  ]
21552
21563
  },
21553
21564
  migrate: (prev) => {
21554
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21565
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21555
21566
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21556
21567
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21557
21568
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -21566,16 +21577,16 @@ var migrationV45 = createMigration({
21566
21577
  files: [
21567
21578
  {
21568
21579
  name: "agent.json",
21569
- content: agentFile.content.type === "lowCode" ? {
21570
- ...agentFile.content,
21580
+ content: agentFile2.content.type === "lowCode" ? {
21581
+ ...agentFile2.content,
21571
21582
  metadata: {
21572
- ...agentFile.content.metadata,
21583
+ ...agentFile2.content.metadata,
21573
21584
  storageVersion: version20
21574
21585
  }
21575
21586
  } : {
21576
- ...agentFile.content,
21587
+ ...agentFile2.content,
21577
21588
  metadata: {
21578
- ...agentFile.content.metadata,
21589
+ ...agentFile2.content.metadata,
21579
21590
  storageVersion: version20
21580
21591
  }
21581
21592
  }
@@ -21619,6 +21630,7 @@ var v46 = {
21619
21630
  agent: agentStorageSchemaV46,
21620
21631
  lowCodeAgent: lowCodeAgentSchemaV46,
21621
21632
  codedAgent: codedAgentSchemaV46,
21633
+ appearance: v45.appearance,
21622
21634
  context: v45.context,
21623
21635
  escalationChannelActionCenter: v45.escalationChannelActionCenter,
21624
21636
  escalation: v45.escalation,
@@ -21662,7 +21674,7 @@ var migrationV46 = createMigration({
21662
21674
  ]
21663
21675
  },
21664
21676
  migrate: (prev) => {
21665
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21677
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21666
21678
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21667
21679
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21668
21680
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -21677,16 +21689,16 @@ var migrationV46 = createMigration({
21677
21689
  files: [
21678
21690
  {
21679
21691
  name: "agent.json",
21680
- content: agentFile.content.type === "lowCode" ? {
21681
- ...agentFile.content,
21692
+ content: agentFile2.content.type === "lowCode" ? {
21693
+ ...agentFile2.content,
21682
21694
  metadata: {
21683
- ...agentFile.content.metadata,
21695
+ ...agentFile2.content.metadata,
21684
21696
  storageVersion: version21
21685
21697
  }
21686
21698
  } : {
21687
- ...agentFile.content,
21699
+ ...agentFile2.content,
21688
21700
  metadata: {
21689
- ...agentFile.content.metadata,
21701
+ ...agentFile2.content.metadata,
21690
21702
  storageVersion: version21
21691
21703
  }
21692
21704
  }
@@ -21755,6 +21767,7 @@ var v47 = {
21755
21767
  agent: agentStorageSchemaV47,
21756
21768
  lowCodeAgent: lowCodeAgentSchemaV47,
21757
21769
  codedAgent: codedAgentSchemaV47,
21770
+ appearance: v46.appearance,
21758
21771
  context: v46.context,
21759
21772
  escalationChannelActionCenter: v46.escalationChannelActionCenter,
21760
21773
  escalation: v46.escalation,
@@ -21765,8 +21778,7 @@ var v47 = {
21765
21778
  featuresFolder: v46.featuresFolder,
21766
21779
  flowLayout: v46.flowLayout,
21767
21780
  mcp: v46.mcp,
21768
- tool: toolStorageSchemaV47,
21769
- processOrchestrationTool: processOrchestrationToolStorageSchemaV47
21781
+ tool: toolStorageSchemaV47
21770
21782
  };
21771
21783
  var migrationV47 = createMigration({
21772
21784
  from: v46.storage,
@@ -21799,7 +21811,7 @@ var migrationV47 = createMigration({
21799
21811
  ]
21800
21812
  },
21801
21813
  migrate: (prev) => {
21802
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21814
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21803
21815
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21804
21816
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21805
21817
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -21814,16 +21826,16 @@ var migrationV47 = createMigration({
21814
21826
  files: [
21815
21827
  {
21816
21828
  name: "agent.json",
21817
- content: agentFile.content.type === "lowCode" ? {
21818
- ...agentFile.content,
21829
+ content: agentFile2.content.type === "lowCode" ? {
21830
+ ...agentFile2.content,
21819
21831
  metadata: {
21820
- ...agentFile.content.metadata,
21832
+ ...agentFile2.content.metadata,
21821
21833
  storageVersion: version222
21822
21834
  }
21823
21835
  } : {
21824
- ...agentFile.content,
21836
+ ...agentFile2.content,
21825
21837
  metadata: {
21826
- ...agentFile.content.metadata,
21838
+ ...agentFile2.content.metadata,
21827
21839
  storageVersion: version222
21828
21840
  }
21829
21841
  }
@@ -21937,6 +21949,7 @@ var v48 = {
21937
21949
  agent: agentStorageSchemaV48,
21938
21950
  lowCodeAgent: lowCodeAgentSchemaV48,
21939
21951
  codedAgent: codedAgentSchemaV48,
21952
+ appearance: v47.appearance,
21940
21953
  context: contextStorageSchemaV48,
21941
21954
  escalationChannelActionCenter: v47.escalationChannelActionCenter,
21942
21955
  escalation: v47.escalation,
@@ -21949,8 +21962,7 @@ var v48 = {
21949
21962
  flowLayout: v47.flowLayout,
21950
21963
  mcp: v47.mcp,
21951
21964
  a2a: a2aStorageSchemaV48,
21952
- tool: v47.tool,
21953
- processOrchestrationTool: v47.processOrchestrationTool
21965
+ tool: v47.tool
21954
21966
  };
21955
21967
  var migrationV48 = createMigration({
21956
21968
  from: v47.storage,
@@ -21984,7 +21996,7 @@ var migrationV48 = createMigration({
21984
21996
  ]
21985
21997
  },
21986
21998
  migrate: (prev) => {
21987
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
21999
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
21988
22000
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
21989
22001
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
21990
22002
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -22013,16 +22025,16 @@ var migrationV48 = createMigration({
22013
22025
  files: [
22014
22026
  {
22015
22027
  name: "agent.json",
22016
- content: agentFile.content.type === "lowCode" ? {
22017
- ...agentFile.content,
22028
+ content: agentFile2.content.type === "lowCode" ? {
22029
+ ...agentFile2.content,
22018
22030
  metadata: {
22019
- ...agentFile.content.metadata,
22031
+ ...agentFile2.content.metadata,
22020
22032
  storageVersion: version23
22021
22033
  }
22022
22034
  } : {
22023
- ...agentFile.content,
22035
+ ...agentFile2.content,
22024
22036
  metadata: {
22025
- ...agentFile.content.metadata,
22037
+ ...agentFile2.content.metadata,
22026
22038
  storageVersion: version23
22027
22039
  }
22028
22040
  }
@@ -22062,6 +22074,7 @@ var v49 = {
22062
22074
  agent: agentStorageSchemaV49,
22063
22075
  lowCodeAgent: lowCodeAgentSchemaV49,
22064
22076
  codedAgent: codedAgentSchemaV49,
22077
+ appearance: v48.appearance,
22065
22078
  context: v48.context,
22066
22079
  escalationChannelActionCenter: v48.escalationChannelActionCenter,
22067
22080
  escalation: v48.escalation,
@@ -22073,8 +22086,7 @@ var v49 = {
22073
22086
  flowLayout: v48.flowLayout,
22074
22087
  mcp: v48.mcp,
22075
22088
  a2a: v48.a2a,
22076
- tool: v48.tool,
22077
- processOrchestrationTool: v48.processOrchestrationTool
22089
+ tool: v48.tool
22078
22090
  };
22079
22091
  var migrationV49 = createMigration({
22080
22092
  from: v48.storage,
@@ -22108,7 +22120,7 @@ var migrationV49 = createMigration({
22108
22120
  ]
22109
22121
  },
22110
22122
  migrate: (prev) => {
22111
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
22123
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
22112
22124
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
22113
22125
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
22114
22126
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -22119,17 +22131,17 @@ var migrationV49 = createMigration({
22119
22131
  files: [
22120
22132
  {
22121
22133
  name: "agent.json",
22122
- content: agentFile.content.type === "lowCode" ? {
22123
- ...agentFile.content,
22134
+ content: agentFile2.content.type === "lowCode" ? {
22135
+ ...agentFile2.content,
22124
22136
  metadata: {
22125
- ...agentFile.content.metadata,
22137
+ ...agentFile2.content.metadata,
22126
22138
  storageVersion: version24,
22127
22139
  showProjectCreationExperience: false
22128
22140
  }
22129
22141
  } : {
22130
- ...agentFile.content,
22142
+ ...agentFile2.content,
22131
22143
  metadata: {
22132
- ...agentFile.content.metadata,
22144
+ ...agentFile2.content.metadata,
22133
22145
  storageVersion: version24,
22134
22146
  showProjectCreationExperience: false
22135
22147
  }
@@ -22251,11 +22263,25 @@ var escalationStorageSchemaV50 = v49.escalation.extend({
22251
22263
  });
22252
22264
  var baseLowCodeSettingsSchema = v49.lowCodeAgent.shape.settings;
22253
22265
  var _v49ProcessToolSchema = v49.tool.options[1];
22254
- var flowToolStorageSchemaV50 = v49.processOrchestrationTool.extend({
22266
+ var withEntryPointPath = { entryPointPath: exports_external.string().optional() };
22267
+ var processToolStorageSchemaV50 = _v49ProcessToolSchema.extend({
22268
+ properties: _v49ProcessToolSchema.shape.properties.extend(withEntryPointPath)
22269
+ });
22270
+ var agentToolStorageSchemaV50 = v49.tool.options[2].extend({
22271
+ properties: v49.tool.options[2].shape.properties.extend(withEntryPointPath)
22272
+ });
22273
+ var apiToolStorageSchemaV50 = v49.tool.options[3].extend({
22274
+ properties: v49.tool.options[3].shape.properties.extend(withEntryPointPath)
22275
+ });
22276
+ var processOrchestrationToolStorageSchemaV50 = v49.tool.options[4].extend({
22277
+ properties: v49.tool.options[4].shape.properties.extend(withEntryPointPath)
22278
+ });
22279
+ var flowToolStorageSchemaV50 = processOrchestrationToolStorageSchemaV50.extend({
22255
22280
  type: exports_external.literal("flow")
22256
22281
  });
22257
22282
  var functionToolStorageSchemaV50 = _v49ProcessToolSchema.extend({
22258
- type: exports_external.literal("function")
22283
+ type: exports_external.literal("function"),
22284
+ properties: _v49ProcessToolSchema.shape.properties.extend(withEntryPointPath)
22259
22285
  });
22260
22286
  var TURN_DETECTION_MAX_MS = 5000;
22261
22287
  var turnDetectionSchemaV50 = exports_external.object({
@@ -22273,8 +22299,11 @@ var voiceSettingsExtension = {
22273
22299
  agentSpeaksFirst: exports_external.boolean().optional()
22274
22300
  }).optional()
22275
22301
  };
22276
- var standardLowCodeAgentSettingsV50 = baseLowCodeSettingsSchema.extend({ mode: exports_external.literal("standard") }).extend(voiceSettingsExtension);
22277
- var advancedLowCodeAgentSettingsV50 = baseLowCodeSettingsSchema.extend({ mode: exports_external.literal("advanced") }).extend(voiceSettingsExtension);
22302
+ var modelSettingsExtension = {
22303
+ modelSettings: exports_external.record(exports_external.string(), exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean()])).optional()
22304
+ };
22305
+ var standardLowCodeAgentSettingsV50 = baseLowCodeSettingsSchema.extend({ mode: exports_external.literal("standard") }).extend(voiceSettingsExtension).extend(modelSettingsExtension);
22306
+ var advancedLowCodeAgentSettingsV50 = baseLowCodeSettingsSchema.extend({ mode: exports_external.literal("advanced") }).extend(voiceSettingsExtension).extend(modelSettingsExtension);
22278
22307
  var lowCodeAgentSettingsV50 = exports_external.discriminatedUnion("mode", [
22279
22308
  standardLowCodeAgentSettingsV50,
22280
22309
  advancedLowCodeAgentSettingsV50
@@ -22287,12 +22316,16 @@ var agent365ValuesSchemaV50 = exports_external.object({
22287
22316
  [Agent365Attributes.AgentUserId]: exports_external.string(),
22288
22317
  [Agent365Attributes.AgentUserEmail]: exports_external.email()
22289
22318
  }).partial();
22319
+ var appearanceSchemaV50 = v49.appearance.extend({
22320
+ personalWorkspaceConnectionsOnly: exports_external.boolean().optional()
22321
+ });
22290
22322
  var lowCodeAgentSchemaV50 = v49.lowCodeAgent.extend({
22291
22323
  metadata: v49.lowCodeAgent.shape.metadata.extend({
22292
22324
  storageVersion: exports_external.literal(version25),
22293
22325
  variant: exports_external.enum(["caseManager"]).optional()
22294
22326
  }),
22295
22327
  settings: lowCodeAgentSettingsV50,
22328
+ appearance: appearanceSchemaV50.optional(),
22296
22329
  id: exports_external.string().optional(),
22297
22330
  name: exports_external.string().optional()
22298
22331
  }).extend(agent365ValuesSchemaV50.shape);
@@ -22324,7 +22357,13 @@ var clientSideToolStorageSchemaV50 = exports_external.object({
22324
22357
  guardrail: _v49ProcessToolSchema.shape.guardrail
22325
22358
  });
22326
22359
  var toolStorageSchemaV50 = exports_external.discriminatedUnion("type", [
22327
- ...v49.tool.options,
22360
+ v49.tool.options[0],
22361
+ processToolStorageSchemaV50,
22362
+ agentToolStorageSchemaV50,
22363
+ apiToolStorageSchemaV50,
22364
+ processOrchestrationToolStorageSchemaV50,
22365
+ v49.tool.options[5],
22366
+ v49.tool.options[6],
22328
22367
  clientSideToolStorageSchemaV50,
22329
22368
  flowToolStorageSchemaV50,
22330
22369
  functionToolStorageSchemaV50
@@ -22333,15 +22372,38 @@ var discoveryModeSchemaV50 = exports_external.discriminatedUnion("type", [
22333
22372
  exports_external.object({ type: exports_external.literal("cached"), refreshSchemaBeforeCall: exports_external.boolean().default(true) }),
22334
22373
  exports_external.object({ type: exports_external.literal("dynamic"), allowAll: exports_external.boolean() })
22335
22374
  ]);
22375
+ var agentHubSolutionPropertiesSchemaV50 = exports_external.object({
22376
+ resourceKey: exports_external.string(),
22377
+ resourceName: exports_external.string().min(1).optional()
22378
+ });
22336
22379
  var mcpToolStorageSchemaV50 = v49.mcp.omit({ dynamicTools: true }).extend({
22337
- toolsConfiguration: exports_external.object({ discoveryMode: discoveryModeSchemaV50 }).default({ discoveryMode: { type: "cached", refreshSchemaBeforeCall: true } })
22380
+ toolsConfiguration: exports_external.object({ discoveryMode: discoveryModeSchemaV50 }).default({ discoveryMode: { type: "cached", refreshSchemaBeforeCall: true } }),
22381
+ solutionProperties: agentHubSolutionPropertiesSchemaV50
22382
+ });
22383
+ var remoteA2aStorageSchemaV50 = v49.a2a.extend({
22384
+ solutionProperties: agentHubSolutionPropertiesSchemaV50
22338
22385
  });
22339
22386
  var dataFabricOntologyContextSchemaV50 = v49.context.options[1].omit({ contextType: true, entitySet: true }).extend({
22340
22387
  contextType: exports_external.literal("datafabricontology"),
22341
22388
  ontologySet: exports_external.array(exports_external.looseObject({}))
22342
22389
  });
22390
+ var v49ContextSettings = v49.context.options[0].shape.settings;
22391
+ var v49ContextSettingsUnion = v49ContextSettings.unwrap();
22392
+ var semanticContextSettingsSchemaV50 = v49ContextSettingsUnion.options[0].extend({
22393
+ searchDuringIngestion: exports_external.boolean().optional()
22394
+ });
22395
+ var contextSettingsSchemaV50 = exports_external.discriminatedUnion("retrievalMode", [
22396
+ semanticContextSettingsSchemaV50,
22397
+ v49ContextSettingsUnion.options[1],
22398
+ v49ContextSettingsUnion.options[2],
22399
+ v49ContextSettingsUnion.options[3],
22400
+ v49ContextSettingsUnion.options[4]
22401
+ ]).default(v49ContextSettings.def.defaultValue);
22402
+ var indexOrAttachmentsContextSchemaV50 = v49.context.options[0].extend({
22403
+ settings: contextSettingsSchemaV50
22404
+ });
22343
22405
  var contextStorageSchemaV50 = exports_external.discriminatedUnion("contextType", [
22344
- v49.context.options[0],
22406
+ indexOrAttachmentsContextSchemaV50,
22345
22407
  v49.context.options[1],
22346
22408
  dataFabricOntologyContextSchemaV50
22347
22409
  ]);
@@ -22350,7 +22412,7 @@ var resourceStorageSchemaV50 = exports_external.union([
22350
22412
  contextStorageSchemaV50,
22351
22413
  escalationStorageSchemaV50,
22352
22414
  mcpToolStorageSchemaV50,
22353
- v49.a2a
22415
+ remoteA2aStorageSchemaV50
22354
22416
  ]);
22355
22417
  var resourcesFolderSchemaV50 = exports_external.object({
22356
22418
  name: exports_external.literal("resources"),
@@ -22421,7 +22483,7 @@ var migrationV50 = createMigration({
22421
22483
  ]
22422
22484
  },
22423
22485
  migrate: (prev) => {
22424
- const agentFile = prev.files.find((file2) => file2.name === "agent.json");
22486
+ const agentFile2 = prev.files.find((file2) => file2.name === "agent.json");
22425
22487
  const flowLayoutFile = prev.files.find((file2) => file2.name === "flow-layout.json");
22426
22488
  const evalsFolder8 = prev.folders.find((folder) => folder.name === "evals");
22427
22489
  const featuresFolder = prev.folders.find((folder) => folder.name === "features");
@@ -22432,20 +22494,20 @@ var migrationV50 = createMigration({
22432
22494
  files: [
22433
22495
  {
22434
22496
  name: "agent.json",
22435
- content: agentFile.content.type === "lowCode" ? {
22436
- ...agentFile.content,
22497
+ content: agentFile2.content.type === "lowCode" ? {
22498
+ ...agentFile2.content,
22437
22499
  metadata: {
22438
- ...agentFile.content.metadata,
22500
+ ...agentFile2.content.metadata,
22439
22501
  storageVersion: version25
22440
22502
  },
22441
22503
  settings: {
22442
22504
  mode: "standard",
22443
- ...agentFile.content.settings
22505
+ ...agentFile2.content.settings
22444
22506
  }
22445
22507
  } : {
22446
- ...agentFile.content,
22508
+ ...agentFile2.content,
22447
22509
  metadata: {
22448
- ...agentFile.content.metadata,
22510
+ ...agentFile2.content.metadata,
22449
22511
  storageVersion: version25
22450
22512
  }
22451
22513
  }
@@ -22555,7 +22617,140 @@ var getLatestVersion = (migrations2) => {
22555
22617
  throw new Error("No migrations available");
22556
22618
  return migrations2[migrations2.length - 1].to.version;
22557
22619
  };
22620
+ var defOf = (schema) => schema._zod?.def ?? schema.def;
22621
+ var fieldsOf = (schema) => {
22622
+ const def = schema && defOf(schema);
22623
+ return def?.type === "object" ? def.shape ?? {} : {};
22624
+ };
22625
+ var tupleMembers = (schema) => {
22626
+ const def = schema && defOf(schema);
22627
+ return def?.type === "tuple" ? def.items ?? [] : [];
22628
+ };
22629
+ var arrayMember = (schema) => {
22630
+ const def = schema && defOf(schema);
22631
+ return def?.type === "array" ? def.element : undefined;
22632
+ };
22633
+ var literalValue = (schema) => {
22634
+ const def = schema && defOf(schema);
22635
+ return def?.type === "literal" ? String(def.values?.[0]) : undefined;
22636
+ };
22637
+ var deserializedSchema = (schema) => {
22638
+ const def = schema && defOf(schema);
22639
+ return def?.type === "pipe" ? def.out : undefined;
22640
+ };
22641
+ var POLICY = {
22642
+ "agent.json": {
22643
+ kind: "agent",
22644
+ onInvalid: "fatal",
22645
+ repairableFields: ["messages", "settings", "inputSchema", "outputSchema", "metadata"]
22646
+ },
22647
+ "eval-sets": { kind: "evalSet", onInvalid: "skip" },
22648
+ "flow-layout.json": { kind: "flowLayout", onInvalid: "reset" },
22649
+ evaluators: { kind: "evaluator", onInvalid: "skip" },
22650
+ features: { kind: "feature", onInvalid: "skip" },
22651
+ resources: { kind: "resource", onInvalid: "skip" }
22652
+ };
22653
+ var fileSystemFields = () => fieldsOf(currentStorageSchema.fileSystem);
22654
+ var defaultRootFileContent = (file2) => currentStorageSchemaMigration.defaultStorageContents.files.find((candidate) => candidate.name === file2)?.content;
22655
+ var rootFileEntities = () => tupleMembers(fileSystemFields().files).flatMap((fileSchema) => {
22656
+ const file2 = literalValue(fieldsOf(fileSchema).name);
22657
+ const policy = file2 ? POLICY[file2] : undefined;
22658
+ const schema = deserializedSchema(fieldsOf(fileSchema).content);
22659
+ if (!file2 || !policy || !schema)
22660
+ return [];
22661
+ const carriesDefault = policy.onInvalid === "reset" || policy.onInvalid === "fatal";
22662
+ const defaultContent = carriesDefault ? defaultRootFileContent(file2) : undefined;
22663
+ return [{ ...policy, location: { at: "rootFile", file: file2 }, schema, defaultContent }];
22664
+ });
22665
+ var namedSubfolderEntity = (folder, folderSchema) => {
22666
+ const policy = POLICY[folder];
22667
+ const subfolder = arrayMember(fieldsOf(folderSchema).folders);
22668
+ const definitionFileSchema = tupleMembers(fieldsOf(subfolder).files)[0];
22669
+ const definitionFile = literalValue(fieldsOf(definitionFileSchema).name);
22670
+ const schema = deserializedSchema(fieldsOf(definitionFileSchema).content);
22671
+ if (!policy || !definitionFile || !schema)
22672
+ return [];
22673
+ return [{ ...policy, location: { at: "namedSubfolders", definitionFile, folder }, schema }];
22674
+ };
22675
+ var folderFilesEntities = (folder, folderSchema) => tupleMembers(fieldsOf(folderSchema).folders).flatMap((subfolderSchema) => {
22676
+ const subfolder = literalValue(fieldsOf(subfolderSchema).name);
22677
+ const policy = subfolder ? POLICY[subfolder] : undefined;
22678
+ const schema = deserializedSchema(fieldsOf(arrayMember(fieldsOf(subfolderSchema).files)).content);
22679
+ if (!subfolder || !policy || !schema)
22680
+ return [];
22681
+ return [{ ...policy, location: { at: "folderFiles", folder, subfolder }, schema }];
22682
+ });
22683
+ var folderEntities = () => tupleMembers(fileSystemFields().folders).flatMap((folderSchema) => {
22684
+ const folder = literalValue(fieldsOf(folderSchema).name);
22685
+ if (!folder)
22686
+ return [];
22687
+ return [...namedSubfolderEntity(folder, folderSchema), ...folderFilesEntities(folder, folderSchema)];
22688
+ });
22689
+ var entities = [...rootFileEntities(), ...folderEntities()];
22690
+ var agentEntity = entities.find((entity) => entity.kind === "agent");
22691
+ var agentFile = agentEntity?.location.at === "rootFile" ? agentEntity.location.file : undefined;
22692
+ var defaults = currentStorageSchemaMigration.defaultStorageContents;
22693
+ var serializedDefaults = toSerializedRoot(structuredClone(currentStorageSchemaMigration.defaultStorageContents));
22694
+ var namesOf = (nodes) => (nodes ?? []).flatMap((node) => node.name === undefined ? [] : [node.name]);
22695
+ var rootFileOrder = namesOf(defaults.files);
22696
+ var rootFolderOrder = namesOf(defaults.folders);
22697
+ var namedIn = (entries, name) => entries.filter((entry) => entry.name === name);
22698
+ var orderedBy = (names, entries) => names.flatMap((name) => namedIn(entries, name));
22699
+ var flatFolderOf = (subFolderNames) => (parent) => ({
22700
+ ...parent,
22701
+ files: [],
22702
+ folders: orderedBy(subFolderNames, parent.folders).map((child) => ({
22703
+ ...child,
22704
+ folders: [],
22705
+ files: child.files.filter((file2) => file2.name.endsWith(".json"))
22706
+ }))
22707
+ });
22708
+ var definitionFolderOf = (definitionFile) => (parent) => ({
22709
+ ...parent,
22710
+ files: [],
22711
+ folders: parent.folders.filter((child) => child.files.some((file2) => file2.name === definitionFile)).map((child) => ({ ...child, files: child.files.filter((file2) => file2.name === definitionFile) }))
22712
+ });
22713
+ var buildFolderSanitizers = () => {
22714
+ const sanitizers = {};
22715
+ const flatSubfolders = /* @__PURE__ */ new Map;
22716
+ for (const entity of entities) {
22717
+ if (entity.location.at === "namedSubfolders") {
22718
+ sanitizers[entity.location.folder] = definitionFolderOf(entity.location.definitionFile);
22719
+ }
22720
+ if (entity.location.at === "folderFiles") {
22721
+ const { folder, subfolder } = entity.location;
22722
+ flatSubfolders.set(folder, [...flatSubfolders.get(folder) ?? [], subfolder]);
22723
+ }
22724
+ }
22725
+ for (const [folder, subfolders] of flatSubfolders)
22726
+ sanitizers[folder] = flatFolderOf(subfolders);
22727
+ return sanitizers;
22728
+ };
22729
+ var folderSanitizers = buildFolderSanitizers();
22730
+ var REVIEW_GRADES = [
22731
+ "A+",
22732
+ "A",
22733
+ "A-",
22734
+ "B+",
22735
+ "B",
22736
+ "B-",
22737
+ "C+",
22738
+ "C",
22739
+ "C-",
22740
+ "D+",
22741
+ "D",
22742
+ "D-",
22743
+ "F"
22744
+ ];
22745
+ var reviewGradeSchema = exports_external.enum(REVIEW_GRADES);
22746
+ var reviewHistoryEntrySchema = exports_external.object({
22747
+ grade: reviewGradeSchema,
22748
+ runAt: exports_external.string(),
22749
+ errors: exports_external.number().int().min(0).optional(),
22750
+ warnings: exports_external.number().int().min(0).optional()
22751
+ });
22752
+ var reviewHistorySchema = exports_external.array(reviewHistoryEntrySchema);
22558
22753
 
22559
22754
  export { migrations, currentStorageSchema, currentAgentStorageSchema, currentResourceStorageSchema, currentFeatureStorageSchema, currentEvaluationSetStorageSchema, currentFlowLayoutStorageSchema, applyMigrations, getLatestVersion, generateBindings };
22560
22755
 
22561
- //# debugId=BF96E61F43FFB07064756E2164756E21
22756
+ //# debugId=BBA4435EB228DC9864756E2164756E21