wtt-connect 0.2.3 → 0.2.4

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.4",
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) {
@@ -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');
@@ -0,0 +1,14 @@
1
+ [Unit]
2
+ Description=WTT Connect Claude Code Agent
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=simple
8
+ WorkingDirectory=/mnt/wd10t/saiph/wtt/wtt/tools/wtt-connect
9
+ ExecStart=/usr/bin/node --experimental-websocket /mnt/wd10t/saiph/wtt/wtt/tools/wtt-connect/bin/wtt-connect.js start --env-file /mnt/wd10t/saiph/wtt/wtt/tools/wtt-connect/.env.claude
10
+ Restart=always
11
+ RestartSec=5
12
+
13
+ [Install]
14
+ WantedBy=default.target
@@ -0,0 +1,14 @@
1
+ [Unit]
2
+ Description=WTT Connect Codex Agent
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=simple
8
+ WorkingDirectory=/mnt/wd10t/saiph/wtt/wtt/tools/wtt-connect
9
+ ExecStart=/usr/bin/node --experimental-websocket /mnt/wd10t/saiph/wtt/wtt/tools/wtt-connect/bin/wtt-connect.js start --env-file /mnt/wd10t/saiph/wtt/wtt/tools/wtt-connect/.env
10
+ Restart=always
11
+ RestartSec=5
12
+
13
+ [Install]
14
+ WantedBy=default.target