@signetai/connector-base 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.
package/dist/index.js CHANGED
@@ -40,10 +40,17 @@ import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "n
40
40
  import { createRequire } from "node:module";
41
41
  import { dirname, join } from "node:path";
42
42
  import { fileURLToPath } from "node:url";
43
+ import {
44
+ execFile as nodeExecFile,
45
+ execFileSync as nodeExecFileSync,
46
+ execSync as nodeExecSync,
47
+ spawn as nodeSpawn,
48
+ spawnSync as nodeSpawnSync
49
+ } from "node:child_process";
50
+ import { promisify } from "node:util";
43
51
  import { createHash } from "node:crypto";
44
52
  import { homedir as homedir2 } from "node:os";
45
53
  import { join as join2, resolve } from "node:path";
46
- import { execFileSync as execFileSync3 } from "node:child_process";
47
54
  import { createHash as createHash2 } from "node:crypto";
48
55
  import { createRequire as createRequire2 } from "node:module";
49
56
  import {
@@ -65,9 +72,9 @@ import { homedir as homedir5 } from "node:os";
65
72
  import { dirname as dirname4, join as join8, resolve as resolve3 } from "node:path";
66
73
  import { homedir as homedir6, platform as platform2 } from "node:os";
67
74
  import { basename, dirname as dirname5, resolve as resolve5 } from "node:path";
68
- import { homedir as homedir10 } from "node:os";
69
- import { existsSync as existsSync15, lstatSync, mkdirSync as mkdirSync10, readdirSync as readdirSync7, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
70
- import { join as join15 } from "node:path";
75
+ import { homedir as homedir8 } from "node:os";
76
+ import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync8, readdirSync as readdirSync6, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
77
+ import { join as join13 } from "node:path";
71
78
  var __create2 = Object.create;
72
79
  var __getProtoOf2 = Object.getPrototypeOf;
73
80
  var __defProp2 = Object.defineProperty;
@@ -11210,6 +11217,37 @@ var PIPELINE_PROVIDER_CHOICES = [
11210
11217
  var SYNTHESIS_PROVIDER_CHOICES = PIPELINE_PROVIDER_CHOICES.filter((provider) => provider !== "command");
11211
11218
  var PIPELINE_PROVIDER_SET = new Set(PIPELINE_PROVIDER_CHOICES);
11212
11219
  var SYNTHESIS_PROVIDER_SET = new Set(SYNTHESIS_PROVIDER_CHOICES);
11220
+ function withWindowsHide(options) {
11221
+ return {
11222
+ ...options ?? {},
11223
+ windowsHide: options?.windowsHide ?? true
11224
+ };
11225
+ }
11226
+ function isOptions(value) {
11227
+ return typeof value === "object" && value !== null && !Array.isArray(value);
11228
+ }
11229
+ function withWindowsHideArgument(args, firstOptionIndex) {
11230
+ const normalized = [...args];
11231
+ const optionIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && isOptions(value));
11232
+ if (optionIndex >= 0) {
11233
+ normalized[optionIndex] = withWindowsHide(normalized[optionIndex]);
11234
+ return normalized;
11235
+ }
11236
+ const placeholderIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && (value === undefined || value === null));
11237
+ if (placeholderIndex >= 0) {
11238
+ normalized[placeholderIndex] = withWindowsHide(undefined);
11239
+ return normalized;
11240
+ }
11241
+ const callbackIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && typeof value === "function");
11242
+ normalized.splice(callbackIndex >= 0 ? callbackIndex : normalized.length, 0, { windowsHide: true });
11243
+ return normalized;
11244
+ }
11245
+ var nodeExecFileAsync = promisify(nodeExecFile);
11246
+ var execFileHiddenImpl = (...args) => Reflect.apply(nodeExecFile, undefined, withWindowsHideArgument(args, 1));
11247
+ Object.defineProperty(execFileHiddenImpl, promisify.custom, {
11248
+ value: (...args) => Reflect.apply(nodeExecFileAsync, undefined, withWindowsHideArgument(args, 1))
11249
+ });
11250
+ var execFileSyncHidden = (...args) => Reflect.apply(nodeExecFileSync, undefined, withWindowsHideArgument(args, 1));
11213
11251
  var MEMORY_CONTENT_SAFETY_POLICY_VERSION = "memory-content-safety-v1";
