hypercore-cli 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{api-XGC7D5AW.js → api-D4PUN5BN.js} +13 -13
  2. package/dist/{auth-DNQWYQKT.js → auth-UTR4I6QY.js} +2 -2
  3. package/dist/{chunk-GOOTEPBK.js → chunk-77FRUHTU.js} +1 -1
  4. package/dist/{chunk-KRPOPWGA.js → chunk-7ZYMJFCA.js} +1 -1
  5. package/dist/{chunk-GPPMJYSM.js → chunk-CM423E2U.js} +1 -1
  6. package/dist/{chunk-43OLRXM5.js → chunk-E4NKO2KI.js} +1 -1
  7. package/dist/{chunk-XOS6HPEF.js → chunk-GMLQ7GZ5.js} +1 -1
  8. package/dist/{chunk-AUHU7ALH.js → chunk-LWDNLX6B.js} +33 -31
  9. package/dist/{chunk-B6A2AKLN.js → chunk-NHPDLYEW.js} +1 -1
  10. package/dist/{chunk-6OL3GA3P.js → chunk-OGQGKMDX.js} +2 -2
  11. package/dist/{chunk-IXOIOGR5.js → chunk-OWAOKDIN.js} +2 -2
  12. package/dist/{chunk-3RPFCQKJ.js → chunk-SHJQMIJL.js} +2 -2
  13. package/dist/{chunk-V5UHPPSY.js → chunk-SVF2VWOZ.js} +8 -3
  14. package/dist/{chunk-MV4TTRYX.js → chunk-V2EBSFPU.js} +53 -11
  15. package/dist/{chunk-U5SGAIMM.js → chunk-VJDQNNSO.js} +6 -6
  16. package/dist/{chunk-2LJ2DVEB.js → chunk-VQ35XX7B.js} +2 -2
  17. package/dist/{chunk-XDRCBMZZ.js → chunk-XMGHVNH2.js} +1 -1
  18. package/dist/{chunk-CUVAUOXL.js → chunk-YWOSOTUO.js} +1 -1
  19. package/dist/{chunk-QTSLP47C.js → chunk-ZQRNV2US.js} +2 -2
  20. package/dist/{claude-NSQ442XD.js → claude-O5FSOXZC.js} +3 -3
  21. package/dist/{commands-CK3WFAGI.js → commands-43PLOWRU.js} +2 -2
  22. package/dist/{commands-ZE6GD3WC.js → commands-5YVUSUMP.js} +3 -3
  23. package/dist/{commands-U63OEO5J.js → commands-VZMZJFZF.js} +1 -1
  24. package/dist/{config-4EW42BSF.js → config-WXXEEEVW.js} +1 -1
  25. package/dist/{diagnose-AFW3ZTZ4.js → diagnose-BX45APUZ.js} +1 -1
  26. package/dist/{extractor-QV53W2YJ.js → extractor-R5ABXNTJ.js} +4 -4
  27. package/dist/{history-WMSCHERZ.js → history-JPXZEOT3.js} +1 -1
  28. package/dist/index.js +61 -64
  29. package/dist/{instance-registry-YSIJXSO7.js → instance-registry-6NJTCAE4.js} +2 -2
  30. package/dist/{keybindings-JAAMLH3G.js → keybindings-ADWNOX5M.js} +2 -2
  31. package/dist/{loader-WHNTZTLP.js → loader-AXDDCB2G.js} +2 -2
  32. package/dist/{network-MM6YWPGO.js → network-V3O4UZYZ.js} +8 -8
  33. package/dist/{openai-compat-UQWJXBEK.js → openai-compat-UFDV2SCK.js} +3 -3
  34. package/dist/{prompt-QV45TXRL.js → prompt-5CZ34WGA.js} +7 -7
  35. package/dist/{repl-RT3AHL7M.js → repl-EOWP6AAB.js} +32 -33
  36. package/dist/{server-PORT7OEG.js → server-BB5AENWU.js} +12 -12
  37. package/dist/{session-4VUNDWLH.js → session-5NDKKFLN.js} +2 -2
  38. package/dist/{skills-V4A35XKG.js → skills-JVLIQVJN.js} +2 -2
  39. package/dist/{store-Y4LU5QTO.js → store-G7KRD4PN.js} +2 -2
  40. package/dist/{team-HO7Z4SIM.js → team-FVNNVDBY.js} +3 -3
  41. package/dist/{test-runner-ZQH5Y6OJ.js → test-runner-REKSVPPY.js} +1 -1
  42. package/dist/{upgrade-7TGI3SXO.js → upgrade-YSXCO63I.js} +1 -1
  43. package/dist/web/static/onboard.html +11 -0
  44. package/dist/web/static/onboard.js +40 -0
  45. package/dist/{web-Z5HSCQHW.js → web-H2BJXUBZ.js} +12 -12
  46. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  loadKeyBindings,
