@turmind/halo 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin-out/404.html +1 -1
- package/admin-out/_next/static/chunks/app/page-f8208e0c7f315faa.js +1 -0
- package/admin-out/_next/static/css/80eca65cb72e5c69.css +3 -0
- package/admin-out/index.html +1 -1
- package/admin-out/index.txt +3 -3
- package/bundled-docs/design/storage.md +2 -1
- package/bundled-docs/design/ws.md +9 -4
- package/bundled-docs/dev/add-model-provider.md +1 -1
- package/bundled-docs/requirements/chat.md +9 -2
- package/bundled-docs/requirements/session.md +2 -2
- package/dist/index.js +339 -331
- package/package.json +1 -1
- package/templates/models/aws-bedrock-claude-invoke.yaml +27 -0
- package/templates/models/aws-bedrock-mantle.yaml +13 -2
- package/admin-out/_next/static/chunks/app/page-635d9668d47a2b9e.js +0 -1
- package/admin-out/_next/static/css/57622245d7724ee0.css +0 -3
- /package/admin-out/_next/static/{gzvax-Lg7K157j0rQJHje → WvYu_osMZVpohYN4ntkpS}/_buildManifest.js +0 -0
- /package/admin-out/_next/static/{gzvax-Lg7K157j0rQJHje → WvYu_osMZVpohYN4ntkpS}/_ssgManifest.js +0 -0
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
|
-
//
|
|
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
|
-
"
|
|
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
|
-
//
|
|
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";
|
|
@@ -409,7 +409,7 @@ function loadSettingsSchema(workspaceRoot) {
|
|
|
409
409
|
}
|
|
410
410
|
var GLOBAL_MODELS_DIR, GLOBAL_SKILLS_DIR, GLOBAL_AGENTS_DIR, VALID_TYPES;
|
|
411
411
|
var init_settings_schema = __esm({
|
|
412
|
-
"
|
|
412
|
+
"packages/server/dist/settings-schema.js"() {
|
|
413
413
|
"use strict";
|
|
414
414
|
GLOBAL_MODELS_DIR = path2.join(homedir2(), ".halo", "global", "models");
|
|
415
415
|
GLOBAL_SKILLS_DIR = path2.join(homedir2(), ".halo", "global", "skills");
|
|
@@ -418,7 +418,7 @@ var init_settings_schema = __esm({
|
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
420
|
|
|
421
|
-
//
|
|
421
|
+
// packages/server/dist/config.js
|
|
422
422
|
var config_exports = {};
|
|
423
423
|
__export(config_exports, {
|
|
424
424
|
HALO_GLOBAL_DIR: () => HALO_GLOBAL_DIR,
|
|
@@ -713,7 +713,7 @@ function getModelsRegistry() {
|
|
|
713
713
|
}
|
|
714
714
|
var HALO_HOME2, HALO_GLOBAL_DIR, HALO_SECRETS_DIR, _modelsRegistryCache, _systemConfig, SETTINGS_PATH, _settingsCache, _schemaDefaultsCache, ENV_PATTERN, _wsSettingsCache, config, HIDDEN_DIRS_DEFAULT, HIDDEN_FILES_DEFAULT;
|
|
715
715
|
var init_config = __esm({
|
|
716
|
-
"
|
|
716
|
+
"packages/server/dist/config.js"() {
|
|
717
717
|
"use strict";
|
|
718
718
|
init_settings_schema();
|
|
719
719
|
HALO_HOME2 = path3.join(homedir3(), ".halo");
|
|
@@ -921,7 +921,7 @@ var init_config = __esm({
|
|
|
921
921
|
}
|
|
922
922
|
});
|
|
923
923
|
|
|
924
|
-
//
|
|
924
|
+
// packages/server/dist/agents/conversation-repair.js
|
|
925
925
|
function getToolUseId(block) {
|
|
926
926
|
const b = block;
|
|
927
927
|
if (b.type === "tool_use" && typeof b.id === "string")
|
|
@@ -1039,12 +1039,12 @@ function repairConversationMessages(raw, label = "[Repair]") {
|
|
|
1039
1039
|
return messages2;
|
|
1040
1040
|
}
|
|
1041
1041
|
var init_conversation_repair = __esm({
|
|
1042
|
-
"
|
|
1042
|
+
"packages/server/dist/agents/conversation-repair.js"() {
|
|
1043
1043
|
"use strict";
|
|
1044
1044
|
}
|
|
1045
1045
|
});
|
|
1046
1046
|
|
|
1047
|
-
//
|
|
1047
|
+
// packages/server/dist/agents/compact.js
|
|
1048
1048
|
function splitForCompact(messages2) {
|
|
1049
1049
|
const keepCount = config.compact.keep_messages;
|
|
1050
1050
|
let cut = Math.max(0, messages2.length - keepCount);
|
|
@@ -1091,13 +1091,13 @@ ${summaryText}` }]
|
|
|
1091
1091
|
return { compacted: true, messages: [summaryMsg, ...recentMsgs] };
|
|
1092
1092
|
}
|
|
1093
1093
|
var init_compact = __esm({
|
|
1094
|
-
"
|
|
1094
|
+
"packages/server/dist/agents/compact.js"() {
|
|
1095
1095
|
"use strict";
|
|
1096
1096
|
init_config();
|
|
1097
1097
|
}
|
|
1098
1098
|
});
|
|
1099
1099
|
|
|
1100
|
-
//
|
|
1100
|
+
// packages/server/dist/agents/micro-compact.js
|
|
1101
1101
|
function microCompactMessages(messages2, keepRecent = DEFAULT_KEEP_RECENT) {
|
|
1102
1102
|
if (!messages2 || messages2.length === 0) {
|
|
1103
1103
|
return { compacted: false, cleared: 0, messages: messages2 };
|
|
@@ -1145,7 +1145,7 @@ function microCompactMessages(messages2, keepRecent = DEFAULT_KEEP_RECENT) {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
var MICRO_COMPACT_PLACEHOLDER, COMPACTABLE_TOOLS, DEFAULT_KEEP_RECENT;
|
|
1147
1147
|
var init_micro_compact = __esm({
|
|
1148
|
-
"
|
|
1148
|
+
"packages/server/dist/agents/micro-compact.js"() {
|
|
1149
1149
|
"use strict";
|
|
1150
1150
|
MICRO_COMPACT_PLACEHOLDER = "[Old tool result content cleared]";
|
|
1151
1151
|
COMPACTABLE_TOOLS = /* @__PURE__ */ new Set([
|
|
@@ -1162,10 +1162,10 @@ var init_micro_compact = __esm({
|
|
|
1162
1162
|
}
|
|
1163
1163
|
});
|
|
1164
1164
|
|
|
1165
|
-
//
|
|
1165
|
+
// packages/server/dist/agents/agent-loop.js
|
|
1166
1166
|
var TOOL_ERROR_MARKER, TOOL_WARN_MARKER, MODEL_TIMEOUT_ERROR, AgentLoop;
|
|
1167
1167
|
var init_agent_loop = __esm({
|
|
1168
|
-
"
|
|
1168
|
+
"packages/server/dist/agents/agent-loop.js"() {
|
|
1169
1169
|
"use strict";
|
|
1170
1170
|
init_config();
|
|
1171
1171
|
TOOL_ERROR_MARKER = "__TOOL_ERROR__";
|
|
@@ -1327,7 +1327,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`;
|
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
1329
|
|
|
1330
|
-
//
|
|
1330
|
+
// packages/server/dist/prompts/md-vars.js
|
|
1331
1331
|
var md_vars_exports = {};
|
|
1332
1332
|
__export(md_vars_exports, {
|
|
1333
1333
|
buildRenderContext: () => buildRenderContext,
|
|
@@ -1490,7 +1490,7 @@ async function buildRenderContext(opts) {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
var PATTERN, ENV_PATTERN2, ARG_PATTERN, PARAM_PATH;
|
|
1492
1492
|
var init_md_vars = __esm({
|
|
1493
|
-
"
|
|
1493
|
+
"packages/server/dist/prompts/md-vars.js"() {
|
|
1494
1494
|
"use strict";
|
|
1495
1495
|
PATTERN = /\{\{\s*([\w-][\w.-]*)\s*\}\}/g;
|
|
1496
1496
|
ENV_PATTERN2 = /<<([A-Z_][A-Z0-9_]*)>>/g;
|
|
@@ -1499,7 +1499,7 @@ var init_md_vars = __esm({
|
|
|
1499
1499
|
}
|
|
1500
1500
|
});
|
|
1501
1501
|
|
|
1502
|
-
//
|
|
1502
|
+
// packages/server/dist/agents/agent-loader.js
|
|
1503
1503
|
import fs5 from "node:fs/promises";
|
|
1504
1504
|
import fsSync2 from "node:fs";
|
|
1505
1505
|
import path5 from "node:path";
|
|
@@ -1773,7 +1773,7 @@ function isTeamMember(team, targetId) {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
var GLOBAL_AGENTS_DIR2, GLOBAL_SKILLS_DIR2, SKILL_ID_RE, ACCESS_RANK;
|
|
1775
1775
|
var init_agent_loader = __esm({
|
|
1776
|
-
"
|
|
1776
|
+
"packages/server/dist/agents/agent-loader.js"() {
|
|
1777
1777
|
"use strict";
|
|
1778
1778
|
init_agent_loop();
|
|
1779
1779
|
GLOBAL_AGENTS_DIR2 = path5.join(homedir5(), ".halo", "global", "agents");
|
|
@@ -1788,7 +1788,7 @@ var init_agent_loader = __esm({
|
|
|
1788
1788
|
}
|
|
1789
1789
|
});
|
|
1790
1790
|
|
|
1791
|
-
//
|
|
1791
|
+
// packages/server/dist/ws/broadcast.js
|
|
1792
1792
|
function setBroadcastWss(wss2) {
|
|
1793
1793
|
_wss = wss2;
|
|
1794
1794
|
}
|
|
@@ -1809,13 +1809,13 @@ function broadcast(event) {
|
|
|
1809
1809
|
}
|
|
1810
1810
|
var _wss;
|
|
1811
1811
|
var init_broadcast = __esm({
|
|
1812
|
-
"
|
|
1812
|
+
"packages/server/dist/ws/broadcast.js"() {
|
|
1813
1813
|
"use strict";
|
|
1814
1814
|
_wss = null;
|
|
1815
1815
|
}
|
|
1816
1816
|
});
|
|
1817
1817
|
|
|
1818
|
-
//
|
|
1818
|
+
// packages/server/dist/db/schema.js
|
|
1819
1819
|
var schema_exports = {};
|
|
1820
1820
|
__export(schema_exports, {
|
|
1821
1821
|
agentSessions: () => agentSessions,
|
|
@@ -1825,7 +1825,7 @@ __export(schema_exports, {
|
|
|
1825
1825
|
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
|
|
1826
1826
|
var sessions, agentSessions, disabledItems;
|
|
1827
1827
|
var init_schema = __esm({
|
|
1828
|
-
"
|
|
1828
|
+
"packages/server/dist/db/schema.js"() {
|
|
1829
1829
|
"use strict";
|
|
1830
1830
|
sessions = sqliteTable("sessions", {
|
|
1831
1831
|
id: text("id").primaryKey(),
|
|
@@ -1862,7 +1862,7 @@ var init_schema = __esm({
|
|
|
1862
1862
|
}
|
|
1863
1863
|
});
|
|
1864
1864
|
|
|
1865
|
-
//
|
|
1865
|
+
// packages/server/dist/init.js
|
|
1866
1866
|
var init_exports = {};
|
|
1867
1867
|
__export(init_exports, {
|
|
1868
1868
|
TEMPLATES_DIR: () => TEMPLATES_DIR,
|
|
@@ -2198,7 +2198,7 @@ function ensureWorkspaceHalo(workspaceRoot) {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
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;
|
|
2200
2200
|
var init_init = __esm({
|
|
2201
|
-
"
|
|
2201
|
+
"packages/server/dist/init.js"() {
|
|
2202
2202
|
"use strict";
|
|
2203
2203
|
__dirname = path6.dirname(fileURLToPath(import.meta.url));
|
|
2204
2204
|
TEMPLATES_DIR = path6.resolve(__dirname, "..", "templates");
|
|
@@ -2206,7 +2206,7 @@ var init_init = __esm({
|
|
|
2206
2206
|
path6.resolve(__dirname, "..", "bundled-docs"),
|
|
2207
2207
|
path6.resolve(__dirname, "..", "..", "..", ".halo", "docs")
|
|
2208
2208
|
];
|
|
2209
|
-
TEMPLATE_VERSION =
|
|
2209
|
+
TEMPLATE_VERSION = 48;
|
|
2210
2210
|
VERSION_FILE = ".template-version";
|
|
2211
2211
|
SKIP_NAMES = /* @__PURE__ */ new Set([".DS_Store", "schema.sql", "__pycache__", ".pytest_cache"]);
|
|
2212
2212
|
BUILTIN_AGENT_IDS = /* @__PURE__ */ new Set([
|
|
@@ -2271,7 +2271,7 @@ var init_init = __esm({
|
|
|
2271
2271
|
}
|
|
2272
2272
|
});
|
|
2273
2273
|
|
|
2274
|
-
//
|
|
2274
|
+
// packages/server/dist/db/index.js
|
|
2275
2275
|
import Database from "better-sqlite3";
|
|
2276
2276
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
|
2277
2277
|
import { eq, and } from "drizzle-orm";
|
|
@@ -2330,7 +2330,7 @@ function toggleDisabled(db, itemType, itemId, scope) {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
var SCHEMA_SQL_PATH, dbCache;
|
|
2332
2332
|
var init_db = __esm({
|
|
2333
|
-
"
|
|
2333
|
+
"packages/server/dist/db/index.js"() {
|
|
2334
2334
|
"use strict";
|
|
2335
2335
|
init_schema();
|
|
2336
2336
|
init_init();
|
|
@@ -2339,7 +2339,7 @@ var init_db = __esm({
|
|
|
2339
2339
|
}
|
|
2340
2340
|
});
|
|
2341
2341
|
|
|
2342
|
-
//
|
|
2342
|
+
// packages/server/dist/sessions/session-store.js
|
|
2343
2343
|
import fsSync3 from "node:fs";
|
|
2344
2344
|
import fs8 from "node:fs/promises";
|
|
2345
2345
|
import path8 from "node:path";
|
|
@@ -2554,12 +2554,12 @@ function findAndUpdateSessionTitle(sessionId, title, projectPath) {
|
|
|
2554
2554
|
return false;
|
|
2555
2555
|
}
|
|
2556
2556
|
var init_session_store = __esm({
|
|
2557
|
-
"
|
|
2557
|
+
"packages/server/dist/sessions/session-store.js"() {
|
|
2558
2558
|
"use strict";
|
|
2559
2559
|
}
|
|
2560
2560
|
});
|
|
2561
2561
|
|
|
2562
|
-
//
|
|
2562
|
+
// packages/server/dist/agents/session-tools.js
|
|
2563
2563
|
async function callerTeamFor(sm, sessionId) {
|
|
2564
2564
|
const callerId = sm.sessions.get(sessionId)?.agentId;
|
|
2565
2565
|
if (!callerId)
|
|
@@ -2822,7 +2822,7 @@ ${skillInfo}` : ""
|
|
|
2822
2822
|
];
|
|
2823
2823
|
}
|
|
2824
2824
|
var init_session_tools = __esm({
|
|
2825
|
-
"
|
|
2825
|
+
"packages/server/dist/agents/session-tools.js"() {
|
|
2826
2826
|
"use strict";
|
|
2827
2827
|
init_config();
|
|
2828
2828
|
init_agent_loader();
|
|
@@ -2831,7 +2831,7 @@ var init_session_tools = __esm({
|
|
|
2831
2831
|
}
|
|
2832
2832
|
});
|
|
2833
2833
|
|
|
2834
|
-
//
|
|
2834
|
+
// packages/server/dist/agents/goal-mode.js
|
|
2835
2835
|
import fs9 from "node:fs";
|
|
2836
2836
|
import path9 from "node:path";
|
|
2837
2837
|
import { createHash } from "node:crypto";
|
|
@@ -3300,7 +3300,7 @@ function sweepActiveGoals(host) {
|
|
|
3300
3300
|
}
|
|
3301
3301
|
var GOAL_AGENT_ID, DEFAULT_GOAL_CAPS, NO_PROGRESS_LIMIT, DELEGATED_DECISION_CAP, WORKER_RECENT_MAX_MESSAGES, WORKER_RECENT_MSG_CHARS, WORKER_RECENT_TOTAL_CHARS, NEED_INPUT_MARKER;
|
|
3302
3302
|
var init_goal_mode = __esm({
|
|
3303
|
-
"
|
|
3303
|
+
"packages/server/dist/agents/goal-mode.js"() {
|
|
3304
3304
|
"use strict";
|
|
3305
3305
|
init_schema();
|
|
3306
3306
|
init_session_store();
|
|
@@ -3321,7 +3321,7 @@ var init_goal_mode = __esm({
|
|
|
3321
3321
|
}
|
|
3322
3322
|
});
|
|
3323
3323
|
|
|
3324
|
-
//
|
|
3324
|
+
// packages/server/dist/agents/workspace-runtime-lock.js
|
|
3325
3325
|
import fs10 from "node:fs";
|
|
3326
3326
|
import path10 from "node:path";
|
|
3327
3327
|
function isPidAlive(pid) {
|
|
@@ -3369,13 +3369,13 @@ function claimWorkspaceRuntime(workspaceRoot) {
|
|
|
3369
3369
|
}
|
|
3370
3370
|
var RUNTIME_LOCK_FILE;
|
|
3371
3371
|
var init_workspace_runtime_lock = __esm({
|
|
3372
|
-
"
|
|
3372
|
+
"packages/server/dist/agents/workspace-runtime-lock.js"() {
|
|
3373
3373
|
"use strict";
|
|
3374
3374
|
RUNTIME_LOCK_FILE = "runtime.lock";
|
|
3375
3375
|
}
|
|
3376
3376
|
});
|
|
3377
3377
|
|
|
3378
|
-
//
|
|
3378
|
+
// packages/server/dist/db/evo-db.js
|
|
3379
3379
|
import Database2 from "better-sqlite3";
|
|
3380
3380
|
import { drizzle as drizzle2 } from "drizzle-orm/better-sqlite3";
|
|
3381
3381
|
import { sqliteTable as sqliteTable2, text as text2, integer as integer2 } from "drizzle-orm/sqlite-core";
|
|
@@ -3399,7 +3399,7 @@ function getEvoDb() {
|
|
|
3399
3399
|
}
|
|
3400
3400
|
var evolutionRuns, evolutionApplies, CREATE_SQL, _evoDb;
|
|
3401
3401
|
var init_evo_db = __esm({
|
|
3402
|
-
"
|
|
3402
|
+
"packages/server/dist/db/evo-db.js"() {
|
|
3403
3403
|
"use strict";
|
|
3404
3404
|
evolutionRuns = sqliteTable2("evolution_runs", {
|
|
3405
3405
|
id: text2("id").primaryKey(),
|
|
@@ -3481,7 +3481,7 @@ CREATE INDEX IF NOT EXISTS idx_evo_applies_archived ON evolution_applies(archive
|
|
|
3481
3481
|
}
|
|
3482
3482
|
});
|
|
3483
3483
|
|
|
3484
|
-
//
|
|
3484
|
+
// packages/server/dist/evolution/enqueue.js
|
|
3485
3485
|
import fs12 from "node:fs";
|
|
3486
3486
|
import path12 from "node:path";
|
|
3487
3487
|
import { homedir as homedir7 } from "node:os";
|
|
@@ -3766,13 +3766,13 @@ function enqueueEvoRun(input) {
|
|
|
3766
3766
|
return { ok: true, runId, runDir };
|
|
3767
3767
|
}
|
|
3768
3768
|
var init_enqueue = __esm({
|
|
3769
|
-
"
|
|
3769
|
+
"packages/server/dist/evolution/enqueue.js"() {
|
|
3770
3770
|
"use strict";
|
|
3771
3771
|
init_evo_db();
|
|
3772
3772
|
}
|
|
3773
3773
|
});
|
|
3774
3774
|
|
|
3775
|
-
//
|
|
3775
|
+
// packages/server/dist/channels/shared/media-store.js
|
|
3776
3776
|
import fs13 from "node:fs/promises";
|
|
3777
3777
|
import path13 from "node:path";
|
|
3778
3778
|
import { randomBytes } from "node:crypto";
|
|
@@ -3830,7 +3830,7 @@ async function saveInboundMedia(params) {
|
|
|
3830
3830
|
}
|
|
3831
3831
|
var VISION_IMAGE_MIME_TYPES, EXT_BY_MIME;
|
|
3832
3832
|
var init_media_store = __esm({
|
|
3833
|
-
"
|
|
3833
|
+
"packages/server/dist/channels/shared/media-store.js"() {
|
|
3834
3834
|
"use strict";
|
|
3835
3835
|
VISION_IMAGE_MIME_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
|
|
3836
3836
|
EXT_BY_MIME = {
|
|
@@ -3850,7 +3850,7 @@ var init_media_store = __esm({
|
|
|
3850
3850
|
}
|
|
3851
3851
|
});
|
|
3852
3852
|
|
|
3853
|
-
//
|
|
3853
|
+
// packages/server/dist/sessions/ui-log-builder.js
|
|
3854
3854
|
import { randomUUID } from "node:crypto";
|
|
3855
3855
|
function createEmptyUIState() {
|
|
3856
3856
|
return {
|
|
@@ -4126,7 +4126,7 @@ function applyEvent(state, event) {
|
|
|
4126
4126
|
break;
|
|
4127
4127
|
case "tool_call": {
|
|
4128
4128
|
const inputStr = formatToolInput(event.toolInput);
|
|
4129
|
-
const entry = { name: event.toolName ?? "", input: inputStr };
|
|
4129
|
+
const entry = { name: event.toolName ?? "", input: inputStr, toolUseId: event.toolUseId };
|
|
4130
4130
|
const msg = {
|
|
4131
4131
|
id: genId(),
|
|
4132
4132
|
type: "tool_call",
|
|
@@ -4266,19 +4266,19 @@ function applyEvent(state, event) {
|
|
|
4266
4266
|
}
|
|
4267
4267
|
var msgCounter;
|
|
4268
4268
|
var init_ui_log_builder = __esm({
|
|
4269
|
-
"
|
|
4269
|
+
"packages/server/dist/sessions/ui-log-builder.js"() {
|
|
4270
4270
|
"use strict";
|
|
4271
4271
|
msgCounter = 0;
|
|
4272
4272
|
}
|
|
4273
4273
|
});
|
|
4274
4274
|
|
|
4275
|
-
//
|
|
4275
|
+
// packages/server/dist/agents/session-ui-store.js
|
|
4276
4276
|
import fsSync4 from "node:fs";
|
|
4277
4277
|
import path14 from "node:path";
|
|
4278
4278
|
import { eq as eq3 } from "drizzle-orm";
|
|
4279
4279
|
var SessionUIStore;
|
|
4280
4280
|
var init_session_ui_store = __esm({
|
|
4281
|
-
"
|
|
4281
|
+
"packages/server/dist/agents/session-ui-store.js"() {
|
|
4282
4282
|
"use strict";
|
|
4283
4283
|
init_broadcast();
|
|
4284
4284
|
init_schema();
|
|
@@ -4654,11 +4654,11 @@ var init_session_ui_store = __esm({
|
|
|
4654
4654
|
}
|
|
4655
4655
|
});
|
|
4656
4656
|
|
|
4657
|
-
//
|
|
4657
|
+
// packages/server/dist/agents/session-query-store.js
|
|
4658
4658
|
import { eq as eq4, and as and3, isNull as isNull2, desc, lt, gte, inArray } from "drizzle-orm";
|
|
4659
4659
|
var SessionQueryStore;
|
|
4660
4660
|
var init_session_query_store = __esm({
|
|
4661
|
-
"
|
|
4661
|
+
"packages/server/dist/agents/session-query-store.js"() {
|
|
4662
4662
|
"use strict";
|
|
4663
4663
|
init_schema();
|
|
4664
4664
|
init_session_store();
|
|
@@ -4869,7 +4869,7 @@ var init_session_query_store = __esm({
|
|
|
4869
4869
|
}
|
|
4870
4870
|
});
|
|
4871
4871
|
|
|
4872
|
-
//
|
|
4872
|
+
// packages/server/dist/agents/bedrock-agent.js
|
|
4873
4873
|
import { BedrockRuntimeClient, InvokeModelCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
4874
4874
|
function effortToBudget(effort, maxTokens) {
|
|
4875
4875
|
const table = {
|
|
@@ -4891,7 +4891,7 @@ function extractRegionFromEndpoint(endpoint) {
|
|
|
4891
4891
|
}
|
|
4892
4892
|
var BedrockAgent;
|
|
4893
4893
|
var init_bedrock_agent = __esm({
|
|
4894
|
-
"
|
|
4894
|
+
"packages/server/dist/agents/bedrock-agent.js"() {
|
|
4895
4895
|
"use strict";
|
|
4896
4896
|
init_config();
|
|
4897
4897
|
init_agent_loop();
|
|
@@ -5020,7 +5020,7 @@ var init_bedrock_agent = __esm({
|
|
|
5020
5020
|
}
|
|
5021
5021
|
});
|
|
5022
5022
|
|
|
5023
|
-
//
|
|
5023
|
+
// packages/server/dist/agents/deepseek-agent.js
|
|
5024
5024
|
function safeParse(json) {
|
|
5025
5025
|
try {
|
|
5026
5026
|
return JSON.parse(json || "{}");
|
|
@@ -5030,7 +5030,7 @@ function safeParse(json) {
|
|
|
5030
5030
|
}
|
|
5031
5031
|
var DeepSeekAgent;
|
|
5032
5032
|
var init_deepseek_agent = __esm({
|
|
5033
|
-
"
|
|
5033
|
+
"packages/server/dist/agents/deepseek-agent.js"() {
|
|
5034
5034
|
"use strict";
|
|
5035
5035
|
init_config();
|
|
5036
5036
|
init_agent_loop();
|
|
@@ -5210,7 +5210,7 @@ var init_deepseek_agent = __esm({
|
|
|
5210
5210
|
}
|
|
5211
5211
|
});
|
|
5212
5212
|
|
|
5213
|
-
//
|
|
5213
|
+
// packages/server/dist/agents/kimi-agent.js
|
|
5214
5214
|
function safeParse2(json) {
|
|
5215
5215
|
try {
|
|
5216
5216
|
return JSON.parse(json || "{}");
|
|
@@ -5220,7 +5220,7 @@ function safeParse2(json) {
|
|
|
5220
5220
|
}
|
|
5221
5221
|
var KimiAgent;
|
|
5222
5222
|
var init_kimi_agent = __esm({
|
|
5223
|
-
"
|
|
5223
|
+
"packages/server/dist/agents/kimi-agent.js"() {
|
|
5224
5224
|
"use strict";
|
|
5225
5225
|
init_config();
|
|
5226
5226
|
init_agent_loop();
|
|
@@ -5416,7 +5416,7 @@ var init_kimi_agent = __esm({
|
|
|
5416
5416
|
}
|
|
5417
5417
|
});
|
|
5418
5418
|
|
|
5419
|
-
//
|
|
5419
|
+
// packages/server/dist/agents/minimax-agent.js
|
|
5420
5420
|
function effortToBudget2(effort, maxTokens) {
|
|
5421
5421
|
const table = {
|
|
5422
5422
|
low: 2048,
|
|
@@ -5433,7 +5433,7 @@ function effortToBudget2(effort, maxTokens) {
|
|
|
5433
5433
|
}
|
|
5434
5434
|
var MiniMaxAgent;
|
|
5435
5435
|
var init_minimax_agent = __esm({
|
|
5436
|
-
"
|
|
5436
|
+
"packages/server/dist/agents/minimax-agent.js"() {
|
|
5437
5437
|
"use strict";
|
|
5438
5438
|
init_config();
|
|
5439
5439
|
init_agent_loop();
|
|
@@ -5555,7 +5555,7 @@ var init_minimax_agent = __esm({
|
|
|
5555
5555
|
}
|
|
5556
5556
|
});
|
|
5557
5557
|
|
|
5558
|
-
//
|
|
5558
|
+
// packages/server/dist/agents/qwen-agent.js
|
|
5559
5559
|
function effortToBudget3(effort, maxTokens) {
|
|
5560
5560
|
const table = {
|
|
5561
5561
|
low: 2048,
|
|
@@ -5572,7 +5572,7 @@ function effortToBudget3(effort, maxTokens) {
|
|
|
5572
5572
|
}
|
|
5573
5573
|
var QwenAgent;
|
|
5574
5574
|
var init_qwen_agent = __esm({
|
|
5575
|
-
"
|
|
5575
|
+
"packages/server/dist/agents/qwen-agent.js"() {
|
|
5576
5576
|
"use strict";
|
|
5577
5577
|
init_config();
|
|
5578
5578
|
init_agent_loop();
|
|
@@ -5690,7 +5690,7 @@ var init_qwen_agent = __esm({
|
|
|
5690
5690
|
}
|
|
5691
5691
|
});
|
|
5692
5692
|
|
|
5693
|
-
//
|
|
5693
|
+
// packages/server/dist/agents/hunyuan-agent.js
|
|
5694
5694
|
function safeParse3(json) {
|
|
5695
5695
|
try {
|
|
5696
5696
|
return JSON.parse(json || "{}");
|
|
@@ -5700,7 +5700,7 @@ function safeParse3(json) {
|
|
|
5700
5700
|
}
|
|
5701
5701
|
var HunyuanAgent;
|
|
5702
5702
|
var init_hunyuan_agent = __esm({
|
|
5703
|
-
"
|
|
5703
|
+
"packages/server/dist/agents/hunyuan-agent.js"() {
|
|
5704
5704
|
"use strict";
|
|
5705
5705
|
init_config();
|
|
5706
5706
|
init_agent_loop();
|
|
@@ -5871,7 +5871,7 @@ var init_hunyuan_agent = __esm({
|
|
|
5871
5871
|
}
|
|
5872
5872
|
});
|
|
5873
5873
|
|
|
5874
|
-
//
|
|
5874
|
+
// packages/server/dist/agents/doubao-agent.js
|
|
5875
5875
|
function safeParse4(json) {
|
|
5876
5876
|
try {
|
|
5877
5877
|
return JSON.parse(json || "{}");
|
|
@@ -5881,7 +5881,7 @@ function safeParse4(json) {
|
|
|
5881
5881
|
}
|
|
5882
5882
|
var DoubaoAgent;
|
|
5883
5883
|
var init_doubao_agent = __esm({
|
|
5884
|
-
"
|
|
5884
|
+
"packages/server/dist/agents/doubao-agent.js"() {
|
|
5885
5885
|
"use strict";
|
|
5886
5886
|
init_config();
|
|
5887
5887
|
init_agent_loop();
|
|
@@ -6052,7 +6052,7 @@ var init_doubao_agent = __esm({
|
|
|
6052
6052
|
}
|
|
6053
6053
|
});
|
|
6054
6054
|
|
|
6055
|
-
//
|
|
6055
|
+
// packages/server/dist/agents/openai-agent.js
|
|
6056
6056
|
function safeParse5(json) {
|
|
6057
6057
|
try {
|
|
6058
6058
|
return JSON.parse(json || "{}");
|
|
@@ -6062,7 +6062,7 @@ function safeParse5(json) {
|
|
|
6062
6062
|
}
|
|
6063
6063
|
var OpenAIAgent;
|
|
6064
6064
|
var init_openai_agent = __esm({
|
|
6065
|
-
"
|
|
6065
|
+
"packages/server/dist/agents/openai-agent.js"() {
|
|
6066
6066
|
"use strict";
|
|
6067
6067
|
init_config();
|
|
6068
6068
|
init_agent_loop();
|
|
@@ -6234,7 +6234,7 @@ var init_openai_agent = __esm({
|
|
|
6234
6234
|
}
|
|
6235
6235
|
});
|
|
6236
6236
|
|
|
6237
|
-
//
|
|
6237
|
+
// packages/server/dist/agents/mantle-agent.js
|
|
6238
6238
|
import { SignatureV4 } from "@smithy/signature-v4";
|
|
6239
6239
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
6240
6240
|
import { defaultProvider } from "@aws-sdk/credential-provider-node";
|
|
@@ -6251,7 +6251,7 @@ function safeParse6(json) {
|
|
|
6251
6251
|
}
|
|
6252
6252
|
var MantleAgent;
|
|
6253
6253
|
var init_mantle_agent = __esm({
|
|
6254
|
-
"
|
|
6254
|
+
"packages/server/dist/agents/mantle-agent.js"() {
|
|
6255
6255
|
"use strict";
|
|
6256
6256
|
init_config();
|
|
6257
6257
|
init_agent_loop();
|
|
@@ -6276,7 +6276,8 @@ var init_mantle_agent = __esm({
|
|
|
6276
6276
|
};
|
|
6277
6277
|
if (this.config.thinking?.enabled && this.config.thinking.effort) {
|
|
6278
6278
|
const e = this.config.thinking.effort;
|
|
6279
|
-
|
|
6279
|
+
const valid = ["low", "medium", "high", "xhigh", "max"];
|
|
6280
|
+
body.reasoning = { effort: valid.includes(e) ? e : "high" };
|
|
6280
6281
|
}
|
|
6281
6282
|
const payload = JSON.stringify(body);
|
|
6282
6283
|
const response = this.config.apiKey ? await fetch(url, {
|
|
@@ -6469,10 +6470,10 @@ var init_mantle_agent = __esm({
|
|
|
6469
6470
|
}
|
|
6470
6471
|
});
|
|
6471
6472
|
|
|
6472
|
-
//
|
|
6473
|
+
// packages/server/dist/agents/anthropic-agent.js
|
|
6473
6474
|
var AnthropicAgent;
|
|
6474
6475
|
var init_anthropic_agent = __esm({
|
|
6475
|
-
"
|
|
6476
|
+
"packages/server/dist/agents/anthropic-agent.js"() {
|
|
6476
6477
|
"use strict";
|
|
6477
6478
|
init_config();
|
|
6478
6479
|
init_agent_loop();
|
|
@@ -6595,7 +6596,7 @@ var init_anthropic_agent = __esm({
|
|
|
6595
6596
|
}
|
|
6596
6597
|
});
|
|
6597
6598
|
|
|
6598
|
-
//
|
|
6599
|
+
// packages/server/dist/agents/model-runtime.js
|
|
6599
6600
|
function createModelRuntime(providerId, cfg) {
|
|
6600
6601
|
switch (providerId) {
|
|
6601
6602
|
case "aws-bedrock-claude-invoke":
|
|
@@ -6730,7 +6731,7 @@ function createModelRuntime(providerId, cfg) {
|
|
|
6730
6731
|
}
|
|
6731
6732
|
}
|
|
6732
6733
|
var init_model_runtime = __esm({
|
|
6733
|
-
"
|
|
6734
|
+
"packages/server/dist/agents/model-runtime.js"() {
|
|
6734
6735
|
"use strict";
|
|
6735
6736
|
init_bedrock_agent();
|
|
6736
6737
|
init_deepseek_agent();
|
|
@@ -6745,7 +6746,7 @@ var init_model_runtime = __esm({
|
|
|
6745
6746
|
}
|
|
6746
6747
|
});
|
|
6747
6748
|
|
|
6748
|
-
//
|
|
6749
|
+
// packages/server/dist/tools/sandbox.js
|
|
6749
6750
|
import { exec, execFile, spawn } from "node:child_process";
|
|
6750
6751
|
import { promisify } from "node:util";
|
|
6751
6752
|
import path15 from "node:path";
|
|
@@ -7195,7 +7196,7 @@ async function sandboxReaddir(dirPath, opts) {
|
|
|
7195
7196
|
}
|
|
7196
7197
|
var execAsync, execFileAsync, HOME, HALO_HOME3, GLOBAL_DIR, KILL_GRACE_MS, _bwrapAvailable, DEFAULT_HIDDEN_DIRS, DEFAULT_HIDDEN_FILES, _hiddenDirs, _hiddenFiles, _writableDirs;
|
|
7197
7198
|
var init_sandbox = __esm({
|
|
7198
|
-
"
|
|
7199
|
+
"packages/server/dist/tools/sandbox.js"() {
|
|
7199
7200
|
"use strict";
|
|
7200
7201
|
execAsync = promisify(exec);
|
|
7201
7202
|
execFileAsync = promisify(execFile);
|
|
@@ -7242,7 +7243,7 @@ var init_sandbox = __esm({
|
|
|
7242
7243
|
}
|
|
7243
7244
|
});
|
|
7244
7245
|
|
|
7245
|
-
//
|
|
7246
|
+
// packages/server/dist/tools/workspace-tools.js
|
|
7246
7247
|
import fs14 from "node:fs/promises";
|
|
7247
7248
|
import path16 from "node:path";
|
|
7248
7249
|
import crypto from "node:crypto";
|
|
@@ -7959,7 +7960,7 @@ function imageDimensions(buf, mediaType) {
|
|
|
7959
7960
|
}
|
|
7960
7961
|
var SKIP_DIRS, GLOB_MAX_RESULTS, HOME2, PARAMS_PATTERN, ENV_PATTERN3;
|
|
7961
7962
|
var init_workspace_tools = __esm({
|
|
7962
|
-
"
|
|
7963
|
+
"packages/server/dist/tools/workspace-tools.js"() {
|
|
7963
7964
|
"use strict";
|
|
7964
7965
|
init_config();
|
|
7965
7966
|
init_sandbox();
|
|
@@ -7975,7 +7976,7 @@ var init_workspace_tools = __esm({
|
|
|
7975
7976
|
}
|
|
7976
7977
|
});
|
|
7977
7978
|
|
|
7978
|
-
//
|
|
7979
|
+
// packages/server/dist/tools/draft-tool.js
|
|
7979
7980
|
function createDraftTool() {
|
|
7980
7981
|
let drafts = 0;
|
|
7981
7982
|
const tool = {
|
|
@@ -8010,7 +8011,7 @@ Error: draft requires non-empty \`content\` \u2014 put your full draft answer th
|
|
|
8010
8011
|
}
|
|
8011
8012
|
var MAX_DRAFTS, REVIEW_CHECKLIST;
|
|
8012
8013
|
var init_draft_tool = __esm({
|
|
8013
|
-
"
|
|
8014
|
+
"packages/server/dist/tools/draft-tool.js"() {
|
|
8014
8015
|
"use strict";
|
|
8015
8016
|
init_agent_loop();
|
|
8016
8017
|
MAX_DRAFTS = 3;
|
|
@@ -8024,7 +8025,7 @@ If the draft clears all three, write the final answer now. If not, fix it (gathe
|
|
|
8024
8025
|
}
|
|
8025
8026
|
});
|
|
8026
8027
|
|
|
8027
|
-
//
|
|
8028
|
+
// packages/server/dist/prompts/system-prompts.js
|
|
8028
8029
|
import fs15 from "node:fs/promises";
|
|
8029
8030
|
import path17 from "node:path";
|
|
8030
8031
|
import { homedir as homedir10 } from "node:os";
|
|
@@ -8110,17 +8111,17 @@ async function loadSystemPrompts(workspaceRoot) {
|
|
|
8110
8111
|
}
|
|
8111
8112
|
var GLOBAL_PROMPTS_DIR;
|
|
8112
8113
|
var init_system_prompts = __esm({
|
|
8113
|
-
"
|
|
8114
|
+
"packages/server/dist/prompts/system-prompts.js"() {
|
|
8114
8115
|
"use strict";
|
|
8115
8116
|
GLOBAL_PROMPTS_DIR = path17.join(homedir10(), ".halo", "global", "prompts");
|
|
8116
8117
|
}
|
|
8117
8118
|
});
|
|
8118
8119
|
|
|
8119
|
-
//
|
|
8120
|
+
// packages/server/dist/agents/session-agent-builder.js
|
|
8120
8121
|
import path18 from "node:path";
|
|
8121
8122
|
var SessionAgentBuilder;
|
|
8122
8123
|
var init_session_agent_builder = __esm({
|
|
8123
|
-
"
|
|
8124
|
+
"packages/server/dist/agents/session-agent-builder.js"() {
|
|
8124
8125
|
"use strict";
|
|
8125
8126
|
init_model_runtime();
|
|
8126
8127
|
init_workspace_tools();
|
|
@@ -8515,10 +8516,10 @@ do delegate, say so in one line and keep going.`;
|
|
|
8515
8516
|
}
|
|
8516
8517
|
});
|
|
8517
8518
|
|
|
8518
|
-
//
|
|
8519
|
+
// packages/server/dist/commands/registry.js
|
|
8519
8520
|
var CommandRegistry;
|
|
8520
8521
|
var init_registry = __esm({
|
|
8521
|
-
"
|
|
8522
|
+
"packages/server/dist/commands/registry.js"() {
|
|
8522
8523
|
"use strict";
|
|
8523
8524
|
CommandRegistry = class {
|
|
8524
8525
|
descriptors = /* @__PURE__ */ new Map();
|
|
@@ -8532,13 +8533,13 @@ var init_registry = __esm({
|
|
|
8532
8533
|
}
|
|
8533
8534
|
});
|
|
8534
8535
|
|
|
8535
|
-
//
|
|
8536
|
+
// packages/server/dist/commands/index.js
|
|
8536
8537
|
function builtinCommandNames() {
|
|
8537
8538
|
return commandRegistry.listDescriptors().filter((d) => d.source === "builtin").map((d) => d.name);
|
|
8538
8539
|
}
|
|
8539
8540
|
var commandRegistry;
|
|
8540
8541
|
var init_commands = __esm({
|
|
8541
|
-
"
|
|
8542
|
+
"packages/server/dist/commands/index.js"() {
|
|
8542
8543
|
"use strict";
|
|
8543
8544
|
init_registry();
|
|
8544
8545
|
commandRegistry = new CommandRegistry();
|
|
@@ -8588,7 +8589,7 @@ var init_commands = __esm({
|
|
|
8588
8589
|
}
|
|
8589
8590
|
});
|
|
8590
8591
|
|
|
8591
|
-
//
|
|
8592
|
+
// packages/server/dist/channels/shared/i18n.js
|
|
8592
8593
|
function getLang(account) {
|
|
8593
8594
|
const v = account.language;
|
|
8594
8595
|
return v === "en" || v === "zh" ? v : "en";
|
|
@@ -8607,7 +8608,7 @@ function t(key, lang, params) {
|
|
|
8607
8608
|
}
|
|
8608
8609
|
var messages;
|
|
8609
8610
|
var init_i18n = __esm({
|
|
8610
|
-
"
|
|
8611
|
+
"packages/server/dist/channels/shared/i18n.js"() {
|
|
8611
8612
|
"use strict";
|
|
8612
8613
|
messages = {
|
|
8613
8614
|
// ── /help ──
|
|
@@ -8766,7 +8767,7 @@ var init_i18n = __esm({
|
|
|
8766
8767
|
}
|
|
8767
8768
|
});
|
|
8768
8769
|
|
|
8769
|
-
//
|
|
8770
|
+
// packages/server/dist/commands/skill-command.js
|
|
8770
8771
|
import fs16 from "node:fs/promises";
|
|
8771
8772
|
import path19 from "node:path";
|
|
8772
8773
|
async function scanDir(dir) {
|
|
@@ -8908,7 +8909,7 @@ ${body}`;
|
|
|
8908
8909
|
}
|
|
8909
8910
|
var cachedEntries;
|
|
8910
8911
|
var init_skill_command = __esm({
|
|
8911
|
-
"
|
|
8912
|
+
"packages/server/dist/commands/skill-command.js"() {
|
|
8912
8913
|
"use strict";
|
|
8913
8914
|
init_commands();
|
|
8914
8915
|
init_agent_loader();
|
|
@@ -8919,7 +8920,7 @@ var init_skill_command = __esm({
|
|
|
8919
8920
|
}
|
|
8920
8921
|
});
|
|
8921
8922
|
|
|
8922
|
-
//
|
|
8923
|
+
// packages/server/dist/agents/session-skill-commands.js
|
|
8923
8924
|
import { eq as eq5 } from "drizzle-orm";
|
|
8924
8925
|
function commandVisibilityGate(d) {
|
|
8925
8926
|
if (!d.verbs || d.verbs.length === 0)
|
|
@@ -8936,7 +8937,7 @@ function commandVisibilityGate(d) {
|
|
|
8936
8937
|
}
|
|
8937
8938
|
var VIS_RANK, SessionSkillCommands;
|
|
8938
8939
|
var init_session_skill_commands = __esm({
|
|
8939
|
-
"
|
|
8940
|
+
"packages/server/dist/agents/session-skill-commands.js"() {
|
|
8940
8941
|
"use strict";
|
|
8941
8942
|
init_db();
|
|
8942
8943
|
init_schema();
|
|
@@ -9003,12 +9004,12 @@ var init_session_skill_commands = __esm({
|
|
|
9003
9004
|
}
|
|
9004
9005
|
});
|
|
9005
9006
|
|
|
9006
|
-
//
|
|
9007
|
+
// packages/server/dist/agents/session-state-store.js
|
|
9007
9008
|
import fsSync5 from "node:fs";
|
|
9008
9009
|
import path20 from "node:path";
|
|
9009
9010
|
var SessionStateStore;
|
|
9010
9011
|
var init_session_state_store = __esm({
|
|
9011
|
-
"
|
|
9012
|
+
"packages/server/dist/agents/session-state-store.js"() {
|
|
9012
9013
|
"use strict";
|
|
9013
9014
|
init_session_store();
|
|
9014
9015
|
SessionStateStore = class {
|
|
@@ -9072,7 +9073,7 @@ var init_session_state_store = __esm({
|
|
|
9072
9073
|
}
|
|
9073
9074
|
});
|
|
9074
9075
|
|
|
9075
|
-
//
|
|
9076
|
+
// packages/server/dist/agents/session-manager.js
|
|
9076
9077
|
import fsSync6 from "node:fs";
|
|
9077
9078
|
import path21 from "node:path";
|
|
9078
9079
|
import { eq as eq6, and as and4, isNull as isNull3, isNotNull as isNotNull2 } from "drizzle-orm";
|
|
@@ -9153,7 +9154,7 @@ function generateSessionId() {
|
|
|
9153
9154
|
}
|
|
9154
9155
|
var SessionManager;
|
|
9155
9156
|
var init_session_manager = __esm({
|
|
9156
|
-
"
|
|
9157
|
+
"packages/server/dist/agents/session-manager.js"() {
|
|
9157
9158
|
"use strict";
|
|
9158
9159
|
init_md_loader();
|
|
9159
9160
|
init_config();
|
|
@@ -9765,12 +9766,12 @@ var init_session_manager = __esm({
|
|
|
9765
9766
|
if (loopStatus === "warn") {
|
|
9766
9767
|
this.emitEvent(session.id, { type: "system", text: `\u26A0\uFE0F Tool "${event.toolName}" called repeatedly with identical input. Consider a different approach.` });
|
|
9767
9768
|
}
|
|
9768
|
-
this.emitEvent(session.id, { type: "tool_call", toolName: event.toolName, toolInput: event.toolInput, agentName, agentId, taskId });
|
|
9769
|
+
this.emitEvent(session.id, { type: "tool_call", toolName: event.toolName, toolUseId: event.toolUseId, toolInput: event.toolInput, agentName, agentId, taskId });
|
|
9769
9770
|
break;
|
|
9770
9771
|
}
|
|
9771
9772
|
case "tool_result": {
|
|
9772
9773
|
const resultStr = event.toolResultFull ?? event.toolResult ?? "";
|
|
9773
|
-
this.emitEvent(session.id, { type: "tool_result", toolName: event.toolName, toolResult: resultStr, durationMs: event.durationMs, agentName, agentId, taskId });
|
|
9774
|
+
this.emitEvent(session.id, { type: "tool_result", toolName: event.toolName, toolUseId: event.toolUseId, toolResult: resultStr, durationMs: event.durationMs, agentName, agentId, taskId });
|
|
9774
9775
|
break;
|
|
9775
9776
|
}
|
|
9776
9777
|
case "usage": {
|
|
@@ -10136,6 +10137,7 @@ ${q.text}` : q.text).join("\n\n");
|
|
|
10136
10137
|
this.emitEvent(sessionId, {
|
|
10137
10138
|
type: "tool_result",
|
|
10138
10139
|
toolName: tc.name,
|
|
10140
|
+
toolUseId: tc.toolUseId,
|
|
10139
10141
|
toolResult: "[interrupted by user]",
|
|
10140
10142
|
agentName: session?.agentName,
|
|
10141
10143
|
agentId: session?.agentId,
|
|
@@ -11071,11 +11073,11 @@ ${q.text}` : q.text);
|
|
|
11071
11073
|
}
|
|
11072
11074
|
});
|
|
11073
11075
|
|
|
11074
|
-
//
|
|
11076
|
+
// packages/server/dist/agents/session-manager-registry.js
|
|
11075
11077
|
import fs17 from "node:fs";
|
|
11076
11078
|
var SessionManagerRegistry;
|
|
11077
11079
|
var init_session_manager_registry = __esm({
|
|
11078
|
-
"
|
|
11080
|
+
"packages/server/dist/agents/session-manager-registry.js"() {
|
|
11079
11081
|
"use strict";
|
|
11080
11082
|
init_session_manager();
|
|
11081
11083
|
init_init();
|
|
@@ -11130,7 +11132,7 @@ var init_session_manager_registry = __esm({
|
|
|
11130
11132
|
}
|
|
11131
11133
|
});
|
|
11132
11134
|
|
|
11133
|
-
//
|
|
11135
|
+
// packages/server/dist/logger.js
|
|
11134
11136
|
import fs18 from "node:fs";
|
|
11135
11137
|
import path22 from "node:path";
|
|
11136
11138
|
import { homedir as homedir11 } from "node:os";
|
|
@@ -11230,7 +11232,7 @@ function initLogger() {
|
|
|
11230
11232
|
}
|
|
11231
11233
|
var LOG_FILENAME, logDir, logFile, currentSize, LEVEL_ORDER;
|
|
11232
11234
|
var init_logger = __esm({
|
|
11233
|
-
"
|
|
11235
|
+
"packages/server/dist/logger.js"() {
|
|
11234
11236
|
"use strict";
|
|
11235
11237
|
init_config();
|
|
11236
11238
|
LOG_FILENAME = "server.log";
|
|
@@ -11241,7 +11243,7 @@ var init_logger = __esm({
|
|
|
11241
11243
|
}
|
|
11242
11244
|
});
|
|
11243
11245
|
|
|
11244
|
-
//
|
|
11246
|
+
// packages/server/dist/channels/shared/commands.js
|
|
11245
11247
|
import fs19 from "node:fs";
|
|
11246
11248
|
import path23 from "node:path";
|
|
11247
11249
|
import os from "node:os";
|
|
@@ -11967,7 +11969,7 @@ function execWsSwitch(ctx, arg) {
|
|
|
11967
11969
|
}
|
|
11968
11970
|
var ALIASES_FILE, aliasCache, CHANNEL_LIST_LIMIT, DISPATCH_COMMANDS, NOT_ROUTED, SUBCOMMAND_ROUTES, RANK;
|
|
11969
11971
|
var init_commands2 = __esm({
|
|
11970
|
-
"
|
|
11972
|
+
"packages/server/dist/channels/shared/commands.js"() {
|
|
11971
11973
|
"use strict";
|
|
11972
11974
|
init_agent_loader();
|
|
11973
11975
|
init_init();
|
|
@@ -12043,7 +12045,7 @@ var init_commands2 = __esm({
|
|
|
12043
12045
|
}
|
|
12044
12046
|
});
|
|
12045
12047
|
|
|
12046
|
-
// src/harness.ts
|
|
12048
|
+
// packages/cli/src/harness.ts
|
|
12047
12049
|
var harness_exports = {};
|
|
12048
12050
|
__export(harness_exports, {
|
|
12049
12051
|
createHarness: () => createHarness,
|
|
@@ -12285,7 +12287,7 @@ async function createHarness(opts) {
|
|
|
12285
12287
|
}
|
|
12286
12288
|
var SESSION_PREFIX, USER_ID;
|
|
12287
12289
|
var init_harness = __esm({
|
|
12288
|
-
"src/harness.ts"() {
|
|
12290
|
+
"packages/cli/src/harness.ts"() {
|
|
12289
12291
|
"use strict";
|
|
12290
12292
|
init_session_manager();
|
|
12291
12293
|
init_session_manager_registry();
|
|
@@ -12302,7 +12304,7 @@ var init_harness = __esm({
|
|
|
12302
12304
|
}
|
|
12303
12305
|
});
|
|
12304
12306
|
|
|
12305
|
-
//
|
|
12307
|
+
// packages/server/dist/middleware/password-hash.js
|
|
12306
12308
|
var password_hash_exports = {};
|
|
12307
12309
|
__export(password_hash_exports, {
|
|
12308
12310
|
generateJwtSecret: () => generateJwtSecret,
|
|
@@ -12352,7 +12354,7 @@ function generateJwtSecret() {
|
|
|
12352
12354
|
}
|
|
12353
12355
|
var scryptAsync, COST, KEY_LEN;
|
|
12354
12356
|
var init_password_hash = __esm({
|
|
12355
|
-
"
|
|
12357
|
+
"packages/server/dist/middleware/password-hash.js"() {
|
|
12356
12358
|
"use strict";
|
|
12357
12359
|
scryptAsync = promisify2(crypto2.scrypt);
|
|
12358
12360
|
COST = { N: 16384, r: 8, p: 1 };
|
|
@@ -12360,7 +12362,7 @@ var init_password_hash = __esm({
|
|
|
12360
12362
|
}
|
|
12361
12363
|
});
|
|
12362
12364
|
|
|
12363
|
-
//
|
|
12365
|
+
// packages/server/dist/setup-config.js
|
|
12364
12366
|
var setup_config_exports = {};
|
|
12365
12367
|
__export(setup_config_exports, {
|
|
12366
12368
|
configLeafSet: () => configLeafSet,
|
|
@@ -12401,13 +12403,13 @@ function configLeafSet(dotPath) {
|
|
|
12401
12403
|
}
|
|
12402
12404
|
var CONFIG_PATH;
|
|
12403
12405
|
var init_setup_config = __esm({
|
|
12404
|
-
"
|
|
12406
|
+
"packages/server/dist/setup-config.js"() {
|
|
12405
12407
|
"use strict";
|
|
12406
12408
|
CONFIG_PATH = path25.join(homedir12(), ".halo", "secrets", "config.yaml");
|
|
12407
12409
|
}
|
|
12408
12410
|
});
|
|
12409
12411
|
|
|
12410
|
-
//
|
|
12412
|
+
// packages/server/dist/setup-settings.js
|
|
12411
12413
|
var setup_settings_exports = {};
|
|
12412
12414
|
__export(setup_settings_exports, {
|
|
12413
12415
|
maskSecret: () => maskSecret,
|
|
@@ -12486,13 +12488,13 @@ function maskSecret(value) {
|
|
|
12486
12488
|
}
|
|
12487
12489
|
var SETTINGS_PATH2;
|
|
12488
12490
|
var init_setup_settings = __esm({
|
|
12489
|
-
"
|
|
12491
|
+
"packages/server/dist/setup-settings.js"() {
|
|
12490
12492
|
"use strict";
|
|
12491
12493
|
SETTINGS_PATH2 = path26.join(homedir13(), ".halo", "secrets", "settings.yaml");
|
|
12492
12494
|
}
|
|
12493
12495
|
});
|
|
12494
12496
|
|
|
12495
|
-
//
|
|
12497
|
+
// packages/server/dist/setup-providers.js
|
|
12496
12498
|
var setup_providers_exports = {};
|
|
12497
12499
|
__export(setup_providers_exports, {
|
|
12498
12500
|
AWS_CREDENTIAL_CHAIN_PROVIDER: () => AWS_CREDENTIAL_CHAIN_PROVIDER,
|
|
@@ -12698,7 +12700,7 @@ function listRequiredSkillsWithSecrets() {
|
|
|
12698
12700
|
}
|
|
12699
12701
|
var AWS_CREDENTIAL_CHAIN_PROVIDER, REBIND_BUILTIN_AGENT_IDS, GLOBAL_AGENTS_DIR3;
|
|
12700
12702
|
var init_setup_providers = __esm({
|
|
12701
|
-
"
|
|
12703
|
+
"packages/server/dist/setup-providers.js"() {
|
|
12702
12704
|
"use strict";
|
|
12703
12705
|
init_init();
|
|
12704
12706
|
init_setup_settings();
|
|
@@ -12708,7 +12710,7 @@ var init_setup_providers = __esm({
|
|
|
12708
12710
|
}
|
|
12709
12711
|
});
|
|
12710
12712
|
|
|
12711
|
-
// src/setup-bind-provider.ts
|
|
12713
|
+
// packages/cli/src/setup-bind-provider.ts
|
|
12712
12714
|
var setup_bind_provider_exports = {};
|
|
12713
12715
|
__export(setup_bind_provider_exports, {
|
|
12714
12716
|
AWS_CHAIN_PROVIDER: () => AWS_CHAIN_PROVIDER,
|
|
@@ -12748,14 +12750,14 @@ function buildBindProviderPlan(configured, currentProvider, currentProviderHasKe
|
|
|
12748
12750
|
}
|
|
12749
12751
|
var AWS_CHAIN_PROVIDER, KEEP_CURRENT;
|
|
12750
12752
|
var init_setup_bind_provider = __esm({
|
|
12751
|
-
"src/setup-bind-provider.ts"() {
|
|
12753
|
+
"packages/cli/src/setup-bind-provider.ts"() {
|
|
12752
12754
|
"use strict";
|
|
12753
12755
|
AWS_CHAIN_PROVIDER = "aws-bedrock-claude-invoke";
|
|
12754
12756
|
KEEP_CURRENT = "__keep__";
|
|
12755
12757
|
}
|
|
12756
12758
|
});
|
|
12757
12759
|
|
|
12758
|
-
// src/setup-prompts.ts
|
|
12760
|
+
// packages/cli/src/setup-prompts.ts
|
|
12759
12761
|
var setup_prompts_exports = {};
|
|
12760
12762
|
__export(setup_prompts_exports, {
|
|
12761
12763
|
promptMultiSelect: () => promptMultiSelect,
|
|
@@ -13041,12 +13043,12 @@ function promptMultiSelectRich(question, options) {
|
|
|
13041
13043
|
});
|
|
13042
13044
|
}
|
|
13043
13045
|
var init_setup_prompts = __esm({
|
|
13044
|
-
"src/setup-prompts.ts"() {
|
|
13046
|
+
"packages/cli/src/setup-prompts.ts"() {
|
|
13045
13047
|
"use strict";
|
|
13046
13048
|
}
|
|
13047
13049
|
});
|
|
13048
13050
|
|
|
13049
|
-
// src/render-md.ts
|
|
13051
|
+
// packages/cli/src/render-md.ts
|
|
13050
13052
|
import { marked } from "marked";
|
|
13051
13053
|
import { markedTerminal } from "marked-terminal";
|
|
13052
13054
|
function renderMarkdown(text5) {
|
|
@@ -13054,14 +13056,14 @@ function renderMarkdown(text5) {
|
|
|
13054
13056
|
return rendered.replace(/\n{3,}/g, "\n\n").trimEnd();
|
|
13055
13057
|
}
|
|
13056
13058
|
var init_render_md = __esm({
|
|
13057
|
-
"src/render-md.ts"() {
|
|
13059
|
+
"packages/cli/src/render-md.ts"() {
|
|
13058
13060
|
"use strict";
|
|
13059
13061
|
marked.use(markedTerminal({ reflowText: true, width: Math.min(process.stdout.columns || 80, 120) }));
|
|
13060
13062
|
marked.use({ breaks: true });
|
|
13061
13063
|
}
|
|
13062
13064
|
});
|
|
13063
13065
|
|
|
13064
|
-
// src/resolve-refs.ts
|
|
13066
|
+
// packages/cli/src/resolve-refs.ts
|
|
13065
13067
|
import fs24 from "node:fs";
|
|
13066
13068
|
import path28 from "node:path";
|
|
13067
13069
|
function mimeFromExt(ext) {
|
|
@@ -13143,7 +13145,7 @@ ${content}
|
|
|
13143
13145
|
}
|
|
13144
13146
|
var IMAGE_EXTS, MAX_FILE_BYTES, MAX_IMAGE_BYTES, REF_PATTERN;
|
|
13145
13147
|
var init_resolve_refs = __esm({
|
|
13146
|
-
"src/resolve-refs.ts"() {
|
|
13148
|
+
"packages/cli/src/resolve-refs.ts"() {
|
|
13147
13149
|
"use strict";
|
|
13148
13150
|
IMAGE_EXTS = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".bmp"]);
|
|
13149
13151
|
MAX_FILE_BYTES = 100 * 1024;
|
|
@@ -13152,7 +13154,7 @@ var init_resolve_refs = __esm({
|
|
|
13152
13154
|
}
|
|
13153
13155
|
});
|
|
13154
13156
|
|
|
13155
|
-
// src/format-usage.ts
|
|
13157
|
+
// packages/cli/src/format-usage.ts
|
|
13156
13158
|
function fmtK(n) {
|
|
13157
13159
|
return `${(n / 1e3).toFixed(1)}K`;
|
|
13158
13160
|
}
|
|
@@ -13196,7 +13198,7 @@ function formatUsageLine(event) {
|
|
|
13196
13198
|
}
|
|
13197
13199
|
var ANSI;
|
|
13198
13200
|
var init_format_usage = __esm({
|
|
13199
|
-
"src/format-usage.ts"() {
|
|
13201
|
+
"packages/cli/src/format-usage.ts"() {
|
|
13200
13202
|
"use strict";
|
|
13201
13203
|
ANSI = {
|
|
13202
13204
|
reset: "\x1B[0m",
|
|
@@ -13210,7 +13212,7 @@ var init_format_usage = __esm({
|
|
|
13210
13212
|
}
|
|
13211
13213
|
});
|
|
13212
13214
|
|
|
13213
|
-
// src/tui/components/banner.tsx
|
|
13215
|
+
// packages/cli/src/tui/components/banner.tsx
|
|
13214
13216
|
import { Box, Text } from "ink";
|
|
13215
13217
|
import { jsx } from "react/jsx-runtime";
|
|
13216
13218
|
function Banner() {
|
|
@@ -13218,7 +13220,7 @@ function Banner() {
|
|
|
13218
13220
|
}
|
|
13219
13221
|
var LINES, COLORS;
|
|
13220
13222
|
var init_banner = __esm({
|
|
13221
|
-
"src/tui/components/banner.tsx"() {
|
|
13223
|
+
"packages/cli/src/tui/components/banner.tsx"() {
|
|
13222
13224
|
"use strict";
|
|
13223
13225
|
LINES = [
|
|
13224
13226
|
" \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ",
|
|
@@ -13232,7 +13234,7 @@ var init_banner = __esm({
|
|
|
13232
13234
|
}
|
|
13233
13235
|
});
|
|
13234
13236
|
|
|
13235
|
-
// src/tui/components/messages.tsx
|
|
13237
|
+
// packages/cli/src/tui/components/messages.tsx
|
|
13236
13238
|
import { Box as Box2, Static, Text as Text2 } from "ink";
|
|
13237
13239
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
13238
13240
|
function Messages({ blocks }) {
|
|
@@ -13290,7 +13292,7 @@ function Block({ block }) {
|
|
|
13290
13292
|
}
|
|
13291
13293
|
var BANNER_ID;
|
|
13292
13294
|
var init_messages = __esm({
|
|
13293
|
-
"src/tui/components/messages.tsx"() {
|
|
13295
|
+
"packages/cli/src/tui/components/messages.tsx"() {
|
|
13294
13296
|
"use strict";
|
|
13295
13297
|
init_format_usage();
|
|
13296
13298
|
init_banner();
|
|
@@ -13298,7 +13300,7 @@ var init_messages = __esm({
|
|
|
13298
13300
|
}
|
|
13299
13301
|
});
|
|
13300
13302
|
|
|
13301
|
-
// src/tui/components/streaming.tsx
|
|
13303
|
+
// packages/cli/src/tui/components/streaming.tsx
|
|
13302
13304
|
import { useEffect, useState } from "react";
|
|
13303
13305
|
import { Box as Box3, Text as Text3 } from "ink";
|
|
13304
13306
|
import Spinner from "ink-spinner";
|
|
@@ -13347,12 +13349,12 @@ function Streaming({ spinnerLabel, liveText, liveThinking, activeSubs, turnStart
|
|
|
13347
13349
|
] });
|
|
13348
13350
|
}
|
|
13349
13351
|
var init_streaming = __esm({
|
|
13350
|
-
"src/tui/components/streaming.tsx"() {
|
|
13352
|
+
"packages/cli/src/tui/components/streaming.tsx"() {
|
|
13351
13353
|
"use strict";
|
|
13352
13354
|
}
|
|
13353
13355
|
});
|
|
13354
13356
|
|
|
13355
|
-
// src/tui/history.ts
|
|
13357
|
+
// packages/cli/src/tui/history.ts
|
|
13356
13358
|
import fs25 from "node:fs";
|
|
13357
13359
|
import path29 from "node:path";
|
|
13358
13360
|
import os2 from "node:os";
|
|
@@ -13378,14 +13380,14 @@ function appendHistory(entry) {
|
|
|
13378
13380
|
}
|
|
13379
13381
|
var HISTORY_FILE, MAX_ENTRIES;
|
|
13380
13382
|
var init_history = __esm({
|
|
13381
|
-
"src/tui/history.ts"() {
|
|
13383
|
+
"packages/cli/src/tui/history.ts"() {
|
|
13382
13384
|
"use strict";
|
|
13383
13385
|
HISTORY_FILE = path29.join(os2.homedir(), ".halo", "global", "tui-history.json");
|
|
13384
13386
|
MAX_ENTRIES = 100;
|
|
13385
13387
|
}
|
|
13386
13388
|
});
|
|
13387
13389
|
|
|
13388
|
-
// src/tui/components/status-bar.tsx
|
|
13390
|
+
// packages/cli/src/tui/components/status-bar.tsx
|
|
13389
13391
|
import { Box as Box4, Text as Text4 } from "ink";
|
|
13390
13392
|
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13391
13393
|
function shortModel(modelId) {
|
|
@@ -13421,12 +13423,12 @@ function StatusBar({ agentName, modelId, contextPercent, workspace, sessionId, v
|
|
|
13421
13423
|
] });
|
|
13422
13424
|
}
|
|
13423
13425
|
var init_status_bar = __esm({
|
|
13424
|
-
"src/tui/components/status-bar.tsx"() {
|
|
13426
|
+
"packages/cli/src/tui/components/status-bar.tsx"() {
|
|
13425
13427
|
"use strict";
|
|
13426
13428
|
}
|
|
13427
13429
|
});
|
|
13428
13430
|
|
|
13429
|
-
// src/tui/components/slash-suggest.tsx
|
|
13431
|
+
// packages/cli/src/tui/components/slash-suggest.tsx
|
|
13430
13432
|
import { Box as Box5, Text as Text5 } from "ink";
|
|
13431
13433
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13432
13434
|
function SlashSuggest({ items, selectedIdx, maxWidth = 80 }) {
|
|
@@ -13453,12 +13455,12 @@ function SlashSuggest({ items, selectedIdx, maxWidth = 80 }) {
|
|
|
13453
13455
|
] });
|
|
13454
13456
|
}
|
|
13455
13457
|
var init_slash_suggest = __esm({
|
|
13456
|
-
"src/tui/components/slash-suggest.tsx"() {
|
|
13458
|
+
"packages/cli/src/tui/components/slash-suggest.tsx"() {
|
|
13457
13459
|
"use strict";
|
|
13458
13460
|
}
|
|
13459
13461
|
});
|
|
13460
13462
|
|
|
13461
|
-
// src/tui/components/path-suggest.tsx
|
|
13463
|
+
// packages/cli/src/tui/components/path-suggest.tsx
|
|
13462
13464
|
import { Box as Box6, Text as Text6 } from "ink";
|
|
13463
13465
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13464
13466
|
function PathSuggest({ items, selectedIdx, cwdLabel }) {
|
|
@@ -13485,12 +13487,12 @@ function PathSuggest({ items, selectedIdx, cwdLabel }) {
|
|
|
13485
13487
|
] });
|
|
13486
13488
|
}
|
|
13487
13489
|
var init_path_suggest = __esm({
|
|
13488
|
-
"src/tui/components/path-suggest.tsx"() {
|
|
13490
|
+
"packages/cli/src/tui/components/path-suggest.tsx"() {
|
|
13489
13491
|
"use strict";
|
|
13490
13492
|
}
|
|
13491
13493
|
});
|
|
13492
13494
|
|
|
13493
|
-
// src/tui/path-suggest-engine.ts
|
|
13495
|
+
// packages/cli/src/tui/path-suggest-engine.ts
|
|
13494
13496
|
import fs26 from "node:fs";
|
|
13495
13497
|
import path30 from "node:path";
|
|
13496
13498
|
function detectActiveRef(value) {
|
|
@@ -13577,13 +13579,13 @@ function applyPathPick(value, ref, pick) {
|
|
|
13577
13579
|
}
|
|
13578
13580
|
var IMAGE_EXTS2;
|
|
13579
13581
|
var init_path_suggest_engine = __esm({
|
|
13580
|
-
"src/tui/path-suggest-engine.ts"() {
|
|
13582
|
+
"packages/cli/src/tui/path-suggest-engine.ts"() {
|
|
13581
13583
|
"use strict";
|
|
13582
13584
|
IMAGE_EXTS2 = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".bmp"]);
|
|
13583
13585
|
}
|
|
13584
13586
|
});
|
|
13585
13587
|
|
|
13586
|
-
// src/tui/line-editor.ts
|
|
13588
|
+
// packages/cli/src/tui/line-editor.ts
|
|
13587
13589
|
function toGraphemes(s) {
|
|
13588
13590
|
if (s === "") return [];
|
|
13589
13591
|
return [...segmenter.segment(s)].map((seg) => seg.segment);
|
|
@@ -13637,13 +13639,13 @@ function deleteToEnd(e) {
|
|
|
13637
13639
|
}
|
|
13638
13640
|
var segmenter;
|
|
13639
13641
|
var init_line_editor = __esm({
|
|
13640
|
-
"src/tui/line-editor.ts"() {
|
|
13642
|
+
"packages/cli/src/tui/line-editor.ts"() {
|
|
13641
13643
|
"use strict";
|
|
13642
13644
|
segmenter = new Intl.Segmenter();
|
|
13643
13645
|
}
|
|
13644
13646
|
});
|
|
13645
13647
|
|
|
13646
|
-
// src/tui/components/text-input.tsx
|
|
13648
|
+
// packages/cli/src/tui/components/text-input.tsx
|
|
13647
13649
|
import { Text as Text7 } from "ink";
|
|
13648
13650
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13649
13651
|
function TextInputView({ value, cursor, placeholder }) {
|
|
@@ -13668,13 +13670,13 @@ function TextInputView({ value, cursor, placeholder }) {
|
|
|
13668
13670
|
] });
|
|
13669
13671
|
}
|
|
13670
13672
|
var init_text_input = __esm({
|
|
13671
|
-
"src/tui/components/text-input.tsx"() {
|
|
13673
|
+
"packages/cli/src/tui/components/text-input.tsx"() {
|
|
13672
13674
|
"use strict";
|
|
13673
13675
|
init_line_editor();
|
|
13674
13676
|
}
|
|
13675
13677
|
});
|
|
13676
13678
|
|
|
13677
|
-
// src/tui/components/input-box.tsx
|
|
13679
|
+
// packages/cli/src/tui/components/input-box.tsx
|
|
13678
13680
|
import { useState as useState2, useEffect as useEffect2, useMemo, useRef } from "react";
|
|
13679
13681
|
import { Box as Box7, Text as Text8, useInput, usePaste } from "ink";
|
|
13680
13682
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -13921,7 +13923,7 @@ function InputBox({ enabled, placeholder, history, onSubmit, hint, commands = []
|
|
|
13921
13923
|
] });
|
|
13922
13924
|
}
|
|
13923
13925
|
var init_input_box = __esm({
|
|
13924
|
-
"src/tui/components/input-box.tsx"() {
|
|
13926
|
+
"packages/cli/src/tui/components/input-box.tsx"() {
|
|
13925
13927
|
"use strict";
|
|
13926
13928
|
init_slash_suggest();
|
|
13927
13929
|
init_path_suggest();
|
|
@@ -13931,7 +13933,7 @@ var init_input_box = __esm({
|
|
|
13931
13933
|
}
|
|
13932
13934
|
});
|
|
13933
13935
|
|
|
13934
|
-
// src/tui/components/log-navigator.tsx
|
|
13936
|
+
// packages/cli/src/tui/components/log-navigator.tsx
|
|
13935
13937
|
import { useState as useState3, useMemo as useMemo2, useEffect as useEffect3 } from "react";
|
|
13936
13938
|
import { Box as Box8, Text as Text9, useInput as useInput2 } from "ink";
|
|
13937
13939
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
@@ -14010,12 +14012,12 @@ function LogNavigator({ tree, onPick, onCancel }) {
|
|
|
14010
14012
|
] });
|
|
14011
14013
|
}
|
|
14012
14014
|
var init_log_navigator = __esm({
|
|
14013
|
-
"src/tui/components/log-navigator.tsx"() {
|
|
14015
|
+
"packages/cli/src/tui/components/log-navigator.tsx"() {
|
|
14014
14016
|
"use strict";
|
|
14015
14017
|
}
|
|
14016
14018
|
});
|
|
14017
14019
|
|
|
14018
|
-
// src/tui/components/log-viewer.tsx
|
|
14020
|
+
// packages/cli/src/tui/components/log-viewer.tsx
|
|
14019
14021
|
import { useState as useState4, useMemo as useMemo3, useEffect as useEffect4, useRef as useRef2 } from "react";
|
|
14020
14022
|
import { Box as Box9, Text as Text10, useInput as useInput3, useStdout } from "ink";
|
|
14021
14023
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -14099,13 +14101,13 @@ function truncateForCols(s, cols) {
|
|
|
14099
14101
|
}
|
|
14100
14102
|
var ANSI_RE;
|
|
14101
14103
|
var init_log_viewer = __esm({
|
|
14102
|
-
"src/tui/components/log-viewer.tsx"() {
|
|
14104
|
+
"packages/cli/src/tui/components/log-viewer.tsx"() {
|
|
14103
14105
|
"use strict";
|
|
14104
14106
|
ANSI_RE = /\x1b\[[0-9;]*m/g;
|
|
14105
14107
|
}
|
|
14106
14108
|
});
|
|
14107
14109
|
|
|
14108
|
-
// src/tui/app.tsx
|
|
14110
|
+
// packages/cli/src/tui/app.tsx
|
|
14109
14111
|
import { useEffect as useEffect5, useMemo as useMemo4, useReducer, useState as useState5, useRef as useRef3 } from "react";
|
|
14110
14112
|
import { Box as Box10, useApp, useInput as useInput4 } from "ink";
|
|
14111
14113
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
@@ -14813,7 +14815,7 @@ ${lines.join("\n")}` });
|
|
|
14813
14815
|
}
|
|
14814
14816
|
var MAX_CONTEXT_TOKENS_FALLBACK, blockSeq, ANSI2;
|
|
14815
14817
|
var init_app = __esm({
|
|
14816
|
-
"src/tui/app.tsx"() {
|
|
14818
|
+
"packages/cli/src/tui/app.tsx"() {
|
|
14817
14819
|
"use strict";
|
|
14818
14820
|
init_render_md();
|
|
14819
14821
|
init_resolve_refs();
|
|
@@ -14840,7 +14842,7 @@ var init_app = __esm({
|
|
|
14840
14842
|
}
|
|
14841
14843
|
});
|
|
14842
14844
|
|
|
14843
|
-
// src/tui.tsx
|
|
14845
|
+
// packages/cli/src/tui.tsx
|
|
14844
14846
|
var tui_exports = {};
|
|
14845
14847
|
__export(tui_exports, {
|
|
14846
14848
|
runTui: () => runTui
|
|
@@ -14855,13 +14857,13 @@ async function runTui(harness, opts = {}) {
|
|
|
14855
14857
|
await instance.waitUntilExit();
|
|
14856
14858
|
}
|
|
14857
14859
|
var init_tui = __esm({
|
|
14858
|
-
"src/tui.tsx"() {
|
|
14860
|
+
"packages/cli/src/tui.tsx"() {
|
|
14859
14861
|
"use strict";
|
|
14860
14862
|
init_app();
|
|
14861
14863
|
}
|
|
14862
14864
|
});
|
|
14863
14865
|
|
|
14864
|
-
// src/cli.ts
|
|
14866
|
+
// packages/cli/src/cli.ts
|
|
14865
14867
|
var cli_exports = {};
|
|
14866
14868
|
__export(cli_exports, {
|
|
14867
14869
|
runCli: () => runCli
|
|
@@ -15043,7 +15045,7 @@ ${tag}${formatUsageLine(event)}
|
|
|
15043
15045
|
return errorText ? 1 : 0;
|
|
15044
15046
|
}
|
|
15045
15047
|
var init_cli = __esm({
|
|
15046
|
-
"src/cli.ts"() {
|
|
15048
|
+
"packages/cli/src/cli.ts"() {
|
|
15047
15049
|
"use strict";
|
|
15048
15050
|
init_render_md();
|
|
15049
15051
|
init_resolve_refs();
|
|
@@ -15051,13 +15053,13 @@ var init_cli = __esm({
|
|
|
15051
15053
|
}
|
|
15052
15054
|
});
|
|
15053
15055
|
|
|
15054
|
-
//
|
|
15056
|
+
// packages/core/dist/workspace/workspace.js
|
|
15055
15057
|
import { readFile, writeFile, mkdir, readdir, access } from "node:fs/promises";
|
|
15056
15058
|
import { realpathSync as realpathSync2 } from "node:fs";
|
|
15057
15059
|
import { resolve, relative, join, isAbsolute, sep } from "node:path";
|
|
15058
15060
|
var WorkspaceError, SKIP_DIRS2, Workspace;
|
|
15059
15061
|
var init_workspace = __esm({
|
|
15060
|
-
"
|
|
15062
|
+
"packages/core/dist/workspace/workspace.js"() {
|
|
15061
15063
|
"use strict";
|
|
15062
15064
|
WorkspaceError = class extends Error {
|
|
15063
15065
|
constructor(message) {
|
|
@@ -15166,13 +15168,13 @@ None yet.
|
|
|
15166
15168
|
}
|
|
15167
15169
|
});
|
|
15168
15170
|
|
|
15169
|
-
//
|
|
15171
|
+
// packages/core/dist/workspace/git-manager.js
|
|
15170
15172
|
import path31 from "node:path";
|
|
15171
15173
|
import { promises as fs27 } from "node:fs";
|
|
15172
15174
|
import simpleGit from "simple-git";
|
|
15173
15175
|
var GitManagerError, GitManager;
|
|
15174
15176
|
var init_git_manager = __esm({
|
|
15175
|
-
"
|
|
15177
|
+
"packages/core/dist/workspace/git-manager.js"() {
|
|
15176
15178
|
"use strict";
|
|
15177
15179
|
GitManagerError = class extends Error {
|
|
15178
15180
|
constructor(message) {
|
|
@@ -15539,16 +15541,16 @@ var init_git_manager = __esm({
|
|
|
15539
15541
|
}
|
|
15540
15542
|
});
|
|
15541
15543
|
|
|
15542
|
-
//
|
|
15544
|
+
// packages/core/dist/index.js
|
|
15543
15545
|
var init_dist = __esm({
|
|
15544
|
-
"
|
|
15546
|
+
"packages/core/dist/index.js"() {
|
|
15545
15547
|
"use strict";
|
|
15546
15548
|
init_workspace();
|
|
15547
15549
|
init_git_manager();
|
|
15548
15550
|
}
|
|
15549
15551
|
});
|
|
15550
15552
|
|
|
15551
|
-
//
|
|
15553
|
+
// packages/server/dist/channels/shared/media.js
|
|
15552
15554
|
import path32 from "node:path";
|
|
15553
15555
|
import os3 from "node:os";
|
|
15554
15556
|
function tempDir() {
|
|
@@ -15571,7 +15573,7 @@ function classifyMedia(filePath) {
|
|
|
15571
15573
|
}
|
|
15572
15574
|
var IMAGE_EXTS3, VIDEO_EXTS, VOICE_EXTS;
|
|
15573
15575
|
var init_media = __esm({
|
|
15574
|
-
"
|
|
15576
|
+
"packages/server/dist/channels/shared/media.js"() {
|
|
15575
15577
|
"use strict";
|
|
15576
15578
|
IMAGE_EXTS3 = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"]);
|
|
15577
15579
|
VIDEO_EXTS = /* @__PURE__ */ new Set([".mp4", ".mov", ".m4v", ".webm", ".avi"]);
|
|
@@ -15579,7 +15581,7 @@ var init_media = __esm({
|
|
|
15579
15581
|
}
|
|
15580
15582
|
});
|
|
15581
15583
|
|
|
15582
|
-
//
|
|
15584
|
+
// packages/server/dist/routes/files.js
|
|
15583
15585
|
import { Hono } from "hono";
|
|
15584
15586
|
import fs28 from "node:fs/promises";
|
|
15585
15587
|
import { createReadStream } from "node:fs";
|
|
@@ -16171,14 +16173,14 @@ function createFileRoutes() {
|
|
|
16171
16173
|
return app2;
|
|
16172
16174
|
}
|
|
16173
16175
|
var init_files = __esm({
|
|
16174
|
-
"
|
|
16176
|
+
"packages/server/dist/routes/files.js"() {
|
|
16175
16177
|
"use strict";
|
|
16176
16178
|
init_dist();
|
|
16177
16179
|
init_media();
|
|
16178
16180
|
}
|
|
16179
16181
|
});
|
|
16180
16182
|
|
|
16181
|
-
//
|
|
16183
|
+
// packages/server/dist/git-credentials.js
|
|
16182
16184
|
import fs29 from "node:fs";
|
|
16183
16185
|
import path34 from "node:path";
|
|
16184
16186
|
import { homedir as homedir16 } from "node:os";
|
|
@@ -16253,13 +16255,13 @@ function deleteGitCredential(host) {
|
|
|
16253
16255
|
}
|
|
16254
16256
|
var GIT_CREDENTIALS_PATH;
|
|
16255
16257
|
var init_git_credentials = __esm({
|
|
16256
|
-
"
|
|
16258
|
+
"packages/server/dist/git-credentials.js"() {
|
|
16257
16259
|
"use strict";
|
|
16258
16260
|
GIT_CREDENTIALS_PATH = path34.join(homedir16(), ".git-credentials");
|
|
16259
16261
|
}
|
|
16260
16262
|
});
|
|
16261
16263
|
|
|
16262
|
-
//
|
|
16264
|
+
// packages/server/dist/git-ssh.js
|
|
16263
16265
|
import fs30 from "node:fs";
|
|
16264
16266
|
import os4 from "node:os";
|
|
16265
16267
|
import path35 from "node:path";
|
|
@@ -16436,7 +16438,7 @@ function getRemoteProtocol(projectRoot) {
|
|
|
16436
16438
|
}
|
|
16437
16439
|
var SSH_DIR, NON_KEY_NAMES, ownedAgentPid, ASKPASS_SCRIPT;
|
|
16438
16440
|
var init_git_ssh = __esm({
|
|
16439
|
-
"
|
|
16441
|
+
"packages/server/dist/git-ssh.js"() {
|
|
16440
16442
|
"use strict";
|
|
16441
16443
|
SSH_DIR = path35.join(os4.homedir(), ".ssh");
|
|
16442
16444
|
NON_KEY_NAMES = /* @__PURE__ */ new Set(["known_hosts", "known_hosts2", "authorized_keys", "config"]);
|
|
@@ -16449,7 +16451,7 @@ printf '%s\\n' "$HALO_SSH_PASSPHRASE"
|
|
|
16449
16451
|
}
|
|
16450
16452
|
});
|
|
16451
16453
|
|
|
16452
|
-
//
|
|
16454
|
+
// packages/server/dist/routes/git.js
|
|
16453
16455
|
import { Hono as Hono2 } from "hono";
|
|
16454
16456
|
import fs31 from "node:fs/promises";
|
|
16455
16457
|
import os5 from "node:os";
|
|
@@ -16803,7 +16805,7 @@ function createGitRoutes() {
|
|
|
16803
16805
|
return app2;
|
|
16804
16806
|
}
|
|
16805
16807
|
var init_git = __esm({
|
|
16806
|
-
"
|
|
16808
|
+
"packages/server/dist/routes/git.js"() {
|
|
16807
16809
|
"use strict";
|
|
16808
16810
|
init_dist();
|
|
16809
16811
|
init_git_credentials();
|
|
@@ -16812,7 +16814,7 @@ var init_git = __esm({
|
|
|
16812
16814
|
}
|
|
16813
16815
|
});
|
|
16814
16816
|
|
|
16815
|
-
//
|
|
16817
|
+
// packages/server/dist/routes/agent-configs.js
|
|
16816
16818
|
import { Hono as Hono3 } from "hono";
|
|
16817
16819
|
import fs32 from "node:fs/promises";
|
|
16818
16820
|
import path37 from "node:path";
|
|
@@ -17305,7 +17307,7 @@ ${body.description ?? ""}
|
|
|
17305
17307
|
}
|
|
17306
17308
|
var _cachedTools, GLOBAL_AGENTS_DIR4, FALLBACK_SCAFFOLD_PROVIDER, _yamlCache;
|
|
17307
17309
|
var init_agent_configs = __esm({
|
|
17308
|
-
"
|
|
17310
|
+
"packages/server/dist/routes/agent-configs.js"() {
|
|
17309
17311
|
"use strict";
|
|
17310
17312
|
init_workspace_tools();
|
|
17311
17313
|
init_draft_tool();
|
|
@@ -17319,7 +17321,7 @@ var init_agent_configs = __esm({
|
|
|
17319
17321
|
}
|
|
17320
17322
|
});
|
|
17321
17323
|
|
|
17322
|
-
//
|
|
17324
|
+
// packages/server/dist/routes/skills.js
|
|
17323
17325
|
import { Hono as Hono4 } from "hono";
|
|
17324
17326
|
import fs33 from "node:fs/promises";
|
|
17325
17327
|
import path38 from "node:path";
|
|
@@ -17517,7 +17519,7 @@ function createSkillRoutes() {
|
|
|
17517
17519
|
}
|
|
17518
17520
|
var GLOBAL_SETTINGS_PATH, _skillMdCache;
|
|
17519
17521
|
var init_skills = __esm({
|
|
17520
|
-
"
|
|
17522
|
+
"packages/server/dist/routes/skills.js"() {
|
|
17521
17523
|
"use strict";
|
|
17522
17524
|
init_agent_loader();
|
|
17523
17525
|
init_db();
|
|
@@ -17526,7 +17528,7 @@ var init_skills = __esm({
|
|
|
17526
17528
|
}
|
|
17527
17529
|
});
|
|
17528
17530
|
|
|
17529
|
-
//
|
|
17531
|
+
// packages/server/dist/routes/settings.js
|
|
17530
17532
|
import { Hono as Hono5 } from "hono";
|
|
17531
17533
|
import fs34 from "node:fs/promises";
|
|
17532
17534
|
import path39 from "node:path";
|
|
@@ -17779,7 +17781,7 @@ function createSettingsRoutes() {
|
|
|
17779
17781
|
}
|
|
17780
17782
|
var GLOBAL_SETTINGS_PATH2, _changeListeners;
|
|
17781
17783
|
var init_settings = __esm({
|
|
17782
|
-
"
|
|
17784
|
+
"packages/server/dist/routes/settings.js"() {
|
|
17783
17785
|
"use strict";
|
|
17784
17786
|
init_settings_schema();
|
|
17785
17787
|
GLOBAL_SETTINGS_PATH2 = path39.join(homedir19(), ".halo", "secrets", "settings.yaml");
|
|
@@ -17787,7 +17789,7 @@ var init_settings = __esm({
|
|
|
17787
17789
|
}
|
|
17788
17790
|
});
|
|
17789
17791
|
|
|
17790
|
-
//
|
|
17792
|
+
// packages/server/dist/paths.js
|
|
17791
17793
|
import path40 from "node:path";
|
|
17792
17794
|
import { homedir as homedir20 } from "node:os";
|
|
17793
17795
|
function haloHome() {
|
|
@@ -17818,12 +17820,12 @@ function evoApplyLogFile(applyId) {
|
|
|
17818
17820
|
return path40.join(evoLogsDir(), `apply-${applyId}.log`);
|
|
17819
17821
|
}
|
|
17820
17822
|
var init_paths = __esm({
|
|
17821
|
-
"
|
|
17823
|
+
"packages/server/dist/paths.js"() {
|
|
17822
17824
|
"use strict";
|
|
17823
17825
|
}
|
|
17824
17826
|
});
|
|
17825
17827
|
|
|
17826
|
-
//
|
|
17828
|
+
// packages/server/dist/evolution/archive.js
|
|
17827
17829
|
import fs35 from "node:fs";
|
|
17828
17830
|
import path41 from "node:path";
|
|
17829
17831
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
@@ -17967,7 +17969,7 @@ function stopArchiveDaemon() {
|
|
|
17967
17969
|
}
|
|
17968
17970
|
var TERMINAL_RUN_STATUSES, TERMINAL_APPLY_STATUSES, DAY_MS, ARCHIVE_AFTER_MS, PURGE_AFTER_MS, _archiveTimer;
|
|
17969
17971
|
var init_archive = __esm({
|
|
17970
|
-
"
|
|
17972
|
+
"packages/server/dist/evolution/archive.js"() {
|
|
17971
17973
|
"use strict";
|
|
17972
17974
|
init_evo_db();
|
|
17973
17975
|
init_paths();
|
|
@@ -17980,7 +17982,7 @@ var init_archive = __esm({
|
|
|
17980
17982
|
}
|
|
17981
17983
|
});
|
|
17982
17984
|
|
|
17983
|
-
//
|
|
17985
|
+
// packages/server/dist/routes/evolution.js
|
|
17984
17986
|
import { Hono as Hono6 } from "hono";
|
|
17985
17987
|
import { eq as eq8, desc as desc2, asc, inArray as inArray2, lt as lt3, and as and6, or, sql } from "drizzle-orm";
|
|
17986
17988
|
import fs36 from "node:fs/promises";
|
|
@@ -18240,7 +18242,7 @@ function extractText(content) {
|
|
|
18240
18242
|
}
|
|
18241
18243
|
var UNDELETABLE_RUN_STATUSES;
|
|
18242
18244
|
var init_evolution = __esm({
|
|
18243
|
-
"
|
|
18245
|
+
"packages/server/dist/routes/evolution.js"() {
|
|
18244
18246
|
"use strict";
|
|
18245
18247
|
init_evo_db();
|
|
18246
18248
|
init_archive();
|
|
@@ -18249,7 +18251,7 @@ var init_evolution = __esm({
|
|
|
18249
18251
|
}
|
|
18250
18252
|
});
|
|
18251
18253
|
|
|
18252
|
-
//
|
|
18254
|
+
// packages/server/dist/routes/sessions.js
|
|
18253
18255
|
import { Hono as Hono7 } from "hono";
|
|
18254
18256
|
import { eq as eq9, desc as desc3 } from "drizzle-orm";
|
|
18255
18257
|
function rawId() {
|
|
@@ -18535,7 +18537,7 @@ function createSessionRoutes(smRegistry) {
|
|
|
18535
18537
|
}
|
|
18536
18538
|
var msgCounter2;
|
|
18537
18539
|
var init_sessions = __esm({
|
|
18538
|
-
"
|
|
18540
|
+
"packages/server/dist/routes/sessions.js"() {
|
|
18539
18541
|
"use strict";
|
|
18540
18542
|
init_db();
|
|
18541
18543
|
init_schema();
|
|
@@ -18546,7 +18548,7 @@ var init_sessions = __esm({
|
|
|
18546
18548
|
}
|
|
18547
18549
|
});
|
|
18548
18550
|
|
|
18549
|
-
//
|
|
18551
|
+
// packages/server/dist/db/channel-db.js
|
|
18550
18552
|
import Database3 from "better-sqlite3";
|
|
18551
18553
|
import { drizzle as drizzle3 } from "drizzle-orm/better-sqlite3";
|
|
18552
18554
|
import { sqliteTable as sqliteTable3, text as text3, integer as integer3 } from "drizzle-orm/sqlite-core";
|
|
@@ -18571,7 +18573,7 @@ function getChannelDb() {
|
|
|
18571
18573
|
}
|
|
18572
18574
|
var channelAccounts, CREATE_SQL2, _channelDb;
|
|
18573
18575
|
var init_channel_db = __esm({
|
|
18574
|
-
"
|
|
18576
|
+
"packages/server/dist/db/channel-db.js"() {
|
|
18575
18577
|
"use strict";
|
|
18576
18578
|
channelAccounts = sqliteTable3("channel_accounts", {
|
|
18577
18579
|
accountId: text3("account_id").primaryKey(),
|
|
@@ -18604,7 +18606,7 @@ CREATE INDEX IF NOT EXISTS idx_channel_accounts_type ON channel_accounts(channel
|
|
|
18604
18606
|
}
|
|
18605
18607
|
});
|
|
18606
18608
|
|
|
18607
|
-
//
|
|
18609
|
+
// packages/server/dist/channels/shared/accounts.js
|
|
18608
18610
|
import fs38 from "node:fs";
|
|
18609
18611
|
import { eq as eq10, and as and7 } from "drizzle-orm";
|
|
18610
18612
|
function resolveAccountWorkspace(account) {
|
|
@@ -18696,7 +18698,7 @@ function deleteAccount(db, accountId) {
|
|
|
18696
18698
|
}
|
|
18697
18699
|
var _lastActiveChatCache;
|
|
18698
18700
|
var init_accounts = __esm({
|
|
18699
|
-
"
|
|
18701
|
+
"packages/server/dist/channels/shared/accounts.js"() {
|
|
18700
18702
|
"use strict";
|
|
18701
18703
|
init_channel_db();
|
|
18702
18704
|
init_init();
|
|
@@ -18704,7 +18706,7 @@ var init_accounts = __esm({
|
|
|
18704
18706
|
}
|
|
18705
18707
|
});
|
|
18706
18708
|
|
|
18707
|
-
//
|
|
18709
|
+
// packages/server/dist/channels/web/accounts.js
|
|
18708
18710
|
function toWeb(a) {
|
|
18709
18711
|
const c = a.config;
|
|
18710
18712
|
return {
|
|
@@ -18767,14 +18769,14 @@ function deleteAccount2(db, accountId) {
|
|
|
18767
18769
|
}
|
|
18768
18770
|
var CH;
|
|
18769
18771
|
var init_accounts2 = __esm({
|
|
18770
|
-
"
|
|
18772
|
+
"packages/server/dist/channels/web/accounts.js"() {
|
|
18771
18773
|
"use strict";
|
|
18772
18774
|
init_accounts();
|
|
18773
18775
|
CH = "web";
|
|
18774
18776
|
}
|
|
18775
18777
|
});
|
|
18776
18778
|
|
|
18777
|
-
//
|
|
18779
|
+
// packages/server/dist/middleware/brute-force.js
|
|
18778
18780
|
import { getConnInfo } from "@hono/node-server/conninfo";
|
|
18779
18781
|
function bucket(name) {
|
|
18780
18782
|
let b = buckets.get(name);
|
|
@@ -18825,7 +18827,7 @@ function clearFailures(bucketName, ip) {
|
|
|
18825
18827
|
}
|
|
18826
18828
|
var MAX_ATTEMPTS, LOCKOUT_MS, buckets;
|
|
18827
18829
|
var init_brute_force = __esm({
|
|
18828
|
-
"
|
|
18830
|
+
"packages/server/dist/middleware/brute-force.js"() {
|
|
18829
18831
|
"use strict";
|
|
18830
18832
|
init_config();
|
|
18831
18833
|
MAX_ATTEMPTS = 5;
|
|
@@ -18834,7 +18836,7 @@ var init_brute_force = __esm({
|
|
|
18834
18836
|
}
|
|
18835
18837
|
});
|
|
18836
18838
|
|
|
18837
|
-
//
|
|
18839
|
+
// packages/server/dist/routes/show.js
|
|
18838
18840
|
import { Hono as Hono8 } from "hono";
|
|
18839
18841
|
import fs39 from "node:fs";
|
|
18840
18842
|
import path44 from "node:path";
|
|
@@ -19232,7 +19234,7 @@ function createShowRoutes(registry2) {
|
|
|
19232
19234
|
}
|
|
19233
19235
|
var TOKEN_BUCKET, SESSIONS_PER_WS, _skillCache, _metaCache, _roReaders, SESSION_LOG_MAX_MSGS, _birthCache;
|
|
19234
19236
|
var init_show = __esm({
|
|
19235
|
-
"
|
|
19237
|
+
"packages/server/dist/routes/show.js"() {
|
|
19236
19238
|
"use strict";
|
|
19237
19239
|
init_channel_db();
|
|
19238
19240
|
init_accounts2();
|
|
@@ -19249,7 +19251,7 @@ var init_show = __esm({
|
|
|
19249
19251
|
}
|
|
19250
19252
|
});
|
|
19251
19253
|
|
|
19252
|
-
//
|
|
19254
|
+
// packages/server/dist/routes/metrics.js
|
|
19253
19255
|
import { Hono as Hono9 } from "hono";
|
|
19254
19256
|
import fs40 from "node:fs";
|
|
19255
19257
|
function family(name, type, help, samples) {
|
|
@@ -19354,7 +19356,7 @@ function createMetricsRoutes(registry2) {
|
|
|
19354
19356
|
}
|
|
19355
19357
|
var TOKEN_BUCKET2, SESSIONS_PER_WS2;
|
|
19356
19358
|
var init_metrics = __esm({
|
|
19357
|
-
"
|
|
19359
|
+
"packages/server/dist/routes/metrics.js"() {
|
|
19358
19360
|
"use strict";
|
|
19359
19361
|
init_channel_db();
|
|
19360
19362
|
init_accounts2();
|
|
@@ -19365,7 +19367,7 @@ var init_metrics = __esm({
|
|
|
19365
19367
|
}
|
|
19366
19368
|
});
|
|
19367
19369
|
|
|
19368
|
-
//
|
|
19370
|
+
// packages/server/dist/routes/commands.js
|
|
19369
19371
|
import { Hono as Hono10 } from "hono";
|
|
19370
19372
|
function createCommandRoutes(registry2, smRegistry) {
|
|
19371
19373
|
const app2 = new Hono10();
|
|
@@ -19390,12 +19392,12 @@ function createCommandRoutes(registry2, smRegistry) {
|
|
|
19390
19392
|
return app2;
|
|
19391
19393
|
}
|
|
19392
19394
|
var init_commands3 = __esm({
|
|
19393
|
-
"
|
|
19395
|
+
"packages/server/dist/routes/commands.js"() {
|
|
19394
19396
|
"use strict";
|
|
19395
19397
|
}
|
|
19396
19398
|
});
|
|
19397
19399
|
|
|
19398
|
-
//
|
|
19400
|
+
// packages/server/dist/sessions/session-types.js
|
|
19399
19401
|
function inferMessageType(msg) {
|
|
19400
19402
|
if (msg.type)
|
|
19401
19403
|
return msg.type;
|
|
@@ -19414,12 +19416,12 @@ function inferMessageType(msg) {
|
|
|
19414
19416
|
return "notification";
|
|
19415
19417
|
}
|
|
19416
19418
|
var init_session_types = __esm({
|
|
19417
|
-
"
|
|
19419
|
+
"packages/server/dist/sessions/session-types.js"() {
|
|
19418
19420
|
"use strict";
|
|
19419
19421
|
}
|
|
19420
19422
|
});
|
|
19421
19423
|
|
|
19422
|
-
//
|
|
19424
|
+
// packages/server/dist/routes/agentcore.js
|
|
19423
19425
|
import { Hono as Hono11 } from "hono";
|
|
19424
19426
|
import path45 from "node:path";
|
|
19425
19427
|
import fs41 from "node:fs";
|
|
@@ -19669,7 +19671,7 @@ ${text5}`);
|
|
|
19669
19671
|
}
|
|
19670
19672
|
var SESSION_HEADER, activeOverrides;
|
|
19671
19673
|
var init_agentcore = __esm({
|
|
19672
|
-
"
|
|
19674
|
+
"packages/server/dist/routes/agentcore.js"() {
|
|
19673
19675
|
"use strict";
|
|
19674
19676
|
init_commands2();
|
|
19675
19677
|
init_ui_log_builder();
|
|
@@ -19679,7 +19681,7 @@ var init_agentcore = __esm({
|
|
|
19679
19681
|
}
|
|
19680
19682
|
});
|
|
19681
19683
|
|
|
19682
|
-
//
|
|
19684
|
+
// packages/server/dist/ws/file-watcher.js
|
|
19683
19685
|
import fs42 from "node:fs";
|
|
19684
19686
|
import path46 from "node:path";
|
|
19685
19687
|
function enqueueNativeOp(op) {
|
|
@@ -19701,7 +19703,7 @@ function isUnwatchablePath(absPath) {
|
|
|
19701
19703
|
}
|
|
19702
19704
|
var IGNORED_SEGMENTS, IS_WIN32, IGNORED_SEGMENT_SET, NATIVE_IGNORE, nativeOpChain, WorkspaceWatcher;
|
|
19703
19705
|
var init_file_watcher = __esm({
|
|
19704
|
-
"
|
|
19706
|
+
"packages/server/dist/ws/file-watcher.js"() {
|
|
19705
19707
|
"use strict";
|
|
19706
19708
|
IGNORED_SEGMENTS = [
|
|
19707
19709
|
// VCS
|
|
@@ -19923,12 +19925,12 @@ var init_file_watcher = __esm({
|
|
|
19923
19925
|
}
|
|
19924
19926
|
});
|
|
19925
19927
|
|
|
19926
|
-
//
|
|
19928
|
+
// packages/server/dist/ws/git-dir-watcher.js
|
|
19927
19929
|
import fs43 from "node:fs";
|
|
19928
19930
|
import path47 from "node:path";
|
|
19929
19931
|
var GitDirWatcher;
|
|
19930
19932
|
var init_git_dir_watcher = __esm({
|
|
19931
|
-
"
|
|
19933
|
+
"packages/server/dist/ws/git-dir-watcher.js"() {
|
|
19932
19934
|
"use strict";
|
|
19933
19935
|
GitDirWatcher = class {
|
|
19934
19936
|
watcher = null;
|
|
@@ -20047,7 +20049,7 @@ var init_git_dir_watcher = __esm({
|
|
|
20047
20049
|
}
|
|
20048
20050
|
});
|
|
20049
20051
|
|
|
20050
|
-
//
|
|
20052
|
+
// packages/server/dist/ws/event-processor.js
|
|
20051
20053
|
function sendJson(ws, data) {
|
|
20052
20054
|
if (ws.readyState === ws.OPEN) {
|
|
20053
20055
|
try {
|
|
@@ -20074,10 +20076,10 @@ function sendWsNotification(event, state, turnId, ctx) {
|
|
|
20074
20076
|
sendJson(ctx.ws, { type: "agent:done", agentName, taskId });
|
|
20075
20077
|
break;
|
|
20076
20078
|
case "tool_call":
|
|
20077
|
-
sendJson(ctx.ws, { type: "agent:tool_call", tool: event.toolName, input: event.toolInput, agentName, taskId, turnId });
|
|
20079
|
+
sendJson(ctx.ws, { type: "agent:tool_call", tool: event.toolName, toolUseId: event.toolUseId, input: event.toolInput, agentName, taskId, turnId });
|
|
20078
20080
|
break;
|
|
20079
20081
|
case "tool_result":
|
|
20080
|
-
sendJson(ctx.ws, { type: "agent:tool_result", result: event.toolResult, agentName, taskId, durationMs: event.durationMs });
|
|
20082
|
+
sendJson(ctx.ws, { type: "agent:tool_result", result: event.toolResult, toolUseId: event.toolUseId, agentName, taskId, durationMs: event.durationMs });
|
|
20081
20083
|
break;
|
|
20082
20084
|
case "followup_start":
|
|
20083
20085
|
case "queued_message":
|
|
@@ -20146,13 +20148,13 @@ function bufferDetachedNotification(event, pendingEvents) {
|
|
|
20146
20148
|
}
|
|
20147
20149
|
}
|
|
20148
20150
|
var init_event_processor = __esm({
|
|
20149
|
-
"
|
|
20151
|
+
"packages/server/dist/ws/event-processor.js"() {
|
|
20150
20152
|
"use strict";
|
|
20151
20153
|
init_ui_log_builder();
|
|
20152
20154
|
}
|
|
20153
20155
|
});
|
|
20154
20156
|
|
|
20155
|
-
//
|
|
20157
|
+
// packages/server/dist/ws/terminal-manager.js
|
|
20156
20158
|
import { homedir as homedir22 } from "node:os";
|
|
20157
20159
|
import { basename } from "node:path";
|
|
20158
20160
|
import { createRequire } from "node:module";
|
|
@@ -20183,7 +20185,7 @@ function attachListenersOnce(t2) {
|
|
|
20183
20185
|
}
|
|
20184
20186
|
var requireFromHere, ptyModule, TERMINAL_GRACE_MS, terminals, TerminalManager;
|
|
20185
20187
|
var init_terminal_manager = __esm({
|
|
20186
|
-
"
|
|
20188
|
+
"packages/server/dist/ws/terminal-manager.js"() {
|
|
20187
20189
|
"use strict";
|
|
20188
20190
|
init_config();
|
|
20189
20191
|
init_event_processor();
|
|
@@ -20316,7 +20318,7 @@ var init_terminal_manager = __esm({
|
|
|
20316
20318
|
}
|
|
20317
20319
|
});
|
|
20318
20320
|
|
|
20319
|
-
//
|
|
20321
|
+
// packages/server/dist/ws/handler.js
|
|
20320
20322
|
import path48 from "node:path";
|
|
20321
20323
|
function setupWebSocketHandler(deps) {
|
|
20322
20324
|
const { wss: wss2, registry: registry2 } = deps;
|
|
@@ -20819,7 +20821,8 @@ ${msg.message}` : markers.join("\n");
|
|
|
20819
20821
|
client2.projectId = detached.projectId;
|
|
20820
20822
|
const state2 = getState(client2);
|
|
20821
20823
|
const ctxConfig = await client2.sessionManager.getContextConfig(client2.sessionId);
|
|
20822
|
-
const
|
|
20824
|
+
const running = client2.sessionManager.isSessionRunning(client2.sessionId);
|
|
20825
|
+
const messages3 = state2 ? running ? [...state2.messageLog] : [...createSaveSnapshot(state2)] : [];
|
|
20823
20826
|
const detachedSession = client2.sessionManager.getSessionById(client2.sessionId);
|
|
20824
20827
|
sendJson(ws, { type: "state:snapshot", snapshot: { activePlan: null, agents: [], recentMessages: messages3, sessionId: msg.sessionId, maxContextTokens: ctxConfig.maxTokens, agentId: detachedSession?.agentId } });
|
|
20825
20828
|
if (state2 && state2.contextTokens > 0) {
|
|
@@ -20832,16 +20835,21 @@ ${msg.message}` : markers.join("\n");
|
|
|
20832
20835
|
}
|
|
20833
20836
|
detached.unsubscribe();
|
|
20834
20837
|
client2.unsubscribeEvents = client2.sessionManager.registerEventListener(client2.sessionId, createEventListener(client2));
|
|
20835
|
-
if (state2 &&
|
|
20838
|
+
if (state2 && running) {
|
|
20836
20839
|
console.debug(`[WS] Session still running \u2014 synthesizing in-progress state`);
|
|
20837
|
-
|
|
20838
|
-
|
|
20839
|
-
|
|
20840
|
-
|
|
20841
|
-
|
|
20842
|
-
|
|
20843
|
-
|
|
20844
|
-
|
|
20840
|
+
const agentName = detachedSession?.agentName ?? (state2.streamingAgent || "default");
|
|
20841
|
+
sendJson(ws, { type: "chat:followup", agentName, replay: true });
|
|
20842
|
+
for (const block of state2.turnContentBlocks) {
|
|
20843
|
+
if (block.type === "thinking") {
|
|
20844
|
+
sendJson(ws, { type: "chat:thinking", text: block.text, agentName, turnId: block.turnId, replay: true });
|
|
20845
|
+
} else if (block.type === "text") {
|
|
20846
|
+
sendJson(ws, { type: "chat:stream", text: block.text, agentName, turnId: block.turnId, replay: true });
|
|
20847
|
+
} else {
|
|
20848
|
+
const tc = block.toolCall;
|
|
20849
|
+
sendJson(ws, { type: "agent:tool_call", tool: tc.name, toolUseId: tc.toolUseId, input: tc.input, agentName, turnId: block.turnId, replay: true });
|
|
20850
|
+
if (tc.output) {
|
|
20851
|
+
sendJson(ws, { type: "agent:tool_result", result: tc.output, toolUseId: tc.toolUseId, agentName, durationMs: tc.durationMs, replay: true });
|
|
20852
|
+
}
|
|
20845
20853
|
}
|
|
20846
20854
|
}
|
|
20847
20855
|
}
|
|
@@ -20905,7 +20913,7 @@ ${msg.message}` : markers.join("\n");
|
|
|
20905
20913
|
}
|
|
20906
20914
|
var detachedSessions;
|
|
20907
20915
|
var init_handler = __esm({
|
|
20908
|
-
"
|
|
20916
|
+
"packages/server/dist/ws/handler.js"() {
|
|
20909
20917
|
"use strict";
|
|
20910
20918
|
init_ui_log_builder();
|
|
20911
20919
|
init_config();
|
|
@@ -20920,7 +20928,7 @@ var init_handler = __esm({
|
|
|
20920
20928
|
}
|
|
20921
20929
|
});
|
|
20922
20930
|
|
|
20923
|
-
//
|
|
20931
|
+
// packages/server/dist/db/cron-db.js
|
|
20924
20932
|
import Database5 from "better-sqlite3";
|
|
20925
20933
|
import { drizzle as drizzle4 } from "drizzle-orm/better-sqlite3";
|
|
20926
20934
|
import { sqliteTable as sqliteTable4, text as text4, integer as integer4 } from "drizzle-orm/sqlite-core";
|
|
@@ -20952,7 +20960,7 @@ function getCronDb() {
|
|
|
20952
20960
|
}
|
|
20953
20961
|
var cronJobs, cronRuns, CREATE_SQL3, _cronDb;
|
|
20954
20962
|
var init_cron_db = __esm({
|
|
20955
|
-
"
|
|
20963
|
+
"packages/server/dist/db/cron-db.js"() {
|
|
20956
20964
|
"use strict";
|
|
20957
20965
|
cronJobs = sqliteTable4("cron_jobs", {
|
|
20958
20966
|
id: text4("id").primaryKey(),
|
|
@@ -21057,7 +21065,7 @@ CREATE INDEX IF NOT EXISTS idx_cron_runs_status ON cron_runs(status);
|
|
|
21057
21065
|
}
|
|
21058
21066
|
});
|
|
21059
21067
|
|
|
21060
|
-
//
|
|
21068
|
+
// packages/server/dist/cron/dispatcher.js
|
|
21061
21069
|
function registerCronDispatcher(d) {
|
|
21062
21070
|
_registry.set(d.channelType, d);
|
|
21063
21071
|
}
|
|
@@ -21102,13 +21110,13 @@ async function dispatchToTargets(text5, targets) {
|
|
|
21102
21110
|
}
|
|
21103
21111
|
var _registry;
|
|
21104
21112
|
var init_dispatcher = __esm({
|
|
21105
|
-
"
|
|
21113
|
+
"packages/server/dist/cron/dispatcher.js"() {
|
|
21106
21114
|
"use strict";
|
|
21107
21115
|
_registry = /* @__PURE__ */ new Map();
|
|
21108
21116
|
}
|
|
21109
21117
|
});
|
|
21110
21118
|
|
|
21111
|
-
//
|
|
21119
|
+
// packages/server/dist/child-env.js
|
|
21112
21120
|
function cleanChildEnv() {
|
|
21113
21121
|
const env = { ...process.env };
|
|
21114
21122
|
delete env.HALO_PASSWORD;
|
|
@@ -21116,12 +21124,12 @@ function cleanChildEnv() {
|
|
|
21116
21124
|
return env;
|
|
21117
21125
|
}
|
|
21118
21126
|
var init_child_env = __esm({
|
|
21119
|
-
"
|
|
21127
|
+
"packages/server/dist/child-env.js"() {
|
|
21120
21128
|
"use strict";
|
|
21121
21129
|
}
|
|
21122
21130
|
});
|
|
21123
21131
|
|
|
21124
|
-
//
|
|
21132
|
+
// packages/server/dist/cron/runner.js
|
|
21125
21133
|
import { spawn as spawn2, execFileSync } from "node:child_process";
|
|
21126
21134
|
import fs45 from "node:fs";
|
|
21127
21135
|
import path50 from "node:path";
|
|
@@ -21635,7 +21643,7 @@ function pruneOldLogs() {
|
|
|
21635
21643
|
}
|
|
21636
21644
|
var DAY_MS2, CLI_TIMEOUT_SEC, KILL_GRACE_SEC, RUNS_PER_JOB_KEEP, LOG_RETENTION_DAYS, _active, _inflight, _fingerprint, _lastCronDataVersion;
|
|
21637
21645
|
var init_runner = __esm({
|
|
21638
|
-
"
|
|
21646
|
+
"packages/server/dist/cron/runner.js"() {
|
|
21639
21647
|
"use strict";
|
|
21640
21648
|
init_cron_db();
|
|
21641
21649
|
init_dispatcher();
|
|
@@ -21653,7 +21661,7 @@ var init_runner = __esm({
|
|
|
21653
21661
|
}
|
|
21654
21662
|
});
|
|
21655
21663
|
|
|
21656
|
-
//
|
|
21664
|
+
// packages/server/dist/routes/cron.js
|
|
21657
21665
|
import { Hono as Hono12 } from "hono";
|
|
21658
21666
|
import { eq as eq12, desc as desc4, lt as lt5, and as and8 } from "drizzle-orm";
|
|
21659
21667
|
import fs46 from "node:fs/promises";
|
|
@@ -21883,7 +21891,7 @@ function computeNextRun(j) {
|
|
|
21883
21891
|
}
|
|
21884
21892
|
}
|
|
21885
21893
|
var init_cron = __esm({
|
|
21886
|
-
"
|
|
21894
|
+
"packages/server/dist/routes/cron.js"() {
|
|
21887
21895
|
"use strict";
|
|
21888
21896
|
init_cron_db();
|
|
21889
21897
|
init_runner();
|
|
@@ -21892,7 +21900,7 @@ var init_cron = __esm({
|
|
|
21892
21900
|
}
|
|
21893
21901
|
});
|
|
21894
21902
|
|
|
21895
|
-
//
|
|
21903
|
+
// packages/server/dist/evolution/ticker.js
|
|
21896
21904
|
import { eq as eq13, and as and9, or as or2, lt as lt6, asc as asc2, isNull as isNull5, sql as sql2 } from "drizzle-orm";
|
|
21897
21905
|
function setEvoSpawner(fn) {
|
|
21898
21906
|
_spawner = fn;
|
|
@@ -22113,7 +22121,7 @@ function claimApply(id) {
|
|
|
22113
22121
|
}
|
|
22114
22122
|
var _lastRunStatus, _lastApplyStatus, _spawner, TICK_INTERVAL_MS, _interval;
|
|
22115
22123
|
var init_ticker = __esm({
|
|
22116
|
-
"
|
|
22124
|
+
"packages/server/dist/evolution/ticker.js"() {
|
|
22117
22125
|
"use strict";
|
|
22118
22126
|
init_config();
|
|
22119
22127
|
init_evo_db();
|
|
@@ -22128,13 +22136,13 @@ var init_ticker = __esm({
|
|
|
22128
22136
|
}
|
|
22129
22137
|
});
|
|
22130
22138
|
|
|
22131
|
-
//
|
|
22139
|
+
// packages/server/dist/evolution/spawn.js
|
|
22132
22140
|
import path51 from "node:path";
|
|
22133
22141
|
import { spawn as spawn3 } from "node:child_process";
|
|
22134
22142
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
22135
22143
|
var __dirname2, WRAPPER_PATH, realEvoSpawner;
|
|
22136
22144
|
var init_spawn = __esm({
|
|
22137
|
-
"
|
|
22145
|
+
"packages/server/dist/evolution/spawn.js"() {
|
|
22138
22146
|
"use strict";
|
|
22139
22147
|
init_child_env();
|
|
22140
22148
|
__dirname2 = path51.dirname(fileURLToPath2(import.meta.url));
|
|
@@ -22156,7 +22164,7 @@ var init_spawn = __esm({
|
|
|
22156
22164
|
}
|
|
22157
22165
|
});
|
|
22158
22166
|
|
|
22159
|
-
//
|
|
22167
|
+
// packages/server/dist/channels/registry.js
|
|
22160
22168
|
function bootChannels(app2, descriptors, deps) {
|
|
22161
22169
|
for (const d of descriptors) {
|
|
22162
22170
|
if (d.registerCronDispatcher)
|
|
@@ -22181,13 +22189,13 @@ async function shutdownChannels() {
|
|
|
22181
22189
|
}
|
|
22182
22190
|
var _running;
|
|
22183
22191
|
var init_registry2 = __esm({
|
|
22184
|
-
"
|
|
22192
|
+
"packages/server/dist/channels/registry.js"() {
|
|
22185
22193
|
"use strict";
|
|
22186
22194
|
_running = [];
|
|
22187
22195
|
}
|
|
22188
22196
|
});
|
|
22189
22197
|
|
|
22190
|
-
//
|
|
22198
|
+
// packages/server/dist/channels/telegram/accounts.js
|
|
22191
22199
|
function toTelegram(a) {
|
|
22192
22200
|
const c = a.config;
|
|
22193
22201
|
return {
|
|
@@ -22261,17 +22269,17 @@ function deleteAccount3(db, accountId) {
|
|
|
22261
22269
|
}
|
|
22262
22270
|
var CH2;
|
|
22263
22271
|
var init_accounts3 = __esm({
|
|
22264
|
-
"
|
|
22272
|
+
"packages/server/dist/channels/telegram/accounts.js"() {
|
|
22265
22273
|
"use strict";
|
|
22266
22274
|
init_accounts();
|
|
22267
22275
|
CH2 = "telegram";
|
|
22268
22276
|
}
|
|
22269
22277
|
});
|
|
22270
22278
|
|
|
22271
|
-
//
|
|
22279
|
+
// packages/server/dist/channels/telegram/event-adapter.js
|
|
22272
22280
|
var HARD_CHARS, MEDIA_MARKER_RE, TelegramResponder;
|
|
22273
22281
|
var init_event_adapter = __esm({
|
|
22274
|
-
"
|
|
22282
|
+
"packages/server/dist/channels/telegram/event-adapter.js"() {
|
|
22275
22283
|
"use strict";
|
|
22276
22284
|
HARD_CHARS = 4e3;
|
|
22277
22285
|
MEDIA_MARKER_RE = /^MEDIA:\s*(\S.*?)\s*$/gm;
|
|
@@ -22372,17 +22380,17 @@ var init_event_adapter = __esm({
|
|
|
22372
22380
|
}
|
|
22373
22381
|
});
|
|
22374
22382
|
|
|
22375
|
-
//
|
|
22383
|
+
// packages/server/dist/channels/shared/session-prefix.js
|
|
22376
22384
|
function sessionPrefix(channel, userId) {
|
|
22377
22385
|
return `${channel}_${userId}_`;
|
|
22378
22386
|
}
|
|
22379
22387
|
var init_session_prefix = __esm({
|
|
22380
|
-
"
|
|
22388
|
+
"packages/server/dist/channels/shared/session-prefix.js"() {
|
|
22381
22389
|
"use strict";
|
|
22382
22390
|
}
|
|
22383
22391
|
});
|
|
22384
22392
|
|
|
22385
|
-
//
|
|
22393
|
+
// packages/server/dist/channels/telegram/handler.js
|
|
22386
22394
|
import { Bot, InputFile } from "grammy";
|
|
22387
22395
|
import path52 from "node:path";
|
|
22388
22396
|
function inferMediaKind(filePath) {
|
|
@@ -22725,7 +22733,7 @@ async function getOrCreateActiveSession(sm, userId, activeOverrides2, accessLeve
|
|
|
22725
22733
|
return newId;
|
|
22726
22734
|
}
|
|
22727
22735
|
var init_handler2 = __esm({
|
|
22728
|
-
"
|
|
22736
|
+
"packages/server/dist/channels/telegram/handler.js"() {
|
|
22729
22737
|
"use strict";
|
|
22730
22738
|
init_accounts3();
|
|
22731
22739
|
init_event_adapter();
|
|
@@ -22740,7 +22748,7 @@ var init_handler2 = __esm({
|
|
|
22740
22748
|
}
|
|
22741
22749
|
});
|
|
22742
22750
|
|
|
22743
|
-
//
|
|
22751
|
+
// packages/server/dist/routes/telegram.js
|
|
22744
22752
|
import { Hono as Hono13 } from "hono";
|
|
22745
22753
|
import path53 from "node:path";
|
|
22746
22754
|
import { Bot as Bot2 } from "grammy";
|
|
@@ -22856,14 +22864,14 @@ function createTelegramRoutes(deps) {
|
|
|
22856
22864
|
return app2;
|
|
22857
22865
|
}
|
|
22858
22866
|
var init_telegram = __esm({
|
|
22859
|
-
"
|
|
22867
|
+
"packages/server/dist/routes/telegram.js"() {
|
|
22860
22868
|
"use strict";
|
|
22861
22869
|
init_accounts3();
|
|
22862
22870
|
init_init();
|
|
22863
22871
|
}
|
|
22864
22872
|
});
|
|
22865
22873
|
|
|
22866
|
-
//
|
|
22874
|
+
// packages/server/dist/channels/telegram/cron-dispatcher.js
|
|
22867
22875
|
import { Bot as Bot3 } from "grammy";
|
|
22868
22876
|
async function dispatch(accountId, text5, explicitChatId) {
|
|
22869
22877
|
const acct = getAccount3(getChannelDb(), accountId);
|
|
@@ -22912,7 +22920,7 @@ function registerTelegramCronDispatcher() {
|
|
|
22912
22920
|
registerCronDispatcher({ channelType: "telegram", dispatch, listTargets });
|
|
22913
22921
|
}
|
|
22914
22922
|
var init_cron_dispatcher = __esm({
|
|
22915
|
-
"
|
|
22923
|
+
"packages/server/dist/channels/telegram/cron-dispatcher.js"() {
|
|
22916
22924
|
"use strict";
|
|
22917
22925
|
init_channel_db();
|
|
22918
22926
|
init_accounts3();
|
|
@@ -22920,10 +22928,10 @@ var init_cron_dispatcher = __esm({
|
|
|
22920
22928
|
}
|
|
22921
22929
|
});
|
|
22922
22930
|
|
|
22923
|
-
//
|
|
22931
|
+
// packages/server/dist/channels/telegram/descriptor.js
|
|
22924
22932
|
var telegramDescriptor;
|
|
22925
22933
|
var init_descriptor = __esm({
|
|
22926
|
-
"
|
|
22934
|
+
"packages/server/dist/channels/telegram/descriptor.js"() {
|
|
22927
22935
|
"use strict";
|
|
22928
22936
|
init_handler2();
|
|
22929
22937
|
init_telegram();
|
|
@@ -22938,7 +22946,7 @@ var init_descriptor = __esm({
|
|
|
22938
22946
|
}
|
|
22939
22947
|
});
|
|
22940
22948
|
|
|
22941
|
-
//
|
|
22949
|
+
// packages/server/dist/channels/wechat/api.js
|
|
22942
22950
|
import crypto3 from "node:crypto";
|
|
22943
22951
|
function buildClientVersion(version) {
|
|
22944
22952
|
const [ma, mi, pa] = version.split(".").map((p) => parseInt(p, 10));
|
|
@@ -23127,7 +23135,7 @@ async function notifyStop(params) {
|
|
|
23127
23135
|
}
|
|
23128
23136
|
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;
|
|
23129
23137
|
var init_api = __esm({
|
|
23130
|
-
"
|
|
23138
|
+
"packages/server/dist/channels/wechat/api.js"() {
|
|
23131
23139
|
"use strict";
|
|
23132
23140
|
QR_BASE_URL = "https://ilinkai.weixin.qq.com";
|
|
23133
23141
|
DEFAULT_BOT_TYPE = "3";
|
|
@@ -23139,10 +23147,10 @@ var init_api = __esm({
|
|
|
23139
23147
|
}
|
|
23140
23148
|
});
|
|
23141
23149
|
|
|
23142
|
-
//
|
|
23150
|
+
// packages/server/dist/channels/wechat/types.js
|
|
23143
23151
|
var MessageItemType, MessageType, MessageState, UploadMediaType;
|
|
23144
23152
|
var init_types = __esm({
|
|
23145
|
-
"
|
|
23153
|
+
"packages/server/dist/channels/wechat/types.js"() {
|
|
23146
23154
|
"use strict";
|
|
23147
23155
|
MessageItemType = {
|
|
23148
23156
|
NONE: 0,
|
|
@@ -23171,7 +23179,7 @@ var init_types = __esm({
|
|
|
23171
23179
|
}
|
|
23172
23180
|
});
|
|
23173
23181
|
|
|
23174
|
-
//
|
|
23182
|
+
// packages/server/dist/channels/wechat/accounts.js
|
|
23175
23183
|
function toWeixin(a) {
|
|
23176
23184
|
const c = a.config;
|
|
23177
23185
|
return {
|
|
@@ -23253,17 +23261,17 @@ function saveSyncBuf(db, accountId, syncBuf) {
|
|
|
23253
23261
|
}
|
|
23254
23262
|
var CH3;
|
|
23255
23263
|
var init_accounts4 = __esm({
|
|
23256
|
-
"
|
|
23264
|
+
"packages/server/dist/channels/wechat/accounts.js"() {
|
|
23257
23265
|
"use strict";
|
|
23258
23266
|
init_accounts();
|
|
23259
23267
|
CH3 = "wechat";
|
|
23260
23268
|
}
|
|
23261
23269
|
});
|
|
23262
23270
|
|
|
23263
|
-
//
|
|
23271
|
+
// packages/server/dist/channels/wechat/event-adapter.js
|
|
23264
23272
|
var HARD_CHARS2, MEDIA_MARKER_RE2, WeixinResponder;
|
|
23265
23273
|
var init_event_adapter2 = __esm({
|
|
23266
|
-
"
|
|
23274
|
+
"packages/server/dist/channels/wechat/event-adapter.js"() {
|
|
23267
23275
|
"use strict";
|
|
23268
23276
|
HARD_CHARS2 = 3500;
|
|
23269
23277
|
MEDIA_MARKER_RE2 = /^MEDIA:\s*(\S.*?)\s*$/gm;
|
|
@@ -23372,7 +23380,7 @@ var init_event_adapter2 = __esm({
|
|
|
23372
23380
|
}
|
|
23373
23381
|
});
|
|
23374
23382
|
|
|
23375
|
-
//
|
|
23383
|
+
// packages/server/dist/channels/wechat/cdn.js
|
|
23376
23384
|
import { createDecipheriv, createCipheriv, randomBytes as randomBytes2, createHash as createHash2 } from "node:crypto";
|
|
23377
23385
|
function decryptAesEcb(ciphertext, key) {
|
|
23378
23386
|
const decipher = createDecipheriv("aes-128-ecb", key, null);
|
|
@@ -23471,14 +23479,14 @@ async function uploadCiphertext(params) {
|
|
|
23471
23479
|
}
|
|
23472
23480
|
var CDN_BASE_URL, UPLOAD_MAX_RETRIES;
|
|
23473
23481
|
var init_cdn = __esm({
|
|
23474
|
-
"
|
|
23482
|
+
"packages/server/dist/channels/wechat/cdn.js"() {
|
|
23475
23483
|
"use strict";
|
|
23476
23484
|
CDN_BASE_URL = "https://novac2c.cdn.weixin.qq.com/c2c";
|
|
23477
23485
|
UPLOAD_MAX_RETRIES = 3;
|
|
23478
23486
|
}
|
|
23479
23487
|
});
|
|
23480
23488
|
|
|
23481
|
-
//
|
|
23489
|
+
// packages/server/dist/channels/wechat/send-media.js
|
|
23482
23490
|
import fs48 from "node:fs/promises";
|
|
23483
23491
|
import path54 from "node:path";
|
|
23484
23492
|
function inferKind(filePath) {
|
|
@@ -23572,7 +23580,7 @@ function buildMessageItem(args) {
|
|
|
23572
23580
|
};
|
|
23573
23581
|
}
|
|
23574
23582
|
var init_send_media = __esm({
|
|
23575
|
-
"
|
|
23583
|
+
"packages/server/dist/channels/wechat/send-media.js"() {
|
|
23576
23584
|
"use strict";
|
|
23577
23585
|
init_api();
|
|
23578
23586
|
init_cdn();
|
|
@@ -23581,7 +23589,7 @@ var init_send_media = __esm({
|
|
|
23581
23589
|
}
|
|
23582
23590
|
});
|
|
23583
23591
|
|
|
23584
|
-
//
|
|
23592
|
+
// packages/server/dist/channels/wechat/login.js
|
|
23585
23593
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
23586
23594
|
function isFresh(l) {
|
|
23587
23595
|
return Date.now() - l.startedAt < ACTIVE_TTL_MS;
|
|
@@ -23683,7 +23691,7 @@ async function waitLogin(params) {
|
|
|
23683
23691
|
}
|
|
23684
23692
|
var ACTIVE_TTL_MS, MAX_QR_REFRESH, activeLogins;
|
|
23685
23693
|
var init_login = __esm({
|
|
23686
|
-
"
|
|
23694
|
+
"packages/server/dist/channels/wechat/login.js"() {
|
|
23687
23695
|
"use strict";
|
|
23688
23696
|
init_api();
|
|
23689
23697
|
ACTIVE_TTL_MS = 5 * 6e4;
|
|
@@ -23692,7 +23700,7 @@ var init_login = __esm({
|
|
|
23692
23700
|
}
|
|
23693
23701
|
});
|
|
23694
23702
|
|
|
23695
|
-
//
|
|
23703
|
+
// packages/server/dist/channels/wechat/handler.js
|
|
23696
23704
|
import fs49 from "node:fs";
|
|
23697
23705
|
import path55 from "node:path";
|
|
23698
23706
|
import QRCode from "qrcode";
|
|
@@ -24200,7 +24208,7 @@ function sleep2(ms, signal) {
|
|
|
24200
24208
|
}
|
|
24201
24209
|
var MAX_CONSECUTIVE_FAILURES, BACKOFF_DELAY_MS, RETRY_DELAY_MS;
|
|
24202
24210
|
var init_handler3 = __esm({
|
|
24203
|
-
"
|
|
24211
|
+
"packages/server/dist/channels/wechat/handler.js"() {
|
|
24204
24212
|
"use strict";
|
|
24205
24213
|
init_api();
|
|
24206
24214
|
init_types();
|
|
@@ -24222,7 +24230,7 @@ var init_handler3 = __esm({
|
|
|
24222
24230
|
}
|
|
24223
24231
|
});
|
|
24224
24232
|
|
|
24225
|
-
//
|
|
24233
|
+
// packages/server/dist/routes/weixin.js
|
|
24226
24234
|
import { Hono as Hono14 } from "hono";
|
|
24227
24235
|
import path56 from "node:path";
|
|
24228
24236
|
import fs50 from "node:fs";
|
|
@@ -24337,7 +24345,7 @@ function stripSecrets(acc) {
|
|
|
24337
24345
|
return rest;
|
|
24338
24346
|
}
|
|
24339
24347
|
var init_weixin = __esm({
|
|
24340
|
-
"
|
|
24348
|
+
"packages/server/dist/routes/weixin.js"() {
|
|
24341
24349
|
"use strict";
|
|
24342
24350
|
init_login();
|
|
24343
24351
|
init_accounts4();
|
|
@@ -24345,7 +24353,7 @@ var init_weixin = __esm({
|
|
|
24345
24353
|
}
|
|
24346
24354
|
});
|
|
24347
24355
|
|
|
24348
|
-
//
|
|
24356
|
+
// packages/server/dist/channels/wechat/cron-dispatcher.js
|
|
24349
24357
|
function readLastActiveChatId(accountId) {
|
|
24350
24358
|
const acct = getAccount(getChannelDb(), accountId);
|
|
24351
24359
|
if (!acct)
|
|
@@ -24388,7 +24396,7 @@ function registerWechatCronDispatcher() {
|
|
|
24388
24396
|
registerCronDispatcher({ channelType: "wechat", dispatch: dispatch2, listTargets: listTargets2 });
|
|
24389
24397
|
}
|
|
24390
24398
|
var init_cron_dispatcher2 = __esm({
|
|
24391
|
-
"
|
|
24399
|
+
"packages/server/dist/channels/wechat/cron-dispatcher.js"() {
|
|
24392
24400
|
"use strict";
|
|
24393
24401
|
init_channel_db();
|
|
24394
24402
|
init_accounts();
|
|
@@ -24398,10 +24406,10 @@ var init_cron_dispatcher2 = __esm({
|
|
|
24398
24406
|
}
|
|
24399
24407
|
});
|
|
24400
24408
|
|
|
24401
|
-
//
|
|
24409
|
+
// packages/server/dist/channels/wechat/descriptor.js
|
|
24402
24410
|
var wechatDescriptor;
|
|
24403
24411
|
var init_descriptor2 = __esm({
|
|
24404
|
-
"
|
|
24412
|
+
"packages/server/dist/channels/wechat/descriptor.js"() {
|
|
24405
24413
|
"use strict";
|
|
24406
24414
|
init_handler3();
|
|
24407
24415
|
init_weixin();
|
|
@@ -24416,7 +24424,7 @@ var init_descriptor2 = __esm({
|
|
|
24416
24424
|
}
|
|
24417
24425
|
});
|
|
24418
24426
|
|
|
24419
|
-
//
|
|
24427
|
+
// packages/server/dist/channels/web/handler.js
|
|
24420
24428
|
function buildWebSessionPrefix(accountId) {
|
|
24421
24429
|
return sessionPrefix("web", accountId);
|
|
24422
24430
|
}
|
|
@@ -24804,7 +24812,7 @@ function createMediaBuffer() {
|
|
|
24804
24812
|
}
|
|
24805
24813
|
var MEDIA_MARKER_RE3;
|
|
24806
24814
|
var init_handler4 = __esm({
|
|
24807
|
-
"
|
|
24815
|
+
"packages/server/dist/channels/web/handler.js"() {
|
|
24808
24816
|
"use strict";
|
|
24809
24817
|
init_ui_log_builder();
|
|
24810
24818
|
init_accounts2();
|
|
@@ -24819,7 +24827,7 @@ var init_handler4 = __esm({
|
|
|
24819
24827
|
}
|
|
24820
24828
|
});
|
|
24821
24829
|
|
|
24822
|
-
//
|
|
24830
|
+
// packages/server/dist/routes/web.js
|
|
24823
24831
|
import { Hono as Hono15 } from "hono";
|
|
24824
24832
|
import { streamSSE } from "hono/streaming";
|
|
24825
24833
|
import crypto4 from "node:crypto";
|
|
@@ -25031,7 +25039,7 @@ function createWebRoutes(deps) {
|
|
|
25031
25039
|
}
|
|
25032
25040
|
var TOKEN_BUCKET3;
|
|
25033
25041
|
var init_web = __esm({
|
|
25034
|
-
"
|
|
25042
|
+
"packages/server/dist/routes/web.js"() {
|
|
25035
25043
|
"use strict";
|
|
25036
25044
|
init_accounts2();
|
|
25037
25045
|
init_init();
|
|
@@ -25040,10 +25048,10 @@ var init_web = __esm({
|
|
|
25040
25048
|
}
|
|
25041
25049
|
});
|
|
25042
25050
|
|
|
25043
|
-
//
|
|
25051
|
+
// packages/server/dist/channels/web/descriptor.js
|
|
25044
25052
|
var webDescriptor;
|
|
25045
25053
|
var init_descriptor3 = __esm({
|
|
25046
|
-
"
|
|
25054
|
+
"packages/server/dist/channels/web/descriptor.js"() {
|
|
25047
25055
|
"use strict";
|
|
25048
25056
|
init_handler4();
|
|
25049
25057
|
init_web();
|
|
@@ -25059,7 +25067,7 @@ var init_descriptor3 = __esm({
|
|
|
25059
25067
|
}
|
|
25060
25068
|
});
|
|
25061
25069
|
|
|
25062
|
-
//
|
|
25070
|
+
// packages/server/dist/channels/slack/accounts.js
|
|
25063
25071
|
function toSlack(a) {
|
|
25064
25072
|
const c = a.config;
|
|
25065
25073
|
return {
|
|
@@ -25135,14 +25143,14 @@ function deleteAccount5(db, accountId) {
|
|
|
25135
25143
|
}
|
|
25136
25144
|
var CH4;
|
|
25137
25145
|
var init_accounts5 = __esm({
|
|
25138
|
-
"
|
|
25146
|
+
"packages/server/dist/channels/slack/accounts.js"() {
|
|
25139
25147
|
"use strict";
|
|
25140
25148
|
init_accounts();
|
|
25141
25149
|
CH4 = "slack";
|
|
25142
25150
|
}
|
|
25143
25151
|
});
|
|
25144
25152
|
|
|
25145
|
-
//
|
|
25153
|
+
// packages/server/dist/channels/shared/markdown.js
|
|
25146
25154
|
function formatForSlack(input) {
|
|
25147
25155
|
if (!input)
|
|
25148
25156
|
return "";
|
|
@@ -25221,15 +25229,15 @@ function stripCommonMark(line) {
|
|
|
25221
25229
|
return line;
|
|
25222
25230
|
}
|
|
25223
25231
|
var init_markdown = __esm({
|
|
25224
|
-
"
|
|
25232
|
+
"packages/server/dist/channels/shared/markdown.js"() {
|
|
25225
25233
|
"use strict";
|
|
25226
25234
|
}
|
|
25227
25235
|
});
|
|
25228
25236
|
|
|
25229
|
-
//
|
|
25237
|
+
// packages/server/dist/channels/slack/event-adapter.js
|
|
25230
25238
|
var HARD_CHARS3, MEDIA_MARKER_RE4, SlackResponder;
|
|
25231
25239
|
var init_event_adapter3 = __esm({
|
|
25232
|
-
"
|
|
25240
|
+
"packages/server/dist/channels/slack/event-adapter.js"() {
|
|
25233
25241
|
"use strict";
|
|
25234
25242
|
init_markdown();
|
|
25235
25243
|
HARD_CHARS3 = 35e3;
|
|
@@ -25323,7 +25331,7 @@ var init_event_adapter3 = __esm({
|
|
|
25323
25331
|
}
|
|
25324
25332
|
});
|
|
25325
25333
|
|
|
25326
|
-
//
|
|
25334
|
+
// packages/server/dist/channels/slack/api.js
|
|
25327
25335
|
async function slackPost(endpoint, token, body) {
|
|
25328
25336
|
const isForm = body instanceof FormData;
|
|
25329
25337
|
const res = await fetch(`${SLACK_API}/${endpoint}`, {
|
|
@@ -25511,13 +25519,13 @@ async function downloadFile(botToken, urlPrivate) {
|
|
|
25511
25519
|
}
|
|
25512
25520
|
var SLACK_API;
|
|
25513
25521
|
var init_api2 = __esm({
|
|
25514
|
-
"
|
|
25522
|
+
"packages/server/dist/channels/slack/api.js"() {
|
|
25515
25523
|
"use strict";
|
|
25516
25524
|
SLACK_API = "https://slack.com/api";
|
|
25517
25525
|
}
|
|
25518
25526
|
});
|
|
25519
25527
|
|
|
25520
|
-
//
|
|
25528
|
+
// packages/server/dist/channels/slack/handler.js
|
|
25521
25529
|
import path58 from "node:path";
|
|
25522
25530
|
import { WebSocket } from "ws";
|
|
25523
25531
|
function slashToBang(text5, commandNames) {
|
|
@@ -25876,7 +25884,7 @@ async function getOrCreateSessionForThread(args) {
|
|
|
25876
25884
|
}
|
|
25877
25885
|
var SLACK_EXTRA_COMMANDS, SEEN_EVENT_IDS, SEEN_EVENT_IDS_MAX;
|
|
25878
25886
|
var init_handler5 = __esm({
|
|
25879
|
-
"
|
|
25887
|
+
"packages/server/dist/channels/slack/handler.js"() {
|
|
25880
25888
|
"use strict";
|
|
25881
25889
|
init_accounts5();
|
|
25882
25890
|
init_event_adapter3();
|
|
@@ -25896,7 +25904,7 @@ var init_handler5 = __esm({
|
|
|
25896
25904
|
}
|
|
25897
25905
|
});
|
|
25898
25906
|
|
|
25899
|
-
//
|
|
25907
|
+
// packages/server/dist/routes/slack.js
|
|
25900
25908
|
import { Hono as Hono16 } from "hono";
|
|
25901
25909
|
import fs52 from "node:fs";
|
|
25902
25910
|
import path59 from "node:path";
|
|
@@ -26027,7 +26035,7 @@ function createSlackRoutes(deps) {
|
|
|
26027
26035
|
return app2;
|
|
26028
26036
|
}
|
|
26029
26037
|
var init_slack = __esm({
|
|
26030
|
-
"
|
|
26038
|
+
"packages/server/dist/routes/slack.js"() {
|
|
26031
26039
|
"use strict";
|
|
26032
26040
|
init_accounts5();
|
|
26033
26041
|
init_api2();
|
|
@@ -26035,7 +26043,7 @@ var init_slack = __esm({
|
|
|
26035
26043
|
}
|
|
26036
26044
|
});
|
|
26037
26045
|
|
|
26038
|
-
//
|
|
26046
|
+
// packages/server/dist/channels/slack/cron-dispatcher.js
|
|
26039
26047
|
function parseChatId(raw) {
|
|
26040
26048
|
const idx = raw.indexOf(":");
|
|
26041
26049
|
if (idx < 0)
|
|
@@ -26080,7 +26088,7 @@ function registerSlackCronDispatcher() {
|
|
|
26080
26088
|
registerCronDispatcher({ channelType: "slack", dispatch: dispatch3, listTargets: listTargets3 });
|
|
26081
26089
|
}
|
|
26082
26090
|
var init_cron_dispatcher3 = __esm({
|
|
26083
|
-
"
|
|
26091
|
+
"packages/server/dist/channels/slack/cron-dispatcher.js"() {
|
|
26084
26092
|
"use strict";
|
|
26085
26093
|
init_channel_db();
|
|
26086
26094
|
init_accounts5();
|
|
@@ -26089,10 +26097,10 @@ var init_cron_dispatcher3 = __esm({
|
|
|
26089
26097
|
}
|
|
26090
26098
|
});
|
|
26091
26099
|
|
|
26092
|
-
//
|
|
26100
|
+
// packages/server/dist/channels/slack/descriptor.js
|
|
26093
26101
|
var slackDescriptor;
|
|
26094
26102
|
var init_descriptor4 = __esm({
|
|
26095
|
-
"
|
|
26103
|
+
"packages/server/dist/channels/slack/descriptor.js"() {
|
|
26096
26104
|
"use strict";
|
|
26097
26105
|
init_handler5();
|
|
26098
26106
|
init_slack();
|
|
@@ -26107,7 +26115,7 @@ var init_descriptor4 = __esm({
|
|
|
26107
26115
|
}
|
|
26108
26116
|
});
|
|
26109
26117
|
|
|
26110
|
-
//
|
|
26118
|
+
// packages/server/dist/channels/feishu/accounts.js
|
|
26111
26119
|
function toFeishu(a) {
|
|
26112
26120
|
const c = a.config;
|
|
26113
26121
|
return {
|
|
@@ -26185,17 +26193,17 @@ function deleteAccount6(db, accountId) {
|
|
|
26185
26193
|
}
|
|
26186
26194
|
var CH5;
|
|
26187
26195
|
var init_accounts6 = __esm({
|
|
26188
|
-
"
|
|
26196
|
+
"packages/server/dist/channels/feishu/accounts.js"() {
|
|
26189
26197
|
"use strict";
|
|
26190
26198
|
init_accounts();
|
|
26191
26199
|
CH5 = "feishu";
|
|
26192
26200
|
}
|
|
26193
26201
|
});
|
|
26194
26202
|
|
|
26195
|
-
//
|
|
26203
|
+
// packages/server/dist/channels/feishu/event-adapter.js
|
|
26196
26204
|
var HARD_CHARS4, MEDIA_MARKER_RE5, FeishuResponder;
|
|
26197
26205
|
var init_event_adapter4 = __esm({
|
|
26198
|
-
"
|
|
26206
|
+
"packages/server/dist/channels/feishu/event-adapter.js"() {
|
|
26199
26207
|
"use strict";
|
|
26200
26208
|
init_markdown();
|
|
26201
26209
|
HARD_CHARS4 = 4500;
|
|
@@ -26289,7 +26297,7 @@ var init_event_adapter4 = __esm({
|
|
|
26289
26297
|
}
|
|
26290
26298
|
});
|
|
26291
26299
|
|
|
26292
|
-
//
|
|
26300
|
+
// packages/server/dist/channels/feishu/api.js
|
|
26293
26301
|
async function getTenantAccessToken(args) {
|
|
26294
26302
|
const cached = tokenCache.get(args.appId);
|
|
26295
26303
|
if (cached && cached.expiresAt - Date.now() > 6e4)
|
|
@@ -26553,14 +26561,14 @@ async function searchFeishuTargets(args) {
|
|
|
26553
26561
|
}
|
|
26554
26562
|
var FEISHU_BASE, tokenCache;
|
|
26555
26563
|
var init_api3 = __esm({
|
|
26556
|
-
"
|
|
26564
|
+
"packages/server/dist/channels/feishu/api.js"() {
|
|
26557
26565
|
"use strict";
|
|
26558
26566
|
FEISHU_BASE = "https://open.feishu.cn";
|
|
26559
26567
|
tokenCache = /* @__PURE__ */ new Map();
|
|
26560
26568
|
}
|
|
26561
26569
|
});
|
|
26562
26570
|
|
|
26563
|
-
//
|
|
26571
|
+
// packages/server/dist/channels/feishu/handler.js
|
|
26564
26572
|
import path60 from "node:path";
|
|
26565
26573
|
import * as Lark from "@larksuiteoapi/node-sdk";
|
|
26566
26574
|
function isPathAllowed3(filePath, workspacePath) {
|
|
@@ -26980,7 +26988,7 @@ async function getOrCreateSessionForThread2(args) {
|
|
|
26980
26988
|
return newId;
|
|
26981
26989
|
}
|
|
26982
26990
|
var init_handler6 = __esm({
|
|
26983
|
-
"
|
|
26991
|
+
"packages/server/dist/channels/feishu/handler.js"() {
|
|
26984
26992
|
"use strict";
|
|
26985
26993
|
init_accounts6();
|
|
26986
26994
|
init_event_adapter4();
|
|
@@ -26996,7 +27004,7 @@ var init_handler6 = __esm({
|
|
|
26996
27004
|
}
|
|
26997
27005
|
});
|
|
26998
27006
|
|
|
26999
|
-
//
|
|
27007
|
+
// packages/server/dist/routes/feishu.js
|
|
27000
27008
|
import { Hono as Hono17 } from "hono";
|
|
27001
27009
|
import fs53 from "node:fs";
|
|
27002
27010
|
import path61 from "node:path";
|
|
@@ -27130,7 +27138,7 @@ function createFeishuRoutes(deps) {
|
|
|
27130
27138
|
return app2;
|
|
27131
27139
|
}
|
|
27132
27140
|
var init_feishu = __esm({
|
|
27133
|
-
"
|
|
27141
|
+
"packages/server/dist/routes/feishu.js"() {
|
|
27134
27142
|
"use strict";
|
|
27135
27143
|
init_accounts6();
|
|
27136
27144
|
init_api3();
|
|
@@ -27138,7 +27146,7 @@ var init_feishu = __esm({
|
|
|
27138
27146
|
}
|
|
27139
27147
|
});
|
|
27140
27148
|
|
|
27141
|
-
//
|
|
27149
|
+
// packages/server/dist/channels/feishu/cron-dispatcher.js
|
|
27142
27150
|
function parseChatId2(raw) {
|
|
27143
27151
|
const idx = raw.indexOf(":");
|
|
27144
27152
|
return { chatId: idx < 0 ? raw : raw.slice(0, idx) };
|
|
@@ -27188,7 +27196,7 @@ function registerFeishuCronDispatcher() {
|
|
|
27188
27196
|
registerCronDispatcher({ channelType: "feishu", dispatch: dispatch4, listTargets: listTargets4 });
|
|
27189
27197
|
}
|
|
27190
27198
|
var init_cron_dispatcher4 = __esm({
|
|
27191
|
-
"
|
|
27199
|
+
"packages/server/dist/channels/feishu/cron-dispatcher.js"() {
|
|
27192
27200
|
"use strict";
|
|
27193
27201
|
init_channel_db();
|
|
27194
27202
|
init_accounts6();
|
|
@@ -27197,10 +27205,10 @@ var init_cron_dispatcher4 = __esm({
|
|
|
27197
27205
|
}
|
|
27198
27206
|
});
|
|
27199
27207
|
|
|
27200
|
-
//
|
|
27208
|
+
// packages/server/dist/channels/feishu/descriptor.js
|
|
27201
27209
|
var feishuDescriptor;
|
|
27202
27210
|
var init_descriptor5 = __esm({
|
|
27203
|
-
"
|
|
27211
|
+
"packages/server/dist/channels/feishu/descriptor.js"() {
|
|
27204
27212
|
"use strict";
|
|
27205
27213
|
init_handler6();
|
|
27206
27214
|
init_feishu();
|
|
@@ -27215,10 +27223,10 @@ var init_descriptor5 = __esm({
|
|
|
27215
27223
|
}
|
|
27216
27224
|
});
|
|
27217
27225
|
|
|
27218
|
-
//
|
|
27226
|
+
// packages/server/dist/channels/descriptors.js
|
|
27219
27227
|
var defaultChannelDescriptors;
|
|
27220
27228
|
var init_descriptors = __esm({
|
|
27221
|
-
"
|
|
27229
|
+
"packages/server/dist/channels/descriptors.js"() {
|
|
27222
27230
|
"use strict";
|
|
27223
27231
|
init_descriptor();
|
|
27224
27232
|
init_descriptor2();
|
|
@@ -27235,7 +27243,7 @@ var init_descriptors = __esm({
|
|
|
27235
27243
|
}
|
|
27236
27244
|
});
|
|
27237
27245
|
|
|
27238
|
-
//
|
|
27246
|
+
// packages/server/dist/middleware/auth.js
|
|
27239
27247
|
import { Hono as Hono18 } from "hono";
|
|
27240
27248
|
import { getCookie, setCookie } from "hono/cookie";
|
|
27241
27249
|
import crypto5 from "node:crypto";
|
|
@@ -27400,7 +27408,7 @@ function authMiddleware() {
|
|
|
27400
27408
|
}
|
|
27401
27409
|
var TOKEN_MAX_AGE, REFRESH_AFTER, COOKIE_NAME, ADMIN_LOGIN_BUCKET, isLockedOut2, recordFailure2, clearFailures2, PUBLIC_PATHS;
|
|
27402
27410
|
var init_auth = __esm({
|
|
27403
|
-
"
|
|
27411
|
+
"packages/server/dist/middleware/auth.js"() {
|
|
27404
27412
|
"use strict";
|
|
27405
27413
|
init_config();
|
|
27406
27414
|
init_password_hash();
|
|
@@ -27416,7 +27424,7 @@ var init_auth = __esm({
|
|
|
27416
27424
|
}
|
|
27417
27425
|
});
|
|
27418
27426
|
|
|
27419
|
-
//
|
|
27427
|
+
// packages/server/dist/index.js
|
|
27420
27428
|
var dist_exports = {};
|
|
27421
27429
|
import { Hono as Hono19 } from "hono";
|
|
27422
27430
|
import { cors } from "hono/cors";
|
|
@@ -27542,7 +27550,7 @@ async function gracefulShutdown(signal) {
|
|
|
27542
27550
|
}
|
|
27543
27551
|
var __dirname3, PORT, HALO_VERSION, PROJECT_ROOT, HALO_HOME4, GIT_SHA, AGENTCORE, app, allowlist, authRoutes, fileRoutes, gitRoutes, agentConfigRoutes, skillRoutes, settingsRoutes, evolutionRoutes, cronRoutes, channelDb, registry, sessionRoutes, showRoutes, metricsRoutes, commandRoutes, FRONTEND_DIR, server, wss;
|
|
27544
27552
|
var init_dist2 = __esm({
|
|
27545
|
-
async "
|
|
27553
|
+
async "packages/server/dist/index.js"() {
|
|
27546
27554
|
"use strict";
|
|
27547
27555
|
init_files();
|
|
27548
27556
|
init_git();
|
|
@@ -27578,7 +27586,7 @@ var init_dist2 = __esm({
|
|
|
27578
27586
|
init_git_ssh();
|
|
27579
27587
|
__dirname3 = path62.dirname(fileURLToPath3(import.meta.url));
|
|
27580
27588
|
PORT = config.server.port;
|
|
27581
|
-
HALO_VERSION = "1.0.
|
|
27589
|
+
HALO_VERSION = "1.0.2";
|
|
27582
27590
|
PROJECT_ROOT = findProjectRoot();
|
|
27583
27591
|
HALO_HOME4 = path62.join(homedir24(), ".halo");
|
|
27584
27592
|
GIT_SHA = readGitSha();
|
|
@@ -27749,7 +27757,7 @@ var init_dist2 = __esm({
|
|
|
27749
27757
|
}
|
|
27750
27758
|
});
|
|
27751
27759
|
|
|
27752
|
-
//
|
|
27760
|
+
// packages/acp-adapter/dist/halo-client.js
|
|
27753
27761
|
async function safeText(res) {
|
|
27754
27762
|
try {
|
|
27755
27763
|
return (await res.text()).slice(0, 500);
|
|
@@ -27792,7 +27800,7 @@ async function* parseSseStream(body) {
|
|
|
27792
27800
|
}
|
|
27793
27801
|
var HaloClient;
|
|
27794
27802
|
var init_halo_client = __esm({
|
|
27795
|
-
"
|
|
27803
|
+
"packages/acp-adapter/dist/halo-client.js"() {
|
|
27796
27804
|
"use strict";
|
|
27797
27805
|
HaloClient = class {
|
|
27798
27806
|
opts;
|
|
@@ -27871,7 +27879,7 @@ var init_halo_client = __esm({
|
|
|
27871
27879
|
}
|
|
27872
27880
|
});
|
|
27873
27881
|
|
|
27874
|
-
//
|
|
27882
|
+
// packages/acp-adapter/dist/adapter.js
|
|
27875
27883
|
function newError(message, code = -32603) {
|
|
27876
27884
|
const e = new Error(message);
|
|
27877
27885
|
e.code = code;
|
|
@@ -27879,7 +27887,7 @@ function newError(message, code = -32603) {
|
|
|
27879
27887
|
}
|
|
27880
27888
|
var AcpAdapter;
|
|
27881
27889
|
var init_adapter = __esm({
|
|
27882
|
-
"
|
|
27890
|
+
"packages/acp-adapter/dist/adapter.js"() {
|
|
27883
27891
|
"use strict";
|
|
27884
27892
|
init_halo_client();
|
|
27885
27893
|
AcpAdapter = class {
|
|
@@ -28168,10 +28176,10 @@ var init_adapter = __esm({
|
|
|
28168
28176
|
}
|
|
28169
28177
|
});
|
|
28170
28178
|
|
|
28171
|
-
//
|
|
28179
|
+
// packages/acp-adapter/dist/jsonrpc.js
|
|
28172
28180
|
var ERROR_PARSE, ERROR_METHOD_NOT_FOUND, ERROR_INTERNAL, JsonRpcConnection;
|
|
28173
28181
|
var init_jsonrpc = __esm({
|
|
28174
|
-
"
|
|
28182
|
+
"packages/acp-adapter/dist/jsonrpc.js"() {
|
|
28175
28183
|
"use strict";
|
|
28176
28184
|
ERROR_PARSE = -32700;
|
|
28177
28185
|
ERROR_METHOD_NOT_FOUND = -32601;
|
|
@@ -28304,7 +28312,7 @@ var init_jsonrpc = __esm({
|
|
|
28304
28312
|
}
|
|
28305
28313
|
});
|
|
28306
28314
|
|
|
28307
|
-
//
|
|
28315
|
+
// packages/acp-adapter/dist/index.js
|
|
28308
28316
|
var dist_exports2 = {};
|
|
28309
28317
|
__export(dist_exports2, {
|
|
28310
28318
|
main: () => main
|
|
@@ -28420,7 +28428,7 @@ function main(argv = process.argv.slice(2)) {
|
|
|
28420
28428
|
}
|
|
28421
28429
|
var HELP;
|
|
28422
28430
|
var init_dist3 = __esm({
|
|
28423
|
-
"
|
|
28431
|
+
"packages/acp-adapter/dist/index.js"() {
|
|
28424
28432
|
"use strict";
|
|
28425
28433
|
init_adapter();
|
|
28426
28434
|
init_jsonrpc();
|
|
@@ -28459,7 +28467,7 @@ Stdio:
|
|
|
28459
28467
|
}
|
|
28460
28468
|
});
|
|
28461
28469
|
|
|
28462
|
-
// src/silence-warnings.ts
|
|
28470
|
+
// packages/cli/src/silence-warnings.ts
|
|
28463
28471
|
var emit = process.emitWarning.bind(process);
|
|
28464
28472
|
process.emitWarning = (warning, ...args) => {
|
|
28465
28473
|
const opt = args[0];
|
|
@@ -28468,12 +28476,12 @@ process.emitWarning = (warning, ...args) => {
|
|
|
28468
28476
|
return emit(warning, ...args);
|
|
28469
28477
|
};
|
|
28470
28478
|
|
|
28471
|
-
// src/index.ts
|
|
28479
|
+
// packages/cli/src/index.ts
|
|
28472
28480
|
import path63 from "node:path";
|
|
28473
28481
|
import fs55 from "node:fs";
|
|
28474
28482
|
import { homedir as homedir25 } from "node:os";
|
|
28475
28483
|
import { parseArgs as parseArgs2 } from "node:util";
|
|
28476
|
-
var VERSION = "1.0.
|
|
28484
|
+
var VERSION = "1.0.2";
|
|
28477
28485
|
var HELP_TOP = `Usage: halo <command> [options]
|
|
28478
28486
|
|
|
28479
28487
|
Commands:
|