11214
11252
  var MEMORY_CONTENT_SAFETY_REASONS = [
11215
11253
  "prompt_injection",
@@ -17732,7 +17770,7 @@ function linuxKeyringAvailable() {
17732
17770
  };
17733
17771
  }
17734
17772
  try {
17735
- execFileSync3("busctl", ["--user", "status", "org.freedesktop.secrets"], {
17773
+ execFileSyncHidden("busctl", ["--user", "status", "org.freedesktop.secrets"], {
17736
17774
  stdio: "ignore",
17737
17775
  timeout: 1000
17738
17776
  });
@@ -18134,19 +18172,19 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18134
18172
  skipped: [],
18135
18173
  errors: []
18136
18174
  };
18137
- if (!existsSync15(sourceDir)) {
18175
+ if (!existsSync13(sourceDir)) {
18138
18176
  return result;
18139
18177
  }
18140
- const targetParent = join15(targetDir, "..");
18141
- if (!existsSync15(targetParent)) {
18142
- mkdirSync10(targetParent, { recursive: true });
18178
+ const targetParent = join13(targetDir, "..");
18179
+ if (!existsSync13(targetParent)) {
18180
+ mkdirSync8(targetParent, { recursive: true });
18143
18181
  }
18144
- if (!existsSync15(targetDir)) {
18145
- mkdirSync10(targetDir, { recursive: true });
18182
+ if (!existsSync13(targetDir)) {
18183
+ mkdirSync8(targetDir, { recursive: true });
18146
18184
  }
18147
18185
  let entries;
18148
18186
  try {
18149
- entries = readdirSync7(sourceDir);
18187
+ entries = readdirSync6(sourceDir);
18150
18188
  } catch (e) {
18151
18189
  result.errors.push({
18152
18190
  path: sourceDir,
@@ -18155,8 +18193,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18155
18193
  return result;
18156
18194
  }
18157
18195
  for (const entry of entries) {
18158
- const srcPath = join15(sourceDir, entry);
18159
- const destPath = join15(targetDir, entry);
18196
+ const srcPath = join13(sourceDir, entry);
18197
+ const destPath = join13(targetDir, entry);
18160
18198
  try {
18161
18199
  const src = lstatSync(srcPath);
18162
18200
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -18197,7 +18235,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
18197
18235
  }
18198
18236
  return result;
18199
18237
  }
18200
- var home = homedir10();
18238
+ var home = homedir8();
18201
18239
  var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
18202
18240
  var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
18203
18241
  function stripSignetBlock(content) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-base",
3
- "version": "0.219.5",
3
+ "version": "0.220.0",
4
4
  "description": "Base class for Signet harness connectors",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,6 +10,10 @@
10
10
  "import": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts"
12
12
  },
13
+ "./agent-dir": {
14
+ "import": "./dist/agent-dir.js",
15
+ "types": "./dist/agent-dir.d.ts"
16
+ },
13
17
  "./lenient-json": {
14
18
  "import": "./dist/lenient-json.js",
15
19
  "types": "./dist/lenient-json.d.ts"
@@ -21,12 +25,12 @@
21
25
  "!dist/**/__tests__/**"
22
26
  ],
23
27
  "scripts": {
24
- "build": "bun build ./src/index.ts ./src/lenient-json.ts --outdir ./dist --target node --external better-sqlite3 && bun run build:types",
28
+ "build": "bun build ./src/index.ts ./src/agent-dir.ts ./src/lenient-json.ts --outdir ./dist --target node --external better-sqlite3 && bun run build:types",
25
29
  "build:types": "tsc --emitDeclarationOnly --declaration --outDir dist",
26
30
  "typecheck": "tsc --noEmit"
27
31
  },
28
32
  "dependencies": {
29
- "@signetai/core": "0.219.5",
33
+ "@signetai/core": "0.220.0",
30
34
  "json5": "^2.2.3",
31
35
  "jsonc-parser": "3.3.1"
32
36
  },