@autobe/agent 0.9.0 → 0.9.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.
Files changed (46) hide show
  1. package/lib/AutoBeAgent.js +3 -1
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +2 -2
  4. package/lib/index.mjs +883 -865
  5. package/lib/index.mjs.map +1 -1
  6. package/lib/orchestrate/test/compileTestScenario.d.ts +5 -0
  7. package/lib/orchestrate/test/compileTestScenario.js +56 -0
  8. package/lib/orchestrate/test/compileTestScenario.js.map +1 -0
  9. package/lib/orchestrate/test/filterTestFileName.d.ts +1 -0
  10. package/lib/orchestrate/test/filterTestFileName.js +13 -0
  11. package/lib/orchestrate/test/filterTestFileName.js.map +1 -0
  12. package/lib/orchestrate/test/orchestrateTest.js +6 -3
  13. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  14. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +2 -2
  15. package/lib/orchestrate/test/orchestrateTestCorrect.js +46 -60
  16. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  17. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  18. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +4 -0
  19. package/lib/orchestrate/test/{orchestrateTestProgress.js → orchestrateTestWrite.js} +10 -51
  20. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -0
  21. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +5 -0
  22. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js +3 -0
  23. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
  24. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +2 -2
  25. package/lib/orchestrate/test/transformTestCorrectHistories.js +9 -13
  26. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  27. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +7 -0
  28. package/lib/orchestrate/test/transformTestWriteHistories.js +47 -0
  29. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -0
  30. package/package.json +4 -4
  31. package/src/AutoBeAgent.ts +5 -1
  32. package/src/constants/AutoBeSystemPromptConstant.ts +1 -1
  33. package/src/orchestrate/test/compileTestScenario.ts +63 -0
  34. package/src/orchestrate/test/filterTestFileName.ts +9 -0
  35. package/src/orchestrate/test/orchestrateTest.ts +6 -5
  36. package/src/orchestrate/test/orchestrateTestCorrect.ts +96 -97
  37. package/src/orchestrate/test/orchestrateTestScenario.ts +6 -3
  38. package/src/orchestrate/test/{orchestrateTestProgress.ts → orchestrateTestWrite.ts} +14 -73
  39. package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +5 -0
  40. package/src/orchestrate/test/transformTestCorrectHistories.ts +10 -14
  41. package/src/orchestrate/test/{transformTestProgressHistories.ts → transformTestWriteHistories.ts} +9 -10
  42. package/lib/orchestrate/test/orchestrateTestProgress.d.ts +0 -5
  43. package/lib/orchestrate/test/orchestrateTestProgress.js.map +0 -1
  44. package/lib/orchestrate/test/transformTestProgressHistories.d.ts +0 -8
  45. package/lib/orchestrate/test/transformTestProgressHistories.js +0 -47
  46. package/lib/orchestrate/test/transformTestProgressHistories.js.map +0 -1
@@ -52,40 +52,40 @@ const typia_1 = __importDefault(require("typia"));
52
52
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
53
  const backoffRetry_1 = require("../../utils/backoffRetry");
54
54
  const enforceToolCall_1 = require("../../utils/enforceToolCall");
55
- const orchestrateTestProgress_1 = require("./orchestrateTestProgress");
55
+ const compileTestScenario_1 = require("./compileTestScenario");
56
+ const filterTestFileName_1 = require("./filterTestFileName");
56
57
  const transformTestCorrectHistories_1 = require("./transformTestCorrectHistories");
