@autobe/agent 0.10.0 → 0.10.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 (52) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +1 -0
  2. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  3. package/lib/factory/createAutoBeApplication.js +0 -10
  4. package/lib/factory/createAutoBeApplication.js.map +1 -1
  5. package/lib/index.mjs +490 -792
  6. package/lib/index.mjs.map +1 -1
  7. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +0 -4
  8. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  9. package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -2
  10. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  11. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +0 -2
  12. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  13. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +0 -8
  14. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  15. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +0 -6
  16. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  17. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +0 -68
  18. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  19. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +0 -6
  20. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  21. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +0 -50
  22. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  23. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +0 -58
  24. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  25. package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
  26. package/lib/orchestrate/realize/orchestrateRealize.js +25 -56
  27. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  28. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +1 -1
  29. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +4 -15
  30. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
  31. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +6 -0
  32. package/lib/orchestrate/test/orchestrateTestCorrect.js +0 -8
  33. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  34. package/lib/orchestrate/test/orchestrateTestScenario.js +0 -16
  35. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  36. package/lib/orchestrate/test/orchestrateTestWrite.js +0 -15
  37. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  38. package/lib/orchestrate/test/transformTestWriteHistories.js +0 -7
  39. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  40. package/package.json +8 -12
  41. package/src/constants/AutoBeSystemPromptConstant.ts +1 -0
  42. package/src/orchestrate/realize/orchestrateRealize.ts +48 -88
  43. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +5 -13
  44. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +10 -0
  45. package/lib/orchestrate/realize/orchestrateRealizeIntegrator.d.ts +0 -52
  46. package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js +0 -57
  47. package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js.map +0 -1
  48. package/lib/orchestrate/realize/orchestrateRealizeValidator.d.ts +0 -46
  49. package/lib/orchestrate/realize/orchestrateRealizeValidator.js +0 -37
  50. package/lib/orchestrate/realize/orchestrateRealizeValidator.js.map +0 -1
  51. package/src/orchestrate/realize/orchestrateRealizeIntegrator.ts +0 -75
  52. package/src/orchestrate/realize/orchestrateRealizeValidator.ts +0 -64
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.orchestrateRealizeValidator = void 0;
13
- /**
14
- * Validates the integrated provider logic by returning the generated source
15
- * code along with the summary of test execution results.
16
- *
17
- * This function serves as the final step to:
18
- *
19
- * - Provide the full TypeScript implementation files created/updated during
20
- * integration.
21
- * - Return a detailed summary of the automated test outcomes executed against
22
- * that code.
23
- *
24
- * It does not throw errors; all failures or exceptions are reported via the
25
- * `result` property.
26
- *
27
- * @param ctx - AutoBE execution context
28
- * @param props - Result from the integration step
29
- * @returns An object containing provider file content and test results
30
- */
31
- const orchestrateRealizeValidator = (ctx, props) => __awaiter(void 0, void 0, void 0, function* () {
32
- ctx;
33
- props;
34
- return null;
35
- });
36
- exports.orchestrateRealizeValidator = orchestrateRealizeValidator;
37
- //# sourceMappingURL=orchestrateRealizeValidator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"orchestrateRealizeValidator.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealizeValidator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAmCA;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,2BAA2B,GAAG,CAGzC,GAAyB,EACzB,KAA8B,EACG,EAAE;IACnC,GAAG,CAAC;IACJ,KAAK,CAAC;IAEN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AAVW,QAAA,2BAA2B,+BAUtC"}
@@ -1,75 +0,0 @@
1
- import { ILlmSchema } from "@samchon/openapi";
2
-
3
- import { AutoBeContext } from "../../context/AutoBeContext";
4
- import { IAutoBeRealizeCoderApplication } from "./structures/IAutoBeRealizeCoderApplication";
5
-
6
- /**
7
- * The result of integrating the generated code into the actual application
8
- * files (e.g., controller).
9
- */
10
- export interface RealizeIntegratorOutput {
11
- /**
12
- * Indicates the result of the integration process.
13
- *
14
- * - "success": The function was correctly inserted, imported, and passed
15
- * compilation.
16
- * - "fail": The integration did not complete (e.g., target controller not
17
- * found, syntax error).
18
- * - "exception": An unexpected error occurred (e.g., I/O failure, invalid
19
- * context state).
20
- */
21
- result: "success" | "fail" | "exception";
22
- }
23
-
24
- /**
25
- * Integrates the generated function into an appropriate controller file,
26
- * handling insertion, import, and static validation.
27
- *
28
- * This function performs the following steps:
29
- *
30
- * 1. **Locate appropriate controller file**
31
- *
32
- * - Usually matches `*.controller.ts`
33
- * - May be based on inferred target (e.g., from functionName or folder structure)
34
- * 2. **Insert the generated function into the file content**
35
- *
36
- * - Ensures proper placement, such as inside a class or export block
37
- * - May replace or append to existing function stubs
38
- * 3. **Inject required imports automatically**
39
- *
40
- * - Identifies any missing imports (e.g., DTOs, utility functions)
41
- * - Ensures imports are added without duplication
42
- * 4. **Check for compile-time safety**
43
- *
44
- * - Ensures TypeScript type-checking passes
45
- * - Verifies that Nestia-generated routers still function without error
46
- * - If compilation fails or static types are invalid, marks result as `"fail"`
47
- *
48
- * ⚠️ Note: This step **must not rely on runtime execution**. It only guarantees
49
- * static, structural validity (i.e., valid TypeScript).
50
- *
51
- * @param ctx - AutoBE context including current source files and settings
52
- * @param props - Output from the code generation step to be integrated
53
- * @returns Integration status, indicating success or failure of insertion
54
- */
55
- export const orchestrateRealizeIntegrator = async <
56
- Model extends ILlmSchema.Model,
57
- >(
58
- ctx: AutoBeContext<Model>,
59
- props: IAutoBeRealizeCoderApplication.RealizeCoderOutput,
60
- ): Promise<RealizeIntegratorOutput> => {
61
- props;
62
-
63
- const controllers: [string, string][] = Object.entries(
64
- ctx.state().interface?.files ?? {},
65
- ).filter(([filename]) => {
66
- return filename.endsWith("controller.ts");
67
- });
68
-
69
- // Placeholder: insert props.implementationCode into selected controller
70
- // Inject necessary import statements for used types/functions
71
- // Optionally run TypeScript compiler in dry-run mode to validate correctness
72
- controllers;
73
-
74
- return null!;
75
- };
@@ -1,64 +0,0 @@
1
- import { ILlmSchema } from "@samchon/openapi";
2
-
3
- import { AutoBeContext } from "../../context/AutoBeContext";
4
- import { RealizeIntegratorOutput } from "./orchestrateRealizeIntegrator";
5
-
6
- /**
7
- * The result of validating the integrated code by running tests or static
8
- * checks.
9
- */
10
- export interface RealizeValidatorOutput {
11
- /** File path or location of the generated provider logic file. */
12
- location: string;
13
-
14
- /** The full TypeScript source code content of the generated provider file. */
15
- content: string;
16
-
17
- /**
18
- * Overall result of the test execution.
19
- *
20
- * - "success": All tests passed successfully.
21
- * - "fail": Some tests failed.
22
- * - "exception": An unexpected error occurred during test execution.
23
- */
24
- result: "success" | "fail" | "exception";
25
-
26
- /** Total number of test cases executed. */
27
- total: number;
28
-
29
- /** Number of tests that passed. */
30
- success: number;
31
-
32
- /** Number of tests that failed. */
33
- fail: number;
34
- }
35
-
36
- /**
37
- * Validates the integrated provider logic by returning the generated source
38
- * code along with the summary of test execution results.
39
- *
40
- * This function serves as the final step to:
41
- *
42
- * - Provide the full TypeScript implementation files created/updated during
43
- * integration.
44
- * - Return a detailed summary of the automated test outcomes executed against
45
- * that code.
46
- *
47
- * It does not throw errors; all failures or exceptions are reported via the
48
- * `result` property.
49
- *
50
- * @param ctx - AutoBE execution context
51
- * @param props - Result from the integration step
52
- * @returns An object containing provider file content and test results
53
- */
54
- export const orchestrateRealizeValidator = async <
55
- Model extends ILlmSchema.Model,
56
- >(
57
- ctx: AutoBeContext<Model>,
58
- props: RealizeIntegratorOutput,
59
- ): Promise<RealizeValidatorOutput> => {
60
- ctx;
61
- props;
62
-
63
- return null!;
64
- };