volute 0.5.0 → 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.
- package/dist/{agent-Z2B6EFEQ.js → agent-X7GJLBLW.js} +13 -9
- package/dist/{agent-manager-PXBKA2GK.js → agent-manager-JDVXU3ON.js} +4 -4
- package/dist/channel-SMCNOIVQ.js +262 -0
- package/dist/{chunk-5X7HGB6L.js → chunk-AOKAQGO4.js} +1 -1
- package/dist/{chunk-MXUCNIBG.js → chunk-BX7KI4S3.js} +68 -3
- package/dist/{chunk-MW2KFO3B.js → chunk-G6ZNGLUX.js} +3 -3
- package/dist/{chunk-HE67X4T6.js → chunk-H7AMDUIA.js} +1 -1
- package/dist/{chunk-7L4AN5D4.js → chunk-JR4UXCTO.js} +1 -1
- package/dist/{chunk-UX25Z2ND.js → chunk-UWHWAPGO.js} +7 -0
- package/dist/{chunk-UAVD2AHX.js → chunk-W76KWE23.js} +1 -1
- package/dist/chunk-ZZOOTYXK.js +583 -0
- package/dist/cli.js +18 -21
- package/dist/{connector-LYEMXQEV.js → connector-Y7JPNROO.js} +3 -3
- package/dist/connectors/discord.js +31 -4
- package/dist/connectors/slack.js +22 -3
- package/dist/connectors/telegram.js +34 -4
- package/dist/{create-RVCZN6HE.js → create-G525LWEA.js} +2 -2
- package/dist/{daemon-client-ZY6UUN2M.js → daemon-client-442IV43D.js} +2 -2
- package/dist/daemon.js +962 -525
- package/dist/{delete-3QH7VYIN.js → delete-2PH2CGDY.js} +3 -3
- package/dist/{down-O7IFZLVJ.js → down-FXWAN66A.js} +1 -1
- package/dist/{env-4D4REPJF.js → env-7GLUJCWS.js} +2 -2
- package/dist/{history-OEONB53Z.js → history-H72ZUIBN.js} +2 -2
- package/dist/{import-MXJB2EII.js → import-AVKQJDYC.js} +2 -2
- package/dist/{logs-DF342W4M.js → logs-EDGK26AK.js} +1 -1
- package/dist/{message-ADHWFHSI.js → message-SCOQDR3P.js} +2 -2
- package/dist/{package-VQOE7JNH.js → package-4DP4Y4UO.js} +1 -1
- package/dist/restart-O4ETYLJF.js +29 -0
- package/dist/{schedule-NAG6F463.js → schedule-S6QVC5ON.js} +2 -2
- package/dist/send-G7PE4DOJ.js +72 -0
- package/dist/{setup-RPRRGG2F.js → setup-F4TCWVSP.js} +2 -2
- package/dist/{start-TUOXDSFL.js → start-VHQ7LNWM.js} +2 -2
- package/dist/{status-A36EHRO4.js → status-QAJWXKMZ.js} +2 -2
- package/dist/{stop-AOJZLQ5X.js → stop-CAGCT5NI.js} +2 -2
- package/dist/{up-7ILD7GU7.js → up-CSX3ZUIU.js} +15 -3
- package/dist/{update-LPSIAWQ2.js → update-XSIX3GGP.js} +2 -2
- package/dist/{update-check-Y33QDCFL.js → update-check-5ZADDHCK.js} +2 -2
- package/dist/{upgrade-FX2TKJ2S.js → upgrade-YXKPWDRU.js} +2 -2
- package/dist/{variant-LAB67OC2.js → variant-4Z6W3PP6.js} +2 -2
- package/dist/web-assets/assets/index-D5PzIndO.js +308 -0
- package/dist/web-assets/index.html +1 -1
- package/package.json +1 -1
- package/templates/_base/.init/.config/scripts/session-reader.ts +59 -0
- package/templates/_base/_skills/sessions/SKILL.md +49 -0
- package/templates/_base/_skills/volute-agent/SKILL.md +13 -9
- package/templates/_base/src/lib/format-prefix.ts +6 -0
- package/templates/_base/src/lib/router.ts +30 -3
- package/templates/_base/src/lib/session-monitor.ts +400 -0
- package/templates/_base/src/lib/types.ts +2 -0
- package/templates/agent-sdk/src/agent.ts +16 -0
- package/templates/agent-sdk/src/lib/hooks/session-context.ts +32 -0
- package/templates/pi/src/agent.ts +7 -1
- package/templates/pi/src/lib/session-context-extension.ts +33 -0
- package/dist/channel-MK5OK2SI.js +0 -113
- package/dist/chunk-SMISE4SV.js +0 -226
- package/dist/conversation-ERXEQZTY.js +0 -163
- package/dist/send-66QMKRUH.js +0 -75
- package/dist/web-assets/assets/index-BbRmoxoA.js +0 -308
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
buildChannelSlug,
|
|
3
4
|
fireAndForget,
|
|
4
5
|
handleAgentMessage,
|
|
5
6
|
loadEnv,
|
|
6
7
|
loadFollowedChannels,
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
reportTyping,
|
|
9
|
+
slugify,
|
|
10
|
+
splitMessage,
|
|
11
|
+
writeChannelEntry
|
|
12
|
+
} from "../chunk-BX7KI4S3.js";
|
|
9
13
|
import "../chunk-K3NQKI34.js";
|
|
10
14
|
|
|
11
15
|
// src/connectors/discord.ts
|
|
@@ -32,7 +36,9 @@ var client = new Client({
|
|
|
32
36
|
GatewayIntentBits.Guilds,
|
|
33
37
|
GatewayIntentBits.GuildMessages,
|
|
34
38
|
GatewayIntentBits.MessageContent,
|
|
35
|
-
GatewayIntentBits.DirectMessages
|
|
39
|
+
GatewayIntentBits.DirectMessages,
|
|
40
|
+
GatewayIntentBits.GuildMessageTyping,
|
|
41
|
+
GatewayIntentBits.DirectMessageTyping
|
|
36
42
|
],
|
|
37
43
|
partials: [Partials.Channel]
|
|
38
44
|
});
|
|
@@ -88,8 +94,23 @@ client.on(Events.MessageCreate, async (message) => {
|
|
|
88
94
|
}
|
|
89
95
|
if (content.length === 0) return;
|
|
90
96
|
const senderName = message.author.displayName || message.author.username;
|
|
91
|
-
const channelKey = `discord:${message.channelId}`;
|
|
92
97
|
const channelName = !isDM && "name" in message.channel ? message.channel.name : void 0;
|
|
98
|
+
const channelKey = isDM ? buildChannelSlug("discord", {
|
|
99
|
+
isDM: true,
|
|
100
|
+
recipients: [message.author.username]
|
|
101
|
+
}) : buildChannelSlug("discord", {
|
|
102
|
+
channelName: channelName ?? message.channelId,
|
|
103
|
+
serverName: message.guild?.name
|
|
104
|
+
});
|
|
105
|
+
if (env.agentDir) {
|
|
106
|
+
writeChannelEntry(env.agentDir, channelKey, {
|
|
107
|
+
platformId: message.channelId,
|
|
108
|
+
platform: "discord",
|
|
109
|
+
name: channelName ? `#${channelName}` : void 0,
|
|
110
|
+
server: message.guild?.name,
|
|
111
|
+
type: isDM ? "dm" : "channel"
|
|
112
|
+
});
|
|
113
|
+
}
|
|
93
114
|
const participantCount = isDM ? 2 : message.guild?.memberCount;
|
|
94
115
|
const payload = {
|
|
95
116
|
content,
|
|
@@ -107,6 +128,12 @@ client.on(Events.MessageCreate, async (message) => {
|
|
|
107
128
|
}
|
|
108
129
|
await handleDiscordMessage(message, payload);
|
|
109
130
|
});
|
|
131
|
+
client.on(Events.TypingStart, (typing) => {
|
|
132
|
+
if (typing.user.bot) return;
|
|
133
|
+
const sender = typing.member?.displayName ?? typing.user.username ?? typing.user.id ?? "unknown";
|
|
134
|
+
const typingChannel = typing.guild ? `discord:${slugify(typing.guild.name)}/${slugify("name" in typing.channel ? String(typing.channel.name) : typing.channel.id)}` : `discord:@${slugify(typing.user.username ?? typing.user.id)}`;
|
|
135
|
+
reportTyping(env, typingChannel, sender, true);
|
|
136
|
+
});
|
|
110
137
|
async function handleDiscordMessage(message, payload) {
|
|
111
138
|
const channel = message.channel;
|
|
112
139
|
if (!("sendTyping" in channel)) return;
|
package/dist/connectors/slack.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
buildChannelSlug,
|
|
3
4
|
fireAndForget,
|
|
4
5
|
handleAgentMessage,
|
|
5
6
|
loadEnv,
|
|
6
7
|
loadFollowedChannels,
|
|
7
8
|
onShutdown,
|
|
8
|
-
splitMessage
|
|
9
|
-
|
|
9
|
+
splitMessage,
|
|
10
|
+
writeChannelEntry
|
|
11
|
+
} from "../chunk-BX7KI4S3.js";
|
|
10
12
|
import "../chunk-K3NQKI34.js";
|
|
11
13
|
|
|
12
14
|
// src/connectors/slack.ts
|
|
@@ -79,15 +81,32 @@ app.message(async ({ message, say }) => {
|
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
let senderName = message.user;
|
|
84
|
+
let senderUsername = message.user;
|
|
82
85
|
try {
|
|
83
86
|
const userInfo = await app.client.users.info({
|
|
84
87
|
user: message.user
|
|
85
88
|
});
|
|
86
89
|
senderName = userInfo.user?.profile?.display_name || userInfo.user?.profile?.real_name || message.user;
|
|
90
|
+
senderUsername = userInfo.user?.name ?? message.user;
|
|
87
91
|
} catch (err) {
|
|
88
92
|
console.warn(`Failed to get user info: ${err}`);
|
|
89
93
|
}
|
|
90
|
-
const channelKey =
|
|
94
|
+
const channelKey = isDM ? buildChannelSlug("slack", {
|
|
95
|
+
isDM: true,
|
|
96
|
+
senderName: senderUsername
|
|
97
|
+
}) : buildChannelSlug("slack", {
|
|
98
|
+
channelName: channelName ?? message.channel,
|
|
99
|
+
serverName
|
|
100
|
+
});
|
|
101
|
+
if (env.agentDir) {
|
|
102
|
+
writeChannelEntry(env.agentDir, channelKey, {
|
|
103
|
+
platformId: message.channel,
|
|
104
|
+
platform: "slack",
|
|
105
|
+
name: channelName ? `#${channelName}` : void 0,
|
|
106
|
+
server: serverName,
|
|
107
|
+
type: isDM ? "dm" : "channel"
|
|
108
|
+
});
|
|
109
|
+
}
|
|
91
110
|
const participantCount = message.channel_type === "im" ? 2 : numMembers;
|
|
92
111
|
const payload = {
|
|
93
112
|
content,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
buildChannelSlug,
|
|
3
4
|
fireAndForget,
|
|
4
5
|
handleAgentMessage,
|
|
5
6
|
loadEnv,
|
|
6
7
|
loadFollowedChannels,
|
|
7
|
-
splitMessage
|
|
8
|
-
|
|
8
|
+
splitMessage,
|
|
9
|
+
writeChannelEntry
|
|
10
|
+
} from "../chunk-BX7KI4S3.js";
|
|
9
11
|
import "../chunk-K3NQKI34.js";
|
|
10
12
|
|
|
11
13
|
// src/connectors/telegram.ts
|
|
@@ -48,9 +50,23 @@ bot.on(message("text"), async (ctx) => {
|
|
|
48
50
|
console.warn(`Failed to get member count for chat ${ctx.chat.id}: ${err}`);
|
|
49
51
|
}
|
|
50
52
|
}
|
|
53
|
+
const channelSlug = isDM ? buildChannelSlug("telegram", {
|
|
54
|
+
isDM: true,
|
|
55
|
+
senderName: ctx.message.from.username ?? ctx.message.from.first_name
|
|
56
|
+
}) : buildChannelSlug("telegram", {
|
|
57
|
+
channelName: chatTitle ?? String(ctx.chat.id)
|
|
58
|
+
});
|
|
59
|
+
if (env.agentDir) {
|
|
60
|
+
writeChannelEntry(env.agentDir, channelSlug, {
|
|
61
|
+
platformId: String(ctx.chat.id),
|
|
62
|
+
platform: "telegram",
|
|
63
|
+
name: chatTitle,
|
|
64
|
+
type: isDM ? "dm" : "channel"
|
|
65
|
+
});
|
|
66
|
+
}
|
|
51
67
|
const payload = {
|
|
52
68
|
content,
|
|
53
|
-
channel:
|
|
69
|
+
channel: channelSlug,
|
|
54
70
|
sender: senderName,
|
|
55
71
|
platform: "Telegram",
|
|
56
72
|
...isDM ? { isDM: true } : {},
|
|
@@ -105,9 +121,23 @@ bot.on(message("photo"), async (ctx) => {
|
|
|
105
121
|
console.warn(`Failed to get member count for chat ${ctx.chat.id}: ${err}`);
|
|
106
122
|
}
|
|
107
123
|
}
|
|
124
|
+
const channelSlug = isDM ? buildChannelSlug("telegram", {
|
|
125
|
+
isDM: true,
|
|
126
|
+
senderName: ctx.message.from.username ?? ctx.message.from.first_name
|
|
127
|
+
}) : buildChannelSlug("telegram", {
|
|
128
|
+
channelName: chatTitle ?? String(ctx.chat.id)
|
|
129
|
+
});
|
|
130
|
+
if (env.agentDir) {
|
|
131
|
+
writeChannelEntry(env.agentDir, channelSlug, {
|
|
132
|
+
platformId: String(ctx.chat.id),
|
|
133
|
+
platform: "telegram",
|
|
134
|
+
name: chatTitle,
|
|
135
|
+
type: isDM ? "dm" : "channel"
|
|
136
|
+
});
|
|
137
|
+
}
|
|
108
138
|
const payload = {
|
|
109
139
|
content,
|
|
110
|
-
channel:
|
|
140
|
+
channel: channelSlug,
|
|
111
141
|
sender: senderName,
|
|
112
142
|
platform: "Telegram",
|
|
113
143
|
...isDM ? { isDM: true } : {},
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
chownAgentDir,
|
|
14
14
|
createAgentUser,
|
|
15
15
|
ensureVoluteGroup
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W76KWE23.js";
|
|
17
17
|
import {
|
|
18
18
|
exec,
|
|
19
19
|
execInherit
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
agentDir,
|
|
24
24
|
ensureVoluteHome,
|
|
25
25
|
nextPort
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UWHWAPGO.js";
|
|
27
27
|
import "./chunk-K3NQKI34.js";
|
|
28
28
|
|
|
29
29
|
// src/commands/create.ts
|