@yeaft/webchat-agent 1.0.442 → 1.0.443

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/index.js CHANGED
@@ -24,6 +24,7 @@ import { connect } from './connection.js';
24
24
  import { loadMcpServers } from './mcp.js';
25
25
  import { SAFE_REMOTE_UPGRADE_CAPABILITY } from './upgrade-command.js';
26
26
  import { loadConfig as loadYeaftConfig } from './yeaft/config.js';
27
+ import { initYeaftDir } from './yeaft/init.js';
27
28
  import { updateBrowserRuntimeSettings } from './yeaft/config-api.js';
28
29
  import { bootBrowserRuntime, shutdownBrowserRuntime } from './browser-runtime/index.js';
29
30
  import {
@@ -106,12 +107,15 @@ const { agentName: AGENT_NAME, instanceId: INSTANCE_ID } = resolveRuntimeIdentit
106
107
  // WebSocket connection goes live, so downstream code can assume a real path.
107
108
  const YEAFT_DIR = process.env.YEAFT_DIR || fileConfig.yeaftDir || getDefaultYeaftDir(INSTANCE_ID);
108
109
  try {
109
- if (!existsSync(YEAFT_DIR)) {
110
- mkdirSync(YEAFT_DIR, { recursive: true, mode: 0o700 });
111
- console.log(`[Agent] Created yeaft dir: ${YEAFT_DIR}`);
110
+ const initResult = initYeaftDir(YEAFT_DIR);
111
+ for (const warning of initResult.warnings || []) {
112
+ console.warn(`[Agent] ${warning}`);
113
+ }
114
+ if (initResult.created?.length > 0) {
115
+ console.log(`[Agent] Initialized yeaft dir: ${YEAFT_DIR}`);
112
116
  }
113
117
  } catch (err) {
114
- console.warn(`[Agent] Could not ensure yeaft dir ${YEAFT_DIR}: ${err?.message || err}`);
118
+ console.warn(`[Agent] Could not initialize yeaft dir ${YEAFT_DIR}: ${err?.message || err}`);
115
119
  }
116
120
 
117
121
  const agentSecret = process.env.AGENT_SECRET_FILE
@@ -1 +1 @@
1
- {"version":"1.0.442"}
1
+ {"version":"1.0.443"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "1.0.442",
3
+ "version": "1.0.443",
4
4
  "description": "Remote worker agent for Yeaft Web Code Agent — connects the native Yeaft engine, CLI providers, and workbench tools",
5
5
  "main": "index.js",
6
6
  "type": "module",