abtars 0.3.4-alpha.5 → 0.3.4-alpha.7

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 (87) hide show
  1. package/bundle/{_registry.generated-VN2OU54H.js → _registry.generated-WGR4WOPT.js} +2 -2
  2. package/bundle/abtars-cli.js +4 -4
  3. package/bundle/abtars.js +51 -74
  4. package/bundle/abtars.js.map +3 -3
  5. package/bundle/{agent-api-adapter-PTJYZKQK.js → agent-api-adapter-YAHKQMMZ.js} +2 -2
  6. package/bundle/{agent-registry-OXFVXBOO.js → agent-registry-GI6CLT3Z.js} +2 -2
  7. package/bundle/{bootstrap-XBTZIGKC.js → bootstrap-X2QYIZIJ.js} +2 -2
  8. package/bundle/{browser-EJNS35NT.js → browser-DMARZJIN.js} +2 -2
  9. package/bundle/{chunk-Q33GFBXL.js → chunk-3AAENI2K.js} +4 -4
  10. package/bundle/{chunk-AW2FTHQO.js → chunk-4UL3KINB.js} +2 -2
  11. package/bundle/{chunk-7Z3HBPRY.js → chunk-5B5B6EHL.js} +2 -2
  12. package/bundle/{chunk-QZCKZPWF.js → chunk-BROFMHC2.js} +61 -25
  13. package/bundle/chunk-BROFMHC2.js.map +7 -0
  14. package/bundle/{chunk-V3DZFJZ2.js → chunk-GXL7HJPT.js} +2 -2
  15. package/bundle/{chunk-F6VDEYK3.js → chunk-HKRSMUXJ.js} +16 -16
  16. package/bundle/{chunk-GP4XUKI5.js → chunk-LDUOOKQY.js} +79 -2
  17. package/bundle/chunk-LDUOOKQY.js.map +7 -0
  18. package/bundle/{chunk-AO32N2VB.js → chunk-ONBF5DDU.js} +28 -52
  19. package/bundle/chunk-ONBF5DDU.js.map +7 -0
  20. package/bundle/{chunk-XGLBEDRG.js → chunk-SIFPBTI4.js} +2 -2
  21. package/bundle/{chunk-44JSAOAU.js → chunk-UPRZDU6T.js} +3 -3
  22. package/bundle/{chunk-56SV72K4.js → chunk-W4EA4GCA.js} +10 -24
  23. package/bundle/chunk-W4EA4GCA.js.map +7 -0
  24. package/bundle/{chunk-PROPYS3P.js → chunk-XWRADSXO.js} +2 -2
  25. package/bundle/{chunk-7YQGRUXI.js → chunk-YRU2K3O6.js} +40 -58
  26. package/bundle/chunk-YRU2K3O6.js.map +7 -0
  27. package/bundle/{commands-W4BHW3NM.js → commands-XYEGVUZF.js} +2 -2
  28. package/bundle/{delegation-tools-O7WLLYVP.js → delegation-tools-QKNYQGTQ.js} +3 -3
  29. package/bundle/{deploy-L6EASMTO.js → deploy-EPDWNHJU.js} +2 -2
  30. package/bundle/{direct-api-transport-LGYYBJNR.js → direct-api-transport-E3LNDBJT.js} +5 -5
  31. package/bundle/{discord-adapter-NUEBQD2T.js → discord-adapter-IT3KP3VB.js} +2 -2
  32. package/bundle/{health-check-YKWFD2LZ.js → health-check-BUA36UAQ.js} +2 -2
  33. package/bundle/{health-check-YKWFD2LZ.js.map → health-check-BUA36UAQ.js.map} +1 -1
  34. package/bundle/{heartbeat-system-TDDIOVTC.js → heartbeat-system-MVTRS4GP.js} +3 -2
  35. package/bundle/{heartbeat-tier3-MIIONKJR.js → heartbeat-tier3-ABWL3P7M.js} +8 -8
  36. package/bundle/{install-C2WDC4WT.js → install-OS3CU7NF.js} +2 -2
  37. package/bundle/{message-pipeline-LSK33TOO.js → message-pipeline-P5GAQU4Z.js} +2 -2
  38. package/bundle/meta.json +335 -312
  39. package/bundle/{orc-tools-A3G7WCSJ.js → orc-tools-4CHEFWSN.js} +2 -2
  40. package/bundle/{phase-transport-R6L6EYAD.js → phase-transport-PGKU2KD4.js} +5 -4
  41. package/bundle/{reconciler-FHESO6OC.js → reconciler-EBKH3JNU.js} +2 -2
  42. package/bundle/{skill-session-AXBDQSLQ.js → skill-session-BMSRQSHV.js} +2 -2
  43. package/bundle/{spin-IMW2MZOH.js → spin-TI3TSVVT.js} +2 -2
  44. package/bundle/{subagent-runtime-HLCDLHK5.js → subagent-runtime-5QUVES3W.js} +2 -2
  45. package/bundle/{system-status-ATGKRRQI.js → system-status-JZU5FO7B.js} +3 -3
  46. package/bundle/{telegram-adapter-5O4CJFH5.js → telegram-adapter-H6PMFPMB.js} +4 -4
  47. package/bundle/{tool-registry-DDFUKQY7.js → tool-registry-IZX2IOBM.js} +5 -5
  48. package/bundle/{update-EZWBQTLI.js → update-MESYO4LO.js} +3 -3
  49. package/package.json +1 -1
  50. package/templates/skills/skill-authoring/SKILL.md +6 -6
  51. package/bundle/chunk-56SV72K4.js.map +0 -7
  52. package/bundle/chunk-7YQGRUXI.js.map +0 -7
  53. package/bundle/chunk-AO32N2VB.js.map +0 -7
  54. package/bundle/chunk-GP4XUKI5.js.map +0 -7
  55. package/bundle/chunk-QZCKZPWF.js.map +0 -7
  56. /package/bundle/{_registry.generated-VN2OU54H.js.map → _registry.generated-WGR4WOPT.js.map} +0 -0
  57. /package/bundle/{agent-api-adapter-PTJYZKQK.js.map → agent-api-adapter-YAHKQMMZ.js.map} +0 -0
  58. /package/bundle/{agent-registry-OXFVXBOO.js.map → agent-registry-GI6CLT3Z.js.map} +0 -0
  59. /package/bundle/{bootstrap-XBTZIGKC.js.map → bootstrap-X2QYIZIJ.js.map} +0 -0
  60. /package/bundle/{browser-EJNS35NT.js.map → browser-DMARZJIN.js.map} +0 -0
  61. /package/bundle/{chunk-Q33GFBXL.js.map → chunk-3AAENI2K.js.map} +0 -0
  62. /package/bundle/{chunk-AW2FTHQO.js.map → chunk-4UL3KINB.js.map} +0 -0
  63. /package/bundle/{chunk-7Z3HBPRY.js.map → chunk-5B5B6EHL.js.map} +0 -0
  64. /package/bundle/{chunk-V3DZFJZ2.js.map → chunk-GXL7HJPT.js.map} +0 -0
  65. /package/bundle/{chunk-F6VDEYK3.js.map → chunk-HKRSMUXJ.js.map} +0 -0
  66. /package/bundle/{chunk-XGLBEDRG.js.map → chunk-SIFPBTI4.js.map} +0 -0
  67. /package/bundle/{chunk-44JSAOAU.js.map → chunk-UPRZDU6T.js.map} +0 -0
  68. /package/bundle/{chunk-PROPYS3P.js.map → chunk-XWRADSXO.js.map} +0 -0
  69. /package/bundle/{commands-W4BHW3NM.js.map → commands-XYEGVUZF.js.map} +0 -0
  70. /package/bundle/{delegation-tools-O7WLLYVP.js.map → delegation-tools-QKNYQGTQ.js.map} +0 -0
  71. /package/bundle/{deploy-L6EASMTO.js.map → deploy-EPDWNHJU.js.map} +0 -0
  72. /package/bundle/{direct-api-transport-LGYYBJNR.js.map → direct-api-transport-E3LNDBJT.js.map} +0 -0
  73. /package/bundle/{discord-adapter-NUEBQD2T.js.map → discord-adapter-IT3KP3VB.js.map} +0 -0
  74. /package/bundle/{heartbeat-system-TDDIOVTC.js.map → heartbeat-system-MVTRS4GP.js.map} +0 -0
  75. /package/bundle/{heartbeat-tier3-MIIONKJR.js.map → heartbeat-tier3-ABWL3P7M.js.map} +0 -0
  76. /package/bundle/{install-C2WDC4WT.js.map → install-OS3CU7NF.js.map} +0 -0
  77. /package/bundle/{message-pipeline-LSK33TOO.js.map → message-pipeline-P5GAQU4Z.js.map} +0 -0
  78. /package/bundle/{orc-tools-A3G7WCSJ.js.map → orc-tools-4CHEFWSN.js.map} +0 -0
  79. /package/bundle/{phase-transport-R6L6EYAD.js.map → phase-transport-PGKU2KD4.js.map} +0 -0
  80. /package/bundle/{reconciler-FHESO6OC.js.map → reconciler-EBKH3JNU.js.map} +0 -0
  81. /package/bundle/{skill-session-AXBDQSLQ.js.map → skill-session-BMSRQSHV.js.map} +0 -0
  82. /package/bundle/{spin-IMW2MZOH.js.map → spin-TI3TSVVT.js.map} +0 -0
  83. /package/bundle/{subagent-runtime-HLCDLHK5.js.map → subagent-runtime-5QUVES3W.js.map} +0 -0
  84. /package/bundle/{system-status-ATGKRRQI.js.map → system-status-JZU5FO7B.js.map} +0 -0
  85. /package/bundle/{telegram-adapter-5O4CJFH5.js.map → telegram-adapter-H6PMFPMB.js.map} +0 -0
  86. /package/bundle/{tool-registry-DDFUKQY7.js.map → tool-registry-IZX2IOBM.js.map} +0 -0
  87. /package/bundle/{update-EZWBQTLI.js.map → update-MESYO4LO.js.map} +0 -0
