abtars 0.2.1 → 0.2.2

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.
Files changed (114) hide show
  1. package/bundle/{_registry.generated-FNJOX7VV.js → _registry.generated-KYX63MGY.js} +3 -3
  2. package/bundle/abtars-cli.js +66 -14
  3. package/bundle/abtars-cli.js.map +3 -3
  4. package/bundle/abtars.js +109 -53
  5. package/bundle/abtars.js.map +3 -3
  6. package/bundle/{agent-registry-S2MNHQYQ.js → agent-registry-5VL5KI6U.js} +3 -3
  7. package/bundle/agent-registry-PIS5XJHX.js +19 -0
  8. package/bundle/{chunk-HCYENZAB.js → chunk-3IPMKYYH.js} +5 -5
  9. package/bundle/{chunk-WLAVZSVZ.js → chunk-4WKWPU6U.js} +70 -2
  10. package/bundle/chunk-4WKWPU6U.js.map +7 -0
  11. package/bundle/chunk-5WFIAUQC.js +672 -0
  12. package/bundle/chunk-5WFIAUQC.js.map +7 -0
  13. package/bundle/{chunk-2SWKJX64.js → chunk-7WFE2JI5.js} +3 -3
  14. package/bundle/{chunk-3X6VGRL6.js → chunk-B52YRWR6.js} +2 -1
  15. package/bundle/chunk-B52YRWR6.js.map +7 -0
  16. package/bundle/chunk-BBTQKKDO.js +258 -0
  17. package/bundle/chunk-BBTQKKDO.js.map +7 -0
  18. package/bundle/chunk-GXKJKYU4.js +1089 -0
  19. package/bundle/chunk-GXKJKYU4.js.map +7 -0
  20. package/bundle/chunk-HAS5NEK7.js +189 -0
  21. package/bundle/chunk-HAS5NEK7.js.map +7 -0
  22. package/bundle/chunk-HB54S5OY.js +4036 -0
  23. package/bundle/chunk-HB54S5OY.js.map +7 -0
  24. package/bundle/{chunk-Z4SWEFIY.js → chunk-N24ROESF.js} +4 -4
  25. package/bundle/chunk-N7UG4FID.js +4036 -0
  26. package/bundle/chunk-N7UG4FID.js.map +7 -0
  27. package/bundle/{chunk-MHK4UPM6.js → chunk-PKHYCNTT.js} +1 -1
  28. package/bundle/{chunk-QIAFGDRL.js → chunk-PUDGA4RR.js} +4 -4
  29. package/bundle/chunk-QSC6QZ44.js +183 -0
  30. package/bundle/chunk-QSC6QZ44.js.map +7 -0
  31. package/bundle/{chunk-KL5QRHHK.js → chunk-SMZQDMSZ.js} +1 -1
  32. package/bundle/{chunk-OGZXYN6E.js → chunk-VY2BUO6L.js} +64 -13
  33. package/bundle/chunk-VY2BUO6L.js.map +7 -0
  34. package/bundle/chunk-W6ELWLAR.js +143 -0
  35. package/bundle/chunk-W6ELWLAR.js.map +7 -0
  36. package/bundle/chunk-Y2XBDQP3.js +4055 -0
  37. package/bundle/chunk-Y2XBDQP3.js.map +7 -0
  38. package/bundle/chunk-YMGX6HNP.js +131 -0
  39. package/bundle/chunk-YMGX6HNP.js.map +7 -0
  40. package/bundle/{commands-AXW7L2MZ.js → commands-IGRSOSK6.js} +5 -5
  41. package/bundle/commands-LAWVNQTO.js +34 -0
  42. package/bundle/commands-RBWY7YXB.js +34 -0
  43. package/bundle/commands-XFZNMZN6.js +34 -0
  44. package/bundle/{direct-api-transport-LSAUIP5S.js → direct-api-transport-OZICXTWQ.js} +18 -2
  45. package/bundle/direct-api-transport-OZICXTWQ.js.map +7 -0
  46. package/bundle/direct-api-transport-QIWA5ES2.js +889 -0
  47. package/bundle/direct-api-transport-QIWA5ES2.js.map +7 -0
  48. package/bundle/{discord-adapter-LNWTIOUK.js → discord-adapter-JFIIVG34.js} +6 -6
  49. package/bundle/discord-adapter-U3FA5OTY.js +589 -0
  50. package/bundle/discord-adapter-U3FA5OTY.js.map +7 -0
  51. package/bundle/discord-adapter-W6L5KJ6T.js +589 -0
  52. package/bundle/discord-adapter-W6L5KJ6T.js.map +7 -0
  53. package/bundle/discord-adapter-WWM6ROTW.js +589 -0
  54. package/bundle/discord-adapter-WWM6ROTW.js.map +7 -0
  55. package/bundle/{install-FZT43PTH.js → install-I3CXVW52.js} +2 -2
  56. package/bundle/kanban-board-6Q5E5GEB.js +31 -0
  57. package/bundle/kanban-board-I52RHNHQ.js +31 -0
  58. package/bundle/kanban-board-I52RHNHQ.js.map +7 -0
  59. package/bundle/{message-pipeline-QX272U5X.js → message-pipeline-4CTBJ6K2.js} +5 -5
  60. package/bundle/message-pipeline-4CTBJ6K2.js.map +7 -0
  61. package/bundle/message-pipeline-4KL7OWUH.js +38 -0
  62. package/bundle/message-pipeline-4KL7OWUH.js.map +7 -0
  63. package/bundle/message-pipeline-GFKSHRFU.js +38 -0
  64. package/bundle/message-pipeline-GFKSHRFU.js.map +7 -0
  65. package/bundle/message-pipeline-TGI2WJJM.js +38 -0
  66. package/bundle/message-pipeline-TGI2WJJM.js.map +7 -0
  67. package/bundle/meta.json +784 -600
  68. package/bundle/{phase-transport-BSGROTHY.js → phase-transport-INFD6ELA.js} +4 -4
  69. package/bundle/phase-transport-INFD6ELA.js.map +7 -0
  70. package/bundle/phase-transport-KXFZ5BVF.js +23 -0
  71. package/bundle/phase-transport-KXFZ5BVF.js.map +7 -0
  72. package/bundle/{sleep-K7EXAFGW.js → sleep-ENFZFUJJ.js} +3 -3
  73. package/bundle/sleep-ENFZFUJJ.js.map +7 -0
  74. package/bundle/{subagent-runtime-FQAT3564.js → subagent-runtime-5AYOXOU2.js} +2 -2
  75. package/bundle/subagent-runtime-5AYOXOU2.js.map +7 -0
  76. package/bundle/subagent-runtime-VKTX6Q2M.js +13 -0
  77. package/bundle/subagent-runtime-VKTX6Q2M.js.map +7 -0
  78. package/bundle/{telegram-adapter-LXLSG4SK.js → telegram-adapter-4KI4CJPG.js} +7 -7
  79. package/bundle/telegram-adapter-76B4JRJJ.js +1080 -0
  80. package/bundle/telegram-adapter-76B4JRJJ.js.map +7 -0
  81. package/bundle/telegram-adapter-VZA74EMT.js +1080 -0
  82. package/bundle/telegram-adapter-VZA74EMT.js.map +7 -0
  83. package/bundle/telegram-adapter-ZO2CLU22.js +1080 -0
  84. package/bundle/telegram-adapter-ZO2CLU22.js.map +7 -0
  85. package/bundle/{tool-registry-5PXNSYOI.js → tool-registry-CG7GIS64.js} +3 -2
  86. package/bundle/tool-registry-CG7GIS64.js.map +7 -0
  87. package/bundle/tool-registry-TGNU5AMG.js +43 -0
  88. package/bundle/tool-registry-TGNU5AMG.js.map +7 -0
  89. package/install-manifest.json +4 -0
  90. package/package.json +2 -1
  91. package/scripts/abtars-daemon.service +3 -0
  92. package/scripts/abtars@.service +3 -0
  93. package/scripts/build-and-deploy.sh +40 -0
  94. package/bundle/chunk-3X6VGRL6.js.map +0 -7
  95. package/bundle/chunk-OGZXYN6E.js.map +0 -7
  96. package/bundle/chunk-WLAVZSVZ.js.map +0 -7
  97. package/bundle/direct-api-transport-LSAUIP5S.js.map +0 -7
  98. /package/bundle/{_registry.generated-FNJOX7VV.js.map → _registry.generated-KYX63MGY.js.map} +0 -0
  99. /package/bundle/{agent-registry-S2MNHQYQ.js.map → agent-registry-5VL5KI6U.js.map} +0 -0
  100. /package/bundle/{commands-AXW7L2MZ.js.map → agent-registry-PIS5XJHX.js.map} +0 -0
  101. /package/bundle/{chunk-HCYENZAB.js.map → chunk-3IPMKYYH.js.map} +0 -0
  102. /package/bundle/{chunk-2SWKJX64.js.map → chunk-7WFE2JI5.js.map} +0 -0
  103. /package/bundle/{chunk-Z4SWEFIY.js.map → chunk-N24ROESF.js.map} +0 -0
  104. /package/bundle/{chunk-MHK4UPM6.js.map → chunk-PKHYCNTT.js.map} +0 -0
  105. /package/bundle/{chunk-QIAFGDRL.js.map → chunk-PUDGA4RR.js.map} +0 -0
  106. /package/bundle/{chunk-KL5QRHHK.js.map → chunk-SMZQDMSZ.js.map} +0 -0
  107. /package/bundle/{install-FZT43PTH.js.map → commands-IGRSOSK6.js.map} +0 -0
  108. /package/bundle/{message-pipeline-QX272U5X.js.map → commands-LAWVNQTO.js.map} +0 -0
  109. /package/bundle/{phase-transport-BSGROTHY.js.map → commands-RBWY7YXB.js.map} +0 -0
  110. /package/bundle/{sleep-K7EXAFGW.js.map → commands-XFZNMZN6.js.map} +0 -0
  111. /package/bundle/{discord-adapter-LNWTIOUK.js.map → discord-adapter-JFIIVG34.js.map} +0 -0
  112. /package/bundle/{subagent-runtime-FQAT3564.js.map → install-I3CXVW52.js.map} +0 -0
  113. /package/bundle/{tool-registry-5PXNSYOI.js.map → kanban-board-6Q5E5GEB.js.map} +0 -0
  114. /package/bundle/{telegram-adapter-LXLSG4SK.js.map → telegram-adapter-4KI4CJPG.js.map} +0 -0