3
3
  matchKeyBinding
4
- } from "./chunk-CUVAUOXL.js";
4
+ } from "./chunk-YWOSOTUO.js";
5
5
  import {
6
6
  notifyIfLong,
7
7
  setNotificationsEnabled
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  createSubAgentTool,
11
11
  runSubAgent
12
- } from "./chunk-QTSLP47C.js";
12
+ } from "./chunk-ZQRNV2US.js";
13
13
  import {
14
14
  createMultiplexer,
15
15
  createWebServerAutoPort,
@@ -43,9 +43,9 @@ import {
43
43
  hasGUIClients,
44
44
  isGitRepo,
45
45
  registerREPLContext
46
- } from "./chunk-AUHU7ALH.js";
47
- import "./chunk-2LJ2DVEB.js";
48
- import "./chunk-6OL3GA3P.js";
46
+ } from "./chunk-LWDNLX6B.js";
47
+ import "./chunk-VQ35XX7B.js";
48
+ import "./chunk-OGQGKMDX.js";
49
49
  import {
50
50
  deleteSession,
51
51
  exportSession,
@@ -55,14 +55,14 @@ import {
55
55
  loadSession,
56
56
  renameSession,
57
57
  saveSession
58
- } from "./chunk-XOS6HPEF.js";
59
- import "./chunk-XDRCBMZZ.js";
58
+ } from "./chunk-GMLQ7GZ5.js";
59
+ import "./chunk-XMGHVNH2.js";
60
60
  import {
61
61
  getCanonicalDashboardPort,
62
62
  registerInstance,
63
63
  unregisterInstance,
64
64
  updateInstanceRuntime
65
- } from "./chunk-GPPMJYSM.js";
65
+ } from "./chunk-CM423E2U.js";
66
66
  import {
67
67
  handleCheckpoint
68
68
  } from "./chunk-RKB2JOV2.js";
@@ -71,12 +71,12 @@ import {
71
71
  } from "./chunk-GH7E2OJE.js";
72
72
  import {
73
73
  Engine
74
- } from "./chunk-MV4TTRYX.js";
74
+ } from "./chunk-V2EBSFPU.js";
75
75
  import {
76
76
  closeMCPConnections,
77
77
  createToolRegistry
78
- } from "./chunk-IXOIOGR5.js";
79
- import "./chunk-KRPOPWGA.js";
78
+ } from "./chunk-OWAOKDIN.js";
79
+ import "./chunk-7ZYMJFCA.js";
80
80
  import "./chunk-GU2FZQ6A.js";
81
81
  import {
82
82
  showBanner,
@@ -104,20 +104,20 @@ import {
104
104
  import {
105
105
  createLLMClient,
106
106
  streamCallLLM
107
- } from "./chunk-43OLRXM5.js";
107
+ } from "./chunk-E4NKO2KI.js";
108
108
  import {
109
109
  createOpenAIClient,
110
110
  streamOpenAIChat
111
- } from "./chunk-GOOTEPBK.js";
111
+ } from "./chunk-77FRUHTU.js";
112
112
  import {
113
113
  hookManager
114
- } from "./chunk-B6A2AKLN.js";
114
+ } from "./chunk-NHPDLYEW.js";
115
115
  import {
116
116
  HYPERCORE_DIR,
117
117
  MODEL_ALIASES,
118
118
  MODEL_PROVIDERS,
119
119
  loadConfig
120
- } from "./chunk-V5UHPPSY.js";
120
+ } from "./chunk-SVF2VWOZ.js";
121
121
  import {
122
122
  listLines
123
123
  } from "./chunk-WHLVZCQY.js";
