@signetai/connector-gemini 0.200.3 → 0.200.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.
Files changed (2) hide show
  1. package/dist/index.js +61 -61
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -10,14 +10,14 @@ import {
10
10
  unlinkSync as unlinkSync3,
11
11
  writeFileSync as writeFileSync2
12
12
  } from "node:fs";
13
- import { homedir as homedir6 } from "node:os";
14
- import { dirname as dirname8, join as join7, resolve as resolve3 } from "node:path";
13
+ import { homedir as homedir3 } from "node:os";
14
+ import { dirname as dirname9, join as join8, resolve as resolve3 } 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 as renameSync2, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
18
+ import { existsSync, readFileSync, renameSync as renameSync2, statSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
19
19
  import { homedir } from "node:os";
20
- import { dirname as dirname5, isAbsolute, join as join3, relative, sep } from "node:path";
20
+ import { dirname as dirname2, isAbsolute, join as join3, relative, sep } 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";
@@ -33,19 +33,19 @@ import {
33
33
  readFileSync as readFileSync3,
34
34
  renameSync,
35
35
  rmSync,
36
- statSync,
36
+ statSync as statSync2,
37
37
  writeSync
38
38
  } from "node:fs";
39
- import { homedir as homedir3 } from "node:os";
40
- import { dirname as dirname2, join as join5, resolve } from "node:path";
41
- import { createRequire as createRequire2 } from "node:module";
42
39
  import { homedir as homedir4 } from "node:os";
43
- import { dirname as dirname3, join as join6, resolve as resolve2 } from "node:path";
44
- import { homedir as homedir5, platform as platform2 } from "node:os";
45
- import { basename, dirname as dirname4, resolve as resolve4 } from "node:path";
46
- import { homedir as homedir9 } from "node:os";
40
+ import { dirname as dirname3, join as join6, resolve } from "node:path";
41
+ import { createRequire as createRequire2 } from "node:module";
42
+ import { homedir as homedir5 } from "node:os";
43
+ import { dirname as dirname4, join as join7, resolve as resolve2 } from "node:path";
44
+ import { homedir as homedir6, platform as platform2 } from "node:os";
45
+ import { basename, dirname as dirname5, resolve as resolve4 } from "node:path";
46
+ import { homedir as homedir10 } from "node:os";
47
47
  import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync9, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
48
- import { join as join13 } from "node:path";
48
+ import { join as join14 } from "node:path";
49
49
  var __create2 = Object.create;
50
50
  var __getProtoOf2 = Object.getPrototypeOf;
51
51
  var __defProp2 = Object.defineProperty;
@@ -12391,7 +12391,7 @@ var LOCAL_BINDS = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"])
12391
12391
  var import_yaml2 = __toESM2(require_dist(), 1);
12392
12392
  var WORKSPACE_ENV_KEYS = ["SIGNET_PATH", "SIGNET_WORKSPACE"];
12393
12393
  var DEFAULT_AGENTS_DIRNAME = ".agents";
12394
- function normalizeWorkspacePath(pathValue, home = homedir3()) {
12394
+ function normalizeWorkspacePath(pathValue, home = homedir4()) {
12395
12395
  return resolve(expandHome(pathValue.trim(), home));
12396
12396
  }
12397
12397
  function readTrimmedEnv(env, name) {
@@ -12404,13 +12404,13 @@ function readTrimmedEnv(env, name) {
12404
12404
  function readConfigHome(env, home) {
12405
12405
  const raw = env.XDG_CONFIG_HOME;
12406
12406
  if (typeof raw !== "string")
12407
- return join5(home, ".config");
12407
+ return join6(home, ".config");
12408
12408
  const trimmed = raw.trim();
12409
- return trimmed.length > 0 ? normalizeWorkspacePath(trimmed, home) : join5(home, ".config");
12409
+ return trimmed.length > 0 ? normalizeWorkspacePath(trimmed, home) : join6(home, ".config");
12410
12410
  }
12411
12411
  function isExistingDirectory(path) {
12412
12412
  try {
12413
- return statSync(path).isDirectory();
12413
+ return statSync2(path).isDirectory();
12414
12414
  } catch {
12415
12415
  return false;
12416
12416
  }
@@ -12418,10 +12418,10 @@ function isExistingDirectory(path) {
12418
12418
  function isRecord4(value) {
12419
12419
  return typeof value === "object" && value !== null && !Array.isArray(value);
12420
12420
  }
12421
- function getWorkspaceConfigPath(env = process.env, home = homedir3()) {
12422
- return join5(readConfigHome(env, home), "signet", "workspace.json");
12421
+ function getWorkspaceConfigPath(env = process.env, home = homedir4()) {
12422
+ return join6(readConfigHome(env, home), "signet", "workspace.json");
12423
12423
  }
12424
- function readConfiguredWorkspacePath(env = process.env, home = homedir3(), _options = {}) {
12424
+ function readConfiguredWorkspacePath(env = process.env, home = homedir4(), _options = {}) {
12425
12425
  const configPath = getWorkspaceConfigPath(env, home);
12426
12426
  if (!existsSync4(configPath))
12427
12427
  return null;
@@ -12443,7 +12443,7 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir3(), _opti
12443
12443
  }
12444
12444
  function resolveWorkspacePath(options = {}) {
12445
12445
  const env = options.env ?? process.env;
12446
- const home = options.home ?? homedir3();
12446
+ const home = options.home ?? homedir4();
12447
12447
  const requireExistingEnvPath = options.requireExistingEnvPath ?? false;
12448
12448
  const configPath = getWorkspaceConfigPath(env, home);
12449
12449
  const envPath = resolveEnvWorkspace(env, home, requireExistingEnvPath);
@@ -12465,7 +12465,7 @@ function resolveWorkspacePath(options = {}) {
12465
12465
  };
12466
12466
  }
12467
12467
  return {
12468
- path: join5(home, DEFAULT_AGENTS_DIRNAME),
12468
+ path: join6(home, DEFAULT_AGENTS_DIRNAME),
12469
12469
  source: "default",
12470
12470
  configPath,
12471
12471
  configuredPath: configValue
@@ -12488,7 +12488,7 @@ try {
12488
12488
  const esmRequire = createRequire2(import.meta.url);
12489
12489
  native = esmRequire("@signet/native");
12490
12490
  } catch {}
12491
- var GRAPHIQ_DEFAULT_INSTALL_DIR = join6(homedir4(), ".local", "bin");
12491
+ var GRAPHIQ_DEFAULT_INSTALL_DIR = join7(homedir5(), ".local", "bin");
12492
12492
  var SIGNET_SOURCE_CHECKOUT_DIRNAME = "signetai";
12493
12493
  var SIGNET_GIT_ALLOWED_DIRECTORIES = ["skills", "tools", "dreaming"];
12494
12494
  var SIGNET_GIT_PROTECTED_PATHS = [
@@ -12558,11 +12558,11 @@ var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
12558
12558
  function defaultDiscordDesktopCachePath() {
12559
12559
  switch (platform2()) {
12560
12560
  case "darwin":
12561
- return resolve4(homedir5(), "Library", "Application Support", "discord");
12561
+ return resolve4(homedir6(), "Library", "Application Support", "discord");
12562
12562
  case "win32":
12563
- return resolve4(process.env.APPDATA || resolve4(homedir5(), "AppData", "Roaming"), "discord");
12563
+ return resolve4(process.env.APPDATA || resolve4(homedir6(), "AppData", "Roaming"), "discord");
12564
12564
  default:
12565
- return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir5(), ".config"), "discord");
12565
+ return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir6(), ".config"), "discord");
12566
12566
  }
12567
12567
  }
12568
12568
  var IDENTITY_FILES = {
@@ -12633,7 +12633,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
12633
12633
  if (!existsSync13(sourceDir)) {
12634
12634
  return result;
12635
12635
  }
12636
- const targetParent = join13(targetDir, "..");
12636
+ const targetParent = join14(targetDir, "..");
12637
12637
  if (!existsSync13(targetParent)) {
12638
12638
  mkdirSync9(targetParent, { recursive: true });
12639
12639
  }
@@ -12651,8 +12651,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
12651
12651
  return result;
12652
12652
  }
12653
12653
  for (const entry of entries) {
12654
- const srcPath = join13(sourceDir, entry);
12655
- const destPath = join13(targetDir, entry);
12654
+ const srcPath = join14(sourceDir, entry);
12655
+ const destPath = join14(targetDir, entry);
12656
12656
  try {
12657
12657
  const src = lstatSync(srcPath);
12658
12658
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -12693,7 +12693,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
12693
12693
  }
12694
12694
  return result;
12695
12695
  }
12696
- var home = homedir9();
12696
+ var home = homedir10();
12697
12697
  var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
12698
12698
  var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
12699
12699
  function stripSignetBlock(content) {
@@ -12734,7 +12734,7 @@ class BaseConnector {
12734
12734
  generateHeader(sourcePath, targetName) {
12735
12735
  const name = targetName || this.name;
12736
12736
  const safe = (p) => p.replace(/[\n\r]/g, "");
12737
- const root = dirname5(sourcePath);
12737
+ const root = dirname2(sourcePath);
12738
12738
  return `# Auto-generated from ${safe(sourcePath)}
12739
12739
  # Source: ${safe(sourcePath)}
12740
12740
  # Generated: ${new Date().toISOString()}
@@ -12774,11 +12774,11 @@ function isSignetGeneratedFile(raw) {
12774
12774
  });
12775
12775
  }
12776
12776
  function atomicWriteText(path, content, mode) {
12777
- const tmp = join3(dirname5(path), `.${randomBytes(6).toString("hex")}.tmp`);
12777
+ const tmp = join3(dirname2(path), `.${randomBytes(6).toString("hex")}.tmp`);
12778
12778
  let writeMode = mode;
12779
12779
  if (writeMode === undefined) {
12780
12780
  try {
12781
- writeMode = statSync2(path).mode & 511;
12781
+ writeMode = statSync(path).mode & 511;
12782
12782
  } catch {}
12783
12783
  }
12784
12784
  try {
@@ -12814,13 +12814,13 @@ import { createHash as createHash2 } from "node:crypto";
12814
12814
  import { homedir as homedir22 } from "os";
12815
12815
  import { join as join22 } from "path";
12816
12816
  import { createRequire as createRequire22 } from "node:module";
12817
- import { homedir as homedir42 } from "node:os";
12818
- import { dirname as dirname32, join as join62, resolve as resolve22 } from "node:path";
12819
- import { homedir as homedir52, platform as platform22 } from "node:os";
12820
- import { basename as basename2, dirname as dirname42, resolve as resolve42 } from "node:path";
12821
- import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as statSync5 } from "node:fs";
12822
- import { dirname as dirname7, join as join11 } from "node:path";
12823
- import { homedir as homedir92 } from "node:os";
12817
+ import { homedir as homedir52 } from "node:os";
12818
+ import { dirname as dirname42, join as join72, resolve as resolve22 } from "node:path";
12819
+ import { homedir as homedir62, platform as platform22 } from "node:os";
12820
+ import { basename as basename2, dirname as dirname52, resolve as resolve42 } from "node:path";
12821
+ import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as statSync6 } from "node:fs";
12822
+ import { dirname as dirname8, join as join12 } from "node:path";
12823
+ import { homedir as homedir102 } from "node:os";
12824
12824
  var __create = Object.create;
12825
12825
  var __getProtoOf = Object.getPrototypeOf;
12826
12826
  var __defProp = Object.defineProperty;
@@ -25177,7 +25177,7 @@ try {
25177
25177
  const esmRequire = createRequire22(import.meta.url);
25178
25178
  native2 = esmRequire("@signet/native");
25179
25179
  } catch {}
25180
- var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join62(homedir42(), ".local", "bin");
25180
+ var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join72(homedir52(), ".local", "bin");
25181
25181
  var SIGNET_SOURCE_CHECKOUT_DIRNAME2 = "signetai";
25182
25182
  var SIGNET_GIT_ALLOWED_DIRECTORIES2 = ["skills", "tools", "dreaming"];
25183
25183
  var SIGNET_GIT_PROTECTED_PATHS2 = [
@@ -25247,11 +25247,11 @@ var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
25247
25247
  function defaultDiscordDesktopCachePath2() {
25248
25248
  switch (platform22()) {
25249
25249
  case "darwin":
25250
- return resolve42(homedir52(), "Library", "Application Support", "discord");
25250
+ return resolve42(homedir62(), "Library", "Application Support", "discord");
25251
25251
  case "win32":
25252
- return resolve42(process.env.APPDATA || resolve42(homedir52(), "AppData", "Roaming"), "discord");
25252
+ return resolve42(process.env.APPDATA || resolve42(homedir62(), "AppData", "Roaming"), "discord");
25253
25253
  default:
25254
- return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir52(), ".config"), "discord");
25254
+ return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir62(), ".config"), "discord");
25255
25255
  }
25256
25256
  }
25257
25257
  var IDENTITY_MODES = ["managed", "off"];
@@ -25316,7 +25316,7 @@ function hasValidIdentity(basePath) {
25316
25316
  return true;
25317
25317
  for (const key of REQUIRED_IDENTITY_KEYS2) {
25318
25318
  const spec = IDENTITY_FILES2[key];
25319
- if (!existsSync11(join11(basePath, spec.path))) {
25319
+ if (!existsSync11(join12(basePath, spec.path))) {
25320
25320
  return false;
25321
25321
  }
25322
25322
  }
@@ -25345,7 +25345,7 @@ function resolveIdentityModeFromConfig(config) {
25345
25345
  return "managed";
25346
25346
  }
25347
25347
  function loadIdentityMode(agentsDir) {
25348
- const agentYaml = join11(agentsDir, "agent.yaml");
25348
+ const agentYaml = join12(agentsDir, "agent.yaml");
25349
25349
  if (!existsSync11(agentYaml))
25350
25350
  return "managed";
25351
25351
  try {
@@ -25354,7 +25354,7 @@ function loadIdentityMode(agentsDir) {
25354
25354
  return "managed";
25355
25355
  }
25356
25356
  }
25357
- var home2 = homedir92();
25357
+ var home2 = homedir102();
25358
25358
 
25359
25359
  // src/index.ts
25360
25360
  function readGeminiSettings(settingsPath) {
@@ -25372,10 +25372,10 @@ class GeminiConnector extends BaseConnector {
25372
25372
  name = "Gemini";
25373
25373
  harnessId = "gemini";
25374
25374
  getGeminiHome() {
25375
- return join7(homedir6(), ".gemini");
25375
+ return join8(homedir3(), ".gemini");
25376
25376
  }
25377
25377
  getConfigPath() {
25378
- return join7(this.getGeminiHome(), "settings.json");
25378
+ return join8(this.getGeminiHome(), "settings.json");
25379
25379
  }
25380
25380
  getGeminiMdPath() {
25381
25381
  const geminiHome = this.getGeminiHome();
@@ -25390,12 +25390,12 @@ class GeminiConnector extends BaseConnector {
25390
25390
  }
25391
25391
  }
25392
25392
  }
25393
- return join7(geminiHome, "GEMINI.md");
25393
+ return join8(geminiHome, "GEMINI.md");
25394
25394
  }
25395
25395
  async install(basePath) {
25396
25396
  const filesWritten = [];
25397
25397
  const configsPatched = [];
25398
- const expandedBasePath = expandHome2(basePath || join7(homedir6(), ".agents"));
25398
+ const expandedBasePath = expandHome2(basePath || join8(homedir3(), ".agents"));
25399
25399
  const identityMode = loadIdentityMode(expandedBasePath);
25400
25400
  if (!hasValidIdentity(expandedBasePath)) {
25401
25401
  return {
@@ -25435,8 +25435,8 @@ class GeminiConnector extends BaseConnector {
25435
25435
  } catch {}
25436
25436
  }
25437
25437
  }
25438
- const skillsSource = join7(expandedBasePath, "skills");
25439
- const skillsDest = join7(geminiHome, "skills");
25438
+ const skillsSource = join8(expandedBasePath, "skills");
25439
+ const skillsDest = join8(geminiHome, "skills");
25440
25440
  if (existsSync2(skillsSource)) {
25441
25441
  this.symlinkSkills(skillsSource, skillsDest);
25442
25442
  }
@@ -25464,7 +25464,7 @@ class GeminiConnector extends BaseConnector {
25464
25464
  filesRemoved.push(geminiMdPath);
25465
25465
  }
25466
25466
  }
25467
- const skillsDir = join7(geminiHome, "skills");
25467
+ const skillsDir = join8(geminiHome, "skills");
25468
25468
  if (existsSync2(skillsDir)) {
25469
25469
  this.removeSignetSkillSymlinks(skillsDir, signetWorkspace);
25470
25470
  }
@@ -25478,7 +25478,7 @@ class GeminiConnector extends BaseConnector {
25478
25478
  return isJsonObject(mcpServers) && "signet" in mcpServers;
25479
25479
  }
25480
25480
  static isHarnessInstalled() {
25481
- return existsSync2(join7(homedir6(), ".gemini", "settings.json"));
25481
+ return existsSync2(join8(homedir3(), ".gemini", "settings.json"));
25482
25482
  }
25483
25483
  removeSignetSkillSymlinks(skillsDir, signetWorkspace) {
25484
25484
  const signetSkillsSource = resolve3(signetWorkspace, "skills");
@@ -25489,7 +25489,7 @@ class GeminiConnector extends BaseConnector {
25489
25489
  return;
25490
25490
  }
25491
25491
  for (const entry of entries) {
25492
- const entryPath = join7(skillsDir, entry);
25492
+ const entryPath = join8(skillsDir, entry);
25493
25493
  let stat = null;
25494
25494
  try {
25495
25495
  stat = lstatSync2(entryPath);
@@ -25499,7 +25499,7 @@ class GeminiConnector extends BaseConnector {
25499
25499
  if (stat?.isSymbolicLink()) {
25500
25500
  try {
25501
25501
  const rawTarget = readlinkSync(entryPath);
25502
- const target = resolve3(dirname8(entryPath), rawTarget);
25502
+ const target = resolve3(dirname9(entryPath), rawTarget);
25503
25503
  if (isChildOf(target, signetSkillsSource)) {
25504
25504
  unlinkSync3(entryPath);
25505
25505
  }
@@ -25508,7 +25508,7 @@ class GeminiConnector extends BaseConnector {
25508
25508
  }
25509
25509
  }
25510
25510
  registerMcpServer(geminiHome) {
25511
- const settingsPath = join7(geminiHome, "settings.json");
25511
+ const settingsPath = join8(geminiHome, "settings.json");
25512
25512
  if (existsSync2(settingsPath)) {
25513
25513
  const settings2 = readGeminiSettings(settingsPath);
25514
25514
  if (!settings2) {
@@ -25538,7 +25538,7 @@ class GeminiConnector extends BaseConnector {
25538
25538
  return null;
25539
25539
  }
25540
25540
  removeMcpServer(geminiHome) {
25541
- const settingsPath = join7(geminiHome, "settings.json");
25541
+ const settingsPath = join8(geminiHome, "settings.json");
25542
25542
  const settings = readGeminiSettings(settingsPath);
25543
25543
  if (!settings)
25544
25544
  return false;
@@ -25559,7 +25559,7 @@ class GeminiConnector extends BaseConnector {
25559
25559
  return false;
25560
25560
  }
25561
25561
  generateGeminiMd(basePath) {
25562
- const sourcePath = join7(basePath, "AGENTS.md");
25562
+ const sourcePath = join8(basePath, "AGENTS.md");
25563
25563
  if (!existsSync2(sourcePath))
25564
25564
  return null;
25565
25565
  const raw = readFileSync2(sourcePath, "utf-8");
@@ -25574,7 +25574,7 @@ class GeminiConnector extends BaseConnector {
25574
25574
  ].join(`
25575
25575
  `);
25576
25576
  const destPath = this.getGeminiMdPath();
25577
- mkdirSync(dirname8(destPath), { recursive: true });
25577
+ mkdirSync(dirname9(destPath), { recursive: true });
25578
25578
  writeFileSync2(destPath, header + userContent + extras + notificationPolling);
25579
25579
  return destPath;
25580
25580
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-gemini",
3
- "version": "0.200.3",
3
+ "version": "0.200.4",
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.200.3",
28
- "@signetai/core": "0.200.3"
27
+ "@signetai/connector-base": "0.200.4",
28
+ "@signetai/core": "0.200.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",