@@ -6,14 +6,14 @@ import {
6
6
  import "./chunk-DHPFI7OF.js";
7
7
  import {
8
8
  sleep_exports
9
- } from "./chunk-Z4SWEFIY.js";
9
+ } from "./chunk-N24ROESF.js";
10
10
  import {
11
11
  hotskills_exports,
12
12
  init_hotskills
13
13
  } from "./chunk-NIYVCGBC.js";
14
14
  import "./chunk-ITB2K6LI.js";
15
- import "./chunk-JAJ3DUQ2.js";
16
15
  import "./chunk-HAF2AFBW.js";
16
+ import "./chunk-JAJ3DUQ2.js";
17
17
  import "./chunk-RTL7HO3N.js";
18
18
  import "./chunk-TBLYGCPQ.js";
19
19
  import "./chunk-H7RX7UCR.js";
@@ -36,4 +36,4 @@ var capabilities = [
36
36
  export {
37
37
  capabilities
38
38
  };
39
- //# sourceMappingURL=_registry.generated-FNJOX7VV.js.map
39
+ //# sourceMappingURL=_registry.generated-KYX63MGY.js.map
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
3
3
  import {
4
4
  install
5
- } from "./chunk-KL5QRHHK.js";
5
+ } from "./chunk-SMZQDMSZ.js";
6
6
  import {
7
7
  rollback
8
8
  } from "./chunk-EKHNWFEQ.js";
