volute 0.26.0 → 0.27.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/README.md +13 -13
- package/dist/{activity-events-ZMBAKLUF.js → activity-events-BBIEA2F4.js} +2 -3
- package/dist/api.d.ts +363 -168
- package/dist/{archive-4ZQYK5MN.js → archive-UA4BDFXQ.js} +2 -2
- package/dist/{auth-4TV573WE.js → auth-D3OT2ARB.js} +3 -3
- package/dist/bridge-FQHZL3MC.js +206 -0
- package/dist/chat-MHJ3L6JQ.js +58 -0
- package/dist/{chunk-PHU4DEAJ.js → chunk-2WPW7OT6.js} +3 -3
- package/dist/{chunk-5Y3PBKW6.js → chunk-2YP2TVDT.js} +138 -56
- package/dist/{chunk-USNBKHYG.js → chunk-4WXYUOAK.js} +4 -6
- package/dist/{chunk-YJA7P64S.js → chunk-AW7PFDVN.js} +5 -5
- package/dist/{chunk-OZFKBXD6.js → chunk-EHYDTZTF.js} +6 -6
- package/dist/{chunk-LX22GRG7.js → chunk-GIE6CSN5.js} +11 -8
- package/dist/{chunk-WBHMQ5OZ.js → chunk-H7OZRFJB.js} +192 -12
- package/dist/{chunk-ON3FF5JA.js → chunk-HDN7MNGD.js} +3 -3
- package/dist/chunk-IAYBDWVG.js +477 -0
- package/dist/{chunk-TZKJLDQN.js → chunk-IKRVFPWU.js} +14 -9
- package/dist/{chunk-WGOGUMPO.js → chunk-JGFVMROS.js} +13 -6
- package/dist/{chunk-3TV4GLFO.js → chunk-JKOWNZ4P.js} +3 -3
- package/dist/{chunk-NWI2425I.js → chunk-K5NAC55T.js} +1 -1
- package/dist/{chunk-HFCBO2GL.js → chunk-KDGS53OS.js} +4 -4
- package/dist/chunk-KTLFDYPT.js +61 -0
- package/dist/{chunk-V63B7DX3.js → chunk-LAC664WU.js} +7 -4
- package/dist/{chunk-3CFRE2VC.js → chunk-OQZH4PBB.js} +337 -1061
- package/dist/{chunk-2VO7453N.js → chunk-PHSAT7YL.js} +30 -54
- package/dist/{chunk-XOXLRRR2.js → chunk-RKQEHRBB.js} +4 -3
- package/dist/chunk-T6HKBWXZ.js +23 -0
- package/dist/{chunk-UTL75LP6.js → chunk-USUXRNVD.js} +22 -22
- package/dist/{chunk-J2CO4WEV.js → chunk-VIVMW2H2.js} +4 -4
- package/dist/{chunk-KTJGZ7M7.js → chunk-XBLSAVJF.js} +1 -1
- package/dist/cli.js +31 -36
- package/dist/{cloud-sync-NI2K3C7G.js → cloud-sync-T7M3ESC3.js} +15 -14
- package/dist/connectors/discord-bridge.js +158 -0
- package/dist/connectors/slack-bridge.js +119 -0
- package/dist/connectors/telegram-bridge.js +133 -0
- package/dist/conversations-M2K4253F.js +55 -0
- package/dist/create-D7J73A6H.js +45 -0
- package/dist/{create-4YBRTTJS.js → create-QWV73WXD.js} +1 -1
- package/dist/{daemon-client-Z7FAJ6JW.js → daemon-client-I42FK2BF.js} +2 -2
- package/dist/{daemon-restart-BJZ3O4U4.js → daemon-restart-M2QTYMEG.js} +7 -7
- package/dist/daemon.js +1758 -1024
- package/dist/db-IC4J52XQ.js +8 -0
- package/dist/{delete-27OYNK25.js → delete-4JYGD4VN.js} +1 -1
- package/dist/down-LVBXEULC.js +14 -0
- package/dist/{env-M336ONDP.js → env-YJMUMFIY.js} +2 -2
- package/dist/{export-HP4G5DQC.js → export-BOJQWBMA.js} +4 -4
- package/dist/{file-HUDKTRAS.js → file-CR36YUPD.js} +4 -4
- package/dist/{history-B64GTFTD.js → history-XKRTAFS2.js} +5 -5
- package/dist/{import-XIB7UV4S.js → import-SRTQXBGH.js} +4 -4
- package/dist/join-J4QU42DL.js +66 -0
- package/dist/list-R73GENNL.js +40 -0
- package/dist/{log-PBFNILJ4.js → log-ABYNVYJ3.js} +4 -4
- package/dist/{login-B5E7N7MY.js → login-3QZNR2DF.js} +4 -4
- package/dist/{login-6U7U6BNG.js → login-XX37I52P.js} +2 -2
- package/dist/{logout-XSJRYS3U.js → logout-T53VKCPU.js} +4 -4
- package/dist/{logout-UKD5LA37.js → logout-W4KOOBIT.js} +2 -2
- package/dist/{logs-3CART7O7.js → logs-U35JR2KE.js} +5 -5
- package/dist/{merge-VK2HSKMA.js → merge-LNSMSAOF.js} +4 -4
- package/dist/message-delivery-LDXLGERA.js +25 -0
- package/dist/migrate-registry-to-db-XC7T5B7P.js +110 -0
- package/dist/{mind-HZ3QSDDJ.js → mind-DI33C74K.js} +25 -25
- package/dist/{mind-activity-tracker-4G6FURY2.js → mind-activity-tracker-EN6XNXPF.js} +3 -4
- package/dist/mind-manager-M6EMUW5I.js +18 -0
- package/dist/{mind-sleep-DTV7L44D.js → mind-sleep-BTSWQNAC.js} +4 -4
- package/dist/{mind-wake-PFN4FN3T.js → mind-wake-SBAKIDVP.js} +4 -4
- package/dist/{notes-37FW2UR2.js → notes-XCER3I7M.js} +11 -21
- package/dist/{package-VZWLXPHV.js → package-7WY6VKU3.js} +1 -1
- package/dist/{pages-DIIT5HMQ.js → pages-6EBS6CBR.js} +2 -2
- package/dist/{publish-HQV7YREB.js → publish-66UB2ZFY.js} +5 -5
- package/dist/{pull-2MB4SK3C.js → pull-XCHJTM5M.js} +4 -4
- package/dist/read-36UFXN3G.js +46 -0
- package/dist/{register-EFND67FQ.js → register-6B2CXTYM.js} +2 -2
- package/dist/{registry-D2BSQ2X5.js → registry-NDNOOYG4.js} +15 -9
- package/dist/{restart-CCK7D6TV.js → restart-6ESL3NBO.js} +5 -5
- package/dist/{sandbox-EHGFF52K.js → sandbox-TGBX22DS.js} +3 -3
- package/dist/{schedule-6F7ELB2M.js → schedule-QTJMFATP.js} +5 -5
- package/dist/{seed-E5OQGWX3.js → seed-SSUCYYDF.js} +2 -2
- package/dist/{send-IH6XZKPC.js → send-ZNCJDSRP.js} +25 -19
- package/dist/{service-LLBV3R7M.js → service-6LIN3F3K.js} +4 -4
- package/dist/{setup-F6TWFYGQ.js → setup-JG4QAEBV.js} +12 -12
- package/dist/{setup-YGAAIKKZ.js → setup-JHL5ZEST.js} +2 -2
- package/dist/{shared-UMO4S7CC.js → shared-ML5I4Q2A.js} +4 -4
- package/dist/{skill-42LGFBQC.js → skill-AUAQTSP5.js} +5 -5
- package/dist/skills/dreaming/references/INSTALL.md +2 -2
- package/dist/skills/orientation/SKILL.md +3 -3
- package/dist/skills/volute-mind/SKILL.md +32 -30
- package/dist/sleep-manager-MWYHM5HV.js +29 -0
- package/dist/split-TKJ5OT3P.js +63 -0
- package/dist/{sprout-QL74KR2X.js → sprout-IJVVKSJ2.js} +6 -7
- package/dist/{start-O5JQASRC.js → start-EUJSS5R4.js} +2 -2
- package/dist/{status-FZBEBM7Q.js → status-77YEPHMW.js} +5 -5
- package/dist/{status-WXD4HXRL.js → status-7GA4SM4Y.js} +4 -4
- package/dist/{status-LV34BG6G.js → status-THLOBLWG.js} +2 -2
- package/dist/{stop-2SOG5NYF.js → stop-3XAITBBF.js} +5 -5
- package/dist/{tailscale-AJ4VL5XK.js → tailscale-NY5MUMY3.js} +1 -1
- package/dist/up-NKSMXBWR.js +17 -0
- package/dist/{update-5VUDAI3D.js → update-PTSH22AZ.js} +9 -9
- package/dist/{update-check-F5Z3ALXX.js → update-check-64FWC4Y2.js} +2 -2
- package/dist/{upgrade-QCCO33BK.js → upgrade-HA47CS4C.js} +12 -5
- package/dist/variant-7TGZHOU3.js +41 -0
- package/dist/{version-notify-USFZBWMG.js → version-notify-5Z4MNR6M.js} +26 -30
- package/dist/web-assets/assets/index-CI5wgghI.css +1 -0
- package/dist/web-assets/assets/index-is5CvJWH.js +75 -0
- package/dist/web-assets/favicon.png +0 -0
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0017_minds.sql +16 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/templates/_base/.init/.config/prompts.json +2 -2
- package/templates/_base/home/VOLUTE.md +5 -5
- package/templates/_base/src/lib/startup.ts +2 -2
- package/dist/channel-ZVZV42UD.js +0 -260
- package/dist/chunk-B2CPS4QU.js +0 -283
- package/dist/chunk-SIAG3QMM.js +0 -42
- package/dist/chunk-WSLPZF72.js +0 -173
- package/dist/connector-G722WXAU.js +0 -147
- package/dist/connectors/discord.js +0 -177
- package/dist/connectors/slack.js +0 -181
- package/dist/connectors/telegram.js +0 -187
- package/dist/down-7UKFMJJZ.js +0 -14
- package/dist/message-delivery-MS5JYPZX.js +0 -25
- package/dist/mind-manager-VVK67AY3.js +0 -19
- package/dist/sleep-manager-EE4NRN2Q.js +0 -29
- package/dist/up-SDMCSVI3.js +0 -17
- package/dist/variant-WWLDY6D5.js +0 -207
- package/dist/web-assets/assets/index-CUQ31ieL.js +0 -69
- package/dist/web-assets/assets/index-CW8NSl1o.css +0 -1
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
buildChannelSlug,
|
|
4
|
-
loadEnv,
|
|
5
|
-
loadFollowedChannels,
|
|
6
|
-
sendToMind,
|
|
7
|
-
writeChannelEntry
|
|
8
|
-
} from "../chunk-WSLPZF72.js";
|
|
9
|
-
import "../chunk-B2CPS4QU.js";
|
|
10
|
-
import "../chunk-K3NQKI34.js";
|
|
11
|
-
|
|
12
|
-
// src/connectors/telegram.ts
|
|
13
|
-
import { Telegraf } from "telegraf";
|
|
14
|
-
import { message } from "telegraf/filters";
|
|
15
|
-
var TYPING_INTERVAL_MS = 5e3;
|
|
16
|
-
var env = loadEnv();
|
|
17
|
-
var botToken = process.env.TELEGRAM_BOT_TOKEN;
|
|
18
|
-
if (!botToken) {
|
|
19
|
-
console.error("Missing required env var: TELEGRAM_BOT_TOKEN");
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
var followedChatIds = loadFollowedChannels(env, "telegram");
|
|
23
|
-
var followedChatIdSet = new Set(followedChatIds.map(String));
|
|
24
|
-
var bot = new Telegraf(botToken);
|
|
25
|
-
bot.on(message("text"), async (ctx) => {
|
|
26
|
-
if (ctx.message.from.is_bot) return;
|
|
27
|
-
const isDM = ctx.chat.type === "private";
|
|
28
|
-
const botUsername = ctx.botInfo.username;
|
|
29
|
-
const isMentioned = !isDM && ctx.message.entities?.some(
|
|
30
|
-
(e) => e.type === "mention" && ctx.message.text.substring(e.offset, e.offset + e.length) === `@${botUsername}`
|
|
31
|
-
);
|
|
32
|
-
const isFollowedChat = !isDM && followedChatIdSet.has(String(ctx.chat.id));
|
|
33
|
-
if (!isDM && !isMentioned && !isFollowedChat) return;
|
|
34
|
-
let text = ctx.message.text;
|
|
35
|
-
if (isMentioned && botUsername) {
|
|
36
|
-
text = text.replace(new RegExp(`@${botUsername}`, "g"), "").trim();
|
|
37
|
-
}
|
|
38
|
-
const content = [];
|
|
39
|
-
if (text) content.push({ type: "text", text });
|
|
40
|
-
if (content.length === 0) return;
|
|
41
|
-
const senderName = ctx.message.from.first_name + (ctx.message.from.last_name ? ` ${ctx.message.from.last_name}` : "");
|
|
42
|
-
const chatTitle = "title" in ctx.chat ? ctx.chat.title : void 0;
|
|
43
|
-
let participantCount = isDM ? 2 : void 0;
|
|
44
|
-
if (!isDM) {
|
|
45
|
-
try {
|
|
46
|
-
participantCount = await ctx.telegram.getChatMembersCount(ctx.chat.id);
|
|
47
|
-
} catch (err) {
|
|
48
|
-
console.warn(`Failed to get member count for chat ${ctx.chat.id}: ${err}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const channelSlug = isDM ? buildChannelSlug("telegram", {
|
|
52
|
-
isDM: true,
|
|
53
|
-
senderName: ctx.message.from.username ?? ctx.message.from.first_name
|
|
54
|
-
}) : buildChannelSlug("telegram", {
|
|
55
|
-
channelName: chatTitle ?? String(ctx.chat.id)
|
|
56
|
-
});
|
|
57
|
-
try {
|
|
58
|
-
writeChannelEntry(env.mindName, channelSlug, {
|
|
59
|
-
platformId: String(ctx.chat.id),
|
|
60
|
-
platform: "telegram",
|
|
61
|
-
name: chatTitle,
|
|
62
|
-
type: isDM ? "dm" : "channel"
|
|
63
|
-
});
|
|
64
|
-
} catch (err) {
|
|
65
|
-
console.error(`[telegram] failed to write channel entry for ${channelSlug}:`, err);
|
|
66
|
-
}
|
|
67
|
-
const payload = {
|
|
68
|
-
content,
|
|
69
|
-
channel: channelSlug,
|
|
70
|
-
sender: senderName,
|
|
71
|
-
platform: "Telegram",
|
|
72
|
-
...isDM ? { isDM: true } : {},
|
|
73
|
-
...chatTitle ? { channelName: chatTitle } : {},
|
|
74
|
-
...participantCount ? { participantCount } : {}
|
|
75
|
-
};
|
|
76
|
-
if (isFollowedChat && !isMentioned) {
|
|
77
|
-
const result = await sendToMind(env, payload);
|
|
78
|
-
if (!result.ok)
|
|
79
|
-
ctx.reply(result.error ?? "Failed to process message").catch((err) => {
|
|
80
|
-
console.warn(`[telegram] failed to send error reply: ${err}`);
|
|
81
|
-
});
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
await handleTelegramMessage(ctx, payload);
|
|
85
|
-
});
|
|
86
|
-
bot.on(message("photo"), async (ctx) => {
|
|
87
|
-
if (ctx.message.from.is_bot) return;
|
|
88
|
-
const isDM = ctx.chat.type === "private";
|
|
89
|
-
const isFollowedChat = !isDM && followedChatIdSet.has(String(ctx.chat.id));
|
|
90
|
-
if (!isDM && !isFollowedChat) return;
|
|
91
|
-
const content = [];
|
|
92
|
-
const caption = ctx.message.caption;
|
|
93
|
-
if (caption) content.push({ type: "text", text: caption });
|
|
94
|
-
const photos = ctx.message.photo;
|
|
95
|
-
const largest = photos[photos.length - 1];
|
|
96
|
-
try {
|
|
97
|
-
const fileUrl = await ctx.telegram.getFileLink(largest.file_id);
|
|
98
|
-
const res = await fetch(fileUrl.href);
|
|
99
|
-
if (!res.ok) {
|
|
100
|
-
console.error(`Failed to download photo: HTTP ${res.status}`);
|
|
101
|
-
} else {
|
|
102
|
-
const buffer = Buffer.from(await res.arrayBuffer());
|
|
103
|
-
content.push({
|
|
104
|
-
type: "image",
|
|
105
|
-
media_type: "image/jpeg",
|
|
106
|
-
data: buffer.toString("base64")
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
} catch (err) {
|
|
110
|
-
console.error(`Failed to download photo: ${err}`);
|
|
111
|
-
}
|
|
112
|
-
if (content.length === 0) return;
|
|
113
|
-
const senderName = ctx.message.from.first_name + (ctx.message.from.last_name ? ` ${ctx.message.from.last_name}` : "");
|
|
114
|
-
const chatTitle = "title" in ctx.chat ? ctx.chat.title : void 0;
|
|
115
|
-
let participantCount = isDM ? 2 : void 0;
|
|
116
|
-
if (!isDM) {
|
|
117
|
-
try {
|
|
118
|
-
participantCount = await ctx.telegram.getChatMembersCount(ctx.chat.id);
|
|
119
|
-
} catch (err) {
|
|
120
|
-
console.warn(`Failed to get member count for chat ${ctx.chat.id}: ${err}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const channelSlug = isDM ? buildChannelSlug("telegram", {
|
|
124
|
-
isDM: true,
|
|
125
|
-
senderName: ctx.message.from.username ?? ctx.message.from.first_name
|
|
126
|
-
}) : buildChannelSlug("telegram", {
|
|
127
|
-
channelName: chatTitle ?? String(ctx.chat.id)
|
|
128
|
-
});
|
|
129
|
-
try {
|
|
130
|
-
writeChannelEntry(env.mindName, channelSlug, {
|
|
131
|
-
platformId: String(ctx.chat.id),
|
|
132
|
-
platform: "telegram",
|
|
133
|
-
name: chatTitle,
|
|
134
|
-
type: isDM ? "dm" : "channel"
|
|
135
|
-
});
|
|
136
|
-
} catch (err) {
|
|
137
|
-
console.error(`[telegram] failed to write channel entry for ${channelSlug}:`, err);
|
|
138
|
-
}
|
|
139
|
-
const payload = {
|
|
140
|
-
content,
|
|
141
|
-
channel: channelSlug,
|
|
142
|
-
sender: senderName,
|
|
143
|
-
platform: "Telegram",
|
|
144
|
-
...isDM ? { isDM: true } : {},
|
|
145
|
-
...chatTitle ? { channelName: chatTitle } : {},
|
|
146
|
-
...participantCount ? { participantCount } : {}
|
|
147
|
-
};
|
|
148
|
-
if (isFollowedChat) {
|
|
149
|
-
const result = await sendToMind(env, payload);
|
|
150
|
-
if (!result.ok)
|
|
151
|
-
ctx.reply(result.error ?? "Failed to process message").catch((err) => {
|
|
152
|
-
console.warn(`[telegram] failed to send error reply: ${err}`);
|
|
153
|
-
});
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
await handleTelegramMessage(ctx, payload);
|
|
157
|
-
});
|
|
158
|
-
async function handleTelegramMessage(ctx, payload) {
|
|
159
|
-
const chatId = ctx.chat.id;
|
|
160
|
-
const typingInterval = setInterval(() => {
|
|
161
|
-
bot.telegram.sendChatAction(chatId, "typing").catch(() => {
|
|
162
|
-
});
|
|
163
|
-
}, TYPING_INTERVAL_MS);
|
|
164
|
-
bot.telegram.sendChatAction(chatId, "typing").catch(() => {
|
|
165
|
-
});
|
|
166
|
-
try {
|
|
167
|
-
const result = await sendToMind(env, payload);
|
|
168
|
-
if (!result.ok)
|
|
169
|
-
ctx.reply(result.error ?? "Failed to process message").catch((err) => {
|
|
170
|
-
console.warn(`[telegram] failed to send error reply: ${err}`);
|
|
171
|
-
});
|
|
172
|
-
} finally {
|
|
173
|
-
clearInterval(typingInterval);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
bot.launch().then(() => {
|
|
177
|
-
console.log(`Connected to Telegram as @${bot.botInfo?.username}`);
|
|
178
|
-
console.log(`Bridging to mind: ${env.mindName} via ${env.baseUrl}/message`);
|
|
179
|
-
if (followedChatIds.length > 0) {
|
|
180
|
-
console.log(`Following chats: ${followedChatIds.join(", ")}`);
|
|
181
|
-
}
|
|
182
|
-
}).catch((err) => {
|
|
183
|
-
console.error("Failed to start Telegram connector:", err);
|
|
184
|
-
process.exit(1);
|
|
185
|
-
});
|
|
186
|
-
process.once("SIGINT", () => bot.stop("SIGINT"));
|
|
187
|
-
process.once("SIGTERM", () => bot.stop("SIGTERM"));
|
package/dist/down-7UKFMJJZ.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
run,
|
|
4
|
-
stopDaemon
|
|
5
|
-
} from "./chunk-OZFKBXD6.js";
|
|
6
|
-
import "./chunk-V63B7DX3.js";
|
|
7
|
-
import "./chunk-YJA7P64S.js";
|
|
8
|
-
import "./chunk-XOXLRRR2.js";
|
|
9
|
-
import "./chunk-B2CPS4QU.js";
|
|
10
|
-
import "./chunk-K3NQKI34.js";
|
|
11
|
-
export {
|
|
12
|
-
run,
|
|
13
|
-
stopDaemon
|
|
14
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
deliverMessage,
|
|
4
|
-
extractTextContent,
|
|
5
|
-
recordInbound
|
|
6
|
-
} from "./chunk-3CFRE2VC.js";
|
|
7
|
-
import "./chunk-HFCBO2GL.js";
|
|
8
|
-
import "./chunk-NWI2425I.js";
|
|
9
|
-
import "./chunk-J2CO4WEV.js";
|
|
10
|
-
import "./chunk-2VO7453N.js";
|
|
11
|
-
import "./chunk-UTL75LP6.js";
|
|
12
|
-
import "./chunk-WBHMQ5OZ.js";
|
|
13
|
-
import "./chunk-YUIHSKR6.js";
|
|
14
|
-
import "./chunk-SIAG3QMM.js";
|
|
15
|
-
import "./chunk-PHU4DEAJ.js";
|
|
16
|
-
import "./chunk-YJA7P64S.js";
|
|
17
|
-
import "./chunk-XOXLRRR2.js";
|
|
18
|
-
import "./chunk-TZKJLDQN.js";
|
|
19
|
-
import "./chunk-B2CPS4QU.js";
|
|
20
|
-
import "./chunk-K3NQKI34.js";
|
|
21
|
-
export {
|
|
22
|
-
deliverMessage,
|
|
23
|
-
extractTextContent,
|
|
24
|
-
recordInbound
|
|
25
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
MindManager,
|
|
4
|
-
getMindManager,
|
|
5
|
-
initMindManager
|
|
6
|
-
} from "./chunk-2VO7453N.js";
|
|
7
|
-
import "./chunk-UTL75LP6.js";
|
|
8
|
-
import "./chunk-WBHMQ5OZ.js";
|
|
9
|
-
import "./chunk-YUIHSKR6.js";
|
|
10
|
-
import "./chunk-PHU4DEAJ.js";
|
|
11
|
-
import "./chunk-XOXLRRR2.js";
|
|
12
|
-
import "./chunk-TZKJLDQN.js";
|
|
13
|
-
import "./chunk-B2CPS4QU.js";
|
|
14
|
-
import "./chunk-K3NQKI34.js";
|
|
15
|
-
export {
|
|
16
|
-
MindManager,
|
|
17
|
-
getMindManager,
|
|
18
|
-
initMindManager
|
|
19
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
SleepManager,
|
|
4
|
-
getSleepManager,
|
|
5
|
-
getSleepManagerIfReady,
|
|
6
|
-
initSleepManager,
|
|
7
|
-
matchesGlob
|
|
8
|
-
} from "./chunk-3CFRE2VC.js";
|
|
9
|
-
import "./chunk-HFCBO2GL.js";
|
|
10
|
-
import "./chunk-NWI2425I.js";
|
|
11
|
-
import "./chunk-J2CO4WEV.js";
|
|
12
|
-
import "./chunk-2VO7453N.js";
|
|
13
|
-
import "./chunk-UTL75LP6.js";
|
|
14
|
-
import "./chunk-WBHMQ5OZ.js";
|
|
15
|
-
import "./chunk-YUIHSKR6.js";
|
|
16
|
-
import "./chunk-SIAG3QMM.js";
|
|
17
|
-
import "./chunk-PHU4DEAJ.js";
|
|
18
|
-
import "./chunk-YJA7P64S.js";
|
|
19
|
-
import "./chunk-XOXLRRR2.js";
|
|
20
|
-
import "./chunk-TZKJLDQN.js";
|
|
21
|
-
import "./chunk-B2CPS4QU.js";
|
|
22
|
-
import "./chunk-K3NQKI34.js";
|
|
23
|
-
export {
|
|
24
|
-
SleepManager,
|
|
25
|
-
getSleepManager,
|
|
26
|
-
getSleepManagerIfReady,
|
|
27
|
-
initSleepManager,
|
|
28
|
-
matchesGlob
|
|
29
|
-
};
|
package/dist/up-SDMCSVI3.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
run
|
|
4
|
-
} from "./chunk-LX22GRG7.js";
|
|
5
|
-
import "./chunk-V63B7DX3.js";
|
|
6
|
-
import "./chunk-YJA7P64S.js";
|
|
7
|
-
import "./chunk-XOXLRRR2.js";
|
|
8
|
-
import "./chunk-D424ZQGI.js";
|
|
9
|
-
import {
|
|
10
|
-
readGlobalConfig
|
|
11
|
-
} from "./chunk-TZKJLDQN.js";
|
|
12
|
-
import "./chunk-B2CPS4QU.js";
|
|
13
|
-
import "./chunk-K3NQKI34.js";
|
|
14
|
-
export {
|
|
15
|
-
readGlobalConfig,
|
|
16
|
-
run
|
|
17
|
-
};
|
package/dist/variant-WWLDY6D5.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
resolveMindName
|
|
4
|
-
} from "./chunk-NAOW2CLO.js";
|
|
5
|
-
import {
|
|
6
|
-
parseArgs
|
|
7
|
-
} from "./chunk-D424ZQGI.js";
|
|
8
|
-
import "./chunk-K3NQKI34.js";
|
|
9
|
-
|
|
10
|
-
// src/commands/variant.ts
|
|
11
|
-
async function run(args) {
|
|
12
|
-
const subcommand = args[0];
|
|
13
|
-
switch (subcommand) {
|
|
14
|
-
case "create":
|
|
15
|
-
await createVariant(args.slice(1));
|
|
16
|
-
break;
|
|
17
|
-
case "list":
|
|
18
|
-
await listVariants(args.slice(1));
|
|
19
|
-
break;
|
|
20
|
-
case "merge":
|
|
21
|
-
await mergeVariant(args.slice(1));
|
|
22
|
-
break;
|
|
23
|
-
case "delete":
|
|
24
|
-
await deleteVariant(args.slice(1));
|
|
25
|
-
break;
|
|
26
|
-
case "--help":
|
|
27
|
-
case "-h":
|
|
28
|
-
case void 0:
|
|
29
|
-
printUsage();
|
|
30
|
-
break;
|
|
31
|
-
default:
|
|
32
|
-
printUsage();
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function printUsage() {
|
|
37
|
-
console.log(`Usage:
|
|
38
|
-
volute variant create <variant> [--mind <name>] [--soul "..."] [--port N] [--no-start] [--json]
|
|
39
|
-
volute variant list [--mind <name>] [--json]
|
|
40
|
-
volute variant merge <variant> [--mind <name>] [--summary "..." --memory "..."] [--skip-verify]
|
|
41
|
-
volute variant delete <variant> [--mind <name>]`);
|
|
42
|
-
}
|
|
43
|
-
async function createVariant(args) {
|
|
44
|
-
const { positional, flags } = parseArgs(args, {
|
|
45
|
-
mind: { type: "string" },
|
|
46
|
-
soul: { type: "string" },
|
|
47
|
-
port: { type: "number" },
|
|
48
|
-
"no-start": { type: "boolean" },
|
|
49
|
-
json: { type: "boolean" }
|
|
50
|
-
});
|
|
51
|
-
const mindName = resolveMindName(flags);
|
|
52
|
-
const variantName = positional[0];
|
|
53
|
-
const { soul, port, json } = flags;
|
|
54
|
-
const noStart = flags["no-start"];
|
|
55
|
-
if (!variantName) {
|
|
56
|
-
console.error(
|
|
57
|
-
'Usage: volute variant create <variant> [--mind <name>] [--soul "..."] [--port N] [--no-start] [--json]'
|
|
58
|
-
);
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
if (!json) console.log("Creating variant via daemon...");
|
|
62
|
-
const { daemonFetch } = await import("./daemon-client-Z7FAJ6JW.js");
|
|
63
|
-
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
64
|
-
const client = getClient();
|
|
65
|
-
const res = await daemonFetch(
|
|
66
|
-
urlOf(client.api.minds[":name"].variants.$url({ param: { name: mindName } })),
|
|
67
|
-
{
|
|
68
|
-
method: "POST",
|
|
69
|
-
headers: { "Content-Type": "application/json" },
|
|
70
|
-
body: JSON.stringify({
|
|
71
|
-
name: variantName,
|
|
72
|
-
...soul && { soul },
|
|
73
|
-
...port && { port },
|
|
74
|
-
...noStart && { noStart }
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
const data = await res.json();
|
|
79
|
-
if (!res.ok) {
|
|
80
|
-
console.error(data.error ?? "Failed to create variant");
|
|
81
|
-
process.exit(1);
|
|
82
|
-
}
|
|
83
|
-
if (json) {
|
|
84
|
-
console.log(JSON.stringify(data.variant, null, 2));
|
|
85
|
-
} else {
|
|
86
|
-
console.log(`
|
|
87
|
-
Variant created: ${variantName}`);
|
|
88
|
-
console.log(` Branch: ${data.variant?.branch}`);
|
|
89
|
-
console.log(` Path: ${data.variant?.path}`);
|
|
90
|
-
console.log(` Port: ${data.variant?.port}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
async function listVariants(args) {
|
|
94
|
-
const { flags } = parseArgs(args, {
|
|
95
|
-
mind: { type: "string" },
|
|
96
|
-
json: { type: "boolean" }
|
|
97
|
-
});
|
|
98
|
-
const mindName = resolveMindName(flags);
|
|
99
|
-
const { json } = flags;
|
|
100
|
-
const { daemonFetch } = await import("./daemon-client-Z7FAJ6JW.js");
|
|
101
|
-
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
102
|
-
const client = getClient();
|
|
103
|
-
const res = await daemonFetch(
|
|
104
|
-
urlOf(client.api.minds[":name"].variants.$url({ param: { name: mindName } }))
|
|
105
|
-
);
|
|
106
|
-
if (!res.ok) {
|
|
107
|
-
const data = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
|
|
108
|
-
console.error(data.error ?? "Failed to list variants");
|
|
109
|
-
process.exit(1);
|
|
110
|
-
}
|
|
111
|
-
const results = await res.json();
|
|
112
|
-
if (results.length === 0) {
|
|
113
|
-
if (json) {
|
|
114
|
-
console.log("[]");
|
|
115
|
-
} else {
|
|
116
|
-
console.log("No variants.");
|
|
117
|
-
}
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (json) {
|
|
121
|
-
console.log(JSON.stringify(results, null, 2));
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
const nameW = Math.max(4, ...results.map((r) => r.name.length));
|
|
125
|
-
const portW = Math.max(4, ...results.map((r) => String(r.port || "-").length));
|
|
126
|
-
console.log(`${"NAME".padEnd(nameW)} ${"PORT".padEnd(portW)} ${"STATUS".padEnd(10)} BRANCH`);
|
|
127
|
-
for (const r of results) {
|
|
128
|
-
console.log(
|
|
129
|
-
`${r.name.padEnd(nameW)} ${String(r.port || "-").padEnd(portW)} ${r.status.padEnd(10)} ${r.branch}`
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
async function mergeVariant(args) {
|
|
134
|
-
const { positional, flags } = parseArgs(args, {
|
|
135
|
-
mind: { type: "string" },
|
|
136
|
-
summary: { type: "string" },
|
|
137
|
-
justification: { type: "string" },
|
|
138
|
-
memory: { type: "string" },
|
|
139
|
-
"skip-verify": { type: "boolean" }
|
|
140
|
-
});
|
|
141
|
-
const mindName = resolveMindName(flags);
|
|
142
|
-
const variantName = positional[0];
|
|
143
|
-
if (!variantName) {
|
|
144
|
-
console.error(
|
|
145
|
-
"Usage: volute variant merge <variant> [--mind <name>] [--summary '...'] [--justification '...'] [--memory '...'] [--skip-verify]"
|
|
146
|
-
);
|
|
147
|
-
process.exit(1);
|
|
148
|
-
}
|
|
149
|
-
console.log(`Merging variant ${variantName}...`);
|
|
150
|
-
const { daemonFetch } = await import("./daemon-client-Z7FAJ6JW.js");
|
|
151
|
-
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
152
|
-
const client = getClient();
|
|
153
|
-
const res = await daemonFetch(
|
|
154
|
-
urlOf(
|
|
155
|
-
client.api.minds[":name"].variants[":variant"].merge.$url({
|
|
156
|
-
param: { name: mindName, variant: variantName }
|
|
157
|
-
})
|
|
158
|
-
),
|
|
159
|
-
{
|
|
160
|
-
method: "POST",
|
|
161
|
-
headers: { "Content-Type": "application/json" },
|
|
162
|
-
body: JSON.stringify({
|
|
163
|
-
...flags.summary && { summary: flags.summary },
|
|
164
|
-
...flags.justification && { justification: flags.justification },
|
|
165
|
-
...flags.memory && { memory: flags.memory },
|
|
166
|
-
...flags["skip-verify"] && { skipVerify: true }
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
const data = await res.json();
|
|
171
|
-
if (!res.ok) {
|
|
172
|
-
console.error(data.error ?? "Failed to merge variant");
|
|
173
|
-
process.exit(1);
|
|
174
|
-
}
|
|
175
|
-
console.log(`Variant ${variantName} merged and cleaned up.`);
|
|
176
|
-
}
|
|
177
|
-
async function deleteVariant(args) {
|
|
178
|
-
const { positional, flags } = parseArgs(args, {
|
|
179
|
-
mind: { type: "string" }
|
|
180
|
-
});
|
|
181
|
-
const mindName = resolveMindName(flags);
|
|
182
|
-
const variantName = positional[0];
|
|
183
|
-
if (!variantName) {
|
|
184
|
-
console.error("Usage: volute variant delete <variant> [--mind <name>]");
|
|
185
|
-
process.exit(1);
|
|
186
|
-
}
|
|
187
|
-
const { daemonFetch } = await import("./daemon-client-Z7FAJ6JW.js");
|
|
188
|
-
const { getClient, urlOf } = await import("./api-client-YPKOZP2O.js");
|
|
189
|
-
const client = getClient();
|
|
190
|
-
const res = await daemonFetch(
|
|
191
|
-
urlOf(
|
|
192
|
-
client.api.minds[":name"].variants[":variant"].$url({
|
|
193
|
-
param: { name: mindName, variant: variantName }
|
|
194
|
-
})
|
|
195
|
-
),
|
|
196
|
-
{ method: "DELETE" }
|
|
197
|
-
);
|
|
198
|
-
const data = await res.json();
|
|
199
|
-
if (!res.ok) {
|
|
200
|
-
console.error(data.error ?? "Failed to delete variant");
|
|
201
|
-
process.exit(1);
|
|
202
|
-
}
|
|
203
|
-
console.log(`Variant ${variantName} deleted.`);
|
|
204
|
-
}
|
|
205
|
-
export {
|
|
206
|
-
run
|
|
207
|
-
};
|