@michael-joseph-miller/ant-bot 0.1.0 → 0.1.1

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 (39) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/README.md +69 -24
  3. package/dist/{browser-OHRD7YI3.js → browser-3UAU6ARY.js} +3 -3
  4. package/dist/{browser-OHRD7YI3.js.map → browser-3UAU6ARY.js.map} +1 -1
  5. package/dist/{bundled-46DUK5PG.js → bundled-26SJR7EB.js} +5 -5
  6. package/dist/{bundled-46DUK5PG.js.map → bundled-26SJR7EB.js.map} +1 -1
  7. package/dist/{chunk-AHAON6J7.js → chunk-CNCHYZVD.js} +2 -2
  8. package/dist/{chunk-AHAON6J7.js.map → chunk-CNCHYZVD.js.map} +1 -1
  9. package/dist/{chunk-Z2YT2PZN.js → chunk-GYWJUW4E.js} +6 -6
  10. package/dist/{chunk-Z2YT2PZN.js.map → chunk-GYWJUW4E.js.map} +3 -3
  11. package/dist/{chunk-7BOHBPB2.js → chunk-JCZBDGBA.js} +3 -3
  12. package/dist/{chunk-7BOHBPB2.js.map → chunk-JCZBDGBA.js.map} +1 -1
  13. package/dist/{chunk-KSQOVWP5.js → chunk-MSSHR6SW.js} +6 -6
  14. package/dist/chunk-MSSHR6SW.js.map +7 -0
  15. package/dist/{chunk-DYIJTUMY.js → chunk-XMIPBKUY.js} +8 -7
  16. package/dist/{chunk-DYIJTUMY.js.map → chunk-XMIPBKUY.js.map} +3 -3
  17. package/dist/index.js +28 -28
  18. package/dist/index.js.map +2 -2
  19. package/dist/{install-IY2M3OUQ.js → install-KTEW2CW3.js} +3 -3
  20. package/dist/{plugin-POMHVGD4.js → plugin-WYUCG6F7.js} +2 -2
  21. package/dist/{plugin-POMHVGD4.js.map → plugin-WYUCG6F7.js.map} +1 -1
  22. package/dist/{scheduler-Q7OHNGP6.js → scheduler-VZVHQWGD.js} +3 -3
  23. package/dist/scheduler-VZVHQWGD.js.map +7 -0
  24. package/dist/server.js +41 -41
  25. package/dist/server.js.map +3 -3
  26. package/dist/{skills-66WRX64H.js → skills-JUHWFBD6.js} +2 -2
  27. package/dist/skills-spec.js +2 -2
  28. package/dist/skills-spec.js.map +1 -1
  29. package/dist/{tools-P5537ASX.js → tools-YNE7ZRPR.js} +2 -2
  30. package/dist/{tools-P5537ASX.js.map → tools-YNE7ZRPR.js.map} +1 -1
  31. package/package.json +1 -1
  32. package/skills/README.md +1 -1
  33. package/web/dist/assets/index-CrbtUidR.js +130 -0
  34. package/web/dist/index.html +1 -1
  35. package/dist/chunk-KSQOVWP5.js.map +0 -7
  36. package/dist/scheduler-Q7OHNGP6.js.map +0 -7
  37. package/web/dist/assets/index-BLQ8rPiN.js +0 -130
  38. /package/dist/{install-IY2M3OUQ.js.map → install-KTEW2CW3.js.map} +0 -0
  39. /package/dist/{skills-66WRX64H.js.map → skills-JUHWFBD6.js.map} +0 -0
