openbot 0.1.17 → 0.1.18
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/dist/agent.js +3 -2
- package/dist/cli.js +1 -1
- package/dist/handlers/init.js +1 -139
- package/dist/ui/layout.js +4 -0
- package/dist/ui/navigation.js +16 -0
- package/dist/ui/sidebar.js +9 -0
- package/dist/ui/thread.js +11 -0
- package/package.json +5 -4
package/dist/agent.js
CHANGED
|
@@ -53,7 +53,7 @@ export async function createOpenBot(options) {
|
|
|
53
53
|
const baseDir = config.baseDir || DEFAULT_BASE_DIR;
|
|
54
54
|
const resolvedBaseDir = resolvePath(baseDir);
|
|
55
55
|
// Parse model configuration
|
|
56
|
-
const { provider, modelId } = parseModelString(config.model || "gpt-
|
|
56
|
+
const { provider, modelId } = parseModelString(config.model || "gpt-5-nano");
|
|
57
57
|
// Tool definitions shared by both providers
|
|
58
58
|
const toolDefinitions = {
|
|
59
59
|
...shellToolDefinitions,
|
|
@@ -88,7 +88,8 @@ export async function createOpenBot(options) {
|
|
|
88
88
|
.use(browserPlugin({
|
|
89
89
|
headless: true, // Set to false once to log in manually if needed
|
|
90
90
|
userDataDir: userDataDir,
|
|
91
|
-
channel: 'chrome'
|
|
91
|
+
channel: 'chrome',
|
|
92
|
+
model: model
|
|
92
93
|
}))
|
|
93
94
|
.use(fileSystemPlugin({
|
|
94
95
|
baseDir: "/", // Global access
|
package/dist/cli.js
CHANGED
package/dist/handlers/init.js
CHANGED
|
@@ -1,146 +1,8 @@
|
|
|
1
|
+
import { layoutUI } from "../ui/layout.js";
|
|
1
2
|
/**
|
|
2
3
|
* Initial application layout handler
|
|
3
4
|
*/
|
|
4
5
|
export async function* initHandler(event) {
|
|
5
|
-
const thredUI = {
|
|
6
|
-
type: "thread",
|
|
7
|
-
props: {
|
|
8
|
-
placeholder: "Ask me anything about your system or projects...",
|
|
9
|
-
welcomeTitle: "OpenBot System Agent",
|
|
10
|
-
welcomeMessage: "I'm your global system assistant. I have access to your file system and shell. How can I help you today?",
|
|
11
|
-
suggestions: [
|
|
12
|
-
"What is in my current directory?",
|
|
13
|
-
"Check system status",
|
|
14
|
-
"Who am I?",
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
const navigationUI = {
|
|
19
|
-
type: "list",
|
|
20
|
-
props: {
|
|
21
|
-
gap: "sm",
|
|
22
|
-
padding: "sm",
|
|
23
|
-
},
|
|
24
|
-
children: [
|
|
25
|
-
{
|
|
26
|
-
type: "listItem",
|
|
27
|
-
props: {
|
|
28
|
-
onClickAction: {
|
|
29
|
-
type: "client:navigate",
|
|
30
|
-
data: {
|
|
31
|
-
path: "/some-url",
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
children: [
|
|
36
|
-
{
|
|
37
|
-
type: "icon",
|
|
38
|
-
props: {
|
|
39
|
-
name: "🏠"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
type: "listItem",
|
|
46
|
-
props: {
|
|
47
|
-
onClickAction: {
|
|
48
|
-
type: "client:navigate",
|
|
49
|
-
data: {
|
|
50
|
-
path: "/some-other-url",
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
children: [
|
|
55
|
-
{
|
|
56
|
-
type: "icon",
|
|
57
|
-
props: {
|
|
58
|
-
name: "⚙️"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
};
|
|
65
|
-
const browserMonitorUI = {
|
|
66
|
-
type: "card",
|
|
67
|
-
props: {
|
|
68
|
-
title: "Browser Manager",
|
|
69
|
-
subtitle: "Manage open tabs & memory",
|
|
70
|
-
padding: "sm",
|
|
71
|
-
width: "300px",
|
|
72
|
-
},
|
|
73
|
-
children: [
|
|
74
|
-
{
|
|
75
|
-
type: "col",
|
|
76
|
-
props: { gap: "sm" },
|
|
77
|
-
children: [
|
|
78
|
-
{
|
|
79
|
-
type: "text",
|
|
80
|
-
props: {
|
|
81
|
-
value: "Status: Persistent session active",
|
|
82
|
-
size: "xs",
|
|
83
|
-
color: "muted"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
type: "row",
|
|
88
|
-
props: { gap: "xs", justify: "end" },
|
|
89
|
-
children: [
|
|
90
|
-
{
|
|
91
|
-
type: "button",
|
|
92
|
-
props: {
|
|
93
|
-
label: "Refresh",
|
|
94
|
-
size: "xs",
|
|
95
|
-
variant: "outline",
|
|
96
|
-
onClickAction: {
|
|
97
|
-
type: "browser:poll_state", // Sends this event to the server
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
type: "button",
|
|
103
|
-
props: {
|
|
104
|
-
label: "Clean Junk",
|
|
105
|
-
size: "xs",
|
|
106
|
-
variant: "danger",
|
|
107
|
-
onClickAction: {
|
|
108
|
-
type: "browser:cleanup", // Sends this event to the server
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
};
|
|
118
|
-
const layoutUI = {
|
|
119
|
-
type: "box",
|
|
120
|
-
props: {
|
|
121
|
-
padding: "none",
|
|
122
|
-
radius: "md",
|
|
123
|
-
shadow: "sm",
|
|
124
|
-
height: "full",
|
|
125
|
-
},
|
|
126
|
-
children: [
|
|
127
|
-
thredUI,
|
|
128
|
-
{
|
|
129
|
-
type: "float",
|
|
130
|
-
props: {
|
|
131
|
-
position: "top-left"
|
|
132
|
-
},
|
|
133
|
-
children: [
|
|
134
|
-
navigationUI
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
// {
|
|
138
|
-
// type: "float",
|
|
139
|
-
// props: { position: "top-right", margin: "md" }, // Add it to the top right
|
|
140
|
-
// children: [browserMonitorUI]
|
|
141
|
-
// }
|
|
142
|
-
]
|
|
143
|
-
};
|
|
144
6
|
yield {
|
|
145
7
|
type: "ui",
|
|
146
8
|
data: layoutUI
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ui } from "@melony/ui-kit";
|
|
2
|
+
const listItemProps = (path) => ({
|
|
3
|
+
padding: 'sm',
|
|
4
|
+
onClickAction: {
|
|
5
|
+
type: "client:navigate",
|
|
6
|
+
data: { path },
|
|
7
|
+
},
|
|
8
|
+
});
|
|
9
|
+
export const navigationUI = ui.box({ paddingHorizontal: "sm" }, [ui.list({
|
|
10
|
+
gap: "none",
|
|
11
|
+
padding: "none",
|
|
12
|
+
}, [
|
|
13
|
+
ui.listItem(listItemProps("/"), [ui.text("Home", { size: "sm" })]),
|
|
14
|
+
ui.listItem(listItemProps("/?tab=skills"), [ui.text("Skills", { size: "sm" })]),
|
|
15
|
+
ui.listItem(listItemProps("/?tab=settings"), [ui.text("Settings", { size: "sm" })]),
|
|
16
|
+
])]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ui } from "@melony/ui-kit";
|
|
2
|
+
import { navigationUI } from "./navigation.js";
|
|
3
|
+
export const sidebarUI = ui.box({
|
|
4
|
+
width: 240,
|
|
5
|
+
height: "full",
|
|
6
|
+
}, [
|
|
7
|
+
ui.box({ paddingVertical: "sm", paddingHorizontal: "md" }, [ui.text("OpenBot", { size: "sm", weight: "bold" })]),
|
|
8
|
+
navigationUI,
|
|
9
|
+
]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ui } from "@melony/ui-kit";
|
|
2
|
+
export const threadUI = ui.thread({
|
|
3
|
+
placeholder: "Ask me anything about your system or projects...",
|
|
4
|
+
welcomeTitle: "OpenBot System Agent",
|
|
5
|
+
welcomeMessage: "I'm your global system assistant. I have access to your file system and shell. How can I help you today?",
|
|
6
|
+
suggestions: [
|
|
7
|
+
"What is in my current directory?",
|
|
8
|
+
"Check system status",
|
|
9
|
+
"Who am I?",
|
|
10
|
+
]
|
|
11
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openbot",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"express": "^4.19.2",
|
|
18
18
|
"zod": "^4.3.5",
|
|
19
19
|
"@melony/plugin-ai-sdk": "0.1.4",
|
|
20
|
-
"@melony/plugin-
|
|
21
|
-
"@melony/plugin-
|
|
22
|
-
"@melony/plugin-shell": "0.1.1",
|
|
20
|
+
"@melony/plugin-browser": "0.1.4",
|
|
21
|
+
"@melony/plugin-file-system": "0.1.2",
|
|
23
22
|
"@melony/plugin-meta-agent": "0.1.2",
|
|
23
|
+
"@melony/plugin-shell": "0.1.1",
|
|
24
|
+
"@melony/ui-kit": "0.1.2",
|
|
24
25
|
"melony": "0.2.6"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|