signetai 0.78.0 → 0.78.2
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/dashboard/_app/immutable/chunks/{DxFrXumN.js → 2MRzfVP3.js} +1 -1
- package/dashboard/_app/immutable/chunks/{B5K--3JI.js → 3MTuhkkM.js} +1 -1
- package/dashboard/_app/immutable/chunks/{CpHPblNt.js → 7pObTy5Z.js} +1 -1
- package/dashboard/_app/immutable/chunks/{C_aVJeMu.js → 8qq9odk9.js} +1 -1
- package/dashboard/_app/immutable/chunks/{Zq3oBUcA.js → B82MekTh.js} +1 -1
- package/dashboard/_app/immutable/chunks/BHvXyetp.js +1 -0
- package/dashboard/_app/immutable/chunks/{DaXXqk4B.js → BLrn3yUI.js} +1 -1
- package/dashboard/_app/immutable/chunks/{BTffx77A.js → BMHg4p9s.js} +1 -1
- package/dashboard/_app/immutable/chunks/{CVWBHbdK.js → BX1Yz7rd.js} +1 -1
- package/dashboard/_app/immutable/chunks/{B7Dmoijw.js → BXXcrVDk.js} +1 -1
- package/dashboard/_app/immutable/chunks/{DVLOcb_l.js → Bf45f0Vp.js} +1 -1
- package/dashboard/_app/immutable/chunks/{CT7SZrFS.js → BjFLqtWT.js} +1 -1
- package/dashboard/_app/immutable/chunks/{B-lZsANd.js → BnRD8JUX.js} +1 -1
- package/dashboard/_app/immutable/chunks/{a8iSeoQd.js → Bo0KuYql.js} +1 -1
- package/dashboard/_app/immutable/chunks/{C0ughKGH.js → C2EsmaBq.js} +1 -1
- package/dashboard/_app/immutable/chunks/{2WwpSGH0.js → C6Ut0qMj.js} +1 -1
- package/dashboard/_app/immutable/chunks/{D9HzD8FH.js → CAzEUj7-.js} +1 -1
- package/dashboard/_app/immutable/chunks/{BA9K5g1h.js → CCS36Mqc.js} +1 -1
- package/dashboard/_app/immutable/chunks/{CnDzcVnT.js → CH07uMzE.js} +1 -1
- package/dashboard/_app/immutable/chunks/{D-Vl1cNR.js → CQlsEtmr.js} +2 -2
- package/dashboard/_app/immutable/chunks/{BJfCu0Wx.js → CRs_2u26.js} +1 -1
- package/dashboard/_app/immutable/chunks/{DIQA-_gS.js → CYGmkkOT.js} +1 -1
- package/dashboard/_app/immutable/chunks/{BW4MMUi5.js → Ca7ofCGO.js} +1 -1
- package/dashboard/_app/immutable/chunks/{QEozDrpv.js → CaQOFuOW.js} +1 -1
- package/dashboard/_app/immutable/chunks/{G7wcyUS1.js → Cfzanl-M.js} +1 -1
- package/dashboard/_app/immutable/chunks/{ny1939Tu.js → Cvtb1Uv1.js} +1 -1
- package/dashboard/_app/immutable/chunks/{BNCARPXi.js → D2L-5-73.js} +3 -3
- package/dashboard/_app/immutable/chunks/{SCZW5PJS.js → D4fMMG5j.js} +1 -1
- package/dashboard/_app/immutable/chunks/{CUCZh5vH.js → D4j6_yDm.js} +1 -1
- package/dashboard/_app/immutable/chunks/{H-wvAY2S.js → D7-Y1GbH.js} +1 -1
- package/dashboard/_app/immutable/chunks/{tpseK33Y.js → D7kvLQQv.js} +1 -1
- package/dashboard/_app/immutable/chunks/{Dj_HIt6f.js → D7ozeA5b.js} +1 -1
- package/dashboard/_app/immutable/chunks/{NQBoRYZ7.js → D9AMLR_o.js} +1 -1
- package/dashboard/_app/immutable/chunks/{DPr-Rj-g.js → DMYKaFD3.js} +1 -1
- package/dashboard/_app/immutable/chunks/{KdQii1_w.js → DP2Cqb23.js} +1 -1
- package/dashboard/_app/immutable/chunks/{K5IoOCJO.js → DP3h6pcQ.js} +1 -1
- package/dashboard/_app/immutable/chunks/{zInkXe39.js → DPqWqYTP.js} +1 -1
- package/dashboard/_app/immutable/chunks/{D1TEZ9NV.js → DW-0HYki.js} +1 -1
- package/dashboard/_app/immutable/chunks/{DOubmnCS.js → DWi5AdTB.js} +1 -1
- package/dashboard/_app/immutable/chunks/{ByASVyFj.js → Dg17Auac.js} +1 -1
- package/dashboard/_app/immutable/chunks/{DIdXZuqk.js → Sbdhs5rk.js} +1 -1
- package/dashboard/_app/immutable/chunks/{Bat3eN6X.js → TDeGgAzG.js} +1 -1
- package/dashboard/_app/immutable/chunks/{UXR6gBie.js → cLV2Mo98.js} +1 -1
- package/dashboard/_app/immutable/chunks/{BiQ3S6Ng.js → gnFq108l.js} +1 -1
- package/dashboard/_app/immutable/chunks/{CibU-XbS.js → otBz_bAw.js} +1 -1
- package/dashboard/_app/immutable/chunks/{BLdrzNr0.js → u_Tqmrjo.js} +1 -1
- package/dashboard/_app/immutable/chunks/{Dc5s93Fh.js → ycjTzGx9.js} +1 -1
- package/dashboard/_app/immutable/entry/{app.DrzuZjJo.js → app.D33Fg_EX.js} +2 -2
- package/dashboard/_app/immutable/entry/start.CKfFW3OZ.js +1 -0
- package/dashboard/_app/immutable/nodes/{1.BUJj6Ztg.js → 1.CixhrL0r.js} +1 -1
- package/dashboard/_app/immutable/nodes/2.BF93CE4w.js +1 -0
- package/dashboard/_app/version.json +1 -1
- package/dashboard/index.html +6 -6
- package/dist/daemon.js +260 -79
- package/package.json +1 -1
- package/dashboard/_app/immutable/chunks/B7fNPpiy.js +0 -1
- package/dashboard/_app/immutable/entry/start.oH8ugCQK.js +0 -1
- package/dashboard/_app/immutable/nodes/2.B_3dEdBl.js +0 -1
package/dist/daemon.js
CHANGED
|
@@ -809,6 +809,7 @@ import { existsSync as existsSync9, readFileSync as readFileSync6, writeFileSync
|
|
|
809
809
|
import { join as join10 } from "path";
|
|
810
810
|
import { existsSync as existsSync10, readFileSync as readFileSync7 } from "fs";
|
|
811
811
|
import { spawnSync } from "child_process";
|
|
812
|
+
import { homedir as homedir5 } from "os";
|
|
812
813
|
import { join as join11 } from "path";
|
|
813
814
|
function up(db) {
|
|
814
815
|
db.exec(`
|
|
@@ -3515,6 +3516,71 @@ function getSkillsRunnerCommand(family, skillsArgs) {
|
|
|
3515
3516
|
};
|
|
3516
3517
|
}
|
|
3517
3518
|
}
|
|
3519
|
+
function resolveGlobalPackagePath(family, packageName) {
|
|
3520
|
+
try {
|
|
3521
|
+
switch (family) {
|
|
3522
|
+
case "bun": {
|
|
3523
|
+
const bunGlobal = join11(process.env.BUN_INSTALL ?? join11(homedir5(), ".bun"), "install", "global", "node_modules", packageName);
|
|
3524
|
+
if (existsSync10(bunGlobal))
|
|
3525
|
+
return bunGlobal;
|
|
3526
|
+
return;
|
|
3527
|
+
}
|
|
3528
|
+
case "npm": {
|
|
3529
|
+
const result = spawnSync("npm", ["root", "-g"], {
|
|
3530
|
+
encoding: "utf-8",
|
|
3531
|
+
timeout: 1e4,
|
|
3532
|
+
windowsHide: true
|
|
3533
|
+
});
|
|
3534
|
+
if (result.status === 0 && result.stdout.trim()) {
|
|
3535
|
+
const candidate = join11(result.stdout.trim(), packageName);
|
|
3536
|
+
if (existsSync10(candidate))
|
|
3537
|
+
return candidate;
|
|
3538
|
+
}
|
|
3539
|
+
return;
|
|
3540
|
+
}
|
|
3541
|
+
case "pnpm": {
|
|
3542
|
+
const result = spawnSync("pnpm", ["root", "-g"], {
|
|
3543
|
+
encoding: "utf-8",
|
|
3544
|
+
timeout: 1e4,
|
|
3545
|
+
windowsHide: true
|
|
3546
|
+
});
|
|
3547
|
+
if (result.status === 0 && result.stdout.trim()) {
|
|
3548
|
+
const candidate = join11(result.stdout.trim(), packageName);
|
|
3549
|
+
if (existsSync10(candidate))
|
|
3550
|
+
return candidate;
|
|
3551
|
+
}
|
|
3552
|
+
return;
|
|
3553
|
+
}
|
|
3554
|
+
case "yarn": {
|
|
3555
|
+
const versionResult = spawnSync("yarn", ["--version"], {
|
|
3556
|
+
encoding: "utf-8",
|
|
3557
|
+
timeout: 5000,
|
|
3558
|
+
windowsHide: true
|
|
3559
|
+
});
|
|
3560
|
+
const isClassic = versionResult.status === 0 && /^1\./.test(versionResult.stdout.trim());
|
|
3561
|
+
if (isClassic) {
|
|
3562
|
+
const result = spawnSync("yarn", ["global", "dir"], {
|
|
3563
|
+
encoding: "utf-8",
|
|
3564
|
+
timeout: 1e4,
|
|
3565
|
+
windowsHide: true
|
|
3566
|
+
});
|
|
3567
|
+
if (result.status === 0 && result.stdout.trim()) {
|
|
3568
|
+
const candidate = join11(result.stdout.trim(), "node_modules", packageName);
|
|
3569
|
+
if (existsSync10(candidate))
|
|
3570
|
+
return candidate;
|
|
3571
|
+
}
|
|
3572
|
+
} else {
|
|
3573
|
+
const berryGlobal = join11(process.env.YARN_GLOBAL_FOLDER ?? join11(homedir5(), ".yarn", "berry", "global"), "node_modules", packageName);
|
|
3574
|
+
if (existsSync10(berryGlobal))
|
|
3575
|
+
return berryGlobal;
|
|
3576
|
+
}
|
|
3577
|
+
return;
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3580
|
+
} catch {
|
|
3581
|
+
return;
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3518
3584
|
function getGlobalInstallCommand(family, packageName) {
|
|
3519
3585
|
switch (family) {
|
|
3520
3586
|
case "bun":
|
|
@@ -14515,7 +14581,7 @@ import {
|
|
|
14515
14581
|
statSync as statSync3,
|
|
14516
14582
|
unlinkSync
|
|
14517
14583
|
} from "fs";
|
|
14518
|
-
import { homedir as
|
|
14584
|
+
import { homedir as homedir6 } from "os";
|
|
14519
14585
|
import { basename as basename3, dirname as dirname5, join as join6 } from "path";
|
|
14520
14586
|
var LOG_LEVELS, DEFAULT_CONFIG, Logger, envLogFile, envLogDir, loggerConfig, logger;
|
|
14521
14587
|
var init_logger = __esm(() => {
|
|
@@ -14526,7 +14592,7 @@ var init_logger = __esm(() => {
|
|
|
14526
14592
|
error: 3
|
|
14527
14593
|
};
|
|
14528
14594
|
DEFAULT_CONFIG = {
|
|
14529
|
-
logDir: join6(
|
|
14595
|
+
logDir: join6(homedir6(), ".agents", ".daemon", "logs"),
|
|
14530
14596
|
logFilePath: undefined,
|
|
14531
14597
|
level: "info",
|
|
14532
14598
|
maxFileSize: 10 * 1024 * 1024,
|
|
@@ -17025,7 +17091,7 @@ var init_cross_agent = __esm(() => {
|
|
|
17025
17091
|
// ../daemon/src/db-accessor.ts
|
|
17026
17092
|
import { Database } from "bun:sqlite";
|
|
17027
17093
|
import { copyFileSync, existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as readFileSync10, readdirSync as readdirSync3, statSync as statSync5, unlinkSync as unlinkSync2 } from "fs";
|
|
17028
|
-
import { homedir as
|
|
17094
|
+
import { homedir as homedir8 } from "os";
|
|
17029
17095
|
import { basename as basename5, dirname as dirname6, join as join14 } from "path";
|
|
17030
17096
|
function configurePragmas(db) {
|
|
17031
17097
|
db.exec("PRAGMA journal_mode = WAL");
|
|
@@ -17044,7 +17110,7 @@ function readConfigHome(env) {
|
|
|
17044
17110
|
const dir = readTrimmed(env, "XDG_CONFIG_HOME");
|
|
17045
17111
|
if (dir !== null)
|
|
17046
17112
|
return dir;
|
|
17047
|
-
return join14(
|
|
17113
|
+
return join14(homedir8(), ".config");
|
|
17048
17114
|
}
|
|
17049
17115
|
function readWorkspaceConfig(path) {
|
|
17050
17116
|
if (!existsSync8(path))
|
|
@@ -17072,7 +17138,7 @@ function resolveSqliteAgentsDir(opts) {
|
|
|
17072
17138
|
const cfg2 = readWorkspaceConfig(join14(readConfigHome(env), "signet", "workspace.json"));
|
|
17073
17139
|
if (cfg2 !== null)
|
|
17074
17140
|
return cfg2;
|
|
17075
|
-
return join14((opts?.home ??
|
|
17141
|
+
return join14((opts?.home ?? homedir8)(), ".agents");
|
|
17076
17142
|
}
|
|
17077
17143
|
function resolveCustomSqlitePath(opts) {
|
|
17078
17144
|
const platform2 = opts?.platform ?? process.platform;
|
|
@@ -25442,7 +25508,7 @@ var init_onepassword = __esm(() => {
|
|
|
25442
25508
|
// ../daemon/src/secrets.ts
|
|
25443
25509
|
import { execSync, spawn } from "child_process";
|
|
25444
25510
|
import { existsSync as existsSync13, mkdirSync as mkdirSync4, readFileSync as readFileSync12, writeFileSync as writeFileSync3 } from "fs";
|
|
25445
|
-
import { homedir as
|
|
25511
|
+
import { homedir as homedir9, hostname } from "os";
|
|
25446
25512
|
import { join as join16 } from "path";
|
|
25447
25513
|
function getMachineId() {
|
|
25448
25514
|
const isWindows2 = process.platform === "win32";
|
|
@@ -25624,7 +25690,7 @@ var AGENTS_DIR, SECRETS_DIR, SECRETS_FILE, _masterKey = null, SHELL_META, NAME_R
|
|
|
25624
25690
|
var init_secrets = __esm(() => {
|
|
25625
25691
|
init_libsodium_wrappers();
|
|
25626
25692
|
init_onepassword();
|
|
25627
|
-
AGENTS_DIR = process.env.SIGNET_PATH || join16(
|
|
25693
|
+
AGENTS_DIR = process.env.SIGNET_PATH || join16(homedir9(), ".agents");
|
|
25628
25694
|
SECRETS_DIR = join16(AGENTS_DIR, ".secrets");
|
|
25629
25695
|
SECRETS_FILE = join16(SECRETS_DIR, "secrets.enc");
|
|
25630
25696
|
SHELL_META = /[;&|`$(){}[\]<>!\\]/;
|
|
@@ -25649,7 +25715,7 @@ __export(exports_native_embedding, {
|
|
|
25649
25715
|
checkNativeProvider: () => checkNativeProvider
|
|
25650
25716
|
});
|
|
25651
25717
|
import { mkdirSync as mkdirSync5 } from "fs";
|
|
25652
|
-
import { homedir as
|
|
25718
|
+
import { homedir as homedir10 } from "os";
|
|
25653
25719
|
import { dirname as dirname7, join as join17 } from "path";
|
|
25654
25720
|
import { fileURLToPath as fileURLToPath2, pathToFileURL } from "url";
|
|
25655
25721
|
function isRecord5(value) {
|
|
@@ -25745,7 +25811,7 @@ function toEmbedFn(value) {
|
|
|
25745
25811
|
return embed;
|
|
25746
25812
|
}
|
|
25747
25813
|
function getCacheDir() {
|
|
25748
|
-
const agentsDir = process.env.SIGNET_PATH || join17(
|
|
25814
|
+
const agentsDir = process.env.SIGNET_PATH || join17(homedir10(), ".agents");
|
|
25749
25815
|
return join17(agentsDir, ".models");
|
|
25750
25816
|
}
|
|
25751
25817
|
async function ensureInitialized() {
|
|
@@ -33901,7 +33967,7 @@ var init_continuity_state = __esm(() => {
|
|
|
33901
33967
|
// ../daemon/src/memory-head.ts
|
|
33902
33968
|
import { createHash as createHash2, randomUUID as randomUUID3 } from "crypto";
|
|
33903
33969
|
import { existsSync as existsSync15, mkdirSync as mkdirSync6, readFileSync as readFileSync14, writeFileSync as writeFileSync5 } from "fs";
|
|
33904
|
-
import { homedir as
|
|
33970
|
+
import { homedir as homedir11 } from "os";
|
|
33905
33971
|
import { join as join19 } from "path";
|
|
33906
33972
|
function hashContent(content) {
|
|
33907
33973
|
return createHash2("sha256").update(content).digest("hex");
|
|
@@ -34036,7 +34102,7 @@ var init_memory_head = __esm(() => {
|
|
|
34036
34102
|
init_db_accessor();
|
|
34037
34103
|
init_db_helpers();
|
|
34038
34104
|
init_memory_config();
|
|
34039
|
-
AGENTS_DIR2 = process.env.SIGNET_PATH || join19(
|
|
34105
|
+
AGENTS_DIR2 = process.env.SIGNET_PATH || join19(homedir11(), ".agents");
|
|
34040
34106
|
});
|
|
34041
34107
|
|
|
34042
34108
|
// ../daemon/src/predictor-state.ts
|
|
@@ -34048,11 +34114,11 @@ __export(exports_predictor_state, {
|
|
|
34048
34114
|
computeEffectiveAlpha: () => computeEffectiveAlpha
|
|
34049
34115
|
});
|
|
34050
34116
|
import { existsSync as existsSync16, mkdirSync as mkdirSync7, readFileSync as readFileSync15, writeFileSync as writeFileSync7 } from "fs";
|
|
34051
|
-
import { homedir as
|
|
34117
|
+
import { homedir as homedir12 } from "os";
|
|
34052
34118
|
import { dirname as dirname8, join as join20 } from "path";
|
|
34053
34119
|
function statePath(agentId) {
|
|
34054
34120
|
const safeId = agentId.replace(/[/\\]/g, "_").replace(/\.\./g, "_");
|
|
34055
|
-
const agentsDir = process.env.SIGNET_PATH || join20(
|
|
34121
|
+
const agentsDir = process.env.SIGNET_PATH || join20(homedir12(), ".agents");
|
|
34056
34122
|
return join20(agentsDir, "memory", "predictor", `state-${safeId}.json`);
|
|
34057
34123
|
}
|
|
34058
34124
|
function isRecord6(v2) {
|
|
@@ -34945,10 +35011,10 @@ var init_session_checkpoints = __esm(() => {
|
|
|
34945
35011
|
|
|
34946
35012
|
// ../daemon/src/session-memories.ts
|
|
34947
35013
|
import { existsSync as existsSync17 } from "fs";
|
|
34948
|
-
import { homedir as
|
|
35014
|
+
import { homedir as homedir13 } from "os";
|
|
34949
35015
|
import { join as join21 } from "path";
|
|
34950
35016
|
function getMemoryDbPath() {
|
|
34951
|
-
const agentsDir = process.env.SIGNET_PATH || join21(
|
|
35017
|
+
const agentsDir = process.env.SIGNET_PATH || join21(homedir13(), ".agents");
|
|
34952
35018
|
return join21(agentsDir, "memory", "memories.db");
|
|
34953
35019
|
}
|
|
34954
35020
|
function recordSessionCandidates(sessionKey, candidates, injectedIds, agentId = "default") {
|
|
@@ -36006,8 +36072,84 @@ async function checkForUpdates() {
|
|
|
36006
36072
|
}
|
|
36007
36073
|
return result;
|
|
36008
36074
|
}
|
|
36075
|
+
function normalizeTargetVersion(targetVersion) {
|
|
36076
|
+
if (typeof targetVersion !== "string")
|
|
36077
|
+
return null;
|
|
36078
|
+
const trimmed = targetVersion.trim();
|
|
36079
|
+
if (!trimmed)
|
|
36080
|
+
return null;
|
|
36081
|
+
const normalized = trimmed.replace(/^v/i, "");
|
|
36082
|
+
if (!EXACT_SEMVER_PATTERN.test(normalized)) {
|
|
36083
|
+
return null;
|
|
36084
|
+
}
|
|
36085
|
+
return normalized;
|
|
36086
|
+
}
|
|
36087
|
+
function parseInstalledPackageVersion(packageJsonContent) {
|
|
36088
|
+
try {
|
|
36089
|
+
const parsed = JSON.parse(packageJsonContent);
|
|
36090
|
+
if (typeof parsed.version !== "string")
|
|
36091
|
+
return null;
|
|
36092
|
+
const version = parsed.version.trim();
|
|
36093
|
+
if (!version)
|
|
36094
|
+
return null;
|
|
36095
|
+
return EXACT_SEMVER_PATTERN.test(version) ? version : null;
|
|
36096
|
+
} catch {
|
|
36097
|
+
return null;
|
|
36098
|
+
}
|
|
36099
|
+
}
|
|
36100
|
+
function verifyInstalledVersion(family, packageName, expectedVersion, deps = {
|
|
36101
|
+
resolveGlobalPackagePath: (family2, packageName2) => resolveGlobalPackagePath(family2, packageName2),
|
|
36102
|
+
existsSync: (path) => existsSync18(path),
|
|
36103
|
+
readFileSync: (path, encoding) => readFileSync16(path, { encoding })
|
|
36104
|
+
}) {
|
|
36105
|
+
try {
|
|
36106
|
+
const packagePath = deps.resolveGlobalPackagePath(family, packageName);
|
|
36107
|
+
if (!packagePath) {
|
|
36108
|
+
return {
|
|
36109
|
+
ok: false,
|
|
36110
|
+
message: `Update exited cleanly but could not locate global package path for '${packageName}'`
|
|
36111
|
+
};
|
|
36112
|
+
}
|
|
36113
|
+
const packageJsonPath = join23(packagePath, "package.json");
|
|
36114
|
+
if (!deps.existsSync(packageJsonPath)) {
|
|
36115
|
+
return {
|
|
36116
|
+
ok: false,
|
|
36117
|
+
message: `Update exited cleanly but package manifest missing at ${packageJsonPath}`
|
|
36118
|
+
};
|
|
36119
|
+
}
|
|
36120
|
+
const installedVersion = parseInstalledPackageVersion(deps.readFileSync(packageJsonPath, "utf-8"));
|
|
36121
|
+
if (!installedVersion) {
|
|
36122
|
+
return {
|
|
36123
|
+
ok: false,
|
|
36124
|
+
message: `Update exited cleanly but installed package.json has no valid version at ${packageJsonPath}`
|
|
36125
|
+
};
|
|
36126
|
+
}
|
|
36127
|
+
if (expectedVersion && installedVersion !== expectedVersion) {
|
|
36128
|
+
return {
|
|
36129
|
+
ok: false,
|
|
36130
|
+
message: `Install exited cleanly but version is ${installedVersion}, expected ${expectedVersion}`
|
|
36131
|
+
};
|
|
36132
|
+
}
|
|
36133
|
+
return {
|
|
36134
|
+
ok: true,
|
|
36135
|
+
installedVersion
|
|
36136
|
+
};
|
|
36137
|
+
} catch (error) {
|
|
36138
|
+
return {
|
|
36139
|
+
ok: false,
|
|
36140
|
+
message: `Update exited cleanly but failed to verify installed version: ${error instanceof Error ? error.message : String(error)}`
|
|
36141
|
+
};
|
|
36142
|
+
}
|
|
36143
|
+
}
|
|
36009
36144
|
async function runUpdate(targetVersion) {
|
|
36010
36145
|
assertInitialized();
|
|
36146
|
+
const normalizedTargetVersion = normalizeTargetVersion(targetVersion);
|
|
36147
|
+
if (targetVersion && !normalizedTargetVersion) {
|
|
36148
|
+
return {
|
|
36149
|
+
success: false,
|
|
36150
|
+
message: `Invalid targetVersion '${targetVersion}'`
|
|
36151
|
+
};
|
|
36152
|
+
}
|
|
36011
36153
|
if (updateInstallInProgress) {
|
|
36012
36154
|
return {
|
|
36013
36155
|
success: false,
|
|
@@ -36021,7 +36163,8 @@ async function runUpdate(targetVersion) {
|
|
|
36021
36163
|
agentsDir,
|
|
36022
36164
|
env: process.env
|
|
36023
36165
|
});
|
|
36024
|
-
const
|
|
36166
|
+
const installPackage = normalizedTargetVersion ? `${NPM_PACKAGE}@${normalizedTargetVersion}` : NPM_PACKAGE;
|
|
36167
|
+
const installCommand = getGlobalInstallCommand(packageManager.family, installPackage);
|
|
36025
36168
|
logger.info("system", "Running update command", {
|
|
36026
36169
|
command: `${installCommand.command} ${installCommand.args.join(" ")}`,
|
|
36027
36170
|
family: packageManager.family,
|
|
@@ -36046,7 +36189,20 @@ async function runUpdate(targetVersion) {
|
|
|
36046
36189
|
command: `${installCommand.command} ${installCommand.args.join(" ")}`
|
|
36047
36190
|
});
|
|
36048
36191
|
if (code === 0) {
|
|
36049
|
-
|
|
36192
|
+
const verification = verifyInstalledVersion(packageManager.family, NPM_PACKAGE, normalizedTargetVersion);
|
|
36193
|
+
if (!verification.ok) {
|
|
36194
|
+
logger.warn("system", "Update verification failed", {
|
|
36195
|
+
reason: verification.message,
|
|
36196
|
+
family: packageManager.family
|
|
36197
|
+
});
|
|
36198
|
+
resolve5({
|
|
36199
|
+
success: false,
|
|
36200
|
+
message: verification.message,
|
|
36201
|
+
output: stdout + stderr
|
|
36202
|
+
});
|
|
36203
|
+
return;
|
|
36204
|
+
}
|
|
36205
|
+
pendingRestartVersion = verification.installedVersion;
|
|
36050
36206
|
lastUpdateCheck = null;
|
|
36051
36207
|
lastUpdateCheckTime = null;
|
|
36052
36208
|
logger.info("system", "Update installed successfully");
|
|
@@ -36054,7 +36210,7 @@ async function runUpdate(targetVersion) {
|
|
|
36054
36210
|
success: true,
|
|
36055
36211
|
message: "Update installed. Restart daemon to apply.",
|
|
36056
36212
|
output: stdout,
|
|
36057
|
-
installedVersion:
|
|
36213
|
+
installedVersion: verification.installedVersion,
|
|
36058
36214
|
restartRequired: true
|
|
36059
36215
|
});
|
|
36060
36216
|
} else {
|
|
@@ -36179,10 +36335,11 @@ function setUpdateConfig(patch) {
|
|
|
36179
36335
|
const persisted = persistUpdateConfig(updateConfig);
|
|
36180
36336
|
return { config: { ...updateConfig }, persisted };
|
|
36181
36337
|
}
|
|
36182
|
-
var GITHUB_REPO = "Signet-AI/signetai", NPM_PACKAGE = "signetai", MIN_UPDATE_INTERVAL_SECONDS = 300, MAX_UPDATE_INTERVAL_SECONDS = 604800, DEFAULT_UPDATE_INTERVAL_SECONDS = 21600, currentVersion2 = "0.0.0", agentsDir = "", initialized2 = false, lastUpdateCheck = null, lastUpdateCheckTime = null, updateTimer = null, updateCheckInProgress = false, updateInstallInProgress = false, pendingRestartVersion = null, lastAutoUpdateAt = null, lastAutoUpdateError = null, updateConfig, restartCallback = null;
|
|
36338
|
+
var GITHUB_REPO = "Signet-AI/signetai", NPM_PACKAGE = "signetai", EXACT_SEMVER_PATTERN, MIN_UPDATE_INTERVAL_SECONDS = 300, MAX_UPDATE_INTERVAL_SECONDS = 604800, DEFAULT_UPDATE_INTERVAL_SECONDS = 21600, currentVersion2 = "0.0.0", agentsDir = "", initialized2 = false, lastUpdateCheck = null, lastUpdateCheckTime = null, updateTimer = null, updateCheckInProgress = false, updateInstallInProgress = false, pendingRestartVersion = null, lastAutoUpdateAt = null, lastAutoUpdateError = null, updateConfig, restartCallback = null;
|
|
36183
36339
|
var init_update_system = __esm(() => {
|
|
36184
36340
|
init_dist2();
|
|
36185
36341
|
init_logger();
|
|
36342
|
+
EXACT_SEMVER_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
36186
36343
|
updateConfig = {
|
|
36187
36344
|
autoInstall: false,
|
|
36188
36345
|
checkInterval: DEFAULT_UPDATE_INTERVAL_SECONDS,
|
|
@@ -36192,7 +36349,7 @@ var init_update_system = __esm(() => {
|
|
|
36192
36349
|
|
|
36193
36350
|
// ../daemon/src/hooks.ts
|
|
36194
36351
|
import { existsSync as existsSync19, readFileSync as readFileSync17, realpathSync as realpathSync2 } from "fs";
|
|
36195
|
-
import { homedir as
|
|
36352
|
+
import { homedir as homedir14 } from "os";
|
|
36196
36353
|
import { join as join25 } from "path";
|
|
36197
36354
|
function resetPromptDedup(sessionKey) {
|
|
36198
36355
|
promptDedupRecent.delete(sessionKey);
|
|
@@ -37560,6 +37717,25 @@ function resolveRecallUserMessage(req) {
|
|
|
37560
37717
|
const raw2 = typeof req.userPrompt === "string" ? req.userPrompt : "";
|
|
37561
37718
|
return stripUntrustedMetadata(raw2).trim();
|
|
37562
37719
|
}
|
|
37720
|
+
function finalizeUserPromptSubmitSuccess(req, userMessage, start, result, engineOverride) {
|
|
37721
|
+
const inject = typeof result.inject === "string" ? result.inject : "";
|
|
37722
|
+
const rawMemoryCount = typeof result.memoryCount === "number" ? result.memoryCount : 0;
|
|
37723
|
+
const memoryCount = Number.isFinite(rawMemoryCount) && rawMemoryCount >= 0 ? rawMemoryCount : 0;
|
|
37724
|
+
const engine = typeof engineOverride === "string" && engineOverride.trim().length > 0 ? engineOverride : typeof result.engine === "string" && result.engine.trim().length > 0 ? result.engine : "none";
|
|
37725
|
+
const duration = Date.now() - start;
|
|
37726
|
+
logger.info("hooks", "User prompt submit", {
|
|
37727
|
+
harness: req.harness,
|
|
37728
|
+
project: req.project,
|
|
37729
|
+
sessionKey: req.sessionKey,
|
|
37730
|
+
memoryCount,
|
|
37731
|
+
prompt: userMessage,
|
|
37732
|
+
injectChars: inject.length,
|
|
37733
|
+
inject,
|
|
37734
|
+
engine,
|
|
37735
|
+
durationMs: duration
|
|
37736
|
+
});
|
|
37737
|
+
return result;
|
|
37738
|
+
}
|
|
37563
37739
|
async function handleUserPromptSubmit(req) {
|
|
37564
37740
|
const start = Date.now();
|
|
37565
37741
|
const submitCfg = loadHooksConfig().userPromptSubmit ?? {};
|
|
@@ -37647,10 +37823,18 @@ ${now4} (${tz})
|
|
|
37647
37823
|
const expiryWarning = req.sessionKey ? getExpiryWarning(req.sessionKey) : null;
|
|
37648
37824
|
const warnings = expiryWarning ? [expiryWarning] : undefined;
|
|
37649
37825
|
if (submitCfg.enabled === false) {
|
|
37650
|
-
return
|
|
37826
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, {
|
|
37827
|
+
inject: metadataHeader,
|
|
37828
|
+
memoryCount: 0,
|
|
37829
|
+
warnings
|
|
37830
|
+
}, "disabled");
|
|
37651
37831
|
}
|
|
37652
37832
|
if (keywordTerms.length < 1 || vectorQuery.length === 0 || !existsSync19(MEMORY_DB)) {
|
|
37653
|
-
return
|
|
37833
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, {
|
|
37834
|
+
inject: metadataHeader,
|
|
37835
|
+
memoryCount: 0,
|
|
37836
|
+
warnings
|
|
37837
|
+
}, "no-query");
|
|
37654
37838
|
}
|
|
37655
37839
|
try {
|
|
37656
37840
|
const cfg2 = loadMemoryConfig(AGENTS_DIR3);
|
|
@@ -37679,7 +37863,7 @@ ${now4} (${tz})
|
|
|
37679
37863
|
limit: 4
|
|
37680
37864
|
});
|
|
37681
37865
|
if (temporalHits.length > 0) {
|
|
37682
|
-
return buildTemporalFallbackResponse(metadataHeader, queryTerms, injectBudget, temporalHits, warnings);
|
|
37866
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, buildTemporalFallbackResponse(metadataHeader, queryTerms, injectBudget, temporalHits, warnings));
|
|
37683
37867
|
}
|
|
37684
37868
|
const transcriptHits = searchTranscriptFallback({
|
|
37685
37869
|
query: vectorQuery,
|
|
@@ -37689,10 +37873,14 @@ ${now4} (${tz})
|
|
|
37689
37873
|
limit: 3
|
|
37690
37874
|
});
|
|
37691
37875
|
if (transcriptHits.length > 0) {
|
|
37692
|
-
return buildTranscriptFallbackResponse(metadataHeader, queryTerms, injectBudget, transcriptHits, warnings);
|
|
37876
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, buildTranscriptFallbackResponse(metadataHeader, queryTerms, injectBudget, transcriptHits, warnings));
|
|
37693
37877
|
}
|
|
37694
37878
|
if (noStructured) {
|
|
37695
|
-
return
|
|
37879
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, {
|
|
37880
|
+
inject: metadataHeader,
|
|
37881
|
+
memoryCount: 0,
|
|
37882
|
+
warnings
|
|
37883
|
+
}, "no-structured");
|
|
37696
37884
|
}
|
|
37697
37885
|
}
|
|
37698
37886
|
const mapped = recall.results.map((result) => ({
|
|
@@ -37717,7 +37905,11 @@ ${now4} (${tz})
|
|
|
37717
37905
|
}
|
|
37718
37906
|
}
|
|
37719
37907
|
if (selected.length === 0) {
|
|
37720
|
-
return
|
|
37908
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, {
|
|
37909
|
+
inject: metadataHeader,
|
|
37910
|
+
memoryCount: 0,
|
|
37911
|
+
warnings
|
|
37912
|
+
}, "dedup-empty");
|
|
37721
37913
|
}
|
|
37722
37914
|
const lines = selected.map((s2) => {
|
|
37723
37915
|
const dateStr = formatMemoryDate(s2.created_at);
|
|
@@ -37749,24 +37941,13 @@ IDs: ${selectedIds.join(", ")}
|
|
|
37749
37941
|
recentTurns.pop();
|
|
37750
37942
|
}
|
|
37751
37943
|
}
|
|
37752
|
-
|
|
37753
|
-
logger.info("hooks", "User prompt submit", {
|
|
37754
|
-
harness: req.harness,
|
|
37755
|
-
project: req.project,
|
|
37756
|
-
sessionKey: req.sessionKey,
|
|
37757
|
-
memoryCount: selected.length,
|
|
37758
|
-
prompt: userMessage,
|
|
37759
|
-
injectChars: inject.length,
|
|
37760
|
-
inject,
|
|
37761
|
-
durationMs: duration
|
|
37762
|
-
});
|
|
37763
|
-
return {
|
|
37944
|
+
return finalizeUserPromptSubmitSuccess(req, userMessage, start, {
|
|
37764
37945
|
inject,
|
|
37765
37946
|
memoryCount: selected.length,
|
|
37766
37947
|
queryTerms,
|
|
37767
37948
|
engine: "hybrid",
|
|
37768
37949
|
warnings
|
|
37769
|
-
};
|
|
37950
|
+
});
|
|
37770
37951
|
} catch (e) {
|
|
37771
37952
|
logger.error("hooks", "User prompt submit failed", e);
|
|
37772
37953
|
return { inject: "", memoryCount: 0, warnings };
|
|
@@ -38206,7 +38387,7 @@ var init_hooks = __esm(() => {
|
|
|
38206
38387
|
init_structural_features();
|
|
38207
38388
|
init_temporal_fallback();
|
|
38208
38389
|
init_update_system();
|
|
38209
|
-
AGENTS_DIR3 = process.env.SIGNET_PATH || join25(
|
|
38390
|
+
AGENTS_DIR3 = process.env.SIGNET_PATH || join25(homedir14(), ".agents");
|
|
38210
38391
|
MEMORY_DB = join25(AGENTS_DIR3, "memory", "memories.db");
|
|
38211
38392
|
sessionStartSeen = new Map;
|
|
38212
38393
|
promptDedupRecent = new Map;
|
|
@@ -38348,7 +38529,7 @@ function trimTrailingSlash(url) {
|
|
|
38348
38529
|
// ../daemon/src/pipeline/provider.ts
|
|
38349
38530
|
import { spawn as nodeSpawn } from "child_process";
|
|
38350
38531
|
import { existsSync as existsSync20 } from "fs";
|
|
38351
|
-
import { homedir as
|
|
38532
|
+
import { homedir as homedir15 } from "os";
|
|
38352
38533
|
import { Readable as Readable4 } from "stream";
|
|
38353
38534
|
|
|
38354
38535
|
class SubprocessSemaphore {
|
|
@@ -39203,7 +39384,7 @@ function resolveOpenCodeBin() {
|
|
|
39203
39384
|
const found = Bun.which("opencode");
|
|
39204
39385
|
if (found)
|
|
39205
39386
|
return found;
|
|
39206
|
-
const fallback = `${
|
|
39387
|
+
const fallback = `${homedir15()}/.opencode/bin/opencode`;
|
|
39207
39388
|
if (existsSync20(fallback))
|
|
39208
39389
|
return fallback;
|
|
39209
39390
|
return null;
|
|
@@ -39696,7 +39877,7 @@ var init_provider = __esm(() => {
|
|
|
39696
39877
|
DEFAULT_CODEX_CONFIG = {
|
|
39697
39878
|
model: "gpt-5-codex-mini",
|
|
39698
39879
|
defaultTimeoutMs: 60000,
|
|
39699
|
-
workingDirectory:
|
|
39880
|
+
workingDirectory: homedir15()
|
|
39700
39881
|
};
|
|
39701
39882
|
DEFAULT_OPENCODE_CONFIG = {
|
|
39702
39883
|
baseUrl: "http://127.0.0.1:4096",
|
|
@@ -40286,7 +40467,7 @@ var init_predictor_comparison = __esm(() => {
|
|
|
40286
40467
|
|
|
40287
40468
|
// ../daemon/src/pipeline/summary-worker.ts
|
|
40288
40469
|
import { existsSync as existsSync21, mkdirSync as mkdirSync8, writeFileSync as writeFileSync9 } from "fs";
|
|
40289
|
-
import { homedir as
|
|
40470
|
+
import { homedir as homedir16 } from "os";
|
|
40290
40471
|
import { join as join26 } from "path";
|
|
40291
40472
|
function buildPrompt3(transcript, date) {
|
|
40292
40473
|
return `You are a session librarian. Summarize this coding session as a dated markdown note and extract key durable facts.
|
|
@@ -41183,7 +41364,7 @@ var init_summary_worker = __esm(() => {
|
|
|
41183
41364
|
init_session_transcripts();
|
|
41184
41365
|
init_provider();
|
|
41185
41366
|
init_significance_gate();
|
|
41186
|
-
AGENTS_DIR4 = process.env.SIGNET_PATH || join26(
|
|
41367
|
+
AGENTS_DIR4 = process.env.SIGNET_PATH || join26(homedir16(), ".agents");
|
|
41187
41368
|
MEMORY_DIR = join26(AGENTS_DIR4, "memory");
|
|
41188
41369
|
});
|
|
41189
41370
|
|
|
@@ -41211,10 +41392,10 @@ var init_synthesis_llm = __esm(() => {
|
|
|
41211
41392
|
|
|
41212
41393
|
// ../daemon/src/pipeline/synthesis-worker.ts
|
|
41213
41394
|
import { existsSync as existsSync22, mkdirSync as mkdirSync9, readFileSync as readFileSync18, writeFileSync as writeFileSync10 } from "fs";
|
|
41214
|
-
import { homedir as
|
|
41395
|
+
import { homedir as homedir17 } from "os";
|
|
41215
41396
|
import { join as join27 } from "path";
|
|
41216
41397
|
function getAgentsDir() {
|
|
41217
|
-
return process.env.SIGNET_PATH || join27(
|
|
41398
|
+
return process.env.SIGNET_PATH || join27(homedir17(), ".agents");
|
|
41218
41399
|
}
|
|
41219
41400
|
function normalizeAgentId(agentId) {
|
|
41220
41401
|
const next = agentId?.trim();
|
|
@@ -48278,7 +48459,7 @@ function resolveRuntimeModel(effective, configured, model) {
|
|
|
48278
48459
|
// ../daemon/src/predictor-client.ts
|
|
48279
48460
|
import { spawn as spawn3 } from "child_process";
|
|
48280
48461
|
import { statSync as statSync6 } from "fs";
|
|
48281
|
-
import { homedir as
|
|
48462
|
+
import { homedir as homedir18 } from "os";
|
|
48282
48463
|
import { isAbsolute as isAbsolute2, join as join28 } from "path";
|
|
48283
48464
|
import { createInterface } from "readline";
|
|
48284
48465
|
function isRecord9(value) {
|
|
@@ -48363,7 +48544,7 @@ function syncedBinaryCandidate() {
|
|
|
48363
48544
|
const ext = platform2 === "win32" ? ".exe" : "";
|
|
48364
48545
|
const name = `signet-predictor-${platform2}-${arch2}${ext}`;
|
|
48365
48546
|
const envPath = process.env.SIGNET_PATH;
|
|
48366
|
-
const agentsDir2 = typeof envPath === "string" && isAbsolute2(envPath) ? envPath : join28(
|
|
48547
|
+
const agentsDir2 = typeof envPath === "string" && isAbsolute2(envPath) ? envPath : join28(homedir18(), ".agents");
|
|
48367
48548
|
return join28(agentsDir2, ".daemon", "bin", name);
|
|
48368
48549
|
}
|
|
48369
48550
|
function localBinaryCandidates() {
|
|
@@ -48404,7 +48585,7 @@ function resolvePredictorCheckpointPath(config) {
|
|
|
48404
48585
|
return config.checkpointPath ?? defaultCheckpointPath();
|
|
48405
48586
|
}
|
|
48406
48587
|
function defaultCheckpointPath() {
|
|
48407
|
-
return join28(
|
|
48588
|
+
return join28(homedir18(), ".agents", "memory", "predictor", "model.bin");
|
|
48408
48589
|
}
|
|
48409
48590
|
function describeStatusResult(result) {
|
|
48410
48591
|
if (isRecord9(result)) {
|
|
@@ -55212,7 +55393,7 @@ var init_cron = __esm(() => {
|
|
|
55212
55393
|
|
|
55213
55394
|
// ../daemon/src/scheduler/skill-resolver.ts
|
|
55214
55395
|
import { readFileSync as readFileSync19 } from "fs";
|
|
55215
|
-
import { homedir as
|
|
55396
|
+
import { homedir as homedir19 } from "os";
|
|
55216
55397
|
import { join as join29 } from "path";
|
|
55217
55398
|
function stripFrontmatter(content) {
|
|
55218
55399
|
if (!content.startsWith("---"))
|
|
@@ -55248,7 +55429,7 @@ ${basePrompt}`;
|
|
|
55248
55429
|
var AGENTS_DIR5;
|
|
55249
55430
|
var init_skill_resolver = __esm(() => {
|
|
55250
55431
|
init_logger();
|
|
55251
|
-
AGENTS_DIR5 = process.env.SIGNET_PATH ?? join29(
|
|
55432
|
+
AGENTS_DIR5 = process.env.SIGNET_PATH ?? join29(homedir19(), ".agents");
|
|
55252
55433
|
});
|
|
55253
55434
|
|
|
55254
55435
|
// ../daemon/src/scheduler/spawn.ts
|
|
@@ -55498,7 +55679,7 @@ var init_task_stream = __esm(() => {
|
|
|
55498
55679
|
});
|
|
55499
55680
|
|
|
55500
55681
|
// ../daemon/src/scheduler/worker.ts
|
|
55501
|
-
import { homedir as
|
|
55682
|
+
import { homedir as homedir20 } from "os";
|
|
55502
55683
|
import { join as join30 } from "path";
|
|
55503
55684
|
function isTaskHarness(value) {
|
|
55504
55685
|
return value === "claude-code" || value === "opencode" || value === "codex";
|
|
@@ -55694,7 +55875,7 @@ var init_worker2 = __esm(() => {
|
|
|
55694
55875
|
init_spawn();
|
|
55695
55876
|
init_task_stream();
|
|
55696
55877
|
init_logger();
|
|
55697
|
-
AGENTS_DIR6 = process.env.SIGNET_PATH || join30(
|
|
55878
|
+
AGENTS_DIR6 = process.env.SIGNET_PATH || join30(homedir20(), ".agents");
|
|
55698
55879
|
taskModelCache = new Map;
|
|
55699
55880
|
});
|
|
55700
55881
|
|
|
@@ -101756,10 +101937,10 @@ var init_skill_reconciler = __esm(() => {
|
|
|
101756
101937
|
// ../daemon/src/routes/skills.ts
|
|
101757
101938
|
import { spawn as spawn4 } from "child_process";
|
|
101758
101939
|
import { existsSync as existsSync24, readFileSync as readFileSync21, readdirSync as readdirSync6, rmSync, writeFileSync as writeFileSync11 } from "fs";
|
|
101759
|
-
import { homedir as
|
|
101940
|
+
import { homedir as homedir21 } from "os";
|
|
101760
101941
|
import { join as join33 } from "path";
|
|
101761
101942
|
function getAgentsDir2() {
|
|
101762
|
-
return process.env.SIGNET_PATH || join33(
|
|
101943
|
+
return process.env.SIGNET_PATH || join33(homedir21(), ".agents");
|
|
101763
101944
|
}
|
|
101764
101945
|
function getSkillsDir() {
|
|
101765
101946
|
return join33(getAgentsDir2(), "skills");
|
|
@@ -104947,10 +105128,10 @@ var init_event_bus = __esm(() => {
|
|
|
104947
105128
|
|
|
104948
105129
|
// ../daemon/src/widget-gen.ts
|
|
104949
105130
|
import { existsSync as existsSync25, mkdirSync as mkdirSync10, readFileSync as readFileSync22, unlinkSync as unlinkSync3 } from "fs";
|
|
104950
|
-
import { homedir as
|
|
105131
|
+
import { homedir as homedir22 } from "os";
|
|
104951
105132
|
import { join as join34 } from "path";
|
|
104952
105133
|
function agentsDir2() {
|
|
104953
|
-
return process.env.SIGNET_PATH || join34(
|
|
105134
|
+
return process.env.SIGNET_PATH || join34(homedir22(), ".agents");
|
|
104954
105135
|
}
|
|
104955
105136
|
function widgetDir() {
|
|
104956
105137
|
return join34(agentsDir2(), "marketplace", "widgets");
|
|
@@ -105211,10 +105392,10 @@ var init_widget_gen = __esm(() => {
|
|
|
105211
105392
|
|
|
105212
105393
|
// ../daemon/src/mcp-probe.ts
|
|
105213
105394
|
import { existsSync as existsSync26, mkdirSync as mkdirSync11, readFileSync as readFileSync23, unlinkSync as unlinkSync4, writeFileSync as writeFileSync12 } from "fs";
|
|
105214
|
-
import { homedir as
|
|
105395
|
+
import { homedir as homedir23 } from "os";
|
|
105215
105396
|
import { join as join35 } from "path";
|
|
105216
105397
|
function getAgentsDir3() {
|
|
105217
|
-
return process.env.SIGNET_PATH || join35(
|
|
105398
|
+
return process.env.SIGNET_PATH || join35(homedir23(), ".agents");
|
|
105218
105399
|
}
|
|
105219
105400
|
function getManifestsDir() {
|
|
105220
105401
|
return join35(getAgentsDir3(), "marketplace", "app-manifests");
|
|
@@ -105586,10 +105767,10 @@ __export(exports_marketplace, {
|
|
|
105586
105767
|
extractStandardMcpConfig: () => extractStandardMcpConfig
|
|
105587
105768
|
});
|
|
105588
105769
|
import { existsSync as existsSync27, mkdirSync as mkdirSync12, readFileSync as readFileSync24, writeFileSync as writeFileSync13 } from "fs";
|
|
105589
|
-
import { homedir as
|
|
105770
|
+
import { homedir as homedir24 } from "os";
|
|
105590
105771
|
import { join as join36 } from "path";
|
|
105591
105772
|
function getAgentsDir4() {
|
|
105592
|
-
return process.env.SIGNET_PATH || join36(
|
|
105773
|
+
return process.env.SIGNET_PATH || join36(homedir24(), ".agents");
|
|
105593
105774
|
}
|
|
105594
105775
|
function getMarketplaceDir() {
|
|
105595
105776
|
return join36(getAgentsDir4(), "marketplace");
|
|
@@ -106855,10 +107036,10 @@ __export(exports_marketplace_helpers, {
|
|
|
106855
107036
|
readInstalledServersPublic: () => readInstalledServersPublic
|
|
106856
107037
|
});
|
|
106857
107038
|
import { existsSync as existsSync28, readFileSync as readFileSync25 } from "fs";
|
|
106858
|
-
import { homedir as
|
|
107039
|
+
import { homedir as homedir25 } from "os";
|
|
106859
107040
|
import { join as join37 } from "path";
|
|
106860
107041
|
function getAgentsDir5() {
|
|
106861
|
-
return process.env.SIGNET_PATH || join37(
|
|
107042
|
+
return process.env.SIGNET_PATH || join37(homedir25(), ".agents");
|
|
106862
107043
|
}
|
|
106863
107044
|
function getInstalledMcpPath2() {
|
|
106864
107045
|
return join37(getAgentsDir5(), "marketplace", "mcp-servers.json");
|
|
@@ -106884,7 +107065,7 @@ var init_marketplace_helpers = () => {};
|
|
|
106884
107065
|
// ../daemon/src/routes/app-tray.ts
|
|
106885
107066
|
import { existsSync as existsSync29, mkdirSync as mkdirSync13, readFileSync as readFileSync26, writeFileSync as writeFileSync14 } from "fs";
|
|
106886
107067
|
import { join as join38 } from "path";
|
|
106887
|
-
import { homedir as
|
|
107068
|
+
import { homedir as homedir26 } from "os";
|
|
106888
107069
|
function isValidState(s2) {
|
|
106889
107070
|
return s2 === "tray" || s2 === "grid" || s2 === "dock";
|
|
106890
107071
|
}
|
|
@@ -107034,7 +107215,7 @@ function mountAppTrayRoutes(app) {
|
|
|
107034
107215
|
updatedAt: new Date().toISOString()
|
|
107035
107216
|
};
|
|
107036
107217
|
tray[index] = updated;
|
|
107037
|
-
const agentsDir3 = process.env.SIGNET_PATH || join38(
|
|
107218
|
+
const agentsDir3 = process.env.SIGNET_PATH || join38(homedir26(), ".agents");
|
|
107038
107219
|
const trayPath = join38(agentsDir3, "marketplace", "app-tray.json");
|
|
107039
107220
|
writeFileSync14(trayPath, JSON.stringify(tray, null, 2));
|
|
107040
107221
|
return c2.json({ success: true, entry: updated });
|
|
@@ -107093,7 +107274,7 @@ function mountAppTrayRoutes(app) {
|
|
|
107093
107274
|
gridPosition: pos,
|
|
107094
107275
|
updatedAt: new Date().toISOString()
|
|
107095
107276
|
};
|
|
107096
|
-
const agentsDir3 = process.env.SIGNET_PATH || join38(
|
|
107277
|
+
const agentsDir3 = process.env.SIGNET_PATH || join38(homedir26(), ".agents");
|
|
107097
107278
|
const trayPath = join38(agentsDir3, "marketplace", "app-tray.json");
|
|
107098
107279
|
writeFileSync14(trayPath, JSON.stringify(tray, null, 2));
|
|
107099
107280
|
}
|
|
@@ -107112,7 +107293,7 @@ function mountAppTrayRoutes(app) {
|
|
|
107112
107293
|
});
|
|
107113
107294
|
}
|
|
107114
107295
|
function getAgentsDir6() {
|
|
107115
|
-
return process.env.SIGNET_PATH || join38(
|
|
107296
|
+
return process.env.SIGNET_PATH || join38(homedir26(), ".agents");
|
|
107116
107297
|
}
|
|
107117
107298
|
function getMarketplaceDir2() {
|
|
107118
107299
|
return join38(getAgentsDir6(), "marketplace");
|
|
@@ -107385,10 +107566,10 @@ var init_event_bus2 = __esm(() => {
|
|
|
107385
107566
|
// ../daemon/src/routes/marketplace-reviews.ts
|
|
107386
107567
|
import { randomUUID as randomUUID4 } from "crypto";
|
|
107387
107568
|
import { existsSync as existsSync31, mkdirSync as mkdirSync14, readFileSync as readFileSync27, writeFileSync as writeFileSync15 } from "fs";
|
|
107388
|
-
import { homedir as
|
|
107569
|
+
import { homedir as homedir27 } from "os";
|
|
107389
107570
|
import { join as join40 } from "path";
|
|
107390
107571
|
function getAgentsDir7() {
|
|
107391
|
-
return process.env.SIGNET_PATH || join40(
|
|
107572
|
+
return process.env.SIGNET_PATH || join40(homedir27(), ".agents");
|
|
107392
107573
|
}
|
|
107393
107574
|
function getMarketplaceDir3() {
|
|
107394
107575
|
return join40(getAgentsDir7(), "marketplace");
|
|
@@ -108574,7 +108755,7 @@ import {
|
|
|
108574
108755
|
unlinkSync as unlinkSync5,
|
|
108575
108756
|
writeFileSync as writeFileSync16
|
|
108576
108757
|
} from "fs";
|
|
108577
|
-
import { homedir as
|
|
108758
|
+
import { homedir as homedir28 } from "os";
|
|
108578
108759
|
import { basename as basename7, dirname as dirname10, join as join42 } from "path";
|
|
108579
108760
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
108580
108761
|
function readEnvTrimmed(key) {
|
|
@@ -110477,7 +110658,7 @@ ${c2}`;
|
|
|
110477
110658
|
}).filter(Boolean).join(`
|
|
110478
110659
|
`);
|
|
110479
110660
|
const composed = withBlock + identityExtras;
|
|
110480
|
-
const opencodeDir = join42(
|
|
110661
|
+
const opencodeDir = join42(homedir28(), ".config", "opencode");
|
|
110481
110662
|
if (existsSync33(opencodeDir)) {
|
|
110482
110663
|
try {
|
|
110483
110664
|
writeFileSync16(join42(opencodeDir, "AGENTS.md"), buildHeader("AGENTS.md") + composed);
|
|
@@ -110638,7 +110819,7 @@ function startFileWatcher() {
|
|
|
110638
110819
|
startClaudeMemoryWatcher();
|
|
110639
110820
|
}
|
|
110640
110821
|
function startClaudeMemoryWatcher() {
|
|
110641
|
-
const claudeProjectsDir = join42(
|
|
110822
|
+
const claudeProjectsDir = join42(homedir28(), ".claude", "projects");
|
|
110642
110823
|
if (!existsSync33(claudeProjectsDir))
|
|
110643
110824
|
return;
|
|
110644
110825
|
const claudeWatcher = watch(join42(claudeProjectsDir, "**", "memory", "MEMORY.md"), {
|
|
@@ -111790,7 +111971,7 @@ async function main() {
|
|
|
111790
111971
|
const errDetails = e instanceof Error ? { message: e.message, stack: e.stack } : { error: String(e) };
|
|
111791
111972
|
logger.error("daemon", "Failed to import existing memory files", undefined, errDetails);
|
|
111792
111973
|
});
|
|
111793
|
-
const claudeProjectsDir = join42(
|
|
111974
|
+
const claudeProjectsDir = join42(homedir28(), ".claude", "projects");
|
|
111794
111975
|
if (existsSync33(claudeProjectsDir)) {
|
|
111795
111976
|
syncExistingClaudeMemories(claudeProjectsDir);
|
|
111796
111977
|
}
|
|
@@ -111868,7 +112049,7 @@ var init_daemon = __esm(() => {
|
|
|
111868
112049
|
init_hooks();
|
|
111869
112050
|
init_session_transcripts();
|
|
111870
112051
|
init_session_tracker();
|
|
111871
|
-
AGENTS_DIR7 = process.env.SIGNET_PATH || join42(
|
|
112052
|
+
AGENTS_DIR7 = process.env.SIGNET_PATH || join42(homedir28(), ".agents");
|
|
111872
112053
|
DAEMON_DIR = join42(AGENTS_DIR7, ".daemon");
|
|
111873
112054
|
PID_FILE = join42(DAEMON_DIR, "pid");
|
|
111874
112055
|
LOG_DIR = join42(DAEMON_DIR, "logs");
|
|
@@ -114346,14 +114527,14 @@ var init_daemon = __esm(() => {
|
|
|
114346
114527
|
{
|
|
114347
114528
|
name: "Claude Code",
|
|
114348
114529
|
id: "claude-code",
|
|
114349
|
-
path: join42(
|
|
114350
|
-
exists: existsSync33(join42(
|
|
114530
|
+
path: join42(homedir28(), ".claude", "settings.json"),
|
|
114531
|
+
exists: existsSync33(join42(homedir28(), ".claude", "settings.json"))
|
|
114351
114532
|
},
|
|
114352
114533
|
{
|
|
114353
114534
|
name: "OpenCode",
|
|
114354
114535
|
id: "opencode",
|
|
114355
|
-
path: join42(
|
|
114356
|
-
exists: existsSync33(join42(
|
|
114536
|
+
path: join42(homedir28(), ".config", "opencode", "AGENTS.md"),
|
|
114537
|
+
exists: existsSync33(join42(homedir28(), ".config", "opencode", "AGENTS.md"))
|
|
114357
114538
|
},
|
|
114358
114539
|
{
|
|
114359
114540
|
name: "OpenClaw",
|