@@ -208,7 +208,7 @@ ${conversationText}
208
208
  \u8BF7\u76F4\u63A5\u8F93\u51FA\u6458\u8981\uFF0C\u4E0D\u8981\u6DFB\u52A0\u989D\u5916\u683C\u5F0F\u6216\u524D\u7F00\u3002`;
209
209
  let summaryText;
210
210
  if (config.modelConfig.sdkType === "openai") {
211
- const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UQWJXBEK.js");
211
+ const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UFDV2SCK.js");
212
212
  const OpenAI = (await import("openai")).default;
213
213
  const openaiClient = client;
214
214
  const result = await streamOpenAIChat2(openaiClient, [
@@ -224,7 +224,7 @@ ${conversationText}
224
224
  });
225
225
  summaryText = result.content;
226
226
  } else {
227
- const { streamCallLLM: streamCallLLM2 } = await import("./claude-NSQ442XD.js");
227
+ const { streamCallLLM: streamCallLLM2 } = await import("./claude-O5FSOXZC.js");
228
228
  const Anthropic = (await import("@anthropic-ai/sdk")).default;
229
229
  const anthropicClient = client;
230
230
  const result = await streamCallLLM2(anthropicClient, {
@@ -338,7 +338,7 @@ function createCustomHandler(promptTemplate) {
338
338
  ctx.chatHistory.push({ role: "user", content: prompt });
339
339
  try {
340
340
  if (ctx.config.modelConfig.sdkType === "openai") {
341
- const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UQWJXBEK.js");
341
+ const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UFDV2SCK.js");
342
342
  const OpenAI = (await import("openai")).default;
343
343
  const openaiClient = ctx.getClient();
344
344
  const messages = [
@@ -359,7 +359,7 @@ function createCustomHandler(promptTemplate) {
359
359
  ctx.sessionTokens.inputTokens += result.tokenUsage.inputTokens;
360
360
  ctx.sessionTokens.outputTokens += result.tokenUsage.outputTokens;
361
361
  } else {
362
- const { streamCallLLM: streamCallLLM2 } = await import("./claude-NSQ442XD.js");
362
+ const { streamCallLLM: streamCallLLM2 } = await import("./claude-O5FSOXZC.js");
363
363
  const Anthropic = (await import("@anthropic-ai/sdk")).default;
364
364
  const anthropicClient = ctx.getClient();
365
365
  const result = await streamCallLLM2(anthropicClient, {
@@ -1444,7 +1444,7 @@ ${diff.slice(0, 3e3)}
1444
1444
  let commitMsg = "";
1445
1445
  try {
1446
1446
  if (ctx.config.modelConfig.sdkType === "openai") {
1447
- const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UQWJXBEK.js");
1447
+ const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UFDV2SCK.js");
1448
1448
  const OpenAI = (await import("openai")).default;
1449
1449
  const openaiClient = ctx.getClient();
1450
1450
  const result = await streamOpenAIChat2(openaiClient, [
@@ -1460,7 +1460,7 @@ ${diff.slice(0, 3e3)}
1460
1460
  });
1461
1461
  commitMsg = result.content.trim();
1462
1462
  } else {
1463
- const { streamCallLLM: streamCallLLM2 } = await import("./claude-NSQ442XD.js");
1463
+ const { streamCallLLM: streamCallLLM2 } = await import("./claude-O5FSOXZC.js");
1464
1464
  const Anthropic = (await import("@anthropic-ai/sdk")).default;
1465
1465
  const anthropicClient = ctx.getClient();
1466
1466
  const result = await streamCallLLM2(anthropicClient, {
@@ -1578,7 +1578,7 @@ BODY:
1578
1578
  let prContent = "";
1579
1579
  try {
1580
1580
  if (ctx.config.modelConfig.sdkType === "openai") {
1581
- const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UQWJXBEK.js");
1581
+ const { streamOpenAIChat: streamOpenAIChat2 } = await import("./openai-compat-UFDV2SCK.js");
1582
1582
  const OpenAI = (await import("openai")).default;
1583
1583
  const openaiClient = ctx.getClient();
1584
1584
  const result = await streamOpenAIChat2(openaiClient, [
@@ -1594,7 +1594,7 @@ BODY:
1594
1594
  });
1595
1595
  prContent = result.content.trim();
1596
1596
  } else {
1597
- const { streamCallLLM: streamCallLLM2 } = await import("./claude-NSQ442XD.js");
1597
+ const { streamCallLLM: streamCallLLM2 } = await import("./claude-O5FSOXZC.js");
1598
1598
  const Anthropic = (await import("@anthropic-ai/sdk")).default;
1599
1599
  const anthropicClient = ctx.getClient();
1600
1600
  const result = await streamCallLLM2(anthropicClient, {
@@ -2337,7 +2337,7 @@ ${planResult.output}${checkpointResult.feedback ? `
2337
2337
  description: "\u5217\u51FA\u6240\u6709\u53EF\u7528\u6280\u80FD",