package/dist/server.js CHANGED
@@ -14,25 +14,25 @@ import {
14
14
  SettingsPatchSchema,
15
15
  SettingsSchema,
16
16
  UpdateBotRequest
17
- } from "./chunk-DYIJTUMY.js";
17
+ } from "./chunk-XMIPBKUY.js";
18
18
  import {
19
19
  findWebDist,
20
20
  nodeLocateDeps,
21
21
  readPackageVersion
22
- } from "./chunk-Z2YT2PZN.js";
22
+ } from "./chunk-GYWJUW4E.js";
23
23
  import {
24
24
  describeSkillSource
25
- } from "./chunk-7BOHBPB2.js";
25
+ } from "./chunk-JCZBDGBA.js";
26
26
  import {
27
27
  newId,
28
28
  now,
29
29
  slugify
30
- } from "./chunk-KSQOVWP5.js";
30
+ } from "./chunk-MSSHR6SW.js";
31
31
  import {
32
32
  logger
33
- } from "./chunk-AHAON6J7.js";
33
+ } from "./chunk-CNCHYZVD.js";
34
34
 
35
- // packages/server/src/api/server.ts
35
+ // daemon/src/api/server.ts
36
36
  import path11 from "node:path";
37
37
  import { fileURLToPath as fileURLToPath2 } from "node:url";
38
38
  import { createRequire } from "node:module";
@@ -42,19 +42,19 @@ import multipart from "@fastify/multipart";
42
42
  import websocket from "@fastify/websocket";
43
43
  import fastifyStatic from "@fastify/static";
44
44
 
45
- // packages/server/src/app.ts
45
+ // daemon/src/app.ts
46
46
  import path8 from "node:path";
47
47
 
48
- // packages/server/src/db/db.ts
48
+ // daemon/src/db/db.ts
49
49
  import Database from "better-sqlite3";
50
50
  import fs2 from "node:fs";
51
51
  import path2 from "node:path";
52
52
 
53
- // packages/server/src/db/migrations.ts
53
+ // daemon/src/db/migrations.ts
54
54
  import fs from "node:fs";
55
55
  import path from "node:path";
56
56
 
57
- // packages/server/src/db/schema.ts
57
+ // daemon/src/db/schema.ts
58
58
  var SCHEMA_SQL = `
59
59
  CREATE TABLE IF NOT EXISTS bots (
60
60
  id TEXT PRIMARY KEY, slug TEXT UNIQUE NOT NULL, name TEXT NOT NULL,
@@ -149,7 +149,7 @@ CREATE TRIGGER IF NOT EXISTS messages_au AFTER UPDATE ON messages BEGIN
149
149
  END;
150
150
  `;
151
151
 