@@ -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
  browser_exports
5
- } from "./chunk-7Z3HBPRY.js";
5
+ } from "./chunk-5B5B6EHL.js";
6
6
  import {
7
7
  sleep_exports
8
8
  } from "./chunk-LGP6TYFI.js";
@@ -33,4 +33,4 @@ var capabilities = [
33
33
  export {
34
34
  capabilities
35
35
  };
36
- //# sourceMappingURL=_registry.generated-VN2OU54H.js.map
36
+ //# sourceMappingURL=_registry.generated-WGR4WOPT.js.map
@@ -2,8 +2,8 @@
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
  update
5
- } from "./chunk-44JSAOAU.js";
6
- import "./chunk-XGLBEDRG.js";
5
+ } from "./chunk-UPRZDU6T.js";
6
+ import "./chunk-SIFPBTI4.js";
7
7
  import {
8
8
  rollback
9
9
  } from "./chunk-HZDLFLRP.js";
@@ -1171,7 +1171,7 @@ async function onboard(opts) {
1171
1171
  process.stdout.write(`
1172
1172
  Running abtars update...
1173
1173
  `);
1174
- const { update: update2 } = await import("./update-EZWBQTLI.js");
1174
+ const { update: update2 } = await import("./update-MESYO4LO.js");
1175
1175
  return await update2({ source: opts.source ?? "alpha", localDir: opts.localDir, skipFreshness: true, allowAbmindMismatch: false });
1176
1176
  }
