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 +1 -1
- package/package.json +1 -1
- package/src/config.js +3 -2
- package/src/runner.js +3 -3
- package/src/service-manager.js +1 -1
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
|
|
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
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
|
|
104
|
+
export function resolveAgentWorkDir(explicitWorkDir, agentId) {
|
|
104
105
|
if (explicitWorkDir) return path.resolve(String(explicitWorkDir));
|
|
105
|
-
return path.
|
|
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:
|
|
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:
|
|
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:
|
|
360
|
+
ttlMs: 60000,
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
363
|
if (!this.config.publishProgress) return;
|
package/src/service-manager.js
CHANGED
|
@@ -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
|
|
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');
|