@turmind/halo 0.2.1-bc7cf2b → 0.2.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 (2) hide show
  1. package/dist/index.js +304 -304
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  __defProp(target, name, { get: all[name], enumerable: true });
9
9
  };
10
10
 
11
- // ../server/dist/prompts/md-loader.js
11
+ // packages/server/dist/prompts/md-loader.js
12
12
  import fs from "node:fs/promises";
13
13
  import fsSync from "node:fs";
14
14
  import path from "node:path";
@@ -150,13 +150,13 @@ function resolveMdFilePath(agentId, fileType, scope, workspaceRoot) {
150
150
  }
151
151
  var HALO_HOME;
152
152
  var init_md_loader = __esm({
153
- "../server/dist/prompts/md-loader.js"() {
153
+ "packages/server/dist/prompts/md-loader.js"() {
154
154
  "use strict";
155
155
  HALO_HOME = path.join(homedir(), ".halo", "global");
156
156
  }
157
157
  });
158
158
 
159
- // ../server/dist/settings-schema.js
159
+ // packages/server/dist/settings-schema.js
160
160
  import fs2 from "node:fs";
161
161
  import path2 from "node:path";
162
162
  import { homedir as homedir2 } from "node:os";
@@ -402,7 +402,7 @@ function loadSettingsSchema(workspaceRoot) {
402
402
  }
403
403
  var GLOBAL_MODELS_DIR, GLOBAL_SKILLS_DIR, GLOBAL_AGENTS_DIR, VALID_TYPES;
404
404
  var init_settings_schema = __esm({
405
- "../server/dist/settings-schema.js"() {
405
+ "packages/server/dist/settings-schema.js"() {
406
406
  "use strict";
407
407
  GLOBAL_MODELS_DIR = path2.join(homedir2(), ".halo", "global", "models");
408
408
  GLOBAL_SKILLS_DIR = path2.join(homedir2(), ".halo", "global", "skills");
@@ -411,7 +411,7 @@ var init_settings_schema = __esm({
411
411
  }
412
412
  });
413
413
 
414
- // ../server/dist/config.js
414
+ // packages/server/dist/config.js
415
415
  var config_exports = {};
416
416
  __export(config_exports, {
417
417
  HALO_GLOBAL_DIR: () => HALO_GLOBAL_DIR,
@@ -682,7 +682,7 @@ function getModelsRegistry() {
682
682
  }
683
683
  var HALO_HOME2, HALO_GLOBAL_DIR, HALO_SECRETS_DIR, _modelsRegistryCache, _systemConfig, SETTINGS_PATH, _settingsCache, _schemaDefaultsCache, ENV_PATTERN, config, HIDDEN_DIRS_DEFAULT, HIDDEN_FILES_DEFAULT;
684
684
  var init_config = __esm({
685
- "../server/dist/config.js"() {
685
+ "packages/server/dist/config.js"() {
686
686
  "use strict";
687
687
  init_settings_schema();
688
688
  HALO_HOME2 = path3.join(homedir3(), ".halo");
@@ -875,7 +875,7 @@ var init_config = __esm({
875
875
  }
876
876
  });
877
877
 
878
- // ../server/dist/agents/conversation-repair.js
878
+ // packages/server/dist/agents/conversation-repair.js
879
879
  function getToolUseId(block) {
880
880
  const b = block;
881
881
  if (b.type === "tool_use" && typeof b.id === "string")
@@ -993,12 +993,12 @@ function repairConversationMessages(raw, label = "[Repair]") {
993
993
  return messages2;
994
994
  }
995
995
  var init_conversation_repair = __esm({
996
- "../server/dist/agents/conversation-repair.js"() {
996
+ "packages/server/dist/agents/conversation-repair.js"() {
997
997
  "use strict";
998
998
  }
999
999
  });
1000
1000
 
1001
- // ../server/dist/agents/compact.js
1001
+ // packages/server/dist/agents/compact.js
1002
1002
  function splitForCompact(messages2) {
1003
1003
  const keepCount = config.compact.keep_messages;
1004
1004
  let cut = Math.max(0, messages2.length - keepCount);
@@ -1045,13 +1045,13 @@ ${summaryText}` }]
1045
1045
  return { compacted: true, messages: [summaryMsg, ...recentMsgs] };
1046
1046
  }
1047
1047
  var init_compact = __esm({
1048
- "../server/dist/agents/compact.js"() {
1048
+ "packages/server/dist/agents/compact.js"() {
1049
1049
  "use strict";
1050
1050
  init_config();
1051
1051
  }
1052
1052
  });
1053
1053
 
1054
- // ../server/dist/agents/micro-compact.js
1054
+ // packages/server/dist/agents/micro-compact.js
1055
1055
  function microCompactMessages(messages2, keepRecent = DEFAULT_KEEP_RECENT) {
1056
1056
  if (!messages2 || messages2.length === 0) {
1057
1057
  return { compacted: false, cleared: 0, messages: messages2 };
@@ -1099,7 +1099,7 @@ function microCompactMessages(messages2, keepRecent = DEFAULT_KEEP_RECENT) {
1099
1099
  }
1100
1100
  var MICRO_COMPACT_PLACEHOLDER, COMPACTABLE_TOOLS, DEFAULT_KEEP_RECENT;
1101
1101
  var init_micro_compact = __esm({
1102
- "../server/dist/agents/micro-compact.js"() {
1102
+ "packages/server/dist/agents/micro-compact.js"() {
1103
1103
  "use strict";
1104
1104
  MICRO_COMPACT_PLACEHOLDER = "[Old tool result content cleared]";
1105
1105
  COMPACTABLE_TOOLS = /* @__PURE__ */ new Set([
@@ -1116,10 +1116,10 @@ var init_micro_compact = __esm({
1116
1116
  }
1117
1117
  });
1118
1118
 
1119
- // ../server/dist/agents/agent-loop.js
1119
+ // packages/server/dist/agents/agent-loop.js
1120
1120
  var TOOL_ERROR_MARKER, TOOL_WARN_MARKER, MODEL_TIMEOUT_ERROR, AgentLoop;
1121
1121
  var init_agent_loop = __esm({
1122
- "../server/dist/agents/agent-loop.js"() {
1122
+ "packages/server/dist/agents/agent-loop.js"() {
1123
1123
  "use strict";
1124
1124
  init_config();
1125
1125
  TOOL_ERROR_MARKER = "__TOOL_ERROR__";
@@ -1281,7 +1281,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`;
1281
1281
  }
1282
1282
  });
1283
1283
 
1284
- // ../server/dist/prompts/md-vars.js
1284
+ // packages/server/dist/prompts/md-vars.js
1285
1285
  var md_vars_exports = {};
1286
1286
  __export(md_vars_exports, {
1287
1287
  buildRenderContext: () => buildRenderContext,
@@ -1444,7 +1444,7 @@ async function buildRenderContext(opts) {
1444
1444
  }
1445
1445
  var PATTERN, ENV_PATTERN2, ARG_PATTERN, PARAM_PATH;
1446
1446
  var init_md_vars = __esm({
1447
- "../server/dist/prompts/md-vars.js"() {
1447
+ "packages/server/dist/prompts/md-vars.js"() {
1448
1448
  "use strict";
1449
1449
  PATTERN = /\{\{\s*([\w-][\w.-]*)\s*\}\}/g;
1450
1450
  ENV_PATTERN2 = /<<([A-Z_][A-Z0-9_]*)>>/g;
@@ -1453,7 +1453,7 @@ var init_md_vars = __esm({
1453
1453
  }
1454
1454
  });
1455
1455
 
1456
- // ../server/dist/agents/agent-loader.js
1456
+ // packages/server/dist/agents/agent-loader.js
1457
1457
  import fs5 from "node:fs/promises";
1458
1458
  import fsSync2 from "node:fs";
1459
1459
  import path5 from "node:path";
@@ -1727,7 +1727,7 @@ function isTeamMember(team, targetId) {
1727
1727
  }
1728
1728
  var GLOBAL_AGENTS_DIR2, GLOBAL_SKILLS_DIR2, SKILL_ID_RE, ACCESS_RANK;
1729
1729
  var init_agent_loader = __esm({
1730
- "../server/dist/agents/agent-loader.js"() {
1730
+ "packages/server/dist/agents/agent-loader.js"() {
1731
1731
  "use strict";
1732
1732
  init_agent_loop();
1733
1733
  GLOBAL_AGENTS_DIR2 = path5.join(homedir5(), ".halo", "global", "agents");
@@ -1742,7 +1742,7 @@ var init_agent_loader = __esm({
1742
1742
  }
1743
1743
  });
1744
1744
 
1745
- // ../server/dist/ws/broadcast.js
1745
+ // packages/server/dist/ws/broadcast.js
1746
1746
  function setBroadcastWss(wss2) {
1747
1747
  _wss = wss2;
1748
1748
  }
@@ -1763,13 +1763,13 @@ function broadcast(event) {
1763
1763
  }
1764
1764
  var _wss;
1765
1765
  var init_broadcast = __esm({
1766
- "../server/dist/ws/broadcast.js"() {
1766
+ "packages/server/dist/ws/broadcast.js"() {
1767
1767
  "use strict";
1768
1768
  _wss = null;
1769
1769
  }
1770
1770
  });
1771
1771
 
1772
- // ../server/dist/db/schema.js
1772
+ // packages/server/dist/db/schema.js
1773
1773
  var schema_exports = {};
1774
1774
  __export(schema_exports, {
1775
1775
  agentSessions: () => agentSessions,
@@ -1779,7 +1779,7 @@ __export(schema_exports, {
1779
1779
  import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
1780
1780
  var sessions, agentSessions, disabledItems;
1781
1781
  var init_schema = __esm({
1782
- "../server/dist/db/schema.js"() {
1782
+ "packages/server/dist/db/schema.js"() {
1783
1783
  "use strict";
1784
1784
  sessions = sqliteTable("sessions", {
1785
1785
  id: text("id").primaryKey(),
@@ -1811,7 +1811,7 @@ var init_schema = __esm({
1811
1811
  }
1812
1812
  });
1813
1813
 
1814
- // ../server/dist/init.js
1814
+ // packages/server/dist/init.js
1815
1815
  var init_exports = {};
1816
1816
  __export(init_exports, {
1817
1817
  TEMPLATES_DIR: () => TEMPLATES_DIR,
@@ -2138,7 +2138,7 @@ function ensureWorkspaceHalo(workspaceRoot) {
2138
2138
  }
2139
2139
  var __dirname, TEMPLATES_DIR, DOCS_SRC_CANDIDATES, TEMPLATE_VERSION, VERSION_FILE, SKIP_NAMES, BUILTIN_AGENT_IDS, BUILTIN_SKILL_IDS, BUNDLED_DOCS, INSTALLED_OPTIONAL_SKILLS_FILE;
2140
2140
  var init_init = __esm({
2141
- "../server/dist/init.js"() {
2141
+ "packages/server/dist/init.js"() {
2142
2142
  "use strict";
2143
2143
  __dirname = path6.dirname(fileURLToPath(import.meta.url));
2144
2144
  TEMPLATES_DIR = path6.resolve(__dirname, "..", "templates");
@@ -2208,7 +2208,7 @@ var init_init = __esm({
2208
2208
  }
2209
2209
  });
2210
2210
 
2211
- // ../server/dist/db/index.js
2211
+ // packages/server/dist/db/index.js
2212
2212
  import Database from "better-sqlite3";
2213
2213
  import { drizzle } from "drizzle-orm/better-sqlite3";
2214
2214
  import { eq, and } from "drizzle-orm";
@@ -2261,7 +2261,7 @@ function toggleDisabled(db, itemType, itemId, scope) {
2261
2261
  }
2262
2262
  var SCHEMA_SQL_PATH, dbCache;
2263
2263
  var init_db = __esm({
2264
- "../server/dist/db/index.js"() {
2264
+ "packages/server/dist/db/index.js"() {
2265
2265
  "use strict";
2266
2266
  init_schema();
2267
2267
  init_init();
@@ -2270,7 +2270,7 @@ var init_db = __esm({
2270
2270
  }
2271
2271
  });
2272
2272
 
2273
- // ../server/dist/sessions/session-store.js
2273
+ // packages/server/dist/sessions/session-store.js
2274
2274
  import fsSync3 from "node:fs";
2275
2275
  import fs8 from "node:fs/promises";
2276
2276
  import path8 from "node:path";
@@ -2485,12 +2485,12 @@ function findAndUpdateSessionTitle(sessionId, title, projectPath) {
2485
2485
  return false;
2486
2486
  }
2487
2487
  var init_session_store = __esm({
2488
- "../server/dist/sessions/session-store.js"() {
2488
+ "packages/server/dist/sessions/session-store.js"() {
2489
2489
  "use strict";
2490
2490
  }
2491
2491
  });
2492
2492
 
2493
- // ../server/dist/agents/session-tools.js
2493
+ // packages/server/dist/agents/session-tools.js
2494
2494
  async function callerTeamFor(sm, sessionId) {
2495
2495
  const callerId = sm.sessions.get(sessionId)?.agentId;
2496
2496
  if (!callerId)
@@ -2752,7 +2752,7 @@ ${skillInfo}` : ""
2752
2752
  ];
2753
2753
  }
2754
2754
  var init_session_tools = __esm({
2755
- "../server/dist/agents/session-tools.js"() {
2755
+ "packages/server/dist/agents/session-tools.js"() {
2756
2756
  "use strict";
2757
2757
  init_config();
2758
2758
  init_agent_loader();
@@ -2761,7 +2761,7 @@ var init_session_tools = __esm({
2761
2761
  }
2762
2762
  });
2763
2763
 
2764
- // ../server/dist/agents/workspace-runtime-lock.js
2764
+ // packages/server/dist/agents/workspace-runtime-lock.js
2765
2765
  import fs9 from "node:fs";
2766
2766
  import path9 from "node:path";
2767
2767
  function isPidAlive(pid) {
@@ -2809,13 +2809,13 @@ function claimWorkspaceRuntime(workspaceRoot) {
2809
2809
  }
2810
2810
  var RUNTIME_LOCK_FILE;
2811
2811
  var init_workspace_runtime_lock = __esm({
2812
- "../server/dist/agents/workspace-runtime-lock.js"() {
2812
+ "packages/server/dist/agents/workspace-runtime-lock.js"() {
2813
2813
  "use strict";
2814
2814
  RUNTIME_LOCK_FILE = "runtime.lock";
2815
2815
  }
2816
2816
  });
2817
2817
 
2818
- // ../server/dist/db/evo-db.js
2818
+ // packages/server/dist/db/evo-db.js
2819
2819
  import Database2 from "better-sqlite3";
2820
2820
  import { drizzle as drizzle2 } from "drizzle-orm/better-sqlite3";
2821
2821
  import { sqliteTable as sqliteTable2, text as text2, integer as integer2 } from "drizzle-orm/sqlite-core";
@@ -2839,7 +2839,7 @@ function getEvoDb() {
2839
2839
  }
2840
2840
  var evolutionRuns, evolutionApplies, CREATE_SQL, _evoDb;
2841
2841
  var init_evo_db = __esm({
2842
- "../server/dist/db/evo-db.js"() {
2842
+ "packages/server/dist/db/evo-db.js"() {
2843
2843
  "use strict";
2844
2844
  evolutionRuns = sqliteTable2("evolution_runs", {
2845
2845
  id: text2("id").primaryKey(),
@@ -2921,7 +2921,7 @@ CREATE INDEX IF NOT EXISTS idx_evo_applies_archived ON evolution_applies(archive
2921
2921
  }
2922
2922
  });
2923
2923
 
2924
- // ../server/dist/evolution/enqueue.js
2924
+ // packages/server/dist/evolution/enqueue.js
2925
2925
  import fs11 from "node:fs";
2926
2926
  import path11 from "node:path";
2927
2927
  import { homedir as homedir7 } from "node:os";
@@ -3206,13 +3206,13 @@ function enqueueEvoRun(input) {
3206
3206
  return { ok: true, runId, runDir };
3207
3207
  }
3208
3208
  var init_enqueue = __esm({
3209
- "../server/dist/evolution/enqueue.js"() {
3209
+ "packages/server/dist/evolution/enqueue.js"() {
3210
3210
  "use strict";
3211
3211
  init_evo_db();
3212
3212
  }
3213
3213
  });
3214
3214
 
3215
- // ../server/dist/sessions/ui-log-builder.js
3215
+ // packages/server/dist/sessions/ui-log-builder.js
3216
3216
  import { randomUUID } from "node:crypto";
3217
3217
  function createEmptyUIState() {
3218
3218
  return {
@@ -3628,19 +3628,19 @@ function applyEvent(state, event) {
3628
3628
  }
3629
3629
  var msgCounter;
3630
3630
  var init_ui_log_builder = __esm({
3631
- "../server/dist/sessions/ui-log-builder.js"() {
3631
+ "packages/server/dist/sessions/ui-log-builder.js"() {
3632
3632
  "use strict";
3633
3633
  msgCounter = 0;
3634
3634
  }
3635
3635
  });
3636
3636
 
3637
- // ../server/dist/agents/session-ui-store.js
3637
+ // packages/server/dist/agents/session-ui-store.js
3638
3638
  import fsSync4 from "node:fs";
3639
3639
  import path12 from "node:path";
3640
3640
  import { eq as eq2 } from "drizzle-orm";
3641
3641
  var SessionUIStore;
3642
3642
  var init_session_ui_store = __esm({
3643
- "../server/dist/agents/session-ui-store.js"() {
3643
+ "packages/server/dist/agents/session-ui-store.js"() {
3644
3644
  "use strict";
3645
3645
  init_broadcast();
3646
3646
  init_schema();
@@ -4016,11 +4016,11 @@ var init_session_ui_store = __esm({
4016
4016
  }
4017
4017
  });
4018
4018
 
4019
- // ../server/dist/agents/session-query-store.js
4019
+ // packages/server/dist/agents/session-query-store.js
4020
4020
  import { eq as eq3, and as and2, isNull, desc, lt, gte, inArray } from "drizzle-orm";
4021
4021
  var SessionQueryStore;
4022
4022
  var init_session_query_store = __esm({
4023
- "../server/dist/agents/session-query-store.js"() {
4023
+ "packages/server/dist/agents/session-query-store.js"() {
4024
4024
  "use strict";
4025
4025
  init_schema();
4026
4026
  init_session_store();
@@ -4229,7 +4229,7 @@ var init_session_query_store = __esm({
4229
4229
  }
4230
4230
  });
4231
4231
 
4232
- // ../server/dist/agents/bedrock-agent.js
4232
+ // packages/server/dist/agents/bedrock-agent.js
4233
4233
  import { BedrockRuntimeClient, InvokeModelCommand } from "@aws-sdk/client-bedrock-runtime";
4234
4234
  function effortToBudget(effort, maxTokens) {
4235
4235
  const table = {
@@ -4251,7 +4251,7 @@ function extractRegionFromEndpoint(endpoint) {
4251
4251
  }
4252
4252
  var BedrockAgent;
4253
4253
  var init_bedrock_agent = __esm({
4254
- "../server/dist/agents/bedrock-agent.js"() {
4254
+ "packages/server/dist/agents/bedrock-agent.js"() {
4255
4255
  "use strict";
4256
4256
  init_config();
4257
4257
  init_agent_loop();
@@ -4380,7 +4380,7 @@ var init_bedrock_agent = __esm({
4380
4380
  }
4381
4381
  });
4382
4382
 
4383
- // ../server/dist/agents/deepseek-agent.js
4383
+ // packages/server/dist/agents/deepseek-agent.js
4384
4384
  function safeParse(json) {
4385
4385
  try {
4386
4386
  return JSON.parse(json || "{}");
@@ -4390,7 +4390,7 @@ function safeParse(json) {
4390
4390
  }
4391
4391
  var DeepSeekAgent;
4392
4392
  var init_deepseek_agent = __esm({
4393
- "../server/dist/agents/deepseek-agent.js"() {
4393
+ "packages/server/dist/agents/deepseek-agent.js"() {
4394
4394
  "use strict";
4395
4395
  init_config();
4396
4396
  init_agent_loop();
@@ -4570,7 +4570,7 @@ var init_deepseek_agent = __esm({
4570
4570
  }
4571
4571
  });
4572
4572
 
4573
- // ../server/dist/agents/kimi-agent.js
4573
+ // packages/server/dist/agents/kimi-agent.js
4574
4574
  function safeParse2(json) {
4575
4575
  try {
4576
4576
  return JSON.parse(json || "{}");
@@ -4580,7 +4580,7 @@ function safeParse2(json) {
4580
4580
  }
4581
4581
  var KimiAgent;
4582
4582
  var init_kimi_agent = __esm({
4583
- "../server/dist/agents/kimi-agent.js"() {
4583
+ "packages/server/dist/agents/kimi-agent.js"() {
4584
4584
  "use strict";
4585
4585
  init_config();
4586
4586
  init_agent_loop();
@@ -4770,7 +4770,7 @@ var init_kimi_agent = __esm({
4770
4770
  }
4771
4771
  });
4772
4772
 
4773
- // ../server/dist/agents/minimax-agent.js
4773
+ // packages/server/dist/agents/minimax-agent.js
4774
4774
  function effortToBudget2(effort, maxTokens) {
4775
4775
  const table = {
4776
4776
  low: 2048,
@@ -4787,7 +4787,7 @@ function effortToBudget2(effort, maxTokens) {
4787
4787
  }
4788
4788
  var MiniMaxAgent;
4789
4789
  var init_minimax_agent = __esm({
4790
- "../server/dist/agents/minimax-agent.js"() {
4790
+ "packages/server/dist/agents/minimax-agent.js"() {
4791
4791
  "use strict";
4792
4792
  init_config();
4793
4793
  init_agent_loop();
@@ -4905,7 +4905,7 @@ var init_minimax_agent = __esm({
4905
4905
  }
4906
4906
  });
4907
4907
 
4908
- // ../server/dist/agents/qwen-agent.js
4908
+ // packages/server/dist/agents/qwen-agent.js
4909
4909
  function effortToBudget3(effort, maxTokens) {
4910
4910
  const table = {
4911
4911
  low: 2048,
@@ -4922,7 +4922,7 @@ function effortToBudget3(effort, maxTokens) {
4922
4922
  }
4923
4923
  var QwenAgent;
4924
4924
  var init_qwen_agent = __esm({
4925
- "../server/dist/agents/qwen-agent.js"() {
4925
+ "packages/server/dist/agents/qwen-agent.js"() {
4926
4926
  "use strict";
4927
4927
  init_config();
4928
4928
  init_agent_loop();
@@ -5040,7 +5040,7 @@ var init_qwen_agent = __esm({
5040
5040
  }
5041
5041
  });
5042
5042
 
5043
- // ../server/dist/agents/hunyuan-agent.js
5043
+ // packages/server/dist/agents/hunyuan-agent.js
5044
5044
  function safeParse3(json) {
5045
5045
  try {
5046
5046
  return JSON.parse(json || "{}");
@@ -5050,7 +5050,7 @@ function safeParse3(json) {
5050
5050
  }
5051
5051
  var HunyuanAgent;
5052
5052
  var init_hunyuan_agent = __esm({
5053
- "../server/dist/agents/hunyuan-agent.js"() {
5053
+ "packages/server/dist/agents/hunyuan-agent.js"() {
5054
5054
  "use strict";
5055
5055
  init_config();
5056
5056
  init_agent_loop();
@@ -5221,7 +5221,7 @@ var init_hunyuan_agent = __esm({
5221
5221
  }
5222
5222
  });
5223
5223
 
5224
- // ../server/dist/agents/doubao-agent.js
5224
+ // packages/server/dist/agents/doubao-agent.js
5225
5225
  function safeParse4(json) {
5226
5226
  try {
5227
5227
  return JSON.parse(json || "{}");
@@ -5231,7 +5231,7 @@ function safeParse4(json) {
5231
5231
  }
5232
5232
  var DoubaoAgent;
5233
5233
  var init_doubao_agent = __esm({
5234
- "../server/dist/agents/doubao-agent.js"() {
5234
+ "packages/server/dist/agents/doubao-agent.js"() {
5235
5235
  "use strict";
5236
5236
  init_config();
5237
5237
  init_agent_loop();
@@ -5402,7 +5402,7 @@ var init_doubao_agent = __esm({
5402
5402
  }
5403
5403
  });
5404
5404
 
5405
- // ../server/dist/agents/openai-agent.js
5405
+ // packages/server/dist/agents/openai-agent.js
5406
5406
  function safeParse5(json) {
5407
5407
  try {
5408
5408
  return JSON.parse(json || "{}");
@@ -5412,7 +5412,7 @@ function safeParse5(json) {
5412
5412
  }
5413
5413
  var OpenAIAgent;
5414
5414
  var init_openai_agent = __esm({
5415
- "../server/dist/agents/openai-agent.js"() {
5415
+ "packages/server/dist/agents/openai-agent.js"() {
5416
5416
  "use strict";
5417
5417
  init_config();
5418
5418
  init_agent_loop();
@@ -5584,7 +5584,7 @@ var init_openai_agent = __esm({
5584
5584
  }
5585
5585
  });
5586
5586
 
5587
- // ../server/dist/agents/mantle-agent.js
5587
+ // packages/server/dist/agents/mantle-agent.js
5588
5588
  import { SignatureV4 } from "@smithy/signature-v4";
5589
5589
  import { Sha256 } from "@aws-crypto/sha256-js";
5590
5590
  import { defaultProvider } from "@aws-sdk/credential-provider-node";
@@ -5604,7 +5604,7 @@ function strictParseOrNull(json) {
5604
5604
  }
5605
5605
  var MantleAgent;
5606
5606
  var init_mantle_agent = __esm({
5607
- "../server/dist/agents/mantle-agent.js"() {
5607
+ "packages/server/dist/agents/mantle-agent.js"() {
5608
5608
  "use strict";
5609
5609
  init_config();
5610
5610
  init_agent_loop();
@@ -5827,10 +5827,10 @@ var init_mantle_agent = __esm({
5827
5827
  }
5828
5828
  });
5829
5829
 
5830
- // ../server/dist/agents/anthropic-agent.js
5830
+ // packages/server/dist/agents/anthropic-agent.js
5831
5831
  var AnthropicAgent;
5832
5832
  var init_anthropic_agent = __esm({
5833
- "../server/dist/agents/anthropic-agent.js"() {
5833
+ "packages/server/dist/agents/anthropic-agent.js"() {
5834
5834
  "use strict";
5835
5835
  init_config();
5836
5836
  init_agent_loop();
@@ -5953,7 +5953,7 @@ var init_anthropic_agent = __esm({
5953
5953
  }
5954
5954
  });
5955
5955
 
5956
- // ../server/dist/agents/model-runtime.js
5956
+ // packages/server/dist/agents/model-runtime.js
5957
5957
  function createModelRuntime(providerId, cfg) {
5958
5958
  switch (providerId) {
5959
5959
  case "aws-bedrock-claude-invoke":
@@ -6087,7 +6087,7 @@ function createModelRuntime(providerId, cfg) {
6087
6087
  }
6088
6088
  }
6089
6089
  var init_model_runtime = __esm({
6090
- "../server/dist/agents/model-runtime.js"() {
6090
+ "packages/server/dist/agents/model-runtime.js"() {
6091
6091
  "use strict";
6092
6092
  init_bedrock_agent();
6093
6093
  init_deepseek_agent();
@@ -6102,7 +6102,7 @@ var init_model_runtime = __esm({
6102
6102
  }
6103
6103
  });
6104
6104
 
6105
- // ../server/dist/tools/sandbox.js
6105
+ // packages/server/dist/tools/sandbox.js
6106
6106
  import { exec, execFile, spawn } from "node:child_process";
6107
6107
  import { promisify } from "node:util";
6108
6108
  import path13 from "node:path";
@@ -6540,7 +6540,7 @@ async function sandboxReaddir(dirPath, opts) {
6540
6540
  }
6541
6541
  var execAsync, execFileAsync, HOME, HALO_HOME3, GLOBAL_DIR, KILL_GRACE_MS, _bwrapAvailable, DEFAULT_HIDDEN_DIRS, DEFAULT_HIDDEN_FILES, _hiddenDirs, _hiddenFiles, _writableDirs;
6542
6542
  var init_sandbox = __esm({
6543
- "../server/dist/tools/sandbox.js"() {
6543
+ "packages/server/dist/tools/sandbox.js"() {
6544
6544
  "use strict";
6545
6545
  execAsync = promisify(exec);
6546
6546
  execFileAsync = promisify(execFile);
@@ -6567,7 +6567,7 @@ var init_sandbox = __esm({
6567
6567
  }
6568
6568
  });
6569
6569
 
6570
- // ../server/dist/channels/shared/media-store.js
6570
+ // packages/server/dist/channels/shared/media-store.js
6571
6571
  import fs12 from "node:fs/promises";
6572
6572
  import path14 from "node:path";
6573
6573
  import { randomBytes } from "node:crypto";
@@ -6625,7 +6625,7 @@ async function saveInboundMedia(params) {
6625
6625
  }
6626
6626
  var EXT_BY_MIME;
6627
6627
  var init_media_store = __esm({
6628
- "../server/dist/channels/shared/media-store.js"() {
6628
+ "packages/server/dist/channels/shared/media-store.js"() {
6629
6629
  "use strict";
6630
6630
  EXT_BY_MIME = {
6631
6631
  "image/jpeg": ".jpg",
@@ -6644,7 +6644,7 @@ var init_media_store = __esm({
6644
6644
  }
6645
6645
  });
6646
6646
 
6647
- // ../server/dist/tools/workspace-tools.js
6647
+ // packages/server/dist/tools/workspace-tools.js
6648
6648
  import fs13 from "node:fs/promises";
6649
6649
  import path15 from "node:path";
6650
6650
  import crypto from "node:crypto";
@@ -7339,7 +7339,7 @@ function imageDimensions(buf, mediaType) {
7339
7339
  }
7340
7340
  var SKIP_DIRS, GLOB_MAX_RESULTS, HOME2, PARAMS_PATTERN, ENV_PATTERN3;
7341
7341
  var init_workspace_tools = __esm({
7342
- "../server/dist/tools/workspace-tools.js"() {
7342
+ "packages/server/dist/tools/workspace-tools.js"() {
7343
7343
  "use strict";
7344
7344
  init_config();
7345
7345
  init_sandbox();
@@ -7354,7 +7354,7 @@ var init_workspace_tools = __esm({
7354
7354
  }
7355
7355
  });
7356
7356
 
7357
- // ../server/dist/tools/draft-tool.js
7357
+ // packages/server/dist/tools/draft-tool.js
7358
7358
  function createDraftTool() {
7359
7359
  let drafts = 0;
7360
7360
  const tool = {
@@ -7389,7 +7389,7 @@ Error: draft requires non-empty \`content\` \u2014 put your full draft answer th
7389
7389
  }
7390
7390
  var MAX_DRAFTS, REVIEW_CHECKLIST;
7391
7391
  var init_draft_tool = __esm({
7392
- "../server/dist/tools/draft-tool.js"() {
7392
+ "packages/server/dist/tools/draft-tool.js"() {
7393
7393
  "use strict";
7394
7394
  init_agent_loop();
7395
7395
  MAX_DRAFTS = 3;
@@ -7403,7 +7403,7 @@ If the draft clears all three, write the final answer now. If not, fix it (gathe
7403
7403
  }
7404
7404
  });
7405
7405
 
7406
- // ../server/dist/prompts/system-prompts.js
7406
+ // packages/server/dist/prompts/system-prompts.js
7407
7407
  import fs14 from "node:fs/promises";
7408
7408
  import path16 from "node:path";
7409
7409
  import { homedir as homedir10 } from "node:os";
@@ -7489,17 +7489,17 @@ async function loadSystemPrompts(workspaceRoot) {
7489
7489
  }
7490
7490
  var GLOBAL_PROMPTS_DIR;
7491
7491
  var init_system_prompts = __esm({
7492
- "../server/dist/prompts/system-prompts.js"() {
7492
+ "packages/server/dist/prompts/system-prompts.js"() {
7493
7493
  "use strict";
7494
7494
  GLOBAL_PROMPTS_DIR = path16.join(homedir10(), ".halo", "global", "prompts");
7495
7495
  }
7496
7496
  });
7497
7497
 
7498
- // ../server/dist/agents/session-agent-builder.js
7498
+ // packages/server/dist/agents/session-agent-builder.js
7499
7499
  import path17 from "node:path";
7500
7500
  var SessionAgentBuilder;
7501
7501
  var init_session_agent_builder = __esm({
7502
- "../server/dist/agents/session-agent-builder.js"() {
7502
+ "packages/server/dist/agents/session-agent-builder.js"() {
7503
7503
  "use strict";
7504
7504
  init_model_runtime();
7505
7505
  init_workspace_tools();
@@ -7892,10 +7892,10 @@ do delegate, say so in one line and keep going.`;
7892
7892
  }
7893
7893
  });
7894
7894
 
7895
- // ../server/dist/commands/registry.js
7895
+ // packages/server/dist/commands/registry.js
7896
7896
  var CommandRegistry;
7897
7897
  var init_registry = __esm({
7898
- "../server/dist/commands/registry.js"() {
7898
+ "packages/server/dist/commands/registry.js"() {
7899
7899
  "use strict";
7900
7900
  CommandRegistry = class {
7901
7901
  descriptors = /* @__PURE__ */ new Map();
@@ -7909,13 +7909,13 @@ var init_registry = __esm({
7909
7909
  }
7910
7910
  });
7911
7911
 
7912
- // ../server/dist/commands/index.js
7912
+ // packages/server/dist/commands/index.js
7913
7913
  function builtinCommandNames() {
7914
7914
  return commandRegistry.listDescriptors().filter((d) => d.source === "builtin").map((d) => d.name);
7915
7915
  }
7916
7916
  var commandRegistry;
7917
7917
  var init_commands = __esm({
7918
- "../server/dist/commands/index.js"() {
7918
+ "packages/server/dist/commands/index.js"() {
7919
7919
  "use strict";
7920
7920
  init_registry();
7921
7921
  commandRegistry = new CommandRegistry();
@@ -7958,7 +7958,7 @@ var init_commands = __esm({
7958
7958
  }
7959
7959
  });
7960
7960
 
7961
- // ../server/dist/channels/shared/i18n.js
7961
+ // packages/server/dist/channels/shared/i18n.js
7962
7962
  function getLang(account) {
7963
7963
  const v = account.language;
7964
7964
  return v === "en" || v === "zh" ? v : "en";
@@ -7977,7 +7977,7 @@ function t(key, lang, params) {
7977
7977
  }
7978
7978
  var messages;
7979
7979
  var init_i18n = __esm({
7980
- "../server/dist/channels/shared/i18n.js"() {
7980
+ "packages/server/dist/channels/shared/i18n.js"() {
7981
7981
  "use strict";
7982
7982
  messages = {
7983
7983
  // ── /help ──
@@ -8115,7 +8115,7 @@ var init_i18n = __esm({
8115
8115
  }
8116
8116
  });
8117
8117
 
8118
- // ../server/dist/commands/skill-command.js
8118
+ // packages/server/dist/commands/skill-command.js
8119
8119
  import fs15 from "node:fs/promises";
8120
8120
  import path18 from "node:path";
8121
8121
  async function scanDir(dir) {
@@ -8257,7 +8257,7 @@ ${body}`;
8257
8257
  }
8258
8258
  var cachedEntries;
8259
8259
  var init_skill_command = __esm({
8260
- "../server/dist/commands/skill-command.js"() {
8260
+ "packages/server/dist/commands/skill-command.js"() {
8261
8261
  "use strict";
8262
8262
  init_commands();
8263
8263
  init_agent_loader();
@@ -8268,7 +8268,7 @@ var init_skill_command = __esm({
8268
8268
  }
8269
8269
  });
8270
8270
 
8271
- // ../server/dist/agents/session-skill-commands.js
8271
+ // packages/server/dist/agents/session-skill-commands.js
8272
8272
  import { eq as eq4 } from "drizzle-orm";
8273
8273
  function commandVisibilityGate(d) {
8274
8274
  if (!d.verbs || d.verbs.length === 0)
@@ -8285,7 +8285,7 @@ function commandVisibilityGate(d) {
8285
8285
  }
8286
8286
  var VIS_RANK, SessionSkillCommands;
8287
8287
  var init_session_skill_commands = __esm({
8288
- "../server/dist/agents/session-skill-commands.js"() {
8288
+ "packages/server/dist/agents/session-skill-commands.js"() {
8289
8289
  "use strict";
8290
8290
  init_db();
8291
8291
  init_schema();
@@ -8352,12 +8352,12 @@ var init_session_skill_commands = __esm({
8352
8352
  }
8353
8353
  });
8354
8354
 
8355
- // ../server/dist/agents/session-state-store.js
8355
+ // packages/server/dist/agents/session-state-store.js
8356
8356
  import fsSync5 from "node:fs";
8357
8357
  import path19 from "node:path";
8358
8358
  var SessionStateStore;
8359
8359
  var init_session_state_store = __esm({
8360
- "../server/dist/agents/session-state-store.js"() {
8360
+ "packages/server/dist/agents/session-state-store.js"() {
8361
8361
  "use strict";
8362
8362
  init_session_store();
8363
8363
  SessionStateStore = class {
@@ -8421,7 +8421,7 @@ var init_session_state_store = __esm({
8421
8421
  }
8422
8422
  });
8423
8423
 
8424
- // ../server/dist/agents/session-manager.js
8424
+ // packages/server/dist/agents/session-manager.js
8425
8425
  import fsSync6 from "node:fs";
8426
8426
  import path20 from "node:path";
8427
8427
  import { eq as eq5, and as and3, isNull as isNull2, isNotNull } from "drizzle-orm";
@@ -8456,7 +8456,7 @@ function generateSessionId() {
8456
8456
  }
8457
8457
  var SessionManager;
8458
8458
  var init_session_manager = __esm({
8459
- "../server/dist/agents/session-manager.js"() {
8459
+ "packages/server/dist/agents/session-manager.js"() {
8460
8460
  "use strict";
8461
8461
  init_md_loader();
8462
8462
  init_config();
@@ -10210,11 +10210,11 @@ ${q.text}` : q.text);
10210
10210
  }
10211
10211
  });
10212
10212
 
10213
- // ../server/dist/agents/session-manager-registry.js
10213
+ // packages/server/dist/agents/session-manager-registry.js
10214
10214
  import fs16 from "node:fs";
10215
10215
  var SessionManagerRegistry;
10216
10216
  var init_session_manager_registry = __esm({
10217
- "../server/dist/agents/session-manager-registry.js"() {
10217
+ "packages/server/dist/agents/session-manager-registry.js"() {
10218
10218
  "use strict";
10219
10219
  init_session_manager();
10220
10220
  init_init();
@@ -10269,7 +10269,7 @@ var init_session_manager_registry = __esm({
10269
10269
  }
10270
10270
  });
10271
10271
 
10272
- // ../server/dist/logger.js
10272
+ // packages/server/dist/logger.js
10273
10273
  import fs17 from "node:fs";
10274
10274
  import path21 from "node:path";
10275
10275
  import { homedir as homedir11 } from "node:os";
@@ -10369,7 +10369,7 @@ function initLogger() {
10369
10369
  }
10370
10370
  var LOG_FILENAME, logDir, logFile, currentSize, LEVEL_ORDER;
10371
10371
  var init_logger = __esm({
10372
- "../server/dist/logger.js"() {
10372
+ "packages/server/dist/logger.js"() {
10373
10373
  "use strict";
10374
10374
  init_config();
10375
10375
  LOG_FILENAME = "server.log";
@@ -10380,7 +10380,7 @@ var init_logger = __esm({
10380
10380
  }
10381
10381
  });
10382
10382
 
10383
- // ../server/dist/channels/shared/commands.js
10383
+ // packages/server/dist/channels/shared/commands.js
10384
10384
  import fs18 from "node:fs";
10385
10385
  import path22 from "node:path";
10386
10386
  import os from "node:os";
@@ -11013,7 +11013,7 @@ function execWsSwitch(ctx, arg) {
11013
11013
  }
11014
11014
  var ALIASES_FILE, aliasCache, CHANNEL_LIST_LIMIT, DISPATCH_COMMANDS, NOT_ROUTED, SUBCOMMAND_ROUTES, RANK;
11015
11015
  var init_commands2 = __esm({
11016
- "../server/dist/channels/shared/commands.js"() {
11016
+ "packages/server/dist/channels/shared/commands.js"() {
11017
11017
  "use strict";
11018
11018
  init_agent_loader();
11019
11019
  init_init();
@@ -11077,7 +11077,7 @@ var init_commands2 = __esm({
11077
11077
  }
11078
11078
  });
11079
11079
 
11080
- // src/harness.ts
11080
+ // packages/cli/src/harness.ts
11081
11081
  var harness_exports = {};
11082
11082
  __export(harness_exports, {
11083
11083
  createHarness: () => createHarness,
@@ -11319,7 +11319,7 @@ async function createHarness(opts) {
11319
11319
  }
11320
11320
  var SESSION_PREFIX, USER_ID;
11321
11321
  var init_harness = __esm({
11322
- "src/harness.ts"() {
11322
+ "packages/cli/src/harness.ts"() {
11323
11323
  "use strict";
11324
11324
  init_session_manager();
11325
11325
  init_session_manager_registry();
@@ -11336,7 +11336,7 @@ var init_harness = __esm({
11336
11336
  }
11337
11337
  });
11338
11338
 
11339
- // ../server/dist/middleware/password-hash.js
11339
+ // packages/server/dist/middleware/password-hash.js
11340
11340
  var password_hash_exports = {};
11341
11341
  __export(password_hash_exports, {
11342
11342
  generateJwtSecret: () => generateJwtSecret,
@@ -11380,7 +11380,7 @@ function generateJwtSecret() {
11380
11380
  }
11381
11381
  var scryptAsync, COST, KEY_LEN;
11382
11382
  var init_password_hash = __esm({
11383
- "../server/dist/middleware/password-hash.js"() {
11383
+ "packages/server/dist/middleware/password-hash.js"() {
11384
11384
  "use strict";
11385
11385
  scryptAsync = promisify2(crypto2.scrypt);
11386
11386
  COST = { N: 16384, r: 8, p: 1 };
@@ -11388,7 +11388,7 @@ var init_password_hash = __esm({
11388
11388
  }
11389
11389
  });
11390
11390
 
11391
- // ../server/dist/setup-config.js
11391
+ // packages/server/dist/setup-config.js
11392
11392
  var setup_config_exports = {};
11393
11393
  __export(setup_config_exports, {
11394
11394
  configLeafSet: () => configLeafSet,
@@ -11429,13 +11429,13 @@ function configLeafSet(dotPath) {
11429
11429
  }
11430
11430
  var CONFIG_PATH;
11431
11431
  var init_setup_config = __esm({
11432
- "../server/dist/setup-config.js"() {
11432
+ "packages/server/dist/setup-config.js"() {
11433
11433
  "use strict";
11434
11434
  CONFIG_PATH = path24.join(homedir12(), ".halo", "secrets", "config.yaml");
11435
11435
  }
11436
11436
  });
11437
11437
 
11438
- // ../server/dist/setup-settings.js
11438
+ // packages/server/dist/setup-settings.js
11439
11439
  var setup_settings_exports = {};
11440
11440
  __export(setup_settings_exports, {
11441
11441
  maskSecret: () => maskSecret,
@@ -11514,13 +11514,13 @@ function maskSecret(value) {
11514
11514
  }
11515
11515
  var SETTINGS_PATH2;
11516
11516
  var init_setup_settings = __esm({
11517
- "../server/dist/setup-settings.js"() {
11517
+ "packages/server/dist/setup-settings.js"() {
11518
11518
  "use strict";
11519
11519
  SETTINGS_PATH2 = path25.join(homedir13(), ".halo", "secrets", "settings.yaml");
11520
11520
  }
11521
11521
  });
11522
11522
 
11523
- // ../server/dist/setup-providers.js
11523
+ // packages/server/dist/setup-providers.js
11524
11524
  var setup_providers_exports = {};
11525
11525
  __export(setup_providers_exports, {
11526
11526
  listModelProviders: () => listModelProviders,
@@ -11657,13 +11657,13 @@ function listRequiredSkillsWithSecrets() {
11657
11657
  return out.sort((a, b) => a.id.localeCompare(b.id));
11658
11658
  }
11659
11659
  var init_setup_providers = __esm({
11660
- "../server/dist/setup-providers.js"() {
11660
+ "packages/server/dist/setup-providers.js"() {
11661
11661
  "use strict";
11662
11662
  init_init();
11663
11663
  }
11664
11664
  });
11665
11665
 
11666
- // src/setup-prompts.ts
11666
+ // packages/cli/src/setup-prompts.ts
11667
11667
  var setup_prompts_exports = {};
11668
11668
  __export(setup_prompts_exports, {
11669
11669
  promptMultiSelect: () => promptMultiSelect,
@@ -11949,12 +11949,12 @@ function promptMultiSelectRich(question, options) {
11949
11949
  });
11950
11950
  }
11951
11951
  var init_setup_prompts = __esm({
11952
- "src/setup-prompts.ts"() {
11952
+ "packages/cli/src/setup-prompts.ts"() {
11953
11953
  "use strict";
11954
11954
  }
11955
11955
  });
11956
11956
 
11957
- // src/render-md.ts
11957
+ // packages/cli/src/render-md.ts
11958
11958
  import { marked } from "marked";
11959
11959
  import { markedTerminal } from "marked-terminal";
11960
11960
  function renderMarkdown(text5) {
@@ -11962,14 +11962,14 @@ function renderMarkdown(text5) {
11962
11962
  return rendered.replace(/\n{3,}/g, "\n\n").trimEnd();
11963
11963
  }
11964
11964
  var init_render_md = __esm({
11965
- "src/render-md.ts"() {
11965
+ "packages/cli/src/render-md.ts"() {
11966
11966
  "use strict";
11967
11967
  marked.use(markedTerminal({ reflowText: true, width: Math.min(process.stdout.columns || 80, 120) }));
11968
11968
  marked.use({ breaks: true });
11969
11969
  }
11970
11970
  });
11971
11971
 
11972
- // src/resolve-refs.ts
11972
+ // packages/cli/src/resolve-refs.ts
11973
11973
  import fs23 from "node:fs";
11974
11974
  import path27 from "node:path";
11975
11975
  function mimeFromExt(ext) {
@@ -12051,7 +12051,7 @@ ${content}
12051
12051
  }
12052
12052
  var IMAGE_EXTS, MAX_FILE_BYTES, MAX_IMAGE_BYTES, REF_PATTERN;
12053
12053
  var init_resolve_refs = __esm({
12054
- "src/resolve-refs.ts"() {
12054
+ "packages/cli/src/resolve-refs.ts"() {
12055
12055
  "use strict";
12056
12056
  IMAGE_EXTS = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".bmp"]);
12057
12057
  MAX_FILE_BYTES = 100 * 1024;
@@ -12060,7 +12060,7 @@ var init_resolve_refs = __esm({
12060
12060
  }
12061
12061
  });
12062
12062
 
12063
- // src/format-usage.ts
12063
+ // packages/cli/src/format-usage.ts
12064
12064
  function fmtK(n) {
12065
12065
  return `${(n / 1e3).toFixed(1)}K`;
12066
12066
  }
@@ -12104,7 +12104,7 @@ function formatUsageLine(event) {
12104
12104
  }
12105
12105
  var ANSI;
12106
12106
  var init_format_usage = __esm({
12107
- "src/format-usage.ts"() {
12107
+ "packages/cli/src/format-usage.ts"() {
12108
12108
  "use strict";
12109
12109
  ANSI = {
12110
12110
  reset: "\x1B[0m",
@@ -12118,7 +12118,7 @@ var init_format_usage = __esm({
12118
12118
  }
12119
12119
  });
12120
12120
 
12121
- // src/tui/components/banner.tsx
12121
+ // packages/cli/src/tui/components/banner.tsx
12122
12122
  import { Box, Text } from "ink";
12123
12123
  import { jsx } from "react/jsx-runtime";
12124
12124
  function Banner() {
@@ -12126,7 +12126,7 @@ function Banner() {
12126
12126
  }
12127
12127
  var LINES, COLORS;
12128
12128
  var init_banner = __esm({
12129
- "src/tui/components/banner.tsx"() {
12129
+ "packages/cli/src/tui/components/banner.tsx"() {
12130
12130
  "use strict";
12131
12131
  LINES = [
12132
12132
  " \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ",
@@ -12140,7 +12140,7 @@ var init_banner = __esm({
12140
12140
  }
12141
12141
  });
12142
12142
 
12143
- // src/tui/components/messages.tsx
12143
+ // packages/cli/src/tui/components/messages.tsx
12144
12144
  import { Box as Box2, Static, Text as Text2 } from "ink";
12145
12145
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
12146
12146
  function Messages({ blocks }) {
@@ -12198,7 +12198,7 @@ function Block({ block }) {
12198
12198
  }
12199
12199
  var BANNER_ID;
12200
12200
  var init_messages = __esm({
12201
- "src/tui/components/messages.tsx"() {
12201
+ "packages/cli/src/tui/components/messages.tsx"() {
12202
12202
  "use strict";
12203
12203
  init_format_usage();
12204
12204
  init_banner();
@@ -12206,7 +12206,7 @@ var init_messages = __esm({
12206
12206
  }
12207
12207
  });
12208
12208
 
12209
- // src/tui/components/streaming.tsx
12209
+ // packages/cli/src/tui/components/streaming.tsx
12210
12210
  import { useEffect, useState } from "react";
12211
12211
  import { Box as Box3, Text as Text3 } from "ink";
12212
12212
  import Spinner from "ink-spinner";
@@ -12255,12 +12255,12 @@ function Streaming({ spinnerLabel, liveText, liveThinking, activeSubs, turnStart
12255
12255
  ] });
12256
12256
  }
12257
12257
  var init_streaming = __esm({
12258
- "src/tui/components/streaming.tsx"() {
12258
+ "packages/cli/src/tui/components/streaming.tsx"() {
12259
12259
  "use strict";
12260
12260
  }
12261
12261
  });
12262
12262
 
12263
- // src/tui/history.ts
12263
+ // packages/cli/src/tui/history.ts
12264
12264
  import fs24 from "node:fs";
12265
12265
  import path28 from "node:path";
12266
12266
  import os2 from "node:os";
@@ -12286,14 +12286,14 @@ function appendHistory(entry) {
12286
12286
  }
12287
12287
  var HISTORY_FILE, MAX_ENTRIES;
12288
12288
  var init_history = __esm({
12289
- "src/tui/history.ts"() {
12289
+ "packages/cli/src/tui/history.ts"() {
12290
12290
  "use strict";
12291
12291
  HISTORY_FILE = path28.join(os2.homedir(), ".halo", "global", "tui-history.json");
12292
12292
  MAX_ENTRIES = 100;
12293
12293
  }
12294
12294
  });
12295
12295
 
12296
- // src/tui/components/status-bar.tsx
12296
+ // packages/cli/src/tui/components/status-bar.tsx
12297
12297
  import { Box as Box4, Text as Text4 } from "ink";
12298
12298
  import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
12299
12299
  function shortModel(modelId) {
@@ -12329,12 +12329,12 @@ function StatusBar({ agentName, modelId, contextPercent, workspace, sessionId, v
12329
12329
  ] });
12330
12330
  }
12331
12331
  var init_status_bar = __esm({
12332
- "src/tui/components/status-bar.tsx"() {
12332
+ "packages/cli/src/tui/components/status-bar.tsx"() {
12333
12333
  "use strict";
12334
12334
  }
12335
12335
  });
12336
12336
 
12337
- // src/tui/components/slash-suggest.tsx
12337
+ // packages/cli/src/tui/components/slash-suggest.tsx
12338
12338
  import { Box as Box5, Text as Text5 } from "ink";
12339
12339
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
12340
12340
  function SlashSuggest({ items, selectedIdx, maxWidth = 80 }) {
@@ -12361,12 +12361,12 @@ function SlashSuggest({ items, selectedIdx, maxWidth = 80 }) {
12361
12361
  ] });
12362
12362
  }
12363
12363
  var init_slash_suggest = __esm({
12364
- "src/tui/components/slash-suggest.tsx"() {
12364
+ "packages/cli/src/tui/components/slash-suggest.tsx"() {
12365
12365
  "use strict";
12366
12366
  }
12367
12367
  });
12368
12368
 
12369
- // src/tui/components/path-suggest.tsx
12369
+ // packages/cli/src/tui/components/path-suggest.tsx
12370
12370
  import { Box as Box6, Text as Text6 } from "ink";
12371
12371
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
12372
12372
  function PathSuggest({ items, selectedIdx, cwdLabel }) {
@@ -12393,12 +12393,12 @@ function PathSuggest({ items, selectedIdx, cwdLabel }) {
12393
12393
  ] });
12394
12394
  }
12395
12395
  var init_path_suggest = __esm({
12396
- "src/tui/components/path-suggest.tsx"() {
12396
+ "packages/cli/src/tui/components/path-suggest.tsx"() {
12397
12397
  "use strict";
12398
12398
  }
12399
12399
  });
12400
12400
 
12401
- // src/tui/path-suggest-engine.ts
12401
+ // packages/cli/src/tui/path-suggest-engine.ts
12402
12402
  import fs25 from "node:fs";
12403
12403
  import path29 from "node:path";
12404
12404
  function detectActiveRef(value) {
@@ -12485,13 +12485,13 @@ function applyPathPick(value, ref, pick) {
12485
12485
  }
12486
12486
  var IMAGE_EXTS2;
12487
12487
  var init_path_suggest_engine = __esm({
12488
- "src/tui/path-suggest-engine.ts"() {
12488
+ "packages/cli/src/tui/path-suggest-engine.ts"() {
12489
12489
  "use strict";
12490
12490
  IMAGE_EXTS2 = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".bmp"]);
12491
12491
  }
12492
12492
  });
12493
12493
 
12494
- // src/tui/line-editor.ts
12494
+ // packages/cli/src/tui/line-editor.ts
12495
12495
  function toGraphemes(s) {
12496
12496
  if (s === "") return [];
12497
12497
  return [...segmenter.segment(s)].map((seg) => seg.segment);
@@ -12545,13 +12545,13 @@ function deleteToEnd(e) {
12545
12545
  }
12546
12546
  var segmenter;
12547
12547
  var init_line_editor = __esm({
12548
- "src/tui/line-editor.ts"() {
12548
+ "packages/cli/src/tui/line-editor.ts"() {
12549
12549
  "use strict";
12550
12550
  segmenter = new Intl.Segmenter();
12551
12551
  }
12552
12552
  });
12553
12553
 
12554
- // src/tui/components/text-input.tsx
12554
+ // packages/cli/src/tui/components/text-input.tsx
12555
12555
  import { Text as Text7 } from "ink";
12556
12556
  import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
12557
12557
  function TextInputView({ value, cursor, placeholder }) {
@@ -12576,13 +12576,13 @@ function TextInputView({ value, cursor, placeholder }) {
12576
12576
  ] });
12577
12577
  }
12578
12578
  var init_text_input = __esm({
12579
- "src/tui/components/text-input.tsx"() {
12579
+ "packages/cli/src/tui/components/text-input.tsx"() {
12580
12580
  "use strict";
12581
12581
  init_line_editor();
12582
12582
  }
12583
12583
  });
12584
12584
 
12585
- // src/tui/components/input-box.tsx
12585
+ // packages/cli/src/tui/components/input-box.tsx
12586
12586
  import { useState as useState2, useEffect as useEffect2, useMemo, useRef } from "react";
12587
12587
  import { Box as Box7, Text as Text8, useInput, usePaste } from "ink";
12588
12588
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
@@ -12829,7 +12829,7 @@ function InputBox({ enabled, placeholder, history, onSubmit, hint, commands = []
12829
12829
  ] });
12830
12830
  }
12831
12831
  var init_input_box = __esm({
12832
- "src/tui/components/input-box.tsx"() {
12832
+ "packages/cli/src/tui/components/input-box.tsx"() {
12833
12833
  "use strict";
12834
12834
  init_slash_suggest();
12835
12835
  init_path_suggest();
@@ -12839,7 +12839,7 @@ var init_input_box = __esm({
12839
12839
  }
12840
12840
  });
12841
12841
 
12842
- // src/tui/components/log-navigator.tsx
12842
+ // packages/cli/src/tui/components/log-navigator.tsx
12843
12843
  import { useState as useState3, useMemo as useMemo2, useEffect as useEffect3 } from "react";
12844
12844
  import { Box as Box8, Text as Text9, useInput as useInput2 } from "ink";
12845
12845
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
@@ -12918,12 +12918,12 @@ function LogNavigator({ tree, onPick, onCancel }) {
12918
12918
  ] });
12919
12919
  }
12920
12920
  var init_log_navigator = __esm({
12921
- "src/tui/components/log-navigator.tsx"() {
12921
+ "packages/cli/src/tui/components/log-navigator.tsx"() {
12922
12922
  "use strict";
12923
12923
  }
12924
12924
  });
12925
12925
 
12926
- // src/tui/components/log-viewer.tsx
12926
+ // packages/cli/src/tui/components/log-viewer.tsx
12927
12927
  import { useState as useState4, useMemo as useMemo3, useEffect as useEffect4, useRef as useRef2 } from "react";
12928
12928
  import { Box as Box9, Text as Text10, useInput as useInput3, useStdout } from "ink";
12929
12929
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
@@ -13007,13 +13007,13 @@ function truncateForCols(s, cols) {
13007
13007
  }
13008
13008
  var ANSI_RE;
13009
13009
  var init_log_viewer = __esm({
13010
- "src/tui/components/log-viewer.tsx"() {
13010
+ "packages/cli/src/tui/components/log-viewer.tsx"() {
13011
13011
  "use strict";
13012
13012
  ANSI_RE = /\x1b\[[0-9;]*m/g;
13013
13013
  }
13014
13014
  });
13015
13015
 
13016
- // src/tui/app.tsx
13016
+ // packages/cli/src/tui/app.tsx
13017
13017
  import { useEffect as useEffect5, useMemo as useMemo4, useReducer, useState as useState5, useRef as useRef3 } from "react";
13018
13018
  import { Box as Box10, useApp, useInput as useInput4 } from "ink";
13019
13019
  import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
@@ -13721,7 +13721,7 @@ ${lines.join("\n")}` });
13721
13721
  }
13722
13722
  var MAX_CONTEXT_TOKENS_FALLBACK, blockSeq, ANSI2;
13723
13723
  var init_app = __esm({
13724
- "src/tui/app.tsx"() {
13724
+ "packages/cli/src/tui/app.tsx"() {
13725
13725
  "use strict";
13726
13726
  init_render_md();
13727
13727
  init_resolve_refs();
@@ -13748,7 +13748,7 @@ var init_app = __esm({
13748
13748
  }
13749
13749
  });
13750
13750
 
13751
- // src/tui.tsx
13751
+ // packages/cli/src/tui.tsx
13752
13752
  var tui_exports = {};
13753
13753
  __export(tui_exports, {
13754
13754
  runTui: () => runTui
@@ -13763,13 +13763,13 @@ async function runTui(harness, opts = {}) {
13763
13763
  await instance.waitUntilExit();
13764
13764
  }
13765
13765
  var init_tui = __esm({
13766
- "src/tui.tsx"() {
13766
+ "packages/cli/src/tui.tsx"() {
13767
13767
  "use strict";
13768
13768
  init_app();
13769
13769
  }
13770
13770
  });
13771
13771
 
13772
- // src/cli.ts
13772
+ // packages/cli/src/cli.ts
13773
13773
  var cli_exports = {};
13774
13774
  __export(cli_exports, {
13775
13775
  runCli: () => runCli
@@ -13951,7 +13951,7 @@ ${tag}${formatUsageLine(event)}
13951
13951
  return errorText ? 1 : 0;
13952
13952
  }
13953
13953
  var init_cli = __esm({
13954
- "src/cli.ts"() {
13954
+ "packages/cli/src/cli.ts"() {
13955
13955
  "use strict";
13956
13956
  init_render_md();
13957
13957
  init_resolve_refs();
@@ -13959,12 +13959,12 @@ var init_cli = __esm({
13959
13959
  }
13960
13960
  });
13961
13961
 
13962
- // ../core/dist/workspace/workspace.js
13962
+ // packages/core/dist/workspace/workspace.js
13963
13963
  import { readFile, writeFile, mkdir, readdir, access } from "node:fs/promises";
13964
13964
  import { resolve, relative, join, isAbsolute } from "node:path";
13965
13965
  var WorkspaceError, SKIP_DIRS2, Workspace;
13966
13966
  var init_workspace = __esm({
13967
- "../core/dist/workspace/workspace.js"() {
13967
+ "packages/core/dist/workspace/workspace.js"() {
13968
13968
  "use strict";
13969
13969
  WorkspaceError = class extends Error {
13970
13970
  constructor(message) {
@@ -14062,13 +14062,13 @@ None yet.
14062
14062
  }
14063
14063
  });
14064
14064
 
14065
- // ../core/dist/workspace/git-manager.js
14065
+ // packages/core/dist/workspace/git-manager.js
14066
14066
  import path30 from "node:path";
14067
14067
  import { promises as fs26 } from "node:fs";
14068
14068
  import simpleGit from "simple-git";
14069
14069
  var GitManagerError, GitManager;
14070
14070
  var init_git_manager = __esm({
14071
- "../core/dist/workspace/git-manager.js"() {
14071
+ "packages/core/dist/workspace/git-manager.js"() {
14072
14072
  "use strict";
14073
14073
  GitManagerError = class extends Error {
14074
14074
  constructor(message) {
@@ -14434,16 +14434,16 @@ var init_git_manager = __esm({
14434
14434
  }
14435
14435
  });
14436
14436
 
14437
- // ../core/dist/index.js
14437
+ // packages/core/dist/index.js
14438
14438
  var init_dist = __esm({
14439
- "../core/dist/index.js"() {
14439
+ "packages/core/dist/index.js"() {
14440
14440
  "use strict";
14441
14441
  init_workspace();
14442
14442
  init_git_manager();
14443
14443
  }
14444
14444
  });
14445
14445
 
14446
- // ../server/dist/channels/shared/media.js
14446
+ // packages/server/dist/channels/shared/media.js
14447
14447
  import path31 from "node:path";
14448
14448
  import os3 from "node:os";
14449
14449
  function tempDir() {
@@ -14466,7 +14466,7 @@ function classifyMedia(filePath) {
14466
14466
  }
14467
14467
  var IMAGE_EXTS3, VIDEO_EXTS, VOICE_EXTS;
14468
14468
  var init_media = __esm({
14469
- "../server/dist/channels/shared/media.js"() {
14469
+ "packages/server/dist/channels/shared/media.js"() {
14470
14470
  "use strict";
14471
14471
  IMAGE_EXTS3 = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"]);
14472
14472
  VIDEO_EXTS = /* @__PURE__ */ new Set([".mp4", ".mov", ".m4v", ".webm", ".avi"]);
@@ -14474,7 +14474,7 @@ var init_media = __esm({
14474
14474
  }
14475
14475
  });
14476
14476
 
14477
- // ../server/dist/routes/files.js
14477
+ // packages/server/dist/routes/files.js
14478
14478
  import { Hono } from "hono";
14479
14479
  import fs27 from "node:fs/promises";
14480
14480
  import { createReadStream } from "node:fs";
@@ -15066,14 +15066,14 @@ function createFileRoutes() {
15066
15066
  return app2;
15067
15067
  }
15068
15068
  var init_files = __esm({
15069
- "../server/dist/routes/files.js"() {
15069
+ "packages/server/dist/routes/files.js"() {
15070
15070
  "use strict";
15071
15071
  init_dist();
15072
15072
  init_media();
15073
15073
  }
15074
15074
  });
15075
15075
 
15076
- // ../server/dist/git-credentials.js
15076
+ // packages/server/dist/git-credentials.js
15077
15077
  import fs28 from "node:fs";
15078
15078
  import path33 from "node:path";
15079
15079
  import { homedir as homedir15 } from "node:os";
@@ -15148,13 +15148,13 @@ function deleteGitCredential(host) {
15148
15148
  }
15149
15149
  var GIT_CREDENTIALS_PATH;
15150
15150
  var init_git_credentials = __esm({
15151
- "../server/dist/git-credentials.js"() {
15151
+ "packages/server/dist/git-credentials.js"() {
15152
15152
  "use strict";
15153
15153
  GIT_CREDENTIALS_PATH = path33.join(homedir15(), ".git-credentials");
15154
15154
  }
15155
15155
  });
15156
15156
 
15157
- // ../server/dist/git-ssh.js
15157
+ // packages/server/dist/git-ssh.js
15158
15158
  import fs29 from "node:fs";
15159
15159
  import os4 from "node:os";
15160
15160
  import path34 from "node:path";
@@ -15331,7 +15331,7 @@ function getRemoteProtocol(projectRoot) {
15331
15331
  }
15332
15332
  var SSH_DIR, NON_KEY_NAMES, ownedAgentPid, ASKPASS_SCRIPT;
15333
15333
  var init_git_ssh = __esm({
15334
- "../server/dist/git-ssh.js"() {
15334
+ "packages/server/dist/git-ssh.js"() {
15335
15335
  "use strict";
15336
15336
  SSH_DIR = path34.join(os4.homedir(), ".ssh");
15337
15337
  NON_KEY_NAMES = /* @__PURE__ */ new Set(["known_hosts", "known_hosts2", "authorized_keys", "config"]);
@@ -15344,7 +15344,7 @@ printf '%s\\n' "$HALO_SSH_PASSPHRASE"
15344
15344
  }
15345
15345
  });
15346
15346
 
15347
- // ../server/dist/routes/git.js
15347
+ // packages/server/dist/routes/git.js
15348
15348
  import { Hono as Hono2 } from "hono";
15349
15349
  import fs30 from "node:fs/promises";
15350
15350
  import os5 from "node:os";
@@ -15698,7 +15698,7 @@ function createGitRoutes() {
15698
15698
  return app2;
15699
15699
  }
15700
15700
  var init_git = __esm({
15701
- "../server/dist/routes/git.js"() {
15701
+ "packages/server/dist/routes/git.js"() {
15702
15702
  "use strict";
15703
15703
  init_dist();
15704
15704
  init_git_credentials();
@@ -15707,7 +15707,7 @@ var init_git = __esm({
15707
15707
  }
15708
15708
  });
15709
15709
 
15710
- // ../server/dist/routes/agent-configs.js
15710
+ // packages/server/dist/routes/agent-configs.js
15711
15711
  import { Hono as Hono3 } from "hono";
15712
15712
  import fs31 from "node:fs/promises";
15713
15713
  import path36 from "node:path";
@@ -16200,7 +16200,7 @@ ${body.description ?? ""}
16200
16200
  }
16201
16201
  var _cachedTools, GLOBAL_AGENTS_DIR3, FALLBACK_SCAFFOLD_PROVIDER, _yamlCache;
16202
16202
  var init_agent_configs = __esm({
16203
- "../server/dist/routes/agent-configs.js"() {
16203
+ "packages/server/dist/routes/agent-configs.js"() {
16204
16204
  "use strict";
16205
16205
  init_workspace_tools();
16206
16206
  init_draft_tool();
@@ -16214,7 +16214,7 @@ var init_agent_configs = __esm({
16214
16214
  }
16215
16215
  });
16216
16216
 
16217
- // ../server/dist/routes/skills.js
16217
+ // packages/server/dist/routes/skills.js
16218
16218
  import { Hono as Hono4 } from "hono";
16219
16219
  import fs32 from "node:fs/promises";
16220
16220
  import path37 from "node:path";
@@ -16412,7 +16412,7 @@ function createSkillRoutes() {
16412
16412
  }
16413
16413
  var GLOBAL_SETTINGS_PATH, _skillMdCache;
16414
16414
  var init_skills = __esm({
16415
- "../server/dist/routes/skills.js"() {
16415
+ "packages/server/dist/routes/skills.js"() {
16416
16416
  "use strict";
16417
16417
  init_agent_loader();
16418
16418
  init_db();
@@ -16421,7 +16421,7 @@ var init_skills = __esm({
16421
16421
  }
16422
16422
  });
16423
16423
 
16424
- // ../server/dist/routes/settings.js
16424
+ // packages/server/dist/routes/settings.js
16425
16425
  import { Hono as Hono5 } from "hono";
16426
16426
  import fs33 from "node:fs/promises";
16427
16427
  import path38 from "node:path";
@@ -16670,7 +16670,7 @@ function createSettingsRoutes() {
16670
16670
  }
16671
16671
  var GLOBAL_SETTINGS_PATH2, _changeListeners;
16672
16672
  var init_settings = __esm({
16673
- "../server/dist/routes/settings.js"() {
16673
+ "packages/server/dist/routes/settings.js"() {
16674
16674
  "use strict";
16675
16675
  init_settings_schema();
16676
16676
  GLOBAL_SETTINGS_PATH2 = path38.join(homedir18(), ".halo", "secrets", "settings.yaml");
@@ -16678,7 +16678,7 @@ var init_settings = __esm({
16678
16678
  }
16679
16679
  });
16680
16680
 
16681
- // ../server/dist/paths.js
16681
+ // packages/server/dist/paths.js
16682
16682
  import path39 from "node:path";
16683
16683
  import { homedir as homedir19 } from "node:os";
16684
16684
  function haloHome() {
@@ -16709,12 +16709,12 @@ function evoApplyLogFile(applyId) {
16709
16709
  return path39.join(evoLogsDir(), `apply-${applyId}.log`);
16710
16710
  }
16711
16711
  var init_paths = __esm({
16712
- "../server/dist/paths.js"() {
16712
+ "packages/server/dist/paths.js"() {
16713
16713
  "use strict";
16714
16714
  }
16715
16715
  });
16716
16716
 
16717
- // ../server/dist/evolution/archive.js
16717
+ // packages/server/dist/evolution/archive.js
16718
16718
  import fs34 from "node:fs";
16719
16719
  import path40 from "node:path";
16720
16720
  import { spawnSync as spawnSync3 } from "node:child_process";
@@ -16858,7 +16858,7 @@ function stopArchiveDaemon() {
16858
16858
  }
16859
16859
  var TERMINAL_RUN_STATUSES, TERMINAL_APPLY_STATUSES, DAY_MS, ARCHIVE_AFTER_MS, PURGE_AFTER_MS, _archiveTimer;
16860
16860
  var init_archive = __esm({
16861
- "../server/dist/evolution/archive.js"() {
16861
+ "packages/server/dist/evolution/archive.js"() {
16862
16862
  "use strict";
16863
16863
  init_evo_db();
16864
16864
  init_paths();
@@ -16871,7 +16871,7 @@ var init_archive = __esm({
16871
16871
  }
16872
16872
  });
16873
16873
 
16874
- // ../server/dist/routes/evolution.js
16874
+ // packages/server/dist/routes/evolution.js
16875
16875
  import { Hono as Hono6 } from "hono";
16876
16876
  import { eq as eq7, desc as desc2, asc, inArray as inArray2, lt as lt3, and as and5, or, sql } from "drizzle-orm";
16877
16877
  import fs35 from "node:fs/promises";
@@ -17131,7 +17131,7 @@ function extractText(content) {
17131
17131
  }
17132
17132
  var UNDELETABLE_RUN_STATUSES;
17133
17133
  var init_evolution = __esm({
17134
- "../server/dist/routes/evolution.js"() {
17134
+ "packages/server/dist/routes/evolution.js"() {
17135
17135
  "use strict";
17136
17136
  init_evo_db();
17137
17137
  init_archive();
@@ -17140,7 +17140,7 @@ var init_evolution = __esm({
17140
17140
  }
17141
17141
  });
17142
17142
 
17143
- // ../server/dist/routes/sessions.js
17143
+ // packages/server/dist/routes/sessions.js
17144
17144
  import { Hono as Hono7 } from "hono";
17145
17145
  import { eq as eq8, desc as desc3 } from "drizzle-orm";
17146
17146
  function rawId() {
@@ -17405,7 +17405,7 @@ function createSessionRoutes(smRegistry) {
17405
17405
  }
17406
17406
  var msgCounter2;
17407
17407
  var init_sessions = __esm({
17408
- "../server/dist/routes/sessions.js"() {
17408
+ "packages/server/dist/routes/sessions.js"() {
17409
17409
  "use strict";
17410
17410
  init_db();
17411
17411
  init_schema();
@@ -17415,7 +17415,7 @@ var init_sessions = __esm({
17415
17415
  }
17416
17416
  });
17417
17417
 
17418
- // ../server/dist/db/channel-db.js
17418
+ // packages/server/dist/db/channel-db.js
17419
17419
  import Database3 from "better-sqlite3";
17420
17420
  import { drizzle as drizzle3 } from "drizzle-orm/better-sqlite3";
17421
17421
  import { sqliteTable as sqliteTable3, text as text3, integer as integer3 } from "drizzle-orm/sqlite-core";
@@ -17440,7 +17440,7 @@ function getChannelDb() {
17440
17440
  }
17441
17441
  var channelAccounts, CREATE_SQL2, _channelDb;
17442
17442
  var init_channel_db = __esm({
17443
- "../server/dist/db/channel-db.js"() {
17443
+ "packages/server/dist/db/channel-db.js"() {
17444
17444
  "use strict";
17445
17445
  channelAccounts = sqliteTable3("channel_accounts", {
17446
17446
  accountId: text3("account_id").primaryKey(),
@@ -17473,7 +17473,7 @@ CREATE INDEX IF NOT EXISTS idx_channel_accounts_type ON channel_accounts(channel
17473
17473
  }
17474
17474
  });
17475
17475
 
17476
- // ../server/dist/channels/shared/accounts.js
17476
+ // packages/server/dist/channels/shared/accounts.js
17477
17477
  import fs37 from "node:fs";
17478
17478
  import { eq as eq9, and as and6 } from "drizzle-orm";
17479
17479
  function resolveAccountWorkspace(account) {
@@ -17565,7 +17565,7 @@ function deleteAccount(db, accountId) {
17565
17565
  }
17566
17566
  var _lastActiveChatCache;
17567
17567
  var init_accounts = __esm({
17568
- "../server/dist/channels/shared/accounts.js"() {
17568
+ "packages/server/dist/channels/shared/accounts.js"() {
17569
17569
  "use strict";
17570
17570
  init_channel_db();
17571
17571
  init_init();
@@ -17573,7 +17573,7 @@ var init_accounts = __esm({
17573
17573
  }
17574
17574
  });
17575
17575
 
17576
- // ../server/dist/channels/web/accounts.js
17576
+ // packages/server/dist/channels/web/accounts.js
17577
17577
  function toWeb(a) {
17578
17578
  const c = a.config;
17579
17579
  return {
@@ -17636,14 +17636,14 @@ function deleteAccount2(db, accountId) {
17636
17636
  }
17637
17637
  var CH;
17638
17638
  var init_accounts2 = __esm({
17639
- "../server/dist/channels/web/accounts.js"() {
17639
+ "packages/server/dist/channels/web/accounts.js"() {
17640
17640
  "use strict";
17641
17641
  init_accounts();
17642
17642
  CH = "web";
17643
17643
  }
17644
17644
  });
17645
17645
 
17646
- // ../server/dist/middleware/brute-force.js
17646
+ // packages/server/dist/middleware/brute-force.js
17647
17647
  function bucket(name) {
17648
17648
  let b = buckets.get(name);
17649
17649
  if (!b) {
@@ -17685,7 +17685,7 @@ function clearFailures(bucketName, ip) {
17685
17685
  }
17686
17686
  var MAX_ATTEMPTS, LOCKOUT_MS, buckets;
17687
17687
  var init_brute_force = __esm({
17688
- "../server/dist/middleware/brute-force.js"() {
17688
+ "packages/server/dist/middleware/brute-force.js"() {
17689
17689
  "use strict";
17690
17690
  MAX_ATTEMPTS = 5;
17691
17691
  LOCKOUT_MS = 15 * 60 * 1e3;
@@ -17693,7 +17693,7 @@ var init_brute_force = __esm({
17693
17693
  }
17694
17694
  });
17695
17695
 
17696
- // ../server/dist/routes/show.js
17696
+ // packages/server/dist/routes/show.js
17697
17697
  import { Hono as Hono8 } from "hono";
17698
17698
  import fs38 from "node:fs";
17699
17699
  import path43 from "node:path";
@@ -18068,7 +18068,7 @@ function createShowRoutes(registry2) {
18068
18068
  }
18069
18069
  var TOKEN_BUCKET, SESSIONS_PER_WS, _skillCache, _metaCache, _roReaders, SESSION_LOG_MAX_MSGS, _birthCache;
18070
18070
  var init_show = __esm({
18071
- "../server/dist/routes/show.js"() {
18071
+ "packages/server/dist/routes/show.js"() {
18072
18072
  "use strict";
18073
18073
  init_channel_db();
18074
18074
  init_accounts2();
@@ -18085,7 +18085,7 @@ var init_show = __esm({
18085
18085
  }
18086
18086
  });
18087
18087
 
18088
- // ../server/dist/routes/metrics.js
18088
+ // packages/server/dist/routes/metrics.js
18089
18089
  import { Hono as Hono9 } from "hono";
18090
18090
  import fs39 from "node:fs";
18091
18091
  function family(name, type, help, samples) {
@@ -18181,7 +18181,7 @@ function createMetricsRoutes(registry2) {
18181
18181
  }
18182
18182
  var TOKEN_BUCKET2, SESSIONS_PER_WS2;
18183
18183
  var init_metrics = __esm({
18184
- "../server/dist/routes/metrics.js"() {
18184
+ "packages/server/dist/routes/metrics.js"() {
18185
18185
  "use strict";
18186
18186
  init_channel_db();
18187
18187
  init_accounts2();
@@ -18191,7 +18191,7 @@ var init_metrics = __esm({
18191
18191
  }
18192
18192
  });
18193
18193
 
18194
- // ../server/dist/routes/commands.js
18194
+ // packages/server/dist/routes/commands.js
18195
18195
  import { Hono as Hono10 } from "hono";
18196
18196
  function createCommandRoutes(registry2, smRegistry) {
18197
18197
  const app2 = new Hono10();
@@ -18216,12 +18216,12 @@ function createCommandRoutes(registry2, smRegistry) {
18216
18216
  return app2;
18217
18217
  }
18218
18218
  var init_commands3 = __esm({
18219
- "../server/dist/routes/commands.js"() {
18219
+ "packages/server/dist/routes/commands.js"() {
18220
18220
  "use strict";
18221
18221
  }
18222
18222
  });
18223
18223
 
18224
- // ../server/dist/ws/file-watcher.js
18224
+ // packages/server/dist/ws/file-watcher.js
18225
18225
  import fs40 from "node:fs";
18226
18226
  import path44 from "node:path";
18227
18227
  function isUnwatchablePath(absPath) {
@@ -18237,7 +18237,7 @@ function isUnwatchablePath(absPath) {
18237
18237
  }
18238
18238
  var IGNORED_SEGMENTS, IGNORE_GLOBS, WorkspaceWatcher;
18239
18239
  var init_file_watcher = __esm({
18240
- "../server/dist/ws/file-watcher.js"() {
18240
+ "packages/server/dist/ws/file-watcher.js"() {
18241
18241
  "use strict";
18242
18242
  IGNORED_SEGMENTS = [
18243
18243
  // VCS
@@ -18426,12 +18426,12 @@ var init_file_watcher = __esm({
18426
18426
  }
18427
18427
  });
18428
18428
 
18429
- // ../server/dist/ws/git-dir-watcher.js
18429
+ // packages/server/dist/ws/git-dir-watcher.js
18430
18430
  import fs41 from "node:fs";
18431
18431
  import path45 from "node:path";
18432
18432
  var GitDirWatcher;
18433
18433
  var init_git_dir_watcher = __esm({
18434
- "../server/dist/ws/git-dir-watcher.js"() {
18434
+ "packages/server/dist/ws/git-dir-watcher.js"() {
18435
18435
  "use strict";
18436
18436
  GitDirWatcher = class {
18437
18437
  watcher = null;
@@ -18540,7 +18540,7 @@ var init_git_dir_watcher = __esm({
18540
18540
  }
18541
18541
  });
18542
18542
 
18543
- // ../server/dist/ws/event-processor.js
18543
+ // packages/server/dist/ws/event-processor.js
18544
18544
  function sendJson(ws, data) {
18545
18545
  if (ws.readyState === ws.OPEN) {
18546
18546
  try {
@@ -18639,13 +18639,13 @@ function bufferDetachedNotification(event, pendingEvents) {
18639
18639
  }
18640
18640
  }
18641
18641
  var init_event_processor = __esm({
18642
- "../server/dist/ws/event-processor.js"() {
18642
+ "packages/server/dist/ws/event-processor.js"() {
18643
18643
  "use strict";
18644
18644
  init_ui_log_builder();
18645
18645
  }
18646
18646
  });
18647
18647
 
18648
- // ../server/dist/ws/terminal-manager.js
18648
+ // packages/server/dist/ws/terminal-manager.js
18649
18649
  import { homedir as homedir21 } from "node:os";
18650
18650
  import { basename } from "node:path";
18651
18651
  import { createRequire } from "node:module";
@@ -18676,7 +18676,7 @@ function attachListenersOnce(t2) {
18676
18676
  }
18677
18677
  var requireFromHere, ptyModule, TERMINAL_GRACE_MS, terminals, TerminalManager;
18678
18678
  var init_terminal_manager = __esm({
18679
- "../server/dist/ws/terminal-manager.js"() {
18679
+ "packages/server/dist/ws/terminal-manager.js"() {
18680
18680
  "use strict";
18681
18681
  init_config();
18682
18682
  init_event_processor();
@@ -18809,7 +18809,7 @@ var init_terminal_manager = __esm({
18809
18809
  }
18810
18810
  });
18811
18811
 
18812
- // ../server/dist/ws/handler.js
18812
+ // packages/server/dist/ws/handler.js
18813
18813
  import path46 from "node:path";
18814
18814
  function setupWebSocketHandler(deps) {
18815
18815
  const { wss: wss2, registry: registry2 } = deps;
@@ -19319,7 +19319,7 @@ ${msg.message}` : markers.join("\n");
19319
19319
  }
19320
19320
  var detachedSessions;
19321
19321
  var init_handler = __esm({
19322
- "../server/dist/ws/handler.js"() {
19322
+ "packages/server/dist/ws/handler.js"() {
19323
19323
  "use strict";
19324
19324
  init_ui_log_builder();
19325
19325
  init_config();
@@ -19333,7 +19333,7 @@ var init_handler = __esm({
19333
19333
  }
19334
19334
  });
19335
19335
 
19336
- // ../server/dist/db/cron-db.js
19336
+ // packages/server/dist/db/cron-db.js
19337
19337
  import Database5 from "better-sqlite3";
19338
19338
  import { drizzle as drizzle4 } from "drizzle-orm/better-sqlite3";
19339
19339
  import { sqliteTable as sqliteTable4, text as text4, integer as integer4 } from "drizzle-orm/sqlite-core";
@@ -19361,7 +19361,7 @@ function getCronDb() {
19361
19361
  }
19362
19362
  var cronJobs, cronRuns, CREATE_SQL3, _cronDb;
19363
19363
  var init_cron_db = __esm({
19364
- "../server/dist/db/cron-db.js"() {
19364
+ "packages/server/dist/db/cron-db.js"() {
19365
19365
  "use strict";
19366
19366
  cronJobs = sqliteTable4("cron_jobs", {
19367
19367
  id: text4("id").primaryKey(),
@@ -19459,7 +19459,7 @@ CREATE INDEX IF NOT EXISTS idx_cron_runs_status ON cron_runs(status);
19459
19459
  }
19460
19460
  });
19461
19461
 
19462
- // ../server/dist/cron/dispatcher.js
19462
+ // packages/server/dist/cron/dispatcher.js
19463
19463
  function registerCronDispatcher(d) {
19464
19464
  _registry.set(d.channelType, d);
19465
19465
  }
@@ -19504,13 +19504,13 @@ async function dispatchToTargets(text5, targets) {
19504
19504
  }
19505
19505
  var _registry;
19506
19506
  var init_dispatcher = __esm({
19507
- "../server/dist/cron/dispatcher.js"() {
19507
+ "packages/server/dist/cron/dispatcher.js"() {
19508
19508
  "use strict";
19509
19509
  _registry = /* @__PURE__ */ new Map();
19510
19510
  }
19511
19511
  });
19512
19512
 
19513
- // ../server/dist/cron/runner.js
19513
+ // packages/server/dist/cron/runner.js
19514
19514
  import { spawn as spawn2 } from "node:child_process";
19515
19515
  import fs43 from "node:fs";
19516
19516
  import path48 from "node:path";
@@ -19897,7 +19897,7 @@ function pruneOldLogs() {
19897
19897
  }
19898
19898
  var DAY_MS2, CLI_TIMEOUT_SEC, RUNS_PER_JOB_KEEP, LOG_RETENTION_DAYS, _active, _inflight, _fingerprint, _lastCronDataVersion;
19899
19899
  var init_runner = __esm({
19900
- "../server/dist/cron/runner.js"() {
19900
+ "packages/server/dist/cron/runner.js"() {
19901
19901
  "use strict";
19902
19902
  init_cron_db();
19903
19903
  init_dispatcher();
@@ -19913,7 +19913,7 @@ var init_runner = __esm({
19913
19913
  }
19914
19914
  });
19915
19915
 
19916
- // ../server/dist/routes/cron.js
19916
+ // packages/server/dist/routes/cron.js
19917
19917
  import { Hono as Hono11 } from "hono";
19918
19918
  import { eq as eq11, desc as desc4, lt as lt5, and as and7 } from "drizzle-orm";
19919
19919
  import fs44 from "node:fs/promises";
@@ -20143,7 +20143,7 @@ function computeNextRun(j) {
20143
20143
  }
20144
20144
  }
20145
20145
  var init_cron = __esm({
20146
- "../server/dist/routes/cron.js"() {
20146
+ "packages/server/dist/routes/cron.js"() {
20147
20147
  "use strict";
20148
20148
  init_cron_db();
20149
20149
  init_runner();
@@ -20152,7 +20152,7 @@ var init_cron = __esm({
20152
20152
  }
20153
20153
  });
20154
20154
 
20155
- // ../server/dist/evolution/ticker.js
20155
+ // packages/server/dist/evolution/ticker.js
20156
20156
  import { eq as eq12, and as and8, or as or2, lt as lt6, asc as asc2, isNull as isNull4, sql as sql2 } from "drizzle-orm";
20157
20157
  function setEvoSpawner(fn) {
20158
20158
  _spawner = fn;
@@ -20373,7 +20373,7 @@ function claimApply(id) {
20373
20373
  }
20374
20374
  var _lastRunStatus, _lastApplyStatus, _spawner, TICK_INTERVAL_MS, _interval;
20375
20375
  var init_ticker = __esm({
20376
- "../server/dist/evolution/ticker.js"() {
20376
+ "packages/server/dist/evolution/ticker.js"() {
20377
20377
  "use strict";
20378
20378
  init_config();
20379
20379
  init_evo_db();
@@ -20388,13 +20388,13 @@ var init_ticker = __esm({
20388
20388
  }
20389
20389
  });
20390
20390
 
20391
- // ../server/dist/evolution/spawn.js
20391
+ // packages/server/dist/evolution/spawn.js
20392
20392
  import path49 from "node:path";
20393
20393
  import { spawn as spawn3 } from "node:child_process";
20394
20394
  import { fileURLToPath as fileURLToPath2 } from "node:url";
20395
20395
  var __dirname2, WRAPPER_PATH, realEvoSpawner;
20396
20396
  var init_spawn = __esm({
20397
- "../server/dist/evolution/spawn.js"() {
20397
+ "packages/server/dist/evolution/spawn.js"() {
20398
20398
  "use strict";
20399
20399
  __dirname2 = path49.dirname(fileURLToPath2(import.meta.url));
20400
20400
  WRAPPER_PATH = path49.resolve(__dirname2, "evo-wrapper.js");
@@ -20415,7 +20415,7 @@ var init_spawn = __esm({
20415
20415
  }
20416
20416
  });
20417
20417
 
20418
- // ../server/dist/channels/registry.js
20418
+ // packages/server/dist/channels/registry.js
20419
20419
  function bootChannels(app2, descriptors, deps) {
20420
20420
  for (const d of descriptors) {
20421
20421
  if (d.registerCronDispatcher)
@@ -20440,13 +20440,13 @@ async function shutdownChannels() {
20440
20440
  }
20441
20441
  var _running;
20442
20442
  var init_registry2 = __esm({
20443
- "../server/dist/channels/registry.js"() {
20443
+ "packages/server/dist/channels/registry.js"() {
20444
20444
  "use strict";
20445
20445
  _running = [];
20446
20446
  }
20447
20447
  });
20448
20448
 
20449
- // ../server/dist/channels/telegram/accounts.js
20449
+ // packages/server/dist/channels/telegram/accounts.js
20450
20450
  function toTelegram(a) {
20451
20451
  const c = a.config;
20452
20452
  return {
@@ -20520,17 +20520,17 @@ function deleteAccount3(db, accountId) {
20520
20520
  }
20521
20521
  var CH2;
20522
20522
  var init_accounts3 = __esm({
20523
- "../server/dist/channels/telegram/accounts.js"() {
20523
+ "packages/server/dist/channels/telegram/accounts.js"() {
20524
20524
  "use strict";
20525
20525
  init_accounts();
20526
20526
  CH2 = "telegram";
20527
20527
  }
20528
20528
  });
20529
20529
 
20530
- // ../server/dist/channels/telegram/event-adapter.js
20530
+ // packages/server/dist/channels/telegram/event-adapter.js
20531
20531
  var HARD_CHARS, MEDIA_MARKER_RE, TelegramResponder;
20532
20532
  var init_event_adapter = __esm({
20533
- "../server/dist/channels/telegram/event-adapter.js"() {
20533
+ "packages/server/dist/channels/telegram/event-adapter.js"() {
20534
20534
  "use strict";
20535
20535
  HARD_CHARS = 4e3;
20536
20536
  MEDIA_MARKER_RE = /^MEDIA:\s*(\S.*?)\s*$/gm;
@@ -20631,17 +20631,17 @@ var init_event_adapter = __esm({
20631
20631
  }
20632
20632
  });
20633
20633
 
20634
- // ../server/dist/channels/shared/session-prefix.js
20634
+ // packages/server/dist/channels/shared/session-prefix.js
20635
20635
  function sessionPrefix(channel, userId) {
20636
20636
  return `${channel}_${userId}_`;
20637
20637
  }
20638
20638
  var init_session_prefix = __esm({
20639
- "../server/dist/channels/shared/session-prefix.js"() {
20639
+ "packages/server/dist/channels/shared/session-prefix.js"() {
20640
20640
  "use strict";
20641
20641
  }
20642
20642
  });
20643
20643
 
20644
- // ../server/dist/channels/telegram/handler.js
20644
+ // packages/server/dist/channels/telegram/handler.js
20645
20645
  import { Bot, InputFile } from "grammy";
20646
20646
  import path50 from "node:path";
20647
20647
  function inferMediaKind(filePath) {
@@ -20984,7 +20984,7 @@ async function getOrCreateActiveSession(sm, userId, activeOverrides, accessLevel
20984
20984
  return newId;
20985
20985
  }
20986
20986
  var init_handler2 = __esm({
20987
- "../server/dist/channels/telegram/handler.js"() {
20987
+ "packages/server/dist/channels/telegram/handler.js"() {
20988
20988
  "use strict";
20989
20989
  init_accounts3();
20990
20990
  init_event_adapter();
@@ -20998,7 +20998,7 @@ var init_handler2 = __esm({
20998
20998
  }
20999
20999
  });
21000
21000
 
21001
- // ../server/dist/routes/telegram.js
21001
+ // packages/server/dist/routes/telegram.js
21002
21002
  import { Hono as Hono12 } from "hono";
21003
21003
  import path51 from "node:path";
21004
21004
  import { Bot as Bot2 } from "grammy";
@@ -21114,14 +21114,14 @@ function createTelegramRoutes(deps) {
21114
21114
  return app2;
21115
21115
  }
21116
21116
  var init_telegram = __esm({
21117
- "../server/dist/routes/telegram.js"() {
21117
+ "packages/server/dist/routes/telegram.js"() {
21118
21118
  "use strict";
21119
21119
  init_accounts3();
21120
21120
  init_init();
21121
21121
  }
21122
21122
  });
21123
21123
 
21124
- // ../server/dist/channels/telegram/cron-dispatcher.js
21124
+ // packages/server/dist/channels/telegram/cron-dispatcher.js
21125
21125
  import { Bot as Bot3 } from "grammy";
21126
21126
  async function dispatch(accountId, text5, explicitChatId) {
21127
21127
  const acct = getAccount3(getChannelDb(), accountId);
@@ -21170,7 +21170,7 @@ function registerTelegramCronDispatcher() {
21170
21170
  registerCronDispatcher({ channelType: "telegram", dispatch, listTargets });
21171
21171
  }
21172
21172
  var init_cron_dispatcher = __esm({
21173
- "../server/dist/channels/telegram/cron-dispatcher.js"() {
21173
+ "packages/server/dist/channels/telegram/cron-dispatcher.js"() {
21174
21174
  "use strict";
21175
21175
  init_channel_db();
21176
21176
  init_accounts3();
@@ -21178,10 +21178,10 @@ var init_cron_dispatcher = __esm({
21178
21178
  }
21179
21179
  });
21180
21180
 
21181
- // ../server/dist/channels/telegram/descriptor.js
21181
+ // packages/server/dist/channels/telegram/descriptor.js
21182
21182
  var telegramDescriptor;
21183
21183
  var init_descriptor = __esm({
21184
- "../server/dist/channels/telegram/descriptor.js"() {
21184
+ "packages/server/dist/channels/telegram/descriptor.js"() {
21185
21185
  "use strict";
21186
21186
  init_handler2();
21187
21187
  init_telegram();
@@ -21196,7 +21196,7 @@ var init_descriptor = __esm({
21196
21196
  }
21197
21197
  });
21198
21198
 
21199
- // ../server/dist/channels/wechat/api.js
21199
+ // packages/server/dist/channels/wechat/api.js
21200
21200
  import crypto3 from "node:crypto";
21201
21201
  function buildClientVersion(version) {
21202
21202
  const [ma, mi, pa] = version.split(".").map((p) => parseInt(p, 10));
@@ -21385,7 +21385,7 @@ async function notifyStop(params) {
21385
21385
  }
21386
21386
  var QR_BASE_URL, DEFAULT_BOT_TYPE, CHANNEL_VERSION, ILINK_APP_ID, ILINK_APP_CLIENT_VERSION, DEFAULT_LONG_POLL_TIMEOUT_MS, DEFAULT_API_TIMEOUT_MS;
21387
21387
  var init_api = __esm({
21388
- "../server/dist/channels/wechat/api.js"() {
21388
+ "packages/server/dist/channels/wechat/api.js"() {
21389
21389
  "use strict";
21390
21390
  QR_BASE_URL = "https://ilinkai.weixin.qq.com";
21391
21391
  DEFAULT_BOT_TYPE = "3";
@@ -21397,10 +21397,10 @@ var init_api = __esm({
21397
21397
  }
21398
21398
  });
21399
21399
 
21400
- // ../server/dist/channels/wechat/types.js
21400
+ // packages/server/dist/channels/wechat/types.js
21401
21401
  var MessageItemType, MessageType, MessageState, UploadMediaType;
21402
21402
  var init_types = __esm({
21403
- "../server/dist/channels/wechat/types.js"() {
21403
+ "packages/server/dist/channels/wechat/types.js"() {
21404
21404
  "use strict";
21405
21405
  MessageItemType = {
21406
21406
  NONE: 0,
@@ -21429,7 +21429,7 @@ var init_types = __esm({
21429
21429
  }
21430
21430
  });
21431
21431
 
21432
- // ../server/dist/channels/wechat/accounts.js
21432
+ // packages/server/dist/channels/wechat/accounts.js
21433
21433
  function toWeixin(a) {
21434
21434
  const c = a.config;
21435
21435
  return {
@@ -21511,17 +21511,17 @@ function saveSyncBuf(db, accountId, syncBuf) {
21511
21511
  }
21512
21512
  var CH3;
21513
21513
  var init_accounts4 = __esm({
21514
- "../server/dist/channels/wechat/accounts.js"() {
21514
+ "packages/server/dist/channels/wechat/accounts.js"() {
21515
21515
  "use strict";
21516
21516
  init_accounts();
21517
21517
  CH3 = "wechat";
21518
21518
  }
21519
21519
  });
21520
21520
 
21521
- // ../server/dist/channels/wechat/event-adapter.js
21521
+ // packages/server/dist/channels/wechat/event-adapter.js
21522
21522
  var HARD_CHARS2, MEDIA_MARKER_RE2, WeixinResponder;
21523
21523
  var init_event_adapter2 = __esm({
21524
- "../server/dist/channels/wechat/event-adapter.js"() {
21524
+ "packages/server/dist/channels/wechat/event-adapter.js"() {
21525
21525
  "use strict";
21526
21526
  HARD_CHARS2 = 3500;
21527
21527
  MEDIA_MARKER_RE2 = /^MEDIA:\s*(\S.*?)\s*$/gm;
@@ -21630,7 +21630,7 @@ var init_event_adapter2 = __esm({
21630
21630
  }
21631
21631
  });
21632
21632
 
21633
- // ../server/dist/channels/wechat/cdn.js
21633
+ // packages/server/dist/channels/wechat/cdn.js
21634
21634
  import { createDecipheriv, createCipheriv, randomBytes as randomBytes2, createHash } from "node:crypto";
21635
21635
  function decryptAesEcb(ciphertext, key) {
21636
21636
  const decipher = createDecipheriv("aes-128-ecb", key, null);
@@ -21729,14 +21729,14 @@ async function uploadCiphertext(params) {
21729
21729
  }
21730
21730
  var CDN_BASE_URL, UPLOAD_MAX_RETRIES;
21731
21731
  var init_cdn = __esm({
21732
- "../server/dist/channels/wechat/cdn.js"() {
21732
+ "packages/server/dist/channels/wechat/cdn.js"() {
21733
21733
  "use strict";
21734
21734
  CDN_BASE_URL = "https://novac2c.cdn.weixin.qq.com/c2c";
21735
21735
  UPLOAD_MAX_RETRIES = 3;
21736
21736
  }
21737
21737
  });
21738
21738
 
21739
- // ../server/dist/channels/wechat/send-media.js
21739
+ // packages/server/dist/channels/wechat/send-media.js
21740
21740
  import fs46 from "node:fs/promises";
21741
21741
  import path52 from "node:path";
21742
21742
  function inferKind(filePath) {
@@ -21830,7 +21830,7 @@ function buildMessageItem(args) {
21830
21830
  };
21831
21831
  }
21832
21832
  var init_send_media = __esm({
21833
- "../server/dist/channels/wechat/send-media.js"() {
21833
+ "packages/server/dist/channels/wechat/send-media.js"() {
21834
21834
  "use strict";
21835
21835
  init_api();
21836
21836
  init_cdn();
@@ -21839,7 +21839,7 @@ var init_send_media = __esm({
21839
21839
  }
21840
21840
  });
21841
21841
 
21842
- // ../server/dist/channels/wechat/login.js
21842
+ // packages/server/dist/channels/wechat/login.js
21843
21843
  import { randomUUID as randomUUID2 } from "node:crypto";
21844
21844
  function isFresh(l) {
21845
21845
  return Date.now() - l.startedAt < ACTIVE_TTL_MS;
@@ -21941,7 +21941,7 @@ async function waitLogin(params) {
21941
21941
  }
21942
21942
  var ACTIVE_TTL_MS, MAX_QR_REFRESH, activeLogins;
21943
21943
  var init_login = __esm({
21944
- "../server/dist/channels/wechat/login.js"() {
21944
+ "packages/server/dist/channels/wechat/login.js"() {
21945
21945
  "use strict";
21946
21946
  init_api();
21947
21947
  ACTIVE_TTL_MS = 5 * 6e4;
@@ -21950,7 +21950,7 @@ var init_login = __esm({
21950
21950
  }
21951
21951
  });
21952
21952
 
21953
- // ../server/dist/channels/wechat/handler.js
21953
+ // packages/server/dist/channels/wechat/handler.js
21954
21954
  import fs47 from "node:fs";
21955
21955
  import path53 from "node:path";
21956
21956
  import QRCode from "qrcode";
@@ -22458,7 +22458,7 @@ function sleep2(ms, signal) {
22458
22458
  }
22459
22459
  var MAX_CONSECUTIVE_FAILURES, BACKOFF_DELAY_MS, RETRY_DELAY_MS;
22460
22460
  var init_handler3 = __esm({
22461
- "../server/dist/channels/wechat/handler.js"() {
22461
+ "packages/server/dist/channels/wechat/handler.js"() {
22462
22462
  "use strict";
22463
22463
  init_api();
22464
22464
  init_types();
@@ -22479,7 +22479,7 @@ var init_handler3 = __esm({
22479
22479
  }
22480
22480
  });
22481
22481
 
22482
- // ../server/dist/routes/weixin.js
22482
+ // packages/server/dist/routes/weixin.js
22483
22483
  import { Hono as Hono13 } from "hono";
22484
22484
  import path54 from "node:path";
22485
22485
  import fs48 from "node:fs";
@@ -22594,7 +22594,7 @@ function stripSecrets(acc) {
22594
22594
  return rest;
22595
22595
  }
22596
22596
  var init_weixin = __esm({
22597
- "../server/dist/routes/weixin.js"() {
22597
+ "packages/server/dist/routes/weixin.js"() {
22598
22598
  "use strict";
22599
22599
  init_login();
22600
22600
  init_accounts4();
@@ -22602,7 +22602,7 @@ var init_weixin = __esm({
22602
22602
  }
22603
22603
  });
22604
22604
 
22605
- // ../server/dist/channels/wechat/cron-dispatcher.js
22605
+ // packages/server/dist/channels/wechat/cron-dispatcher.js
22606
22606
  function readLastActiveChatId(accountId) {
22607
22607
  const acct = getAccount(getChannelDb(), accountId);
22608
22608
  if (!acct)
@@ -22645,7 +22645,7 @@ function registerWechatCronDispatcher() {
22645
22645
  registerCronDispatcher({ channelType: "wechat", dispatch: dispatch2, listTargets: listTargets2 });
22646
22646
  }
22647
22647
  var init_cron_dispatcher2 = __esm({
22648
- "../server/dist/channels/wechat/cron-dispatcher.js"() {
22648
+ "packages/server/dist/channels/wechat/cron-dispatcher.js"() {
22649
22649
  "use strict";
22650
22650
  init_channel_db();
22651
22651
  init_accounts();
@@ -22655,10 +22655,10 @@ var init_cron_dispatcher2 = __esm({
22655
22655
  }
22656
22656
  });
22657
22657
 
22658
- // ../server/dist/channels/wechat/descriptor.js
22658
+ // packages/server/dist/channels/wechat/descriptor.js
22659
22659
  var wechatDescriptor;
22660
22660
  var init_descriptor2 = __esm({
22661
- "../server/dist/channels/wechat/descriptor.js"() {
22661
+ "packages/server/dist/channels/wechat/descriptor.js"() {
22662
22662
  "use strict";
22663
22663
  init_handler3();
22664
22664
  init_weixin();
@@ -22673,7 +22673,7 @@ var init_descriptor2 = __esm({
22673
22673
  }
22674
22674
  });
22675
22675
 
22676
- // ../server/dist/channels/web/handler.js
22676
+ // packages/server/dist/channels/web/handler.js
22677
22677
  function buildWebSessionPrefix(accountId) {
22678
22678
  return sessionPrefix("web", accountId);
22679
22679
  }
@@ -23060,7 +23060,7 @@ function createMediaBuffer() {
23060
23060
  }
23061
23061
  var MEDIA_MARKER_RE3;
23062
23062
  var init_handler4 = __esm({
23063
- "../server/dist/channels/web/handler.js"() {
23063
+ "packages/server/dist/channels/web/handler.js"() {
23064
23064
  "use strict";
23065
23065
  init_ui_log_builder();
23066
23066
  init_accounts2();
@@ -23074,7 +23074,7 @@ var init_handler4 = __esm({
23074
23074
  }
23075
23075
  });
23076
23076
 
23077
- // ../server/dist/routes/web.js
23077
+ // packages/server/dist/routes/web.js
23078
23078
  import { Hono as Hono14 } from "hono";
23079
23079
  import { streamSSE } from "hono/streaming";
23080
23080
  import crypto4 from "node:crypto";
@@ -23277,7 +23277,7 @@ function createWebRoutes(deps) {
23277
23277
  }
23278
23278
  var TOKEN_BUCKET3;
23279
23279
  var init_web = __esm({
23280
- "../server/dist/routes/web.js"() {
23280
+ "packages/server/dist/routes/web.js"() {
23281
23281
  "use strict";
23282
23282
  init_accounts2();
23283
23283
  init_init();
@@ -23286,10 +23286,10 @@ var init_web = __esm({
23286
23286
  }
23287
23287
  });
23288
23288
 
23289
- // ../server/dist/channels/web/descriptor.js
23289
+ // packages/server/dist/channels/web/descriptor.js
23290
23290
  var webDescriptor;
23291
23291
  var init_descriptor3 = __esm({
23292
- "../server/dist/channels/web/descriptor.js"() {
23292
+ "packages/server/dist/channels/web/descriptor.js"() {
23293
23293
  "use strict";
23294
23294
  init_handler4();
23295
23295
  init_web();
@@ -23305,7 +23305,7 @@ var init_descriptor3 = __esm({
23305
23305
  }
23306
23306
  });
23307
23307
 
23308
- // ../server/dist/channels/slack/accounts.js
23308
+ // packages/server/dist/channels/slack/accounts.js
23309
23309
  function toSlack(a) {
23310
23310
  const c = a.config;
23311
23311
  return {
@@ -23381,14 +23381,14 @@ function deleteAccount5(db, accountId) {
23381
23381
  }
23382
23382
  var CH4;
23383
23383
  var init_accounts5 = __esm({
23384
- "../server/dist/channels/slack/accounts.js"() {
23384
+ "packages/server/dist/channels/slack/accounts.js"() {
23385
23385
  "use strict";
23386
23386
  init_accounts();
23387
23387
  CH4 = "slack";
23388
23388
  }
23389
23389
  });
23390
23390
 
23391
- // ../server/dist/channels/shared/markdown.js
23391
+ // packages/server/dist/channels/shared/markdown.js
23392
23392
  function formatForSlack(input) {
23393
23393
  if (!input)
23394
23394
  return "";
@@ -23467,15 +23467,15 @@ function stripCommonMark(line) {
23467
23467
  return line;
23468
23468
  }
23469
23469
  var init_markdown = __esm({
23470
- "../server/dist/channels/shared/markdown.js"() {
23470
+ "packages/server/dist/channels/shared/markdown.js"() {
23471
23471
  "use strict";
23472
23472
  }
23473
23473
  });
23474
23474
 
23475
- // ../server/dist/channels/slack/event-adapter.js
23475
+ // packages/server/dist/channels/slack/event-adapter.js
23476
23476
  var HARD_CHARS3, MEDIA_MARKER_RE4, SlackResponder;
23477
23477
  var init_event_adapter3 = __esm({
23478
- "../server/dist/channels/slack/event-adapter.js"() {
23478
+ "packages/server/dist/channels/slack/event-adapter.js"() {
23479
23479
  "use strict";
23480
23480
  init_markdown();
23481
23481
  HARD_CHARS3 = 35e3;
@@ -23569,7 +23569,7 @@ var init_event_adapter3 = __esm({
23569
23569
  }
23570
23570
  });
23571
23571
 
23572
- // ../server/dist/channels/slack/api.js
23572
+ // packages/server/dist/channels/slack/api.js
23573
23573
  async function slackPost(endpoint, token, body) {
23574
23574
  const isForm = body instanceof FormData;
23575
23575
  const res = await fetch(`${SLACK_API}/${endpoint}`, {
@@ -23757,13 +23757,13 @@ async function downloadFile(botToken, urlPrivate) {
23757
23757
  }
23758
23758
  var SLACK_API;
23759
23759
  var init_api2 = __esm({
23760
- "../server/dist/channels/slack/api.js"() {
23760
+ "packages/server/dist/channels/slack/api.js"() {
23761
23761
  "use strict";
23762
23762
  SLACK_API = "https://slack.com/api";
23763
23763
  }
23764
23764
  });
23765
23765
 
23766
- // ../server/dist/channels/slack/handler.js
23766
+ // packages/server/dist/channels/slack/handler.js
23767
23767
  import path56 from "node:path";
23768
23768
  import { WebSocket } from "ws";
23769
23769
  function slashToBang(text5, commandNames) {
@@ -24122,7 +24122,7 @@ async function getOrCreateSessionForThread(args) {
24122
24122
  }
24123
24123
  var SLACK_EXTRA_COMMANDS, SEEN_EVENT_IDS, SEEN_EVENT_IDS_MAX;
24124
24124
  var init_handler5 = __esm({
24125
- "../server/dist/channels/slack/handler.js"() {
24125
+ "packages/server/dist/channels/slack/handler.js"() {
24126
24126
  "use strict";
24127
24127
  init_accounts5();
24128
24128
  init_event_adapter3();
@@ -24141,7 +24141,7 @@ var init_handler5 = __esm({
24141
24141
  }
24142
24142
  });
24143
24143
 
24144
- // ../server/dist/routes/slack.js
24144
+ // packages/server/dist/routes/slack.js
24145
24145
  import { Hono as Hono15 } from "hono";
24146
24146
  import fs50 from "node:fs";
24147
24147
  import path57 from "node:path";
@@ -24272,7 +24272,7 @@ function createSlackRoutes(deps) {
24272
24272
  return app2;
24273
24273
  }
24274
24274
  var init_slack = __esm({
24275
- "../server/dist/routes/slack.js"() {
24275
+ "packages/server/dist/routes/slack.js"() {
24276
24276
  "use strict";
24277
24277
  init_accounts5();
24278
24278
  init_api2();
@@ -24280,7 +24280,7 @@ var init_slack = __esm({
24280
24280
  }
24281
24281
  });
24282
24282
 
24283
- // ../server/dist/channels/slack/cron-dispatcher.js
24283
+ // packages/server/dist/channels/slack/cron-dispatcher.js
24284
24284
  function parseChatId(raw) {
24285
24285
  const idx = raw.indexOf(":");
24286
24286
  if (idx < 0)
@@ -24325,7 +24325,7 @@ function registerSlackCronDispatcher() {
24325
24325
  registerCronDispatcher({ channelType: "slack", dispatch: dispatch3, listTargets: listTargets3 });
24326
24326
  }
24327
24327
  var init_cron_dispatcher3 = __esm({
24328
- "../server/dist/channels/slack/cron-dispatcher.js"() {
24328
+ "packages/server/dist/channels/slack/cron-dispatcher.js"() {
24329
24329
  "use strict";
24330
24330
  init_channel_db();
24331
24331
  init_accounts5();
@@ -24334,10 +24334,10 @@ var init_cron_dispatcher3 = __esm({
24334
24334
  }
24335
24335
  });
24336
24336
 
24337
- // ../server/dist/channels/slack/descriptor.js
24337
+ // packages/server/dist/channels/slack/descriptor.js
24338
24338
  var slackDescriptor;
24339
24339
  var init_descriptor4 = __esm({
24340
- "../server/dist/channels/slack/descriptor.js"() {
24340
+ "packages/server/dist/channels/slack/descriptor.js"() {
24341
24341
  "use strict";
24342
24342
  init_handler5();
24343
24343
  init_slack();
@@ -24352,7 +24352,7 @@ var init_descriptor4 = __esm({
24352
24352
  }
24353
24353
  });
24354
24354
 
24355
- // ../server/dist/channels/feishu/accounts.js
24355
+ // packages/server/dist/channels/feishu/accounts.js
24356
24356
  function toFeishu(a) {
24357
24357
  const c = a.config;
24358
24358
  return {
@@ -24430,17 +24430,17 @@ function deleteAccount6(db, accountId) {
24430
24430
  }
24431
24431
  var CH5;
24432
24432
  var init_accounts6 = __esm({
24433
- "../server/dist/channels/feishu/accounts.js"() {
24433
+ "packages/server/dist/channels/feishu/accounts.js"() {
24434
24434
  "use strict";
24435
24435
  init_accounts();
24436
24436
  CH5 = "feishu";
24437
24437
  }
24438
24438
  });
24439
24439
 
24440
- // ../server/dist/channels/feishu/event-adapter.js
24440
+ // packages/server/dist/channels/feishu/event-adapter.js
24441
24441
  var HARD_CHARS4, MEDIA_MARKER_RE5, FeishuResponder;
24442
24442
  var init_event_adapter4 = __esm({
24443
- "../server/dist/channels/feishu/event-adapter.js"() {
24443
+ "packages/server/dist/channels/feishu/event-adapter.js"() {
24444
24444
  "use strict";
24445
24445
  init_markdown();
24446
24446
  HARD_CHARS4 = 4500;
@@ -24534,7 +24534,7 @@ var init_event_adapter4 = __esm({
24534
24534
  }
24535
24535
  });
24536
24536
 
24537
- // ../server/dist/channels/feishu/api.js
24537
+ // packages/server/dist/channels/feishu/api.js
24538
24538
  async function getTenantAccessToken(args) {
24539
24539
  const cached = tokenCache.get(args.appId);
24540
24540
  if (cached && cached.expiresAt - Date.now() > 6e4)
@@ -24798,14 +24798,14 @@ async function searchFeishuTargets(args) {
24798
24798
  }
24799
24799
  var FEISHU_BASE, tokenCache;
24800
24800
  var init_api3 = __esm({
24801
- "../server/dist/channels/feishu/api.js"() {
24801
+ "packages/server/dist/channels/feishu/api.js"() {
24802
24802
  "use strict";
24803
24803
  FEISHU_BASE = "https://open.feishu.cn";
24804
24804
  tokenCache = /* @__PURE__ */ new Map();
24805
24805
  }
24806
24806
  });
24807
24807
 
24808
- // ../server/dist/channels/feishu/handler.js
24808
+ // packages/server/dist/channels/feishu/handler.js
24809
24809
  import path58 from "node:path";
24810
24810
  import * as Lark from "@larksuiteoapi/node-sdk";
24811
24811
  function isPathAllowed3(filePath, workspacePath) {
@@ -25225,7 +25225,7 @@ async function getOrCreateSessionForThread2(args) {
25225
25225
  return newId;
25226
25226
  }
25227
25227
  var init_handler6 = __esm({
25228
- "../server/dist/channels/feishu/handler.js"() {
25228
+ "packages/server/dist/channels/feishu/handler.js"() {
25229
25229
  "use strict";
25230
25230
  init_accounts6();
25231
25231
  init_event_adapter4();
@@ -25240,7 +25240,7 @@ var init_handler6 = __esm({
25240
25240
  }
25241
25241
  });
25242
25242
 
25243
- // ../server/dist/routes/feishu.js
25243
+ // packages/server/dist/routes/feishu.js
25244
25244
  import { Hono as Hono16 } from "hono";
25245
25245
  import fs51 from "node:fs";
25246
25246
  import path59 from "node:path";
@@ -25374,7 +25374,7 @@ function createFeishuRoutes(deps) {
25374
25374
  return app2;
25375
25375
  }
25376
25376
  var init_feishu = __esm({
25377
- "../server/dist/routes/feishu.js"() {
25377
+ "packages/server/dist/routes/feishu.js"() {
25378
25378
  "use strict";
25379
25379
  init_accounts6();
25380
25380
  init_api3();
@@ -25382,7 +25382,7 @@ var init_feishu = __esm({
25382
25382
  }
25383
25383
  });
25384
25384
 
25385
- // ../server/dist/channels/feishu/cron-dispatcher.js
25385
+ // packages/server/dist/channels/feishu/cron-dispatcher.js
25386
25386
  function parseChatId2(raw) {
25387
25387
  const idx = raw.indexOf(":");
25388
25388
  return { chatId: idx < 0 ? raw : raw.slice(0, idx) };
@@ -25432,7 +25432,7 @@ function registerFeishuCronDispatcher() {
25432
25432
  registerCronDispatcher({ channelType: "feishu", dispatch: dispatch4, listTargets: listTargets4 });
25433
25433
  }
25434
25434
  var init_cron_dispatcher4 = __esm({
25435
- "../server/dist/channels/feishu/cron-dispatcher.js"() {
25435
+ "packages/server/dist/channels/feishu/cron-dispatcher.js"() {
25436
25436
  "use strict";
25437
25437
  init_channel_db();
25438
25438
  init_accounts6();
@@ -25441,10 +25441,10 @@ var init_cron_dispatcher4 = __esm({
25441
25441
  }
25442
25442
  });
25443
25443
 
25444
- // ../server/dist/channels/feishu/descriptor.js
25444
+ // packages/server/dist/channels/feishu/descriptor.js
25445
25445
  var feishuDescriptor;
25446
25446
  var init_descriptor5 = __esm({
25447
- "../server/dist/channels/feishu/descriptor.js"() {
25447
+ "packages/server/dist/channels/feishu/descriptor.js"() {
25448
25448
  "use strict";
25449
25449
  init_handler6();
25450
25450
  init_feishu();
@@ -25459,10 +25459,10 @@ var init_descriptor5 = __esm({
25459
25459
  }
25460
25460
  });
25461
25461
 
25462
- // ../server/dist/channels/descriptors.js
25462
+ // packages/server/dist/channels/descriptors.js
25463
25463
  var defaultChannelDescriptors;
25464
25464
  var init_descriptors = __esm({
25465
- "../server/dist/channels/descriptors.js"() {
25465
+ "packages/server/dist/channels/descriptors.js"() {
25466
25466
  "use strict";
25467
25467
  init_descriptor();
25468
25468
  init_descriptor2();
@@ -25479,7 +25479,7 @@ var init_descriptors = __esm({
25479
25479
  }
25480
25480
  });
25481
25481
 
25482
- // ../server/dist/middleware/auth.js
25482
+ // packages/server/dist/middleware/auth.js
25483
25483
  import { Hono as Hono17 } from "hono";
25484
25484
  import { getCookie, setCookie } from "hono/cookie";
25485
25485
  import crypto5 from "node:crypto";
@@ -25644,7 +25644,7 @@ function authMiddleware() {
25644
25644
  }
25645
25645
  var TOKEN_MAX_AGE, REFRESH_AFTER, COOKIE_NAME, ADMIN_LOGIN_BUCKET, isLockedOut2, recordFailure2, clearFailures2, PUBLIC_PATHS;
25646
25646
  var init_auth = __esm({
25647
- "../server/dist/middleware/auth.js"() {
25647
+ "packages/server/dist/middleware/auth.js"() {
25648
25648
  "use strict";
25649
25649
  init_config();
25650
25650
  init_password_hash();
@@ -25660,7 +25660,7 @@ var init_auth = __esm({
25660
25660
  }
25661
25661
  });
25662
25662
 
25663
- // ../server/dist/index.js
25663
+ // packages/server/dist/index.js
25664
25664
  var dist_exports = {};
25665
25665
  import { Hono as Hono18 } from "hono";
25666
25666
  import { cors } from "hono/cors";
@@ -25770,7 +25770,7 @@ async function gracefulShutdown(signal) {
25770
25770
  }
25771
25771
  var __dirname3, PORT, HALO_VERSION, PROJECT_ROOT, HALO_HOME4, app, allowlist, authRoutes, fileRoutes, gitRoutes, agentConfigRoutes, skillRoutes, settingsRoutes, evolutionRoutes, cronRoutes, channelDb, registry, sessionRoutes, showRoutes, metricsRoutes, commandRoutes, FRONTEND_DIR, server, wss;
25772
25772
  var init_dist2 = __esm({
25773
- async "../server/dist/index.js"() {
25773
+ async "packages/server/dist/index.js"() {
25774
25774
  "use strict";
25775
25775
  init_files();
25776
25776
  init_git();
@@ -25805,7 +25805,7 @@ var init_dist2 = __esm({
25805
25805
  init_git_ssh();
25806
25806
  __dirname3 = path60.dirname(fileURLToPath3(import.meta.url));
25807
25807
  PORT = config.server.port;
25808
- HALO_VERSION = "0.2.1-bc7cf2b";
25808
+ HALO_VERSION = "0.2.1";
25809
25809
  PROJECT_ROOT = findProjectRoot();
25810
25810
  HALO_HOME4 = path60.join(homedir23(), ".halo");
25811
25811
  if (!fs52.existsSync(path60.join(HALO_HOME4, "global", ".template-version"))) {
@@ -25958,7 +25958,7 @@ var init_dist2 = __esm({
25958
25958
  }
25959
25959
  });
25960
25960
 
25961
- // ../acp-adapter/dist/halo-client.js
25961
+ // packages/acp-adapter/dist/halo-client.js
25962
25962
  async function safeText(res) {
25963
25963
  try {
25964
25964
  return (await res.text()).slice(0, 500);
@@ -26001,7 +26001,7 @@ async function* parseSseStream(body) {
26001
26001
  }
26002
26002
  var HaloClient;
26003
26003
  var init_halo_client = __esm({
26004
- "../acp-adapter/dist/halo-client.js"() {
26004
+ "packages/acp-adapter/dist/halo-client.js"() {
26005
26005
  "use strict";
26006
26006
  HaloClient = class {
26007
26007
  opts;
@@ -26080,7 +26080,7 @@ var init_halo_client = __esm({
26080
26080
  }
26081
26081
  });
26082
26082
 
26083
- // ../acp-adapter/dist/adapter.js
26083
+ // packages/acp-adapter/dist/adapter.js
26084
26084
  function newError(message, code = -32603) {
26085
26085
  const e = new Error(message);
26086
26086
  e.code = code;
@@ -26088,7 +26088,7 @@ function newError(message, code = -32603) {
26088
26088
  }
26089
26089
  var AcpAdapter;
26090
26090
  var init_adapter = __esm({
26091
- "../acp-adapter/dist/adapter.js"() {
26091
+ "packages/acp-adapter/dist/adapter.js"() {
26092
26092
  "use strict";
26093
26093
  init_halo_client();
26094
26094
  AcpAdapter = class {
@@ -26377,10 +26377,10 @@ var init_adapter = __esm({
26377
26377
  }
26378
26378
  });
26379
26379
 
26380
- // ../acp-adapter/dist/jsonrpc.js
26380
+ // packages/acp-adapter/dist/jsonrpc.js
26381
26381
  var ERROR_PARSE, ERROR_METHOD_NOT_FOUND, ERROR_INTERNAL, JsonRpcConnection;
26382
26382
  var init_jsonrpc = __esm({
26383
- "../acp-adapter/dist/jsonrpc.js"() {
26383
+ "packages/acp-adapter/dist/jsonrpc.js"() {
26384
26384
  "use strict";
26385
26385
  ERROR_PARSE = -32700;
26386
26386
  ERROR_METHOD_NOT_FOUND = -32601;
@@ -26513,7 +26513,7 @@ var init_jsonrpc = __esm({
26513
26513
  }
26514
26514
  });
26515
26515
 
26516
- // ../acp-adapter/dist/index.js
26516
+ // packages/acp-adapter/dist/index.js
26517
26517
  var dist_exports2 = {};
26518
26518
  __export(dist_exports2, {
26519
26519
  main: () => main
@@ -26629,7 +26629,7 @@ function main(argv = process.argv.slice(2)) {
26629
26629
  }
26630
26630
  var HELP;
26631
26631
  var init_dist3 = __esm({
26632
- "../acp-adapter/dist/index.js"() {
26632
+ "packages/acp-adapter/dist/index.js"() {
26633
26633
  "use strict";
26634
26634
  init_adapter();
26635
26635
  init_jsonrpc();
@@ -26668,7 +26668,7 @@ Stdio:
26668
26668
  }
26669
26669
  });
26670
26670
 
26671
- // src/silence-warnings.ts
26671
+ // packages/cli/src/silence-warnings.ts
26672
26672
  var emit = process.emitWarning.bind(process);
26673
26673
  process.emitWarning = (warning, ...args) => {
26674
26674
  const opt = args[0];
@@ -26677,12 +26677,12 @@ process.emitWarning = (warning, ...args) => {
26677
26677
  return emit(warning, ...args);
26678
26678
  };
26679
26679
 
26680
- // src/index.ts
26680
+ // packages/cli/src/index.ts
26681
26681
  import path61 from "node:path";
26682
26682
  import fs53 from "node:fs";
26683
26683
  import { homedir as homedir24 } from "node:os";
26684
26684
  import { parseArgs as parseArgs2 } from "node:util";
26685
- var VERSION = "0.2.1-bc7cf2b";
26685
+ var VERSION = "0.2.1";
26686
26686
  var HELP_TOP = `Usage: halo <command> [options]
26687
26687
 
26688
26688
  Commands: