hypercore-cli 1.1.1 → 1.1.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/dist/{api-D4PUN5BN.js → api-JHHOZTL6.js} +13 -13
- package/dist/{auth-UTR4I6QY.js → auth-5QFJLW7J.js} +2 -2
- package/dist/{chunk-77FRUHTU.js → chunk-5GDYH676.js} +1 -1
- package/dist/{chunk-XMGHVNH2.js → chunk-5NLVGLD7.js} +1 -1
- package/dist/{chunk-V2EBSFPU.js → chunk-6XTEAFZQ.js} +4 -4
- package/dist/{chunk-LWDNLX6B.js → chunk-AQBSMYLT.js} +30 -30
- package/dist/{chunk-NHPDLYEW.js → chunk-CLKIMCXZ.js} +1 -1
- package/dist/{chunk-VQ35XX7B.js → chunk-DN4ASQ26.js} +2 -2
- package/dist/{chunk-OGQGKMDX.js → chunk-DUWREZXK.js} +2 -2
- package/dist/{chunk-E4NKO2KI.js → chunk-FCW3K6F2.js} +1 -1
- package/dist/{chunk-7ZYMJFCA.js → chunk-GFORWAMW.js} +1 -1
- package/dist/{chunk-SVF2VWOZ.js → chunk-I7WI3BMB.js} +18 -2
- package/dist/{chunk-CM423E2U.js → chunk-LBVHDGZE.js} +1 -1
- package/dist/{chunk-GMLQ7GZ5.js → chunk-NETIY5UB.js} +1 -1
- package/dist/{chunk-SHJQMIJL.js → chunk-NP47L7LG.js} +2 -2
- package/dist/{chunk-YWOSOTUO.js → chunk-O6MG7TOH.js} +1 -1
- package/dist/{chunk-ZQRNV2US.js → chunk-R5T3A2NQ.js} +2 -2
- package/dist/{chunk-VJDQNNSO.js → chunk-UCX4VZCT.js} +6 -6
- package/dist/{chunk-OWAOKDIN.js → chunk-Y6HMJZDJ.js} +2 -2
- package/dist/{claude-O5FSOXZC.js → claude-4BX3MJSK.js} +3 -3
- package/dist/{commands-43PLOWRU.js → commands-2X4OB5RF.js} +2 -2
- package/dist/{commands-VZMZJFZF.js → commands-GLBCEVQK.js} +1 -1
- package/dist/{commands-5YVUSUMP.js → commands-IINRNBYX.js} +3 -3
- package/dist/{config-WXXEEEVW.js → config-RSNQJQPS.js} +1 -1
- package/dist/{diagnose-BX45APUZ.js → diagnose-7UPLS7I4.js} +1 -1
- package/dist/{extractor-R5ABXNTJ.js → extractor-D3XWOAXI.js} +4 -4
- package/dist/{history-JPXZEOT3.js → history-6I6FADAU.js} +1 -1
- package/dist/index.js +31 -31
- package/dist/{instance-registry-6NJTCAE4.js → instance-registry-J7UJ7U4Z.js} +2 -2
- package/dist/{keybindings-ADWNOX5M.js → keybindings-PDXIOV3O.js} +2 -2
- package/dist/{loader-AXDDCB2G.js → loader-GKEYT6Y7.js} +2 -2
- package/dist/{network-V3O4UZYZ.js → network-JYGHQXAR.js} +8 -8
- package/dist/{openai-compat-UFDV2SCK.js → openai-compat-R7EKWG6Z.js} +3 -3
- package/dist/{prompt-5CZ34WGA.js → prompt-UWHSZU4P.js} +7 -7
- package/dist/{repl-EOWP6AAB.js → repl-QHIZ2JGF.js} +32 -32
- package/dist/{server-BB5AENWU.js → server-HCNIP7ZQ.js} +12 -12
- package/dist/{session-5NDKKFLN.js → session-5EBECDUP.js} +2 -2
- package/dist/{skills-JVLIQVJN.js → skills-HBQQTYO4.js} +2 -2
- package/dist/{store-G7KRD4PN.js → store-FKUTR7GW.js} +2 -2
- package/dist/{team-FVNNVDBY.js → team-7BBBP5YQ.js} +3 -3
- package/dist/{test-runner-REKSVPPY.js → test-runner-AUAGIBNM.js} +1 -1
- package/dist/{upgrade-YSXCO63I.js → upgrade-MZFH7OCN.js} +1 -1
- package/dist/{web-H2BJXUBZ.js → web-KS3FUGJA.js} +12 -12
- package/package.json +1 -1
|
@@ -8,31 +8,31 @@ import {
|
|
|
8
8
|
loadRound,
|
|
9
9
|
saveNetworkConfig,
|
|
10
10
|
updateProfileField
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UCX4VZCT.js";
|
|
12
12
|
import {
|
|
13
13
|
parseBody,
|
|
14
14
|
sendError,
|
|
15
15
|
sendJSON
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-AQBSMYLT.js";
|
|
17
|
+
import "./chunk-DN4ASQ26.js";
|
|
18
18
|
import {
|
|
19
19
|
loadTeam
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-DUWREZXK.js";
|
|
21
|
+
import "./chunk-NETIY5UB.js";
|
|
22
22
|
import {
|
|
23
23
|
validateToken
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-5NLVGLD7.js";
|
|
25
|
+
import "./chunk-6XTEAFZQ.js";
|
|
26
|
+
import "./chunk-Y6HMJZDJ.js";
|
|
27
|
+
import "./chunk-GFORWAMW.js";
|
|
28
28
|
import "./chunk-GU2FZQ6A.js";
|
|
29
29
|
import "./chunk-R3GPQC7I.js";
|
|
30
30
|
import "./chunk-BE46C7JW.js";
|
|
31
31
|
import "./chunk-RNG3K465.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-FCW3K6F2.js";
|
|
33
|
+
import "./chunk-5GDYH676.js";
|
|
34
|
+
import "./chunk-CLKIMCXZ.js";
|
|
35
|
+
import "./chunk-I7WI3BMB.js";
|
|
36
36
|
import "./chunk-WHLVZCQY.js";
|
|
37
37
|
import "./chunk-TGTYKBGC.js";
|
|
38
38
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createToolRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y6HMJZDJ.js";
|
|
4
4
|
import {
|
|
5
5
|
callLLM
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FCW3K6F2.js";
|
|
7
7
|
import {
|
|
8
8
|
callOpenAILLM
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5GDYH676.js";
|
|
10
10
|
import {
|
|
11
11
|
MODEL_ALIASES,
|
|
12
12
|
MODEL_PROVIDERS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-I7WI3BMB.js";
|
|
14
14
|
import {
|
|
15
15
|
loadAgent,
|
|
16
16
|
loadLine,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attachWebSocket
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DN4ASQ26.js";
|
|
4
4
|
import {
|
|
5
5
|
addMember,
|
|
6
6
|
addTask,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
loadRun,
|
|
13
13
|
loadTeam,
|
|
14
14
|
updateTask
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DUWREZXK.js";
|
|
16
16
|
import {
|
|
17
17
|
deleteSession,
|
|
18
18
|
exportSession,
|
|
@@ -20,18 +20,18 @@ import {
|
|
|
20
20
|
listSessions,
|
|
21
21
|
loadSession,
|
|
22
22
|
saveSession
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-NETIY5UB.js";
|
|
24
24
|
import {
|
|
25
25
|
validateToken
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5NLVGLD7.js";
|
|
27
27
|
import {
|
|
28
28
|
Engine,
|
|
29
29
|
HYPERCORE_DIR,
|
|
30
30
|
initializeWorkspace
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-6XTEAFZQ.js";
|
|
32
32
|
import {
|
|
33
33
|
createToolRegistry
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Y6HMJZDJ.js";
|
|
35
35
|
import {
|
|
36
36
|
estimateCost,
|
|
37
37
|
formatCost
|
|
@@ -39,18 +39,18 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
createLLMClient,
|
|
41
41
|
streamCallLLM
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FCW3K6F2.js";
|
|
43
43
|
import {
|
|
44
44
|
createOpenAIClient,
|
|
45
45
|
streamOpenAIChat
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-5GDYH676.js";
|
|
47
47
|
import {
|
|
48
48
|
hookManager
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CLKIMCXZ.js";
|
|
50
50
|
import {
|
|
51
51
|
HYPERCORE_DIR as HYPERCORE_DIR2,
|
|
52
52
|
loadConfig
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-I7WI3BMB.js";
|
|
54
54
|
import {
|
|
55
55
|
listLines
|
|
56
56
|
} from "./chunk-WHLVZCQY.js";
|
|
@@ -662,7 +662,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
662
662
|
}
|
|
663
663
|
if (pathname === "/api/team/local-token" && method === "GET") {
|
|
664
664
|
try {
|
|
665
|
-
const { loadLocalToken } = await import("./auth-
|
|
665
|
+
const { loadLocalToken } = await import("./auth-5QFJLW7J.js");
|
|
666
666
|
const token = await loadLocalToken();
|
|
667
667
|
sendJSON(res, token || { available: false });
|
|
668
668
|
} catch {
|
|
@@ -778,7 +778,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
778
778
|
}
|
|
779
779
|
if (pathname === "/api/memory" && method === "GET") {
|
|
780
780
|
try {
|
|
781
|
-
const { getMemoryStats, listMemories } = await import("./store-
|
|
781
|
+
const { getMemoryStats, listMemories } = await import("./store-FKUTR7GW.js");
|
|
782
782
|
const layers = {};
|
|
783
783
|
for (const layer of ["personal", "project"]) {
|
|
784
784
|
try {
|
|
@@ -802,14 +802,14 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
802
802
|
}
|
|
803
803
|
if (pathname === "/api/memory/search" && method === "POST") {
|
|
804
804
|
try {
|
|
805
|
-
const { parseBody: parseBody2 } = await import("./server-
|
|
805
|
+
const { parseBody: parseBody2 } = await import("./server-HCNIP7ZQ.js");
|
|
806
806
|
const body = await parseBody2(req);
|
|
807
807
|
const query = body.query;
|
|
808
808
|
if (!query) {
|
|
809
809
|
sendError(res, "query is required", 400);
|
|
810
810
|
return;
|
|
811
811
|
}
|
|
812
|
-
const { searchMemories } = await import("./store-
|
|
812
|
+
const { searchMemories } = await import("./store-FKUTR7GW.js");
|
|
813
813
|
const results = await searchMemories("personal", query, {
|
|
814
814
|
category: body.category,
|
|
815
815
|
limit: 20
|
|
@@ -885,7 +885,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
885
885
|
}
|
|
886
886
|
if (pathname === "/api/instances" && method === "GET") {
|
|
887
887
|
try {
|
|
888
|
-
const { listInstances } = await import("./instance-registry-
|
|
888
|
+
const { listInstances } = await import("./instance-registry-J7UJ7U4Z.js");
|
|
889
889
|
const instances = await listInstances();
|
|
890
890
|
const currentPid = process.pid;
|
|
891
891
|
sendJSON(res, {
|
|
@@ -936,7 +936,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
936
936
|
}
|
|
937
937
|
if (pathname === "/api/onboard" && method === "POST") {
|
|
938
938
|
try {
|
|
939
|
-
const { parseBody: parseBody2 } = await import("./server-
|
|
939
|
+
const { parseBody: parseBody2 } = await import("./server-HCNIP7ZQ.js");
|
|
940
940
|
const body = await parseBody2(req);
|
|
941
941
|
if (!body.industry || !body.role || !body.provider || !body.apiKey) {
|
|
942
942
|
sendError(res, "\u7F3A\u5C11\u5FC5\u8981\u5B57\u6BB5\uFF08industry, role, provider, apiKey\uFF09", 400);
|
|
@@ -1049,7 +1049,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
if (pathname === "/api/admin/diagnose" && method === "GET") {
|
|
1051
1051
|
try {
|
|
1052
|
-
const { runRuleDiagnosis } = await import("./diagnose-
|
|
1052
|
+
const { runRuleDiagnosis } = await import("./diagnose-7UPLS7I4.js");
|
|
1053
1053
|
const url = new URL(req.url || "/", "http://localhost");
|
|
1054
1054
|
const days = parseInt(url.searchParams.get("days") || "7") || 7;
|
|
1055
1055
|
const findings = await runRuleDiagnosis(days);
|
|
@@ -1093,7 +1093,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
if (pathname === "/api/admin/tests" && method === "GET") {
|
|
1095
1095
|
try {
|
|
1096
|
-
const { getTestRunnerSnapshot } = await import("./test-runner-
|
|
1096
|
+
const { getTestRunnerSnapshot } = await import("./test-runner-AUAGIBNM.js");
|
|
1097
1097
|
const snapshot = await getTestRunnerSnapshot({
|
|
1098
1098
|
projectRoot: process.cwd(),
|
|
1099
1099
|
baseUrl: `http://127.0.0.1:${getActivePort()}`
|
|
@@ -1106,7 +1106,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
if (pathname === "/api/admin/tests/auto" && method === "GET") {
|
|
1108
1108
|
try {
|
|
1109
|
-
const { getAutoRegressionSnapshot } = await import("./test-runner-
|
|
1109
|
+
const { getAutoRegressionSnapshot } = await import("./test-runner-AUAGIBNM.js");
|
|
1110
1110
|
const snapshot = await getAutoRegressionSnapshot({
|
|
1111
1111
|
projectRoot: process.cwd(),
|
|
1112
1112
|
baseUrl: `http://127.0.0.1:${getActivePort()}`
|
|
@@ -1119,7 +1119,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
if (pathname === "/api/admin/tests/auto" && method === "POST") {
|
|
1121
1121
|
try {
|
|
1122
|
-
const { parseBody: parseBody2 } = await import("./server-
|
|
1122
|
+
const { parseBody: parseBody2 } = await import("./server-HCNIP7ZQ.js");
|
|
1123
1123
|
const body = await parseBody2(req);
|
|
1124
1124
|
const update = {};
|
|
1125
1125
|
if (Object.prototype.hasOwnProperty.call(body, "enabled")) {
|
|
@@ -1145,7 +1145,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
update.intervalMinutes = Math.floor(interval);
|
|
1147
1147
|
}
|
|
1148
|
-
const { updateAutoRegressionConfig, getTestRunnerSnapshot } = await import("./test-runner-
|
|
1148
|
+
const { updateAutoRegressionConfig, getTestRunnerSnapshot } = await import("./test-runner-AUAGIBNM.js");
|
|
1149
1149
|
await updateAutoRegressionConfig(update, {
|
|
1150
1150
|
projectRoot: process.cwd(),
|
|
1151
1151
|
baseUrl: `http://127.0.0.1:${getActivePort()}`
|
|
@@ -1168,7 +1168,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1168
1168
|
getTestRunDetail,
|
|
1169
1169
|
formatTestRunDownloadText,
|
|
1170
1170
|
getTestRunDownloadFileName
|
|
1171
|
-
} = await import("./test-runner-
|
|
1171
|
+
} = await import("./test-runner-AUAGIBNM.js");
|
|
1172
1172
|
const detail = await getTestRunDetail(runId);
|
|
1173
1173
|
const filename = getTestRunDownloadFileName(detail.info, "log");
|
|
1174
1174
|
const content = formatTestRunDownloadText(detail);
|
|
@@ -1182,7 +1182,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1182
1182
|
if (testRunExportMatch && method === "GET") {
|
|
1183
1183
|
try {
|
|
1184
1184
|
const runId = decodeURIComponent(testRunExportMatch[1]);
|
|
1185
|
-
const { getTestRunDetail, getTestRunDownloadFileName } = await import("./test-runner-
|
|
1185
|
+
const { getTestRunDetail, getTestRunDownloadFileName } = await import("./test-runner-AUAGIBNM.js");
|
|
1186
1186
|
const detail = await getTestRunDetail(runId);
|
|
1187
1187
|
const filename = getTestRunDownloadFileName(detail.info, "json");
|
|
1188
1188
|
const content = JSON.stringify(detail, null, 2);
|
|
@@ -1196,7 +1196,7 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1196
1196
|
if (testRunDetailMatch && method === "GET") {
|
|
1197
1197
|
try {
|
|
1198
1198
|
const runId = decodeURIComponent(testRunDetailMatch[1]);
|
|
1199
|
-
const { getTestRunDetail } = await import("./test-runner-
|
|
1199
|
+
const { getTestRunDetail } = await import("./test-runner-AUAGIBNM.js");
|
|
1200
1200
|
const detail = await getTestRunDetail(runId);
|
|
1201
1201
|
sendJSON(res, detail);
|
|
1202
1202
|
} catch (err) {
|
|
@@ -1206,10 +1206,10 @@ async function handleApiRequest(req, res, config, pathname) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
if (pathname === "/api/admin/tests/run" && method === "POST") {
|
|
1208
1208
|
try {
|
|
1209
|
-
const { parseBody: parseBody2 } = await import("./server-
|
|
1209
|
+
const { parseBody: parseBody2 } = await import("./server-HCNIP7ZQ.js");
|
|
1210
1210
|
const body = await parseBody2(req);
|
|
1211
1211
|
const suiteId = typeof body.suiteId === "string" && body.suiteId.trim() ? body.suiteId.trim() : void 0;
|
|
1212
|
-
const { startTestSuiteRun } = await import("./test-runner-
|
|
1212
|
+
const { startTestSuiteRun } = await import("./test-runner-AUAGIBNM.js");
|
|
1213
1213
|
const snapshot = await startTestSuiteRun({
|
|
1214
1214
|
projectRoot: process.cwd(),
|
|
1215
1215
|
suiteId,
|
|
@@ -1865,7 +1865,7 @@ function buildWebServer(config, host = "127.0.0.1") {
|
|
|
1865
1865
|
return;
|
|
1866
1866
|
}
|
|
1867
1867
|
if (pathname.startsWith("/api/network/")) {
|
|
1868
|
-
const { handleNetworkApiRequest } = await import("./api-
|
|
1868
|
+
const { handleNetworkApiRequest } = await import("./api-JHHOZTL6.js");
|
|
1869
1869
|
await handleNetworkApiRequest(req, res, config, pathname);
|
|
1870
1870
|
return;
|
|
1871
1871
|
}
|
|
@@ -1895,7 +1895,7 @@ function createWebServer(config, port, host = "127.0.0.1") {
|
|
|
1895
1895
|
const browserHost = resolveBrowserHost(host);
|
|
1896
1896
|
server.listen(port, host, () => {
|
|
1897
1897
|
setActivePort(port);
|
|
1898
|
-
import("./test-runner-
|
|
1898
|
+
import("./test-runner-AUAGIBNM.js").then(({ getAutoRegressionSnapshot }) => {
|
|
1899
1899
|
getAutoRegressionSnapshot({
|
|
1900
1900
|
projectRoot: process.cwd(),
|
|
1901
1901
|
baseUrl: `http://127.0.0.1:${port}`
|
|
@@ -1942,7 +1942,7 @@ function createWebServerAutoPort(config, startPort = 3210, host = "127.0.0.1", m
|
|
|
1942
1942
|
trackWebStart(host, port, host === "0.0.0.0" || host === "::");
|
|
1943
1943
|
}).catch(() => {
|
|
1944
1944
|
});
|
|
1945
|
-
import("./test-runner-
|
|
1945
|
+
import("./test-runner-AUAGIBNM.js").then(({ getAutoRegressionSnapshot }) => {
|
|
1946
1946
|
getAutoRegressionSnapshot({
|
|
1947
1947
|
projectRoot: process.cwd(),
|
|
1948
1948
|
baseUrl: `http://127.0.0.1:${port}`
|
|
@@ -1967,7 +1967,7 @@ function createWebServerAutoPort(config, startPort = 3210, host = "127.0.0.1", m
|
|
|
1967
1967
|
});
|
|
1968
1968
|
}
|
|
1969
1969
|
if (process.argv[1] && process.argv[1].includes("web/server")) {
|
|
1970
|
-
const { loadConfig: loadConfig2 } = await import("./config-
|
|
1970
|
+
const { loadConfig: loadConfig2 } = await import("./config-RSNQJQPS.js");
|
|
1971
1971
|
const config = await loadConfig2();
|
|
1972
1972
|
const port = parseInt(process.env.PORT || "3210", 10);
|
|
1973
1973
|
createWebServer(config, port);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadTeam,
|
|
3
3
|
updateMemberStatus
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DUWREZXK.js";
|
|
5
5
|
import {
|
|
6
6
|
validateToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5NLVGLD7.js";
|
|
8
8
|
|
|
9
9
|
// src/web/ws.ts
|
|
10
10
|
import { WebSocketServer, WebSocket } from "ws";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
generateId,
|
|
3
3
|
generateJoinCode,
|
|
4
4
|
generateToken
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5NLVGLD7.js";
|
|
6
6
|
import {
|
|
7
7
|
HYPERCORE_DIR
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I7WI3BMB.js";
|
|
9
9
|
|
|
10
10
|
// src/team/store.ts
|
|
11
11
|
import { readFile, writeFile, mkdir, readdir } from "fs/promises";
|
|
@@ -81,11 +81,27 @@ async function loadConfig() {
|
|
|
81
81
|
}
|
|
82
82
|
const content = await readFile(configPath, "utf-8");
|
|
83
83
|
const modelSection = parseSectionValues(content, "model");
|
|
84
|
-
const
|
|
84
|
+
const rawProvider = (modelSection["provider"] || "anthropic").trim();
|
|
85
|
+
const providerAliasMap = {
|
|
86
|
+
openai: "openai-compatible",
|
|
87
|
+
"openai-compat": "openai-compatible",
|
|
88
|
+
"openai_compatible": "openai-compatible",
|
|
89
|
+
"openai-compatible": "openai-compatible",
|
|
90
|
+
"deepseek-coder": "deepseek",
|
|
91
|
+
"deepseek-reasoner": "deepseek"
|
|
92
|
+
};
|
|
93
|
+
let provider = providerAliasMap[rawProvider] || rawProvider;
|
|
85
94
|
const apiKey = modelSection["api_key"];
|
|
86
95
|
if (!apiKey) {
|
|
87
96
|
throw new Error("\u914D\u7F6E\u6587\u4EF6 [model] \u6BB5\u672A\u627E\u5230 api_key");
|
|
88
97
|
}
|
|
98
|
+
const modelName = modelSection["name"];
|
|
99
|
+
if (!MODEL_PROVIDERS[provider] && modelName) {
|
|
100
|
+
if (modelName.startsWith("deepseek-")) provider = "deepseek";
|
|
101
|
+
else if (modelName.startsWith("gemini-")) provider = "gemini";
|
|
102
|
+
else if (modelName.startsWith("claude-")) provider = "anthropic";
|
|
103
|
+
else if (modelName.startsWith("MiniMax") || modelName.startsWith("minimax")) provider = "minimax";
|
|
104
|
+
}
|
|
89
105
|
const providerConfig = MODEL_PROVIDERS[provider];
|
|
90
106
|
if (!providerConfig) {
|
|
91
107
|
throw new Error(`\u4E0D\u652F\u6301\u7684\u6A21\u578B\u63D0\u4F9B\u5546: ${provider}\u3002\u652F\u6301: ${Object.keys(MODEL_PROVIDERS).join(", ")}`);
|
|
@@ -125,7 +141,7 @@ async function loadConfig() {
|
|
|
125
141
|
return {
|
|
126
142
|
modelConfig: {
|
|
127
143
|
provider,
|
|
128
|
-
model: modelSection["name"] || providerConfig.defaultModel,
|
|
144
|
+
model: modelSection["name"] || (rawProvider === "deepseek-coder" ? "deepseek-coder" : providerConfig.defaultModel),
|
|
129
145
|
apiKey,
|
|
130
146
|
baseURL: modelSection["base_url"] || providerConfig.baseURL,
|
|
131
147
|
sdkType: providerConfig.sdkType
|
|
@@ -214,7 +214,7 @@ async function runAIDiagnosis(ctx, days = 7) {
|
|
|
214
214
|
const aiFindings = [];
|
|
215
215
|
try {
|
|
216
216
|
if (ctx.config.modelConfig.sdkType === "openai") {
|
|
217
|
-
const { streamOpenAIChat } = await import("./openai-compat-
|
|
217
|
+
const { streamOpenAIChat } = await import("./openai-compat-R7EKWG6Z.js");
|
|
218
218
|
const OpenAI = (await import("openai")).default;
|
|
219
219
|
const client = ctx.getClient();
|
|
220
220
|
const result = await streamOpenAIChat(client, [
|
|
@@ -231,7 +231,7 @@ async function runAIDiagnosis(ctx, days = 7) {
|
|
|
231
231
|
});
|
|
232
232
|
aiRawText = result.content.trim();
|
|
233
233
|
} else {
|
|
234
|
-
const { streamCallLLM } = await import("./claude-
|
|
234
|
+
const { streamCallLLM } = await import("./claude-4BX3MJSK.js");
|
|
235
235
|
const Anthropic = (await import("@anthropic-ai/sdk")).default;
|
|
236
236
|
const client = ctx.getClient();
|
|
237
237
|
const result = await streamCallLLM(client, {
|
|
@@ -58,7 +58,7 @@ ${task.description}`;
|
|
|
58
58
|
});
|
|
59
59
|
const executionPromise = (async () => {
|
|
60
60
|
if (config.modelConfig.sdkType === "openai") {
|
|
61
|
-
const { streamOpenAIChat } = await import("./openai-compat-
|
|
61
|
+
const { streamOpenAIChat } = await import("./openai-compat-R7EKWG6Z.js");
|
|
62
62
|
const OpenAI = (await import("openai")).default;
|
|
63
63
|
const openaiClient = client;
|
|
64
64
|
const messages = [
|
|
@@ -81,7 +81,7 @@ ${task.description}`;
|
|
|
81
81
|
tokenUsage.inputTokens += result.tokenUsage.inputTokens;
|
|
82
82
|
tokenUsage.outputTokens += result.tokenUsage.outputTokens;
|
|
83
83
|
} else {
|
|
84
|
-
const { streamCallLLM } = await import("./claude-
|
|
84
|
+
const { streamCallLLM } = await import("./claude-4BX3MJSK.js");
|
|
85
85
|
const Anthropic = (await import("@anthropic-ai/sdk")).default;
|
|
86
86
|
const anthropicClient = client;
|
|
87
87
|
const result = await streamCallLLM(anthropicClient, {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
broadcastToTeam,
|
|
3
3
|
sendToMember
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DN4ASQ26.js";
|
|
5
5
|
import {
|
|
6
6
|
listTasks,
|
|
7
7
|
loadTeam
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DUWREZXK.js";
|
|
9
9
|
import {
|
|
10
10
|
generateId
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5NLVGLD7.js";
|
|
12
12
|
import {
|
|
13
13
|
callLLM,
|
|
14
14
|
createLLMClient
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FCW3K6F2.js";
|
|
16
16
|
import {
|
|
17
17
|
callOpenAILLM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5GDYH676.js";
|
|
19
19
|
import {
|
|
20
20
|
MODEL_ALIASES,
|
|
21
21
|
MODEL_PROVIDERS
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I7WI3BMB.js";
|
|
23
23
|
|
|
24
24
|
// src/network/store.ts
|
|
25
25
|
import fs from "fs/promises";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addMemory,
|
|
3
3
|
searchMemories
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GFORWAMW.js";
|
|
5
5
|
import {
|
|
6
6
|
applyPermissions
|
|
7
7
|
} from "./chunk-GU2FZQ6A.js";
|
|
8
8
|
import {
|
|
9
9
|
HYPERCORE_DIR
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-I7WI3BMB.js";
|
|
11
11
|
import {
|
|
12
12
|
getTaskOutput,
|
|
13
13
|
spawnBackground
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
callLLM,
|
|
3
3
|
createLLMClient,
|
|
4
4
|
streamCallLLM
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-FCW3K6F2.js";
|
|
6
|
+
import "./chunk-CLKIMCXZ.js";
|
|
7
|
+
import "./chunk-I7WI3BMB.js";
|
|
8
8
|
export {
|
|
9
9
|
callLLM,
|
|
10
10
|
createLLMClient,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadLocalToken
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5NLVGLD7.js";
|
|
4
4
|
import {
|
|
5
5
|
showError,
|
|
6
6
|
showTaskList,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-R3GPQC7I.js";
|
|
9
9
|
import "./chunk-BE46C7JW.js";
|
|
10
10
|
import "./chunk-RNG3K465.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-I7WI3BMB.js";
|
|
12
12
|
|
|
13
13
|
// src/team/commands.ts
|
|
14
14
|
import chalk from "chalk";
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
listMemories,
|
|
6
6
|
removeMemory,
|
|
7
7
|
searchMemories
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-GFORWAMW.js";
|
|
9
|
+
import "./chunk-I7WI3BMB.js";
|
|
10
10
|
|
|
11
11
|
// src/memory/commands.ts
|
|
12
12
|
import chalk from "chalk";
|
|
@@ -173,7 +173,7 @@ function createMemorySlashCommands() {
|
|
|
173
173
|
}
|
|
174
174
|
console.log(chalk.dim("\n \u{1F504} \u6B63\u5728\u4ECE\u5F53\u524D\u4F1A\u8BDD\u63D0\u53D6\u8BB0\u5FC6...\n"));
|
|
175
175
|
try {
|
|
176
|
-
const { extractMemories } = await import("./extractor-
|
|
176
|
+
const { extractMemories } = await import("./extractor-D3XWOAXI.js");
|
|
177
177
|
const extracted = await extractMemories(
|
|
178
178
|
ctx.chatHistory,
|
|
179
179
|
ctx.getClient(),
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
addMemory,
|
|
4
4
|
loadStore,
|
|
5
5
|
markExtraction
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GFORWAMW.js";
|
|
7
|
+
import "./chunk-I7WI3BMB.js";
|
|
8
8
|
|
|
9
9
|
// src/memory/extractor.ts
|
|
10
10
|
var EXTRACTION_SYSTEM = `You are a memory extraction assistant. Extract concise, durable facts from conversations.
|
|
@@ -37,7 +37,7 @@ async function extractMemories(history, client, config, layer, opts) {
|
|
|
37
37
|
const userPrompt = buildExtractionPrompt(history, existingTopics);
|
|
38
38
|
let rawOutput;
|
|
39
39
|
if (config.modelConfig.sdkType === "openai") {
|
|
40
|
-
const { streamOpenAIChat } = await import("./openai-compat-
|
|
40
|
+
const { streamOpenAIChat } = await import("./openai-compat-R7EKWG6Z.js");
|
|
41
41
|
const OpenAI = (await import("openai")).default;
|
|
42
42
|
const openaiClient = client;
|
|
43
43
|
const result = await streamOpenAIChat(openaiClient, [
|
|
@@ -53,7 +53,7 @@ async function extractMemories(history, client, config, layer, opts) {
|
|
|
53
53
|
});
|
|
54
54
|
rawOutput = result.content;
|
|
55
55
|
} else {
|
|
56
|
-
const { streamCallLLM } = await import("./claude-
|
|
56
|
+
const { streamCallLLM } = await import("./claude-4BX3MJSK.js");
|
|
57
57
|
const Anthropic = (await import("@anthropic-ai/sdk")).default;
|
|
58
58
|
const anthropicClient = client;
|
|
59
59
|
const result = await streamCallLLM(anthropicClient, {
|