@signetai/connector-gemini 0.219.5 → 0.220.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.
Files changed (2) hide show
  1. package/dist/index.js +107 -31
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  writeFileSync as writeFileSync2
12
12
  } from "node:fs";
13
13
  import { homedir as homedir3 } from "node:os";
14
- import { dirname as dirname9, join as join6, resolve as resolve6 } from "node:path";
14
+ import { dirname as dirname8, join as join6, resolve as resolve6 } from "node:path";
15
15
 
16
16
  // ../../../libs/connector-base/dist/index.js
17
17
  import { randomBytes } from "node:crypto";
@@ -21,10 +21,17 @@ import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "n
21
21
  import { createRequire } from "node:module";
22
22
  import { dirname, join } from "node:path";
23
23
  import { fileURLToPath } from "node:url";
24
+ import {
25
+ execFile as nodeExecFile,
26
+ execFileSync as nodeExecFileSync,
27
+ execSync as nodeExecSync,
28
+ spawn as nodeSpawn,
29
+ spawnSync as nodeSpawnSync
30
+ } from "node:child_process";
31
+ import { promisify } from "node:util";
24
32
  import { createHash } from "node:crypto";
25
33
  import { homedir as homedir2 } from "node:os";
26
34
  import { join as join2, resolve } from "node:path";
27
- import { execFileSync as execFileSync3 } from "node:child_process";
28
35
  import { createHash as createHash2 } from "node:crypto";
29
36
  import { createRequire as createRequire2 } from "node:module";
30
37
  import {
@@ -46,9 +53,9 @@ import { homedir as homedir5 } from "node:os";
46
53
  import { dirname as dirname4, join as join8, resolve as resolve3 } from "node:path";
47
54
  import { homedir as homedir6, platform as platform2 } from "node:os";
48
55
  import { basename, dirname as dirname5, resolve as resolve5 } from "node:path";
49
- import { homedir as homedir10 } from "node:os";
50
- import { existsSync as existsSync15, lstatSync, mkdirSync as mkdirSync10, readdirSync as readdirSync7, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
51
- import { join as join15 } from "node:path";
56
+ import { homedir as homedir8 } from "node:os";
57
+ import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync8, readdirSync as readdirSync6, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
58
+ import { join as join13 } from "node:path";
52
59
  var __create2 = Object.create;
53
60
  var __getProtoOf2 = Object.getPrototypeOf;
54
61
  var __defProp2 = Object.defineProperty;
@@ -11191,6 +11198,37 @@ var PIPELINE_PROVIDER_CHOICES = [
11191
11198
  var SYNTHESIS_PROVIDER_CHOICES = PIPELINE_PROVIDER_CHOICES.filter((provider) => provider !== "command");
11192
11199
  var PIPELINE_PROVIDER_SET = new Set(PIPELINE_PROVIDER_CHOICES);
11193
11200
  var SYNTHESIS_PROVIDER_SET = new Set(SYNTHESIS_PROVIDER_CHOICES);
11201
+ function withWindowsHide(options) {
11202
+ return {
11203
+ ...options ?? {},
11204
+ windowsHide: options?.windowsHide ?? true
11205
+ };
11206
+ }
11207
+ function isOptions(value) {
11208
+ return typeof value === "object" && value !== null && !Array.isArray(value);
11209
+ }
11210
+ function withWindowsHideArgument(args, firstOptionIndex) {
11211
+ const normalized = [...args];
11212
+ const optionIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && isOptions(value));
11213
+ if (optionIndex >= 0) {
11214
+ normalized[optionIndex] = withWindowsHide(normalized[optionIndex]);
11215
+ return normalized;
11216
+ }
11217
+ const placeholderIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && (value === undefined || value === null));
11218
+ if (placeholderIndex >= 0) {
11219
+ normalized[placeholderIndex] = withWindowsHide(undefined);
11220
+ return normalized;
11221
+ }
11222
+ const callbackIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && typeof value === "function");
11223
+ normalized.splice(callbackIndex >= 0 ? callbackIndex : normalized.length, 0, { windowsHide: true });
11224
+ return normalized;
11225
+ }
11226
+ var nodeExecFileAsync = promisify(nodeExecFile);
11227
+ var execFileHiddenImpl = (...args) => Reflect.apply(nodeExecFile, undefined, withWindowsHideArgument(args, 1));
11228
+ Object.defineProperty(execFileHiddenImpl, promisify.custom, {
11229
+ value: (...args) => Reflect.apply(nodeExecFileAsync, undefined, withWindowsHideArgument(args, 1))
11230
+ });
11231
+ var execFileSyncHidden = (...args) => Reflect.apply(nodeExecFileSync, undefined, withWindowsHideArgument(args, 1));
11194
11232
  var MEMORY_CONTENT_SAFETY_POLICY_VERSION = "memory-content-safety-v1";
