@signetai/connector-gemini 0.154.6 → 0.154.7
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.js +156 -90
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6,29 +6,32 @@ import {
|
|
|
6
6
|
readFileSync as readFileSync2,
|
|
7
7
|
readdirSync,
|
|
8
8
|
readlinkSync,
|
|
9
|
-
rmSync,
|
|
9
|
+
rmSync as rmSync2,
|
|
10
10
|
unlinkSync as unlinkSync3,
|
|
11
|
-
writeFileSync as
|
|
11
|
+
writeFileSync as writeFileSync3
|
|
12
12
|
} from "node:fs";
|
|
13
|
-
import { homedir as
|
|
14
|
-
import { dirname as
|
|
13
|
+
import { homedir as homedir5 } from "node:os";
|
|
14
|
+
import { dirname as dirname8, join as join6, resolve as resolve2, sep } from "node:path";
|
|
15
15
|
|
|
16
16
|
// ../../../libs/connector-base/dist/index.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
|
-
import { existsSync, readFileSync, renameSync, statSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
18
|
+
import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
19
19
|
import { homedir } from "node:os";
|
|
20
|
-
import { dirname as
|
|
20
|
+
import { dirname as dirname3, join as join3 } from "node:path";
|
|
21
21
|
import { createRequire } from "node:module";
|
|
22
22
|
import { dirname, join } from "node:path";
|
|
23
23
|
import { fileURLToPath } from "node:url";
|
|
24
24
|
import { homedir as homedir2 } from "os";
|
|
25
25
|
import { join as join2 } from "path";
|
|
26
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync3, rmSync, statSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
27
|
+
import { homedir as homedir3 } from "node:os";
|
|
28
|
+
import { dirname as dirname2, join as join5, resolve } from "node:path";
|
|
26
29
|
import { createRequire as createRequire2 } from "node:module";
|
|
27
|
-
import { homedir as
|
|
28
|
-
import { basename, dirname as
|
|
29
|
-
import { homedir as
|
|
30
|
-
import { existsSync as
|
|
31
|
-
import { join as
|
|
30
|
+
import { homedir as homedir4, platform as platform2 } from "node:os";
|
|
31
|
+
import { basename, dirname as dirname4, resolve as resolve4 } from "node:path";
|
|
32
|
+
import { homedir as homedir8 } from "node:os";
|
|
33
|
+
import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync9, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
|
|
34
|
+
import { join as join13 } from "node:path";
|
|
32
35
|
var __create2 = Object.create;
|
|
33
36
|
var __getProtoOf2 = Object.getPrototypeOf;
|
|
34
37
|
var __defProp2 = Object.defineProperty;
|
|
@@ -10714,6 +10717,109 @@ function expandHome(p, home = homedir2()) {
|
|
|
10714
10717
|
}
|
|
10715
10718
|
var LOCAL_BINDS = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"]);
|
|
10716
10719
|
var import_yaml2 = __toESM2(require_dist(), 1);
|
|
10720
|
+
var WORKSPACE_ENV_KEYS = ["SIGNET_PATH", "SIGNET_WORKSPACE"];
|
|
10721
|
+
var DEFAULT_AGENTS_DIRNAME = ".agents";
|
|
10722
|
+
function normalizeWorkspacePath(pathValue, home = homedir3()) {
|
|
10723
|
+
return resolve(expandHome(pathValue.trim(), home));
|
|
10724
|
+
}
|
|
10725
|
+
function readTrimmedEnv(env, name) {
|
|
10726
|
+
const value = env[name];
|
|
10727
|
+
if (typeof value !== "string")
|
|
10728
|
+
return;
|
|
10729
|
+
const trimmed = value.trim();
|
|
10730
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
10731
|
+
}
|
|
10732
|
+
function readConfigHome(env, home) {
|
|
10733
|
+
const raw = env.XDG_CONFIG_HOME;
|
|
10734
|
+
if (typeof raw !== "string")
|
|
10735
|
+
return join5(home, ".config");
|
|
10736
|
+
const trimmed = raw.trim();
|
|
10737
|
+
return trimmed.length > 0 ? normalizeWorkspacePath(trimmed, home) : join5(home, ".config");
|
|
10738
|
+
}
|
|
10739
|
+
function isExistingDirectory(path) {
|
|
10740
|
+
try {
|
|
10741
|
+
return statSync(path).isDirectory();
|
|
10742
|
+
} catch {
|
|
10743
|
+
return false;
|
|
10744
|
+
}
|
|
10745
|
+
}
|
|
10746
|
+
function isRecord4(value) {
|
|
10747
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10748
|
+
}
|
|
10749
|
+
function getWorkspaceConfigPath(env = process.env, home = homedir3()) {
|
|
10750
|
+
return join5(readConfigHome(env, home), "signet", "workspace.json");
|
|
10751
|
+
}
|
|
10752
|
+
function readConfiguredWorkspacePath(env = process.env, home = homedir3(), options = {}) {
|
|
10753
|
+
const strict = options.strict ?? false;
|
|
10754
|
+
const configPath = getWorkspaceConfigPath(env, home);
|
|
10755
|
+
if (!existsSync4(configPath))
|
|
10756
|
+
return null;
|
|
10757
|
+
let raw;
|
|
10758
|
+
try {
|
|
10759
|
+
raw = JSON.parse(readFileSync3(configPath, "utf-8"));
|
|
10760
|
+
} catch (err) {
|
|
10761
|
+
if (strict) {
|
|
10762
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
10763
|
+
throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
|
|
10764
|
+
}
|
|
10765
|
+
return null;
|
|
10766
|
+
}
|
|
10767
|
+
if (!isRecord4(raw) || !("workspace" in raw)) {
|
|
10768
|
+
if (strict)
|
|
10769
|
+
throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
|
|
10770
|
+
return null;
|
|
10771
|
+
}
|
|
10772
|
+
const workspace = raw.workspace;
|
|
10773
|
+
if (typeof workspace !== "string" || workspace.trim().length === 0) {
|
|
10774
|
+
if (strict)
|
|
10775
|
+
throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
|
|
10776
|
+
return null;
|
|
10777
|
+
}
|
|
10778
|
+
return normalizeWorkspacePath(workspace, home);
|
|
10779
|
+
}
|
|
10780
|
+
function resolveWorkspacePath(options = {}) {
|
|
10781
|
+
const env = options.env ?? process.env;
|
|
10782
|
+
const home = options.home ?? homedir3();
|
|
10783
|
+
const strict = options.strict ?? false;
|
|
10784
|
+
const requireExistingEnvPath = options.requireExistingEnvPath ?? false;
|
|
10785
|
+
const configPath = getWorkspaceConfigPath(env, home);
|
|
10786
|
+
const envPath = resolveEnvWorkspace(env, home, requireExistingEnvPath);
|
|
10787
|
+
const configValue = readConfiguredWorkspacePath(env, home, { strict: envPath ? false : strict });
|
|
10788
|
+
if (envPath) {
|
|
10789
|
+
return {
|
|
10790
|
+
path: envPath,
|
|
10791
|
+
source: "env",
|
|
10792
|
+
configPath,
|
|
10793
|
+
configuredPath: configValue
|
|
10794
|
+
};
|
|
10795
|
+
}
|
|
10796
|
+
if (configValue) {
|
|
10797
|
+
return {
|
|
10798
|
+
path: configValue,
|
|
10799
|
+
source: "config",
|
|
10800
|
+
configPath,
|
|
10801
|
+
configuredPath: configValue
|
|
10802
|
+
};
|
|
10803
|
+
}
|
|
10804
|
+
return {
|
|
10805
|
+
path: join5(home, DEFAULT_AGENTS_DIRNAME),
|
|
10806
|
+
source: "default",
|
|
10807
|
+
configPath,
|
|
10808
|
+
configuredPath: configValue
|
|
10809
|
+
};
|
|
10810
|
+
}
|
|
10811
|
+
function resolveEnvWorkspace(env, home, requireExisting) {
|
|
10812
|
+
for (const key of WORKSPACE_ENV_KEYS) {
|
|
10813
|
+
const raw = readTrimmedEnv(env, key);
|
|
10814
|
+
if (!raw)
|
|
10815
|
+
continue;
|
|
10816
|
+
const normalized = normalizeWorkspacePath(raw, home);
|
|
10817
|
+
if (!requireExisting || isExistingDirectory(normalized))
|
|
10818
|
+
return normalized;
|
|
10819
|
+
console.warn(`[signet] ${key}="${raw}" does not point to an existing workspace directory; using the default workspace resolution instead.`);
|
|
10820
|
+
}
|
|
10821
|
+
return null;
|
|
10822
|
+
}
|
|
10717
10823
|
var native = null;
|
|
10718
10824
|
try {
|
|
10719
10825
|
const esmRequire = createRequire2(import.meta.url);
|
|
@@ -10788,11 +10894,11 @@ var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
|
|
|
10788
10894
|
function defaultDiscordDesktopCachePath() {
|
|
10789
10895
|
switch (platform2()) {
|
|
10790
10896
|
case "darwin":
|
|
10791
|
-
return
|
|
10897
|
+
return resolve4(homedir4(), "Library", "Application Support", "discord");
|
|
10792
10898
|
case "win32":
|
|
10793
|
-
return
|
|
10899
|
+
return resolve4(process.env.APPDATA || resolve4(homedir4(), "AppData", "Roaming"), "discord");
|
|
10794
10900
|
default:
|
|
10795
|
-
return
|
|
10901
|
+
return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir4(), ".config"), "discord");
|
|
10796
10902
|
}
|
|
10797
10903
|
}
|
|
10798
10904
|
var IDENTITY_FILES = {
|
|
@@ -10860,15 +10966,15 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
10860
10966
|
skipped: [],
|
|
10861
10967
|
errors: []
|
|
10862
10968
|
};
|
|
10863
|
-
if (!
|
|
10969
|
+
if (!existsSync13(sourceDir)) {
|
|
10864
10970
|
return result;
|
|
10865
10971
|
}
|
|
10866
|
-
const targetParent =
|
|
10867
|
-
if (!
|
|
10868
|
-
|
|
10972
|
+
const targetParent = join13(targetDir, "..");
|
|
10973
|
+
if (!existsSync13(targetParent)) {
|
|
10974
|
+
mkdirSync9(targetParent, { recursive: true });
|
|
10869
10975
|
}
|
|
10870
|
-
if (!
|
|
10871
|
-
|
|
10976
|
+
if (!existsSync13(targetDir)) {
|
|
10977
|
+
mkdirSync9(targetDir, { recursive: true });
|
|
10872
10978
|
}
|
|
10873
10979
|
let entries;
|
|
10874
10980
|
try {
|
|
@@ -10881,8 +10987,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
10881
10987
|
return result;
|
|
10882
10988
|
}
|
|
10883
10989
|
for (const entry of entries) {
|
|
10884
|
-
const srcPath =
|
|
10885
|
-
const destPath =
|
|
10990
|
+
const srcPath = join13(sourceDir, entry);
|
|
10991
|
+
const destPath = join13(targetDir, entry);
|
|
10886
10992
|
try {
|
|
10887
10993
|
const src = lstatSync(srcPath);
|
|
10888
10994
|
if (src.isSymbolicLink() || !src.isDirectory()) {
|
|
@@ -10923,7 +11029,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
10923
11029
|
}
|
|
10924
11030
|
return result;
|
|
10925
11031
|
}
|
|
10926
|
-
var home =
|
|
11032
|
+
var home = homedir8();
|
|
10927
11033
|
var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
|
|
10928
11034
|
var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
|
|
10929
11035
|
function stripSignetBlock(content) {
|
|
@@ -11080,7 +11186,7 @@ class BaseConnector {
|
|
|
11080
11186
|
generateHeader(sourcePath, targetName) {
|
|
11081
11187
|
const name = targetName || this.name;
|
|
11082
11188
|
const safe = (p) => p.replace(/[\n\r]/g, "");
|
|
11083
|
-
const root =
|
|
11189
|
+
const root = dirname3(sourcePath);
|
|
11084
11190
|
return `# Auto-generated from ${safe(sourcePath)}
|
|
11085
11191
|
# Source: ${safe(sourcePath)}
|
|
11086
11192
|
# Generated: ${new Date().toISOString()}
|
|
@@ -11117,11 +11223,11 @@ function isSignetGeneratedFile(raw) {
|
|
|
11117
11223
|
return lines.some((line, i) => /^#\s+AUTO-GENERATED\s+from\s+.*\s+by\s+Signet/i.test(line) || /^#\s+Auto-generated\s+from\s+/.test(line) && i + 1 < lines.length && /^#\s+Source:\s+/.test(lines[i + 1]));
|
|
11118
11224
|
}
|
|
11119
11225
|
function atomicWriteText(path, content, mode) {
|
|
11120
|
-
const tmp = join3(
|
|
11226
|
+
const tmp = join3(dirname3(path), `.${randomBytes(6).toString("hex")}.tmp`);
|
|
11121
11227
|
let writeMode = mode;
|
|
11122
11228
|
if (writeMode === undefined) {
|
|
11123
11229
|
try {
|
|
11124
|
-
writeMode =
|
|
11230
|
+
writeMode = statSync2(path).mode & 511;
|
|
11125
11231
|
} catch {}
|
|
11126
11232
|
}
|
|
11127
11233
|
try {
|
|
@@ -11138,62 +11244,22 @@ function atomicWriteJson(path, data, indent = 2) {
|
|
|
11138
11244
|
atomicWriteText(path, `${JSON.stringify(data, null, indent)}
|
|
11139
11245
|
`);
|
|
11140
11246
|
}
|
|
11141
|
-
function readManagedTrimmedEnv(name) {
|
|
11142
|
-
const value = process.env[name];
|
|
11143
|
-
if (typeof value !== "string")
|
|
11144
|
-
return;
|
|
11145
|
-
const trimmed = value.trim();
|
|
11146
|
-
return trimmed.length > 0 ? trimmed : undefined;
|
|
11147
|
-
}
|
|
11148
|
-
function isExistingDirectory(path) {
|
|
11149
|
-
try {
|
|
11150
|
-
return statSync(path).isDirectory();
|
|
11151
|
-
} catch {
|
|
11152
|
-
return false;
|
|
11153
|
-
}
|
|
11154
|
-
}
|
|
11155
11247
|
function resolveSignetWorkspacePath(home2 = homedir()) {
|
|
11156
|
-
|
|
11157
|
-
if (configured) {
|
|
11158
|
-
const resolved = resolve(expandHome(configured));
|
|
11159
|
-
if (isExistingDirectory(resolved))
|
|
11160
|
-
return resolved;
|
|
11161
|
-
console.warn(`[signet] SIGNET_PATH="${configured}" does not point to an existing workspace directory; using the default workspace resolution instead.`);
|
|
11162
|
-
}
|
|
11163
|
-
const defaultWorkspace = join3(home2, ".agents");
|
|
11164
|
-
const configHome = readManagedTrimmedEnv("XDG_CONFIG_HOME") ?? join3(home2, ".config");
|
|
11165
|
-
const workspaceConfigPath = join3(configHome, "signet", "workspace.json");
|
|
11166
|
-
if (!existsSync(workspaceConfigPath))
|
|
11167
|
-
return defaultWorkspace;
|
|
11168
|
-
let raw;
|
|
11169
|
-
try {
|
|
11170
|
-
raw = JSON.parse(readFileSync(workspaceConfigPath, "utf8"));
|
|
11171
|
-
} catch (err) {
|
|
11172
|
-
const detail = err instanceof Error ? err.message : String(err);
|
|
11173
|
-
throw new Error(`Invalid Signet workspace config at ${workspaceConfigPath}: ${detail}`);
|
|
11174
|
-
}
|
|
11175
|
-
if (typeof raw !== "object" || raw === null || !("workspace" in raw)) {
|
|
11176
|
-
throw new Error(`Invalid Signet workspace config at ${workspaceConfigPath}: missing workspace`);
|
|
11177
|
-
}
|
|
11178
|
-
const workspace = raw.workspace;
|
|
11179
|
-
if (typeof workspace !== "string" || workspace.trim().length === 0) {
|
|
11180
|
-
throw new Error(`Invalid Signet workspace config at ${workspaceConfigPath}: workspace must be a non-empty string`);
|
|
11181
|
-
}
|
|
11182
|
-
return resolve(expandHome(workspace.trim()));
|
|
11248
|
+
return resolveWorkspacePath({ home: home2, strict: true, requireExistingEnvPath: true }).path;
|
|
11183
11249
|
}
|
|
11184
11250
|
|
|
11185
11251
|
// ../../../platform/core/dist/index.js
|
|
11186
11252
|
import { createRequire as createRequire3 } from "node:module";
|
|
11187
|
-
import { dirname as
|
|
11253
|
+
import { dirname as dirname5, join as join4 } from "node:path";
|
|
11188
11254
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
11189
11255
|
import { homedir as homedir22 } from "os";
|
|
11190
11256
|
import { join as join22 } from "path";
|
|
11191
11257
|
import { createRequire as createRequire22 } from "node:module";
|
|
11192
|
-
import { homedir as
|
|
11193
|
-
import { basename as basename2, dirname as
|
|
11194
|
-
import { existsSync as
|
|
11195
|
-
import { dirname as
|
|
11196
|
-
import { homedir as
|
|
11258
|
+
import { homedir as homedir42, platform as platform22 } from "node:os";
|
|
11259
|
+
import { basename as basename2, dirname as dirname42, resolve as resolve42 } from "node:path";
|
|
11260
|
+
import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as statSync5 } from "node:fs";
|
|
11261
|
+
import { dirname as dirname7, join as join11 } from "node:path";
|
|
11262
|
+
import { homedir as homedir82 } from "node:os";
|
|
11197
11263
|
var __create = Object.create;
|
|
11198
11264
|
var __getProtoOf = Object.getPrototypeOf;
|
|
11199
11265
|
var __defProp = Object.defineProperty;
|
|
@@ -21868,7 +21934,7 @@ var MIGRATIONS2 = [
|
|
|
21868
21934
|
];
|
|
21869
21935
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|
|
21870
21936
|
var __filename22 = fileURLToPath2(import.meta.url);
|
|
21871
|
-
var __dirname22 =
|
|
21937
|
+
var __dirname22 = dirname5(__filename22);
|
|
21872
21938
|
var import_yaml3 = __toESM(require_dist2(), 1);
|
|
21873
21939
|
function expandHome2(p, home2 = homedir22()) {
|
|
21874
21940
|
if (p === "~")
|
|
@@ -21961,11 +22027,11 @@ var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
|
|
|
21961
22027
|
function defaultDiscordDesktopCachePath2() {
|
|
21962
22028
|
switch (platform22()) {
|
|
21963
22029
|
case "darwin":
|
|
21964
|
-
return
|
|
22030
|
+
return resolve42(homedir42(), "Library", "Application Support", "discord");
|
|
21965
22031
|
case "win32":
|
|
21966
|
-
return
|
|
22032
|
+
return resolve42(process.env.APPDATA || resolve42(homedir42(), "AppData", "Roaming"), "discord");
|
|
21967
22033
|
default:
|
|
21968
|
-
return
|
|
22034
|
+
return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir42(), ".config"), "discord");
|
|
21969
22035
|
}
|
|
21970
22036
|
}
|
|
21971
22037
|
var IDENTITY_MODES = ["managed", "passthrough", "off"];
|
|
@@ -22030,7 +22096,7 @@ function hasValidIdentity(basePath) {
|
|
|
22030
22096
|
return true;
|
|
22031
22097
|
for (const key of REQUIRED_IDENTITY_KEYS2) {
|
|
22032
22098
|
const spec = IDENTITY_FILES2[key];
|
|
22033
|
-
if (!
|
|
22099
|
+
if (!existsSync11(join11(basePath, spec.path))) {
|
|
22034
22100
|
return false;
|
|
22035
22101
|
}
|
|
22036
22102
|
}
|
|
@@ -22056,16 +22122,16 @@ function resolveIdentityModeFromConfig(config) {
|
|
|
22056
22122
|
return "managed";
|
|
22057
22123
|
}
|
|
22058
22124
|
function loadIdentityMode(agentsDir) {
|
|
22059
|
-
const agentYaml =
|
|
22060
|
-
if (!
|
|
22125
|
+
const agentYaml = join11(agentsDir, "agent.yaml");
|
|
22126
|
+
if (!existsSync11(agentYaml))
|
|
22061
22127
|
return "managed";
|
|
22062
22128
|
try {
|
|
22063
|
-
return resolveIdentityModeFromConfig(parseSimpleYaml(
|
|
22129
|
+
return resolveIdentityModeFromConfig(parseSimpleYaml(readFileSync9(agentYaml, "utf-8")));
|
|
22064
22130
|
} catch {
|
|
22065
22131
|
return "managed";
|
|
22066
22132
|
}
|
|
22067
22133
|
}
|
|
22068
|
-
var home2 =
|
|
22134
|
+
var home2 = homedir82();
|
|
22069
22135
|
var SKIP_SUBTYPES2 = new Set([
|
|
22070
22136
|
"channel_join",
|
|
22071
22137
|
"channel_leave",
|
|
@@ -22206,7 +22272,7 @@ class GeminiConnector extends BaseConnector {
|
|
|
22206
22272
|
name = "Gemini";
|
|
22207
22273
|
harnessId = "gemini";
|
|
22208
22274
|
getGeminiHome() {
|
|
22209
|
-
return join6(
|
|
22275
|
+
return join6(homedir5(), ".gemini");
|
|
22210
22276
|
}
|
|
22211
22277
|
getConfigPath() {
|
|
22212
22278
|
return join6(this.getGeminiHome(), "settings.json");
|
|
@@ -22229,7 +22295,7 @@ class GeminiConnector extends BaseConnector {
|
|
|
22229
22295
|
async install(basePath) {
|
|
22230
22296
|
const filesWritten = [];
|
|
22231
22297
|
const configsPatched = [];
|
|
22232
|
-
const expandedBasePath = expandHome2(basePath || join6(
|
|
22298
|
+
const expandedBasePath = expandHome2(basePath || join6(homedir5(), ".agents"));
|
|
22233
22299
|
const identityMode = loadIdentityMode(expandedBasePath);
|
|
22234
22300
|
if (!hasValidIdentity(expandedBasePath)) {
|
|
22235
22301
|
return {
|
|
@@ -22264,7 +22330,7 @@ class GeminiConnector extends BaseConnector {
|
|
|
22264
22330
|
try {
|
|
22265
22331
|
const raw = readFileSync2(staleGeminiMd, "utf-8");
|
|
22266
22332
|
if (isSignetGeneratedFile(raw)) {
|
|
22267
|
-
|
|
22333
|
+
rmSync2(staleGeminiMd);
|
|
22268
22334
|
}
|
|
22269
22335
|
} catch {}
|
|
22270
22336
|
}
|
|
@@ -22294,7 +22360,7 @@ class GeminiConnector extends BaseConnector {
|
|
|
22294
22360
|
if (existsSync2(geminiMdPath)) {
|
|
22295
22361
|
const raw = readFileSync2(geminiMdPath, "utf-8");
|
|
22296
22362
|
if (isSignetGeneratedFile(raw)) {
|
|
22297
|
-
|
|
22363
|
+
rmSync2(geminiMdPath);
|
|
22298
22364
|
filesRemoved.push(geminiMdPath);
|
|
22299
22365
|
}
|
|
22300
22366
|
}
|
|
@@ -22312,7 +22378,7 @@ class GeminiConnector extends BaseConnector {
|
|
|
22312
22378
|
return isJsonObject(mcpServers) && "signet" in mcpServers;
|
|
22313
22379
|
}
|
|
22314
22380
|
static isHarnessInstalled() {
|
|
22315
|
-
return existsSync2(join6(
|
|
22381
|
+
return existsSync2(join6(homedir5(), ".gemini", "settings.json"));
|
|
22316
22382
|
}
|
|
22317
22383
|
removeSignetSkillSymlinks(skillsDir, signetWorkspace) {
|
|
22318
22384
|
const signetSkillsSource = resolve2(signetWorkspace, "skills");
|
|
@@ -22333,7 +22399,7 @@ class GeminiConnector extends BaseConnector {
|
|
|
22333
22399
|
if (stat?.isSymbolicLink()) {
|
|
22334
22400
|
try {
|
|
22335
22401
|
const rawTarget = readlinkSync(entryPath);
|
|
22336
|
-
const target = resolve2(
|
|
22402
|
+
const target = resolve2(dirname8(entryPath), rawTarget);
|
|
22337
22403
|
if (isChildOf(target, signetSkillsSource)) {
|
|
22338
22404
|
unlinkSync3(entryPath);
|
|
22339
22405
|
}
|
|
@@ -22401,8 +22467,8 @@ class GeminiConnector extends BaseConnector {
|
|
|
22401
22467
|
const header = this.generateHeader(sourcePath);
|
|
22402
22468
|
const extras = this.composeIdentityExtras(basePath);
|
|
22403
22469
|
const destPath = this.getGeminiMdPath();
|
|
22404
|
-
mkdirSync(
|
|
22405
|
-
|
|
22470
|
+
mkdirSync(dirname8(destPath), { recursive: true });
|
|
22471
|
+
writeFileSync3(destPath, header + userContent + extras);
|
|
22406
22472
|
return destPath;
|
|
22407
22473
|
}
|
|
22408
22474
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-gemini",
|
|
3
|
-
"version": "0.154.
|
|
3
|
+
"version": "0.154.7",
|
|
4
4
|
"description": "Signet connector for Gemini 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.154.
|
|
28
|
-
"@signetai/core": "0.154.
|
|
27
|
+
"@signetai/connector-base": "0.154.7",
|
|
28
|
+
"@signetai/core": "0.154.7"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.0.0",
|