1177
1177
  async function seedDefaultTasks(_chatId, abtarsHome2) {
@@ -1418,7 +1418,7 @@ async function main(argv) {
1418
1418
  });
1419
1419
  }
1420
1420
  case "__deploy": {
1421
- const { deployActivationCli } = await import("./deploy-L6EASMTO.js");
1421
+ const { deployActivationCli } = await import("./deploy-EPDWNHJU.js");
1422
1422
  return await deployActivationCli(flags);
1423
1423
  }
1424
1424
  case "rollback":
package/bundle/abtars.js CHANGED
@@ -19,23 +19,25 @@ import {
19
19
  createSkillStatsFlushTask,
20
20
  createUpdateCheckTask,
21
21
  phasePipelineDeps
22
- } from "./chunk-F6VDEYK3.js";
22
+ } from "./chunk-HKRSMUXJ.js";
23
23
  import {
24
24
  loadNLMConfig
25
- } from "./chunk-QZCKZPWF.js";
25
+ } from "./chunk-BROFMHC2.js";
26
26
  import "./chunk-63A7ZRIH.js";
27
27
  import "./chunk-OKAQICWY.js";
28
28
  import {
29
29
  HeartbeatSystem,
30
+ classifyResume,
30
31
  init_heartbeat_system,
32
+ init_platform_detect,
31
33
  setHeartbeatInstance
32
- } from "./chunk-GP4XUKI5.js";
34
+ } from "./chunk-LDUOOKQY.js";
33
35
  import {
34
36
  sendNotification
35
37
  } from "./chunk-7BSQ5UQO.js";
