@salesforce/plugin-agent 1.7.2 → 1.7.3-dev.1
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.
- package/README.md +49 -49
- package/lib/commands/agent/generate/spec.js +1 -2
- package/lib/commands/agent/generate/spec.js.map +1 -1
- package/lib/commands/agent/generate/{definition.d.ts → test-definition.d.ts} +1 -1
- package/lib/commands/agent/generate/{definition.js → test-definition.js} +25 -25
- package/lib/commands/agent/generate/test-definition.js.map +1 -0
- package/lib/commands/agent/generate/{testset.d.ts → test-set.d.ts} +1 -1
- package/lib/commands/agent/generate/test-set.js +161 -0
- package/lib/commands/agent/generate/test-set.js.map +1 -0
- package/lib/flags.js +1 -1
- package/lib/handleTestResults.js +24 -8
- package/lib/handleTestResults.js.map +1 -1
- package/lib/read-dir.d.ts +1 -0
- package/lib/read-dir.js +11 -0
- package/lib/read-dir.js.map +1 -0
- package/messages/{agent.generate.definition.md → agent.generate.test-definition.md} +1 -1
- package/messages/{agent.generate.testset.md → agent.generate.test-set.md} +1 -1
- package/npm-shrinkwrap.json +518 -209
- package/oclif.lock +139 -33
- package/oclif.manifest.json +59 -59
- package/package.json +5 -6
- package/lib/commands/agent/generate/definition.js.map +0 -1
- package/lib/commands/agent/generate/testset.js +0 -118
- package/lib/commands/agent/generate/testset.js.map +0 -1
package/oclif.lock
CHANGED
|
@@ -1053,6 +1053,17 @@
|
|
|
1053
1053
|
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917"
|
|
1054
1054
|
integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==
|
|
1055
1055
|
|
|
1056
|
+
"@inquirer/checkbox@^4.0.3":
|
|
1057
|
+
version "4.0.3"
|
|
1058
|
+
resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.0.3.tgz#cbd9694e925964f5b0432cc84ab107a8d7a8202d"
|
|
1059
|
+
integrity sha512-CEt9B4e8zFOGtc/LYeQx5m8nfqQeG/4oNNv0PUvXGG0mys+wR/WbJ3B4KfSQ4Fcr3AQfpiuFOi3fVvmPfvNbxw==
|
|
1060
|
+
dependencies:
|
|
1061
|
+
"@inquirer/core" "^10.1.1"
|
|
1062
|
+
"@inquirer/figures" "^1.0.8"
|
|
1063
|
+
"@inquirer/type" "^3.0.1"
|
|
1064
|
+
ansi-escapes "^4.3.2"
|
|
1065
|
+
yoctocolors-cjs "^2.1.2"
|
|
1066
|
+
|
|
1056
1067
|
"@inquirer/confirm@^3.1.22", "@inquirer/confirm@^3.2.0":
|
|
1057
1068
|
version "3.2.0"
|
|
1058
1069
|
resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-3.2.0.tgz#6af1284670ea7c7d95e3f1253684cfbd7228ad6a"
|
|
@@ -1069,21 +1080,6 @@
|
|
|
1069
1080
|
"@inquirer/core" "^10.1.1"
|
|
1070
1081
|
"@inquirer/type" "^3.0.1"
|
|
1071
1082
|
|
|
1072
|
-
"@inquirer/core@^10.0.1":
|
|
1073
|
-
version "10.0.1"
|
|
1074
|
-
resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.0.1.tgz#22068da87d8f6317452172dfd521e811ccbcb90e"
|
|
1075
|
-
integrity sha512-KKTgjViBQUi3AAssqjUFMnMO3CM3qwCHvePV9EW+zTKGKafFGFF01sc1yOIYjLJ7QU52G/FbzKc+c01WLzXmVQ==
|
|
1076
|
-
dependencies:
|
|
1077
|
-
"@inquirer/figures" "^1.0.7"
|
|
1078
|
-
"@inquirer/type" "^3.0.0"
|
|
1079
|
-
ansi-escapes "^4.3.2"
|
|
1080
|
-
cli-width "^4.1.0"
|
|
1081
|
-
mute-stream "^2.0.0"
|
|
1082
|
-
signal-exit "^4.1.0"
|
|
1083
|
-
strip-ansi "^6.0.1"
|
|
1084
|
-
wrap-ansi "^6.2.0"
|
|
1085
|
-
yoctocolors-cjs "^2.1.2"
|
|
1086
|
-
|
|
1087
1083
|
"@inquirer/core@^10.1.1":
|
|
1088
1084
|
version "10.1.1"
|
|
1089
1085
|
resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.1.tgz#801e82649fb64bcb2b5e4667397ff8c25bccebab"
|
|
@@ -1118,6 +1114,24 @@
|
|
|
1118
1114
|
wrap-ansi "^6.2.0"
|
|
1119
1115
|
yoctocolors-cjs "^2.1.2"
|
|
1120
1116
|
|
|
1117
|
+
"@inquirer/editor@^4.2.0":
|
|
1118
|
+
version "4.2.0"
|
|
1119
|
+
resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.2.0.tgz#469a00e876afebcfc574bf8114e40c40795688c1"
|
|
1120
|
+
integrity sha512-Z3LeGsD3WlItDqLxTPciZDbGtm0wrz7iJGS/uUxSiQxef33ZrBq7LhsXg30P7xrWz1kZX4iGzxxj5SKZmJ8W+w==
|
|
1121
|
+
dependencies:
|
|
1122
|
+
"@inquirer/core" "^10.1.1"
|
|
1123
|
+
"@inquirer/type" "^3.0.1"
|
|
1124
|
+
external-editor "^3.1.0"
|
|
1125
|
+
|
|
1126
|
+
"@inquirer/expand@^4.0.3":
|
|
1127
|
+
version "4.0.3"
|
|
1128
|
+
resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.3.tgz#7593b841d9355c4e7a047071b33e5a58f202ac96"
|
|
1129
|
+
integrity sha512-MDszqW4HYBpVMmAoy/FA9laLrgo899UAga0itEjsYrBthKieDZNc0e16gdn7N3cQ0DSf/6zsTBZMuDYDQU4ktg==
|
|
1130
|
+
dependencies:
|
|
1131
|
+
"@inquirer/core" "^10.1.1"
|
|
1132
|
+
"@inquirer/type" "^3.0.1"
|
|
1133
|
+
yoctocolors-cjs "^2.1.2"
|
|
1134
|
+
|
|
1121
1135
|
"@inquirer/figures@^1.0.5", "@inquirer/figures@^1.0.7":
|
|
1122
1136
|
version "1.0.7"
|
|
1123
1137
|
resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.7.tgz#d050ccc0eabfacc0248c4ff647a9dfba1b01594b"
|
|
@@ -1136,13 +1150,21 @@
|
|
|
1136
1150
|
"@inquirer/core" "^9.0.8"
|
|
1137
1151
|
"@inquirer/type" "^1.5.1"
|
|
1138
1152
|
|
|
1139
|
-
"@inquirer/input@^4.0
|
|
1140
|
-
version "4.0
|
|
1141
|
-
resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.0.
|
|
1142
|
-
integrity sha512-
|
|
1153
|
+
"@inquirer/input@^4.1.0":
|
|
1154
|
+
version "4.1.0"
|
|
1155
|
+
resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.1.0.tgz#54b484550c3ecb2e7bf62149a14e9784f08efe6b"
|
|
1156
|
+
integrity sha512-16B8A9hY741yGXzd8UJ9R8su/fuuyO2e+idd7oVLYjP23wKJ6ILRIIHcnXe8/6AoYgwRS2zp4PNsW/u/iZ24yg==
|
|
1143
1157
|
dependencies:
|
|
1144
|
-
"@inquirer/core" "^10.
|
|
1145
|
-
"@inquirer/type" "^3.0.
|
|
1158
|
+
"@inquirer/core" "^10.1.1"
|
|
1159
|
+
"@inquirer/type" "^3.0.1"
|
|
1160
|
+
|
|
1161
|
+
"@inquirer/number@^3.0.3":
|
|
1162
|
+
version "3.0.3"
|
|
1163
|
+
resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.3.tgz#e3dd7520e21e9708fea9465b73d20ac851f5f60d"
|
|
1164
|
+
integrity sha512-HA/W4YV+5deKCehIutfGBzNxWH1nhvUC67O4fC9ufSijn72yrYnRmzvC61dwFvlXIG1fQaYWi+cqNE9PaB9n6Q==
|
|
1165
|
+
dependencies:
|
|
1166
|
+
"@inquirer/core" "^10.1.1"
|
|
1167
|
+
"@inquirer/type" "^3.0.1"
|
|
1146
1168
|
|
|
1147
1169
|
"@inquirer/password@^2.2.0":
|
|
1148
1170
|
version "2.2.0"
|
|
@@ -1153,6 +1175,50 @@
|
|
|
1153
1175
|
"@inquirer/type" "^1.5.3"
|
|
1154
1176
|
ansi-escapes "^4.3.2"
|
|
1155
1177
|
|
|
1178
|
+
"@inquirer/password@^4.0.3":
|
|
1179
|
+
version "4.0.3"
|
|
1180
|
+
resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.3.tgz#17af6d8983e2e5c0f231b382ef5c78a8b4b63e95"
|
|
1181
|
+
integrity sha512-3qWjk6hS0iabG9xx0U1plwQLDBc/HA/hWzLFFatADpR6XfE62LqPr9GpFXBkLU0KQUaIXZ996bNG+2yUvocH8w==
|
|
1182
|
+
dependencies:
|
|
1183
|
+
"@inquirer/core" "^10.1.1"
|
|
1184
|
+
"@inquirer/type" "^3.0.1"
|
|
1185
|
+
ansi-escapes "^4.3.2"
|
|
1186
|
+
|
|
1187
|
+
"@inquirer/prompts@^7.2.0":
|
|
1188
|
+
version "7.2.0"
|
|
1189
|
+
resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.2.0.tgz#15010df2257a243866480513d36f3e19c98d7fb1"
|
|
1190
|
+
integrity sha512-ZXYZ5oGVrb+hCzcglPeVerJ5SFwennmDOPfXq1WyeZIrPGySLbl4W6GaSsBFvu3WII36AOK5yB8RMIEEkBjf8w==
|
|
1191
|
+
dependencies:
|
|
1192
|
+
"@inquirer/checkbox" "^4.0.3"
|
|
1193
|
+
"@inquirer/confirm" "^5.1.0"
|
|
1194
|
+
"@inquirer/editor" "^4.2.0"
|
|
1195
|
+
"@inquirer/expand" "^4.0.3"
|
|
1196
|
+
"@inquirer/input" "^4.1.0"
|
|
1197
|
+
"@inquirer/number" "^3.0.3"
|
|
1198
|
+
"@inquirer/password" "^4.0.3"
|
|
1199
|
+
"@inquirer/rawlist" "^4.0.3"
|
|
1200
|
+
"@inquirer/search" "^3.0.3"
|
|
1201
|
+
"@inquirer/select" "^4.0.3"
|
|
1202
|
+
|
|
1203
|
+
"@inquirer/rawlist@^4.0.3":
|
|
1204
|
+
version "4.0.3"
|
|
1205
|
+
resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.0.3.tgz#9964521d3470e153e7e11f228a53cf0afefb217c"
|
|
1206
|
+
integrity sha512-5MhinSzfmOiZlRoPezfbJdfVCZikZs38ja3IOoWe7H1dxL0l3Z2jAUgbBldeyhhOkELdGvPlBfQaNbeLslib1w==
|
|
1207
|
+
dependencies:
|
|
1208
|
+
"@inquirer/core" "^10.1.1"
|
|
1209
|
+
"@inquirer/type" "^3.0.1"
|
|
1210
|
+
yoctocolors-cjs "^2.1.2"
|
|
1211
|
+
|
|
1212
|
+
"@inquirer/search@^3.0.3":
|
|
1213
|
+
version "3.0.3"
|
|
1214
|
+
resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.0.3.tgz#791f19a4ee87d65816fd3bb17bd8d76bc11bff07"
|
|
1215
|
+
integrity sha512-mQTCbdNolTGvGGVCJSI6afDwiSGTV+fMLPEIMDJgIV6L/s3+RYRpxt6t0DYnqMQmemnZ/Zq0vTIRwoHT1RgcTg==
|
|
1216
|
+
dependencies:
|
|
1217
|
+
"@inquirer/core" "^10.1.1"
|
|
1218
|
+
"@inquirer/figures" "^1.0.8"
|
|
1219
|
+
"@inquirer/type" "^3.0.1"
|
|
1220
|
+
yoctocolors-cjs "^2.1.2"
|
|
1221
|
+
|
|
1156
1222
|
"@inquirer/select@^2.5.0":
|
|
1157
1223
|
version "2.5.0"
|
|
1158
1224
|
resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-2.5.0.tgz#345c6908ecfaeef3d84ddd2f9feb2f487c558efb"
|
|
@@ -1164,14 +1230,14 @@
|
|
|
1164
1230
|
ansi-escapes "^4.3.2"
|
|
1165
1231
|
yoctocolors-cjs "^2.1.2"
|
|
1166
1232
|
|
|
1167
|
-
"@inquirer/select@^4.0.
|
|
1168
|
-
version "4.0.
|
|
1169
|
-
resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.0.
|
|
1170
|
-
integrity sha512-
|
|
1233
|
+
"@inquirer/select@^4.0.3":
|
|
1234
|
+
version "4.0.3"
|
|
1235
|
+
resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.0.3.tgz#24a9d744685608ff26262fccb41fa93b4dac615f"
|
|
1236
|
+
integrity sha512-OZfKDtDE8+J54JYAFTUGZwvKNfC7W/gFCjDkcsO7HnTH/wljsZo9y/FJquOxMy++DY0+9l9o/MOZ8s5s1j5wmw==
|
|
1171
1237
|
dependencies:
|
|
1172
|
-
"@inquirer/core" "^10.
|
|
1173
|
-
"@inquirer/figures" "^1.0.
|
|
1174
|
-
"@inquirer/type" "^3.0.
|
|
1238
|
+
"@inquirer/core" "^10.1.1"
|
|
1239
|
+
"@inquirer/figures" "^1.0.8"
|
|
1240
|
+
"@inquirer/type" "^3.0.1"
|
|
1175
1241
|
ansi-escapes "^4.3.2"
|
|
1176
1242
|
yoctocolors-cjs "^2.1.2"
|
|
1177
1243
|
|
|
@@ -1182,11 +1248,6 @@
|
|
|
1182
1248
|
dependencies:
|
|
1183
1249
|
mute-stream "^1.0.0"
|
|
1184
1250
|
|
|
1185
|
-
"@inquirer/type@^3.0.0":
|
|
1186
|
-
version "3.0.0"
|
|
1187
|
-
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.0.tgz#1762ebe667ec1d838012b20bf0cf90b841ba68bc"
|
|
1188
|
-
integrity sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==
|
|
1189
|
-
|
|
1190
1251
|
"@inquirer/type@^3.0.1":
|
|
1191
1252
|
version "3.0.1"
|
|
1192
1253
|
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.1.tgz#619ce9f65c3e114d8e39c41822bed3440d20b478"
|
|
@@ -3142,6 +3203,11 @@ change-case@^5.4.4:
|
|
|
3142
3203
|
resolved "https://registry.yarnpkg.com/change-case/-/change-case-5.4.4.tgz#0d52b507d8fb8f204343432381d1a6d7bff97a02"
|
|
3143
3204
|
integrity sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==
|
|
3144
3205
|
|
|
3206
|
+
chardet@^0.7.0:
|
|
3207
|
+
version "0.7.0"
|
|
3208
|
+
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
|
3209
|
+
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
|
|
3210
|
+
|
|
3145
3211
|
check-error@^1.0.3:
|
|
3146
3212
|
version "1.0.3"
|
|
3147
3213
|
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694"
|
|
@@ -4275,6 +4341,15 @@ extend@^3.0.2:
|
|
|
4275
4341
|
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
|
|
4276
4342
|
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
|
|
4277
4343
|
|
|
4344
|
+
external-editor@^3.1.0:
|
|
4345
|
+
version "3.1.0"
|
|
4346
|
+
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
|
4347
|
+
integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
|
|
4348
|
+
dependencies:
|
|
4349
|
+
chardet "^0.7.0"
|
|
4350
|
+
iconv-lite "^0.4.24"
|
|
4351
|
+
tmp "^0.0.33"
|
|
4352
|
+
|
|
4278
4353
|
fast-copy@^3.0.2:
|
|
4279
4354
|
version "3.0.2"
|
|
4280
4355
|
resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.2.tgz#59c68f59ccbcac82050ba992e0d5c389097c9d35"
|
|
@@ -4342,6 +4417,13 @@ fast-xml-parser@^4, fast-xml-parser@^4.5.0:
|
|
|
4342
4417
|
dependencies:
|
|
4343
4418
|
strnum "^1.0.5"
|
|
4344
4419
|
|
|
4420
|
+
fast-xml-parser@^4.5.1:
|
|
4421
|
+
version "4.5.1"
|
|
4422
|
+
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz#a7e665ff79b7919100a5202f23984b6150f9b31e"
|
|
4423
|
+
integrity sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==
|
|
4424
|
+
dependencies:
|
|
4425
|
+
strnum "^1.0.5"
|
|
4426
|
+
|
|
4345
4427
|
fastest-levenshtein@^1.0.7:
|
|
4346
4428
|
version "1.0.16"
|
|
4347
4429
|
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
|
|
@@ -5072,6 +5154,13 @@ husky@^7.0.4:
|
|
|
5072
5154
|
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
|
|
5073
5155
|
integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
|
|
5074
5156
|
|
|
5157
|
+
iconv-lite@^0.4.24:
|
|
5158
|
+
version "0.4.24"
|
|
5159
|
+
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
|
5160
|
+
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
|
5161
|
+
dependencies:
|
|
5162
|
+
safer-buffer ">= 2.1.2 < 3"
|
|
5163
|
+
|
|
5075
5164
|
ieee754@^1.2.1:
|
|
5076
5165
|
version "1.2.1"
|
|
5077
5166
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
|
@@ -6663,6 +6752,11 @@ optionator@^0.9.3:
|
|
|
6663
6752
|
prelude-ls "^1.2.1"
|
|
6664
6753
|
type-check "^0.4.0"
|
|
6665
6754
|
|
|
6755
|
+
os-tmpdir@~1.0.2:
|
|
6756
|
+
version "1.0.2"
|
|
6757
|
+
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
|
6758
|
+
integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==
|
|
6759
|
+
|
|
6666
6760
|
p-cancelable@^2.0.0:
|
|
6667
6761
|
version "2.1.1"
|
|
6668
6762
|
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf"
|
|
@@ -7402,6 +7496,11 @@ safe-stable-stringify@^2.3.1, safe-stable-stringify@^2.4.3:
|
|
|
7402
7496
|
resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886"
|
|
7403
7497
|
integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==
|
|
7404
7498
|
|
|
7499
|
+
"safer-buffer@>= 2.1.2 < 3":
|
|
7500
|
+
version "2.1.2"
|
|
7501
|
+
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
|
7502
|
+
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
|
7503
|
+
|
|
7405
7504
|
sax@>=0.6.0:
|
|
7406
7505
|
version "1.2.4"
|
|
7407
7506
|
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
|
@@ -8033,6 +8132,13 @@ tiny-jsonc@^1.0.1:
|
|
|
8033
8132
|
resolved "https://registry.yarnpkg.com/tiny-jsonc/-/tiny-jsonc-1.0.1.tgz#71de47c9d812b411e87a9f3ab4a5fe42cd8d8f9c"
|
|
8034
8133
|
integrity sha512-ik6BCxzva9DoiEfDX/li0L2cWKPPENYvixUprFdl3YPi4bZZUhDnNI9YUkacrv+uIG90dnxR5mNqaoD6UhD6Bw==
|
|
8035
8134
|
|
|
8135
|
+
tmp@^0.0.33:
|
|
8136
|
+
version "0.0.33"
|
|
8137
|
+
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
|
|
8138
|
+
integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
|
|
8139
|
+
dependencies:
|
|
8140
|
+
os-tmpdir "~1.0.2"
|
|
8141
|
+
|
|
8036
8142
|
to-fast-properties@^2.0.0:
|
|
8037
8143
|
version "2.0.0"
|
|
8038
8144
|
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
|
package/oclif.manifest.json
CHANGED
|
@@ -151,51 +151,6 @@
|
|
|
151
151
|
"preview:agent"
|
|
152
152
|
]
|
|
153
153
|
},
|
|
154
|
-
"agent:generate:definition": {
|
|
155
|
-
"aliases": [],
|
|
156
|
-
"args": {},
|
|
157
|
-
"description": "This command will prompt you for the necessary information to create a new AiEvaluationDefinition. The definition will be saved to the `aiEvaluationDefinitions` directory in the project.\n\nYou must have the `Bots` and `AiEvaluationTestSets` metadata types present in your project to use this command.",
|
|
158
|
-
"examples": [
|
|
159
|
-
"<%= config.bin %> <%= command.id %>"
|
|
160
|
-
],
|
|
161
|
-
"flags": {
|
|
162
|
-
"flags-dir": {
|
|
163
|
-
"helpGroup": "GLOBAL",
|
|
164
|
-
"name": "flags-dir",
|
|
165
|
-
"summary": "Import flag values from a directory.",
|
|
166
|
-
"hasDynamicHelp": false,
|
|
167
|
-
"multiple": false,
|
|
168
|
-
"type": "option"
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"hasDynamicHelp": false,
|
|
172
|
-
"hiddenAliases": [],
|
|
173
|
-
"id": "agent:generate:definition",
|
|
174
|
-
"pluginAlias": "@salesforce/plugin-agent",
|
|
175
|
-
"pluginName": "@salesforce/plugin-agent",
|
|
176
|
-
"pluginType": "core",
|
|
177
|
-
"state": "beta",
|
|
178
|
-
"strict": true,
|
|
179
|
-
"summary": "Interactively generate a new AiEvaluationDefinition.",
|
|
180
|
-
"enableJsonFlag": false,
|
|
181
|
-
"isESM": true,
|
|
182
|
-
"relativePath": [
|
|
183
|
-
"lib",
|
|
184
|
-
"commands",
|
|
185
|
-
"agent",
|
|
186
|
-
"generate",
|
|
187
|
-
"definition.js"
|
|
188
|
-
],
|
|
189
|
-
"aliasPermutations": [],
|
|
190
|
-
"permutations": [
|
|
191
|
-
"agent:generate:definition",
|
|
192
|
-
"generate:agent:definition",
|
|
193
|
-
"generate:definition:agent",
|
|
194
|
-
"agent:definition:generate",
|
|
195
|
-
"definition:agent:generate",
|
|
196
|
-
"definition:generate:agent"
|
|
197
|
-
]
|
|
198
|
-
},
|
|
199
154
|
"agent:generate:spec": {
|
|
200
155
|
"aliases": [],
|
|
201
156
|
"args": {},
|
|
@@ -325,7 +280,52 @@
|
|
|
325
280
|
"spec:generate:agent"
|
|
326
281
|
]
|
|
327
282
|
},
|
|
328
|
-
"agent:generate:
|
|
283
|
+
"agent:generate:test-definition": {
|
|
284
|
+
"aliases": [],
|
|
285
|
+
"args": {},
|
|
286
|
+
"description": "This command will prompt you for the necessary information to create a new AiEvaluationDefinition. The definition will be saved to the `aiEvaluationDefinitions` directory in the project.\n\nYou must have the `Bots` and `AiEvaluationTestSets` metadata types present in your project to use this command.",
|
|
287
|
+
"examples": [
|
|
288
|
+
"<%= config.bin %> <%= command.id %>"
|
|
289
|
+
],
|
|
290
|
+
"flags": {
|
|
291
|
+
"flags-dir": {
|
|
292
|
+
"helpGroup": "GLOBAL",
|
|
293
|
+
"name": "flags-dir",
|
|
294
|
+
"summary": "Import flag values from a directory.",
|
|
295
|
+
"hasDynamicHelp": false,
|
|
296
|
+
"multiple": false,
|
|
297
|
+
"type": "option"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"hasDynamicHelp": false,
|
|
301
|
+
"hiddenAliases": [],
|
|
302
|
+
"id": "agent:generate:test-definition",
|
|
303
|
+
"pluginAlias": "@salesforce/plugin-agent",
|
|
304
|
+
"pluginName": "@salesforce/plugin-agent",
|
|
305
|
+
"pluginType": "core",
|
|
306
|
+
"state": "beta",
|
|
307
|
+
"strict": true,
|
|
308
|
+
"summary": "Interactively generate a new AI Evaluation Test Definition.",
|
|
309
|
+
"enableJsonFlag": false,
|
|
310
|
+
"isESM": true,
|
|
311
|
+
"relativePath": [
|
|
312
|
+
"lib",
|
|
313
|
+
"commands",
|
|
314
|
+
"agent",
|
|
315
|
+
"generate",
|
|
316
|
+
"test-definition.js"
|
|
317
|
+
],
|
|
318
|
+
"aliasPermutations": [],
|
|
319
|
+
"permutations": [
|
|
320
|
+
"agent:generate:test-definition",
|
|
321
|
+
"generate:agent:test-definition",
|
|
322
|
+
"generate:test-definition:agent",
|
|
323
|
+
"agent:test-definition:generate",
|
|
324
|
+
"test-definition:agent:generate",
|
|
325
|
+
"test-definition:generate:agent"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"agent:generate:test-set": {
|
|
329
329
|
"aliases": [],
|
|
330
330
|
"args": {},
|
|
331
331
|
"description": "Answer the prompts to generate an AiEvaluationTestSet that will be written to a file. You can then run \"sf agent generate definition\" to generate the AiEvaluationDefinition that can be used to evaluate the test set.",
|
|
@@ -344,13 +344,13 @@
|
|
|
344
344
|
},
|
|
345
345
|
"hasDynamicHelp": false,
|
|
346
346
|
"hiddenAliases": [],
|
|
347
|
-
"id": "agent:generate:
|
|
347
|
+
"id": "agent:generate:test-set",
|
|
348
348
|
"pluginAlias": "@salesforce/plugin-agent",
|
|
349
349
|
"pluginName": "@salesforce/plugin-agent",
|
|
350
350
|
"pluginType": "core",
|
|
351
351
|
"state": "beta",
|
|
352
352
|
"strict": true,
|
|
353
|
-
"summary": "Interactively generate
|
|
353
|
+
"summary": "Interactively generate a new Set of AI Evaluation test cases.",
|
|
354
354
|
"enableJsonFlag": false,
|
|
355
355
|
"isESM": true,
|
|
356
356
|
"relativePath": [
|
|
@@ -358,16 +358,16 @@
|
|
|
358
358
|
"commands",
|
|
359
359
|
"agent",
|
|
360
360
|
"generate",
|
|
361
|
-
"
|
|
361
|
+
"test-set.js"
|
|
362
362
|
],
|
|
363
363
|
"aliasPermutations": [],
|
|
364
364
|
"permutations": [
|
|
365
|
-
"agent:generate:
|
|
366
|
-
"generate:agent:
|
|
367
|
-
"generate:
|
|
368
|
-
"agent:
|
|
369
|
-
"
|
|
370
|
-
"
|
|
365
|
+
"agent:generate:test-set",
|
|
366
|
+
"generate:agent:test-set",
|
|
367
|
+
"generate:test-set:agent",
|
|
368
|
+
"agent:test-set:generate",
|
|
369
|
+
"test-set:agent:generate",
|
|
370
|
+
"test-set:generate:agent"
|
|
371
371
|
]
|
|
372
372
|
},
|
|
373
373
|
"agent:test:cancel": {
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
"type": "option"
|
|
522
522
|
},
|
|
523
523
|
"output-dir": {
|
|
524
|
-
"char": "
|
|
524
|
+
"char": "d",
|
|
525
525
|
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
526
526
|
"name": "output-dir",
|
|
527
527
|
"summary": "Directory to write the agent test results into.",
|
|
@@ -639,7 +639,7 @@
|
|
|
639
639
|
"type": "option"
|
|
640
640
|
},
|
|
641
641
|
"output-dir": {
|
|
642
|
-
"char": "
|
|
642
|
+
"char": "d",
|
|
643
643
|
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
644
644
|
"name": "output-dir",
|
|
645
645
|
"summary": "Directory to write the agent test results into.",
|
|
@@ -750,7 +750,7 @@
|
|
|
750
750
|
"type": "option"
|
|
751
751
|
},
|
|
752
752
|
"output-dir": {
|
|
753
|
-
"char": "
|
|
753
|
+
"char": "d",
|
|
754
754
|
"description": "If the agent test run completes, write the results to the specified directory. If the test is still running, the test results aren't written.",
|
|
755
755
|
"name": "output-dir",
|
|
756
756
|
"summary": "Directory to write the agent test results into.",
|
|
@@ -788,5 +788,5 @@
|
|
|
788
788
|
]
|
|
789
789
|
}
|
|
790
790
|
},
|
|
791
|
-
"version": "1.7.
|
|
791
|
+
"version": "1.7.3-dev.1"
|
|
792
792
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-agent",
|
|
3
3
|
"description": "Commands to interact with Salesforce agents",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.3-dev.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@inquirer/confirm": "^5.1.0",
|
|
9
8
|
"@inquirer/figures": "^1.0.7",
|
|
10
|
-
"@inquirer/
|
|
11
|
-
"@inquirer/select": "^4.0.1",
|
|
9
|
+
"@inquirer/prompts": "^7.2.0",
|
|
12
10
|
"@oclif/core": "^4",
|
|
13
11
|
"@oclif/multi-stage-output": "^0.7.12",
|
|
14
12
|
"@salesforce/agents": "^0.5.2",
|
|
@@ -16,6 +14,7 @@
|
|
|
16
14
|
"@salesforce/kit": "^3.2.1",
|
|
17
15
|
"@salesforce/sf-plugins-core": "^12.1.0",
|
|
18
16
|
"ansis": "^3.3.2",
|
|
17
|
+
"fast-xml-parser": "^4.5.1",
|
|
19
18
|
"ink": "^5.0.1",
|
|
20
19
|
"ink-text-input": "^6.0.0",
|
|
21
20
|
"react": "^18.3.1"
|
|
@@ -222,7 +221,7 @@
|
|
|
222
221
|
"exports": "./lib/index.js",
|
|
223
222
|
"type": "module",
|
|
224
223
|
"sfdx": {
|
|
225
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.
|
|
226
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.
|
|
224
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.3-dev.1.crt",
|
|
225
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.7.3-dev.1.sig"
|
|
227
226
|
}
|
|
228
227
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE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,WAAW;mBACX,GAAG;mBACH,OAAO;0BACA,CAAC;QAEvB,yBAAyB;QACzB,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAEnD,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,yBAAyB,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC;QACtG,MAAM,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,GAAG,CAAC,qCAAqC,cAAc,EAAE,CAAC,CAAC;QAChE,MAAM,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024, salesforce.com, inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { dirname, join } from 'node:path';
|
|
8
|
-
import { mkdir, writeFile } from 'node:fs/promises';
|
|
9
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
10
|
-
import { Messages } from '@salesforce/core';
|
|
11
|
-
import input from '@inquirer/input';
|
|
12
|
-
import confirm from '@inquirer/confirm';
|
|
13
|
-
import { theme } from '../../../inquirer-theme.js';
|
|
14
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
15
|
-
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.generate.testset');
|
|
16
|
-
async function promptForTestCase() {
|
|
17
|
-
const utterance = await input({
|
|
18
|
-
message: 'What utterance would you like to test?',
|
|
19
|
-
validate: (d) => d.length > 0 || 'utterance cannot be empty',
|
|
20
|
-
theme,
|
|
21
|
-
});
|
|
22
|
-
const topicSequenceExpectedValue = await input({
|
|
23
|
-
message: 'What is the expected value for the topic expectation?',
|
|
24
|
-
validate: (d) => {
|
|
25
|
-
if (!d.length) {
|
|
26
|
-
return 'expected value cannot be empty';
|
|
27
|
-
}
|
|
28
|
-
return true;
|
|
29
|
-
},
|
|
30
|
-
theme,
|
|
31
|
-
});
|
|
32
|
-
const actionSequenceExpectedValue = await input({
|
|
33
|
-
message: 'What is the expected value for the action expectation?',
|
|
34
|
-
validate: (d) => {
|
|
35
|
-
if (!d.length) {
|
|
36
|
-
return 'expected value cannot be empty';
|
|
37
|
-
}
|
|
38
|
-
return true;
|
|
39
|
-
},
|
|
40
|
-
theme,
|
|
41
|
-
});
|
|
42
|
-
const botRatingExpectedValue = await input({
|
|
43
|
-
message: 'What is the expected value for the bot rating expectation?',
|
|
44
|
-
validate: (d) => {
|
|
45
|
-
if (!d.length) {
|
|
46
|
-
return 'expected value cannot be empty';
|
|
47
|
-
}
|
|
48
|
-
return true;
|
|
49
|
-
},
|
|
50
|
-
theme,
|
|
51
|
-
});
|
|
52
|
-
return {
|
|
53
|
-
utterance,
|
|
54
|
-
actionSequenceExpectedValue,
|
|
55
|
-
botRatingExpectedValue,
|
|
56
|
-
topicSequenceExpectedValue,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
export function constructTestSetXML(testCases) {
|
|
60
|
-
const tab = ' ';
|
|
61
|
-
let xml = `<?xml version="1.0" encoding="UTF-8"?>\n<AiEvaluationTestSet>\n${tab}<subjectType>AGENT</subjectType>\n`;
|
|
62
|
-
testCases.forEach((testCase, i) => {
|
|
63
|
-
xml += ` <testCase>
|
|
64
|
-
<number>${i + 1}</number>
|
|
65
|
-
<inputs>
|
|
66
|
-
<utterance>${testCase.utterance}</utterance>
|
|
67
|
-
</inputs>
|
|
68
|
-
<expectations>
|
|
69
|
-
<expectation>
|
|
70
|
-
<name>topic_sequence_match</name>
|
|
71
|
-
<expectedValue>${testCase.topicSequenceExpectedValue}</expectedValue>
|
|
72
|
-
</expectation>
|
|
73
|
-
<expectation>
|
|
74
|
-
<name>action_sequence_match</name>
|
|
75
|
-
<expectedValue>${`[${testCase.actionSequenceExpectedValue
|
|
76
|
-
.split(',')
|
|
77
|
-
.map((v) => `"${v}"`)
|
|
78
|
-
.join(',')}]`}</expectedValue>
|
|
79
|
-
</expectation>
|
|
80
|
-
<expectation>
|
|
81
|
-
<name>bot_response_rating</name>
|
|
82
|
-
<expectedValue>${testCase.botRatingExpectedValue}</expectedValue>
|
|
83
|
-
</expectation>
|
|
84
|
-
</expectations>
|
|
85
|
-
</testCase>\n`;
|
|
86
|
-
});
|
|
87
|
-
xml += '</AiEvaluationTestSet>';
|
|
88
|
-
return xml;
|
|
89
|
-
}
|
|
90
|
-
export default class AgentGenerateTestset extends SfCommand {
|
|
91
|
-
static summary = messages.getMessage('summary');
|
|
92
|
-
static description = messages.getMessage('description');
|
|
93
|
-
static examples = messages.getMessages('examples');
|
|
94
|
-
static enableJsonFlag = false;
|
|
95
|
-
static state = 'beta';
|
|
96
|
-
async run() {
|
|
97
|
-
const testSetName = await input({
|
|
98
|
-
message: 'What is the name of the test set?',
|
|
99
|
-
});
|
|
100
|
-
const testCases = [];
|
|
101
|
-
do {
|
|
102
|
-
this.log();
|
|
103
|
-
this.styledHeader(`Adding test case #${testCases.length + 1}`);
|
|
104
|
-
// eslint-disable-next-line no-await-in-loop
|
|
105
|
-
testCases.push(await promptForTestCase());
|
|
106
|
-
} while ( // eslint-disable-next-line no-await-in-loop
|
|
107
|
-
await confirm({
|
|
108
|
-
message: 'Would you like to add another test case?',
|
|
109
|
-
default: true,
|
|
110
|
-
}));
|
|
111
|
-
const testSetPath = join('force-app', 'main', 'default', 'aiEvaluationTestsets', `${testSetName}.xml`);
|
|
112
|
-
await mkdir(dirname(testSetPath), { recursive: true });
|
|
113
|
-
this.log();
|
|
114
|
-
this.log(`Writing new AiEvaluationTestSet to ${testSetPath}`);
|
|
115
|
-
await writeFile(testSetPath, constructTestSetXML(testCases));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=testset.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testset.js","sourceRoot":"","sources":["../../../../src/commands/agent/generate/testset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,wBAAwB,CAAC,CAAC;AAS7F,KAAK,UAAU,iBAAiB;IAC9B,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC;QAC5B,OAAO,EAAE,wCAAwC;QACjD,QAAQ,EAAE,CAAC,CAAS,EAAoB,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,2BAA2B;QACtF,KAAK;KACN,CAAC,CAAC;IAEH,MAAM,0BAA0B,GAAG,MAAM,KAAK,CAAC;QAC7C,OAAO,EAAE,uDAAuD;QAChE,QAAQ,EAAE,CAAC,CAAS,EAAoB,EAAE;YACxC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACd,OAAO,gCAAgC,CAAC;YAC1C,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK;KACN,CAAC,CAAC;IAEH,MAAM,2BAA2B,GAAG,MAAM,KAAK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