@mearl/cloud-connector 2.7.0 → 2.7.1
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 +10 -2
- package/dist/__tests__/qoder-auth.test.d.ts +1 -0
- package/dist/cli.js +117 -17
- package/dist/index.js +116 -16
- package/dist/qoder-auth.d.ts +11 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -117,12 +117,20 @@ native-host 与守护进程 CLI 都通过这套共享路径(由 [`@mearl/daemo
|
|
|
117
117
|
|
|
118
118
|
> 前台运行(含 native-host 托管)时日志输出到 stdout/stderr,不写独立日志文件;只有守护进程模式才落盘到 `<hash>.log`。
|
|
119
119
|
|
|
120
|
-
Qoder
|
|
121
|
-
|
|
120
|
+
Qoder 配对还要求在本地提供 `QODER_PERSONAL_ACCESS_TOKEN`。连接器依次读取当前进程环境、
|
|
121
|
+
`MEARL_ENV_FILE`、`~/.mearl/.env`;macOS 还会读取当前用户钥匙串中 service 为
|
|
122
|
+
`com.mearl.qoder.pat` 的通用密码。PAT 只用于访问 Qoder Cloud Session API,连接器不会把它
|
|
123
|
+
写入 `qoder://` URL、进程参数、注册表或日志。配对完成后,连接器
|
|
122
124
|
保持 SSE 连接,收到 `agent.custom_tool_use` 后调用现有本地 Mearl action,并以
|
|
123
125
|
`user.custom_tool_result` 回传。截图会优先作为 base64 图片内容块回传;若 Cloud API 拒绝
|
|
124
126
|
图片块,则退回完整 JSON 文本,避免丢失数据。
|
|
125
127
|
|
|
128
|
+
macOS 可在本地终端交互式写入钥匙串,PAT 不会进入 shell 历史:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
security add-generic-password -U -a "$USER" -s com.mearl.qoder.pat -w
|
|
132
|
+
```
|
|
133
|
+
|
|
126
134
|
## 前置条件
|
|
127
135
|
|
|
128
136
|
1. **安装并初始化本地 Mearl 环境**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cli.js
CHANGED
|
@@ -102,6 +102,77 @@ function resolveConnectorIdentity(options) {
|
|
|
102
102
|
|
|
103
103
|
// src/qoder.ts
|
|
104
104
|
import { resolveActionTimeoutSec } from "@mearl/client/action-timeouts";
|
|
105
|
+
|
|
106
|
+
// src/qoder-auth.ts
|
|
107
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
108
|
+
import { homedir, userInfo } from "node:os";
|
|
109
|
+
import { resolve } from "node:path";
|
|
110
|
+
import { spawnSync } from "node:child_process";
|
|
111
|
+
var QODER_TOKEN_KEY = "QODER_PERSONAL_ACCESS_TOKEN";
|
|
112
|
+
var QODER_KEYCHAIN_SERVICE = "com.mearl.qoder.pat";
|
|
113
|
+
function normalizeToken(value) {
|
|
114
|
+
const token = value?.trim();
|
|
115
|
+
if (!token || /[\r\n\0]/.test(token)) return void 0;
|
|
116
|
+
return token;
|
|
117
|
+
}
|
|
118
|
+
function envValue(text, key) {
|
|
119
|
+
for (const line of text.split(/\r?\n/)) {
|
|
120
|
+
const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)\s*$/.exec(line);
|
|
121
|
+
if (!match || match[1] !== key) continue;
|
|
122
|
+
let value = (match[2] ?? "").trim();
|
|
123
|
+
if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) {
|
|
124
|
+
value = value.slice(1, -1);
|
|
125
|
+
} else {
|
|
126
|
+
value = value.replace(/\s+#.*$/, "").trim();
|
|
127
|
+
}
|
|
128
|
+
return normalizeToken(value);
|
|
129
|
+
}
|
|
130
|
+
return void 0;
|
|
131
|
+
}
|
|
132
|
+
function readMacKeychainToken() {
|
|
133
|
+
const securityPath = "/usr/bin/security";
|
|
134
|
+
if (!existsSync(securityPath)) return void 0;
|
|
135
|
+
try {
|
|
136
|
+
const account = userInfo().username;
|
|
137
|
+
const result = spawnSync(
|
|
138
|
+
securityPath,
|
|
139
|
+
["find-generic-password", "-a", account, "-s", QODER_KEYCHAIN_SERVICE, "-w"],
|
|
140
|
+
{
|
|
141
|
+
encoding: "utf8",
|
|
142
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
143
|
+
timeout: 5e3,
|
|
144
|
+
windowsHide: true
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
return result.status === 0 ? normalizeToken(result.stdout) : void 0;
|
|
148
|
+
} catch {
|
|
149
|
+
return void 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function resolveQoderPersonalAccessToken(options = {}) {
|
|
153
|
+
const direct = normalizeToken(options.token);
|
|
154
|
+
if (direct) return direct;
|
|
155
|
+
const env = options.env ?? process.env;
|
|
156
|
+
const inherited = normalizeToken(env[QODER_TOKEN_KEY]);
|
|
157
|
+
if (inherited) return inherited;
|
|
158
|
+
const homeDirectory = options.homeDirectory ?? homedir();
|
|
159
|
+
const envFiles = [
|
|
160
|
+
...env.MEARL_ENV_FILE?.trim() ? [resolve(env.MEARL_ENV_FILE)] : [],
|
|
161
|
+
resolve(homeDirectory, ".mearl", ".env")
|
|
162
|
+
];
|
|
163
|
+
const readFile = options.readFile ?? ((file) => readFileSync(file, "utf8"));
|
|
164
|
+
for (const file of new Set(envFiles)) {
|
|
165
|
+
try {
|
|
166
|
+
const token = envValue(readFile(file), QODER_TOKEN_KEY);
|
|
167
|
+
if (token) return token;
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if ((options.platform ?? process.platform) !== "darwin") return void 0;
|
|
172
|
+
return normalizeToken((options.readKeychainToken ?? readMacKeychainToken)());
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// src/qoder.ts
|
|
105
176
|
var QODER_TOOL_NAME = "mearl";
|
|
106
177
|
var DEFAULT_QODER_API_BASE_URL = "https://api.qoder.com";
|
|
107
178
|
var DEFAULT_DISCOVERY_WINDOW_MS = 60 * 60 * 1e3;
|
|
@@ -132,10 +203,49 @@ function asScreenshot(value) {
|
|
|
132
203
|
if (format !== "png" && format !== "jpeg") return null;
|
|
133
204
|
return { data: value.data, meta: { ...value.meta, format } };
|
|
134
205
|
}
|
|
206
|
+
function extractBatchScreenshots(value) {
|
|
207
|
+
if (!isRecord(value) || !Array.isArray(value.results)) return null;
|
|
208
|
+
const screenshots = [];
|
|
209
|
+
const results = value.results.map((result) => {
|
|
210
|
+
if (!isRecord(result) || result.action !== "page_screenshot") return result;
|
|
211
|
+
const screenshot = asScreenshot(result.data);
|
|
212
|
+
if (!screenshot) return result;
|
|
213
|
+
const data = { ...result.data };
|
|
214
|
+
delete data.data;
|
|
215
|
+
data.meta = screenshot.meta;
|
|
216
|
+
data.imageContentIndex = screenshots.length + 1;
|
|
217
|
+
screenshots.push(screenshot);
|
|
218
|
+
return { ...result, data };
|
|
219
|
+
});
|
|
220
|
+
if (screenshots.length === 0) return null;
|
|
221
|
+
return { metadata: { ...value, results }, screenshots };
|
|
222
|
+
}
|
|
223
|
+
function imageContentBlock(screenshot) {
|
|
224
|
+
return {
|
|
225
|
+
type: "image",
|
|
226
|
+
source: {
|
|
227
|
+
type: "base64",
|
|
228
|
+
media_type: `image/${screenshot.meta.format}`,
|
|
229
|
+
data: screenshot.data
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
135
233
|
function formatQoderToolResult(value) {
|
|
136
234
|
const directScreenshot = asScreenshot(value);
|
|
137
235
|
const nestedScreenshot = !directScreenshot && isRecord(value) ? asScreenshot(value.screenshot) : null;
|
|
138
236
|
const screenshot = directScreenshot ?? nestedScreenshot;
|
|
237
|
+
if (!screenshot) {
|
|
238
|
+
const batch = extractBatchScreenshots(value);
|
|
239
|
+
if (batch) {
|
|
240
|
+
return {
|
|
241
|
+
content: [
|
|
242
|
+
{ type: "text", text: safeJson(batch.metadata) },
|
|
243
|
+
...batch.screenshots.map(imageContentBlock)
|
|
244
|
+
],
|
|
245
|
+
fallbackContent: [{ type: "text", text: safeJson(value) }]
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
139
249
|
if (!screenshot) {
|
|
140
250
|
const content = [{ type: "text", text: safeJson(value) }];
|
|
141
251
|
return { content, fallbackContent: content };
|
|
@@ -147,17 +257,7 @@ function formatQoderToolResult(value) {
|
|
|
147
257
|
metadata = { ...value, screenshot: { meta: screenshot.meta } };
|
|
148
258
|
}
|
|
149
259
|
return {
|
|
150
|
-
content: [
|
|
151
|
-
{ type: "text", text: safeJson(metadata) },
|
|
152
|
-
{
|
|
153
|
-
type: "image",
|
|
154
|
-
source: {
|
|
155
|
-
type: "base64",
|
|
156
|
-
media_type: `image/${screenshot.meta.format}`,
|
|
157
|
-
data: screenshot.data
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
],
|
|
260
|
+
content: [{ type: "text", text: safeJson(metadata) }, imageContentBlock(screenshot)],
|
|
161
261
|
fallbackContent: [{ type: "text", text: safeJson(value) }]
|
|
162
262
|
};
|
|
163
263
|
}
|
|
@@ -312,7 +412,7 @@ async function parseQoderSse(body, onFrame) {
|
|
|
312
412
|
await dispatch();
|
|
313
413
|
}
|
|
314
414
|
function defaultSleep(milliseconds, signal) {
|
|
315
|
-
return new Promise((
|
|
415
|
+
return new Promise((resolve2, reject) => {
|
|
316
416
|
if (signal.aborted) {
|
|
317
417
|
reject(signal.reason ?? new Error("Aborted"));
|
|
318
418
|
return;
|
|
@@ -323,7 +423,7 @@ function defaultSleep(milliseconds, signal) {
|
|
|
323
423
|
};
|
|
324
424
|
const timer = setTimeout(() => {
|
|
325
425
|
signal.removeEventListener("abort", onAbort);
|
|
326
|
-
|
|
426
|
+
resolve2();
|
|
327
427
|
}, milliseconds);
|
|
328
428
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
329
429
|
});
|
|
@@ -356,10 +456,10 @@ function toolInput(event) {
|
|
|
356
456
|
var QoderConnector = class {
|
|
357
457
|
constructor(options) {
|
|
358
458
|
this.options = options;
|
|
359
|
-
const token = options.token
|
|
459
|
+
const token = resolveQoderPersonalAccessToken({ token: options.token });
|
|
360
460
|
if (!token) {
|
|
361
461
|
throw new Error(
|
|
362
|
-
"Qoder authentication is required. Set QODER_PERSONAL_ACCESS_TOKEN
|
|
462
|
+
"Qoder authentication is required. Set QODER_PERSONAL_ACCESS_TOKEN, add it to ~/.mearl/.env, or configure the macOS Keychain item com.mearl.qoder.pat, then retry."
|
|
363
463
|
);
|
|
364
464
|
}
|
|
365
465
|
this.api = new QoderApiClient(
|
|
@@ -544,7 +644,7 @@ var QoderConnector = class {
|
|
|
544
644
|
};
|
|
545
645
|
|
|
546
646
|
// src/index.ts
|
|
547
|
-
var CLOUD_CONNECTOR_VERSION = true ? "2.7.
|
|
647
|
+
var CLOUD_CONNECTOR_VERSION = true ? "2.7.1" : "unknown";
|
|
548
648
|
var DEFAULT_RECONNECT_INTERVAL = 5e3;
|
|
549
649
|
var BACKOFF_BASE_MS = 1e3;
|
|
550
650
|
var BACKOFF_MAX_MS = 3e4;
|
|
@@ -892,7 +992,7 @@ function runForeground(options) {
|
|
|
892
992
|
}
|
|
893
993
|
|
|
894
994
|
// src/cli.ts
|
|
895
|
-
var CLOUD_CONNECTOR_VERSION2 = true ? "2.7.
|
|
995
|
+
var CLOUD_CONNECTOR_VERSION2 = true ? "2.7.1" : "unknown";
|
|
896
996
|
var args = process.argv.slice(2);
|
|
897
997
|
if (args.includes("--version") || args.includes("-v")) {
|
|
898
998
|
console.log(CLOUD_CONNECTOR_VERSION2);
|
package/dist/index.js
CHANGED
|
@@ -91,6 +91,77 @@ function requireConnectorEndpoint(value) {
|
|
|
91
91
|
|
|
92
92
|
// src/qoder.ts
|
|
93
93
|
import { resolveActionTimeoutSec } from "@mearl/client/action-timeouts";
|
|
94
|
+
|
|
95
|
+
// src/qoder-auth.ts
|
|
96
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
97
|
+
import { homedir, userInfo } from "node:os";
|
|
98
|
+
import { resolve } from "node:path";
|
|
99
|
+
import { spawnSync } from "node:child_process";
|
|
100
|
+
var QODER_TOKEN_KEY = "QODER_PERSONAL_ACCESS_TOKEN";
|
|
101
|
+
var QODER_KEYCHAIN_SERVICE = "com.mearl.qoder.pat";
|
|
102
|
+
function normalizeToken(value) {
|
|
103
|
+
const token = value?.trim();
|
|
104
|
+
if (!token || /[\r\n\0]/.test(token)) return void 0;
|
|
105
|
+
return token;
|
|
106
|
+
}
|
|
107
|
+
function envValue(text, key) {
|
|
108
|
+
for (const line of text.split(/\r?\n/)) {
|
|
109
|
+
const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)\s*$/.exec(line);
|
|
110
|
+
if (!match || match[1] !== key) continue;
|
|
111
|
+
let value = (match[2] ?? "").trim();
|
|
112
|
+
if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) {
|
|
113
|
+
value = value.slice(1, -1);
|
|
114
|
+
} else {
|
|
115
|
+
value = value.replace(/\s+#.*$/, "").trim();
|
|
116
|
+
}
|
|
117
|
+
return normalizeToken(value);
|
|
118
|
+
}
|
|
119
|
+
return void 0;
|
|
120
|
+
}
|
|
121
|
+
function readMacKeychainToken() {
|
|
122
|
+
const securityPath = "/usr/bin/security";
|
|
123
|
+
if (!existsSync(securityPath)) return void 0;
|
|
124
|
+
try {
|
|
125
|
+
const account = userInfo().username;
|
|
126
|
+
const result = spawnSync(
|
|
127
|
+
securityPath,
|
|
128
|
+
["find-generic-password", "-a", account, "-s", QODER_KEYCHAIN_SERVICE, "-w"],
|
|
129
|
+
{
|
|
130
|
+
encoding: "utf8",
|
|
131
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
132
|
+
timeout: 5e3,
|
|
133
|
+
windowsHide: true
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
return result.status === 0 ? normalizeToken(result.stdout) : void 0;
|
|
137
|
+
} catch {
|
|
138
|
+
return void 0;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function resolveQoderPersonalAccessToken(options = {}) {
|
|
142
|
+
const direct = normalizeToken(options.token);
|
|
143
|
+
if (direct) return direct;
|
|
144
|
+
const env = options.env ?? process.env;
|
|
145
|
+
const inherited = normalizeToken(env[QODER_TOKEN_KEY]);
|
|
146
|
+
if (inherited) return inherited;
|
|
147
|
+
const homeDirectory = options.homeDirectory ?? homedir();
|
|
148
|
+
const envFiles = [
|
|
149
|
+
...env.MEARL_ENV_FILE?.trim() ? [resolve(env.MEARL_ENV_FILE)] : [],
|
|
150
|
+
resolve(homeDirectory, ".mearl", ".env")
|
|
151
|
+
];
|
|
152
|
+
const readFile = options.readFile ?? ((file) => readFileSync(file, "utf8"));
|
|
153
|
+
for (const file of new Set(envFiles)) {
|
|
154
|
+
try {
|
|
155
|
+
const token = envValue(readFile(file), QODER_TOKEN_KEY);
|
|
156
|
+
if (token) return token;
|
|
157
|
+
} catch {
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if ((options.platform ?? process.platform) !== "darwin") return void 0;
|
|
161
|
+
return normalizeToken((options.readKeychainToken ?? readMacKeychainToken)());
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// src/qoder.ts
|
|
94
165
|
var QODER_TOOL_NAME = "mearl";
|
|
95
166
|
var DEFAULT_QODER_API_BASE_URL = "https://api.qoder.com";
|
|
96
167
|
var DEFAULT_DISCOVERY_WINDOW_MS = 60 * 60 * 1e3;
|
|
@@ -121,10 +192,49 @@ function asScreenshot(value) {
|
|
|
121
192
|
if (format !== "png" && format !== "jpeg") return null;
|
|
122
193
|
return { data: value.data, meta: { ...value.meta, format } };
|
|
123
194
|
}
|
|
195
|
+
function extractBatchScreenshots(value) {
|
|
196
|
+
if (!isRecord(value) || !Array.isArray(value.results)) return null;
|
|
197
|
+
const screenshots = [];
|
|
198
|
+
const results = value.results.map((result) => {
|
|
199
|
+
if (!isRecord(result) || result.action !== "page_screenshot") return result;
|
|
200
|
+
const screenshot = asScreenshot(result.data);
|
|
201
|
+
if (!screenshot) return result;
|
|
202
|
+
const data = { ...result.data };
|
|
203
|
+
delete data.data;
|
|
204
|
+
data.meta = screenshot.meta;
|
|
205
|
+
data.imageContentIndex = screenshots.length + 1;
|
|
206
|
+
screenshots.push(screenshot);
|
|
207
|
+
return { ...result, data };
|
|
208
|
+
});
|
|
209
|
+
if (screenshots.length === 0) return null;
|
|
210
|
+
return { metadata: { ...value, results }, screenshots };
|
|
211
|
+
}
|
|
212
|
+
function imageContentBlock(screenshot) {
|
|
213
|
+
return {
|
|
214
|
+
type: "image",
|
|
215
|
+
source: {
|
|
216
|
+
type: "base64",
|
|
217
|
+
media_type: `image/${screenshot.meta.format}`,
|
|
218
|
+
data: screenshot.data
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
124
222
|
function formatQoderToolResult(value) {
|
|
125
223
|
const directScreenshot = asScreenshot(value);
|
|
126
224
|
const nestedScreenshot = !directScreenshot && isRecord(value) ? asScreenshot(value.screenshot) : null;
|
|
127
225
|
const screenshot = directScreenshot ?? nestedScreenshot;
|
|
226
|
+
if (!screenshot) {
|
|
227
|
+
const batch = extractBatchScreenshots(value);
|
|
228
|
+
if (batch) {
|
|
229
|
+
return {
|
|
230
|
+
content: [
|
|
231
|
+
{ type: "text", text: safeJson(batch.metadata) },
|
|
232
|
+
...batch.screenshots.map(imageContentBlock)
|
|
233
|
+
],
|
|
234
|
+
fallbackContent: [{ type: "text", text: safeJson(value) }]
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
128
238
|
if (!screenshot) {
|
|
129
239
|
const content = [{ type: "text", text: safeJson(value) }];
|
|
130
240
|
return { content, fallbackContent: content };
|
|
@@ -136,17 +246,7 @@ function formatQoderToolResult(value) {
|
|
|
136
246
|
metadata = { ...value, screenshot: { meta: screenshot.meta } };
|
|
137
247
|
}
|
|
138
248
|
return {
|
|
139
|
-
content: [
|
|
140
|
-
{ type: "text", text: safeJson(metadata) },
|
|
141
|
-
{
|
|
142
|
-
type: "image",
|
|
143
|
-
source: {
|
|
144
|
-
type: "base64",
|
|
145
|
-
media_type: `image/${screenshot.meta.format}`,
|
|
146
|
-
data: screenshot.data
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
],
|
|
249
|
+
content: [{ type: "text", text: safeJson(metadata) }, imageContentBlock(screenshot)],
|
|
150
250
|
fallbackContent: [{ type: "text", text: safeJson(value) }]
|
|
151
251
|
};
|
|
152
252
|
}
|
|
@@ -301,7 +401,7 @@ async function parseQoderSse(body, onFrame) {
|
|
|
301
401
|
await dispatch();
|
|
302
402
|
}
|
|
303
403
|
function defaultSleep(milliseconds, signal) {
|
|
304
|
-
return new Promise((
|
|
404
|
+
return new Promise((resolve2, reject) => {
|
|
305
405
|
if (signal.aborted) {
|
|
306
406
|
reject(signal.reason ?? new Error("Aborted"));
|
|
307
407
|
return;
|
|
@@ -312,7 +412,7 @@ function defaultSleep(milliseconds, signal) {
|
|
|
312
412
|
};
|
|
313
413
|
const timer = setTimeout(() => {
|
|
314
414
|
signal.removeEventListener("abort", onAbort);
|
|
315
|
-
|
|
415
|
+
resolve2();
|
|
316
416
|
}, milliseconds);
|
|
317
417
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
318
418
|
});
|
|
@@ -345,10 +445,10 @@ function toolInput(event) {
|
|
|
345
445
|
var QoderConnector = class {
|
|
346
446
|
constructor(options) {
|
|
347
447
|
this.options = options;
|
|
348
|
-
const token = options.token
|
|
448
|
+
const token = resolveQoderPersonalAccessToken({ token: options.token });
|
|
349
449
|
if (!token) {
|
|
350
450
|
throw new Error(
|
|
351
|
-
"Qoder authentication is required. Set QODER_PERSONAL_ACCESS_TOKEN
|
|
451
|
+
"Qoder authentication is required. Set QODER_PERSONAL_ACCESS_TOKEN, add it to ~/.mearl/.env, or configure the macOS Keychain item com.mearl.qoder.pat, then retry."
|
|
352
452
|
);
|
|
353
453
|
}
|
|
354
454
|
this.api = new QoderApiClient(
|
|
@@ -533,7 +633,7 @@ var QoderConnector = class {
|
|
|
533
633
|
};
|
|
534
634
|
|
|
535
635
|
// src/index.ts
|
|
536
|
-
var CLOUD_CONNECTOR_VERSION = true ? "2.7.
|
|
636
|
+
var CLOUD_CONNECTOR_VERSION = true ? "2.7.1" : "unknown";
|
|
537
637
|
var DEFAULT_RECONNECT_INTERVAL = 5e3;
|
|
538
638
|
var BACKOFF_BASE_MS = 1e3;
|
|
539
639
|
var BACKOFF_MAX_MS = 3e4;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface QoderTokenResolverOptions {
|
|
2
|
+
token?: string;
|
|
3
|
+
env?: NodeJS.ProcessEnv;
|
|
4
|
+
homeDirectory?: string;
|
|
5
|
+
platform?: NodeJS.Platform;
|
|
6
|
+
readFile?: (file: string) => string;
|
|
7
|
+
readKeychainToken?: () => string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** Resolve a PAT without putting it in a pairing URL, process argument, registry, or log. */
|
|
10
|
+
export declare function resolveQoderPersonalAccessToken(options?: QoderTokenResolverOptions): string | undefined;
|
|
11
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mearl/cloud-connector",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Cloud connector for Mearl — bridges cloud agents to a local native-host",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"ws": "^8.18.0",
|
|
32
|
-
"@mearl/
|
|
33
|
-
"@mearl/
|
|
34
|
-
"@mearl/daemon-core": "2.7.
|
|
32
|
+
"@mearl/client": "2.7.1",
|
|
33
|
+
"@mearl/cloud-types": "2.7.1",
|
|
34
|
+
"@mearl/daemon-core": "2.7.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^24.9.1",
|