36
38
  import {
37
39
  phaseTransport
38
- } from "./chunk-7YQGRUXI.js";
40
+ } from "./chunk-YRU2K3O6.js";
39
41
  import {
40
42
  resetAllCtxStarts
41
43
  } from "./chunk-JQDJPUHM.js";
@@ -43,11 +45,11 @@ import "./chunk-ZAA7B5BN.js";
43
45
  import {
44
46
  loadAndValidateConfig
45
47
  } from "./chunk-NDCRWEEJ.js";
46
- import "./chunk-V3DZFJZ2.js";
48
+ import "./chunk-GXL7HJPT.js";
47
49
  import "./chunk-5QUTMUIK.js";
48
50
  import {
49
51
  SubagentRuntime
50
- } from "./chunk-Q33GFBXL.js";
52
+ } from "./chunk-3AAENI2K.js";
51
53
  import {
52
54
  createCapabilityRegistry
53
55
  } from "./chunk-XX6BGTPO.js";
@@ -58,16 +60,16 @@ import {
58
60
  } from "./chunk-YRSMGJFP.js";
59
61
  import {
60
62
  setPeerActivityCallback
61
- } from "./chunk-56SV72K4.js";
62
- import "./chunk-AW2FTHQO.js";
63
+ } from "./chunk-W4EA4GCA.js";
64
+ import "./chunk-4UL3KINB.js";
63
65
  import "./chunk-MV6CJFWR.js";
64
66
  import "./chunk-URQPDCK5.js";
65
67
  import "./chunk-VOLAZHA2.js";
66
- import "./chunk-PROPYS3P.js";
68
+ import "./chunk-XWRADSXO.js";
67
69
  import {
68
70
  init_spin,
69
71
  spin
70
- } from "./chunk-AO32N2VB.js";
72
+ } from "./chunk-ONBF5DDU.js";
71
73
  import "./chunk-FRKW6LWB.js";
72
74
  import "./chunk-YWZPKBO6.js";