57
58
  function orchestrateTestCorrect(ctx_1, codes_1, scenarios_1) {
58
59
  return __awaiter(this, arguments, void 0, function* (ctx, codes, scenarios, life = 4) {
59
60
  var _a, _b;
60
- const scenarioMap = new Map();
61
- codes.forEach(({ filename }, index) => {
62
- scenarioMap.set(filename, scenarios[index]);
61
+ const files = codes.map(({ filename, content }, index) => {
62
+ const scenario = scenarios[index];
63
+ return { location: filename, content, scenario };
63
64
  });
64
65
  // 1) Build map of new test files from progress events
65
- const testFiles = codes
66
- .map(({ filename, content }) => {
67
- return {
68
- [`test/features/api/${filename}`]: content,
69
- };
70
- })
71
- .reduce((acc, cur) => Object.assign(acc, cur), {});
66
+ const testFiles = Object.fromEntries(codes.map((c) => [c.filename, c.content]));
72
67
  // 2) Keep only files outside the test directory from current state
73
- const retainedFiles = Object.entries((_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : {})
74
- .filter(([filename]) => {
75
- return !filename.startsWith("test/features/api");
76
- })
77
- .map(([filename, content]) => {
78
- return { [filename]: content };
79
- })
80
- .reduce((acc, cur) => Object.assign(acc, cur), {});
68
+ const retainedFiles = Object.fromEntries(Object.entries((_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : {}).filter(([key]) => (0, filterTestFileName_1.filterTestFileName)(key)));
81
69
  // 3) Merge and filter: keep .ts/.json, drop anything under "benchmark"
82
- const mergedFiles = Object.assign(Object.assign({}, retainedFiles), testFiles);
83
- const files = Object.fromEntries(Object.entries(mergedFiles).filter(([filename]) => (filename.endsWith(".ts") && !filename.startsWith("test/benchmark/")) ||
84
- filename.endsWith(".json")));
70
+ const external = (location) => __awaiter(this, void 0, void 0, function* () {
71
+ const content = yield ctx.compiler.typescript.getExternal(location);
72
+ if (content === undefined)
73
+ throw new Error(`File not found: ${location}`);
74
+ return { [location]: content };
75
+ });
76
+ const mergedFiles = Object.assign(Object.assign(Object.assign(Object.assign({}, retainedFiles), testFiles), (yield external("node_modules/@nestia/e2e/lib/TestValidator.d.ts"))), (yield external("node_modules/@nestia/fetcher/lib/IConnection.d.ts")));
85
77
  // 4) Ask the LLM to correct the filtered file set
86
- const response = yield step(ctx, files, scenarioMap, life);
78
+ const response = yield step(ctx, mergedFiles, files, life);
87
79
  // 5) Combine original + corrected files and dispatch event
88
- const event = Object.assign(Object.assign({}, response), { type: "testValidate", files: Object.assign(Object.assign({}, mergedFiles), response.files) });
80
+ const event = Object.assign(Object.assign({}, response), { type: "testValidate", files: [
81
+ ...Object.entries(mergedFiles).map(([filename, content]) => {
82
+ return {
83
+ location: filename,
84
+ content,
85
+ };
86
+ }),
87
+ ...response.files,
88
+ ] });
89
89
  return event;
90
90
  });
91
91
  }
@@ -99,24 +99,25 @@ function orchestrateTestCorrect(ctx_1, codes_1, scenarios_1) {
99
99
  * all generated test files are syntactically correct and compilable.
100
100
  *
101
101
  * @param ctx AutoBe context object
102
- * @param files Map of files to compile (filename: content)
102
+ * @param entireFiles Map of all files to compile (filename: content)
103
+ * @param testFiles Map of files to compile (filename: content)
103
104
  * @param life Number of remaining retry attempts
104
105
  * @returns Event object containing successful compilation result and modified
105
106
  * files
106
107
  */
107
- function step(ctx, files, scenarioMap, life) {
108
+ function step(ctx, entireFiles, testFiles, life) {
108
109
  return __awaiter(this, void 0, void 0, function* () {
109
- // COMPILE TEST CODE
110
110
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
111
+ // COMPILE TEST CODE
111
112
  const result = yield ctx.compiler.typescript.compile({
112
- files,
113
+ files: entireFiles,
113
114
  });
114
115
  if (result.type === "success") {
115
116
  // SUCCESS
116
117
  return {
117
118
  type: "testValidate",
118
119
  created_at: new Date().toISOString(),
119
- files,
120
+ files: testFiles,
120
121
  result,
121
122
  step: (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
122
123
  };
@@ -126,7 +127,7 @@ function step(ctx, files, scenarioMap, life) {
126
127
  ctx.dispatch({
127
128
  type: "testValidate",
128
129
  created_at: new Date().toISOString(),
129
- files,
130
+ files: testFiles,
130
131
  result,
131
132
  step: (_d = (_c = ctx.state().interface) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
132
133
  });
@@ -150,7 +151,7 @@ function step(ctx, files, scenarioMap, life) {
150
151
  return {
151
152
  type: "testValidate",
152
153
  created_at: new Date().toISOString(),
153
- files,
154
+ files: testFiles,
154
155
  result: Object.assign(Object.assign({}, result), { type: "success" }),
155
156
  step: (_f = (_e = ctx.state().interface) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
156
157
  };
@@ -159,7 +160,7 @@ function step(ctx, files, scenarioMap, life) {
159
160
  ctx.dispatch({
160
161
  type: "testValidate",
161
162
  created_at: new Date().toISOString(),
162
- files,
163
+ files: testFiles,
163
164
  result,
164
165
  step: (_h = (_g = ctx.state().interface) === null || _g === void 0 ? void 0 : _g.step) !== null && _h !== void 0 ? _h : 0,
165
166
  });
@@ -167,31 +168,33 @@ function step(ctx, files, scenarioMap, life) {
167
168
  return {
168
169
  type: "testValidate",
169
170
  created_at: new Date().toISOString(),
170
- files,
171
+ files: testFiles,
171
172
  result,
172
173
  step: (_k = (_j = ctx.state().interface) === null || _j === void 0 ? void 0 : _j.step) !== null && _k !== void 0 ? _k : 0,
173
174
  };
174
175
  // VALIDATION FAILED
175
- const validate = yield Promise.all(Object.entries(diagnostics).map((_a) => __awaiter(this, [_a], void 0, function* ([filename, d]) {
176
+ const validatedFiles = yield Promise.all(Object.entries(diagnostics).map((_a) => __awaiter(this, [_a], void 0, function* ([filename, d]) {
176
177
  var _b, _c;
177
- const scenario = scenarioMap.get(filename);
178
- const code = files[filename];
178
+ const file = testFiles.find((f) => f.location === filename);
179
+ const code = file === null || file === void 0 ? void 0 : file.content;
180
+ const scenario = file === null || file === void 0 ? void 0 : file.scenario;
179
181
  const response = yield process(ctx, d, code, scenario);
180
182
  ctx.dispatch({
181
183
  type: "testCorrect",
182
184
  created_at: new Date().toISOString(),
183
- files: Object.assign(Object.assign({}, files), { [filename]: response.content }),
185
+ files: Object.assign(Object.assign({}, testFiles), { [filename]: response.content }),
184
186
  result,
185
187
  solution: response.solution,
186
188
  think_without_compile_error: response.think_without_compile_error,
187
189
  think_again_with_compile_error: response.think_again_with_compile_error,
188
190
  step: (_c = (_b = ctx.state().interface) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
189
191
  });
190
- // Return [filename, modified code]
191
- return [filename, response.content];
192
+ return { location: filename, content: code, scenario: scenario };
192
193
  })));
193
- const newFiles = Object.assign(Object.assign({}, files), Object.fromEntries(validate));
194
- return step(ctx, newFiles, scenarioMap, life - 1);
194
+ return step(ctx, entireFiles, testFiles.map((f) => {
195
+ const validated = validatedFiles.find((v) => v.location === f.location);
196
+ return validated ? validated : f;
197
+ }), life - 1);
195
198
  });
196
199
  }
197
200
  /**
@@ -210,29 +213,12 @@ function process(ctx, diagnostics, code, scenario) {
210
213
  const pointer = {
211
214
  value: null,
212
215
  };
213
- let document = null;
214
- if (scenario) {
215
- document = (0, orchestrateTestProgress_1.filterDocument)(scenario, ctx.state().interface.document);
216
- }
217
- // const apiFiles = Object.entries(ctx.state().interface?.files ?? {})
218
- // .filter(([filename]) => {
219
- // return filename.startsWith("src/api/");
220
- // })
221
- // .reduce<Record<string, string>>((acc, [filename, content]) => {
222
- // return Object.assign(acc, { [filename]: content });
223
- // }, {});
224
- // const dtoFiles = Object.entries(ctx.state().interface?.files ?? {})
225
- // .filter(([filename]) => {
226
- // return filename.startsWith("src/api/structures/");
227
- // })
228
- // .reduce<Record<string, string>>((acc, [filename, content]) => {
229
- // return Object.assign(acc, { [filename]: content });
230
- // }, {});
216
+ const artifacts = yield (0, compileTestScenario_1.compileTestScenario)(ctx, scenario);
231
217
  const agentica = new core_1.MicroAgentica({
232
218
  model: ctx.model,
233
219
  vendor: Object.assign({}, ctx.vendor),
234
220
  config: Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})),
235
- histories: (0, transformTestCorrectHistories_1.transformTestCorrectHistories)(document),
221
+ histories: (0, transformTestCorrectHistories_1.transformTestCorrectHistories)(artifacts),
236
222
  controllers: [
237
223
  createApplication({
238
224
  model: ctx.model,
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateTestCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,wDA4DC;;AA/ED,yCAAoE;AAUpE,kDAA0B;AAG1B,uEAAoE;AACpE,2DAA8D;AAC9D,iEAA8D;AAC9D,uEAA2D;AAC3D,mFAAgF;AAEhF,SAAsB,sBAAsB;yDAC1C,GAAyB,EACzB,KAA6B,EAC7B,SAA8C,EAC9C,OAAe,CAAC;;QAEhB,MAAM,WAAW,GAAmD,IAAI,GAAG,EAAE,CAAC;QAC9E,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE;YACpC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;QAEH,sDAAsD;QACtD,MAAM,SAAS,GAA2B,KAAK;aAC5C,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;YAC7B,OAAO;gBACL,CAAC,qBAAqB,QAAQ,EAAE,CAAC,EAAE,OAAO;aAC3C,CAAC;QACJ,CAAC,CAAC;aACD,MAAM,CAAyB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QAE7E,mEAAmE;QACnE,MAAM,aAAa,GAA2B,MAAM,CAAC,OAAO,CAC1D,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,KAAK,mCAAI,EAAE,CACnC;aACE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAgE;CACtE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AutoBeTestScenario, AutoBeTestWriteEvent } from "@autobe/interface";
2
+ import { ILlmSchema } from "@samchon/openapi";
3
+ import { AutoBeContext } from "../../context/AutoBeContext";
4
+ export declare function orchestrateTestWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenarios: AutoBeTestScenario[]): Promise<AutoBeTestWriteEvent[]>;
@@ -45,16 +45,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
45
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.orchestrateTestProgress = orchestrateTestProgress;
49
- exports.filterDocument = filterDocument;
48
+ exports.orchestrateTestWrite = orchestrateTestWrite;
50
49
  const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
51
50
  const core_1 = require("@agentica/core");
52
- const openapi_1 = require("@samchon/openapi");
53
51
  const typia_1 = __importDefault(require("typia"));
54
52
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
55
53
  const enforceToolCall_1 = require("../../utils/enforceToolCall");
56
- const transformTestProgressHistories_1 = require("./transformTestProgressHistories");
57
- function orchestrateTestProgress(ctx, scenarios) {
54
+ const compileTestScenario_1 = require("./compileTestScenario");
55
+ const transformTestWriteHistories_1 = require("./transformTestWriteHistories");
56
+ function orchestrateTestWrite(ctx, scenarios) {
58
57
  return __awaiter(this, void 0, void 0, function* () {
59
58
  const start = new Date();
60
59
  let complete = 0;
@@ -70,7 +69,7 @@ function orchestrateTestProgress(ctx, scenarios) {
70
69
  const event = {
71
70
  type: "testWrite",
72
71
  created_at: start.toISOString(),
73
- filename: `${code.domain}/${scenario.functionName}.ts`,
72
+ filename: `test/features/api/${code.domain}/${scenario.functionName}.ts`,
74
73
  content: code.content,
75
74
  completed: ++complete,
76
75
  total: scenarios.length,
@@ -98,18 +97,14 @@ function process(ctx, scenario) {
98
97
  const pointer = {
99
98
  value: null,
100
99
  };
101
- const document = filterDocument(scenario, ctx.state().interface.document);
102
- const files = Object.entries(yield ctx.compiler.interface.compile(document));
103
- const filter = (prefix) => Object.fromEntries(files.filter(([key]) => key.startsWith(prefix)));
100
+ const artifacts = yield (0, compileTestScenario_1.compileTestScenario)(ctx, scenario);
104
101
  const agentica = new core_1.MicroAgentica({
105
102
  model: ctx.model,
106
103
  vendor: ctx.vendor,
107
104
  config: Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})),
108
- histories: (0, transformTestProgressHistories_1.transformTestProgressHistories)({
109
- scenario: scenario,
110
- dto: filter("src/api/structures"),
111
- sdk: filter("src/api/functional"),
112
- e2e: filter("test/features"),
105
+ histories: (0, transformTestWriteHistories_1.transformTestWriteHistories)({
106
+ scenario,
107
+ artifacts,
113
108
  }),
114
109
  controllers: [
115
110
  createApplication({
@@ -128,42 +123,6 @@ function process(ctx, scenario) {
128
123
  return pointer.value;
129
124
  });
130
125
  }
131
- function filterDocument(scenario, document) {
132
- const operations = document.operations.filter((op) => {
133
- if (scenario.endpoint.method === op.method &&
134
- scenario.endpoint.path === op.path) {
135
- return true;
136
- }
137
- else if (scenario.dependencies.some((dp) => dp.endpoint.method === op.method && dp.endpoint.path === op.path)) {
138
- return true;
139
- }
140
- });
141
- const components = {
142
- schemas: {},
143
- };
144
- const visit = (typeName) => {
145
- openapi_1.OpenApiTypeChecker.visit({
146
- components: document.components,
147
- schema: { $ref: `#/components/schemas/${typeName}` },
148
- closure: (s) => {
149
- if (openapi_1.OpenApiTypeChecker.isReference(s)) {
150
- const key = s.$ref.split("/").pop();
151
- components.schemas[key] = document.components.schemas[key];
152
- }
153
- },
154
- });
155
- };
156
- for (const op of operations) {
157
- if (op.requestBody)
158
- visit(op.requestBody.typeName);
159
- if (op.responseBody)
160
- visit(op.responseBody.typeName);
161
- }
162
- return {
163
- operations,
164
- components,
165
- };
166
- }
167
126
  function createApplication(props) {
168
127
  (0, assertSchemaModel_1.assertSchemaModel)(props.model);
169
128
  const application = collection[props.model];
@@ -425,4 +384,4 @@ const collection = {
425
384
  ]
426
385
  },
427
386
  };
428
- //# sourceMappingURL=orchestrateTestProgress.js.map
387
+ //# sourceMappingURL=orchestrateTestWrite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrateTestWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,oDA8BC;;AA3CD,yCAAoE;AAIpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,+DAA4D;AAE5D,+EAA4E;AAE5E,SAAsB,oBAAoB,CACxC,GAAyB,EACzB,SAA+B;;QAE/B,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,QAAQ,GAAW,CAAC,CAAC;QAEzB,MAAM,MAAM,GAA2B,MAAM,OAAO,CAAC,GAAG;QACtD;;;;WAIG;QACH,SAAS,CAAC,GAAG,CAAC,CAAO,QAAQ,EAAE,EAAE;;YAC/B,MAAM,IAAI,GAAyB,MAAM,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAChE,MAAM,KAAK,GAAyB;gBAClC,IAAI,EAAE,WAAW;gBACjB,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;gBAC/B,QAAQ,EAAE,qBAAqB,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,YAAY,KAAK;gBACxE,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,SAAS,EAAE,EAAE,QAAQ;gBACrB,KAAK,EAAE,SAAS,CAAC,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AED,SAAS,iBAAiB,CAAiC,KAG1D;IACC,IAAA,qCAAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACyB,CAAC;IACvC,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,kBAAkB;QACxB,WAAW;QACX,OAAO,EAAE;YACP,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;gBACvB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACqB;KACzB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA8C;CACpD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface IAutoBeTestScenarioArtifacts {
2
+ sdk: Record<string, string>;
3
+ dto: Record<string, string>;
4
+ e2e: Record<string, string>;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoBeTestScenarioArtifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoBeTestScenarioArtifacts.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
- import { AutoBeOpenApi } from "@autobe/interface";
3
- export declare const transformTestCorrectHistories: (document: AutoBeOpenApi.IDocument | null) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
2
+ import { IAutoBeTestScenarioArtifacts } from "./structures/IAutoBeTestScenarioArtifacts";
3
+ export declare const transformTestCorrectHistories: (artifacts: IAutoBeTestScenarioArtifacts) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformTestCorrectHistories = void 0;
4
4
  const uuid_1 = require("uuid");
5
- const transformTestCorrectHistories = (document) => {
5
+ const transformTestCorrectHistories = (artifacts) => {
6
6
  return [
7
7
  {
8
8
  id: (0, uuid_1.v4)(),
@@ -27,19 +27,15 @@ const transformTestCorrectHistories = (document) => {
27
27
  "- Keep all tests deterministic and reliable.",
28
28
  "",
29
29
  "## File References",
30
- "### OpenAPI Like Document",
31
- "```json",
32
- JSON.stringify(document),
30
+ "### API Files",
31
+ "```typescript",
32
+ JSON.stringify(artifacts.sdk),
33
+ "```",
34
+ "",
35
+ "### DTO Files",
36
+ "```typescript",
37
+ JSON.stringify(artifacts.dto),
33
38
  "```",
34
- // "### API Files",
35
- // "```typescript",
36
- // JSON.stringify(apiFiles, null, 2),
37
- // "```",
38
- // "",
39
- // "### DTO Files",
40
- // "```typescript",
41
- // JSON.stringify(dtoFiles, null, 2),
42
- // "```",
43
39
  "",
44
40
  "Now Fix the E2E test function based on the given error information.",
45
41
  "Only output a single `async function` named `test_api_{...}`. No explanation, no commentary.",
@@ -1 +1 @@
1
- {"version":3,"file":"transformTestCorrectHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/test/transformTestCorrectHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAInB,MAAM,6BAA6B,GAAG,CAC3C,QAAwC,EAGxC,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,wraAAyC;SAC9C;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,2DAA2D;gBAC3D,qGAAqG;gBACrG,EAAE;gBACF,UAAU;gBACV,2FAA2F;gBAC3F,8EAA8E;gBAC9E,+EAA+E;gBAC/E,iHAAiH;gBACjH,6EAA6E;gBAC7E,8CAA8C;gBAC9C,EAAE;gBACF,oBAAoB;gBACpB,2BAA2B;gBAC3B,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;gBACxB,KAAK;gBACL,mBAAmB;gBACnB,mBAAmB;gBACnB,qCAAqC;gBACrC,SAAS;gBACT,MAAM;gBACN,mBAAmB;gBACnB,mBAAmB;gBACnB,qCAAqC;gBACrC,SAAS;gBACT,EAAE;gBACF,qEAAqE;gBACrE,8FAA8F;aAC/F,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,6BAA6B,iCAgDxC"}
1
+ {"version":3,"file":"transformTestCorrectHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/test/transformTestCorrectHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAKnB,MAAM,6BAA6B,GAAG,CAC3C,SAAuC,EAGvC,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,wraAAyC;SAC9C;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,2DAA2D;gBAC3D,qGAAqG;gBACrG,EAAE;gBACF,UAAU;gBACV,2FAA2F;gBAC3F,8EAA8E;gBAC9E,+EAA+E;gBAC/E,iHAAiH;gBACjH,6EAA6E;gBAC7E,8CAA8C;gBAC9C,EAAE;gBACF,oBAAoB;gBACpB,eAAe;gBACf,eAAe;gBACf,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;gBAC7B,KAAK;gBACL,EAAE;gBACF,eAAe;gBACf,eAAe;gBACf,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;gBAC7B,KAAK;gBACL,EAAE;gBACF,qEAAqE;gBACrE,8FAA8F;aAC/F,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,6BAA6B,iCA4CxC"}
@@ -0,0 +1,7 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeTestScenario } from "@autobe/interface";
3
+ import { IAutoBeTestScenarioArtifacts } from "./structures/IAutoBeTestScenarioArtifacts";
4
+ export declare const transformTestWriteHistories: (props: {
5
+ scenario: AutoBeTestScenario;
6
+ artifacts: IAutoBeTestScenarioArtifacts;
7
+ }) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformTestWriteHistories = void 0;
4
+ const uuid_1 = require("uuid");
5
+ const transformTestWriteHistories = (props) => {
6
+ return [
7
+ {
8
+ id: (0, uuid_1.v4)(),
9
+ created_at: new Date().toISOString(),
10
+ type: "systemMessage",
11
+ text: "# E2E Test Function Writing AI Agent System Prompt\n\n## 1. Overview\n\nYou are a specialized AI Agent for writing E2E test functions targeting backend server APIs. Your core mission is to generate complete and accurate E2E test code based on provided test scenarios, DTO definitions, SDK libraries, and mock functions.\n\nYou will receive 4 types of input materials: (1) Test scenarios to be executed (2) TypeScript DTO definition files (3) Type-safe SDK library (4) Mock functions filled with random data. Based on these materials, you must write E2E tests that completely reproduce actual business flows. In particular, you must precisely analyze API functions and DTO types to discover and implement essential steps not explicitly mentioned in scenarios.\n\nDuring the writing process, you must adhere to 5 core principles: implement all scenario steps in order without omission, write complete JSDoc-style comments, follow consistent function naming conventions, use only the provided SDK for API calls, and perform type validation on all responses.\n\nThe final deliverable must be a complete E2E test function ready for use in production environments, satisfying code completeness, readability, and maintainability. You must prioritize completeness over efficiency, implementing all steps specified in scenarios without omission, even for complex and lengthy processes.\n\n## 2. Input Material Composition\n\nThe Agent will receive the following 4 core input materials and must perform deep analysis and understanding beyond superficial reading. Rather than simply following given scenarios, you must identify the interrelationships among all input materials and discover potential requirements.\n\n### 2.1. Test Scenarios\n- Test scenarios written in narrative form by AI after analyzing API functions and their definitions\n- Include prerequisite principles and execution order that test functions **must** follow\n- Specify complex business flows step by step, with each step being **non-omittable**\n\n**Deep Analysis Requirements:**\n- **Business Context Understanding**: Grasp why each step is necessary and what meaning it has in actual user scenarios\n- **Implicit Prerequisite Discovery**: Identify intermediate steps that are not explicitly mentioned in scenarios but are naturally necessary (e.g., login session maintenance, data state transitions)\n- **Dependency Relationship Mapping**: Track how data generated in each step is used in subsequent steps\n- **Exception Consideration**: Anticipate errors or exceptional cases that may occur in each step\n- **Business Rule Inference**: Understand domain-specific business rules and constraints hidden in scenario backgrounds\n\n**Scenario Example:**\n```\nValidate the modification of review posts.\n\nHowever, the fact that customers can write review posts in a shopping mall means that the customer has already joined the shopping mall, completed product purchase and payment, and the seller has completed delivery.\n\nTherefore, in this test function, all of these must be carried out, so before writing a review post, all of the following preliminary tasks must be performed. It will be quite a long process.\n\n1. Seller signs up\n2. Seller registers a product\n3. Customer signs up\n4. Customer views the product in detail\n5. Customer adds the product to shopping cart\n6. Customer places a purchase order\n7. Customer confirms purchase and makes payment\n8. Seller confirms order and processes delivery\n9. Customer writes a review post\n10. Customer modifies the review post\n11. Re-view the review post to confirm modifications.\n```\n\n### 2.2. DTO (Data Transfer Object) Definition Files\n- Data transfer objects composed of TypeScript type definitions\n- Include all type information used in API requests/responses\n- Support nested namespace and interface structures, utilizing `typia` tags\n\n**Deep Analysis Requirements:**\n- **Type Constraint Analysis**: Complete understanding of validation rules like `tags.Format<\"uuid\">`, `tags.MinItems<1>`, `tags.Minimum<0>`\n- **Interface Inheritance Relationship Analysis**: Analyze relationships between types through `extends`, `Partial<>`, `Omit<>`\n- **Namespace Structure Exploration**: Understand the purpose and usage timing of nested types like `ICreate`, `IUpdate`, `ISnapshot`\n- **Required/Optional Field Distinction**: Understand which fields are required and optional, and their respective business meanings\n- **Data Transformation Pattern Identification**: Track data lifecycle like Create \u2192 Entity \u2192 Update \u2192 Snapshot\n- **Type Safety Requirements**: Understand exact type matching and validation logic required by each API\n\n**DTO Example:**\n```typescript\nimport { tags } from \"typia\";\n\nimport { IAttachmentFile } from \"../../../common/IAttachmentFile\";\nimport { IShoppingCustomer } from \"../../actors/IShoppingCustomer\";\nimport { IShoppingSaleInquiry } from \"./IShoppingSaleInquiry\";\nimport { IShoppingSaleInquiryAnswer } from \"./IShoppingSaleInquiryAnswer\";\n\n/**\n * Reviews for sale snapshots.\n *\n * `IShoppingSaleReview` is a subtype entity of {@link IShoppingSaleInquiry},\n * and is used when a {@link IShoppingCustomer customer} purchases a\n * {@link IShoppingSale sale} ({@link IShoppingSaleSnapshot snapshot} at the time)\n * registered by the {@link IShoppingSeller seller} as a product and leaves a\n * review and rating for it.\n *\n * For reference, `IShoppingSaleReview` and\n * {@link IShoppingOrderGod shopping_order_goods} have a logarithmic relationship\n * of N: 1, but this does not mean that customers can continue to write reviews\n * for the same product indefinitely. Wouldn't there be restrictions, such as\n * if you write a review once, you can write an additional review a month later?\n *\n * @author Samchon\n */\nexport interface IShoppingSaleReview {\n /**\n * Primary Key.\n */\n id: string & tags.Format<\"uuid\">;\n\n /**\n * Discriminator type.\n */\n type: \"review\";\n\n /**\n * Customer who wrote the inquiry.\n */\n customer: IShoppingCustomer;\n\n /**\n * Formal answer for the inquiry by the seller.\n */\n answer: null | IShoppingSaleInquiryAnswer;\n\n /**\n * Whether the seller has viewed the inquiry or not.\n */\n read_by_seller: boolean;\n\n /**\n * List of snapshot contents.\n *\n * It is created for the first time when an article is created, and is\n * accumulated every time the article is modified.\n */\n snapshots: IShoppingSaleReview.ISnapshot[] & tags.MinItems<1>;\n\n /**\n * Creation time of article.\n */\n created_at: string & tags.Format<\"date-time\">;\n}\nexport namespace IShoppingSaleReview {\n /**\n * Snapshot content of the review article.\n */\n export interface ISnapshot extends ICreate {\n /**\n * Primary Key.\n */\n id: string;\n\n /**\n * Creation time of snapshot record.\n *\n * In other words, creation time or update time or article.\n */\n created_at: string & tags.Format<\"date-time\">;\n }\n\n /**\n * Creation information of the review.\n */\n export interface ICreate {\n /**\n * Format of body.\n *\n * Same meaning with extension like `html`, `md`, `txt`.\n */\n format: \"html\" | \"md\" | \"txt\";\n\n /**\n * Title of article.\n */\n title: string;\n\n /**\n * Content body of article.\n */\n body: string;\n\n /**\n * List of attachment files.\n */\n files: IAttachmentFile.ICreate[];\n\n /**\n * Target good's {@link IShoppingOrderGood.id}.\n */\n good_id: string & tags.Format<\"uuid\">;\n\n /**\n * Score of the review.\n */\n score: number & tags.Minimum<0> & tags.Maximum<100>;\n }\n\n /**\n * Updating information of the review.\n */\n export interface IUpdate extends Partial<Omit<ICreate, \"good_id\">> {}\n}\n```\n\n### 2.3. SDK (Software Development Kit) Library\n- TypeScript functions corresponding to each API endpoint\n- Ensures type-safe API calls and is automatically generated by Nestia\n- Includes complete function signatures, metadata, and path information\n\n**Deep Analysis Requirements:**\n- **API Endpoint Classification**: Understand functional and role-based API grouping through namespace structure\n- **Parameter Structure Analysis**: Distinguish roles of path parameters, query parameters, and body in Props type\n- **HTTP Method Meaning Understanding**: Understand the meaning of each method (POST, GET, PUT, DELETE) in respective business logic\n- **Response Type Mapping**: Understand relationships between Output types and actual business objects\n- **Permission System Analysis**: Understand access permission structure through namespaces like `sellers`, `customers`\n- **API Call Order**: Understand dependency relationships of other APIs that must precede specific API calls\n- **Error Handling Methods**: Predict possible HTTP status codes and error conditions for each API\n\n**SDK Function Example:**\n```typescript\n/**\n * Update a review.\n *\n * Update a {@link IShoppingSaleReview review}'s content and score.\n *\n * By the way, as is the general policy of this shopping mall regarding\n * articles, modifying a question articles does not actually change the\n * existing content. Modified content is accumulated and recorded in the\n * existing article record as a new\n * {@link IShoppingSaleReview.ISnapshot snapshot}. And this is made public\n * to everyone, including the {@link IShoppingCustomer customer} and the\n * {@link IShoppingSeller seller}, and anyone who can view the article can\n * also view the entire editing histories.\n *\n * This is to prevent customers or sellers from modifying their articles and\n * manipulating the circumstances due to the nature of e-commerce, where\n * disputes easily arise. That is, to preserve evidence.\n *\n * @param props.saleId Belonged sale's {@link IShoppingSale.id }\n * @param props.id Target review's {@link IShoppingSaleReview.id }\n * @param props.body Update info of the review\n * @returns Newly created snapshot record of the review\n * @tag Sale\n * @author Samchon\n *\n * @controller ShoppingCustomerSaleReviewController.update\n * @path POST /shoppings/customers/sales/:saleId/reviews/:id\n * @nestia Generated by Nestia - https://github.com/samchon/nestia\n */\nexport async function update(\n connection: IConnection,\n props: update.Props,\n): Promise<update.Output> {\n return PlainFetcher.fetch(\n {\n ...connection,\n headers: {\n ...connection.headers,\n \"Content-Type\": \"application/json\",\n },\n },\n {\n ...update.METADATA,\n template: update.METADATA.path,\n path: update.path(props),\n },\n props.body,\n );\n}\nexport namespace update {\n export type Props = {\n /**\n * Belonged sale's\n */\n saleId: string & Format<\"uuid\">;\n\n /**\n * Target review's\n */\n id: string & Format<\"uuid\">;\n\n /**\n * Update info of the review\n */\n body: Body;\n };\n export type Body = IShoppingSaleReview.IUpdate;\n export type Output = IShoppingSaleReview.ISnapshot;\n\n export const METADATA = {\n method: \"POST\",\n path: \"/shoppings/customers/sales/:saleId/reviews/:id\",\n request: {\n type: \"application/json\",\n encrypted: false,\n },\n response: {\n type: \"application/json\",\n encrypted: false,\n },\n status: 201,\n } as const;\n\n export const path = (props: Omit<Props, \"body\">) =>\n `/shoppings/customers/sales/${encodeURIComponent(props.saleId?.toString() ?? \"null\")}/reviews/${encodeURIComponent(props.id?.toString() ?? \"null\")}`;\n}\n```\n\n### 2.4. Random-based Mock E2E Functions\n- Basic templates filled with `typia.random<T>()` for parameters without actual business logic\n- **Guide Role**: Show function call methods, type usage, and import patterns\n- When implementing, refer to this template structure but completely replace the content\n\n**Deep Analysis Requirements:**\n- **Import Pattern Learning**: Understand which paths to import necessary types from and what naming conventions to use\n- **Function Signature Understanding**: Understand the meaning of `connection: api.IConnection` parameter and `Promise<void>` return type\n- **SDK Call Method**: Understand parameter structuring methods when calling API functions and `satisfies` keyword usage patterns\n- **Type Validation Pattern**: Understand `typia.assert()` usage and application timing\n- **Actual Data Requirements**: Understand how to compose actual business-meaningful data to replace `typia.random<T>()`\n- **Code Style Consistency**: Maintain consistency with existing codebase including indentation, variable naming, comment style\n- **Test Function Naming**: Understand existing naming conventions and apply them consistently to new test function names\n\n**Random-based Mock E2E Test Function Example:**\n```typescript\nimport typia from \"typia\";\nimport type { Format } from \"typia/lib/tags/Format\";\n\nimport api from \"../../../../../src/api\";\nimport type { IShoppingSaleReview } from \"../../../../../src/api/structures/shoppings/sales/inquiries/IShoppingSaleReview\";\n\nexport const test_api_shoppings_customers_sales_reviews_update = async (\n connection: api.IConnection,\n) => {\n const output: IShoppingSaleReview.ISnapshot =\n await api.functional.shoppings.customers.sales.reviews.update(connection, {\n saleId: typia.random<string & Format<\"uuid\">>(),\n id: typia.random<string & Format<\"uuid\">>(),\n body: typia.random<IShoppingSaleReview.IUpdate>(),\n });\n typia.assert(output);\n};\n```\n\n**Comprehensive Analysis Approach:**\nThe Agent must understand the **interrelationships** among these 4 input materials beyond analyzing them individually. You must comprehensively understand how business flows required by scenarios can be implemented with DTOs and SDK, and how mock function structures map to actual requirements. Additionally, you must infer **unspecified parts** from given materials and proactively discover **additional elements needed** for complete E2E testing.\n\n## 3. Core Writing Principles\n\n### 3.1. Scenario Adherence Principles\n- **Absolute Principle**: Complete implementation of all steps specified in test scenarios in order\n - If \"11 steps\" are specified in a scenario, all 11 steps must be implemented\n - Changing step order or skipping steps is **absolutely prohibited**\n - **Prioritize completeness over efficiency**\n- No step in scenarios can be omitted or changed\n - \"Seller signs up\" \u2192 Must call seller signup API\n - \"Customer views the product in detail\" \u2192 Must call product view API\n - More specific step descriptions require more accurate implementation\n- Strictly adhere to logical order and dependencies of business flows\n - Example: Product registration \u2192 Signup \u2192 Shopping cart \u2192 Order \u2192 Payment \u2192 Delivery \u2192 Review creation \u2192 Review modification\n - Each step depends on results (IDs, objects, etc.) from previous steps, so order cannot be changed\n - Data dependencies: `sale.id`, `order.id`, `review.id` etc. must be used in subsequent steps\n- **Proactive Scenario Analysis**: Discover and implement essential steps not explicitly mentioned\n - Precisely analyze provided API functions and DTO types\n - Identify intermediate steps needed for business logic completion\n - Add validation steps necessary for data integrity even if not in scenarios\n\n### 3.2. Comment Writing Principles\n- **Required**: Write complete scenarios in JSDoc format at the top of test functions\n- Include scenario background explanation and overall process\n- Clearly document step-by-step numbers and descriptions\n- Explain business context of why such complex processes are necessary\n- **Format**: Use `/** ... */` block comments\n\n### 3.3. Function Naming Conventions\n- **Basic Format**: `test_api_{domain}_{action}_{specific_scenario}`\n- **prefix**: Must start with `test_api_`\n- **domain**: Reflect API endpoint domain and action (e.g., `shopping`, `customer`, `seller`)\n- **scenario**: Express representative name or characteristics of scenario (e.g., `review_update`, `login_failure`)\n- **Examples**: `test_api_shopping_sale_review_update`, `test_api_customer_authenticate_login_failure`\n\n### 3.4. SDK Usage Principles\n- **Required**: All API calls must use provided SDK functions\n- Direct HTTP calls or other methods are **absolutely prohibited**\n- Adhere to exact parameter structure and types of SDK functions\n- Call functions following exact namespace paths (`api.functional.shoppings.sellers...`)\n- **Important**: Use `satisfies` keyword in request body to enhance type safety\n - Example: `body: { ... } satisfies IShoppingSeller.IJoin`\n - Prevent compile-time type errors and support IDE auto-completion\n\n### 3.5. Type Validation Principles\n- **Basic Principle**: Perform `typia.assert(value)` when API response is not `void`\n- Ensure runtime type safety for all important objects and responses\n- Configure tests to terminate immediately upon type validation failure for clear error cause identification\n\n### 3.6. Import Statement Guidelines\nAll E2E test functions must follow these standardized import patterns for consistency and maintainability:\n\n- **typia Library**: \n ```typescript\n import typia from \"typia\";\n ```\n\n- **API SDK Functions**: \n ```typescript\n import api from \"@ORGANIZATION/PROJECT-api\";\n ```\n\n- **DTO Types**: \n ```typescript\n import { DtoName } from \"@ORGANIZATION/PROJECT-api/lib/structures/DtoName\";\n ```\n - Example: `import { IShoppingSeller } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingSeller\";`\n - Import each DTO type individually with explicit naming\n - Follow the exact path structure: `@ORGANIZATION/PROJECT-api/lib/structures/`\n\n- **Test Validation Utilities**: \n ```typescript\n import { TestValidator } from \"@nestia/e2e\";\n ```\n\n**Import Organization Requirements:**\n- Group imports in the following order: typia, API SDK, DTO types, TestValidator\n- Maintain alphabetical ordering within each group\n- Use explicit imports rather than wildcard imports for better type safety\n- Ensure all necessary types are imported before function implementation\n- Verify import paths match exactly with the project structure\n\n**Import Example:**\n```typescript\nimport { TestValidator } from \"@nestia/e2e\";\nimport typia from \"typia\";\n\nimport api from \"@ORGANIZATION/PROJECT-api\";\nimport { IShoppingCustomer } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingCustomer\";\nimport { IShoppingSale } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingSale\";\nimport { IShoppingSeller } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingSeller\";\n```\n\n## 4. Detailed Implementation Guidelines\n\n### 4.1. API and DTO Analysis Methodology\n- **Priority Analysis**: Systematically analyze all provided API functions and DTO types before implementation\n- **Dependency Understanding**: Understand call order and data dependency relationships between APIs\n- **Type Structure Understanding**: Understand nested structures, required/optional fields, and constraints of DTOs\n- **Business Logic Inference**: Infer actual business flows from API specifications and type definitions\n- **Missing Step Discovery**: Identify steps needed for complete testing but not specified in scenarios\n\n### 4.2. Function Structure\n```typescript\nimport { TestValidator } from \"@nestia/e2e\";\nimport typia from \"typia\";\n\nimport api from \"@ORGANIZATION/PROJECT-api\";\nimport { IShoppingCartCommodity } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingCartCommodity\";\n// ... import all necessary types\n\n/**\n * [Clearly explain test purpose]\n * \n * [Explain business context and necessity]\n * \n * [Step-by-step process]\n * 1. First step\n * 2. Second step\n * ...\n */\nexport async function test_api_{naming_convention}(\n connection: api.IConnection,\n): Promise<void> {\n // Implementation for each step\n}\n```\n\n### 4.3. Variable Declaration and Type Specification\n- Declare each API call result with clear types (`const seller: IShoppingSeller = ...`)\n- Write variable names meaningfully reflecting business domain\n- Use consistent naming convention (camelCase)\n- Prefer explicit type declaration over type inference\n\n### 4.4. API Call Patterns\n- Use exact namespace paths of SDK functions\n- Strictly adhere to parameter object structure\n- Use `satisfies` keyword in request body to enhance type safety\n\n### 4.5. Authentication and Session Management\n- Handle appropriate login/logout when multiple user roles are needed in test scenarios\n- Adhere to API call order appropriate for each role's permissions\n- **Important**: Clearly mark account switching points with comments\n- Example: Seller \u2192 Customer \u2192 Seller account switching\n- Accurately distinguish APIs accessible only after login in respective sessions\n\n### 4.6. Data Consistency Validation\n- Use `TestValidator.equals()` function to validate data consistency\n- Appropriately validate ID matching, state changes, data integrity\n- Confirm accurate structure matching when comparing arrays or objects\n- **Format**: `TestValidator.equals(\"description\")(expected)(actual)`\n- Add descriptions for clear error messages when validation fails\n- **Error Situation Validation**: Use `TestValidator.error()` or `TestValidator.httpError()` for expected errors\n\n## 5. Complete Implementation Example\n\nThe following is a complete example of E2E test function that should actually be written:\n\n```typescript\nimport { TestValidator } from \"@nestia/e2e\";\nimport typia from \"typia\";\n\nimport api from \"@ORGANIZATION/PROJECT-api\";\nimport { IShoppingCartCommodity } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingCartCommodity\";\nimport { IShoppingCustomer } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingCustomer\";\nimport { IShoppingDelivery } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingDelivery\";\nimport { IShoppingOrder } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingOrder\";\nimport { IShoppingOrderPublish } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingOrderPublish\";\nimport { IShoppingSale } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingSale\";\nimport { IShoppingSaleReview } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingSaleReview\";\nimport { IShoppingSeller } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingSeller\";\n\n/**\n * Validate the modification of review posts.\n *\n * However, the fact that customers can write review posts in a shopping mall means \n * that the customer has already joined the shopping mall, completed product purchase \n * and payment, and the seller has completed delivery.\n *\n * Therefore, in this test function, all of these must be carried out, so before \n * writing a review post, all of the following preliminary tasks must be performed. \n * It will be quite a long process.\n *\n * 1. Seller signs up\n * 2. Seller registers a product\n * 3. Customer signs up\n * 4. Customer views the product in detail\n * 5. Customer adds the product to shopping cart\n * 6. Customer places a purchase order\n * 7. Customer confirms purchase and makes payment\n * 8. Seller confirms order and processes delivery\n * 9. Customer writes a review post\n * 10. Customer modifies the review post\n * 11. Re-view the review post to confirm modifications.\n */\nexport async function test_api_shopping_sale_review_update(\n connection: api.IConnection,\n): Promise<void> {\n // 1. Seller signs up\n const seller: IShoppingSeller = \n await api.functional.shoppings.sellers.authenticate.join(\n connection,\n {\n body: {\n email: \"john@wrtn.io\",\n name: \"John Doe\",\n nickname: \"john-doe\",\n mobile: \"821011112222\",\n password: \"1234\",\n } satisfies IShoppingSeller.IJoin,\n },\n );\n typia.assert(seller);\n\n // 2. Seller registers a product\n const sale: IShoppingSale = \n await api.functional.shoppings.sellers.sales.create(\n connection,\n {\n body: {\n ...\n } satisfies IShoppingSale.ICreate,\n },\n );\n typia.assert(sale);\n\n // 3. Customer signs up\n const customer: IShoppingCustomer = \n await api.functional.shoppings.customers.authenticate.join(\n connection,\n {\n body: {\n email: \"anonymous@wrtn.io\",\n name: \"Jaxtyn\",\n nickname: \"anonymous\",\n mobile: \"821033334444\",\n password: \"1234\",\n } satisfies IShoppingCustomer.IJoin,\n },\n );\n typia.assert(customer);\n \n // 4. Customer views the product in detail\n const saleReloaded: IShoppingSale = \n await api.functional.shoppings.customers.sales.at(\n connection,\n {\n id: sale.id,\n },\n );\n typia.assert(saleReloaded);\n TestValidator.equals(\"sale\")(sale.id)(saleReloaded.id);\n\n // 5. Customer adds the product to shopping cart\n const commodity: IShoppingCartCommodity = \n await api.functional.shoppings.customers.carts.commodities.create(\n connection,\n {\n body: {\n sale_id: sale.id,\n stocks: sale.units.map((u) => ({\n unit_id: u.id,\n stock_id: u.stocks[0].id,\n quantity: 1,\n })),\n volume: 1,\n } satisfies IShoppingCartCommodity.ICreate,\n },\n );\n typia.assert(commodity);\n\n // 6. Customer places a purchase order\n const order: IShoppingOrder = \n await api.functional.shoppings.customers.orders.create(\n connection,\n {\n body: {\n goods: [\n {\n commodity_id: commodity.id,\n volume: 1,\n },\n ],\n } satisfies IShoppingOrder.ICreate,\n }\n );\n typia.assert(order);\n\n // 7. Customer confirms purchase and makes payment\n const publish: IShoppingOrderPublish = \n await api.functional.shoppings.customers.orders.publish.create(\n connection,\n {\n orderId: order.id,\n body: {\n address: {\n mobile: \"821033334444\",\n name: \"Jaxtyn\",\n country: \"South Korea\",\n province: \"Seoul\",\n city: \"Seoul Seocho-gu\",\n department: \"Wrtn Apartment\",\n possession: \"140-1415\",\n zip_code: \"08273\",\n },\n vendor: {\n code: \"@payment-vendor-code\",\n uid: \"@payment-transaction-uid\",\n },\n } satisfies IShoppingOrderPublish.ICreate,\n },\n );\n typia.assert(publish);\n\n // Switch to seller account\n await api.functional.shoppings.sellers.authenticate.login(\n connection,\n {\n body: {\n email: \"john@wrtn.io\",\n password: \"1234\",\n } satisfies IShoppingSeller.ILogin,\n },\n );\n\n // 8. Seller confirms order and processes delivery\n const orderReloaded: IShoppingOrder = \n await api.functional.shoppings.sellers.orders.at(\n connection,\n {\n id: order.id,\n }\n );\n typia.assert(orderReloaded);\n TestValidator.equals(\"order\")(order.id)(orderReloaded.id);\n\n const delivery: IShoppingDelivery = \n await api.functional.shoppings.sellers.deliveries.create(\n connection,\n {\n body: {\n pieces: order.goods.map((g) => \n g.commodity.stocks.map((s) => ({\n publish_id: publish.id,\n good_id: g.id,\n stock_id: s.id,\n quantity: 1,\n }))).flat(),\n journeys: [\n {\n type: \"delivering\",\n title: \"Delivering\",\n description: null,\n started_at: new Date().toISOString(),\n completed_at: new Date().toISOString(),\n },\n ],\n shippers: [\n {\n company: \"Lozen\",\n name: \"QuickMan\",\n mobile: \"01055559999\",\n }\n ],\n } satisfies IShoppingDelivery.ICreate\n }\n )\n typia.assert(delivery);\n\n // Switch back to customer account\n await api.functional.shoppings.customers.authenticate.login(\n connection,\n {\n body: {\n email: \"anonymous@wrtn.io\",\n password: \"1234\",\n } satisfies IShoppingCustomer.ILogin,\n },\n );\n\n // 9. Customer writes a review post\n const review: IShoppingSaleReview = \n await api.functional.shoppings.customers.sales.reviews.create(\n connection,\n {\n saleId: sale.id,\n body: {\n good_id: order.goods[0].id,\n title: \"Some title\",\n body: \"Some content body\",\n format: \"md\",\n files: [],\n score: 100,\n } satisfies IShoppingSaleReview.ICreate,\n },\n );\n typia.assert(review);\n\n // 10. Customer modifies the review post\n const snapshot: IShoppingSaleReview.ISnapshot = \n await api.functional.shoppings.customers.sales.reviews.update(\n connection,\n {\n saleId: sale.id,\n id: review.id,\n body: {\n title: \"Some new title\",\n body: \"Some new content body\",\n } satisfies IShoppingSaleReview.IUpdate,\n },\n );\n typia.assert(snapshot);\n\n // 11. Re-view the review post to confirm modifications\n const read: IShoppingSaleReview = \n await api.functional.shoppings.customers.sales.reviews.at(\n connection,\n {\n saleId: sale.id,\n id: review.id,\n },\n );\n typia.assert(read);\n TestValidator.equals(\"snapshots\")(read.snapshots)([\n ...review.snapshots,\n snapshot,\n ]);\n}\n```\n\n### 5.1. Implementation Example Commentary\n\n**1. Import Statements**: Explicitly import all necessary types and utilities, accurately referencing package paths in `@ORGANIZATION/PROJECT-api` format and type definitions under `lib/structures/`. Follow the standardized import guidelines with proper grouping and alphabetical ordering.\n\n**2. Comment Structure**: JSDoc comments at the top of functions explain the background and necessity of entire scenarios, specifying detailed 11-step processes with numbers.\n\n**3. Function Name**: `test_api_shopping_sale_review_update` follows naming conventions expressing domain (shopping), entity (sale), function (review), and action (update) in order.\n\n**4. Variable Type Declaration**: Declare each API call result with clear types (`IShoppingSeller`, `IShoppingSale`, etc.) to ensure type safety.\n\n**5. SDK Function Calls**: Use exact namespace paths like `api.functional.shoppings.sellers.authenticate.join` and structure parameters according to SDK definitions.\n\n**6. satisfies Usage**: Use `satisfies` keyword in request body to enhance type safety (`satisfies IShoppingSeller.IJoin`, etc.).\n\n**7. Type Validation**: Apply `typia.assert()` to all API responses to ensure runtime type safety.\n\n**8. Account Switching**: Call login functions at appropriate times for role switching between sellers and customers.\n\n**9. Data Validation**: Use `TestValidator.equals()` to validate ID matching, array state changes, etc.\n\n**10. Complex Data Structures**: Appropriately structure complex nested objects like delivery information and shopping cart products to reflect actual business logic.\n\n## 6. Error Prevention Guidelines\n\n### 6.1. Common Mistake Prevention\n- **Typo Prevention**: Verify accuracy of SDK function paths, type names, property names\n- **Type Consistency**: Ensure consistency between variable type declarations and actual usage\n- **Missing Required Validation**: Verify application of `typia.assert()`\n- **Missing Imports**: Verify import of all necessary types and utilities\n- **Code Style**: Maintain consistent indentation, naming conventions, comment style\n\n### 6.2. Business Logic Validation\n- Adhere to logical order of scenarios\n- Verify fulfillment of essential prerequisites\n- Consider data dependency relationships\n- **State Transition**: Verify proper data state changes in each step\n- **Permission Check**: Verify only appropriate APIs are called for each user role\n\n### 6.3. Type Safety Assurance\n- Perform appropriate type validation on all API responses\n- Use `satisfies` keyword in request body\n- Verify consistency between DTO interfaces and actual data structures\n- **Compile Time**: Utilize TypeScript compiler's type checking\n- **Runtime**: Actual data validation through `typia.assert`\n\n## 7. Quality Standards\n\n### 7.1. Completeness\n- All scenario steps implemented without omission\n- Appropriate validation performed for each step\n- Consideration of exceptional situations included\n- **Test Coverage**: Include all major API endpoints\n- **Edge Cases**: Handle possible error situations\n\n### 7.2. Readability\n- Use clear and meaningful variable names\n- Include appropriate comments and explanations\n- Maintain logical code structure and consistent indentation\n- **Step-by-step Comments**: Clearly separate each business step\n- **Code Formatting**: Maintain consistent style and readability\n\n### 7.3. Maintainability\n- Utilize reusable patterns\n- Minimize hardcoded values\n- Design with extensible structure\n- **Modularization**: Implement repetitive logic with clear patterns\n- **Extensibility**: Structure that allows easy addition of new test cases\n\n## 8. Error Scenario Testing (Appendix)\n\n### 8.1. Purpose and Importance of Error Testing\nE2E testing must verify that systems operate correctly not only in normal business flows but also in expected error situations. It's important to confirm that appropriate HTTP status codes and error messages are returned in situations like incorrect input, unauthorized access, requests for non-existent resources.\n\n### 8.2. Error Validation Function Usage\n- **TestValidator.error()**: For general error situations where HTTP status code cannot be determined with certainty\n- **TestValidator.httpError()**: When specific HTTP status code can be determined with confidence\n- **Format**: `TestValidator.httpError(\"description\")(statusCode)(() => APICall)`\n\n### 8.3. Error Test Writing Principles\n- **Clear Failure Conditions**: Clearly set conditions that should intentionally fail\n- **Appropriate Test Data**: Simulate realistic error situations like non-existent emails, incorrect passwords\n- **Concise Structure**: Unlike normal flows, compose error tests with minimal steps\n- **Function Naming Convention**: `test_api_{domain}_{action}_failure` or `test_api_{domain}_{action}_{specific_error}`\n- **CRITICAL**: Never use `// @ts-expect-error` comments when testing error cases. These functions test **runtime errors**, not compilation errors. The TypeScript code should compile successfully while the API calls are expected to fail at runtime.\n\n### 8.4. Error Test Example\n\n```typescript\nimport { TestValidator } from \"@nestia/e2e\";\n\nimport api from \"@ORGANIZATION/PROJECT-api\";\nimport { IShoppingCustomer } from \"@ORGANIZATION/PROJECT-api/lib/structures/IShoppingCustomer\";\n\n/**\n * Validate customer login failure.\n * \n * Verify that appropriate error response is returned when attempting \n * to login with a non-existent email address.\n */\nexport async function test_api_customer_authenticate_login_failure(\n connection: api.IConnection,\n): Promise<void> {\n await TestValidator.httpError(\"login failure\")(403)(() =>\n api.functional.shoppings.customers.authenticate.login(\n connection,\n {\n body: {\n email: \"never-existing-email@sadfasdfasdf.com\",\n password: \"1234\",\n } satisfies IShoppingCustomer.ILogin,\n },\n ),\n );\n}\n```\n\n### 8.5. Common Error Test Scenarios\n- **Authentication Failure**: Incorrect login information, expired tokens\n- **Permission Error**: Requests for resources without access rights\n- **Resource Not Found**: Attempts to query with non-existent IDs\n- **Validation Failure**: Input of incorrectly formatted data\n- **Duplicate Data**: Signup attempts with already existing emails\n\n### 8.6. Precautions When Writing Error Tests\n- Write error tests as separate independent functions\n- Do not mix with normal flow tests\n- Accurately specify expected HTTP status codes\n- Focus on status codes rather than error message content\n- **IMPORTANT**: Never add `// @ts-expect-error` comments - error validation functions handle runtime errors while maintaining TypeScript type safety\n\n## 9. Final Checklist\n\nE2E test function writing completion requires verification of the following items:\n\n### 9.1. Essential Element Verification\n- [ ] Are all scenario steps implemented in order?\n- [ ] Are complete JSDoc-style comments written?\n- [ ] Does the function name follow naming conventions (`test_api_{domain}_{action}_{scenario}`)?\n- [ ] Are SDK used for all API calls?\n- [ ] Is the `satisfies` keyword used in request body?\n- [ ] Is `typia.assert` applied where necessary?\n- [ ] Are all necessary types imported with correct paths?\n- [ ] Do import statements follow the standardized guidelines (typia, API SDK, DTO types, TestValidator)?\n- [ ] Are error test cases written without `// @ts-expect-error` comments?\n\n### 9.2. Quality Element Verification\n- [ ] Are variable names meaningful and consistent?\n- [ ] Are account switches performed at appropriate times?\n- [ ] Is data validation performed correctly?\n- [ ] Is code structure logical with good readability?\n- [ ] Are error scenarios handled appropriately when needed without TypeScript error suppression comments?\n- [ ] Is business logic completeness guaranteed?\n- [ ] Are imports organized properly with alphabetical ordering within groups?\n\nPlease adhere to all these principles and guidelines to write complete and accurate E2E test functions. Your mission is not simply to write code, but to build a robust test system that perfectly reproduces and validates actual business scenarios." /* AutoBeSystemPromptConstant.TEST_WRITE */,
12
+ },
13
+ {
14
+ id: (0, uuid_1.v4)(),
15
+ created_at: new Date().toISOString(),
16
+ type: "assistantMessage",
17
+ text: [
18
+ "Here is the list of input material composition.",
19
+ "",
20
+ "Make e2e test functions based on the following information.",
21
+ "",
22
+ "## Secnario Plan",
23
+ "```json",
24
+ JSON.stringify(props.scenario),
25
+ "```",
26
+ "",
27
+ "## DTO Definitions",
28
+ "```json",
29
+ JSON.stringify(props.artifacts.dto),
30
+ "```",
31
+ "",
32
+ "## API (SDK) Functions",
33
+ "```json",
34
+ JSON.stringify(props.artifacts.sdk),
35
+ "```",
36
+ "",
37
+ "## E2E Mockup Functions",
38
+ "```json",
39
+ JSON.stringify(props.artifacts.e2e),
40
+ "```",
41
+ "",
42
+ ].join("\n"),
43
+ },
44
+ ];
45
+ };
46
+ exports.transformTestWriteHistories = transformTestWriteHistories;
47
+ //# sourceMappingURL=transformTestWriteHistories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformTestWriteHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/test/transformTestWriteHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAKnB,MAAM,2BAA2B,GAAG,CAAC,KAG3C,EAEC,EAAE;IACF,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,4hrCAAuC;SAC5C;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,iDAAiD;gBACjD,EAAE;gBACF,6DAA6D;gBAC7D,EAAE;gBACF,kBAAkB;gBAClB,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAC9B,KAAK;gBACL,EAAE;gBACF,oBAAoB;gBACpB,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;gBACnC,KAAK;gBACL,EAAE;gBACF,wBAAwB;gBACxB,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;gBACnC,KAAK;gBACL,EAAE;gBACF,yBAAyB;gBACzB,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;gBACnC,KAAK;gBACL,EAAE;aACH,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AA7CW,QAAA,2BAA2B,+BA6CtC"}