2338
2338
  category: "util",
2339
2339
  handler: async () => {
2340
- const { listAvailableSkills } = await import("./skills-V4A35XKG.js");
2340
+ const { listAvailableSkills } = await import("./skills-JVLIQVJN.js");
2341
2341
  const skills = await listAvailableSkills();
2342
2342
  if (skills.length === 0) {
2343
2343
  console.log(chalk3.dim("\n \u6682\u65E0\u53EF\u7528\u6280\u80FD"));
@@ -2623,7 +2623,7 @@ ${planResult.output}${checkpointResult.feedback ? `
2623
2623
  description: "\u67E5\u770B\u5FEB\u6377\u952E\u7ED1\u5B9A",
2624
2624
  category: "util",
2625
2625
  handler: async () => {
2626
- const { listKeyBindings } = await import("./keybindings-JAAMLH3G.js");
2626
+ const { listKeyBindings } = await import("./keybindings-ADWNOX5M.js");
2627
2627
  const bindings = listKeyBindings();
2628
2628
  console.log(chalk3.bold("\n \u5FEB\u6377\u952E\u7ED1\u5B9A:\n"));
2629
2629
  for (const b of bindings) {
@@ -2712,7 +2712,7 @@ async function startREPL(options) {
2712
2712
  let memoryRoundCount = 0;
2713
2713
  const hyperMd = await loadHyperMd();
2714
2714
  const project = await detectProject();
2715
- const { loadMemoryForSystemPrompt } = await import("./loader-WHNTZTLP.js");
2715
+ const { loadMemoryForSystemPrompt } = await import("./loader-AXDDCB2G.js");
2716
2716
  const { memoryBlock } = await loadMemoryForSystemPrompt();
2717
2717
  let systemPrompt = "";
2718
2718
  if (hyperMd) {
@@ -2755,13 +2755,13 @@ Git: ${branch} (${statusStr})`;
2755
2755
  if (customCmds.length > 0) {
2756
2756
  commandRegistry.registerAll(customCmds);
2757
2757
  }
2758
- const { createTeamSlashCommands } = await import("./commands-CK3WFAGI.js");
2758
+ const { createTeamSlashCommands } = await import("./commands-43PLOWRU.js");
2759
2759
  commandRegistry.registerAll(createTeamSlashCommands());
2760
- const { createMemorySlashCommands } = await import("./commands-ZE6GD3WC.js");
2760
+ const { createMemorySlashCommands } = await import("./commands-5YVUSUMP.js");
2761
2761
  commandRegistry.registerAll(createMemorySlashCommands());
2762
- const { createAdminSlashCommands } = await import("./commands-U63OEO5J.js");
2762
+ const { createAdminSlashCommands } = await import("./commands-VZMZJFZF.js");
2763
2763
  commandRegistry.registerAll(createAdminSlashCommands());
2764
- const { loadSkills } = await import("./skills-V4A35XKG.js");
2764
+ const { loadSkills } = await import("./skills-JVLIQVJN.js");
2765
2765
  const skillCmds = await loadSkills();
2766
2766
  if (skillCmds.length > 0) {
2767
2767
  commandRegistry.registerAll(skillCmds);
@@ -2868,7 +2868,6 @@ Git: ${branch} (${statusStr})`;
2868
2868
  const baseW = envW > 0 ? Math.min(reportedW, envW) : reportedW;
2869
2869
  const termW = Math.max(24, Math.min(baseW - 4, 96));
2870
2870
  const sepLine = chalk3.dim("\u2500".repeat(termW));
2871
- process.stdout.write("\x1B[J");
2872
2871
  process.stdout.write(sepLine + "\n");
2873
2872
  process.stdout.write(chalk3.dim(" ? for shortcuts") + "\n");
2874
2873
  const vimIndicator = getVimModeIndicator(vimState);
@@ -2944,7 +2943,7 @@ Git: ${branch} (${statusStr})`;
2944
2943
  }
2945
2944
  if (chatHistory.length >= 4) {
2946
2945
  try {
2947
- const { extractMemories } = await import("./extractor-QV53W2YJ.js");
2946
+ const { extractMemories } = await import("./extractor-R5ABXNTJ.js");
2948
2947
  await extractMemories(chatHistory, client, config, "personal");
2949
2948
  } catch {
2950
2949
  }
@@ -3349,7 +3348,7 @@ Git: ${branch} (${statusStr})`;
3349
3348
  _sessionRounds++;
3350
3349
  memoryRoundCount++;
3351
3350
  if (memoryRoundCount % 3 === 0) {
3352
- const { triggerAutoExtraction } = await import("./extractor-QV53W2YJ.js");
3351
+ const { triggerAutoExtraction } = await import("./extractor-R5ABXNTJ.js");
3353
3352
  triggerAutoExtraction(chatHistory, client, config, ["personal"]);
3354
3353
  }
3355
3354
  }
@@ -17,22 +17,22 @@ import {
17
17
  sendError,
18
18
  sendJSON,
19
19
  setActivePort
20
- } from "./chunk-AUHU7ALH.js";
21
- import "./chunk-2LJ2DVEB.js";
22
- import "./chunk-6OL3GA3P.js";
23
- import "./chunk-XOS6HPEF.js";
24
- import "./chunk-XDRCBMZZ.js";
25
- import "./chunk-MV4TTRYX.js";
26
- import "./chunk-IXOIOGR5.js";
27
- import "./chunk-KRPOPWGA.js";
20
+ } from "./chunk-LWDNLX6B.js";
21
+ import "./chunk-VQ35XX7B.js";
22
+ import "./chunk-OGQGKMDX.js";
23
+ import "./chunk-GMLQ7GZ5.js";
24
+ import "./chunk-XMGHVNH2.js";
25
+ import "./chunk-V2EBSFPU.js";
26
+ import "./chunk-OWAOKDIN.js";
27
+ import "./chunk-7ZYMJFCA.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-43OLRXM5.js";
33
- import "./chunk-GOOTEPBK.js";
34
- import "./chunk-B6A2AKLN.js";
35
- import "./chunk-V5UHPPSY.js";
32
+ import "./chunk-E4NKO2KI.js";
33
+ import "./chunk-77FRUHTU.js";
34
+ import "./chunk-NHPDLYEW.js";
35
+ import "./chunk-SVF2VWOZ.js";
36
36
  import "./chunk-WHLVZCQY.js";
37
37
  import "./chunk-TGTYKBGC.js";
38
38
  export {
@@ -7,8 +7,8 @@ import {
7
7
  loadSession,
8
8
  renameSession,
9
9
  saveSession
10
- } from "./chunk-XOS6HPEF.js";
11
- import "./chunk-V5UHPPSY.js";
10
+ } from "./chunk-GMLQ7GZ5.js";
11
+ import "./chunk-SVF2VWOZ.js";
12
12
  export {
13
13
  deleteSession,
14
14
  exportSession,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runSubAgent
3
- } from "./chunk-QTSLP47C.js";
3
+ } from "./chunk-ZQRNV2US.js";
4
4
  import {
5
5
  renderMarkdown
6
6
  } from "./chunk-GH7E2OJE.js";
@@ -8,7 +8,7 @@ import "./chunk-GU2FZQ6A.js";
8
8
  import "./chunk-BE46C7JW.js";
9
9
  import {
10
10
  HYPERCORE_DIR
11
- } from "./chunk-V5UHPPSY.js";
11
+ } from "./chunk-SVF2VWOZ.js";
12
12
 
13
13
  // src/repl/skills.ts
14
14
  import { existsSync } from "fs";
@@ -9,8 +9,8 @@ import {
9
9
  removeMemory,
10
10
  saveStore,
11
11
  searchMemories
12
- } from "./chunk-KRPOPWGA.js";
13
- import "./chunk-V5UHPPSY.js";
12
+ } from "./chunk-7ZYMJFCA.js";
13
+ import "./chunk-SVF2VWOZ.js";
14
14
  export {
15
15
  addMemory,
16
16
  generateMemoryId,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createTeam
3
- } from "./chunk-6OL3GA3P.js";
3
+ } from "./chunk-OGQGKMDX.js";
4
4
  import {
5
5
  clearLocalToken,
6
6
  loadLocalToken,
7
7
  saveLocalToken
8
- } from "./chunk-XDRCBMZZ.js";
8
+ } from "./chunk-XMGHVNH2.js";
9
9
  import {
10
10
  showError,
11
11
  showTaskList,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-R3GPQC7I.js";
15
15
  import "./chunk-BE46C7JW.js";
16
16
  import "./chunk-RNG3K465.js";
17
- import "./chunk-V5UHPPSY.js";
17
+ import "./chunk-SVF2VWOZ.js";
18
18
 
19
19
  // src/commands/team.ts
20
20
  import chalk from "chalk";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HYPERCORE_DIR
3
- } from "./chunk-V5UHPPSY.js";
3
+ } from "./chunk-SVF2VWOZ.js";
4
4
 
5
5
  // src/admin/test-runner.ts
6
6
  import { spawn } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HYPERCORE_DIR
3
- } from "./chunk-V5UHPPSY.js";
3
+ } from "./chunk-SVF2VWOZ.js";
4
4
 
5
5
  // src/commands/upgrade.ts
6
6
  import { readdir, copyFile, mkdir } from "fs/promises";
@@ -104,12 +104,23 @@
104
104
  <button class="ob-option" data-value="minimax">🤖 MiniMax M2.5<span class="ob-tag">性价比高</span></button>
105
105
  <button class="ob-option" data-value="deepseek">🧊 DeepSeek<span class="ob-tag">国产首选</span></button>
106
106
  <button class="ob-option" data-value="anthropic">🧠 Anthropic Claude<span class="ob-tag">最强推理</span></button>
107
+ <button class="ob-option" data-value="openai-compatible">🔗 OpenAI 兼容<span class="ob-tag">自定义网关</span></button>
107
108
  </div>
108
109
  <div class="ob-input-group">
109
110
  <label for="apiKeyInput">API Key</label>
110
111
  <input type="password" id="apiKeyInput" class="ob-input" placeholder="粘贴你的 API Key…">
111
112
  <button class="ob-toggle-pw" id="togglePw" title="显示/隐藏" aria-label="切换密码可见性" type="button">👁️</button>
112
113
  </div>
114
+ <div id="compatFields" style="display:none;">
115
+ <div class="ob-input-group">
116
+ <label for="customBaseUrlInput">API Base URL</label>
117
+ <input type="text" id="customBaseUrlInput" class="ob-input" placeholder="例如 https://api.openai.com/v1">
118
+ </div>
119
+ <div class="ob-input-group">
120
+ <label for="customModelNameInput">模型名</label>
121
+ <input type="text" id="customModelNameInput" class="ob-input" placeholder="例如 gpt-4o / deepseek-chat">
122
+ </div>
123
+ </div>
113
124
  <div class="ob-input-group">
114
125
  <label for="tavilyKeyInput">Tavily API Key <span class="ob-optional">可选</span></label>
115
126
  <input type="password" id="tavilyKeyInput" class="ob-input" placeholder="用于网络搜索(可跳过)">
@@ -16,6 +16,8 @@ class OnboardingWizard {
16
16
  platforms: [],
17
17
  provider: '',
18
18
  apiKey: '',
19
+ customBaseUrl: '',
20
+ customModelName: '',
19
21
  tavilyKey: '',
20
22
  freeDescription: '',
21
23
  };
@@ -28,6 +30,9 @@ class OnboardingWizard {
28
30
  errorMsg: document.getElementById('errorMsg'),
29
31
  apiKeyInput: document.getElementById('apiKeyInput'),
30
32
  tavilyKeyInput: document.getElementById('tavilyKeyInput'),
33
+ customBaseUrlInput: document.getElementById('customBaseUrlInput'),
34
+ customModelNameInput: document.getElementById('customModelNameInput'),
35
+ compatFields: document.getElementById('compatFields'),
31
36
  freeDescription: document.getElementById('freeDescription'),
32
37
  togglePw: document.getElementById('togglePw'),
33
38
  };
@@ -47,6 +52,9 @@ class OnboardingWizard {
47
52
  group.querySelectorAll('.ob-option').forEach(b => b.classList.remove('selected'));
48
53
  btn.classList.add('selected');
49
54
  }
55
+ if (group.dataset.field === 'provider') {
56
+ this.syncProviderCompatFields();
57
+ }
50
58
  this.clearError();
51
59
  });
52
60
  });
@@ -73,6 +81,25 @@ class OnboardingWizard {
73
81
  this.render();
74
82
  }
75
83
 
84
+ syncProviderCompatFields() {
85
+ if (!this.els.compatFields) return;
86
+
87
+ const providerGroup = document.querySelector('.ob-step[data-step="6"] .ob-options[data-field="provider"]');
88
+ const selectedBtn = providerGroup ? providerGroup.querySelector('.ob-option.selected') : null;
89
+ const selectedProvider = selectedBtn ? selectedBtn.dataset.value : this.answers.provider;
90
+ if (selectedProvider) this.answers.provider = selectedProvider;
91
+
92
+ const showCompat = selectedProvider === 'openai-compatible';
93
+ this.els.compatFields.style.display = showCompat ? 'block' : 'none';
94
+
95
+ if (!showCompat) {
96
+ this.answers.customBaseUrl = '';
97
+ this.answers.customModelName = '';
98
+ if (this.els.customBaseUrlInput) this.els.customBaseUrlInput.value = '';
99
+ if (this.els.customModelNameInput) this.els.customModelNameInput.value = '';
100
+ }
101
+ }
102
+
76
103
  render() {
77
104
  // Progress
78
105
  const pct = (this.currentStep / this.totalSteps) * 100;
@@ -87,6 +114,7 @@ class OnboardingWizard {
87
114
 
88
115
  // Back button visibility
89
116
  this.els.btnBack.style.visibility = this.currentStep > 1 ? 'visible' : 'hidden';
117
+ this.syncProviderCompatFields();
90
118
 
91
119
  // Next button text
92
120
  if (this.currentStep === this.totalSteps) {
@@ -158,6 +186,18 @@ class OnboardingWizard {
158
186
  return false;
159
187
  }
160
188
  this.answers.apiKey = apiKey;
189
+ if (this.answers.provider === 'openai-compatible') {
190
+ const baseUrl = (this.els.customBaseUrlInput?.value || '').trim();
191
+ if (!baseUrl || !baseUrl.startsWith('http')) {
192
+ this.showError('OpenAI 兼容模式需要有效的 API Base URL');
193
+ return false;
194
+ }
195
+ this.answers.customBaseUrl = baseUrl;
196
+ this.answers.customModelName = (this.els.customModelNameInput?.value || '').trim() || 'gpt-4o';
197
+ } else {
198
+ this.answers.customBaseUrl = '';
199
+ this.answers.customModelName = '';
200
+ }
161
201
  this.answers.tavilyKey = this.els.tavilyKeyInput.value.trim();
162
202
  return true;
163
203
  }
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  createWebServerAutoPort
3
- } from "./chunk-AUHU7ALH.js";
4
- import "./chunk-2LJ2DVEB.js";
5
- import "./chunk-6OL3GA3P.js";
6
- import "./chunk-XOS6HPEF.js";
7
- import "./chunk-XDRCBMZZ.js";
8
- import "./chunk-MV4TTRYX.js";
9
- import "./chunk-IXOIOGR5.js";
10
- import "./chunk-KRPOPWGA.js";
3
+ } from "./chunk-LWDNLX6B.js";
4
+ import "./chunk-VQ35XX7B.js";
5
+ import "./chunk-OGQGKMDX.js";
6
+ import "./chunk-GMLQ7GZ5.js";
7
+ import "./chunk-XMGHVNH2.js";
8
+ import "./chunk-V2EBSFPU.js";
9
+ import "./chunk-OWAOKDIN.js";
10
+ import "./chunk-7ZYMJFCA.js";
11
11
  import "./chunk-GU2FZQ6A.js";
12
12
  import "./chunk-R3GPQC7I.js";
13
13
  import "./chunk-BE46C7JW.js";
14
14
  import "./chunk-RNG3K465.js";
15
- import "./chunk-43OLRXM5.js";
16
- import "./chunk-GOOTEPBK.js";
17
- import "./chunk-B6A2AKLN.js";
18
- import "./chunk-V5UHPPSY.js";
15
+ import "./chunk-E4NKO2KI.js";
16
+ import "./chunk-77FRUHTU.js";
17
+ import "./chunk-NHPDLYEW.js";
18
+ import "./chunk-SVF2VWOZ.js";
19
19
  import "./chunk-WHLVZCQY.js";
20
20
  import "./chunk-TGTYKBGC.js";
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "AI-Native CLI Shell — multi-model, production lines, MCP tools, team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",