Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Update log type

Tomas Valenta2fe023e9cdfd
diff --git a/db/types.ts b/db/types.ts
index e0d56c805..1e2308ebb 100644
--- a/db/types.ts
+++ b/db/types.ts
@@ -1,11 +1,27 @@
-export interface ThoughtLog {
- type: 'thought'
+export enum LogType {
+ Thought = 'thought',
+ Tool = 'tool',
+}
+
+export enum LogName {
+ InstallNPMDependencies = 'InstallNPMDependencies',
+ RunJavaScriptCode = 'RunJavaScriptCode',
+ CurlJavaScriptServer = 'CurlJavaScriptServer',
+}
+
+interface BaseLog {
+ id: string
+ type: LogType
+}
+
+export interface ThoughtLog extends BaseLog {
content: string
+ type: LogType.Thought,
}
-export interface ToolLog {
- type: 'tool'
- name: string
+export interface ToolLog extends BaseLog {
+ type: LogType.Tool
+ name: LogName
input: string
finish_at?: Date
output?: string