@signetai/connector-codex 0.163.18 → 0.164.0
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -80
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EAOpB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,MAAM,eAAe,GACxB;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC9D;IACA,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD,CAAC;AAWL,UAAU,uBAAuB;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,UAAU,yBAAyB;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC1B;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|
@@ -11175,6 +11175,79 @@ var __dirname2 = dirname(__filename2);
|
|
|
11175
11175
|
var import_yaml = __toESM2(require_dist(), 1);
|
|
11176
11176
|
var LOCAL_BINDS = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"]);
|
|
11177
11177
|
var import_yaml2 = __toESM2(require_dist(), 1);
|
|
11178
|
+
function readEnv(env, name) {
|
|
11179
|
+
const value = env[name];
|
|
11180
|
+
if (typeof value !== "string")
|
|
11181
|
+
return;
|
|
11182
|
+
const trimmed = value.trim();
|
|
11183
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
11184
|
+
}
|
|
11185
|
+
function normalizePort(raw, fallback) {
|
|
11186
|
+
if (!raw)
|
|
11187
|
+
return String(fallback);
|
|
11188
|
+
if (!/^\d+$/.test(raw)) {
|
|
11189
|
+
throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
|
|
11190
|
+
}
|
|
11191
|
+
const port = Number.parseInt(raw, 10);
|
|
11192
|
+
if (!Number.isFinite(port) || port < 1 || port > 65535) {
|
|
11193
|
+
throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
|
|
11194
|
+
}
|
|
11195
|
+
return String(port);
|
|
11196
|
+
}
|
|
11197
|
+
function bracketIpv6Host(host) {
|
|
11198
|
+
if (host.startsWith("[") || !host.includes(":"))
|
|
11199
|
+
return host;
|
|
11200
|
+
return `[${host}]`;
|
|
11201
|
+
}
|
|
11202
|
+
function assertPlainHost(raw) {
|
|
11203
|
+
if (raw.includes("/") || raw.includes("@") || raw.includes("?") || raw.includes("#")) {
|
|
11204
|
+
throw new Error(`SIGNET_HOST must be a hostname or IP address, not a URL: ${raw}`);
|
|
11205
|
+
}
|
|
11206
|
+
const host = raw.startsWith("[") && raw.endsWith("]") ? raw.slice(1, -1) : raw;
|
|
11207
|
+
if (host.includes(":")) {
|
|
11208
|
+
if (/^[0-9A-Fa-f:.]+$/.test(host))
|
|
11209
|
+
return;
|
|
11210
|
+
throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
|
|
11211
|
+
}
|
|
11212
|
+
if (!/^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(host)) {
|
|
11213
|
+
throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
|
|
11214
|
+
}
|
|
11215
|
+
}
|
|
11216
|
+
function normalizeDaemonUrl(raw, source) {
|
|
11217
|
+
let parsed;
|
|
11218
|
+
try {
|
|
11219
|
+
parsed = new URL(raw);
|
|
11220
|
+
} catch {
|
|
11221
|
+
throw new Error(`${source} must be an http(s) URL: ${raw}`);
|
|
11222
|
+
}
|
|
11223
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
11224
|
+
throw new Error(`${source} must use http or https: ${raw}`);
|
|
11225
|
+
}
|
|
11226
|
+
if (parsed.username || parsed.password) {
|
|
11227
|
+
throw new Error(`${source} must not include username or password credentials`);
|
|
11228
|
+
}
|
|
11229
|
+
if (parsed.search || parsed.hash) {
|
|
11230
|
+
throw new Error(`${source} must not include query strings or fragments`);
|
|
11231
|
+
}
|
|
11232
|
+
if (parsed.pathname !== "/" && parsed.pathname !== "") {
|
|
11233
|
+
throw new Error(`${source} must point at the daemon origin, not a path: ${raw}`);
|
|
11234
|
+
}
|
|
11235
|
+
return parsed.toString().replace(/\/$/, "");
|
|
11236
|
+
}
|
|
11237
|
+
function resolveSignetDaemonUrl(opts = {}) {
|
|
11238
|
+
const env = opts.env ?? process.env;
|
|
11239
|
+
const fallbackHost = opts.defaultHost ?? "127.0.0.1";
|
|
11240
|
+
const fallbackPort = opts.defaultPort ?? 3850;
|
|
11241
|
+
const explicit = readEnv(env, "SIGNET_DAEMON_URL");
|
|
11242
|
+
if (explicit)
|
|
11243
|
+
return normalizeDaemonUrl(explicit, "SIGNET_DAEMON_URL");
|
|
11244
|
+
if (opts.configUrl)
|
|
11245
|
+
return normalizeDaemonUrl(opts.configUrl, "daemon.url");
|
|
11246
|
+
const host = readEnv(env, "SIGNET_HOST") ?? fallbackHost;
|
|
11247
|
+
assertPlainHost(host);
|
|
11248
|
+
const port = normalizePort(readEnv(env, "SIGNET_PORT"), fallbackPort);
|
|
11249
|
+
return normalizeDaemonUrl(`http://${bracketIpv6Host(host)}:${port}`, "SIGNET_HOST/SIGNET_PORT");
|
|
11250
|
+
}
|
|
11178
11251
|
var native = null;
|
|
11179
11252
|
try {
|
|
11180
11253
|
const esmRequire = createRequire2(import.meta.url);
|
|
@@ -11503,6 +11576,18 @@ function readTrimmedEnv2(name) {
|
|
|
11503
11576
|
const trimmed = value.trim().replace(/[\r\n]+/g, "");
|
|
11504
11577
|
return trimmed.length > 0 ? trimmed : undefined;
|
|
11505
11578
|
}
|
|
11579
|
+
function readManagedTrimmedEnv(name) {
|
|
11580
|
+
return readTrimmedEnv2(name);
|
|
11581
|
+
}
|
|
11582
|
+
function resolveSignetDaemonUrl2() {
|
|
11583
|
+
return resolveSignetDaemonUrl();
|
|
11584
|
+
}
|
|
11585
|
+
function resolveSignetApiKey() {
|
|
11586
|
+
return readManagedTrimmedEnv("SIGNET_API_KEY") ?? readManagedTrimmedEnv("SIGNET_TOKEN");
|
|
11587
|
+
}
|
|
11588
|
+
function resolveRemoteDaemonUrl() {
|
|
11589
|
+
return readManagedTrimmedEnv("SIGNET_DAEMON_URL") ? resolveSignetDaemonUrl2() : null;
|
|
11590
|
+
}
|
|
11506
11591
|
|
|
11507
11592
|
// ../../../platform/core/dist/index.js
|
|
11508
11593
|
import { createRequire as createRequire3 } from "node:module";
|
|
@@ -22678,79 +22763,6 @@ function expandHome(p, home2 = homedir2()) {
|
|
|
22678
22763
|
}
|
|
22679
22764
|
var LOCAL_BINDS2 = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"]);
|
|
22680
22765
|
var import_yaml22 = __toESM(require_dist2(), 1);
|
|
22681
|
-
function readEnv(env, name) {
|
|
22682
|
-
const value = env[name];
|
|
22683
|
-
if (typeof value !== "string")
|
|
22684
|
-
return;
|
|
22685
|
-
const trimmed = value.trim();
|
|
22686
|
-
return trimmed.length > 0 ? trimmed : undefined;
|
|
22687
|
-
}
|
|
22688
|
-
function normalizePort(raw, fallback) {
|
|
22689
|
-
if (!raw)
|
|
22690
|
-
return String(fallback);
|
|
22691
|
-
if (!/^\d+$/.test(raw)) {
|
|
22692
|
-
throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
|
|
22693
|
-
}
|
|
22694
|
-
const port = Number.parseInt(raw, 10);
|
|
22695
|
-
if (!Number.isFinite(port) || port < 1 || port > 65535) {
|
|
22696
|
-
throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
|
|
22697
|
-
}
|
|
22698
|
-
return String(port);
|
|
22699
|
-
}
|
|
22700
|
-
function bracketIpv6Host(host) {
|
|
22701
|
-
if (host.startsWith("[") || !host.includes(":"))
|
|
22702
|
-
return host;
|
|
22703
|
-
return `[${host}]`;
|
|
22704
|
-
}
|
|
22705
|
-
function assertPlainHost(raw) {
|
|
22706
|
-
if (raw.includes("/") || raw.includes("@") || raw.includes("?") || raw.includes("#")) {
|
|
22707
|
-
throw new Error(`SIGNET_HOST must be a hostname or IP address, not a URL: ${raw}`);
|
|
22708
|
-
}
|
|
22709
|
-
const host = raw.startsWith("[") && raw.endsWith("]") ? raw.slice(1, -1) : raw;
|
|
22710
|
-
if (host.includes(":")) {
|
|
22711
|
-
if (/^[0-9A-Fa-f:.]+$/.test(host))
|
|
22712
|
-
return;
|
|
22713
|
-
throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
|
|
22714
|
-
}
|
|
22715
|
-
if (!/^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(host)) {
|
|
22716
|
-
throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
|
|
22717
|
-
}
|
|
22718
|
-
}
|
|
22719
|
-
function normalizeDaemonUrl(raw, source) {
|
|
22720
|
-
let parsed;
|
|
22721
|
-
try {
|
|
22722
|
-
parsed = new URL(raw);
|
|
22723
|
-
} catch {
|
|
22724
|
-
throw new Error(`${source} must be an http(s) URL: ${raw}`);
|
|
22725
|
-
}
|
|
22726
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
22727
|
-
throw new Error(`${source} must use http or https: ${raw}`);
|
|
22728
|
-
}
|
|
22729
|
-
if (parsed.username || parsed.password) {
|
|
22730
|
-
throw new Error(`${source} must not include username or password credentials`);
|
|
22731
|
-
}
|
|
22732
|
-
if (parsed.search || parsed.hash) {
|
|
22733
|
-
throw new Error(`${source} must not include query strings or fragments`);
|
|
22734
|
-
}
|
|
22735
|
-
if (parsed.pathname !== "/" && parsed.pathname !== "") {
|
|
22736
|
-
throw new Error(`${source} must point at the daemon origin, not a path: ${raw}`);
|
|
22737
|
-
}
|
|
22738
|
-
return parsed.toString().replace(/\/$/, "");
|
|
22739
|
-
}
|
|
22740
|
-
function resolveSignetDaemonUrl(opts = {}) {
|
|
22741
|
-
const env = opts.env ?? process.env;
|
|
22742
|
-
const fallbackHost = opts.defaultHost ?? "127.0.0.1";
|
|
22743
|
-
const fallbackPort = opts.defaultPort ?? 3850;
|
|
22744
|
-
const explicit = readEnv(env, "SIGNET_DAEMON_URL");
|
|
22745
|
-
if (explicit)
|
|
22746
|
-
return normalizeDaemonUrl(explicit, "SIGNET_DAEMON_URL");
|
|
22747
|
-
if (opts.configUrl)
|
|
22748
|
-
return normalizeDaemonUrl(opts.configUrl, "daemon.url");
|
|
22749
|
-
const host = readEnv(env, "SIGNET_HOST") ?? fallbackHost;
|
|
22750
|
-
assertPlainHost(host);
|
|
22751
|
-
const port = normalizePort(readEnv(env, "SIGNET_PORT"), fallbackPort);
|
|
22752
|
-
return normalizeDaemonUrl(`http://${bracketIpv6Host(host)}:${port}`, "SIGNET_HOST/SIGNET_PORT");
|
|
22753
|
-
}
|
|
22754
22766
|
var native2 = null;
|
|
22755
22767
|
try {
|
|
22756
22768
|
const esmRequire = createRequire22(import.meta.url);
|
|
@@ -22950,12 +22962,6 @@ function resolveSignetMcp(runtime = null) {
|
|
|
22950
22962
|
return { command: runtime, args: [mcpEntry] };
|
|
22951
22963
|
return resolveSignetMcpCommand();
|
|
22952
22964
|
}
|
|
22953
|
-
function resolveRemoteDaemonUrl() {
|
|
22954
|
-
const explicit = readTrimmedEnv2("SIGNET_DAEMON_URL");
|
|
22955
|
-
if (!explicit)
|
|
22956
|
-
return null;
|
|
22957
|
-
return resolveSignetDaemonUrl();
|
|
22958
|
-
}
|
|
22959
22965
|
var CODEX_DESKTOP_APP_PATHS = [join4(homedir(), "Applications", "Codex.app"), "/Applications/Codex.app"];
|
|
22960
22966
|
var CODEX_RUNTIME_SCAN_DEPTH = 8;
|
|
22961
22967
|
function codexDesktopNodeCandidates(root, depth = 0) {
|
|
@@ -23158,7 +23164,7 @@ function cmdEnvQuote(value) {
|
|
|
23158
23164
|
return value.replace(/[\^"&|<>]/g, "^$&");
|
|
23159
23165
|
}
|
|
23160
23166
|
function readAuthTokenEnv() {
|
|
23161
|
-
return
|
|
23167
|
+
return resolveSignetApiKey();
|
|
23162
23168
|
}
|
|
23163
23169
|
function withRemoteDaemonEnv(command, remoteDaemonUrl) {
|
|
23164
23170
|
const apiKey = readAuthTokenEnv();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-codex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.164.0",
|
|
4
4
|
"description": "Signet connector for Codex CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"typecheck": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@signetai/connector-base": "0.
|
|
28
|
-
"@signetai/core": "0.
|
|
27
|
+
"@signetai/connector-base": "0.164.0",
|
|
28
|
+
"@signetai/core": "0.164.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.0.0",
|