agent-relay-server 0.4.33 → 0.4.35
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 +1 -1
- package/src/config.ts +0 -3
- package/src/daemon.ts +6 -6
- package/src/setup.ts +4 -4
- package/src/upgrade.ts +5 -5
package/package.json
CHANGED
package/src/config.ts
CHANGED
package/src/daemon.ts
CHANGED
|
@@ -22,9 +22,9 @@ export type DaemonAction =
|
|
|
22
22
|
| "logs";
|
|
23
23
|
|
|
24
24
|
export type DaemonScope = "user" | "system";
|
|
25
|
-
|
|
25
|
+
type DaemonKind = "systemd" | "launchd" | "unsupported";
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
type DaemonOptions = {
|
|
28
28
|
action: DaemonAction;
|
|
29
29
|
name?: string;
|
|
30
30
|
envFile?: string;
|
|
@@ -36,17 +36,17 @@ export type DaemonOptions = {
|
|
|
36
36
|
enable?: boolean;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
type DaemonEnvironment = SetupEnvironment & {
|
|
40
40
|
uid?: number;
|
|
41
41
|
hasSystemctl?: boolean;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
type DaemonFilePlan = {
|
|
45
45
|
path: string;
|
|
46
46
|
content: string;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
type DaemonPlan = {
|
|
50
50
|
action: DaemonAction;
|
|
51
51
|
kind: DaemonKind;
|
|
52
52
|
scope: DaemonScope;
|
|
@@ -66,7 +66,7 @@ export type DaemonPlan = {
|
|
|
66
66
|
manualCommand: string;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
type DaemonExecutionResult = {
|
|
70
70
|
plan: DaemonPlan;
|
|
71
71
|
output: string;
|
|
72
72
|
};
|
package/src/setup.ts
CHANGED
|
@@ -8,7 +8,7 @@ const SETUP_MARKER = "agent-relay-managed-env";
|
|
|
8
8
|
export const DEFAULT_PORT = 4850;
|
|
9
9
|
export const DEFAULT_HOST = "127.0.0.1";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
type SetupOptions = {
|
|
12
12
|
envFile?: string;
|
|
13
13
|
host?: string;
|
|
14
14
|
port?: number;
|
|
@@ -25,7 +25,7 @@ export type SetupEnvironment = {
|
|
|
25
25
|
xdgStateHome?: string;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
type SetupPlan = {
|
|
29
29
|
envFile: string;
|
|
30
30
|
configDir: string;
|
|
31
31
|
stateDir: string;
|
|
@@ -35,14 +35,14 @@ export type SetupPlan = {
|
|
|
35
35
|
warnings: string[];
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
function defaultConfigDir(env: SetupEnvironment = {}): string {
|
|
39
39
|
const home = env.homeDir ?? homedir();
|
|
40
40
|
const platform = env.platform ?? process.platform;
|
|
41
41
|
if (platform === "darwin") return join(home, "Library", "Application Support", "agent-relay");
|
|
42
42
|
return join(env.xdgConfigHome ?? join(home, ".config"), "agent-relay");
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
function defaultStateDir(env: SetupEnvironment = {}): string {
|
|
46
46
|
const home = env.homeDir ?? homedir();
|
|
47
47
|
const platform = env.platform ?? process.platform;
|
|
48
48
|
if (platform === "darwin") return join(home, "Library", "Application Support", "agent-relay");
|
package/src/upgrade.ts
CHANGED
|
@@ -5,19 +5,19 @@ import { VERSION } from "./config";
|
|
|
5
5
|
|
|
6
6
|
export type UpgradeProvider = "auto" | "all" | "codex" | "claude";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type UpgradeOptions = {
|
|
9
9
|
targetVersion?: string;
|
|
10
10
|
providers?: UpgradeProvider[];
|
|
11
11
|
noRestart?: boolean;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
type InstalledPackage = {
|
|
15
15
|
version?: string;
|
|
16
16
|
source: "bun" | "npm" | "copied" | "claude-plugin";
|
|
17
17
|
path?: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
type ClaudePluginInstall = {
|
|
21
21
|
id: string;
|
|
22
22
|
version?: string;
|
|
23
23
|
scope?: string;
|
|
@@ -37,14 +37,14 @@ export type UpgradeSnapshot = {
|
|
|
37
37
|
packageManager: "bun" | "npm" | "none";
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
type UpgradeAction = {
|
|
41
41
|
label: string;
|
|
42
42
|
command: string[];
|
|
43
43
|
reason: string;
|
|
44
44
|
mutates: boolean;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
type UpgradePlan = {
|
|
48
48
|
targetVersion: string;
|
|
49
49
|
providers: { codex: boolean; claude: boolean };
|
|
50
50
|
snapshot: UpgradeSnapshot;
|