wtt-connect 0.2.3 → 0.2.5

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/README.md CHANGED
@@ -142,7 +142,7 @@ A profile contains exactly one WTT identity: `WTT_AGENT_ID`, `WTT_TOKEN`, adapte
142
142
  Workdir rules:
143
143
 
144
144
  - If `--workdir` or `WTT_CONNECT_WORKDIR` is provided, that exact directory is used for agent execution, shell, terminal, runtime info, and adapter cwd.
145
- - If no workdir is provided, `wtt-connect` uses `./workspaces/<agent_id>` under the current default directory. This prevents multiple claimed agents on the same host from sharing the `wtt-connect` package directory.
145
+ - If no workdir is provided, `wtt-connect` uses `~/.wtt-connect/<agent_id>`. This gives every claimed WTT agent identity its own stable workspace independent of the npm package install directory.
146
146
  - For an existing profile, run `wtt-connect workdir <profile> /path/to/workspace --restart`. This updates `~/.config/wtt-connect/profiles/<profile>.env`, creates the directory, and restarts the service.
147
147
 
148
148
  Useful flags:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wtt-connect",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "private": false,
5
5
  "description": "WTT-native connector daemon for Codex, Claude Code, Cursor, Gemini, ACP, and other coding agent surfaces.",
6
6
  "type": "module",
package/src/config.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import fs from 'node:fs';
2
+ import os from 'node:os';
2
3
  import path from 'node:path';
3
4
  import { parseBool, parseIntEnv } from './env.js';
4
5
 
@@ -100,9 +101,9 @@ export function loadConfig(argv = {}) {
100
101
  };
101
102
  }
102
103
 
103
- export function resolveAgentWorkDir(explicitWorkDir, agentId, baseDir = process.cwd()) {
104
+ export function resolveAgentWorkDir(explicitWorkDir, agentId) {
104
105
  if (explicitWorkDir) return path.resolve(String(explicitWorkDir));
105
- return path.resolve(baseDir, 'workspaces', safeAgentPathSegment(agentId));
106
+ return path.join(os.homedir(), '.wtt-connect', safeAgentPathSegment(agentId));
106
107
  }
107
108
 
108
109
  export function safeAgentPathSegment(agentId) {
package/src/runner.js CHANGED
@@ -284,7 +284,7 @@ export class Runner {
284
284
  statusText: 'OpenDesign 正在生成可视化 artifact',
285
285
  statusKind: 'opendesign',
286
286
  adapter: adapter.name,
287
- ttlMs: 30000,
287
+ ttlMs: 90000,
288
288
  });
289
289
  const outputDir = await prepareOpenDesignDir(this.config, topicId);
290
290
  const skills = chooseOpenDesignSkills(message, reply);
@@ -310,7 +310,7 @@ export class Runner {
310
310
  statusText: 'OpenDesign 正在重写低质量 artifact',
311
311
  statusKind: 'opendesign_repair',
312
312
  adapter: adapter.name,
313
- ttlMs: 45000,
313
+ ttlMs: 120000,
314
314
  });
315
315
  await adapter.run(buildOpenDesignRepairPrompt({ outputDir, issues: quality.issues, locale }), {
316
316
  sessionKey: `wtt:opendesign:${topicId}`,
@@ -357,7 +357,7 @@ export class Runner {
357
357
  statusText: activityText,
358
358
  statusKind: normalized?.kind || 'running',
359
359
  adapter: adapterName,
360
- ttlMs: 30000,
360
+ ttlMs: 60000,
361
361
  });
362
362
  }
363
363
  if (!this.config.publishProgress) return;
@@ -33,7 +33,7 @@ export async function up(argv) {
33
33
  const stateDir = path.resolve(argv.stateDir || defaultStateDir(profile));
34
34
  const envFile = path.resolve(argv.envFile || profileEnvFile(profile));
35
35
  const root = packageRoot();
36
- const workDir = resolveAgentWorkDir(argv.workdir || argv.workDir || '', agentId, process.cwd());
36
+ const workDir = resolveAgentWorkDir(argv.workdir || argv.workDir || process.env.WTT_CONNECT_WORKDIR || '', agentId);
37
37
  const baseUrl = argv.baseUrl || process.env.WTT_BASE_URL || DEFAULT_BASE_URL;
38
38
  const nodeBin = argv.nodeBin || process.execPath;
39
39
  const codexBin = argv.codexBin || findBinary('codex');