@@ -337,7 +337,7 @@ var ABMIND_EXCLUDE = [
337
337
  "*.db-wal",
338
338
  "*.db-shm"
339
339
  ];
340
- var CONFIG_DIRS = ["config", "secret", "tasks", "skills", "core", "agents"];
340
+ var CONFIG_DIRS = ["config", "secret", "tasks", "skills", "core", "agents", "kanban"];
341
341
  async function backup(opts = {}) {
342
342
  const abHome = abtarsHome();
343
343
  const abmindHome = process.env["ABMIND_HOME"] ?? join4(dirname(abHome), ".abmind");
@@ -1316,11 +1316,11 @@ import { hostname } from "node:os";
1316
1316
  import { join as join10 } from "node:path";
1317
1317
  import { readFileSync as readFileSync6, writeFileSync as writeFileSync3, existsSync as existsSync8 } from "node:fs";
1318
1318
  import { copyFile as copyFile2, mkdir as mkdir4, chmod, readdir } from "node:fs/promises";
1319
- import { rmSync as rmSync2, cpSync, readdirSync as readdirSync3, mkdirSync as mkdirSync2 } from "node:fs";
1319
+ import { rmSync as rmSync2, cpSync as cpSync2, readdirSync as readdirSync3, mkdirSync as mkdirSync2, copyFileSync } from "node:fs";
1320
1320
 
1321
1321
  // src/cli/update-sources/local.ts
1322
1322
  import { spawnSync as spawnSync2 } from "node:child_process";
1323
- import { existsSync as existsSync6 } from "node:fs";
1323
+ import { existsSync as existsSync6, cpSync } from "node:fs";
1324
1324
  import { copyFile, cp, mkdir as mkdir2, readFile as readFile2, rm, writeFile as writeFile2 } from "node:fs/promises";
1325
1325
  import { join as join8 } from "node:path";
1326
1326
  var LocalBuildError = class extends Error {
@@ -1426,7 +1426,11 @@ function makeLocalBuildSource(opts = {}) {
1426
1426
  if (opts.skipInstall !== true) {
1427
1427
  runCmd("npm", ["install", "--no-audit", "--no-fund"], repoRoot);
1428
1428
  }
1429
- runCmd("npm", ["run", "bundle"], repoRoot);
1429
+ runCmd("node", ["esbuild.config.js"], repoRoot);
1430
+ const publicSrc = join8(repoRoot, "src", "components", "dashboard", "public");
1431
+ if (existsSync6(publicSrc)) cpSync(publicSrc, join8(repoRoot, "bundle", "public"), { recursive: true });
1432
+ const agentsSrc = join8(repoRoot, "agents");
1433
+ if (existsSync6(agentsSrc)) cpSync(agentsSrc, join8(repoRoot, "bundle", "agents"), { recursive: true });
1430
1434
  const stagedPath = ctx.stagingDir;
1431
1435
  await rm(stagedPath, { recursive: true, force: true });
1432
1436
  await mkdir2(stagedPath, { recursive: true });
@@ -1622,6 +1626,7 @@ Use --source local (default) or --source npm.
1622
1626
  writeSentinel(paths.home, { ...sentinelData, status: "success" });
1623
1627
  process.stdout.write(`\u2713 Bridge healthy (PID ${health.pid}, tick at ${new Date(health.heartbeat).toISOString()})
1624
1628
  `);
1629
+ await syncAssets(paths.home, staged.stagedPath);
1625
1630
  return 0;
1626
1631
  }
1627
1632
  process.stderr.write(`\u274C Bridge unhealthy after 60s. Auto-rolling back...
@@ -1672,16 +1677,20 @@ async function copyAbmind(stagedPath, repoRoot) {
1672
1677
  if (existsSync8(distDir)) {
1673
1678
  const dest = join10(stagedPath, "bundle", "node_modules", "abmind");
1674
1679
  mkdirSync2(dest, { recursive: true });
1675
- cpSync(distDir, join10(dest, "dist"), { recursive: true });
1676
- if (existsSync8(join10(src, "package.json"))) cpSync(join10(src, "package.json"), join10(dest, "package.json"));
1677
- if (existsSync8(join10(src, "prompts"))) cpSync(join10(src, "prompts"), join10(dest, "prompts"), { recursive: true });
1680
+ cpSync2(distDir, join10(dest, "dist"), { recursive: true });
1681
+ if (existsSync8(join10(src, "package.json"))) cpSync2(join10(src, "package.json"), join10(dest, "package.json"));
1682
+ if (existsSync8(join10(src, "prompts"))) cpSync2(join10(src, "prompts"), join10(dest, "prompts"), { recursive: true });
1678
1683
  const stalePath = join10(stagedPath, "node_modules", "abmind");
1679
1684
  if (existsSync8(stalePath)) rmSync2(stalePath, { recursive: true });
1680
1685
  try {
1681
1686
  const pkg = JSON.parse(readFileSync6(join10(dest, "package.json"), "utf-8"));
1682
1687
  const abmindHome = process.env["ABMIND_HOME"] ?? join10(process.env["HOME"] ?? "", ".abmind");
1683
1688
  mkdirSync2(abmindHome, { recursive: true });
1684
- const manifest = { version: pkg.version, activatedAt: (/* @__PURE__ */ new Date()).toISOString(), source: "local" };
1689
+ const { spawnSync: spawnSync4 } = await import("node:child_process");
1690
+ const gitResult = spawnSync4("git", ["-C", src, "rev-parse", "--short", "HEAD"], { encoding: "utf-8" });
1691
+ const commit = gitResult.status === 0 ? gitResult.stdout.trim() : "";
1692
+ const version = commit ? `${pkg.version}-${commit}` : pkg.version;
1693
+ const manifest = { version, activatedAt: (/* @__PURE__ */ new Date()).toISOString(), source: "local" };
1685
1694
  writeFileSync3(join10(abmindHome, "manifest.json"), JSON.stringify(manifest, null, 2) + "\n");
1686
1695
  } catch {
1687
1696
  }
@@ -1709,7 +1718,7 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
1709
1718
  }
1710
1719
  process.stdout.write(`\u2713 scripts refreshed (${scriptFiles.length} files)
1711
1720
  `);
1712
- const { writeWrapper } = await import("./install-FZT43PTH.js");
1721
+ const { writeWrapper } = await import("./install-I3CXVW52.js");
1713
1722
  await mkdir4(paths.bin, { recursive: true });
1714
1723
  for (const name of installManifest.cliWrappers) {
1715
1724
  await writeWrapper(paths.bin, name, paths.app, false);
@@ -1720,7 +1729,7 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
1720
1729
  const skillsCoreDst = join10(paths.home, "skills", "core");
1721
1730
  if (existsSync8(skillsCoreSrc)) {
1722
1731
  rmSync2(skillsCoreDst, { recursive: true, force: true });
1723
- cpSync(skillsCoreSrc, skillsCoreDst, { recursive: true });
1732
+ cpSync2(skillsCoreSrc, skillsCoreDst, { recursive: true });
1724
1733
  const files = readdirSync3(skillsCoreDst, { recursive: true });
1725
1734
  const count = files.filter((f) => f.endsWith("SKILL.md")).length;
1726
1735
  process.stdout.write(`\u2713 skills/core synced (${count} skills)
@@ -1735,13 +1744,13 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
1735
1744
  for (const f of readdirSync3(releaseConfig)) {
1736
1745
  const src = join10(releaseConfig, f);
1737
1746
  if (f.endsWith(".example")) {
1738
- cpSync(src, join10(destConfig, f));
1747
+ cpSync2(src, join10(destConfig, f));
1739
1748
  const target = join10(destConfig, f.replace(".example", ""));
1740
- if (!existsSync8(target)) cpSync(src, target);
1749
+ if (!existsSync8(target)) cpSync2(src, target);
1741
1750
  }
1742
1751
  }
1743
1752
  const defaultTransport = join10(releaseConfig, "transport.default.json");
1744
- if (existsSync8(defaultTransport)) cpSync(defaultTransport, join10(destConfig, "transport.default.json"));
1753
+ if (existsSync8(defaultTransport)) cpSync2(defaultTransport, join10(destConfig, "transport.default.json"));
1745
1754
  }
1746
1755
  const transportJson = join10(paths.home, "config", "transport.json");
1747
1756
  if (existsSync8(transportJson)) {
@@ -1869,6 +1878,49 @@ async function checkForUpdates(home, opts) {
1869
1878
  `);
1870
1879
  return 2;
1871
1880
  }
1881
+ async function syncAssets(home, stagedPath) {
1882
+ const abmindBundle = join10(home, "app", "bundle", "node_modules", "abmind");
1883
+ const abmindHome = process.env["ABMIND_HOME"] ?? join10(process.env["HOME"] ?? "", ".abmind");
1884
+ const coreDir = join10(abmindHome, "memory", "core");
1885
+ mkdirSync2(coreDir, { recursive: true });
1886
+ const mtSrc = join10(abmindBundle, "dist", "core", "memory-tools.md");
1887
+ if (existsSync8(mtSrc)) copyFileSync(mtSrc, join10(coreDir, "memory-tools.md"));
1888
+ for (const file of ["core_facts.md", "agent_notes.md"]) {
1889
+ const src = join10(abmindBundle, "templates", "core", file);
1890
+ if (!existsSync8(src)) continue;
1891
+ const live = join10(coreDir, file);
1892
+ if (!existsSync8(live)) {
1893
+ copyFileSync(src, live);
1894
+ } else {
1895
+ copyFileSync(src, join10(coreDir, file.replace(".md", ".template.md")));
1896
+ }
1897
+ }
1898
+ const sleepSrc = join10(abmindBundle, "prompts", "sleep");
1899
+ if (existsSync8(sleepSrc)) {
1900
+ const sleepDst = join10(abmindHome, "prompts", "sleep");
1901
+ mkdirSync2(sleepDst, { recursive: true });
1902
+ for (const f of readdirSync3(sleepSrc)) {
1903
+ copyFileSync(join10(sleepSrc, f), join10(sleepDst, f));
1904
+ }
1905
+ }
1906
+ const skillsSrc = join10(home, "app", "core", "skills");
1907
+ if (existsSync8(skillsSrc)) {
1908
+ const skillsDst = join10(home, "skills", "core");
1909
+ mkdirSync2(skillsDst, { recursive: true });
1910
+ cpSync2(skillsSrc, skillsDst, { recursive: true });
1911
+ }
1912
+ const agentSrc = join10(home, "app", "bundle", "agents", "default.md");
1913
+ if (existsSync8(agentSrc)) {
1914
+ const agentDst = join10(home, "agents");
1915
+ mkdirSync2(agentDst, { recursive: true });
1916
+ const live = join10(agentDst, "default.md");
1917
+ if (!existsSync8(live)) {
1918
+ copyFileSync(agentSrc, live);
1919
+ } else {
1920
+ copyFileSync(agentSrc, join10(agentDst, "default.template.md"));
1921
+ }
1922
+ }
1923
+ }
1872
1924
 
1873
1925
  // src/cli/abtars.ts
1874
1926
  process.umask(63);