aquaman-plugin 0.11.2 → 0.11.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 +38 -10
- package/dist/index.d.ts +81 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +502 -0
- package/dist/index.js.map +1 -0
- package/dist/src/config-schema.d.ts +37 -0
- package/dist/src/config-schema.d.ts.map +1 -0
- package/dist/src/config-schema.js +58 -0
- package/dist/src/config-schema.js.map +1 -0
- package/dist/src/http-interceptor.d.ts +48 -0
- package/dist/src/http-interceptor.d.ts.map +1 -0
- package/dist/src/http-interceptor.js +143 -0
- package/dist/src/http-interceptor.js.map +1 -0
- package/dist/src/proxy-health.d.ts +23 -0
- package/dist/src/proxy-health.d.ts.map +1 -0
- package/dist/src/proxy-health.js +61 -0
- package/dist/src/proxy-health.js.map +1 -0
- package/dist/src/proxy-manager.d.ts +79 -0
- package/dist/src/proxy-manager.d.ts.map +1 -0
- package/dist/src/proxy-manager.js +246 -0
- package/dist/src/proxy-manager.js.map +1 -0
- package/openclaw.plugin.json +6 -1
- package/package.json +12 -11
- package/index.ts +0 -592
- package/src/commands.ts +0 -306
- package/src/config-schema.ts +0 -68
- package/src/http-interceptor.ts +0 -176
- package/src/index.ts +0 -62
- package/src/plugin.ts +0 -281
- package/src/proxy-health.ts +0 -67
- package/src/proxy-manager.ts +0 -309
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proxy process lifecycle manager
|
|
3
|
+
*
|
|
4
|
+
* Spawns and manages the aquaman proxy daemon as a separate process
|
|
5
|
+
* for maximum credential isolation. Communicates via Unix domain socket.
|
|
6
|
+
*/
|
|
7
|
+
import { spawn } from 'node:child_process';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import * as fs from 'node:fs';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
/**
|
|
12
|
+
* Find the aquaman proxy binary.
|
|
13
|
+
*
|
|
14
|
+
* Search order:
|
|
15
|
+
* 1. Plugin's own node_modules/.bin/aquaman (bundled dep — version-matched)
|
|
16
|
+
* 2. PATH (global install via npm install -g aquaman-proxy)
|
|
17
|
+
*/
|
|
18
|
+
export function findAquamanProxyBinary() {
|
|
19
|
+
// 1. Resolve from this file's location → plugin package root → node_modules/.bin/
|
|
20
|
+
const thisDir = path.dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const pluginRoot = path.resolve(thisDir, '..');
|
|
22
|
+
const localBin = path.join(pluginRoot, 'node_modules', '.bin', 'aquaman');
|
|
23
|
+
if (fs.existsSync(localBin)) {
|
|
24
|
+
return localBin;
|
|
25
|
+
}
|
|
26
|
+
// 2. Search PATH
|
|
27
|
+
const pathEnv = process.env.PATH || '';
|
|
28
|
+
const dirs = pathEnv.split(path.delimiter);
|
|
29
|
+
for (const dir of dirs) {
|
|
30
|
+
const candidate = path.join(dir, 'aquaman');
|
|
31
|
+
try {
|
|
32
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
33
|
+
return candidate;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// Not found in this dir
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Execute an aquaman proxy CLI command (non-interactive).
|
|
43
|
+
* Captures stdout/stderr and returns them.
|
|
44
|
+
*/
|
|
45
|
+
export function execAquamanProxyCli(args, options) {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
const binary = findAquamanProxyBinary();
|
|
48
|
+
if (!binary) {
|
|
49
|
+
reject(new Error('aquaman proxy binary not found. Install with: npm install -g aquaman-proxy'));
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const proc = spawn(binary, args, {
|
|
53
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
54
|
+
env: process.env,
|
|
55
|
+
});
|
|
56
|
+
let stdout = '';
|
|
57
|
+
let stderr = '';
|
|
58
|
+
proc.stdout?.on('data', (d) => { stdout += d.toString(); });
|
|
59
|
+
proc.stderr?.on('data', (d) => { stderr += d.toString(); });
|
|
60
|
+
proc.on('error', reject);
|
|
61
|
+
proc.on('close', (code) => {
|
|
62
|
+
resolve({ stdout, stderr, exitCode: code ?? 1 });
|
|
63
|
+
});
|
|
64
|
+
const timeout = options?.timeoutMs ?? 30_000;
|
|
65
|
+
const timer = setTimeout(() => {
|
|
66
|
+
proc.kill('SIGTERM');
|
|
67
|
+
reject(new Error(`aquaman CLI timed out after ${timeout}ms`));
|
|
68
|
+
}, timeout);
|
|
69
|
+
proc.on('close', () => clearTimeout(timer));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Execute an aquaman proxy CLI command interactively (stdio: inherit).
|
|
74
|
+
* Used for commands that need TTY input (setup, credentials add).
|
|
75
|
+
*/
|
|
76
|
+
export function execAquamanProxyInteractive(args) {
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
const binary = findAquamanProxyBinary();
|
|
79
|
+
if (!binary) {
|
|
80
|
+
reject(new Error('aquaman proxy binary not found. Install with: npm install -g aquaman-proxy'));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const proc = spawn(binary, args, {
|
|
84
|
+
stdio: 'inherit',
|
|
85
|
+
env: process.env,
|
|
86
|
+
});
|
|
87
|
+
proc.on('error', reject);
|
|
88
|
+
proc.on('close', (code) => resolve(code ?? 1));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export class ProxyManager {
|
|
92
|
+
process = null;
|
|
93
|
+
options;
|
|
94
|
+
connectionInfo = null;
|
|
95
|
+
starting = false;
|
|
96
|
+
startPromise = null;
|
|
97
|
+
constructor(options) {
|
|
98
|
+
this.options = options;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Start the proxy process
|
|
102
|
+
*/
|
|
103
|
+
async start() {
|
|
104
|
+
if (this.process && this.connectionInfo) {
|
|
105
|
+
return this.connectionInfo;
|
|
106
|
+
}
|
|
107
|
+
if (this.starting && this.startPromise) {
|
|
108
|
+
return this.startPromise;
|
|
109
|
+
}
|
|
110
|
+
this.starting = true;
|
|
111
|
+
this.startPromise = this.doStart();
|
|
112
|
+
try {
|
|
113
|
+
const result = await this.startPromise;
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
this.starting = false;
|
|
118
|
+
this.startPromise = null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async doStart() {
|
|
122
|
+
return new Promise((resolve, reject) => {
|
|
123
|
+
const config = this.options.config;
|
|
124
|
+
// Find aquaman binary
|
|
125
|
+
const binaryPath = this.findBinary();
|
|
126
|
+
if (!binaryPath) {
|
|
127
|
+
const error = new Error('aquaman proxy binary not found. Install with: npm install -g aquaman-proxy');
|
|
128
|
+
this.options.onError?.(error);
|
|
129
|
+
reject(error);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
// Build arguments — UDS is the default, no --port needed
|
|
133
|
+
const args = ['plugin-mode'];
|
|
134
|
+
// Spawn proxy process
|
|
135
|
+
this.process = spawn(binaryPath, args, {
|
|
136
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
137
|
+
env: {
|
|
138
|
+
...process.env,
|
|
139
|
+
// Pass config through environment
|
|
140
|
+
AQUAMAN_BACKEND: config.backend,
|
|
141
|
+
AQUAMAN_VAULT_ADDRESS: config.vaultAddress,
|
|
142
|
+
AQUAMAN_VAULT_TOKEN: config.vaultToken,
|
|
143
|
+
AQUAMAN_VAULT_NAMESPACE: config.vaultNamespace,
|
|
144
|
+
AQUAMAN_VAULT_MOUNT_PATH: config.vaultMountPath,
|
|
145
|
+
AQUAMAN_1PASSWORD_VAULT: config.onePasswordVault,
|
|
146
|
+
AQUAMAN_1PASSWORD_ACCOUNT: config.onePasswordAccount
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
let stdout = '';
|
|
150
|
+
let stderr = '';
|
|
151
|
+
this.process.stdout?.on('data', (data) => {
|
|
152
|
+
stdout += data.toString();
|
|
153
|
+
// Try to parse connection info from first line
|
|
154
|
+
const firstLine = stdout.split('\n')[0];
|
|
155
|
+
if (firstLine && !this.connectionInfo) {
|
|
156
|
+
try {
|
|
157
|
+
const info = JSON.parse(firstLine);
|
|
158
|
+
if (info.ready) {
|
|
159
|
+
this.connectionInfo = info;
|
|
160
|
+
this.options.onReady?.(info);
|
|
161
|
+
resolve(info);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// Not JSON yet, keep buffering
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
this.process.stderr?.on('data', (data) => {
|
|
170
|
+
stderr += data.toString();
|
|
171
|
+
console.error('[aquaman-proxy]', data.toString().trim());
|
|
172
|
+
});
|
|
173
|
+
this.process.on('error', (error) => {
|
|
174
|
+
this.options.onError?.(error);
|
|
175
|
+
reject(error);
|
|
176
|
+
});
|
|
177
|
+
this.process.on('exit', (code) => {
|
|
178
|
+
this.process = null;
|
|
179
|
+
this.connectionInfo = null;
|
|
180
|
+
this.options.onExit?.(code);
|
|
181
|
+
if (!this.connectionInfo) {
|
|
182
|
+
const stderrText = stderr || stdout;
|
|
183
|
+
const error = new Error(`Proxy exited with code ${code}: ${stderrText}`);
|
|
184
|
+
reject(error);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
// Timeout after 10 seconds
|
|
188
|
+
setTimeout(() => {
|
|
189
|
+
if (!this.connectionInfo) {
|
|
190
|
+
const error = new Error('Proxy startup timeout');
|
|
191
|
+
this.stop();
|
|
192
|
+
reject(error);
|
|
193
|
+
}
|
|
194
|
+
}, 10000);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Stop the proxy process
|
|
199
|
+
*/
|
|
200
|
+
async stop() {
|
|
201
|
+
if (!this.process) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
return new Promise((resolve) => {
|
|
205
|
+
const proc = this.process;
|
|
206
|
+
const timeout = setTimeout(() => {
|
|
207
|
+
proc.kill('SIGKILL');
|
|
208
|
+
}, 5000);
|
|
209
|
+
proc.on('exit', () => {
|
|
210
|
+
clearTimeout(timeout);
|
|
211
|
+
this.process = null;
|
|
212
|
+
this.connectionInfo = null;
|
|
213
|
+
resolve();
|
|
214
|
+
});
|
|
215
|
+
proc.kill('SIGTERM');
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Check if proxy is running
|
|
220
|
+
*/
|
|
221
|
+
isRunning() {
|
|
222
|
+
return this.process !== null && this.connectionInfo !== null;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Get connection info
|
|
226
|
+
*/
|
|
227
|
+
getConnectionInfo() {
|
|
228
|
+
return this.connectionInfo;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get socket path
|
|
232
|
+
*/
|
|
233
|
+
getSocketPath() {
|
|
234
|
+
return this.connectionInfo?.socketPath || null;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Find the aquaman proxy binary
|
|
238
|
+
*/
|
|
239
|
+
findBinary() {
|
|
240
|
+
return findAquamanProxyBinary();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
export function createProxyManager(options) {
|
|
244
|
+
return new ProxyManager(options);
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=proxy-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy-manager.js","sourceRoot":"","sources":["../../src/proxy-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE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C;YAET,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;gBACnB,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;gBACpB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;gBAC3B,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,cAAc,EAAE,UAAU,IAAI,IAAI,CAAC;IACjD,CAAC;IAED;;OAEG;IACK,UAAU;QAChB,OAAO,sBAAsB,EAAE,CAAC;IAClC,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB,CAAC,OAA4B;IAC7D,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "aquaman-plugin",
|
|
3
3
|
"name": "Aquaman — API Key Protection",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.4",
|
|
5
5
|
"description": "Protect your API keys, tokens, and secrets — they stay in your vault (Keychain, 1Password, HashiCorp Vault, Bitwarden, and more), never in the agent's memory. Block dangerous API endpoints before credentials are injected. Works with 25+ services across 6 auth modes.",
|
|
6
6
|
"author": "tech4242",
|
|
7
7
|
"repository": "https://github.com/tech4242/aquaman",
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"items": { "type": "string" },
|
|
28
28
|
"default": ["anthropic", "openai"],
|
|
29
29
|
"description": "Services to proxy credentials for"
|
|
30
|
+
},
|
|
31
|
+
"autoGenerateAuthProfiles": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"default": true,
|
|
34
|
+
"description": "Auto-generate ~/.openclaw/agents/<id>/agent/auth-profiles.json with placeholder API-key profiles for anthropic and openai when the file does not exist. Set to false if you manage your own auth profiles."
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aquaman-plugin",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "Protect API keys and secrets for OpenClaw — credentials stay in your vault, never in the agent's memory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "
|
|
8
|
-
"
|
|
7
|
+
"build": "tsc -b",
|
|
8
|
+
"prepublishOnly": "npm run build",
|
|
9
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo"
|
|
9
10
|
},
|
|
10
11
|
"openclaw": {
|
|
11
|
-
"extensions": ["./index.
|
|
12
|
+
"extensions": ["./dist/index.js"],
|
|
12
13
|
"compat": {
|
|
13
|
-
"pluginApi": ">=2026.
|
|
14
|
-
"minGatewayVersion": "2026.
|
|
14
|
+
"pluginApi": ">=2026.5.7",
|
|
15
|
+
"minGatewayVersion": "2026.5.7"
|
|
15
16
|
},
|
|
16
17
|
"build": {
|
|
17
|
-
"openclawVersion": "2026.
|
|
18
|
-
"pluginSdkVersion": "2026.
|
|
18
|
+
"openclawVersion": "2026.5.12",
|
|
19
|
+
"pluginSdkVersion": "2026.5.12"
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
@@ -39,16 +40,16 @@
|
|
|
39
40
|
"license": "MIT",
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"undici": "^7.0.0",
|
|
42
|
-
"aquaman-proxy": "0.11.
|
|
43
|
+
"aquaman-proxy": "0.11.4"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
|
-
"openclaw": ">=2026.
|
|
46
|
+
"openclaw": ">=2026.5.7"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@types/node": "^20.10.0",
|
|
49
50
|
"typescript": "^5.3.0"
|
|
50
51
|
},
|
|
51
|
-
"files": ["
|
|
52
|
+
"files": ["dist", "openclaw.plugin.json", "LICENSE", "README.md"],
|
|
52
53
|
"repository": {
|
|
53
54
|
"type": "git",
|
|
54
55
|
"url": "https://github.com/tech4242/aquaman.git",
|