152
- // packages/server/src/db/migrations.ts
152
+ // daemon/src/db/migrations.ts
153
153
  var MigrationError = class extends Error {
154
154
  constructor(code, message) {
155
155
  super(message);
@@ -244,7 +244,7 @@ function migrate(db, opts = {}) {
244
244
  return { from, to: target, applied, backupPath };
245
245
  }
246
246
 
247
- // packages/server/src/db/db.ts
247
+ // daemon/src/db/db.ts
248
248
  var log = logger("db");
249
249
  function openDb(file, opts = {}) {
250
250
  if (file !== ":memory:") fs2.mkdirSync(path2.dirname(file), { recursive: true });
@@ -262,7 +262,7 @@ function openDb(file, opts = {}) {
262
262
  return db;
263
263
  }
264
264
 
265
- // packages/server/src/db/store.ts
265
+ // daemon/src/db/store.ts
266
266
  var b = (v) => v === 1 || v === true;
267
267
  var i = (v, d = false) => v ?? d ? 1 : 0;
268
268
  var toBot = (r) => ({
@@ -835,7 +835,7 @@ var Store = class {
835
835
  }
836
836
  };
837
837
 
838
- // packages/server/src/util/bus.ts
838
+ // daemon/src/util/bus.ts
839
839
  import { EventEmitter } from "node:events";
840
840
  var EventBus = class {
841
841
  emitter = new EventEmitter();
@@ -865,7 +865,7 @@ var EventBus = class {
865
865
  }
866
866
  };
867
867
 
868
- // packages/server/src/permissions/rules.ts
868
+ // daemon/src/permissions/rules.ts
869
869
  var log2 = logger("rules");
870
870
  function globToRegExp(glob) {
871
871
  const escaped = glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
@@ -954,7 +954,7 @@ function seedBuiltinRules(store) {
954
954
  if (added.length) log2.info(`seeded ${added.length} builtin permission rule(s): ${added.join(", ")}`);
955
955
  }
956
956
 
957
- // packages/server/src/permissions/local.ts
957
+ // daemon/src/permissions/local.ts
958
958
  import path3 from "node:path";
959
959
  var HOME_ISH = /(^|[\s"'=:])(~|\$HOME)\//;
960
960
  var URL_RE = /\b[a-z][a-z0-9+.-]*:\/\/\S+/gi;
@@ -1006,7 +1006,7 @@ function localDecision(policy, reach) {
1006
1006
  return { action: "require", reason: `Touches ${reach.evidence}, outside the shared workspace (your own machine)` };
1007
1007
  }
1008
1008
 
1009
- // packages/server/src/permissions/gateway.ts
1009
+ // daemon/src/permissions/gateway.ts
1010
1010
  var log3 = logger("gateway");
1011
1011
  function summarize(namespacedToolName, input) {
1012
1012
  const o = input ?? {};
@@ -1185,10 +1185,10 @@ var PermissionGateway = class {
1185
1185
  }
1186
1186
  };
1187
1187
 
1188
- // packages/server/src/permissions/autoreview.ts
1188
+ // daemon/src/permissions/autoreview.ts
1189
1189
  import { query as query2 } from "@anthropic-ai/claude-agent-sdk";
1190
1190
 
1191
- // packages/server/src/agent/session.ts
1191
+ // daemon/src/agent/session.ts
1192
1192
  import { query } from "@anthropic-ai/claude-agent-sdk";
1193
1193
  var log4 = logger("agent");
1194
1194
  function resolveModel(tier) {
@@ -1299,7 +1299,7 @@ async function* runTurn(req) {
1299
1299
  }
1300
1300
  }
1301
1301
 
1302
- // packages/server/src/permissions/autoreview.ts
1302
+ // daemon/src/permissions/autoreview.ts
1303
1303
  var log5 = logger("autoreview");
1304
1304
  var SYSTEM = `You are the automated action reviewer for a local AI-teammate system.
1305
1305
  You judge ONE proposed tool call and answer with a single JSON object.
@@ -1384,13 +1384,13 @@ function makeAutoReviewer(getSettings, cwd) {
1384
1384
  }
1385
1385
  }
1386
1386
 
1387
- // packages/server/src/bots/manager.ts
1387
+ // daemon/src/bots/manager.ts
1388
1388
  import path5 from "node:path";
1389
1389
  import fs4 from "node:fs";
1390
1390
  import { createSdkMcpServer, tool } from "@anthropic-ai/claude-agent-sdk";
1391
1391
  import { z } from "zod";
1392
1392
 
1393
- // packages/server/src/memory/memory.ts
1393
+ // daemon/src/memory/memory.ts
1394
1394
  import fs3 from "node:fs";
1395
1395
  import path4 from "node:path";
1396
1396
  function memoryDir(workspace, slug) {
@@ -1429,7 +1429,7 @@ consequential decision.
1429
1429
  ${body}`;
1430
1430
  }
1431
1431
 
1432
- // packages/server/src/bots/prompt.ts
1432
+ // daemon/src/bots/prompt.ts
1433
1433
  function buildSystemPrompt(ctx) {
1434
1434
  const { bot, workspace } = ctx;
1435
1435
  const parts = [];
@@ -1485,7 +1485,7 @@ Say who should take the next step. Keep replies short \u2014 the humans are read
1485
1485
  return parts.join("\n\n");
1486
1486
  }
1487
1487
 
1488
- // packages/server/src/bots/manager.ts
1488
+ // daemon/src/bots/manager.ts
1489
1489
  var log6 = logger("bots");
1490
1490
  var BotManager = class {
1491
1491
  constructor(deps) {
@@ -1886,11 +1886,11 @@ function summarizeTool(name, input) {
1886
1886
  return j.length > 160 ? `${j.slice(0, 160)}\u2026` : j;
1887
1887
  }
1888
1888
 
1889
- // packages/server/src/config/config.ts
1889
+ // daemon/src/config/config.ts
1890
1890
  import fs6 from "node:fs";
1891
1891
  import { parse as parseToml, stringify as stringifyToml } from "smol-toml";
1892
1892
 
1893
- // packages/server/src/config/paths.ts
1893
+ // daemon/src/config/paths.ts
1894
1894
  import os from "node:os";
1895
1895
  import path6 from "node:path";
1896
1896
  import fs5 from "node:fs";
@@ -1924,7 +1924,7 @@ function ensureDirs(p) {
1924
1924
  }
1925
1925
  }
1926
1926
 
1927
- // packages/server/src/config/config.ts
1927
+ // daemon/src/config/config.ts
1928
1928
  var DEFAULT_PORT = 4780;
1929
1929
  var DEFAULT_HOST = "127.0.0.1";
1930
1930
  function loadConfig(root) {
@@ -1959,7 +1959,7 @@ function writeConfig(cfg) {
1959
1959
  );
1960
1960
  }
1961
1961
 
1962
- // packages/server/src/permissions/secrets.ts
1962
+ // daemon/src/permissions/secrets.ts
1963
1963
  import fs7 from "node:fs";
1964
1964
  import path7 from "node:path";
1965
1965
  import crypto from "node:crypto";
@@ -2142,7 +2142,7 @@ var SecretsService = class {
2142
2142
  }
2143
2143
  };
2144
2144
 
2145
- // packages/server/src/app.ts
2145
+ // daemon/src/app.ts
2146
2146
  var log8 = logger("app");
2147
2147
  async function optionalImport(name, load) {
2148
2148
  try {
@@ -2243,8 +2243,8 @@ async function createApp(opts = {}) {
2243
2243
  }
2244
2244
  async function wireSkills(app) {
2245
2245
  try {
2246
- const mod = await optionalImport("skills", () => import("./skills-66WRX64H.js"));
2247
- const pluginMod = await optionalImport("skill plugin", () => import("./plugin-POMHVGD4.js"));
2246
+ const mod = await optionalImport("skills", () => import("./skills-JUHWFBD6.js"));
2247
+ const pluginMod = await optionalImport("skill plugin", () => import("./plugin-WYUCG6F7.js"));
2248
2248
  const Ctor = mod?.SkillStore ?? mod?.default;
2249
2249
  if (!Ctor) return void log8.warn("skills subsystem unavailable: no SkillStore export");
2250
2250
  const pluginRoot = app.cfg.paths.skills;
@@ -2256,7 +2256,7 @@ async function wireSkills(app) {
2256
2256
  }
2257
2257
  const filesDir = pluginMod?.skillFilesDir?.(pluginRoot) ?? pluginRoot;
2258
2258
  app.skills = new Ctor(app.store, filesDir);
2259
- const bundledMod = await optionalImport("bundled skills", () => import("./bundled-46DUK5PG.js"));
2259
+ const bundledMod = await optionalImport("bundled skills", () => import("./bundled-26SJR7EB.js"));
2260
2260
  if (bundledMod?.syncBundledSkills) {
2261
2261
  try {
2262
2262
  const decisions = bundledMod.syncBundledSkills(filesDir);
@@ -2285,12 +2285,12 @@ async function wireSkills(app) {
2285
2285
  }
2286
2286
  async function wireBrowser(app) {
2287
2287
  try {
2288
- const mod = await optionalImport("browser", () => import("./browser-OHRD7YI3.js"));
2288
+ const mod = await optionalImport("browser", () => import("./browser-3UAU6ARY.js"));
2289
2289
  const Ctor = mod?.BrowserService ?? mod?.default;
2290
2290
  if (!Ctor) return void log8.warn("browser subsystem unavailable: no BrowserService export");
2291
2291
  const svc = new Ctor({ profileDir: app.cfg.paths.browserProfile, bus: app.bus, headless: true });
2292
2292
  let toolsMod = null;
2293
- toolsMod = await optionalImport("browser tools", () => import("./tools-P5537ASX.js"));
2293
+ toolsMod = await optionalImport("browser tools", () => import("./tools-YNE7ZRPR.js"));
2294
2294
  const cache = /* @__PURE__ */ new Map();
2295
2295
  svc.toolServerFor = (botId) => {
2296
2296
  if (!toolsMod?.createBrowserToolServer) return void 0;
@@ -2309,7 +2309,7 @@ async function wireBrowser(app) {
2309
2309
  }
2310
2310
  async function wireScheduler(app) {
2311
2311
  try {
2312
- const mod = await optionalImport("scheduler", () => import("./scheduler-Q7OHNGP6.js"));
2312
+ const mod = await optionalImport("scheduler", () => import("./scheduler-VZVHQWGD.js"));
2313
2313
  const Ctor = mod?.Scheduler ?? mod?.default;
2314
2314
  if (!Ctor) return void log8.warn("scheduler subsystem unavailable: no Scheduler export");
2315
2315
  app.scheduler = new Ctor({
@@ -2351,7 +2351,7 @@ function workspaceRelative(root, p) {
2351
2351
  return resolved;
2352
2352
  }
2353
2353
 
2354
- // packages/server/src/bots/groups.ts
2354
+ // daemon/src/bots/groups.ts
2355
2355
  import { query as query3 } from "@anthropic-ai/claude-agent-sdk";
2356
2356
  var log9 = logger("groups");
2357
2357
  async function routeGroupMessage(args) {
@@ -2402,7 +2402,7 @@ function parseMentions(text, members) {
2402
2402
  return { botIds, everyone };
2403
2403
  }
2404
2404
 
2405
- // packages/server/src/api/routes-core.ts
2405
+ // daemon/src/api/routes-core.ts
2406
2406
  import fs8 from "node:fs";
2407
2407
  import path9 from "node:path";
2408
2408
  import { fileURLToPath } from "node:url";
@@ -2581,7 +2581,7 @@ ${attachments.map((a) => `- ${a.name} \u2192 ${a.path}`).join("\n")}` : "";
2581
2581
  });
2582
2582
  }
2583
2583
 
2584
- // packages/server/src/api/routes-ops.ts
2584
+ // daemon/src/api/routes-ops.ts
2585
2585
  import fs9 from "node:fs";
2586
2586
  import path10 from "node:path";
2587
2587
  function registerOpsRoutes(f, app) {
@@ -2853,7 +2853,7 @@ function registerOpsRoutes(f, app) {
2853
2853
  });
2854
2854
  }
2855
2855
 
2856
- // packages/server/src/api/server.ts
2856
+ // daemon/src/api/server.ts
2857
2857
  var log10 = logger("server");
2858
2858
  var require_ = createRequire(import.meta.url);
2859
2859
  function resolveWebDist() {
@@ -2946,7 +2946,7 @@ async function startServer(opts = {}) {
2946
2946
  });
2947
2947
  log10.info(`serving UI from ${dist}`);
2948
2948
  } else {
2949
- log10.warn("web UI not built \u2014 run `pnpm --filter @antbot/web build`");
2949
+ log10.warn("web UI not built \u2014 run `pnpm --filter @antbot/ui build`");
2950
2950
  fastify.setNotFoundHandler((req, reply) => {
2951
2951
  if (req.url.startsWith("/api")) return reply.code(404).send({ error: "Not found" });
2952
2952
  return reply.type("text/html").send(
@@ -2954,7 +2954,7 @@ async function startServer(opts = {}) {
2954
2954
  <body style="font-family:system-ui;background:#0b0d10;color:#e6e8eb;padding:3rem">
2955
2955
  <h1>ant-bot daemon is running</h1>
2956
2956
  <p>The web UI has not been built yet. Run:</p>
2957
- <pre style="background:#151922;padding:1rem;border-radius:8px">pnpm --filter @antbot/web build</pre>
2957
+ <pre style="background:#151922;padding:1rem;border-radius:8px">pnpm --filter @antbot/ui build</pre>
2958
2958
  <p>The API is live at <code>/api/health</code>.</p>`
2959
2959
  );
2960
2960
  });