abtars 0.2.2 → 0.2.3-alpha.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/bundle/{_registry.generated-KYX63MGY.js → _registry.generated-KM6LXTNJ.js} +2 -2
- package/bundle/abtars-cli.js +6 -3
- package/bundle/abtars-cli.js.map +2 -2
- package/bundle/abtars.js +29 -28
- package/bundle/abtars.js.map +3 -3
- package/bundle/{agent-registry-PIS5XJHX.js → agent-registry-ABPFQXNL.js} +2 -2
- package/bundle/{chunk-QSC6QZ44.js → chunk-2SFN2VYD.js} +2 -2
- package/bundle/{chunk-BBTQKKDO.js → chunk-2W6JIHZ5.js} +2 -1
- package/bundle/chunk-2W6JIHZ5.js.map +7 -0
- package/bundle/{chunk-3IPMKYYH.js → chunk-6TSCOXF6.js} +56 -25
- package/bundle/chunk-6TSCOXF6.js.map +7 -0
- package/bundle/{chunk-7WFE2JI5.js → chunk-7B3GK5JQ.js} +2 -2
- package/bundle/{chunk-SMZQDMSZ.js → chunk-ENXQMPV3.js} +1 -2
- package/bundle/chunk-ENXQMPV3.js.map +7 -0
- package/bundle/{chunk-N24ROESF.js → chunk-HFPXN6NM.js} +1 -1
- package/bundle/chunk-HFPXN6NM.js.map +7 -0
- package/bundle/{chunk-Y2XBDQP3.js → chunk-SEXVA3GK.js} +144 -37
- package/bundle/chunk-SEXVA3GK.js.map +7 -0
- package/bundle/{commands-LAWVNQTO.js → commands-L6VIMPCR.js} +2 -2
- package/bundle/{direct-api-transport-QIWA5ES2.js → direct-api-transport-BK72AP3I.js} +1 -1
- package/bundle/{direct-api-transport-QIWA5ES2.js.map → direct-api-transport-BK72AP3I.js.map} +2 -2
- package/bundle/{discord-adapter-W6L5KJ6T.js → discord-adapter-DWIQRNDI.js} +3 -3
- package/bundle/{doctor-PIPSGI3H.js → doctor-WHTVSUOF.js} +36 -26
- package/bundle/doctor-WHTVSUOF.js.map +7 -0
- package/bundle/{install-I3CXVW52.js → install-Q4XNCPG7.js} +2 -2
- package/bundle/{message-pipeline-4CTBJ6K2.js → message-pipeline-GCSZCQWO.js} +2 -2
- package/bundle/meta.json +298 -279
- package/bundle/{phase-transport-INFD6ELA.js → phase-transport-F7GQRRYE.js} +3 -3
- package/bundle/{sleep-ENFZFUJJ.js → sleep-MYOZ73IU.js} +2 -2
- package/bundle/{subagent-runtime-5AYOXOU2.js → subagent-runtime-QA4LVU4C.js} +2 -2
- package/bundle/{system-status-7K2QTH3J.js → system-status-KMKPAC5Z.js} +4 -2
- package/bundle/system-status-KMKPAC5Z.js.map +7 -0
- package/bundle/{telegram-adapter-4KI4CJPG.js → telegram-adapter-TRMCC634.js} +7 -4
- package/bundle/telegram-adapter-TRMCC634.js.map +7 -0
- package/config/transport.default.json +2 -1
- package/install-manifest.json +0 -3
- package/package.json +1 -1
- package/scripts/abtars-daemon.service +0 -4
- package/scripts/abtars@.service +0 -4
- package/scripts/build-and-deploy.sh +15 -27
- package/bundle/agent-registry-5VL5KI6U.js +0 -19
- package/bundle/chunk-3IPMKYYH.js.map +0 -7
- package/bundle/chunk-4WKWPU6U.js +0 -1089
- package/bundle/chunk-4WKWPU6U.js.map +0 -7
- package/bundle/chunk-5WFIAUQC.js +0 -672
- package/bundle/chunk-5WFIAUQC.js.map +0 -7
- package/bundle/chunk-B52YRWR6.js +0 -257
- package/bundle/chunk-B52YRWR6.js.map +0 -7
- package/bundle/chunk-BBTQKKDO.js.map +0 -7
- package/bundle/chunk-HAS5NEK7.js +0 -189
- package/bundle/chunk-HAS5NEK7.js.map +0 -7
- package/bundle/chunk-HB54S5OY.js +0 -4036
- package/bundle/chunk-HB54S5OY.js.map +0 -7
- package/bundle/chunk-N24ROESF.js.map +0 -7
- package/bundle/chunk-N7UG4FID.js +0 -4036
- package/bundle/chunk-N7UG4FID.js.map +0 -7
- package/bundle/chunk-PUDGA4RR.js +0 -183
- package/bundle/chunk-QSC6QZ44.js.map +0 -7
- package/bundle/chunk-SMZQDMSZ.js.map +0 -7
- package/bundle/chunk-VY2BUO6L.js +0 -4035
- package/bundle/chunk-VY2BUO6L.js.map +0 -7
- package/bundle/chunk-Y2XBDQP3.js.map +0 -7
- package/bundle/chunk-YMGX6HNP.js +0 -131
- package/bundle/chunk-YMGX6HNP.js.map +0 -7
- package/bundle/commands-IGRSOSK6.js +0 -34
- package/bundle/commands-RBWY7YXB.js +0 -34
- package/bundle/commands-XFZNMZN6.js +0 -34
- package/bundle/direct-api-transport-OZICXTWQ.js +0 -889
- package/bundle/direct-api-transport-OZICXTWQ.js.map +0 -7
- package/bundle/discord-adapter-JFIIVG34.js +0 -589
- package/bundle/discord-adapter-U3FA5OTY.js +0 -589
- package/bundle/discord-adapter-U3FA5OTY.js.map +0 -7
- package/bundle/discord-adapter-W6L5KJ6T.js.map +0 -7
- package/bundle/discord-adapter-WWM6ROTW.js +0 -589
- package/bundle/discord-adapter-WWM6ROTW.js.map +0 -7
- package/bundle/doctor-PIPSGI3H.js.map +0 -7
- package/bundle/kanban-board-6Q5E5GEB.js +0 -31
- package/bundle/kanban-board-6Q5E5GEB.js.map +0 -7
- package/bundle/message-pipeline-4CTBJ6K2.js.map +0 -7
- package/bundle/message-pipeline-4KL7OWUH.js +0 -38
- package/bundle/message-pipeline-4KL7OWUH.js.map +0 -7
- package/bundle/message-pipeline-GFKSHRFU.js +0 -38
- package/bundle/message-pipeline-GFKSHRFU.js.map +0 -7
- package/bundle/message-pipeline-TGI2WJJM.js +0 -38
- package/bundle/message-pipeline-TGI2WJJM.js.map +0 -7
- package/bundle/phase-transport-INFD6ELA.js.map +0 -7
- package/bundle/phase-transport-KXFZ5BVF.js +0 -23
- package/bundle/phase-transport-KXFZ5BVF.js.map +0 -7
- package/bundle/sleep-ENFZFUJJ.js.map +0 -7
- package/bundle/subagent-runtime-5AYOXOU2.js.map +0 -7
- package/bundle/subagent-runtime-VKTX6Q2M.js +0 -13
- package/bundle/subagent-runtime-VKTX6Q2M.js.map +0 -7
- package/bundle/system-status-7K2QTH3J.js.map +0 -7
- package/bundle/telegram-adapter-4KI4CJPG.js.map +0 -7
- package/bundle/telegram-adapter-76B4JRJJ.js +0 -1080
- package/bundle/telegram-adapter-76B4JRJJ.js.map +0 -7
- package/bundle/telegram-adapter-VZA74EMT.js +0 -1080
- package/bundle/telegram-adapter-VZA74EMT.js.map +0 -7
- package/bundle/telegram-adapter-ZO2CLU22.js +0 -1080
- package/bundle/telegram-adapter-ZO2CLU22.js.map +0 -7
- package/bundle/tool-registry-TGNU5AMG.js +0 -43
- package/bundle/tool-registry-TGNU5AMG.js.map +0 -7
- /package/bundle/{_registry.generated-KYX63MGY.js.map → _registry.generated-KM6LXTNJ.js.map} +0 -0
- /package/bundle/{agent-registry-5VL5KI6U.js.map → agent-registry-ABPFQXNL.js.map} +0 -0
- /package/bundle/{chunk-PUDGA4RR.js.map → chunk-2SFN2VYD.js.map} +0 -0
- /package/bundle/{chunk-7WFE2JI5.js.map → chunk-7B3GK5JQ.js.map} +0 -0
- /package/bundle/{agent-registry-PIS5XJHX.js.map → commands-L6VIMPCR.js.map} +0 -0
- /package/bundle/{discord-adapter-JFIIVG34.js.map → discord-adapter-DWIQRNDI.js.map} +0 -0
- /package/bundle/{commands-IGRSOSK6.js.map → install-Q4XNCPG7.js.map} +0 -0
- /package/bundle/{commands-LAWVNQTO.js.map → message-pipeline-GCSZCQWO.js.map} +0 -0
- /package/bundle/{commands-RBWY7YXB.js.map → phase-transport-F7GQRRYE.js.map} +0 -0
- /package/bundle/{commands-XFZNMZN6.js.map → sleep-MYOZ73IU.js.map} +0 -0
- /package/bundle/{install-I3CXVW52.js.map → subagent-runtime-QA4LVU4C.js.map} +0 -0
package/bundle/abtars.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
loadNLMConfig,
|
|
15
15
|
setIdleCompactReset,
|
|
16
16
|
startSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SEXVA3GK.js";
|
|
18
18
|
import {
|
|
19
19
|
require_extension,
|
|
20
20
|
require_permessage_deflate,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
phaseTransport,
|
|
31
31
|
resetAllCtxStarts,
|
|
32
32
|
updateCtxStart
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6TSCOXF6.js";
|
|
34
34
|
import {
|
|
35
35
|
addTaskFailure
|
|
36
36
|
} from "./chunk-ZAA7B5BN.js";
|
|
@@ -38,12 +38,12 @@ import "./chunk-SA6YEFNG.js";
|
|
|
38
38
|
import {
|
|
39
39
|
loadAndValidateConfig
|
|
40
40
|
} from "./chunk-BBDKU4EH.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-7B3GK5JQ.js";
|
|
42
42
|
import "./chunk-PKHYCNTT.js";
|
|
43
43
|
import "./chunk-HJQZP5CK.js";
|
|
44
44
|
import {
|
|
45
45
|
SubagentRuntime
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-2SFN2VYD.js";
|
|
47
47
|
import {
|
|
48
48
|
createCapabilityRegistry
|
|
49
49
|
} from "./chunk-FY3QUO2L.js";
|
|
@@ -195,8 +195,10 @@ for (const envPath of ENV_FILES) {
|
|
|
195
195
|
`);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
function reloadSecrets() {
|
|
199
|
+
if (!existsSync(secretDir)) return;
|
|
200
|
+
let purposeKey = null;
|
|
201
|
+
function getPurposeKey() {
|
|
200
202
|
if (purposeKey) return purposeKey;
|
|
201
203
|
try {
|
|
202
204
|
const abmindHome = process.env["ABMIND_HOME"] ?? resolve(homedir(), ".abmind");
|
|
@@ -210,7 +212,8 @@ if (existsSync(secretDir)) {
|
|
|
210
212
|
} catch {
|
|
211
213
|
return null;
|
|
212
214
|
}
|
|
213
|
-
}
|
|
215
|
+
}
|
|
216
|
+
function decryptFile(raw) {
|
|
214
217
|
const key = getPurposeKey();
|
|
215
218
|
if (!key) return null;
|
|
216
219
|
const buf = Buffer.from(raw.slice(4), "base64");
|
|
@@ -220,16 +223,15 @@ if (existsSync(secretDir)) {
|
|
|
220
223
|
const d = createDecipheriv("aes-256-gcm", key, iv);
|
|
221
224
|
d.setAuthTag(tag);
|
|
222
225
|
return d.update(ct, void 0, "utf-8") + d.final("utf-8");
|
|
223
|
-
}
|
|
226
|
+
}
|
|
227
|
+
function encryptFile(plaintext) {
|
|
224
228
|
const key = getPurposeKey();
|
|
225
229
|
if (!key) return null;
|
|
226
230
|
const iv = randomBytes(12);
|
|
227
231
|
const c = createCipheriv("aes-256-gcm", key, iv);
|
|
228
232
|
const enc = Buffer.concat([c.update(plaintext, "utf-8"), c.final()]);
|
|
229
233
|
return "ENC:" + Buffer.concat([Buffer.from([1]), iv, enc, c.getAuthTag()]).toString("base64");
|
|
230
|
-
}
|
|
231
|
-
getPurposeKey2 = getPurposeKey, decryptFile2 = decryptFile, encryptFile2 = encryptFile;
|
|
232
|
-
let purposeKey = null;
|
|
234
|
+
}
|
|
233
235
|
const SKIP_ENCRYPT = /* @__PURE__ */ new Set(["WEB_AUTH_TOKEN"]);
|
|
234
236
|
for (const file of readdirSync(secretDir)) {
|
|
235
237
|
const fullPath = resolve(secretDir, file);
|
|
@@ -263,9 +265,7 @@ if (existsSync(secretDir)) {
|
|
|
263
265
|
}
|
|
264
266
|
}
|
|
265
267
|
}
|
|
266
|
-
|
|
267
|
-
var decryptFile2;
|
|
268
|
-
var encryptFile2;
|
|
268
|
+
reloadSecrets();
|
|
269
269
|
try {
|
|
270
270
|
const envPath = resolve(home, "config", ".env");
|
|
271
271
|
if (existsSync(envPath)) {
|
|
@@ -1059,12 +1059,12 @@ ${(output || "(no output)").slice(0, 500)}`);
|
|
|
1059
1059
|
}
|
|
1060
1060
|
logInfo(TAG3, `\u25B6 Agent: "${entry.message.slice(0, 60)}"`);
|
|
1061
1061
|
this.setCurrent(entry, 0, "agent");
|
|
1062
|
-
const boardId = kanbanEnqueue(entry.
|
|
1062
|
+
const boardId = kanbanEnqueue(entry.id, "task", entry.id);
|
|
1063
1063
|
kanbanRunning(boardId);
|
|
1064
1064
|
const workspace = join4(abtarsHome(), "workspace", entry.id);
|
|
1065
1065
|
mkdirSync(workspace, { recursive: true });
|
|
1066
1066
|
process.env["WORKSPACE"] = workspace;
|
|
1067
|
-
const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-
|
|
1067
|
+
const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-QA4LVU4C.js");
|
|
1068
1068
|
const runtime = new SubagentRuntime2();
|
|
1069
1069
|
this.timeout = setTimeout(() => {
|
|
1070
1070
|
logWarn(TAG3, `\u23F1\uFE0F Agent "${entry.id}" timed out (30min) \u2014 shutting down runtime`);
|
|
@@ -1223,7 +1223,7 @@ Result: ${result}${pending}
|
|
|
1223
1223
|
Diagnose the root cause. If you can fix it programmatically (config change, script fix, token refresh), do it. If the fix requires human action (manual browser login, external service down), state clearly: "Requires human intervention: <reason>" \u2014 do NOT create a skill or suggest adding error handling (you ARE the error handling). Be concise.`;
|
|
1224
1224
|
void (async () => {
|
|
1225
1225
|
try {
|
|
1226
|
-
const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-
|
|
1226
|
+
const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-QA4LVU4C.js");
|
|
1227
1227
|
const runtime = new SubagentRuntime2();
|
|
1228
1228
|
await runtime.complete("coding", msg, { sessionType: "S" });
|
|
1229
1229
|
await runtime.shutdown();
|
|
@@ -1292,7 +1292,7 @@ Resume with: /task resume <id>`;
|
|
|
1292
1292
|
selfHealerTask: null,
|
|
1293
1293
|
hailMary: ctx.hailMary,
|
|
1294
1294
|
rebuildTransport: async () => {
|
|
1295
|
-
const { rebuildTransport } = await import("./phase-transport-
|
|
1295
|
+
const { rebuildTransport } = await import("./phase-transport-F7GQRRYE.js");
|
|
1296
1296
|
await rebuildTransport(ctx);
|
|
1297
1297
|
},
|
|
1298
1298
|
phaseHealth: ctx.phaseHealth,
|
|
@@ -1342,7 +1342,7 @@ async function phasePlatforms(ctx) {
|
|
|
1342
1342
|
registry.register("telegram", {
|
|
1343
1343
|
configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
|
|
1344
1344
|
async create() {
|
|
1345
|
-
const { TelegramAdapter } = await import("./telegram-adapter-
|
|
1345
|
+
const { TelegramAdapter } = await import("./telegram-adapter-TRMCC634.js");
|
|
1346
1346
|
const adapter = new TelegramAdapter(
|
|
1347
1347
|
{ botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
|
|
1348
1348
|
{ pipeline: pipelineDeps, conversationBuffer, transport, memory, sessionManager: ctx.sessionManager, actionGate: ctx.actionGate }
|
|
@@ -1392,7 +1392,7 @@ async function phasePlatforms(ctx) {
|
|
|
1392
1392
|
registry.register("discord", {
|
|
1393
1393
|
configured: Boolean(config.discord.enabled && config.discord.botToken),
|
|
1394
1394
|
async create() {
|
|
1395
|
-
const { DiscordAdapter } = await import("./discord-adapter-
|
|
1395
|
+
const { DiscordAdapter } = await import("./discord-adapter-DWIQRNDI.js");
|
|
1396
1396
|
const adapter = new DiscordAdapter(
|
|
1397
1397
|
{
|
|
1398
1398
|
botToken: config.discord.botToken,
|
|
@@ -1434,7 +1434,7 @@ async function phasePlatforms(ctx) {
|
|
|
1434
1434
|
async create() {
|
|
1435
1435
|
const { loadIrcConfig } = await import("./irc-config-XN5VW2V4.js");
|
|
1436
1436
|
const { IrcAdapter } = await import("./irc-adapter-HXO5D4SW.js");
|
|
1437
|
-
const { handleInboundMessage } = await import("./message-pipeline-
|
|
1437
|
+
const { handleInboundMessage } = await import("./message-pipeline-GCSZCQWO.js");
|
|
1438
1438
|
const ircConfig = loadIrcConfig();
|
|
1439
1439
|
if (!ircConfig) throw new Error("irc.json missing or empty");
|
|
1440
1440
|
const adapter = new IrcAdapter(ircConfig, {
|
|
@@ -1485,7 +1485,7 @@ async function phaseCapabilities(ctx) {
|
|
|
1485
1485
|
let loaded = [];
|
|
1486
1486
|
let staticCaps;
|
|
1487
1487
|
try {
|
|
1488
|
-
({ capabilities: staticCaps } = await import("./_registry.generated-
|
|
1488
|
+
({ capabilities: staticCaps } = await import("./_registry.generated-KM6LXTNJ.js"));
|
|
1489
1489
|
} catch (err) {
|
|
1490
1490
|
logError("capabilities", `Registry import failed: ${err instanceof Error ? err.message : String(err)}. Loading individually.`);
|
|
1491
1491
|
staticCaps = [];
|
|
@@ -1885,7 +1885,7 @@ function createSelfHealerTask(getTelegramAdapter, allowedUserIds) {
|
|
|
1885
1885
|
autoFixRunning = false;
|
|
1886
1886
|
}, 5 * 60 * 1e3);
|
|
1887
1887
|
try {
|
|
1888
|
-
const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-
|
|
1888
|
+
const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-QA4LVU4C.js");
|
|
1889
1889
|
const runtime = new SubagentRuntime2();
|
|
1890
1890
|
const result = await runtime.complete("coding", rule.instruction);
|
|
1891
1891
|
await runtime.shutdown();
|
|
@@ -2283,7 +2283,7 @@ function createModelHealthTask(ctx) {
|
|
|
2283
2283
|
method: "POST",
|
|
2284
2284
|
headers: { "Content-Type": "application/json", ...apiKey ? { Authorization: `Bearer ${apiKey}` } : {} },
|
|
2285
2285
|
body: JSON.stringify({ model, messages: [{ role: "user", content: "hi" }], max_tokens: 1 }),
|
|
2286
|
-
signal: AbortSignal.timeout(
|
|
2286
|
+
signal: AbortSignal.timeout(3e4)
|
|
2287
2287
|
});
|
|
2288
2288
|
if (!res.ok) {
|
|
2289
2289
|
warnings.push(`\u26A0\uFE0F ${model} \u2014 ${res.status} ${res.statusText} (affects ${agentNames.join(", ")})`);
|
|
@@ -2471,7 +2471,7 @@ async function phaseHeartbeat(ctx) {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
ctx.selfHealerTask = selfHealerTask;
|
|
2473
2473
|
pipelineDeps.selfHealerTask = selfHealerTask;
|
|
2474
|
-
const { registerCommand } = await import("./commands-
|
|
2474
|
+
const { registerCommand } = await import("./commands-L6VIMPCR.js");
|
|
2475
2475
|
for (const [name, handler2] of capabilities.commands) {
|
|
2476
2476
|
registerCommand(name, handler2);
|
|
2477
2477
|
}
|
|
@@ -2501,8 +2501,8 @@ async function phaseSleep(ctx) {
|
|
|
2501
2501
|
logWarn("boot", `${phaseSleep.name}: skipping \u2014 heartbeat not available`);
|
|
2502
2502
|
return "skipped";
|
|
2503
2503
|
}
|
|
2504
|
-
const { createSleepHandle } = await import("./sleep-
|
|
2505
|
-
const { killWakeInhibit } = await import("./commands-
|
|
2504
|
+
const { createSleepHandle } = await import("./sleep-MYOZ73IU.js");
|
|
2505
|
+
const { killWakeInhibit } = await import("./commands-L6VIMPCR.js");
|
|
2506
2506
|
const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
|
|
2507
2507
|
let subagent = null;
|
|
2508
2508
|
const { getEnv: getEnv2 } = await import("./env-schema-T43X43BU.js");
|
|
@@ -3495,7 +3495,7 @@ async function handleEmbeddings(body, memory) {
|
|
|
3495
3495
|
};
|
|
3496
3496
|
}
|
|
3497
3497
|
const inputs = Array.isArray(req.input) ? req.input : [req.input];
|
|
3498
|
-
const vectors = await provider.batchEmbed(inputs);
|
|
3498
|
+
const vectors = (await provider.batchEmbed(inputs)).map((v) => v ? Array.from(v) : null);
|
|
3499
3499
|
if (vectors.some((v) => v === null)) {
|
|
3500
3500
|
return {
|
|
3501
3501
|
status: 502,
|
|
@@ -4234,6 +4234,7 @@ process.on("unhandledRejection", (reason) => {
|
|
|
4234
4234
|
if (code !== 0) process.exit(code);
|
|
4235
4235
|
logInfo("main", "\u267B\uFE0F Bridge restart requested \u2014 restarting...");
|
|
4236
4236
|
_resetEnv();
|
|
4237
|
+
reloadSecrets();
|
|
4237
4238
|
resetAbmindCache();
|
|
4238
4239
|
initEnv();
|
|
4239
4240
|
}
|