@chrysb/alphaclaw 0.5.6 → 0.5.7-beta.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.
- package/bin/alphaclaw.js +6 -1
- package/lib/public/css/agents.css +92 -0
- package/lib/public/css/explorer.css +101 -0
- package/lib/public/css/shell.css +15 -4
- package/lib/public/js/app.js +69 -3
- package/lib/public/js/components/action-button.js +5 -0
- package/lib/public/js/components/agents-tab/agent-bindings-section/helpers.js +76 -0
- package/lib/public/js/components/agents-tab/agent-bindings-section/index.js +490 -0
- package/lib/public/js/components/agents-tab/agent-bindings-section/use-agent-bindings.js +256 -0
- package/lib/public/js/components/agents-tab/agent-detail-panel.js +74 -0
- package/lib/public/js/components/agents-tab/agent-identity-section.js +175 -0
- package/lib/public/js/components/agents-tab/agent-overview/index.js +53 -0
- package/lib/public/js/components/agents-tab/agent-overview/manage-card.js +44 -0
- package/lib/public/js/components/agents-tab/agent-overview/model-card.js +158 -0
- package/lib/public/js/components/agents-tab/agent-overview/use-model-card.js +169 -0
- package/lib/public/js/components/agents-tab/agent-overview/use-workspace-card.js +45 -0
- package/lib/public/js/components/agents-tab/agent-overview/workspace-card.js +47 -0
- package/lib/public/js/components/agents-tab/agent-pairing-section.js +265 -0
- package/lib/public/js/components/agents-tab/create-agent-modal.js +189 -0
- package/lib/public/js/components/agents-tab/create-channel-modal.js +323 -0
- package/lib/public/js/components/agents-tab/delete-agent-dialog.js +50 -0
- package/lib/public/js/components/agents-tab/edit-agent-modal.js +109 -0
- package/lib/public/js/components/agents-tab/index.js +148 -0
- package/lib/public/js/components/agents-tab/use-agents.js +89 -0
- package/lib/public/js/components/channel-account-status-badge.js +35 -0
- package/lib/public/js/components/channel-operations-panel.js +33 -0
- package/lib/public/js/components/channels.js +545 -60
- package/lib/public/js/components/envars.js +25 -4
- package/lib/public/js/components/general/index.js +21 -11
- package/lib/public/js/components/general/use-general-tab.js +78 -16
- package/lib/public/js/components/google/gmail-setup-wizard.js +1 -3
- package/lib/public/js/components/google/index.js +28 -30
- package/lib/public/js/components/icons.js +37 -0
- package/lib/public/js/components/models-tab/index.js +58 -224
- package/lib/public/js/components/models-tab/model-picker.js +212 -0
- package/lib/public/js/components/models-tab/use-models.js +17 -14
- package/lib/public/js/components/onboarding/use-welcome-pairing.js +4 -4
- package/lib/public/js/components/onboarding/welcome-pairing-step.js +2 -2
- package/lib/public/js/components/overflow-menu.js +122 -0
- package/lib/public/js/components/pairings.js +36 -8
- package/lib/public/js/components/routes/agents-route.js +27 -0
- package/lib/public/js/components/routes/general-route.js +2 -0
- package/lib/public/js/components/routes/index.js +1 -0
- package/lib/public/js/components/routes/telegram-route.js +2 -2
- package/lib/public/js/components/secret-input.js +8 -1
- package/lib/public/js/components/sidebar.js +64 -26
- package/lib/public/js/components/telegram-workspace/index.js +175 -74
- package/lib/public/js/components/telegram-workspace/manage.js +83 -10
- package/lib/public/js/components/telegram-workspace/onboarding.js +9 -8
- package/lib/public/js/components/webhooks.js +43 -18
- package/lib/public/js/hooks/use-app-shell-controller.js +7 -0
- package/lib/public/js/hooks/use-browse-navigation.js +8 -5
- package/lib/public/js/hooks/use-destination-session-selection.js +8 -1
- package/lib/public/js/lib/api.js +163 -9
- package/lib/public/js/lib/app-navigation.js +2 -1
- package/lib/public/js/lib/channel-create-operation.js +102 -0
- package/lib/public/js/lib/format.js +14 -0
- package/lib/public/js/lib/sse.js +51 -0
- package/lib/public/js/lib/telegram-api.js +38 -18
- package/lib/public/setup.html +1 -0
- package/lib/public/shared/browse-file-policies.json +0 -1
- package/lib/server/agents/service.js +1478 -0
- package/lib/server/constants.js +2 -2
- package/lib/server/env.js +3 -1
- package/lib/server/gateway.js +104 -20
- package/lib/server/gmail-watch.js +29 -2
- package/lib/server/onboarding/import/import-applier.js +0 -1
- package/lib/server/onboarding/index.js +0 -6
- package/lib/server/onboarding/workspace.js +73 -38
- package/lib/server/openclaw-config.js +23 -0
- package/lib/server/operation-events.js +141 -0
- package/lib/server/routes/agents.js +266 -0
- package/lib/server/routes/pairings.js +135 -25
- package/lib/server/routes/system.js +90 -10
- package/lib/server/routes/telegram.js +247 -51
- package/lib/server/telegram-workspace.js +61 -10
- package/lib/server/topic-registry.js +66 -7
- package/lib/server/watchdog.js +39 -1
- package/lib/server/webhooks.js +60 -12
- package/lib/server.js +21 -7
- package/lib/setup/core-prompts/AGENTS.md +6 -5
- package/lib/setup/core-prompts/TOOLS.md +1 -8
- package/package.json +1 -1
- package/lib/setup/skills/control-ui/SKILL.md +0 -62
|
@@ -1,77 +1,97 @@
|
|
|
1
1
|
import { authFetch } from "./api.js";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const
|
|
3
|
+
const appendAccountId = (params, accountId) => {
|
|
4
|
+
const normalized = String(accountId || "").trim();
|
|
5
|
+
if (normalized) params.set("accountId", normalized);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const verifyBot = async ({ accountId = "" } = {}) => {
|
|
9
|
+
const params = new URLSearchParams();
|
|
10
|
+
appendAccountId(params, accountId);
|
|
11
|
+
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
12
|
+
const res = await authFetch(`/api/telegram/bot${suffix}`);
|
|
5
13
|
return res.json();
|
|
6
14
|
};
|
|
7
15
|
|
|
8
|
-
export const workspace = async () => {
|
|
9
|
-
const
|
|
16
|
+
export const workspace = async ({ accountId = "" } = {}) => {
|
|
17
|
+
const params = new URLSearchParams();
|
|
18
|
+
appendAccountId(params, accountId);
|
|
19
|
+
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
20
|
+
const res = await authFetch(`/api/telegram/workspace${suffix}`);
|
|
10
21
|
return res.json();
|
|
11
22
|
};
|
|
12
23
|
|
|
13
|
-
export const resetWorkspace = async () => {
|
|
14
|
-
const
|
|
24
|
+
export const resetWorkspace = async ({ accountId = "" } = {}) => {
|
|
25
|
+
const params = new URLSearchParams();
|
|
26
|
+
appendAccountId(params, accountId);
|
|
27
|
+
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
28
|
+
const res = await authFetch(`/api/telegram/workspace/reset${suffix}`, {
|
|
15
29
|
method: "POST",
|
|
16
30
|
});
|
|
17
31
|
return res.json();
|
|
18
32
|
};
|
|
19
33
|
|
|
20
|
-
export const verifyGroup = async (groupId) => {
|
|
34
|
+
export const verifyGroup = async (groupId, { accountId = "" } = {}) => {
|
|
21
35
|
const res = await authFetch("/api/telegram/groups/verify", {
|
|
22
36
|
method: "POST",
|
|
23
37
|
headers: { "Content-Type": "application/json" },
|
|
24
|
-
body: JSON.stringify({ groupId }),
|
|
38
|
+
body: JSON.stringify({ groupId, accountId }),
|
|
25
39
|
});
|
|
26
40
|
return res.json();
|
|
27
41
|
};
|
|
28
42
|
|
|
29
|
-
export const listTopics = async (groupId) => {
|
|
43
|
+
export const listTopics = async (groupId, { accountId = "" } = {}) => {
|
|
44
|
+
const params = new URLSearchParams();
|
|
45
|
+
appendAccountId(params, accountId);
|
|
46
|
+
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
30
47
|
const res = await authFetch(
|
|
31
|
-
`/api/telegram/groups/${encodeURIComponent(groupId)}/topics`,
|
|
48
|
+
`/api/telegram/groups/${encodeURIComponent(groupId)}/topics${suffix}`,
|
|
32
49
|
);
|
|
33
50
|
return res.json();
|
|
34
51
|
};
|
|
35
52
|
|
|
36
|
-
export const createTopicsBulk = async (groupId, topics) => {
|
|
53
|
+
export const createTopicsBulk = async (groupId, topics, { accountId = "" } = {}) => {
|
|
37
54
|
const res = await authFetch(
|
|
38
55
|
`/api/telegram/groups/${encodeURIComponent(groupId)}/topics/bulk`,
|
|
39
56
|
{
|
|
40
57
|
method: "POST",
|
|
41
58
|
headers: { "Content-Type": "application/json" },
|
|
42
|
-
body: JSON.stringify({ topics }),
|
|
59
|
+
body: JSON.stringify({ topics, accountId }),
|
|
43
60
|
},
|
|
44
61
|
);
|
|
45
62
|
return res.json();
|
|
46
63
|
};
|
|
47
64
|
|
|
48
|
-
export const deleteTopic = async (groupId, topicId) => {
|
|
65
|
+
export const deleteTopic = async (groupId, topicId, { accountId = "" } = {}) => {
|
|
66
|
+
const params = new URLSearchParams();
|
|
67
|
+
appendAccountId(params, accountId);
|
|
68
|
+
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
49
69
|
const res = await authFetch(
|
|
50
|
-
`/api/telegram/groups/${encodeURIComponent(groupId)}/topics/${topicId}`,
|
|
70
|
+
`/api/telegram/groups/${encodeURIComponent(groupId)}/topics/${topicId}${suffix}`,
|
|
51
71
|
{ method: "DELETE" },
|
|
52
72
|
);
|
|
53
73
|
return res.json();
|
|
54
74
|
};
|
|
55
75
|
|
|
56
|
-
export const updateTopic = async (groupId, topicId, payload) => {
|
|
76
|
+
export const updateTopic = async (groupId, topicId, payload, { accountId = "" } = {}) => {
|
|
57
77
|
const res = await authFetch(
|
|
58
78
|
`/api/telegram/groups/${encodeURIComponent(groupId)}/topics/${encodeURIComponent(topicId)}`,
|
|
59
79
|
{
|
|
60
80
|
method: "PUT",
|
|
61
81
|
headers: { "Content-Type": "application/json" },
|
|
62
|
-
body: JSON.stringify(payload),
|
|
82
|
+
body: JSON.stringify({ ...payload, accountId }),
|
|
63
83
|
},
|
|
64
84
|
);
|
|
65
85
|
return res.json();
|
|
66
86
|
};
|
|
67
87
|
|
|
68
|
-
export const configureGroup = async (groupId, payload) => {
|
|
88
|
+
export const configureGroup = async (groupId, payload, { accountId = "" } = {}) => {
|
|
69
89
|
const res = await authFetch(
|
|
70
90
|
`/api/telegram/groups/${encodeURIComponent(groupId)}/configure`,
|
|
71
91
|
{
|
|
72
92
|
method: "POST",
|
|
73
93
|
headers: { "Content-Type": "application/json" },
|
|
74
|
-
body: JSON.stringify(payload),
|
|
94
|
+
body: JSON.stringify({ ...payload, accountId }),
|
|
75
95
|
},
|
|
76
96
|
);
|
|
77
97
|
return res.json();
|
package/lib/public/setup.html
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
<link rel="stylesheet" href="./css/theme.css" />
|
|
13
13
|
<link rel="stylesheet" href="./css/shell.css" />
|
|
14
14
|
<link rel="stylesheet" href="./css/explorer.css" />
|
|
15
|
+
<link rel="stylesheet" href="./css/agents.css" />
|
|
15
16
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
16
17
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
17
18
|
<script>
|