73
75
  import {
@@ -1057,6 +1059,30 @@ async function phaseMemory(ctx) {
1057
1059
  await memory.initialize();
1058
1060
  ctx.memory = memory;
1059
1061
  logDebug("main", `\u{1F9E0} Memory enabled (dir=${ctx.memoryConfig.memoryDir})`);
1062
+ const { setMemoryBackend } = await import("./tool-registry-IZX2IOBM.js");
1063
+ const mm = ctx.memory;
1064
+ const backend = {
1065
+ initialize: async () => {
1066
+ },
1067
+ close: () => {
1068
+ },
1069
+ instantStore: (p) => mm.editor.instantStore(p),
1070
+ editMemory: (p) => mm.editor.editMemory(p),
1071
+ reclassifyMemory: (id, level, uo) => {
1072
+ mm.editor.reclassifyMemory(id, level, uo);
1073
+ return Promise.resolve();
1074
+ },
1075
+ adjustRelevance: (id, delta) => {
1076
+ mm.editor.adjustRelevance(id, delta);
1077
+ return Promise.resolve();
1078
+ },
1079
+ mergeMemories: (a, b) => mm.editor.mergeMemories(a, b),
1080
+ cascadeDelete: (ids, uid) => mm.editor.cascadeDelete(ids, uid),
1081
+ recall: (p) => mm.recallSearch(p),
1082
+ rebuildFtsIndexes: () => mm.rebuildFtsIndexes()
1083
+ };
1084
+ setMemoryBackend(backend);
1085
+ logInfo("main", "\u{1F9E0} In-process memory wired to tool registry (shared handle)");
1060
1086
  return "ran";
1061
1087
  } catch (err) {
1062
1088
  logWarn("main", `\u26A0\uFE0F Memory init failed: ${err instanceof Error ? err.message : String(err)}. Running without persistent memory.`);
@@ -1145,7 +1171,7 @@ async function phasePlatformsConnect(ctx) {
1145
1171
  registry.register("telegram", {
1146
1172
  configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
1147
1173
  async create() {
1148
- const { TelegramAdapter } = await import("./telegram-adapter-5O4CJFH5.js");
1174
+ const { TelegramAdapter } = await import("./telegram-adapter-H6PMFPMB.js");
1149
1175
  const adapter = new TelegramAdapter(
1150
1176
  { botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
1151
1177
  { pipeline: { handleInbound: (msg) => recovery.handle(msg, adapter) }, conversationBuffer: ctx.conversationBuffer, transport: null, memory: null, sessionManager: ctx.sessionManager, actionGate: ctx.actionGate }
@@ -1177,7 +1203,7 @@ async function phasePlatformsConnect(ctx) {
1177
1203
  if (!config.discord.appId || !isValidSnowflake(config.discord.appId)) {
1178
1204
  throw new Error("DISCORD_APP_ID missing or invalid \u2014 Discord disabled");
1179
1205
  }
1180
- const { DiscordAdapter } = await import("./discord-adapter-NUEBQD2T.js");
1206
+ const { DiscordAdapter } = await import("./discord-adapter-IT3KP3VB.js");
1181
1207
  const adapter = new DiscordAdapter(
1182
1208
  { botToken: config.discord.botToken, appId: config.discord.appId, allowedUserIds: config.discord.allowedUserIds },
1183
1209
  { pipeline: { handleInbound: (msg) => recovery.handle(msg, adapter) }, transport: null, memory: null, conversationBuffer: ctx.conversationBuffer }
@@ -1255,13 +1281,13 @@ async function phaseCapabilities(ctx) {
1255
1281
  let loaded = [];
1256
1282
  let staticCaps;
1257
1283
  try {
1258
- ({ capabilities: staticCaps } = await import("./_registry.generated-VN2OU54H.js"));
1284
+ ({ capabilities: staticCaps } = await import("./_registry.generated-WGR4WOPT.js"));
1259
1285
  } catch (err) {
1260
1286
  logError("capabilities", `Registry import failed: ${err instanceof Error ? err.message : String(err)}. Loading individually.`);
1261
1287
  staticCaps = [];
1262
1288
  const individualCaps = [
1263
1289
  { name: "hotskills", load: () => import("./hotskills-FWX4QI7V.js") },
1264
- { name: "browser", load: () => import("./browser-EJNS35NT.js") }
1290
+ { name: "browser", load: () => import("./browser-DMARZJIN.js") }
1265
1291
  ];
1266
1292
  for (const { name, load } of individualCaps) {
1267
1293
  if (disabled.has(name)) continue;
@@ -1301,53 +1327,7 @@ async function phaseCapabilities(ctx) {
1301
1327
  // src/boot/phase-heartbeat.ts
1302
1328
  init_log_and_swallow();
1303
1329
  init_heartbeat_system();
1304
-
1305
- // src/components/platform-detect.ts
1306
- init_log_and_swallow();
1307
- init_env_schema();
1308
- init_bridge_lock_transport();
1309
- import { execSync } from "node:child_process";
1310
- import { platform } from "node:os";
1311
- function classifyResume() {
1312
- const status = readBridgeLockField("sleepStatus");
1313
- if (status === "hw_sleep") {
1314
- const hour = (/* @__PURE__ */ new Date()).getHours();
1315
- const WAKE_HOUR = getEnv().wakeTime.hour;
1316
- const BED_HOUR = getEnv().bedTime.hour;
1317
- const inSleepWindow = BED_HOUR < WAKE_HOUR ? hour >= BED_HOUR && hour < WAKE_HOUR : hour >= BED_HOUR || hour < WAKE_HOUR;
1318
- return inSleepWindow ? "dark" : "full";
1319
- }
1320
- const os = platform();
1321
- if (os === "darwin") return classifyMacOS();
1322
- if (os === "linux") return classifyLinux();
1323
- return "unknown";
1324
- }
1325
- function classifyMacOS() {
1326
- try {
1327
- const out = execSync("pmset -g log 2>/dev/null", { timeout: 3e3, encoding: "utf-8" });
1328
- const lines = out.split("\n").filter((l) => /\bDarkWake\b|\bWake\b/.test(l) && !l.includes("Notification"));
1329
- const last = lines.at(-1) ?? "";
1330
- if (last.includes("DarkWake")) return "dark";
1331
- if (last.includes("Wake")) return "full";
1332
- } catch (err) {
1333
- logAndSwallow("platform_detect", "op", err);
1334
- }
1335
- return "unknown";
1336
- }
1337
- function classifyLinux() {
1338
- try {
1339
- const out = execSync(
1340
- "journalctl -b -u systemd-suspend.service --since '5 min ago' --no-pager -q 2>/dev/null",
1341
- { timeout: 3e3, encoding: "utf-8" }
1342
- );
1343
- if (out.trim().length > 0) return "full";
1344
- } catch (err) {
1345
- logAndSwallow("platform_detect", "op", err);
1346
- }
1347
- return "unknown";
1348
- }
1349
-
1350
- // src/boot/phase-heartbeat.ts
1330
+ init_platform_detect();
1351
1331
  init_bridge_lock_transport();
1352
1332
  init_user_registry();
1353
1333
  init_logger();
@@ -1355,6 +1335,7 @@ init_logger();
1355
1335
  // src/boot/heartbeat-watchdog.ts
1356
1336
  init_logger();
1357
1337
  init_bridge_lock_transport();
1338
+ init_platform_detect();
1358
1339
  var WD_CHECK_INTERVAL = 6e4;
1359
1340
  var WD_UNKNOWN_SUPPRESS_MS = 60 * 6e4;
1360
1341
  var CIRCUIT_BREAKER_MAX = 3;
@@ -1444,16 +1425,12 @@ async function phaseHeartbeat(ctx) {
1444
1425
  }
1445
1426
  }
1446
1427
  });
1447
- const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
1428
+ const { spin: spin2 } = await import("./spin-TI3TSVVT.js");
1448
1429
  const masterUser = loadUsers().users.find((u) => u.role === "master");
1449
1430
  const masterUserId = masterUser?.userId ?? "master";
1450
1431
  ctx.sendSystemMessage = async (prompt) => {
1451
1432
  try {
1452
- const response = await spin2.inject(masterUserId, `[SYSTEM] ${prompt}`, { deliver: true });
1453
- if (response) {
1454
- const { sendNotification: sendNotification2 } = await import("./notification-BFSIEECG.js");
1455
- sendNotification2(ctx, response);
1456
- }
1433
+ await spin2.injectGreeting(masterUserId, `[SYSTEM] ${prompt}`);
1457
1434
  } catch (err) {
1458
1435
  logWarn("main", `System message failed: ${err instanceof Error ? err.message : String(err)}`);
1459
1436
  }
@@ -1473,7 +1450,7 @@ async function phaseSleep(ctx) {
1473
1450
  return "skipped";
1474
1451
  }
1475
1452
  const { createSleepHandle } = await import("./sleep-36XS6MHJ.js");
1476
- const { killWakeInhibit } = await import("./commands-W4BHW3NM.js");
1453
+ const { killWakeInhibit } = await import("./commands-XYEGVUZF.js");
1477
1454
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
1478
1455
  let subagent = null;
1479
1456
  const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
@@ -2653,7 +2630,7 @@ var AgentApiServer = class {
2653
2630
  if (!ws || ws.readyState !== ws.OPEN) return;
2654
2631
  let result = { error: "unknown method" };
2655
2632
  if (msg.method === "delegate") {
2656
- const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
2633
+ const { spin: spin2 } = await import("./spin-TI3TSVVT.js");
2657
2634
  const p = msg.payload;
2658
2635
  const { cardId } = spin2.dispatch({ type: "W", goal: p.goal, title: p.goal.slice(0, 60), source: "peer", priority: p.priority ?? "MEDIUM" });
2659
2636
  result = { ok: true, taskId: cardId };
@@ -2820,7 +2797,7 @@ var AgentApiServer = class {
2820
2797
  }
2821
2798
  async handleOrcRoute(url, method, req, res) {
2822
2799
  try {
2823
- const { getOrcTools } = await import("./orc-tools-A3G7WCSJ.js");
2800
+ const { getOrcTools } = await import("./orc-tools-4CHEFWSN.js");
2824
2801
  if (url === "/v1/orc/spawn" && method === "POST") {
2825
2802
  const body = JSON.parse(await readBody(req));
2826
2803
  const tool = getOrcTools().find((t) => t.name === "spawn_worker");
@@ -3083,7 +3060,7 @@ var AgentApiServer = class {
3083
3060
  res.writeHead(400, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Missing 'goal' field", "invalid_request_error", "missing_field")));
3084
3061
  return;
3085
3062
  }
3086
- const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
3063
+ const { spin: spin2 } = await import("./spin-TI3TSVVT.js");
3087
3064
  const { cardId, sessionId } = spin2.dispatch({
3088
3065
  type: "O",
3089
3066
  goal: body.context ? `${goal}
@@ -3227,7 +3204,7 @@ Context: ${body.context}` : goal,
3227
3204
  kanbanAddTokens(card.id, body.tokens_used);
3228
3205
  }
3229
3206
  try {
3230
- const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
3207
+ const { spin: spin2 } = await import("./spin-TI3TSVVT.js");
3231
3208
  const meta = JSON.parse(card.notes ?? "{}");
3232
3209
  if (meta.remote_session_id) {
3233
3210
  const hollow = spin2.listAllSessions().find((s) => s.peer === caller && s.remoteSessionId === meta.remote_session_id);
@@ -3262,7 +3239,7 @@ async function phaseAgentApi(ctx) {
3262
3239
  sendNotification(ctx, msg);
3263
3240
  };
3264
3241
  setPeerActivityCallback(notifyPeer);
3265
- const { AgentApiAdapter } = await import("./agent-api-adapter-PTJYZKQK.js");
3242
+ const { AgentApiAdapter } = await import("./agent-api-adapter-YAHKQMMZ.js");
3266
3243
  const a2aAdapter = new AgentApiAdapter();
3267
3244
  registry.register("agent-api", {
3268
3245
  configured: Boolean(agentConfig.port),
@@ -3567,7 +3544,7 @@ ${lines.join("\n")}`);
3567
3544
  }
3568
3545
  }
3569
3546
  if (ctx.telegramAdapter) {
3570
- const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
3547
+ const { spin: spin2 } = await import("./spin-TI3TSVVT.js");
3571
3548
  spin2.setGreetingAdapter(ctx.telegramAdapter);
3572
3549
  }
3573
3550
  return bridge.waitForExit();