11195
11233
  var MEMORY_CONTENT_SAFETY_REASONS = [
11196
11234
  "prompt_injection",
@@ -17713,7 +17751,7 @@ function linuxKeyringAvailable() {
17713
17751
  };
17714
17752
  }
17715
17753
  try {
17716
- execFileSync3("busctl", ["--user", "status", "org.freedesktop.secrets"], {
17754
+ execFileSyncHidden("busctl", ["--user", "status", "org.freedesktop.secrets"], {
17717
17755
  stdio: "ignore",
17718
17756
  timeout: 1000
17719
17757
  });
@@ -18035,19 +18073,19 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18035
18073
  skipped: [],
18036
18074
  errors: []
18037
18075
  };
18038
- if (!existsSync15(sourceDir)) {
18076
+ if (!existsSync13(sourceDir)) {
18039
18077
  return result;
18040
18078
  }
18041
- const targetParent = join15(targetDir, "..");
18042
- if (!existsSync15(targetParent)) {
18043
- mkdirSync10(targetParent, { recursive: true });
18079
+ const targetParent = join13(targetDir, "..");
18080
+ if (!existsSync13(targetParent)) {
18081
+ mkdirSync8(targetParent, { recursive: true });
18044
18082
  }
18045
- if (!existsSync15(targetDir)) {
18046
- mkdirSync10(targetDir, { recursive: true });
18083
+ if (!existsSync13(targetDir)) {
18084
+ mkdirSync8(targetDir, { recursive: true });
18047
18085
  }
18048
18086
  let entries;
18049
18087
  try {
18050
- entries = readdirSync7(sourceDir);
18088
+ entries = readdirSync6(sourceDir);
18051
18089
  } catch (e) {
18052
18090
  result.errors.push({
18053
18091
  path: sourceDir,
@@ -18056,8 +18094,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18056
18094
  return result;
18057
18095
  }
18058
18096
  for (const entry of entries) {
18059
- const srcPath = join15(sourceDir, entry);
18060
- const destPath = join15(targetDir, entry);
18097
+ const srcPath = join13(sourceDir, entry);
18098
+ const destPath = join13(targetDir, entry);
18061
18099
  try {
18062
18100
  const src = lstatSync(srcPath);
18063
18101
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -18098,7 +18136,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18098
18136
  }
18099
18137
  return result;
18100
18138
  }
18101
- var home = homedir10();
18139
+ var home = homedir8();
18102
18140
  var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
18103
18141
  var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
18104
18142
  function stripSignetBlock(content) {
@@ -18221,10 +18259,17 @@ function resolveSignetWorkspacePath(home2 = homedir()) {
18221
18259
  import { createRequire as createRequire4 } from "node:module";
18222
18260
  import { dirname as dirname6, join as join4 } from "node:path";
18223
18261
  import { fileURLToPath as fileURLToPath2 } from "node:url";
18262
+ import {
18263
+ execFile as nodeExecFile2,
18264
+ execFileSync as nodeExecFileSync2,
18265
+ execSync as nodeExecSync2,
18266
+ spawn as nodeSpawn2,
18267
+ spawnSync as nodeSpawnSync2
18268
+ } from "node:child_process";
18269
+ import { promisify as promisify2 } from "node:util";
18224
18270
  import { createHash as createHash3 } from "node:crypto";
18225
18271
  import { homedir as homedir22 } from "node:os";
18226
18272
  import { join as join22, resolve as resolve4 } from "node:path";
18227
- import { execFileSync as execFileSync32 } from "node:child_process";
18228
18273
  import { createHash as createHash22 } from "node:crypto";
18229
18274
  import { createRequire as createRequire22 } from "node:module";
18230
18275
  import { createRequire as createRequire32 } from "node:module";
@@ -18232,9 +18277,9 @@ import { homedir as homedir52 } from "node:os";
18232
18277
  import { dirname as dirname42, join as join82, resolve as resolve32 } from "node:path";
18233
18278
  import { homedir as homedir62, platform as platform22 } from "node:os";
18234
18279
  import { basename as basename2, dirname as dirname52, resolve as resolve52 } from "node:path";
18235
- import { existsSync as existsSync13, readFileSync as readFileSync11, readdirSync as readdirSync5, realpathSync as realpathSync2, statSync as statSync7 } from "node:fs";
18236
- import { dirname as dirname8, join as join13 } from "node:path";
18237
- import { homedir as homedir102 } from "node:os";
18280
+ import { existsSync as existsSync11, readFileSync as readFileSync9, realpathSync as realpathSync2, statSync as statSync7 } from "node:fs";
18281
+ import { dirname as dirname62, join as join11 } from "node:path";
18282
+ import { homedir as homedir82 } from "node:os";
18238
18283
  var __create = Object.create;
18239
18284
  var __getProtoOf = Object.getPrototypeOf;
18240
18285
  var __defProp = Object.defineProperty;
@@ -29377,6 +29422,37 @@ var PIPELINE_PROVIDER_CHOICES2 = [
29377
29422
  var SYNTHESIS_PROVIDER_CHOICES2 = PIPELINE_PROVIDER_CHOICES2.filter((provider) => provider !== "command");
29378
29423
  var PIPELINE_PROVIDER_SET2 = new Set(PIPELINE_PROVIDER_CHOICES2);
29379
29424
  var SYNTHESIS_PROVIDER_SET2 = new Set(SYNTHESIS_PROVIDER_CHOICES2);
29425
+ function withWindowsHide2(options) {
29426
+ return {
29427
+ ...options ?? {},
29428
+ windowsHide: options?.windowsHide ?? true
29429
+ };
29430
+ }
29431
+ function isOptions2(value) {
29432
+ return typeof value === "object" && value !== null && !Array.isArray(value);
29433
+ }
29434
+ function withWindowsHideArgument2(args, firstOptionIndex) {
29435
+ const normalized = [...args];
29436
+ const optionIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && isOptions2(value));
29437
+ if (optionIndex >= 0) {
29438
+ normalized[optionIndex] = withWindowsHide2(normalized[optionIndex]);
29439
+ return normalized;
29440
+ }
29441
+ const placeholderIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && (value === undefined || value === null));
29442
+ if (placeholderIndex >= 0) {
29443
+ normalized[placeholderIndex] = withWindowsHide2(undefined);
29444
+ return normalized;
29445
+ }
29446
+ const callbackIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && typeof value === "function");
29447
+ normalized.splice(callbackIndex >= 0 ? callbackIndex : normalized.length, 0, { windowsHide: true });
29448
+ return normalized;
29449
+ }
29450
+ var nodeExecFileAsync2 = promisify2(nodeExecFile2);
29451
+ var execFileHiddenImpl2 = (...args) => Reflect.apply(nodeExecFile2, undefined, withWindowsHideArgument2(args, 1));
29452
+ Object.defineProperty(execFileHiddenImpl2, promisify2.custom, {
29453
+ value: (...args) => Reflect.apply(nodeExecFileAsync2, undefined, withWindowsHideArgument2(args, 1))
29454
+ });
29455
+ var execFileSyncHidden2 = (...args) => Reflect.apply(nodeExecFileSync2, undefined, withWindowsHideArgument2(args, 1));
29380
29456
  var MEMORY_CONTENT_SAFETY_POLICY_VERSION2 = "memory-content-safety-v1";
29381
29457
  var MEMORY_CONTENT_SAFETY_REASONS2 = [
29382
29458
  "prompt_injection",
@@ -35899,7 +35975,7 @@ function linuxKeyringAvailable2() {
35899
35975
  };
35900
35976
  }
35901
35977
  try {
35902
- execFileSync32("busctl", ["--user", "status", "org.freedesktop.secrets"], {
35978
+ execFileSyncHidden2("busctl", ["--user", "status", "org.freedesktop.secrets"], {
35903
35979
  stdio: "ignore",
35904
35980
  timeout: 1000
35905
35981
  });
@@ -36162,7 +36238,7 @@ function hasValidIdentity(basePath) {
36162
36238
  if (mode !== "managed")
36163
36239
  return true;
36164
36240
  for (const path of resolveRequiredIdentityPaths(basePath)) {
36165
- if (!existsSync13(join13(basePath, path))) {
36241
+ if (!existsSync11(join11(basePath, path))) {
36166
36242
  return false;
36167
36243
  }
36168
36244
  }
@@ -36170,11 +36246,11 @@ function hasValidIdentity(basePath) {
36170
36246
  }
36171
36247
  function resolveRequiredIdentityPaths(basePath) {
36172
36248
  const legacyRequired = () => REQUIRED_IDENTITY_KEYS2.map((key) => IDENTITY_FILES2[key].path);
36173
- const agentYaml = join13(basePath, "agent.yaml");
36174
- if (!existsSync13(agentYaml))
36249
+ const agentYaml = join11(basePath, "agent.yaml");
36250
+ if (!existsSync11(agentYaml))
36175
36251
  return legacyRequired();
36176
36252
  try {
36177
- const config = parseSimpleYaml(readFileSync11(agentYaml, "utf-8"));
36253
+ const config = parseSimpleYaml(readFileSync9(agentYaml, "utf-8"));
36178
36254
  const identity = readRecord(readRecord(config).identity);
36179
36255
  const configured = readIdentityEntryList(readRecord(identity.startup).load);
36180
36256
  if (configured.length > 0)
@@ -36217,11 +36293,11 @@ function resolveIdentityModeFromConfig(config) {
36217
36293
  return "managed";
36218
36294
  }
36219
36295
  function loadIdentityMode(agentsDir) {
36220
- const agentYaml = join13(agentsDir, "agent.yaml");
36221
- if (!existsSync13(agentYaml))
36296
+ const agentYaml = join11(agentsDir, "agent.yaml");
36297
+ if (!existsSync11(agentYaml))
36222
36298
  return "managed";
36223
36299
  try {
36224
- return resolveIdentityModeFromConfig(parseSimpleYaml(readFileSync11(agentYaml, "utf-8")));
36300
+ return resolveIdentityModeFromConfig(parseSimpleYaml(readFileSync9(agentYaml, "utf-8")));
36225
36301
  } catch {
36226
36302
  return "managed";
36227
36303
  }
@@ -36246,7 +36322,7 @@ function readIdentityEntryList(value) {
36246
36322
  return [];
36247
36323
  return value.map(readIdentityEntry).filter((entry) => entry !== null);
36248
36324
  }
36249
- var home2 = homedir102();
36325
+ var home2 = homedir82();
36250
36326
 
36251
36327
  // src/index.ts
36252
36328
  function readGeminiSettings(settingsPath) {
@@ -36391,7 +36467,7 @@ class GeminiConnector extends BaseConnector {
36391
36467
  if (stat?.isSymbolicLink()) {
36392
36468
  try {
36393
36469
  const rawTarget = readlinkSync(entryPath);
36394
- const target = resolve6(dirname9(entryPath), rawTarget);
36470
+ const target = resolve6(dirname8(entryPath), rawTarget);
36395
36471
  if (isChildOf(target, signetSkillsSource)) {
36396
36472
  unlinkSync3(entryPath);
36397
36473
  }
@@ -36466,7 +36542,7 @@ class GeminiConnector extends BaseConnector {
36466
36542
  ].join(`
36467
36543
  `);
36468
36544
  const destPath = this.getGeminiMdPath();
36469
- mkdirSync(dirname9(destPath), { recursive: true });
36545
+ mkdirSync(dirname8(destPath), { recursive: true });
36470
36546
  writeFileSync2(destPath, header + userContent + extras + notificationPolling);
36471
36547
  return destPath;
36472
36548
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-gemini",
3
- "version": "0.219.5",
3
+ "version": "0.220.0",
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.219.5",
28
- "@signetai/core": "0.219.5"
27
+ "@signetai/connector-base": "0.220.0",
28
+ "@signetai/core": "0.220.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",