@autobe/agent 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/lib/AutoBeAgent.js +25 -6
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +3 -3
  4. package/lib/context/AutoBeContext.d.ts +2 -2
  5. package/lib/context/IAutoBeApplicationProps.d.ts +6 -0
  6. package/lib/factory/createAgenticaHistory.js +1 -0
  7. package/lib/factory/createAgenticaHistory.js.map +1 -1
  8. package/lib/factory/createAutoBeApplication.js +16 -16
  9. package/lib/factory/createAutoBeApplication.js.map +1 -1
  10. package/lib/index.mjs +4608 -4644
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.d.ts +4 -8
  13. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.js +10 -2
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -0
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -0
  16. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +9 -0
  17. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +3 -0
  18. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +1 -0
  19. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.d.ts +1 -1
  20. package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.js +5 -0
  21. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -0
  22. package/lib/orchestrate/{orchestrateAnalyze.d.ts → analyze/orchestrateAnalyze.d.ts} +2 -2
  23. package/lib/orchestrate/{orchestrateAnalyze.js → analyze/orchestrateAnalyze.js} +101 -38
  24. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
  25. package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  26. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  27. package/lib/orchestrate/index.d.ts +3 -3
  28. package/lib/orchestrate/index.js +6 -6
  29. package/lib/orchestrate/index.js.map +1 -1
  30. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +5 -0
  31. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  32. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +3 -0
  33. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  34. package/lib/orchestrate/interface/transformInterfaceHistories.js +15 -0
  35. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  36. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +764 -915
  37. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  38. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +7 -0
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  40. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +10 -1
  41. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +1 -1
  42. package/lib/orchestrate/prisma/transformPrismaHistories.js +9 -0
  43. package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
  44. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -1
  45. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  46. package/lib/structures/IAutoBeVendor.d.ts +45 -2
  47. package/package.json +6 -6
  48. package/src/AutoBeAgent.ts +32 -3
  49. package/src/constants/AutoBeSystemPromptConstant.ts +3 -3
  50. package/src/context/AutoBeContext.ts +2 -2
  51. package/src/context/IAutoBeApplicationProps.ts +6 -0
  52. package/src/factory/createAgenticaHistory.ts +1 -0
  53. package/src/factory/createAutoBeApplication.ts +1 -1
  54. package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.ts +20 -15
  55. package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +10 -0
  56. package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.ts +7 -2
  57. package/src/orchestrate/{orchestrateAnalyze.ts → analyze/orchestrateAnalyze.ts} +43 -24
  58. package/src/orchestrate/index.ts +3 -3
  59. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +5 -0
  60. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +3 -0
  61. package/src/orchestrate/interface/transformInterfaceHistories.ts +15 -0
  62. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +112 -79
  63. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +7 -0
  64. package/src/orchestrate/prisma/transformPrismaCorrectHistories.ts +9 -0
  65. package/src/orchestrate/prisma/transformPrismaHistories.ts +9 -0
  66. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +7 -0
  67. package/src/structures/IAutoBeVendor.ts +48 -2
  68. package/lib/analyze/AnalyzeAgent.d.ts +0 -24
  69. package/lib/analyze/AnalyzeAgent.js +0 -942
  70. package/lib/analyze/AnalyzeAgent.js.map +0 -1
  71. package/lib/analyze/AutoBeAnalyzeAgent.js.map +0 -1
  72. package/lib/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
  73. package/lib/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
  74. package/lib/orchestrate/orchestrateAnalyze.js.map +0 -1
  75. package/src/analyze/AnalyzeAgent.ts +0 -183
  76. /package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.d.ts +0 -0
  77. /package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.js +0 -0
  78. /package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.ts +0 -0
@@ -1,3 +1,49 @@
1
- import { IAgenticaVendor } from "@agentica/core";
1
+ import OpenAI from "openai";
2
2
 
3
- export type IAutoBeVendor = IAgenticaVendor;
3
+ /**
4
+ * LLM service vendor for Agentica Chat.
5
+ *
6
+ * `IAgenticaVendor` is a type represents an LLM (Large Language Model) vendor
7
+ * of the {@link AutoBeAgent}.
8
+ *
9
+ * Currently, {@link AutoBeAgent} supports OpenAI SDK. However, it does not mean
10
+ * that you can use only OpenAI's GPT model in the {@link AutoBeAgent}. The
11
+ * OpenAI SDK is just a connection tool to the LLM vendor's API, and you can use
12
+ * other LLM vendors by configuring its `baseURL` and API key.
13
+ *
14
+ * Therefore, if you want to use another LLM vendor like Claude or Gemini,
15
+ * please configure the `baseURL` to the {@link api}, and set
16
+ * {@link IAutoBeProps.model schema model} as "cluade" or "gemini".
17
+ *
18
+ * @author Samchon
19
+ */
20
+ export interface IAutoBeVendor {
21
+ /** OpenAI API instance. */
22
+ api: OpenAI;
23
+
24
+ /**
25
+ * Chat model to be used.
26
+ *
27
+ * `({}) & string` means to support third party hosting cloud(eg. openRouter,
28
+ * aws)
29
+ */
30
+ model: OpenAI.ChatModel | ({} & string);
31
+
32
+ /** Options for the request. */
33
+ options?: OpenAI.RequestOptions | undefined;
34
+
35
+ /**
36
+ * Number of concurrent requests allowed.
37
+ *
38
+ * If you configure this property, {@link AutoBeAgent} will constrain the
39
+ * number of concurrent requests to the LLM vendor. If you want to share the
40
+ * semaphore instance with other agents, you can directly assign the
41
+ * {@link Semaphore} instance to this property.
42
+ *
43
+ * Otherwise, it will not limit the number of concurrent requests, and the
44
+ * {@link AutoBeAgent} will send requests asynchronously without any limit.
45
+ *
46
+ * @default 16
47
+ */
48
+ semaphore?: number | undefined;
49
+ }
@@ -1,24 +0,0 @@
1
- import { ILlmSchema } from "@samchon/openapi";
2
- import { IPointer } from "tstl";
3
- import { AutoBeContext } from "../context/AutoBeContext";
4
- import { AutoBeAnalyzeReviewer } from "./AutoBeAnalyzeReviewer";
5
- type Filename = string;
6
- type FileContent = string;
7
- export declare class AnalyzeAgent<Model extends ILlmSchema.Model> {
8
- private readonly createReviewerAgentFn;
9
- private readonly ctx;
10
- private readonly pointer;
11
- private readonly createInnerAgent;
12
- private readonly fileMap;
13
- constructor(createReviewerAgentFn: typeof AutoBeAnalyzeReviewer, ctx: AutoBeContext<Model>, pointer: IPointer<{
14
- files: Record<Filename, FileContent>;
15
- } | null>);
16
- /**
17
- * Conversate with planner agent
18
- *
19
- * @param content Conversation from user in this time.
20
- * @returns
21
- */
22
- conversate(content: string): Promise<string>;
23
- }
24
- export {};