@signetai/connector-openclaw 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 +34 -34
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
3
3
|
import { homedir, tmpdir } from "node:os";
|
|
4
|
-
import { delimiter, join as join4, resolve
|
|
4
|
+
import { delimiter, join as join4, resolve } from "node:path";
|
|
5
5
|
|
|
6
6
|
// ../../../libs/connector-base/dist/index.js
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
|
-
import { existsSync, readFileSync, renameSync, statSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
9
|
-
import { dirname as
|
|
8
|
+
import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
9
|
+
import { dirname as dirname3, join as join3 } from "node:path";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
import { createRequire as createRequire2 } from "node:module";
|
|
14
|
-
import { homedir as
|
|
15
|
-
import { basename, dirname as
|
|
16
|
-
import { homedir as
|
|
17
|
-
import { existsSync as
|
|
18
|
-
import { join as
|
|
14
|
+
import { homedir as homedir4, platform as platform2 } from "node:os";
|
|
15
|
+
import { basename, dirname as dirname4, resolve as resolve4 } from "node:path";
|
|
16
|
+
import { homedir as homedir8 } from "node:os";
|
|
17
|
+
import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync9, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
|
|
18
|
+
import { join as join13 } from "node:path";
|
|
19
19
|
var __create2 = Object.create;
|
|
20
20
|
var __getProtoOf2 = Object.getPrototypeOf;
|
|
21
21
|
var __defProp2 = Object.defineProperty;
|
|
@@ -10768,11 +10768,11 @@ var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
|
|
|
10768
10768
|
function defaultDiscordDesktopCachePath() {
|
|
10769
10769
|
switch (platform2()) {
|
|
10770
10770
|
case "darwin":
|
|
10771
|
-
return
|
|
10771
|
+
return resolve4(homedir4(), "Library", "Application Support", "discord");
|
|
10772
10772
|
case "win32":
|
|
10773
|
-
return
|
|
10773
|
+
return resolve4(process.env.APPDATA || resolve4(homedir4(), "AppData", "Roaming"), "discord");
|
|
10774
10774
|
default:
|
|
10775
|
-
return
|
|
10775
|
+
return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir4(), ".config"), "discord");
|
|
10776
10776
|
}
|
|
10777
10777
|
}
|
|
10778
10778
|
var IDENTITY_FILES = {
|
|
@@ -10840,15 +10840,15 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
10840
10840
|
skipped: [],
|
|
10841
10841
|
errors: []
|
|
10842
10842
|
};
|
|
10843
|
-
if (!
|
|
10843
|
+
if (!existsSync13(sourceDir)) {
|
|
10844
10844
|
return result;
|
|
10845
10845
|
}
|
|
10846
|
-
const targetParent =
|
|
10847
|
-
if (!
|
|
10848
|
-
|
|
10846
|
+
const targetParent = join13(targetDir, "..");
|
|
10847
|
+
if (!existsSync13(targetParent)) {
|
|
10848
|
+
mkdirSync9(targetParent, { recursive: true });
|
|
10849
10849
|
}
|
|
10850
|
-
if (!
|
|
10851
|
-
|
|
10850
|
+
if (!existsSync13(targetDir)) {
|
|
10851
|
+
mkdirSync9(targetDir, { recursive: true });
|
|
10852
10852
|
}
|
|
10853
10853
|
let entries;
|
|
10854
10854
|
try {
|
|
@@ -10861,8 +10861,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
10861
10861
|
return result;
|
|
10862
10862
|
}
|
|
10863
10863
|
for (const entry of entries) {
|
|
10864
|
-
const srcPath =
|
|
10865
|
-
const destPath =
|
|
10864
|
+
const srcPath = join13(sourceDir, entry);
|
|
10865
|
+
const destPath = join13(targetDir, entry);
|
|
10866
10866
|
try {
|
|
10867
10867
|
const src = lstatSync(srcPath);
|
|
10868
10868
|
if (src.isSymbolicLink() || !src.isDirectory()) {
|
|
@@ -10903,7 +10903,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
10903
10903
|
}
|
|
10904
10904
|
return result;
|
|
10905
10905
|
}
|
|
10906
|
-
var home =
|
|
10906
|
+
var home = homedir8();
|
|
10907
10907
|
var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
|
|
10908
10908
|
var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
|
|
10909
10909
|
function stripSignetBlock(content) {
|
|
@@ -11060,7 +11060,7 @@ class BaseConnector {
|
|
|
11060
11060
|
generateHeader(sourcePath, targetName) {
|
|
11061
11061
|
const name = targetName || this.name;
|
|
11062
11062
|
const safe = (p) => p.replace(/[\n\r]/g, "");
|
|
11063
|
-
const root =
|
|
11063
|
+
const root = dirname3(sourcePath);
|
|
11064
11064
|
return `# Auto-generated from ${safe(sourcePath)}
|
|
11065
11065
|
# Source: ${safe(sourcePath)}
|
|
11066
11066
|
# Generated: ${new Date().toISOString()}
|
|
@@ -11092,11 +11092,11 @@ ${content}`);
|
|
|
11092
11092
|
}
|
|
11093
11093
|
}
|
|
11094
11094
|
function atomicWriteText(path, content, mode) {
|
|
11095
|
-
const tmp = join3(
|
|
11095
|
+
const tmp = join3(dirname3(path), `.${randomBytes(6).toString("hex")}.tmp`);
|
|
11096
11096
|
let writeMode = mode;
|
|
11097
11097
|
if (writeMode === undefined) {
|
|
11098
11098
|
try {
|
|
11099
|
-
writeMode =
|
|
11099
|
+
writeMode = statSync2(path).mode & 511;
|
|
11100
11100
|
} catch {}
|
|
11101
11101
|
}
|
|
11102
11102
|
try {
|
|
@@ -13107,14 +13107,14 @@ function parseLenientJsonObject(raw, options) {
|
|
|
13107
13107
|
|
|
13108
13108
|
// ../../../platform/core/dist/index.js
|
|
13109
13109
|
import { createRequire as createRequire3 } from "node:module";
|
|
13110
|
-
import { dirname as
|
|
13110
|
+
import { dirname as dirname2, join as join2 } from "node:path";
|
|
13111
13111
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
13112
13112
|
import { homedir as homedir2 } from "os";
|
|
13113
13113
|
import { join as join22 } from "path";
|
|
13114
13114
|
import { createRequire as createRequire22 } from "node:module";
|
|
13115
|
-
import { homedir as
|
|
13116
|
-
import { basename as basename2, dirname as
|
|
13117
|
-
import { homedir as
|
|
13115
|
+
import { homedir as homedir42, platform as platform22 } from "node:os";
|
|
13116
|
+
import { basename as basename2, dirname as dirname42, resolve as resolve42 } from "node:path";
|
|
13117
|
+
import { homedir as homedir82 } from "node:os";
|
|
13118
13118
|
var __create3 = Object.create;
|
|
13119
13119
|
var __getProtoOf3 = Object.getPrototypeOf;
|
|
13120
13120
|
var __defProp3 = Object.defineProperty;
|
|
@@ -23789,7 +23789,7 @@ var MIGRATIONS2 = [
|
|
|
23789
23789
|
];
|
|
23790
23790
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|
|
23791
23791
|
var __filename22 = fileURLToPath2(import.meta.url);
|
|
23792
|
-
var __dirname22 =
|
|
23792
|
+
var __dirname22 = dirname2(__filename22);
|
|
23793
23793
|
var import_yaml3 = __toESM3(require_dist2(), 1);
|
|
23794
23794
|
function expandHome(p, home2 = homedir2()) {
|
|
23795
23795
|
if (p === "~")
|
|
@@ -23874,11 +23874,11 @@ var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
|
|
|
23874
23874
|
function defaultDiscordDesktopCachePath2() {
|
|
23875
23875
|
switch (platform22()) {
|
|
23876
23876
|
case "darwin":
|
|
23877
|
-
return
|
|
23877
|
+
return resolve42(homedir42(), "Library", "Application Support", "discord");
|
|
23878
23878
|
case "win32":
|
|
23879
|
-
return
|
|
23879
|
+
return resolve42(process.env.APPDATA || resolve42(homedir42(), "AppData", "Roaming"), "discord");
|
|
23880
23880
|
default:
|
|
23881
|
-
return
|
|
23881
|
+
return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir42(), ".config"), "discord");
|
|
23882
23882
|
}
|
|
23883
23883
|
}
|
|
23884
23884
|
var IDENTITY_FILES2 = {
|
|
@@ -23936,7 +23936,7 @@ var IDENTITY_FILES2 = {
|
|
|
23936
23936
|
};
|
|
23937
23937
|
var REQUIRED_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => !spec.optional).map(([key]) => key);
|
|
23938
23938
|
var OPTIONAL_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => spec.optional).map(([key]) => key);
|
|
23939
|
-
var home2 =
|
|
23939
|
+
var home2 = homedir82();
|
|
23940
23940
|
var SKIP_SUBTYPES2 = new Set([
|
|
23941
23941
|
"channel_join",
|
|
23942
23942
|
"channel_leave",
|
|
@@ -24273,7 +24273,7 @@ class OpenClawConnector extends BaseConnector {
|
|
|
24273
24273
|
if (trimmed.length === 0) {
|
|
24274
24274
|
continue;
|
|
24275
24275
|
}
|
|
24276
|
-
const expanded =
|
|
24276
|
+
const expanded = resolve(expandHome(trimmed, this.getHomeDir()));
|
|
24277
24277
|
if (seen.has(expanded)) {
|
|
24278
24278
|
continue;
|
|
24279
24279
|
}
|
|
@@ -24421,7 +24421,7 @@ class OpenClawConnector extends BaseConnector {
|
|
|
24421
24421
|
return candidates[0];
|
|
24422
24422
|
}
|
|
24423
24423
|
validateWorkspacePath(p) {
|
|
24424
|
-
const resolved =
|
|
24424
|
+
const resolved = resolve(expandHome(p, this.getHomeDir()));
|
|
24425
24425
|
const tmp = tmpdir();
|
|
24426
24426
|
if (resolved.startsWith(tmp)) {
|
|
24427
24427
|
throw new Error(`Refusing to set workspace to temp directory: ${resolved}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-openclaw",
|
|
3
|
-
"version": "0.154.
|
|
3
|
+
"version": "0.154.7",
|
|
4
4
|
"description": "Signet connector for OpenClaw - configures workspace and memory hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"test": "bun test"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@signetai/connector-base": "0.154.
|
|
29
|
-
"@signetai/core": "0.154.
|
|
28
|
+
"@signetai/connector-base": "0.154.7",
|
|
29
|
+
"@signetai/core": "0.154.7"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|