@yeaft/webchat-agent 1.0.18 → 1.0.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
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",
package/yeaft/cli.js CHANGED
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Features:
9
9
  * --dry-run "prompt" — Assemble system prompt + messages, don't call LLM
10
- * --trace stats|recent|search <keyword>|tools|compact — Query/maintain debug.db
10
+ * --trace stats|recent|search <keyword>|tools|compact — Query/maintain debug trace files
11
11
  * -i / --interactive — REPL mode with / commands
12
12
  * <prompt> — One-shot query (Phase 1: engine.query)
13
13
  * --skip-mcp — Skip MCP server connections (faster startup)
@@ -117,12 +117,12 @@ function parseArgs(argv) {
117
117
  // ─── Trace query handler ───────────────────────────────────────
118
118
 
119
119
  function handleTraceQuery(args, config) {
120
- const dbPath = join(config.dir, 'debug.db');
120
+ const traceDir = config.dir;
121
121
  let trace;
122
122
  try {
123
- trace = new DebugTrace(dbPath);
123
+ trace = new DebugTrace(traceDir);
124
124
  } catch (e) {
125
- throw new Error(`Cannot open debug database at ${dbPath}: ${e.message}`);
125
+ throw new Error(`Cannot open debug trace store at ${traceDir}: ${e.message}`);
126
126
  }
127
127
 
128
128
  try {
@@ -133,7 +133,7 @@ function handleTraceQuery(args, config) {
133
133
  console.log(` Turns: ${s.turnCount}`);
134
134
  console.log(` Tools: ${s.toolCount}`);
135
135
  console.log(` Events: ${s.eventCount}`);
136
- console.log(` DB Size: ${(s.dbSizeBytes / 1024).toFixed(1)} KB`);
136
+ console.log(` Disk: ${(s.dbSizeBytes / 1024).toFixed(1)} KB`);
137
137
  break;
138
138
  }
139
139
  case 'recent': {
@@ -175,8 +175,8 @@ function handleTraceQuery(args, config) {
175
175
  }
176
176
  case 'compact': {
177
177
  const s = trace.stats();
178
- console.log(`Compacting debug database (${(s.dbSizeBytes / 1048576).toFixed(1)} MB, ${s.turnCount} turns)...`);
179
- console.log('This rebuilds the file and may take a while on a large DB. Do not interrupt.');
178
+ console.log(`Compacting debug trace files (${(s.dbSizeBytes / 1048576).toFixed(1)} MB, ${s.turnCount} turns)...`);
179
+ console.log('This prunes old request folders and may take a moment. Do not interrupt.');
180
180
  const { before, after } = trace.compact();
181
181
  const saved = Math.max(0, before - after);
182
182
  console.log(`Done. ${(before / 1048576).toFixed(1)} MB → ${(after / 1048576).toFixed(1)} MB (reclaimed ${(saved / 1048576).toFixed(1)} MB).`);