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 +1 -1
- package/package.json +1 -1
- package/src/config.js +3 -2
- package/src/service-manager.js +1 -1
- package/systemd/wtt-connect-claude.service +14 -0
- package/systemd/wtt-connect-codex.service +14 -0
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/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');
|
|
@@ -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
|