@yeaft/webchat-agent 1.0.300 → 1.0.302

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/context.js CHANGED
@@ -18,6 +18,7 @@ export default {
18
18
  pendingUserQuestions: new Map(),
19
19
  nodePty: null,
20
20
  CONFIG: null,
21
+ managedCliReady: Promise.resolve([]),
21
22
  agentCapabilities: [],
22
23
  // Agent 级别的 slash commands 缓存(所有 conversation 共用)
23
24
  slashCommands: [],
package/index.js CHANGED
@@ -14,6 +14,7 @@ import { getDefaultAgentName, getDefaultYeaftDir, resolveRuntimeIdentity, getCon
14
14
  import { loadNodePty } from './terminal.js';
15
15
  import { connect } from './connection.js';
16
16
  import { loadMcpServers } from './mcp.js';
17
+ import { ensureManagedCliTools, summarizeManagedCliResults } from './yeaft/managed-cli.js';
17
18
 
18
19
  const execAsync = promisify(exec);
19
20
 
@@ -349,10 +350,18 @@ process.on('SIGTERM', async () => {
349
350
 
350
351
  // 启动 - 先确保依赖,再检测能力,预热 models.dev 缓存,再连接
351
352
  (async () => {
353
+ let managedCliReady = Promise.resolve([]);
352
354
  if (process.env.YEAFT_SKIP_STARTUP_INSTALLS !== 'true') {
353
355
  await ensureDependencies();
354
356
  await ensureYeaftSkills();
357
+ managedCliReady = ensureManagedCliTools({ yeaftDir: YEAFT_DIR });
358
+ managedCliReady.then(results => {
359
+ console.log(`[Startup] managed CLI tools: ${summarizeManagedCliResults(results)}`);
360
+ }).catch(error => {
361
+ console.warn(`[Startup] managed CLI setup failed; using built-in fallbacks: ${error?.message || error}`);
362
+ });
355
363
  }
364
+ ctx.managedCliReady = managedCliReady;
356
365
  ctx.agentCapabilities = await detectCapabilities();
357
366
  // Prime the models.dev community catalog so the Yeaft engine's *synchronous*
358
367
  // hot path (engine.js / config.js / cli.js all read context-window inline)
@@ -1 +1 @@
1
- {"version":"1.0.300"}
1
+ {"version":"1.0.302"}
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
6
6
  <title>Yeaft</title>
7
7
  <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='8' fill='%232c2c2c'/><path d='M16 22V13M16 13L10 8M16 13L22 8' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/><circle cx='10' cy='8' r='2.4' fill='white'/><circle cx='22' cy='8' r='2.4' fill='white'/><circle cx='16' cy='22' r='2.4' fill='white'/></svg>">
8
- <link rel="stylesheet" href="style.bundle.css?v=93661159">
8
+ <link rel="stylesheet" href="style.bundle.css?v=5661e0d4">
9
9
  <script src="vendor.bundle.js?v=103fd8e7"></script>
10
10
  <script defer src="jszip.min.js"></script>
11
11
  <script defer src="docx-preview.min.js"></script>